Sketching a zero-input response for an Electrical Engineering problem
6 次查看(过去 30 天)
显示 更早的评论
Hi everyone, I'm relatively new to MATLAB, so I don't know if anyone can help me. I'm trying to sketch the zero-input response for a system. The system can be described by
(E^2 - 1.56E + 0.81)y[k] = (E + 3)f[k]
with the following conditions: y[-1]=2, and y[-2]=1.
The following code is what I am trying to trouble shoot:
y=[1 2];
y=y';
k=-2:16;
k=k';
for m=1:length(k)-2
Y=1.56*y(m+1)-0.81 *y(m);
Yzi=[Yzi;Y];
end
stem(k,Yzi)
Does anyone know what I am doing wrong?
0 个评论
回答(1 个)
Star Strider
2016-12-11
I have no idea how you’re supposed to solve it.
I am not certain what the assignment actually wants you to do. This would be my approach (in terms of powers of 1/z):
a = flip([1 -1.56 0.81]);
b = flip([1 3]);
yi = flip([1 2]);
k=-2:16;
f = filter(b,a,k,yi);
figure(1)
stem(k, f)
grid
But then I’m known to take liberties with problems I don’t understand.
3 个评论
Star Strider
2016-12-11
The term ‘classical method’ leaves much to the imagination. It would help if you could describe it.
My inclination would be to use the z-transform of your equations, then take the inverse to solve the differential equation. It’s been decades since I‘ve dealt with difference equations and their solutions.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!