problem in taking the step response of a function
2 次查看(过去 30 天)
显示 更早的评论
Hi guys
I wonder why this code gives me (0) for steady state for step(T)?
I expect that it gives me 1 in steady state as the input is step.!
If anybody knows please let me know.
Thanks
clc;
clear all;
close all;
[a,b]=ss2tf(-0.022,0.0012,17.35,0)
G=tf(a,b);
%R=0.44*step(G)
% C0=pid(1,1);
% C=pidtune(G,C0)
%C=pidtune(G,'PID')
figure(1)
subplot(2,1,1)
step(G)
subplot(2,1,2)
bode(G)
% CC=8.4+0.29/s+(-8.16/(s+0.48));
C=tf([0.24 4.29 0.144],[1 0.48 0])
%T=G/(1+G*C)
k=1;
T=feedback(G,C)
%T=feedback(G*C,1)
figure(2)
subplot(2,1,1)
step(T)
stepinfo(T)
subplot(2,1,2)
bode(T)
0 个评论
回答(1 个)
Star Strider
2019-9-18
Your ‘A matrix’ is actually a scalar: -0.022, that will evaluate to in your state space realisation. This produces a typical decaying exponential that declines to 0.5 in 31.5067 seconds, which is exactly what you see in the step plot.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!