Beruflich Dokumente
Kultur Dokumente
ModSim Lab
This lab is designed for users having a basic knowledge of electronic theory and circuits to acquire familiarity and a thorough understanding of the measurement techniques as well as the theory, technology and terminology of Amplitude Modulation and Frequency Modulation.
Part 1. To invoke the lab software package click the mouse on the AM Fundamentals icon.
AM Fundamentals.lnk
Following the instructions prompted. In the main menu go through each module of the course, i.e. Why Modulation, Modulation Basics, Amplitude Modulation, Modulation Index, Modulation and Demodulation, and DSBSC & SSB. Then answer the review quiz in the proceeding pages.
In the main menu go through each module of the course, i.e. Modulation Basics, Narrowband FM, Frequency Modulation, Phase Modulation, Modulation Measurement, and Modulation and Demodulation. Then answer the review questions in the proceeding pages.
AM Modulation
Describe the reasons for using modulation to transmit baseband information signals? What is the limitation of transmitting directly a baseband signal? Relate AM, FM and PM to the following expression: e(t ) = A cos( c t + ) . Which variable in the expression e(t ) = f (t ) cos[( c t + g (t ) )t + h(t ) ] (i) Provides the best signal fidelity at the receiver (ii) Broadcast to the largest number of people at the least cost (iii) Transmit the maximum amount of information within a restricted bandwidth
What is modulation index m? Sketch an AM signal with m = 0, m = 0.5, m = 1 Sketch an AM signal with over modulation. What parameters characterize DSB? What is modulation distortion? What is SSB?
FM and PM Modulation
10
11
12
13
Introduction To CommSim
These sessions will be spent using the CommSim (Communication Systems Simulation) package, which permits easy simulation of communication functions and systems. Session 1 will be tutorial one, to get you familiar with CommSim. You will work on your own at a PC doing some simple exercises with full instructions. You will then do a slightly harder exercise with less detailed instructions; it will simulate a signal composed of a product of two sinusoids and involves most of the skills needed for later exercises. There will be no report required for Session 1. It is thought that two hours will be adequate time to complete Session 1; you may even be able to get started on the work for Session 2. Please arrive on time for Session 1, which will start with a talk by lab supervisors on various system details. (If you miss it, you may have trouble even logging on.) Session 2 to 4 will have you using CommSim to perform a variety of communication-systems functions and get hard copy of the resulting waveforms and spectra, otherwise sketch neatly. Each student will perform, working on their own, three exercises. While you are welcome to perform exercises of your own devising (and such attempts will be highly regarded), our experience is that it is not easy to choose all parameters appropriately at the first attempt, and the whole lot often has to be repeated. Accordingly, unless you are particularly confident, we suggest that you basically follow the course suggested in the following handout. Make sure that every printout you make includes your name and the date somewhere, perhaps in the header as detailed for Session 1. Make sure also that every waveform is fully labelled. Make each screen as useful as possible before printing it. Keep your own record of all parameters which do not appear on a printout, or manually incorporate them on the screen, for example by adding a descriptive title at the end of the header and notes on details of the plots at the end of the footer but such comments are not permanently attached to the file or using a label. Since CommSim files are stored in only a few kilobytes each, feel free to save each version of any file separately; this has the advantage that an identifying file name will be attached to each printout. For each file name use the format xxxxp1s1a; where xxxx is your name, p1 for Practical Session 1, s1a for Section 1, Figure 1a; this should identify each printout uniquely. A report will be required for Session 2-4 in week 10. Make sure that your report is self-contained, with an introduction to the relevant theory and with frequent reference, in detail and with associated calculations, to how the results support the theory.
14
Commsim 7
(or Start | Programs | Commsim 7 | Commsim 7 | left-click). Use the full screen. There may be a pane on the left, labelled Diagram 1, which is not much use; left-click-drag its right boundary left to conceal it if necessary. At the top is a menu bar, which lets you do almost anything. Check out the dropdown windows. File: Edit: Simulate: Blocks: View: The usual. Note Repaint Screen, Preferences. In the latter, tick Snap to Grid. Under Simulation Properties, for the moment choose a Frequency of 4096000 Hz to End at 0.002 seconds (then enter OK), both for Defaults and Range. Do a quick survey of what is available. Tick: Block Labels, Connector Labels, Status Bar, Tool Bar, and Presentation Mode not Display Mode for the moment. Under Colors, choose a dark green for Wires. (We want to see them on-screen and from a black-white printer.) Do a quick survey of the comms blocks that are available. Take a quick look. (It is not always very helpful, to my mind!)
Comm: Help:
Below the Menu bar are icons/shortcuts for popular functions. They are grouped into separate toolbars. Look them over: Main: The usual things to deal with files and editing the display. Hold the mouse over the icons in turn, when a tooltip will give you a short form identification of the function and the status bar at the bottom of the screen will give you more detail. Starts with a green arrowhead. CommSim runs on sampled data, and these icons control the simulation. a simulation
Sim Control:
Producer blocks:
That is, blocks that produce signals, starting with [1] (a constant).
Consumer blocks:
That is, blocks that accept signals, starting with [0] (display) and plot.
15
Boolean blocks:
Now start using CommSim. Left-click-release the sinusoid icon Locate the mouse at a convenient point and left-click-release again to add a sine-wave generator to the diagram. Do the same for a plot icon .
Right-click-release the sine-wave generator to set up its properties. Give it an amplitude of 1V at 1000 Hz and label it appropriately using the label icon. Move the cursor over the output lead of the sine-wave generator until it becomes an upright arrow. Left-click-drag a wire from there to the dark blue input arrowhead (2nd down) of the plot block. Move the cursor to an edge of the plot block (double arrow) and left-click-drag the edges in turn to make the block a more appropriate size and shape. Click the green-arrowhead icon to run a simulation. Move the cursor to the input of the plot block and drag the wire from the blue to the light-green input. Run the simulation again and note the difference. Drag the wire to an empty spot on the diagram and release the mouse button to remove the wire. Now reconnect the wire from the generator to the blue plot input. Run the simulation again. Right-click-release the plot block to change its properties. Under Axis, change the Y scale limits to +2 and -2, and the X scale limits from 0 to 0.5 msec. (use Time Scaling). Label the Y-axis and the plot block; Title will label the whole block, while Subtitle may be used to identify individual waveforms. Left-click OK and check the effect; note that no simulation run was needed. Run the simulation again and note that the axes lose your settings. In the plot block properties, under Options, choose Fixed Bounds; change the axes as above and run a simulation, noting that the Y-axis does not change this time but the X-axis does, to display all samples. Move a block to some other spot by moving the cursor over the block (arrowed cross) and leftclick-dragging the block elsewhere. Note how the wire moves with the block.
16
Use shift-left-click to select the sine-wave block, and type <Delete> to remove it (and the attached wire). Recover it (but not the wire) with Edit | Undo. Note that you need to click elsewhere to deselect. Add a 4 kHz sine-wave generator (1V) and a summing junction to the diagram. Make connections to add the two sine waves and display the result as an orange trace (2nd plot input up). Display the 1 kHz sine wave in blue (2nd plot input down). You may need to shuffle the blocks around somewhat to get a good clear schematic with no wires or labels or blocks obscured. Try to make as many wires as possible have no corners. Run the simulation. (The two trace colours suggested are easily distinguished on the screen and on a black-white print, where one is near black and the other dotted dark grey.) See schematic diagram below. Try selecting a set of blocks by left-clicking to their top left and dragging a dotted box over the selected part of the diagram. Move the selected section a little to check.
+ +
Add your name and the date and time to the diagram, so that your printout can be identified; go to File | Page Setup, then in the Header section after $F put a few spaces, then your name in full and ID number, then put a few spaces and add from the selection arrow $D (date/time). Choose Landscape and Fit Diagrams to Page. Check that all is well with File | Print Preview, then save and print your diagram. You should choose a resolution of 600 rather than 300 dots per inch. Incidentally, if at some time you need more than one plot block, a good idea is to get one just as you want it, then Edit | Copy and Paste (or Ctrl+C and Ctrl+V) it to get more of just the same size and properties. (But use a new block for your first spectrum, perhaps.)
17
Exercise
Now do a simple exercise without detailed instructions. The aim is to demonstrate that, if cosine waves at frequencies f1 and f2 are multiplied together, the resultant is the sum of cosine waves at frequencies (f1+ f2) and (f1- f2):
Now add a different layer of proof by determining the spectrum of the product signal. Change the Simulation Properties | Range to run for 8 msec (0.008s) at 4.096 MHz (4096000 Hz), then press OK. Choose a spectrum analyser block using Comm | Operators | Spectrum (Real) and add it to the diagram. Right-click-release it to set up values of Trigger Mode - Triggered, Spectral Output - Magnitude / Phase, FFT Size - 32k, Output Freq Units - kHz, FFT Window Type - Rectangular, Power Spectrum Units - dBm/Hz, Load - 1 ohm, Number of FFT Averages 1, ignore Unwrap Phase and Remove Linear Phase. Set-up a trigger to start the analysis using Comm | Signal Sources | Impulse and connect its output to the Trg input of the analysis block. Add a plot block to display the spectrum; right-click the plot block and select External Trigger, which will now be a (red or green) circle above the normal inputs.
18
Connect Trg, Mag() and freq() from the analysis block to the trigger input, the blue input and the pink (magenta; 4th arrowhead down) input respectively of the plot block. Note that two of the wires are thick, to denote that they are vectors, not simple signals. Change the plot properties, selecting XY Plot using X-axis value 4. Insert labels, noting that the X-axis is now trace 4. Make sure that the axis values are unbounded. Run the simulation. The spectrum display will not have very appropriate axes, so you will need to change them; with appropriate choices you can zero in on the exact values of the peaks of the response, for comparison with theory. Note however that there may be a bug in the software that sometimes ruins the plot if the vertical axis is changed appreciably, so you may be unable to print with your preferred axes. (Sometimes the screen display is OK but the print not, sometimes the reverse.) Even better, perhaps, is to right-click the spectral plot, then Save Data to File. This file will be a simple list of xy values; it is very long, but it is easy to delete large slabs of useless data and produce a compact table of the vital data. For better printing from Notepad, if that is what *.dat files open to, use Edit | Set Font. Another ploy is to read off x and y values using cross-wires: right-click the plot block and click Read Coordinates, when you can record quite precise values (particularly if you zoom in on a relevant section of waveform by altering the axis limits). You may like to save your diagram at this stage, as what follows may make it too crowded, and you may like to remove some plots.
Another proof of the proposition is to put the product signal through a filter to select one or other of the predicted Fourier components, and check that the output is as predicted. Add a filter to the diagram using Comm | Filters | FIR (Finite Impulse Response). Choose Number of Taps | 8192 or 8191, Cutoff Freq 1 | 1500 or 7000 Hz for Filter Type | Lowpass or Highpass respectively, Window Type | Rectangular, OK. Connect the product signal to the input, run a simulation and plot the output. Check the result, first selecting one component and then the other (or use two different filters for simultaneous plots).
19
Note that, if you finish early after thoroughly checking all of the above, you may start on the work for Practical Session 2. You should probably start with the topic whose theory you understand best, and prepare for the other exercises in the intervening week by studying the theory behind them.
20
)}
16 kHz Sine ph (1 V)
3 * 2 1
Plot
1 kHz Cosine ph (1 V)
0 + + -1 -2
-3 0
.0005
.0015
.002
Modify to get 100% modulation with the same carrier component and plot these waveforms. Above m = Vm/Vc = . For modulation depth of 100%, Vm = Vc, i.e. make Vm = ?.
16 kHz Sine ph (1 V)
3 * 2 1
Plot
1 kHz Cosine ph (2 V)
0 + + -1 -2
-3 0
.0005
.0015
.002
21
Generate AM by adding a DSBSC signal to a carrier To get the DSBSC signal multiply the carrier with the message signal using no dc voltage offset. To generate an AM signal use a summing junction to add the DSBSC to a carrier. Use cosine waves where possible. Choose values to get 40% modulation with a peak voltage of 28.
+ +
3 2 1 0 -1 -2 -3 0 .0005
Plot
.0015
.002
Plot the spectrum of the AM signal Increase the simulation time to 0.008 sec. Add a spectrum analyser to the screen. (Comm | Operators | Spectrum (Real)) Triggered, 32 k, Rectangular, kHz, dBm/Hz, 1 ohm Add a (new) plot block to the screen to display the spectrum. External Trigger, X-Y Plot, X-Axis 4 Label the plot and the axes. Add an Impulse at t=0 (Comm | Signal Sources | Impulse) to trigger the spectral analysis. Connect three outputs of the analysis block to the plot block (trigger, blue and pink). Run a simulation and change the axes of the various plots for an appropriate display. Check up to 40 kHz and explain what you see (or don't see).
22
+ +
3 1 -1 -3 0
Plot
.002
.008
Impulse t= 0.
Trg
in
Plot
16000
17000
18000
Recover the modulation signal from the AM using synchronous detection Multiply the AM signal by an in-phase carrier and put the output through a low-pass filter (Comm | fIlters | IFR). (Comment on the parameters suggested below.) Use Number of Taps 2048, Cutoff Freq 4000 Hz, Filter Type Lowpass, Window Type Rectangular. Plot all waveforms, perhaps starting at 1 msec. to avoid the filter transient. You may like to establish a fine grid, or add a negative dc voltage, or use a high-pass filter (but this is not as easy as it looks!), to measure the amplitude of the demodulated signal. Or you may save the data as a file, and get the peak output values from the file. Or you may use cross-wires to read off x and/or y values.
23
You may now like to save this version of the file, then remove a few plots, perhaps only leaving the AM signal.
+ +
Plot 3 1 -1 -3 0
.002
.008
Impulse t= 0.
Trg
in
Plot 100 0 -100 -200 -300 -400 14000 15000 16000 17000 18000
* 6 4 2 0 0
Plot
.002
.008
3 2 1 0 -1 0 .002
Plot
.008
24
Attempt synchronous detection using a quadrature carrier As above, except multiplying the AM signal by a quadrature carrier, i.e. make carrier sine wave.
+ +
Plot 3 1 -1 -3 0
.002
.008
Impulse t= 0.
Trg
in
Plot 100 0 -100 -200 -300 -400 14000 15000 16000 17000 18000
* 6 4 2 0 0
Plot
.002
.008
3 2 1 0 0
Plot
.002
.008
25
Attempt synchronous detection using an off-frequency carrier As above, except using a carrier at 16250 Hz.
+ +
Plot 3 1 -1 -3 0
.002
.008
Impulse t= 0.
Trg
in
15000
16000
17000
18000
* 6 4 2 0 0
Plot
.002
.008
Plot
.008
26
+ +
Plot 3 1 -1 -3 0
.002
.008
Impulse t= 0.
Trg
in
Plot 100 0 -100 -200 -300 -400 14000 15000 16000 17000 18000
* 6 4 2 0 0
Plot
.002
.008
Plot
.008
27
Recover the modulation signal from (Blocks | Arithmetic | abs) and filtering (as above).
the
AM
using
rectification
3 2 1 0 -1 -2 -3 0 .002
Plot
.008
.008
abs
.008
28
Use Simulation Properties | Frequency 4096000 Hz, End at 0.008 sec. Generate a SSBSC signal using in-phase and quadrature carrier and modulation Use 16 kHz for the carrier and 1 kHz for the modulation. You'll have to watch the various phases. Generate the AM wave as above by summing ([]) the 1 kHz to 1V dc and then multiplying ([x]) with the carrier. Then AM wave is then filtered using a filter (Comm | filters | IIR) 4th order Chebyshev II bandpass filter. Choose the lower and upper cutoff frequencies to select the lower sideband, i.e. 14-16 KHz.
+ +
Plot 8 4 0 -4 -8 0
.002
.008
5.0 2.5 0 -2.5 -5.0 0 .002 .004 .006 Time (sec) .008
Check the spectrum Increase the simulation time to 0.008 sec. Add a spectrum analyser to the screen. (Comm | Operators | Spectrum (Real)) Triggered, 32 k, Rectangular, kHz, dBm/Hz, 1 ohm Add a (new) plot block to the screen to display the spectrum. External Trigger, X-Y Plot, X-Axis 4 Label the plot and the axes. Add an Impulse at t=0 (Comm | Signal Sources | Impulse) to trigger the spectral analysis. Connect three outputs of the analysis block to the plot block (trigger, blue and pink). Run a simulation and change the axes of the various plots for an appropriate display. Check up to 40 kHz and explain what you see (or don't see).
29
+ +
Plot 8 4 0 -4 -8 0
.002
.008
.008
Impulse t= 0.
Trg
in
16000
17000
18000
Make a small change to generate the other sideband What is it? Check the spectrum
30
Choose the lower and upper cutoff frequencies to select the both the sidebands, i.e. 14.9-17.1 KHz.
.002
.008
8 6 4 2 0 -2 -4 -6 0
.002
.008
Impulse t= 0.
Trg
in
Recover the modulation signal from the SSBSC using synchronous detection Multiply the SSBSC signal by a carrier and put the output through a low-pass filter. (Comment on the parameters suggested below.) Use Number of Taps 2048, Cutoff Freq 4000 Hz, Filter Type Lowpass, Window Type Rectangular. Plot all waveforms, perhaps starting at 1 msec. to avoid the filter transient. You may like to establish a fine grid, or add a negative dc voltage, or use a high-pass filter (but this is not as easy as it looks!), to measure the amplitude of the demodulated signal. Or you may save the data as a file, and get the peak output values from the file.
31
+ +
8 6 4 2 0 -2 -4 -6 0
.002
.008
Impulse t= 0.
Trg
in
Plot 20
10
-10 0
.002
.008
6 4 2 0 0 .002
.008
32
Attempt synchronous detection using a quadrature carrier As above, except multiplying the SSBSC signal by a quadrature carrier.
16 kHz Cosine ph (2 V) 1 kHz Sine ph (2 V) 1 + + * + + Plot 8 4 0 -4 -8 0 .002 .004 .006 Time (sec) Plot .008
8 6 4 2 0 -2 -4 -6 0
.002
.008
Impulse t= 0.
Trg
in
16000
17000
18000
20
Plot
10
-10 0
.002
.008
6 4 2 0 0 .002
.008
33
Attempt synchronous detection using an off-frequency carrier As above, except using a carrier at 16250 Hz.
16.25 kHz Sine ph (2 V) 1 kHz Sine ph (2 V) 1 + + * + + Plot 8 4 0 -4 -8 0 .002 .004 .006 Time (sec) Plot .008
8 6 4 2 0 -2 -4 -6 0
.002
.008
Impulse t= 0.
Trg
in
16000
17000
18000
20
Plot
10
-10 0
.002
.008
6 4 2 0 0 .002
.008
34
+ +
Plot
-1
-3 0
.5
1 Time (msec)
1.5
-1
-3 0
.5
1 Time (msec)
1.5
35
Check the amplitude modulation and phase deviation of this signal For example, compare it directly with the original carrier.
-X 16 kHz Cosine ph (2 V) * 1 1 kHz Sine (400 mV) ph + + 3 Plot
-1
-3 0
.1
.2 .3 Time (msec)
.4
.5
Right-click-release the plot block to change its properties. Under Axis, change the X scale limits from 0 to 0.5 msec. (use Time Scaling). Set up a wideband FM signal
))
Get an FM modulator (Comm | Modulators - Real | FM(Re)). Suitable parameters are Translation Frequency (Hz) 16000 (the carrier frequency), Amplitude (V) 1, Initial Phase (deg) 90, FM Deviation (Hz/V) 1000. Provide a sine-wave source at 1 kHz to modulate this carrier, and set it to produce a frequency deviation of 2 kHz.
1 kHz Cosine ph (2 V)
Plot
.1
.2 Time (msec)
.3
.4
Right-click-release the plot block to change its properties. Under Axis, change the Y scale limits to +1 and -1, and the X scale limits from 0 to 0.4 msec. (use Time Scaling).
36
Check the frequency deviation To do this, you need to compare lots of half-periods of the signal.
sig FM Mod Fc= 16 kHz ph sig FM Mod Fc= 16 kHz ph sig FM Mod Fc= 16 kHz ph sig FM Mod Fc= 16 kHz ph
Plot
.14
.2
Right-click-release the plot block to change its properties. Under Axis, change the Y scale limits to +1 and -1, and the X scale limits from 0.12 to 0.2 msec. (use Time Scaling).
The circuit below will produce a suitable timebase for this purpose. It generates a narrow pulse soon after the input (the FM signal) crosses through zero, and this triggers a sweep of 1 V/msec. until the next zero crossing of the input. The numbered boxes are constants. [>], [<] and 'and' ([ ]) are standard icons. The 1/S block is an integrator (Blocks | Integration | resetIntegrator); leave its various parameters equal to 0. Just for this section, use Simulation Properties | Frequency 40960000 Hz (4096 MHz), End at 0.002 sec. Plot the signal (y) against this timebase (x) and calculate the extreme frequencies from this plot. Dont forget to Externally triggering the plot.
Signal (analogue) 0.000 > 1000 and 0.005 < 0 b r 1/S Output
37
1.0 .5 0
Plot
0 l r
l r
0.005
< 0
Right-click-release the plot block to change its properties. Under Axis, change the Y scale limits to +1 and -1, and the X scale limits from 0 to 40000000 msec. (use Time Scaling). Check the spectrum Use Simulation Properties | Frequency 4096000 Hz, End at 0.008 sec. Add a spectrum analyser to the screen. (Comm | Operators | Spectrum (Real)) Triggered, 32 k, Rectangular, kHz, dBm/Hz, 1 ohm Add a (new) plot block to the screen to display the spectrum. External Trigger, X-Y Plot, X-Axis 4 Label the plot and the axes. Add an Impulse at t=0 (Comm | Signal Sources | Impulse) to trigger the spectral analysis. Connect three outputs of the analysis block to the plot block (trigger, blue and pink). Run a simulation and change the scales of the various plots for an appropriate display. Check up between 10 to 22 kHz and explain what you see. You may like to store the data values in a file so that the precise values are available. You may use the following values of the Bessel function in predicting the spectrum: J0(2) = 0223891 J3(2) = 0128943 J6(2) = 0001202 J1(2) = 0576725 J4(2) = 0033996 J7(2) = 0000175 J2(2) = 0352834 J5(2) = 0007040
38
1 kHz Cosine ph (2 V)
1.0 .5
Plot
0 l r
l r
0 -.5 -1.0 0
0.005
<
200000
1000000
Plot
in
Right-click-release the top plot block to change its properties. Under Axis, change the Y scale limits to +1 and -1, and the X scale limits from 0 to 1000000 msec. (use Time Scaling). Do same for bottom plot using the scale specified.
Demodulate the FM signal by differentiation, rectification and filtering The circuit below will give a good approximation to differentiation for this purpose. Get the delay from Comm | Operators | Delay (Real) and set the delay value to 2 SIM Steps. [-X] and [] are standard icons.
Signal +
Output
Delay (2)
-X
The rectification is done by Blocks | Arithmetic | abs. Use a FIR filter. (Comment on the parameters suggested below.) Use Number of Taps 4096, Cutoff Freq 1500 Hz, Filter Type Lowpass, Window Type Rectangular.
39
1 kHz Cosine ph (2 V)
1.0 .5
Plot
0 l r
l r
0 -.5 -1.0 0
0.005
<
200000
1000000
Plot
in
Delay (2)
-X
+ +
.036 .034
Plot
abs
Demodulate the FM signal using zero-crossing pulses The circuit below will produce these pulses. Use Comm | Operators | Delay (Real).
40
1 kHz Cosine ph (2 V)
1.0 .5
Plot
0 l r
l r
0 -.5 -1.0 0
0.005 Impulse t= 0.
<
0
Trg Mag[ ] Ph[ ] f req[ ]
200000
1000000
Trg
in
Plot
16
18
20
22
0 l r
l r
> and
.203 .198 0
Delay (25)
<
.002
.006
.008
41