How to find steady-error value from the response graph? is there any command to find the steady state error from the response graph?
Show older comments
G(s)=5/s^2+2s+25
1 Comment
s = tf('s');
sys=input('enter the funtion' );
[y,t]=step(sys);
y(length(y))
plot(t,y);
xlabel('Time (sec)');
ylabel('Amplitude');
title('step responce');
Answers (4)
Arkadiy Turevskiy
on 26 Nov 2014
Edited: Arkadiy Turevskiy
on 26 Nov 2014
Your question is not formulated clearly. Did you mean steady-state value, not "steady-error value"? Assuming that's what you meant, the next clarification is steady-state value of a transfer function in response to what - is it in response to a step input?
If that's what you meant, then yes, you can do this like that:
>> s=tf('s');
>> sys=5/(s^2+2*s+25);
>> [y,t]=step(sys);
>> y(length(y))
ans =
0.20
You can also right click on a step plot, "Charecteristics", "Steady-state", as shown below:

4 Comments
Karrar
on 27 Jul 2019
What about the steady state error values, How to get them?
Khadar Essa
on 14 Nov 2020
how did you get to this plot?
Tunde Sulaimon
on 18 Jan 2021
What tool box is this?!
Arkadiy Turevskiy
on 14 Jun 2024
My answer above us using Control System Toolbox.
To get a step plot in MATLAB do this:
s=tf('s');
sys=5/(s^2+2*s+25);
step(sys);
Miswar Syed
on 8 Apr 2020
2 votes
SP=5; %input value, if you put 1 then is the same as step(sys)
[y,t]=step(SP*sys); %get the response of the system to a step with amplitude SP
sserror=abs(SP-y(end)) %get the steady state error
3 Comments
Naufal Indrastoto
on 31 May 2020
I have already tried this and it says undefined function or variable 'sys'. Could please you explain more about it?
wint wah
on 18 Oct 2020
num=4;
den=[1 2 4];
sys=tf(num,den)
Catherine Callaghan
on 6 Feb 2021
What would I set SP to if I wanted to represent a ramp input and parabolic input? Thanks.
Ur rehman Waheed
on 16 Apr 2020
2 votes
matlab command to find steadt state error from step response graph in matlab
>> sserror=(SP-(y1.data(end,end)))
where SP value is one when input is step input. y1 shows workspace value of step response. normally it comes during simulation from simulink.
1 Comment
Josh McNamara
on 19 Oct 2020
Hi ,
Is there anything simular using 'lsim' command for a ramp input?
Regards,
Josh
Amit Borole
on 1 Nov 2019
1 vote
i need to find position constant of this
Categories
Find more on Classical Control Design in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!