Demodulating An FM Signal

FM Demodulation


In this lab, you will implement an FM demodulator.  You will be provided with a file containing IQ samples represented as complex numbers. [IQSamples File]

You will need to write a program that reads this file and outputs the wav file with the demodulated signal.  You should use a polar discriminator to demodulate the sound file.

from pylab import *
import numpy as np
import sounddevice as sd

def main():
    #Read in the samples from IQ text file:

    ### Polar discriminator

def resampleAndPlayAudio(input):
    #orginal samples where taken at 200kHZ need to down sample to 44.1kHz
    #keep every 4 sample  200kHz /44.1kHz = 4.5
    result = input[::4], 44100, blocking=True)
    #Add code for writing wave file here. 

if __name__== "__main__":

Helpful Hints

You might need to pip install some of the libraries.
If the wav file does not play on the default player that comes with your windows machine, you can download finalMediaPlayer or use To test your audio file.

Mac users should not have a problem playing the wav file that they write.


Once you have correctly demodulated the file.  Login to Collab select answer that corresponds to words contained in the sound file.

Upload your code along with your submission. Please implement your solution in python.

%d bloggers like this:
search previous next tag category expand menu location phone mail time cart zoom edit close