close all,
clear all,
clc,
Fs=1000;
n=0:(1/Fs):1;
X = [3/2,-1,0];
h=dirac(n);
idx = h == Inf;
h(idx) = 1; % set Inf to finite value
Hn=h - (sin(n*pi)/(n*pi));
for r=1:length(n)
temp = rem(r,3);
if(temp==0), temp=3; end
Xn(r) = X(temp);
end
subplot(2,2,1); plot(Xn); title('Repeating Signal, X =
[3/2,-1,0]');
subplot(2,2,2); plot(Hn); title('Impulse Response, Hn=Delta(n) -
(sin(n*pi)/(n*pi))');
Yn = convn(Xn,Hn);
subplot(2,2,3); plot(Yn); title('Output Yn = Conv(Xn,Hn)');
L=length(Yn);
NFFT = 2^nextpow2(L); % Next power of 2 from length of y
Y = fft(Yn,NFFT)/L;
f = Fs/2*linspace(0,1,NFFT/2);
% Plot single-sided amplitude spectrum.
No_of_Points=20;
subplot(2,2,4);
plot(f(1:No_of_Points),2*abs(Y(1:No_of_Points)));
%subplot(2,2,4); plot(f,2*abs(Y(1:NFFT/2)));
str = strcat('FFT of Yn at N = ',num2str(NFFT),' Points, Showing
only 1 to ',num2str(No_of_Points),' Points for good
viewing');
title(str);
xlabel('Frequency (Hz)'); ylabel('|Y(f)|');
%subplot(3,1,3); plot(Xn);
figure,
Xn = cos((n*pi)/5) + sin(((n*pi)/9)+0.5);
h=dirac(n);
idx = h == Inf;
h(idx) = 1; % set Inf to finite value
Hn=h - (sin(n*pi)/(n*pi));
subplot(2,2,1); plot(Xn); title('Xn = cos((n*pi)/5) +
sin(((n*pi)/9)+0.5)');
subplot(2,2,2); plot(Hn); title('Impulse Response, Hn=Delta(n) -
(sin(n*pi)/(n*pi))');
Yn = convn(Xn,Hn);
subplot(2,2,3); plot(Yn); title('Output Yn = Conv(Xn,Hn)');
L=length(Yn);
NFFT = 2^nextpow2(L); % Next power of 2 from length of y
Y = fft(Yn,NFFT)/L;
f = Fs/2*linspace(0,1,NFFT/2);
% Plot single-sided amplitude spectrum.
No_of_Points=20;
subplot(2,2,4);
plot(f(1:No_of_Points),2*abs(Y(1:No_of_Points)));
%subplot(2,2,4); plot(f,2*abs(Y(1:NFFT/2)));
str = strcat('FFT of Yn at N = ',num2str(NFFT),' Points, Showing
only 1 to ',num2str(No_of_Points),' Points for good
viewing');
title(str);
xlabel('Frequency (Hz)'); ylabel('|Y(f)|');
Objective Conduct DTFT, DTFS on a periodic discrete signal. Task: Consider the system with impulse response...
Objective Conduct DTFT, DTFS on a periodic discrete signal. Task: Consider the system with impulse response Tth sin 8 h(n) S(n) Tn (1) Find the Fourier-series representation for the output y(n) when the input x(n) is the periodic extension of the sequence 3/2, -1,0, -3/2, 1,0 Plot the x(n), h(n), y(n) and Fourier coefficient bk using Matlab or handwriting (Example 7.2.6 irse material) in cour (2) Find the output y(n) of the system with the input 1 Tn Tn x(п)...
Consider the discrete-time periodic signal n- 2 (a) Determine the Discrete-Time Fourier Series (DTFS) coefficients ak of X[n]. (b) Suppose that x[n] is the input to a discrete-time LTI system with impulse response hnuln - ]. Determine the Fourier series coefficients of the output yn. Hint: Recall that ejIn s an eigenfunction of an LTI system and that the response of the system to it is H(Q)ejfhn, where H(Q)-? h[n]e-jin
response system 7. Consider the following signal: *(n) = sin(n + 3). (a) Is this signal periodic? If so what is its period? (b) Find its DTFS. If its DTFS is periodic, what is the period? Plot the spectrum. (C) Find its DTFT. If its DTFT is periodic, what is the period? Plot the spectrum. d) Comment on the spectrums of (b) and (c).
1. The signal x(t)- expl-a)u(t) is passed as the input to a system with impulse response h(t) -sin(2t)/(7t (a) Find the Fourier transform Y() of the output (b) For what value of α does the energy in the output signal equal one-half the input signal energy? Hint: use the duality property of Fourier Transform to obtain H(a
CONVOLUTION - Questions 4 and 5 4. Consider an LTI system with an impulse response h(n) = [1 2 1] for 0 <n<2. If the input to the system is x(n) = u(n)-un-2) where u(n) is the unit-step, calculate the output of the system y(n) analytically. Check your answer using the "conv" function in MATLAB. 5. Consider an LTI system with an impulse response h(n) = u(n) where u(n) is the unit-step. (a) If the input to the system is...
4. The impulse response of a system is given by h[n]=(0.3)"u[n]. If the input to the system is x[r]=(-0.6)" u [n], giving an output of y[n]=[n]*x[n]: a. (5 pts) Find the spectrum of the output, Y(e/2/). b. (10 pts) Use partial fraction decomposition to rewrite Y (e/2*) as a sum of two terms then take the inverse DTFT to find the output, y[n]
Consider an LTI discrete-time system that has impulse response h n Tn-12) 1 if otherwise a) Determine the magnitude H(Q and the phase response LH(D for-r < Ω < π Enter Ω as "and enter the piecev se function Η Ω using the hea side function b)Determine the output of the system, rn, if the input is given by z n-Sn-9 +com( ) Enter your answer in terms of hin y[n] = In your answers, enter 2(n) for a discrete-time...
(20 pts.) Determine the output sequence of the system with impulse response h[n] 6. u[n] when the input signal is x[n] = 2e-n + sin(nn)- 2, -co <n< 0o. 7. (20 pts.) Determine the response of the system described by the difference equation 1 1 y(n)y(n1)n2)x(n 8 7 for input signal x(n) u(n) under the following initial conditions 1, y(-2) 0.5 y(-1) (20 pts.) Determine the output sequence of the system with impulse response h[n] 6. u[n] when the input...
3. Let the following periodic signal : x(t) = m+0 8(t -- 3m) + 8(t-1-3m) + 8(t – 2 – 3m) be the input to a LTI system with a system function: H(s) = es/4 – e-s/4, Let by represent the Fourier series coefficients of the resulting output signal y(t). Determine bk. (5 points)
5. (12 points) Consider a continuous-time LTI system whose frequency response is sin(w) H(ju) 4w If the input to this system is a periodic signal 0, -4<t<-1 x(t)=1, -1st<1 0, 1st<4 with period T= 8 (a) (2 points) sketch r(t) for -4ts4 (b) (5 points) determine the Fourier series coefficients at of x(t), (c) (5 points) determine the Fourier series coefficients be of the corresponding system output y(t) 5. (12 points) Consider a continuous-time LTI system whose frequency response is...