Also, using the convolution sum: y(n)- x(k)h(n-k), y(n) can also be calculated u
ID: 2249592 • Letter: A
Question
Also, using the convolution sum: y(n)- x(k)h(n-k), y(n) can also be calculated using (Inverse) Discrete Fourier transform: y,(n) _ IDFT DFT(x(n)),DFT(h(n)))-(n-1-K), (3) where DFT is K-point discrete Fourier transform (DFT) (and with the assumption of periodicity of the sequences with period K). For the following input signal (given by its Z-transform) X (z) = 1-az-1 Where a-0.99 The system is given by its' system function: 1-r cos(40)2-1 1-2 T cos(wp)ztr2ROC:> H(z) = where 0=-andr-0.99 Calculate y(n) using different methods impz, conv and fft/ifft built-in MATLAB functions which correspond to Eqs. 1, 2 and 3, respectively. Also, calculate y(n) using your iir) function from part I. Note that for fft/ifft method and conv you will need x(n) and the system impulse response h(n)in time domain. Approximations of both can be calculated by using the built-in MATLAB function impz. If the signal is infinite, you will have to approximate it by a finite number of samples, i.e. truncate it to a finite number of samples N - which has consequences.Explanation / Answer
y=@(t) 1.0*(t>=0).*exp(- 3*t);
x=@(t) 1.0*(t==3)- 1.0*(t==5);
delta=0.0001;
tx=2:delta:6; %tx=(- 200:300)*delta;
ty=-1:delta:1.5; % ty=(- 100:300)*delta;
c=conv(y(ty),x(tx))*delta;
tc=(tx(1)+ty(1)):delta:(tx(end)+ty(end));
figure()
title('c')
subplot(3,1,1)
plot(tx,x(tx))
xlabel('n'); title('x(t)'); ylim([min(x(tx))- 1,max(x(tx))+1]); matrix on
subplot(3,1,2)
plot(ty,y(ty))
xlabel('n'); title('h(t)'); ylim([min(y(ty))- 1,max(y(ty))+1]); matrix on
subplot(3,1,3)
plot(tc,c);
xlabel('n'); title('x(t)*h(t)');ylim([min(c)- 1,max(c)+1]); matrix on
T0 = [1; 5]; % Initial Condition (vector)
h = 0.2;% Time step
x = 0:h:5; % t goes from 0 to 2 seconds.
a = (x+3)/(x+1);
b = (x+3)/(x+1).^2;
c = 2*(x+1) + 3*((x+3)/(x+1).^2);
A = [0 1; - a - b]; % A Matrix
B = [0; c]; % B Matrix
T = zeros(3,length(x));
T(:,1) = T0;
for i=1:(length(x)- 1)
q = A*T(:,i)+B*1;
T(:,i+1) = T(:,i) + q*h;
end
plot(x,T(1,:));
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.