11.2. Solved exercises
A chirp signal, whose instantaneous frequency linearly sweeps the band between f1 and f2, is expressed as follows:
s(t) = sin[(2πf1 + 2πβt)t+Φ0]
with β = (f2 – f1)/(2PulseLength), Pulselength being the signal duration.
- Generate this signal using a MATLAB code for Φ0 = 0.
- Plot the generated signal and its power spectral density.
- It is difficult to obtain a complete image about the signal structure from these partial representations. In fact, they are not able to clearly indicate the modulation parameters or the time evolution of the signal spectral content. This information can be easily retrieved in the time-frequency plane. Illustrate this capability of the time-frequency distributions using the spectrogram for example.
% Generation of a linear frequency modulated signal f1=2000; f2=8000; pulselength=0.025; Fs=20000; % Sampling frequency % Warning: Fs should verify the Nyquist constraint: Fs>2*max(f1,f2) t=(0:1/Fs:pulselength); beta=(f2-f1)/ (2*pulselength); chirp1=sin(2*pi*(f1+beta*t).*t); % Another way to generate the chirp signal chirp2 = vco(sawtooth((2*pi/pulselength)*t,1), [f1/Fs,f2/Fs]*Fs,Fs); % chirpl and chirp2 are similar up to a phase term
figure; clf; subplot (211) plot(t,chirp1); xlabel( 'Time [s]'); ylabel('Amplitude'); title(' Time variation of a chirp signal') C=fftshift (abs(fft(chirp1) ).^2); lc=length(chirpl); mc=lc/2; freq=(-mc:1:mc-1)*Fs/lc; subplot (212) plot (freq,C); xlabel('Frequency [Hz]'); ylabel('Power ...