Answer:-
Given differential equation is (In the question there is some ambiguity in the differential equation there is a sign missing between y(n), x(n) terms)
In order to use the impz(b,a) we need to compute the transfer function and hence b(The coefficients int he denominator), a (coefficients in the numerator) .
a) To find the transfer function, Applying z transform on either side,
So
b = [1 -1.3 0.72 0.081 0.3645];
a = [2 2.8 1.6 -0.4 -1.2];
%Matlab code for part a.
% defining the numerator and denominator
b = [1 -1.3 0.72 0.081 0.3645];
a = [2 2.8 1.6 -0.4 -1.2];
%Computing impulse respnse and plotting
h = impz(b,a);
figure;stem(h);xlabel('n, samples');
ylabel('h(n)');title('Impulse response');
Output of this code:
B) In the following code the input signal is defined and the output of the filter is computed using filter function
% Defining the signal
n = 0:75;
for i = 0: 75
if(i<=30)
x(i+1) =
(i)*(30-i);
else
x(i+1) =0;
end
end
stem(n,x);xlabel('n, samples');ylabel('x(n)');title('Input
signal');
% Finding the output using Fitler
yfilt = filter(b,a,x);
stem(n,yfilt);xlabel('n, samples');ylabel('y(n)');title('Output
signal using filter function');
Output for the above code:
C) The Matlab code for part C is given below
ycon = conv(h,x);
n = 0:length(x)+length(h)-2;
figure,stem(n,ycon);xlabel('n,
samples');ylabel('y(n)');title('Output signal using
convolution');
The output of the code is
The output of the filter function and the output of convolution function are not the same. Filter function computes the output which will have same length of x while the conv function computes the full linear convolution which is of length =length(x)+length(h)-1.
A causal discrete-time system is described by the following difference equation: Use Matlab to write a...
For a causal LTI discrete-time system described by the difference equation: y[n] + y[n – 1] = x[n] a) Find the transfer function H(z).b) Find poles and zeros and then mark them on the z-plane (pole-zero plot). Is this system BIBO? c) Find its impulse response h[n]. d) Draw the z-domain block diagram (using the unit delay block z-1) of the discrete-time system. e) Find the output y[n] for input x[n] = 10 u[n] if all initial conditions are 0.
A causal discrete-time LTI system is described by the equationwhere z is the input signal, and y the output signal y(n) = 1/3x(n) + 1/3x(n -1) + 1/3x(n - 2) (a) Sketch the impulse response of the system. (b) What is the dc gain of the system? (Find Hf(0).) (c) Sketch the output of the system when the input x(n) is the constant unity signal, x(n) = 1. (d) Sketch the output of the system when the input x(n) is the unit step signal, x(n)...
For the causal filter below y(n) x(n) -20 eja 1-0.8e10 Write the difference equation(show the equation clearly and define coefficients) Give and plot the frequency response magnitude (show the equation clearly) Compute and plot the impulse response using MATLAB d a. b. c. Use MATLAB to determine steady state response due to x(n)-u(n) Write a MATLAB program to compute and plot the frequency response of the overall system. Give plots in dB and the program e. For the causal filter...
For the causal filter below y(n) x(n) -20 eja 1-0.8e10 Write the difference equation(show the equation clearly and define coefficients) Give and plot the frequency response magnitude (show the equation clearly) Compute and plot the impulse response using MATLAB d a. b. c. Use MATLAB to determine steady state response due to x(n)-u(n) Write a MATLAB program to compute and plot the frequency response of the overall system. Give plots in dB and the program e. For the causal filter...
6. (15) Consider the following causal linear time-invariant (LTT) discrete-time filter with input in and output yn described by y[n] = x[n] – rn - 2 for n 20 . Is this a finite impulse response (FIR) or infinite impulse response (IIR) filter? Why? • What are the initial conditions and their values for this causal and linear time-invariant system? Why? • Draw the block diagram of the filter relating input x[n) and output y[n] • Derive a formula for...
For the causal filter below x(п) y(n) -2j0 1 -0.8e 2j0 Write the difference equation(show the equation clearly and define coefficients) а. b. Give and plot the frequency response magnitude (show the equation clearly) Compute and plot the impulse response using MATLAB Use MATLAB to determine steady state response due to x(n)=u(n) c. d. Write a MATLAB program to compute and plot the frequency response of the overall system. Give plots in dB and the program e. For the causal...
Problem 2 Consider the causal non-linear discrete-time system characterized by the following difference equation: 2y[n] yn-1]+x[n] /yn-] If we use as input x[n] to this system (algorithm) a step function of amplitude P (i.e. xIn]-P u[n]), then y[n] will converge after several iterations to the square root of P .Write a MATLAB program that implements the above recursion to compute the square . How many iterations does it take to converge to the true value starting at y[-1]-0.2? roots of...
1) A causal discrete-time system is described by the difference equation, y(n) = x(n)+3x(n-1)+ 2x(n-4) a) What is the transfer function of the system? b) Sketch the impulse response of the system
please matlab code result is important 5. Consider a system with a cascade connection of two causal LTI systems: • Frequency response of the first system is H, (e) 1-2 and The impulse response of the second system is h, [n] = 5()'u[n] The input to the system is x[n], the output of the first system is w[n) and the output of the overall (complete) system is yn). a. Find the difference equation relating i. The input x[n) to the...
2. A system is described by the following difference equation n]1.5y[n0.56y[n -2]+x{n-0.2x{n-] a) Find the transfer function of the system b) Let xn]un]. Compute an analytical expression for the response y[n]. Use Matlab to calculate the coefficients c) Simulate and plot the response using Matlab.(stem plot) Generate 50 points. (Matlab: x ones(1,50)); 2. A system is described by the following difference equation n]1.5y[n0.56y[n -2]+x{n-0.2x{n-] a) Find the transfer function of the system b) Let xn]un]. Compute an analytical expression for...