Dr Alison Griffiths & Dr Mohammad Patwary {a.l.griffiths, m.n.patwary}@staffs.ac.uk
Communications (CE00038-2) Introduction 1 06/10/06 Simulink Amplitude Modulation Objective AM Modulation The objective of this lab is to help you become familiar with Simulink To investigate AM modulation To observe and measure the waveforms and spectra for Double sideband AM (DSBAM), DSB Diminished Carrier and DSB Suppressed Carrier (DSBSC). To measure the power in DSB amplitude modulation. Theory AM Modulation The signal generator at 50 kHz represents the message signal, v m (t) = V m cos m t. The signal generator at 500 kHz represents the carrier, v c (t)=cos c t.
The output modulated signal may be represented by:
v S (t) = (V DC + v m (t)) cos c t
= V DC cos c t + v m (t)cos c t
Communications (CE00038-2) 2
This is represented by the following block diagram: Carrier component Upper and Lower Sidebands
Alternatively, with m(t) = V m cos m t,
v S (t) = (V DC + V m cos m t) cos c t
v S (t) = V DC cos c t + V m cos m t cos c t
A trigonometric identity is: cos A cos B = cos (A+B) + cos (A - B)
ie ( ) ( )t cos 2 V t cos 2 V t cos V ) t ( v m c m m c m c DC S + + + = Communications (CE00038-2) 3
Carrier component at f c Hz. LSB at (f c - f m ) Hz USB at (f c + f m ) Hz
Modulation depth in AM is defined as m = DC m V V , hence changing the DC offset (V DC ),
is one way of changing the modulation depth. Change the DC offset and observe the effect on the waveforms and the output spectrum.
Procedure AM Modulation 1. Start up Matlab. 2. Start up Simulink by clicking the Simulink icon in the Matlab toolbar or by typing >> simulink at the Matlab prompt. You should see the Simulink Block Library window as shown below.
3. From the file menu, select new model. A Model window should open as shown below.
Communications (CE00038-2) 4 4. We will start by building and testing an AM-DSB/SC modulator. 5. Open the Signal Processing Blockset window in the Simulink Library Browser window. This will open the Signal Processing Blockset Library window which looks like this
6. Right click on the Signal Processing Sources block in the Signal Processing Block Library window and then choose Open the 'Souces' Library. The Sources Block Library should open as shown below. Communications (CE00038-2) 5
7. Drag and drop two Sine Wave blocks from the Sources Library to the Model window. 8. Drag and Drop a DSP Constant block from the Sources Library to the Model window. 9. Open the Math Operations block in the Simulink Block Library window. The Math Block Library window looks like this: Communications (CE00038-2) 6
10. Drag and drop one Product block and one Add block onto the Model window. 11. Open the Sinks block in the Simulink Block Library window. The Sinks Block Library window should open as shown below. Communications (CE00038-2) 7
12. Drag and drop a Scope block onto the Model window. To obtain more than one channel on your scope, Choose the scope parameters icon (2 nd from left) and change the Number of axes to the desired amount:
13. Search for a Spectrum Scope and drop it into the Model Window. You can search for any block using the search tool in the Simulink Library Browser window. Communications (CE00038-2) 8 14. You will want several of these scopes to view the signals and spectra. Make sure you buffer the input of the Spectrum scope, by ticking the input as shown:
15. Connect the blocks with signal flow lines to represent an AM modulator (find the block diagram from your notes!). You can re-name blocks by clicking on their original name. 16. The Model window should now look like this:
Communications (CE00038-2) 9 17. Add additional scopes and spectrum scopes to display all the required signals. 18. The simulation will be carried out at a sample rate of 1000,000 Hertz. 19. Define the sampling period as 1000,000 Hertz by typing the following in Matlab command window. >> fs = 10^6; 20. The sinusoidal carrier will have a frequency of 50kHz and the message signal will one of 500kHz. Open v c (t) and v m (t) and set the following values:
21. Save your model by selecting Save as... in the File menu in the Model window. Call this model lab_1.mdl. 22. Bring up the Simulation Configuration parameters... dialogue from the Simulation menu in the Model window. 23. Under Simulation time, change the Stop time to 0.0002. 24. Under Solver options, change the Type to Fixed-step. 25. The Simulation Parameters window should look something like this. Communications (CE00038-2) 10
26. Set the values by clicking OK. 27. Next select Start from the Simulation menu in the Model window. 28. Open the Scope displays by double clicking on the scope. Then you should see something like this: Communications (CE00038-2) 11
Communications (CE00038-2) 12
To get the pictures above, you will need to modify the plot properties of the scope.
29. Keeping V m constant, set the modulation depth to m = 0.5, m = 1, m = 2 and m = infinity by varying the value of v dc and observe the different waveforms. 30. Reduce the sampling period as 100,000 Hertz by typing the following in Matlab command window. >> fs = 10^5; 31. Re-run the simulations for the different values of m and observe the output on the Spectrum Scopes. Are the values what you expect from theory? 32. For each setting of modulation depth, m, observe and record the DSB waveform and spectrum, including the voltage amplitude in each component. For each value of modulation depth, measure the total power at the output on the power meter provided. Note how the waveforms, spectrum and power relate to modulation depth. Note when m > 1, the phase of the DSB envelope alternates between 0 and 180 degrees. Compare your results with what you would expect from theory, i.e. for the waveform, spectra and power.