Computers and Technology

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;

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 17:30, cesargarcia17671
Type the correct answer in the box. spell all words correctly. under which key category do the page up and page down keys fall? page up and page down keys fall under the keys category.
Answers: 3
image
Computers and Technology, 23.06.2019 01:00, lusciousl
Petrică, tânăr licean în clasa a ix-a, a primit în dar de la părinţii săi un cont bancar pentru micile sale cheltuieli curente. el este pasionat de internet banking şi îşi verifică cu grijă toate tranzacţiile efectuate. pentru creşterea securităţii tranzacţiilor online, banca îi furnizează lui petrică un număr pe care el va trebui să îl modifice, obţinând un număr tan – număr de autentificare a tranzacţiei (transaction authentication number). regula de obţinere a numărului tan este următoarea: se formează cel mai mic număr par din toate cifrele numărului furnizat de bancă. cerinţă cunoscând numărul n furnizat de bancă, să se determine numărul tan obţinut de petrică. date de intrare fişierul tan. in conţine pe prima linie numărul natural n cu semnificaţia din enunţ. date de ieşire fişierul de ieşire tan. out va conţine o singură linie pe care va fi scris numărul tan cerut. restricţii • 0 < n < 18*1018 • n are cel puţin o cifră pară • numărul tan obţinut nu poate conţine zerouri nesemnificative
Answers: 2
image
Computers and Technology, 23.06.2019 19:00, nayo2006
Acompany is hiring professionals for web designing. the firm is small with few resources. they want employees who possess problem-solving skills and can independently carry out responsibilities. which kind of employee should they select?
Answers: 2
image
Computers and Technology, 24.06.2019 09:30, nialphonsa
Atype of researcher who uses computers to make sense of complex digital data
Answers: 1
Do you know the correct answer?
Execute the provided MATLAB program fm_example. Note that this program also calls MATLAB functions t...

Questions in other subjects: