Question

1. Given the impulse response, h[n duration 50 samples. (-0.9)u[n, find the step response for a step input of h-(0.9)-10:4911. Consider the LTI system described in state variable, , 0.7814 0 2 y [.9691 64493 2. Use the command ss() to produce an LTI

1. Given the impulse response, h[n duration 50 samples. (-0.9)"u[n, find the step response for a step input of h-(0.9)-10:491 -ones (1,50) s- conv(u,h) 2. Plot h and u using stem function for 50 samples only stem(10:491, s(1:50) 1. Given a system described by the following difference equation: yIn] 1143yn 1 0.4128y[n -2 0.0675x[n0.1349xn 0.675x[n-2] Determine the output y in response to zero input and the initial conditionsy-11 and yl-2] 2 for 50 samples using the following commands: a -,-1.143, 0-41281 b-[0.0675, 0.1349, 0.6751 yi- [1, 2]; %vector of İnitial condition of y in the orderly-1), y[-2], x-zeros (1,50) zi " filtic (b, a, yi ); y- filter (b, a, x, zi); %zi are the initial conditions 2. Plot the output y. stem (y)
1. Consider the LTI system described in state variable, , 0.7814 0 2 y [.9691 64493 2. Use the command ss() to produce an LTI system represented in state variable from the matrices A, B, C, D [-0.5572-0.7814;0.7814 0]; A = B- -1:0 21a c = [1.9691 6.4493]; C, -1); -1 for discrete time system ss (A, B, D, sys 1. Plot the step response using the command: figure step(sys) 2. Find the impulse response of the system using the command: figure inpulse (sys For the given step response above: . Determine the first 50 values of the step response. For the given difference equation above: . Simulate the system for a sinusoidal input x[n] = cos( n) assuming zero initial conditions. . Determine the first 100 values of the step response. For the given state variable system above: Find the time response if the system states was inosct u-0, use initialO). Simulate the system for a sinusoidal input of frequency f-0.25Hz. use command Isim().
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Step response:


clc;close all;clear all;
h=(-0.9).^[0:49];
u=ones(1,50)
s=conv(u,h)


subplot(311)
stem([0:49],u)
xlabel('n');ylabel('u(n)');title('step input')

subplot(312)
stem([0:49],h)
xlabel('n');ylabel('h(n)');title('Impulse response h(n)')

subplot(313)
stem([0:49],s(1:50))
xlabel('n');ylabel('s(n)');title('Step response s(n)')

step input 0.8 0.6 0.4 0.2 10 40 50 20 30 Impulse response h(n) 0.5 40 20 30 50 Step response s(n) 0.8 C 0.6 D 0.4 0.2 10 40

Difference equation:

clc;close all;clear all;
a=[1 -1.143 0.4128]
b=[0.0675 0.1349 0.675]
%Zero input response
yi=[1 2]
x=zeros(1,50)
zi=filtic(b,a,yi)
y=filter(b,a,x,zi)
subplot(311)
stem([0:49],y(1:50))
xlabel('n');ylabel('y(n)');title('Zero input response')

%Zero state response
n=0:1:99
x=cos(pi*n/6)
y=filter(b,a,x)
subplot(312)
stem([0:99],y(1:100))
xlabel('n');ylabel('y(n)');title('Zero state response')


%Step response
x=ones(1,100)
y=filter(b,a,x)
subplot(313)
stem([0:99],y(1:100))
xlabel('n');ylabel('s(n)');title('Step response')

Zero input response 0.4 0.3 0.2 0.1 -0.1 0.2 10 40 50 20 30 Zero state response 2 -3 20 40 60 80 100 Step response 3.5 3 2.5

State variable description:

clc;close all;clear all;
A=[-0.5572 -0/7814 ;0.7814 0];
B=[1 -1;0 2];
C=[1.9691 6.4493];
D=0;
sys=ss(A,B,C,D,0.1)
figure;
step(sys)

figure;
impulse(sys)

figure;
x0 = [1 ; 0];
initial(sys,x0)

figure;
%Response to sinusoidal input
f=0.25
[u,t] = gensig('sin',1/f,10,0.1);
lsim(sys,[u,u],t)

Step Response 6 10 8 4 S3 4 2 2 0 0.05 0.1 0.15 0.2 0.25 0.3 0 0.05 0.1 0.15 0.2 0.25 0.3 Time [s

Impulse Response 4 10 2 -1 -2 0 0.05 0.1 0.15 0.2 0.25 0.3 0 0.05 0.1 0.15 0.2 0.25 0.3 Time [s

Response to Initial Conditions 4 2 -1 -2 0.1 0.25 0.15 Time [s] 0.2 0.3 0.05

Linear Simulation Results 10 -5 -10 2 4 8 10 Time [s]

Add a comment
Know the answer?
Add Answer to:
1. Given the impulse response, h[n duration 50 samples. (-0.9)"u[n, find the step response for a step input of h-(0...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT