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!