Starting from:

$34.99

ECE250 Assignment-3 Solution

Signals & Systems: ECE250

Instructions
• This assignment should be attempted individually.
• Maximum points for this assignment are 40. All questions are compulsory.
• Use Matlab/Python to solve the programming problems.
• For your solutions, you need to submit a zipped file on Google classroom with the following: - program file (.py) with all dependencies.
- a report (.pdf) with your coding outputs and generated plots. The report should be selfcomplete with all your assumptions and inferences clearly specified.
• Before submission, please name your zipped file as: “OA1_RollNo_Name.zip” (e.g., OA1_2023001_Sachin.zip).
• Codes/reports submitted without a zipped file or without following the naming convention will NOT be checked.

1, 𝑛 ∈ [−10,10]
1. [CO2] Create a rectangular pulse defined as: 𝑥[𝑛] = &0, otherwise and convolve it with an exponentially decaying signal: ℎ[𝑛] = e!".$% 𝑓𝑜𝑟 𝑛 ≥ 0
a) Perform and plot the manual convolution between the two signals. (3 points)
b) Compare the manual convolution with np.convolve() and display both results on the same plot. (1 point)

2. [CO1, CO2] Consider a periodic square wave x(t), defined over one period T as follows:
1, |𝑡| < 𝑇$ (Take 𝑇$ = 2s)
𝑥(𝑡) = &0, 𝑇$ < |𝑡| < 𝑇/2
The signal is periodic with a fundamental period T and a fundamental angular frequency 𝜔" = 2𝜋/𝑇. Derive and plot the Fourier coefficients 𝑐& for this periodic square wave for:
a) 𝑇 = 4𝑇$ (2 points)
b) 𝑇 = 8𝑇$ (2 points)
c) 𝑇 = 16𝑇$ (2 points)
The Fourier series for the signal is expressed as: 𝑥 𝑐&𝑒’&(!)
For a periodic square wave, the coefficients 𝑐& are regularly spaced samples of the envelope


3. [CO1, CO3] Given a discrete-time signal composed of the sum of two cosine waves:
𝑛 𝑛
𝑥[𝑛] = 𝑐𝑜𝑠 M2𝜋𝑓$ 𝑁 O + 0.5𝑐𝑜𝑠 M2𝜋𝑓/ 𝑁 O , 𝑛 = 0,1, … , 𝑁 − 1
Where:
Frequencies of the cosine waves 𝑓$ = 5 𝐻𝑧 and 𝑓/ = 12 𝐻𝑧
Number of samples 𝑁 = 64
a) Compute the FFT of the discrete signal x[n] using the Fast Fourier Transform (FFT). (3 points)
b) Plot the magnitude spectrum of the FFT. (1 point)
c) Explain the result by identifying the prominent frequency components and their amplitudes in the magnitude spectrum. (2 points)

4. [CO2, CO4] Consider a continuous-time Gaussian pulse signal defined as:
𝑥(𝑡) = 𝑒!#"$##
Where 𝜎 = 0.1 controls the width of the Gaussian pulse.
The time range is 𝑡 = −1 𝑡𝑜 𝑡 = 1, with 500 samples.
a) Compute the FFT of the Gaussian pulse signal x(t). (3 points)
b) Plot the magnitude spectrum of the FFT. (1 point)
c) Explain the result by interpreting the frequency components of the Gaussian pulse in the frequency domain. (2 points)

5. [CO1, CO3, CO4] Create a signal x[n] that is the sum of two cosine waves:
𝑥[n] = 𝑐𝑜𝑠(2𝜋10n) + 0.5𝑐𝑜𝑠(2𝜋100n)
Duration: 2 seconds
Sampling interval: 0.001 seconds a) FIR Filter:
Low-pass FIR filter with the following impulse response ℎ$(𝑛):
ℎ$[𝑛] = [0.1,0.15,0.5,0.15,0.1]

This is a low-pass filter designed to suppress frequencies above 50 Hz. b) IIR Filter:
Second-order Butterworth low-pass IIR filter with:
Cutoff frequency 𝑓0 = 50𝐻𝑧

i. Plot the original composite signal x(t). (2 points) ii. Plot the filter response of both the FIR and IIR filters. (4 points) iii. Apply the FIR filter to obtain 𝑦123[𝑛] (3 points) iv. Apply the IIR filter to obtain 𝑦223[𝑛] (3 points)
v. Plot the filtered signals 𝑦123[𝑛] and 𝑦223[𝑛] on the same graph as the original signal. (1 point)
vi. Calculate and plot the Fourier transforms of the original signal, 𝑦123[𝑛], and 𝑦223[𝑛]. (2 points)

Analyze how each filter suppresses the high-frequency component and retains the low-frequency component. Compare the difference in filtering behavior between the FIR and IIR filters in both the time and frequency domains. (3 points)

More products