subject

Execute the provided MATLAB program fm_example. Note that this program also calls MATLAB functions that were provided in Modules 2 and 3, so you need to have these available as well. This program loads a built-in sound file of a train whistle which lasts approximately 1.6 seconds. The program plays the train whistle through the speakers. You should hear two bursts, each of which sounds like a musical chord (this is actually a slightly out-of-tune D minor chord for you musicians). The program then displays the time function and the frequency domain approximation of the signal in figure 1. The train whistle is then upsampled to a higher sampling rate and replayed. The result is shown in figure 2. The signal is then modulated to a carrier using DSB-SC (figure 3), demodulated using the same carrier (figure 4), and filtered (figure 5). The demodulated and filtered signal is played through the speakers again. Do you hear a difference?
Use the zoom, pan, and cursor controls on the graphics windows to answer the following questions:
What are the frequencies of the three tones in the original train whistle signal?
What is the carrier frequency of the modulator signal?
Are the baseband tones identifiable in the modulated signal?
Experiment with the value of the modulation index (line 31 of the code) and rerun the program for various values. What do you observe?

function fm_example
%download built in MATLAB sound file of a train whistle
load train
%play the sound through the speakers
y=y';
soundsc(y, Fs)
%Set up plotting parameters
dt=1/Fs;
N=length(y);
t=(0:(N-1))*dt;
%examine the spectrum of the signal
plot_fft_spectrum(t, y,1);
%upsample the signal Y to 128K samples per second
y128=interp(y,16);
Fs128=Fs*16;
dt128=1/Fs128;
N128=N*16;
t128=(0:(N128-1))*dt128;
%replay and re-examine the spectrum of the signal
soundsc(y128,Fs128)
plot_fft_spectrum(t128,y128,2);
%now modulate to a carrier using dsb_sc
fc=16384; %carrier frequency
kk=8000; %maximum frequency deviation
ymod = cos(2*pi*fc*t128 + 2*pi*kk*cumsum(y128)*dt128);
%examine the spectrum of the modulated signal
plot_fft_spectrum(t128,ymod,3);
%fm demodulate the signal
yq = hilbert(ymod).*exp(-j*2*pi*fc*t128) ;
ydemod = (1/(2*pi*kk))*[0 diff(unwrap(angle(yq)))*Fs128];
soundsc(ydemod, Fs128)
plot_fft_spectrum(t128,ydemod,5); dum=1;

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 18:00
Which of the following physical laws can make the flow of water seem more realistic? a. motion b. gravity c. fluid dynamics d. thermodynamics
Answers: 2
question
Computers and Technology, 22.06.2019 20:10
Assume the existence of a bankaccount class. define a derived class, savingsaccount that contains two instance variables: the first a double, named interestrate, and the second an integer named interesttype. the value of the interesttype variable can be 1 for simple interest and 2 for compound interest. there is also a constructor that accepts two parameters: a double that is used to initialize the interestrate variable, and a string that you may assume will contain either "simple", or "compound", and which should be used to initialize the interesttype variable appropriately. there should also be a pair of functions getinterestrate and getinteresttype that return the values of the corresponding data members (as double and int respectively).
Answers: 2
question
Computers and Technology, 22.06.2019 23:30
In my email i got a message it says a quick message and in message details on who its from its says nicole and under nicole is [email protected] -
Answers: 1
question
Computers and Technology, 23.06.2019 09:20
How to print: number is equal to: 1 and it is odd number number is equal to: 2 and it is even number number is equal to: 3 and it is odd number number is equal to: 4 and it is even number in the console using java using 1 if statement, 1 while loop, 1 else loop also using % to check odds and evens
Answers: 3
You know the right answer?
Execute the provided MATLAB program fm_example. Note that this program also calls MATLAB functions t...
Questions
question
Mathematics, 21.02.2021 07:00
question
Mathematics, 21.02.2021 07:00
question
Mathematics, 21.02.2021 07:00
question
Mathematics, 21.02.2021 07:00
Questions on the website: 13722363