0% found this document useful (0 votes)
44 views5 pages

North South University: Final Assignment

This document contains a student's final assignment submission for the course ETE 471L at North South University. The assignment includes 3 questions on signal processing topics. For question 1, the student designs a Butterworth filter and plots its frequency response. For question 2, the student compares the power spectra of sine and cosine waves. They find a spike at the beginning and end of the cosine power spectrum but not for sine. The student also notes the sine wave has a larger amplitude. Question 3 asks the student to define 5 signal processing functions: length, fft, iztrans, heaviside, and sort.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views5 pages

North South University: Final Assignment

This document contains a student's final assignment submission for the course ETE 471L at North South University. The assignment includes 3 questions on signal processing topics. For question 1, the student designs a Butterworth filter and plots its frequency response. For question 2, the student compares the power spectra of sine and cosine waves. They find a spike at the beginning and end of the cosine power spectrum but not for sine. The student also notes the sine wave has a larger amplitude. Question 3 asks the student to define 5 signal processing functions: length, fft, iztrans, heaviside, and sort.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

North South University

Course : ETE 471L


Spring 2020

Name: Ifthakharul Alam Shuvo


ID: 1530421045
SEC: 01
FINAL ASSIGNMENT
Question 1 answer:

Code:

fp=300;
p=300;
fs=500; Fs=10000;
Rp=2.5;
Rs=50;
%calculate edge frequencies
Wp= 2*fp/Fs;
Ws= 2*fs/Fs;
[N,Wn]=buttord(Wp, Ws, Rp, Rs)
%Here N is the order of the filter and Wn is the cutoff
frequency, add the lines
[b,a]=butter(N,Wn)
freqz(b)
legend('Name:Ifthakharul Alam Shuvo')
title('ID:1530421045')

Figure:
Ques 2 answer:
code:
Fs = 150; % Sampling frequency
t = 0:1/Fs:1; % Time vector of 1 second
f = 15; % Create a sine wave of f Hz.
x1 = sin(2*pi*t*f);
x2 = (cos(2*pi*t*f)-pi/3);
nfft = 1024; % Length of FFT
% Take fft, padding with zeros so that length(X) is equal to nfft
X1 = fft(x1,nfft);
X2 = fft(x2,nfft);

X1 = X1(1:nfft);
X2 = X2(1:nfft);
% Take the magnitude of fft of x
mx1 = abs(X1);
mx2 = abs(X2);
% Frequency vector
f = (0:nfft-1)*Fs/nfft;
% Generate the plot, title and labels. subplot(211);
subplot(411)
stem(t,x1);
title('sin Wave Signal');
xlabel('Time (s)');
ylabel('Amplitude');
subplot(412);
plot(f,mx1);
title('Power Spectrum of a sin Wave');
xlabel('Frequency (Hz)');
ylabel('Power');
subplot(413)
stem(t,x2);
title('cos Wave Signal');
xlabel('Time (s)');
ylabel('Amplitude');
subplot(414);
plot(f,mx2);
title('Power Spectrum of a cos Wave');
xlabel('Frequency (Hz)');
ylabel('Power');
Figure:

Yes here we can see difference between the power spectrum.There is a spike at the beginning
and end of the cos power spectrum and there is no spike in sin power spectrum.And athe
amplitude of sin wave is larger than the cos wave.

Question 3 answer
a) length(x): It returns the size of the longest dimension of X.
b) fft(x): It computes the discrete Fourier transform (DFT) of x using a fast Fourier
transform (FFT) algorithm.
c) iztrans(f) : It returns the Inverse Z-Transform of f.
d) heaviside(t): It evaluates the heaviside step function at t also known as the unit step
function.
e) sort(A): It sorts the elements of A in ascending order.

You might also like