Communications Blockset    

Timing Issues in Analog Modulation

A few timing issues are important for simulating analog modulation with this blockset. The following sections illustrate choices of signal sample times and simulation step sizes.

Signal Sample Times

All analog demodulators in this blockset produce discrete-time, not continuous-time, output. These blocks require you to specify the output sample time as a mask parameter. In addition, some analog modulators require you to specify the sample time as a mask parameter. Modulators in this category are FM Modulator Baseband, FM Modulator Passband, SSB AM Modulator Baseband, and SSB AM Modulator Passband.

Example Using a Modulator.   In the following figure, both Signal Inspection blocks show a sample time of 1 second in their icons. (The display Ts:[1 0] indicates a sample time of 1 second and a sample time offset of 0.) Setting the Sample time parameter in the FM Modulator Baseband block to 1 is appropriate because the input to this block also has a sample time of 1 second.

To open the completed model, click here in the MATLAB Help browser. To build the model, gather and configure these blocks:

Connect the blocks as in the figure. Then select Update diagram from the model window's Edit menu, which updates the display on each Signal Attributes block's icon. (Running the model is not particularly instructive because it does not represent a complete system.)

Simulation Step Sizes

If you use passband modulation with continuous-time signals, then you need to set the simulation step size, based on the carrier frequency. By the Nyquist theorem, the simulation sampling rate must be at least twice as large as the modulation carrier frequency. Equivalently, the simulation step size must be no larger than half the modulation carrier period.

When you begin a new model, Simulink automatically determines the default step size. To change the step size from the default to a different value, use this procedure:

  1. Select Simulation parameters from the model window's Simulation menu.
  2. Select the Solver panel.
  3. Set the Max step size and Initial step size parameters to numerical values (that is, not auto) that are appropriate for your model.

In some situations, Simulink automatically corrects a faulty simulation step size. For example, if a signal in your model has a sample time of .1 second and you set the model's Max step size parameter to 1, then running the model produces this response in the command window.

Example Using Step Size Relative to Carrier Period.   The model below illustrates why the simulation step size in a passband simulation must be appropriate for a given carrier frequency. The first Scope image shows the correct result of modulating a constant signal using double-sideband suppressed-carrier amplitude modulation, while the second Scope image shows incorrect results. The incorrect results occur because the simulation step size is too large relative to the modulation carrier frequency.

In this case, the DSBSC AM Modulator Passband block uses a Carrier frequency parameter of 100. That is, the carrier's period is .01 second and an appropriate simulation step size is no larger than .005. Therefore, a simulation step size of .01 second is too large to satisfy the Nyquist criterion. However, a simulation step size of .001 second is sufficiently small.

To open the completed model, click here in the MATLAB Help browser. To build the model, gather these blocks with their default parameters:

Connect the blocks as in the figure. Also, from the model window's Simulation menu, choose Simulation parameters; then in the Simulation Parameters dialog box, set Stop time to 1.

To generate the correct results as in the first Scope image in the figure, return to the Simulation Parameters dialog box and set both the Max step size and Initial step size parameters to .001. Then run the model and use the Scope window's zooming tools to study the sinusoidal output curve. You can also generate incorrect results, as in the second Scope image in the figure, by changing the Max step size and Initial step size parameters to .01 and running the model again.


  Representing Signals for Analog Modulation Filter Design Issues