Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

To generate a chirp signal, we start with a cosine signal with constant frequenc

ID: 3279290 • Letter: T

Question

To generate a chirp signal, we start with a cosine signal with constant frequency: x(t) =Acos(2pi f_0 t + phi) To get a linearly swept frequency signal, the cosine frequency must change linearly with time. If the cosine argument is generalized to the time function, x(t) = A cos (psi(t)), this means that the derivative of the cosine's argument must he a linear function. Defining psi (t) = 2 pi mu t^2 + 2 pi f_0 t + phi will give a linear function as the lime derivative d psi (t)/ dt = 2 pi 2 mu t + 2 pi f_0 in radians/sec or 1/2 pi d psi (t)/dt = 2 pi 2 mu t + 2 pi f_0/2 pi = 2 mu t + f_ This gives a frequency that changes linearly with time The following Matlab code will synthesize a linear sweep chirp signal fsamp = 11025: % set sampling frequency dt =l/fsamp: % set sampling interval in seconds dur = 1.5,%set signal duration in seconds tt = 0 dt dur. % create vector of time samples spaced at dt seconds psi -2*pi* (500*tt^2 +200*tt + 100). % set argument for chirp function xx = 10*cos(psi): % modulate signal with cosine and amplitude cos soundsc (xx, fsamp) % play signal specgram(xx,1024,fsanip),% plot spectrogram (b) In MSTLAB is signals can only be by evaluating the signal's defining formula at discrete instants of time. These are called samples of the signal. Fur the chirp we do the following: x(t_n) = A cos (2 pi mu t^2_n + 2 pi f_0 t_n + phi) In the MATLAB code above, what is the value for What are the values of A, mu, f_o, and phi? (c) Determine the range of frequencies (in hertz) that will be synthesized by the Mat LAO script above. Make a sketch by hand of the instantaneous frequency versus time. What are the minimum and maximum frequencies that will be beard? (d) Listen to the signal to determine whether the signal's frequency content is increasing or decreasing (use soundsc ()) Notice that soundsc()) needs to know the rate at which the signal samples were created. Foe mote information do help soured and help sound (). Use the code above 10 synthesize a chirp, then insert your code into the following framework function [xx.tt] = mychirp (f1, f2, dur. fsamp) NYCHIRP generate a linear-FM chirp signal usage: xx = mychirp (f1, f2. Air, fsamp) % f1 = starting frequency % f2 = ending frequency % dur = total time duration % fsamp = sampling frequency (OPTIONAL: default is 11025) % % xx = (vector of) samples of the chirp signal % tt = vector of time instants for t = 0 to t = dur % if(nargin

Explanation / Answer

b. from the given equations

x(tn) = Acos(2*pi*mu*t^2n + 2*pi*fo*tn + phi)

value of tn will be n*dt = n/fsamp = n/11025 [ n is a natural number]

Value of A = 10 from the data

also, 2*pi*mu = 500*2*pi

mu = 500

2*pi*fo = 200*2*pi

fo = 200

phi = 100*2*pi = 628.318

c. so, psi(t) = 2*pi(500*tt^2 + 200*tt + 100)

comparing with 2*pi*fot + phi

frequency = 500*tt + 200

so lowest frequency is for tt = 0, fo = 200 HZ

highest frequency is for tt = 1.5 s

f = 950 Hz

d,e function [xx,tt] = mychirp(f1, f2, dur, fsamp)

%MYCHIRP generate a linear FM chirp signal

%

% usage: xx = mychirp(f1,f2,dur,fsamp)

%

% f1 : starting frequency

% f2 : ending frequency

% dur : total duration

% fsamp : sampling frequency ( default ia 11025)

%

% xx = (vector of) samples of the chirp signal

% tt = vector of time instants for t= 0 to t = dur

%

dt = 1/fsamp;

tt = 0:dt:dur;

psi = 2*pi*((f2 - f1)tt*tt/dur + f1*tt);

xx = 10*cos(psi);

if ( nargin < 4) % -- Allow optional input argument

fsamp = 11025;

end

f1 = 400;

f2 = 4000;

dur = 7;

fsamp = 11025;

soundsc(mychirp(f1,f2,dur),fsamp);

specgram(mychirp(f1,f2,dur),1024,fsamp);

f function [xx,tt] = mychirp(f1, f2, dur, fsamp)

%MYCHIRP generate a linear FM chirp signal

%

% usage: xx = mychirp(f1,f2,dur,fsamp)

%

% f1 : starting frequency

% f2 : ending frequency

% dur : total duration

% fsamp : sampling frequency ( default ia 11025)

%

% xx = (vector of) samples of the chirp signal

% tt = vector of time instants for t= 0 to t = dur

%

dt = 1/fsamp;

tt = 0:dt:dur;

psi = 2*pi*((f2 - f1)tt*tt/dur + f1*tt);

xx = 10*cos(psi);

if ( nargin < 4) % -- Allow optional input argument

fsamp = 11025;

end

f1 = 5000;

f2 = 500;

dur = 3;

fsamp = 11025;

soundsc(mychirp(f1,f2,dur),fsamp);

specgram(mychirp(f1,f2,dur),1024,fsamp);

this frequency chirps down

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote