Sei sulla pagina 1di 4

Introduction to Simulink for simulating Amplitude Modulation and Demodulation

Objectives:
To learn how to use Simulink and become familiar with its style and features.

Introduction Overview:
Simulink is a comprehensive dynamic systems analysis environment for design and simulation of engineering or scientific systems, for analog or digital signal processing, filter designs, control systems, and communication systems to general mathematical system modelling. Exercise 1: Start MATLAB and type in "simulink <enter>" on the main command line. The Simulink package will pop up in a separate window. Inspect the various drop down menus, and open the help menu. Exercise 2: Create a DSB-SC AM modulator and demodulator. (AM = Amplitude Modulation) The Simulink block diagram at the end of this tutorial shows a completed amplitude modulator and demodulator. You will enter this diagram in stages, simulate the system, and inspect the waveforms in time and frequency domains.
Click on the Simulation and then Configuration parameters. Change the Start time to 0 sec and

stop time to 1 sec. Note that in all digitally sampled systems, the Nyquist theorem requires the system clock to be at least twice the highest significant frequency in the system. When feeding signals into non-linear components or multipliers, higher frequency components may be generated. E.g. if two sine waves are fed into a multiplier, frequency components are generated at the sum and difference frequencies. To see smooth waveforms, the clock should be several times the Nyquist rate corresponding to the highest anticipated frequency component in the system. Set the Solver Options to: fixed-step, ode3 (default), and set the step size to 1E-5, equivalent to a system sample rate of 100 kHz, as shown below.

NOTE: One can also allow simulink to use a variable-step sampling interval which can speed up the simulation, and be provide improved accuracy in some situations. Select the Chirp Signal as the modulation source, and drag it onto the workspace. A chirp signal is a waveform for which the instantaneous frequency changes over time. (We could use a simple sinusoid for the input, but a frequency sweep generator provides a more informative graphical picture). Set the chirp parameters to: Initial Frequency 0Hz, target time 1 sec, frequency at target time 100 Hz. Insert a multiplier and multiply the chirp signal by a sinusoidal source with a frequency of 10 kHz (2*pi*10e3) and an amplitude 1 (this is the carrier wave). The output of the multiplier is the DSB-SC AM signal.

Connect up the modules using links. Modules and links can be moved, and deleted using the mouse. Modules can also be duplicated on the work sheet via "copy" and "paste" operations. Place "Scopes" (from Sink) at logical locations on the design to allow the waveforms to be viewed in a graphical window. Double click on the scope, click on parameters data history, and unclick limit data points to last. Run the simulation by clicking the play button on the toolbar. Double click on the scope(s) to take a closer look at the waveforms. You should zoom in to see the detail.

To demodulate the AM signal, use another multiplier to multiply the AM signal by a cosine with the same carrier frequency of 10kHz. The output of the multiplier has an envelope which resembles the input signal. Using the operator button, pass this new signal through an Analogue Butterworth LPF of 5th order with a cut off frequency at 200Hz (1256 rad/s). You can enter "2*pi*200" directly as a parameter, and Simulink will accept it. The filter can be found under signal processing blockset filtering Filter Implementations.

Place Scopes (from Sink) at logical locations on the design, click theplay button on the toolbar, and then double click on scope to take a closer look at the waveform.

Potrebbero piacerti anche