Question

In: Physics

Section 1: Given a system y[n]-y[n-1]+y[n-2]=x[n] (refer to M3.2 on textbook) In class, we analytically derived...

Section 1: Given a system y[n]-y[n-1]+y[n-2]=x[n] (refer to M3.2 on textbook)
In class, we analytically derived the solutions of second order difference equations, including zero-input response, unit impulse response, zero-state response and total response. The Matlab has imbedded commands to do the same job. Get familiar with the following commends, and use them to get (0≤n≤40)

a) unit impulse response and plot it
b) zero-input response and plot it, with initial conditions of y[-1]=1 and y[-2]=2 c) zero-state response and plot it, x[n]=2cos(2πn/6)u[n]
d) total response and plot it

inline
filter
filtic
stem
xlabel, ylabel

Solutions

Expert Solution

****** Matlab Code ********

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% finding ZIR and ZSR for discrete systems

H = tf([1 0 0],[1 -1 1],1); % given (or derived) transfer function
n = 0:1:40; % time vector
imp = double(n==0); % impulse signal
b = 1;
a = [1 -1 1];
y = filter(b,a,imp); % impulse response
subplot(2,2,1);
stem(n,y);
title('Impulse response');
xlabel('n');
ylabel('Amplitude')
%%%%%%%% creating state space model for finding ZSR and ZIR
sys_ss = ss(H);
x0 = [1;2]; % initial conditions
[y1,n,x] = initial(sys_ss,x0,n); % ZIR
subplot(2,2,2);
stem(n,y1);
title('Zero Input response');
xlabel('n');
ylabel('Amplitude')

u = 2*cos(2*pi*n/6);
subplot(2,2,3);
y2 = lsim(sys_ss,u,n); % ZSR
stem(n,y2);
title('Zero State response');
xlabel('n');
ylabel('Amplitude')

subplot(2,2,4);
stem(n,y1+y2);
title('Total response');
xlabel('n');
ylabel('Amplitude')

**************************

Output::-


Related Solutions

For the following causal difference equation, given that y[-1] = 2, y[-2] = 3, and x[n]...
For the following causal difference equation, given that y[-1] = 2, y[-2] = 3, and x[n] = 3nu[n], solve using z-Transforms. (Hint: convert to delay operator form, find the z-Transform, use PFE to find the inverse z-Transform) y[n + 2] – 3y[n + 1] + 2y[n] = x[n + 1]
For the following causal difference equation, given that y[-1] = 0, y[-2] = 1, and x[n]...
For the following causal difference equation, given that y[-1] = 0, y[-2] = 1, and x[n] = u[n], solve using z-Transforms. (Hint: convert to delay operator form, find the z-Transform, use PFE to find the inverse z-Transform) 4y[n + 2] + 4y[n + 1] + 2y[n] = x[n + 1]
x[n] is the input of a system and y[n] is the output of the system. The...
x[n] is the input of a system and y[n] is the output of the system. The relationship between the input and output is the following: y[n] = x[n]u[n+1] a) Is the system memoryless? Just yes or no is sufficient. b) Is this system causal? Just yes or no is sufficient. c) Is the system linear? Just yes or no is sufficient. d) Is the system time invariant? Justify. e) Is the system BIBO stable? Justify. f) Is the system invertible?...
Given two functions, M(x, y) and N(x, y), suppose that (∂N/∂x − ∂M/∂y)/(M − N) is...
Given two functions, M(x, y) and N(x, y), suppose that (∂N/∂x − ∂M/∂y)/(M − N) is a function of x + y. That is, let f(t) be a function such that f(x + y) = (∂N/∂x − ∂M/∂y)/(M − N) Assume that you can solve the differential equation M dx + N dy = 0 by multiplying by an integrating factor μ that makes it exact and that it can also be written as a function of x + y,...
An FIR system produced an output y[n] as given below for an input x[n] = {1,1,1,1},...
An FIR system produced an output y[n] as given below for an input x[n] = {1,1,1,1}, y[n] = {6,11,15,18,14,10,6,3,1}. Find the FIR system. Use bk, d(n-k) equation if applicable. Thanks!
Given f(x,y) = 2 ; 0< x ≤ y < 1 a. Prove that f(x,y) is...
Given f(x,y) = 2 ; 0< x ≤ y < 1 a. Prove that f(x,y) is a joint pdf. b. Find the correlation coefficient of X and Y.
α=alpha Y=per capita (Real GDP or GDP) N=population K=capital in class, we derived a relationship between...
α=alpha Y=per capita (Real GDP or GDP) N=population K=capital in class, we derived a relationship between output per capita y=Y/N and the population N in an economy as y=(φ^1-α)(K^α) / N^α. For each of the following scenarios describe in words how you would depict that in terms of the variables in the model. You do NOT have to draw any diagrams just use words. a) A war that creates immense death and destruction in an economy. b) A broad-based immigration...
#3. Given the conic section written in general form: x^2 - y^2 - 4x - 4y...
#3. Given the conic section written in general form: x^2 - y^2 - 4x - 4y + 9 = 0 FIND: Part a) Identify which type of graph the conic section has. Part b) Now rewrite the equation in Standard Form for that particular type of Conic section. Part c) Use its Standard Form to graph the conic section. Part d) Label any vertices, focal points, center, radius, directrix or asymptotes as is appropriate for each graph. I have a...
Given the utility function U ( X , Y ) = X 1 3 Y 2...
Given the utility function U ( X , Y ) = X 1 3 Y 2 3, find the absolute value of the MRS when X=10 and Y=24. Round your answer to 4 decimal places.
Given ( x + 2 )y" + xy' + y = 0 ; x0 = -1
Given ( x + 2 )y" + xy' + y = 0 ; x0 = -1
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT