|
In frequency modulation, the instantaneous frequency of a carrier wave is varied
from the center frequency by an amount proportional to the instantaneous amplitude of the modulating signal.
Main advantages of FM are improved signal to noise ratio and less radiated power.
|
|
The carrier signal is represented by
c(t) = A cos(wct)
The modulating signal is represented by
m(t) = B sin(wmt)
Then the final modulated signal is
A cos(wct + m(t))
= A cos(wct + B sin(wmt))
Because of demodulation reasons, the frequency of m(t) is always kept
much smaller than that of the carrier signal.
Note that the modulated signal has frequency components dependent on both amplitude and frequency
of the modulating signal.
|
|
FM Generation with DspSee
|
Generating FM
You can use two SigGen modules to generate a frequency modulated signal,
and use the Plot module to display them.
The following example generates two sine waves, uses one to modulate the other one and plots them.
You can also use other modules to process the generated data.
For example, you can save the data in binary or text format and also perform various measurements.
Open the Modulation-FM.dsp project in DspSee to see this example in action.
Click to download DspSee dsp software.
Below is a description of the Modulation-FM.dsp project file. Feel free to change it to try different things.
|
| //Carrier Signal Generator | |
| load wc="SigGen" | //Loads the SigGen module. This module can generate waveforms of different shapes. |
| wc.type="sine" | //Sets signal type as sine |
| wc.freq=10.01M | //Sets frequency to 10.01 MHz |
| wc.pk2pk=2 | //Sets peak-peak voltage to 2V |
| wc.offset=0 | //Sets DC offset voltage to 0V |
| wc.mod.type="fm" | //Sets modulation type |
| wc.mod.gain=5M | //Sets modulation gain to 5MHz/V |
| wc.gui.more=1 | //Shows more advanced settings |
| wc.gui.wnd="sg" | //Sets the gui window name |
| wc.gui.title="SigGen Setup" | //Sets the gui window title |
| wc.gui.move(500,0) | //Moves the window to (x=500, y=0) |
| |
| //Modulating Signal Generator | |
| load wm="SigGen" | //Loads the SigGen module. This module can generate waveforms of different shapes. |
| wm.type="sine" | //Sets signal type as sine |
| wm.freq=999K | //Sets frequency to 999 KHz |
| wm.samplerate=100M | //Sets sample rate to 100 MSPS |
| wm.pk2pk=2 | //Sets peak-peak voltage to 2V |
| wm.offset=0 | //Sets DC offset voltage to 0V |
| wm.reclen=1000 | //Sets record length to 1000 |
| link wc.mod.src=wm.out | //Links wc synth's modulation input port to wm synth's output port |
| wm.gui.wnd="sg" | //Sets the gui window name |
| wm.gui.title="SigGen Setup" | //Sets the gui window title |
| wm.gui.move(500,0) | //Moves the window to (x=500, y=0) |
| |
| //Plot | |
| load p1="Plot" | //Loads the Plot module. This module can display input data in various formats. |
| p1.plot.title="Plot Window" | //Sets the title of the plot window to "Plot Window" |
| p1.setup.title="Plot Setup" | //Sets the title of the plot setup window to "Plot Setup" |
| link p1.src.ch1=wm.out | //Links the mod signal output to Plot input |
| link p1.src.ch2=wc.out | //Links the carrier signal output to Plot input |
| p1.ch1.label="Mod Input" | //Sets the Plot ch1 label |
| p1.ch2.label="FM Output" | //Sets the Plot ch2 label |
| p1.ch1.vposition=0 | //Sets ch1 vertical position to 0 |
| p1.ch2.vposition=0 | //Sets ch2 vertical position to 0 |
| p1.setup.move(280,0) | //Moves the plot setup gui to (x=280, y=0) |
| p1.plot.move(0,220) | //Moves the plot window to (x=0, y=220) |
| p1.plot.size(1000,420) | //Resizes the plot window to (width=1000, height=420) |
The above schematic is another example of generating frequency modulation.
As you can see, the schematic based approach is very simple.
Just add the desired modules from the module list, and connect them with the wires
the way you want.
That's it, you are ready for the fun.
Just click on the Run button on the toolbar to view the signal.
Open the file Modulation-FM.dsp in the Samples\Sch folder to load this example.