-
Notifications
You must be signed in to change notification settings - Fork 0
Lab 3
##Exercise 1 - FM Modulator
In this exercise we were implementing frequency modulation (FM), which is given by the general equation:
In this lab we were using the equivalent form:
The modulation index of an FM signal is given by:
The finished diagram is below:
In this VI we converted the message waveform to an array so we could integrate it and add in the delta f part to create theta(t). We also used a sine/cosine function to get cos(theta(t)) and sin(theta(t)), which could then be multiplied by the carrier signal. We used a message signal of 1kHz and carrier of 10kHz, with delta f set to 500 initially. The results are shown below:
###Screenshot 1 - Panel view with delta f = 500.
Here because delta f is very small, it is difficult to see the frequency variation in the time domain plots. However, we can clearly see in the PSD that there is a major peak at 10kHz with sidebands at 9kHz and 11kHz. This looks similar to AM, but with the lower sideband out of phase by 180 degrees. The modulation index in this case is 0.5. Next we tried a value for delta f of 2000:
###Screenshot 2 - Panel view with delta f = 2000.
Here it is slightly easier to see the frequency variation in the time domain signal. Now we have a modulation index of 2, and as this increases we see more sidebands at 8kHz, 9kHz, 11kHz and 12kHz, each spaced 1kHz apart. The magnitude of the peak at 10kHz has also dramatically been reduced. Next we changed delta f to 5000:
###Screenshot 3 - Panel view with delta f = 5000.
Now the frequency variation is really clear in the time domain. The PSD of the signal is also interesting, with even more sidebands at frequencies spaced 1kHz apart from ~3kHz - 18kHz. We can see that as we increase delta f, the bandwidth of the signal increases (Carson's Rule).
##Exercise 2 - FM Demodulator
In this exercise we built an FM demodulator that relied on the envelope detector previously built. In the previous lab we had built an envelope detector that took in the various parameters of the signal and then demodulated it. This time we wanted a subVI which would take in a waveform instead. We went back and redesigned the envelope detector to allow waveform input.
###Screenshot 4 - Diagram view of the modified envelope detector.
###Screenshot 5 - Icon for the sub VI, with modified input.
This then allowed us to add this to our design. The demodulator works by first converting the waveform to an array so we can differentiate it. Once the waveform has been differentiated we convert the array back into a waveform and pass it through an envelope detector.
Mathematical Proof
First recall the equation for FM:
Differentiating this signal gives us:
Then theta(t) differentiated is:
Giving the full equation:
This is now an AM and FM modulated signal. Therefore we can use envelope detection to get an output waveform proportional to the message signal:
We can remove the DC component and adjust the amplitude to get the desired message signal.
##Exercise 3 - FM Simulation
In this exercise we used the modules we had designed previously and put them into one top level design so that we could witness the whole frequency modulation process.
###Screenshot 6 - The diagram view for exercise 3.
Below is the panel view, showing the time domain and frequency domain representations of the FM signal and demodulated signal.
###Screenshot 7 - The panel view for exercise 3.
##Exercise 4 - FM Communications Via USRP
In this exercise we used the template FM-TxRx.gvi to build an FM transmitter and receiver for the USRP device.
###Screenshot 7 - The diagram view for exercise 4.
If we compare this diagram to what we have done in the previous exercises we can see it works exactly the same, except we convert the values to complex to work with the USRP. The panel view with graphs is shown below.
###Screenshot 8 - The panel view for exercise 4.
Here we can easily see the bandwidth of the signal, which is approximately 35000Hz x 2 = 70kHz
##Exercise 5 - Demodulating and Listening to FM Radio Using the USRP
In this exercise we are using the USRP to tune into local radio stations. The first part involves us using the Find Radio Station.gvi to get a frequency spectrum including local radio stations. This is shown below:
###Screenshot x - The panel view showing local radio stations.
Here we can see that each peak is a radio station. We zoomed into one of these peaks below:
###Screenshot x - Zoomed in section, showing a local radio station.
Here we can see one peak 8.3MHz. We tried to use the FM Music.gvi module to tune into this radio station but we only heard a lot of noise. Instead we used the given frequency of 98.8Mhz for Radio 1. This actually worked for us, and we were able to hear Drake being played on the radio despite it being very noisy.