Signals & Systems Homework #1
132 points total ECE 316 – Winter 2023
- A chirp is a signal of the form x(t) = A sin(2πφ(t)) where A is the amplitude and the function φ(t) is the phase of the chirp. If the phase has the form
then the signal is called a linear chirp. Here, f0 is the frequency at time t0 , f1 is the frequency at time t1 , and φ0 is the phase at time t0 . (44 points total)
(a) The frequency of a chirp at time t is f (t) = dφ/dt Determine the frequency of a linear chirp as a function of time t. (6 points)
(b) Write a MATLAB or python function that calculates the signal values of a linear chirp with initial time t0 , initial frequency f0 , final time t1 , final frequency f1 , amplitude A, and initial phase φ0 for a vector of time values t. Use your function to plot a linear chirp x1 (t) with the parameter values
A = 2, t0 = 0 s, t1 = 3 s f0 = 2 Hz, f1 = 10 Hz, φ0 = 0 radians
over the time range t0 ≤ t ≤ t1 . (10 points)
(c) Find the Nyquist rate for the linear chirp x2 (t) with the parameter values A = 2, t0 = 0 s, t1 = 3 s f0 = 10 Hz, f1 = 1000 Hz, φ0 = 0 radians (4 points)
(d) Use your MATLAB or python function to sample the chirp x2 (t) from Part (c) at the rate fs equal to the lowest power of 2 that is greater than the Nyquist rate over the range of time t0 ≤ t ≤ t1 to create the discrete-time signal x2 [n]. Calculate the DFT X2 [k] of x2 [n] and plot its magnitude as a function of the frequency index k using MATLAB or python. (8 points)
(e) Determine the Nyquist frequency fN of the sample rate f2 used in the previous step. (4 points) (f) Use the DFT X2 [k] of x2 [n] to approximate the Fourier transform X2 (f ) of the continuous-time chirp x2 (t) and plot the magnitude of X(f ) as a function of the frequency f for 0 ≤ f ≤ fN using MATLAB or python. (6 points)
(g) Use the DFT X2 [k] of x2 [n] to approximate the DTFT Xs e jΩ of the discrete-time signal consisting of the samples x[n] and plot jΩ the magnitude of Xs e s a function of angular frequency Ω for 0 ≤ Ω ≤ 2πfN . (6 points)
- Let where the unit of time is ms. (44 points total)
(a) Show that x(t) is periodic and find its period. (6 points) (b) Use MATLAB or python to plot one period of x(t). (8 points) (c) Find the Nyquist rate for x(t). (4 points) (d) Sample the period of x(t) that starts at t = 0 at the rate fs = 1 kHz to create the finite-length signal x[n], and plot x[n] using MATLAB or python. (6 points)
(e) Quantize x[n] to create the digital signal xD [n] assuming that encoding will be done with a 4-bit integer, that −3 ≤ x[n] < 3 for all n, and using one more level for negative values than for positive values. If a signal value falls in the mth level of the quantization, set the signal value to the lower limit of values in the level, i.e. if the mth level is [xm , xm+1 ) and xm ≤ x[n] < xm+1 , set xD [n] = xm . Plot the digital signal xD [n] using MATLAB or python. (12 points) (Note: I am not asking you to encode the signal.)
(f) Interpolate the digital signal xD [n] using a zero-order hold to create the continuous-time signal x0 (t) and plot the original continuoustime signal x(t) and x0 (t) on the same plot using MATLAB or python. This would be the output from a DAC corresponding to the above sampling and quantization processes. (8 points)
- Consider the signal x(t) = cos87441112 where the unit of time is s. This signal is periodic with fundamental period T0 = 154 s. (44 points total)
(a) Use MATLAB or python to plot one period of x(t). (8 points) (b) Find the highest frequency in x(t) and find the Nyquist rate. (4 points) (c) Create the finite-length discrete-time signal x[n] by sampling one period of x(t) using the sample rate fs = 6 Hz and plot it using MATLAB or python. (8 points)
(d) Create the signal xs [n] = x[n]δ3 [n] that samples x[n] with a sampling time Ns = 3 and plot it using MATLAB or python. Use MATLAB or python to calculate the DFT Xs [k] of xs [n]. Translate the discrete frequency variable k into the angular frequencies Ω associated with the DTFT Xs (e jΩ ) of xs [n] and plot the magnitude of Xs (e jΩ ) as a function of Ω. (12 points) (e) Create the signal xd [n] that decimates x[n] (and xs [n]) using the sampling interval Ns = 3 and plot it using MATLAB or python. Use MATLAB or python to calculate the DFT Xd [k] of xs [n]. Translate the discrete frequency variable k into the angular frequencies Ω associated with the DTFT Xd (e jΩ ) of xd [n] and plot the magnitude of Xd (e jΩ ) as a function of Ω. How are Xd (e jΩ ) and Xs (e jΩ ) related? Explain. (12 points)