Finding time constant and steady state error with Simulink
148 次查看(过去 30 天)
显示 更早的评论
Hello Everyone,
I am working on an assignment for school. I'm working with a single order Transfer Function, and the issue is that I do not know how to acquire the requested items, the way they are requested.
I'm asked to find the time constant and steady-state error. I did this, it's not problem. (Technically it's not a transfer function, it's the path forward function of a unity feedback system).
Here's where I am stuck:
2. Now, determine the output of the system using MATLAB/Simulink for the above systems for a reference input of 1 volt, i.e. a unit step input. Place responses for the three values of K (given in part (1)) on the same plot. Find the time constants and compare these with the results found in part 1. Also, find the steady-state errors and compare the results with those obtained in part (1).
Note: I have no problem with creating the Simulink diagram for all three variations, and getting the output with the scope. My issue is that I do not know how to find the Ttime Cconstant or the steady state error using Simulink output.
Understand, at this point, we basically know how to use the scope output and not much else.
Is there a way to achieve these results?
Thanks!
0 个评论
采纳的回答
Birdman
2017-10-24
If you are talking about a single order(first order) transfer function with no zeros and one poles, then the time constant is the value where the output reaches to its 63% of its final value. For instance if the final value is 1, the time constant can be found where the output is 0.63. The other way to find the time constant is as follows:
Consider a first order transfer function as
G(s)=K/a*s+1
If the transfer function has this shape, where the s^0 term in the denominator is 1, then the time constant is equal to a. You can both try these ways in order to verify the results.
There is no tool in Simulink that automatically gives the time constant to you. You have to derive it yourself.
Secondly, to find the steady state error, you can do it as follows:
Imagine you have the same transfer function as above and you are asked to calculate it by hand. Then, in closed loop with a unit gain controller, the expression for the error will be
E(s)=R(s)/1+G(s)
Then, you can calculate steady state error(ess) by
lim s*E(s) = s*s+2/(s*s+3) where the s will cancel each other and when s=0, the ess will be 2/3.
s->0
Also in closed loop, we know that
T(s)=G(s)/1+G(s)
and the final value for the step response will be 1/3. So the steady state can be also found by
1-1/3=2/3.
Hope this helps.
2 个评论
Birdman
2017-10-24
编辑:Birdman
2017-10-24
Maybe you can write a MATLAB Function for it in Simulink. If you have time, I will write and send to you later.
There is a function for time constant for first order systems.
function [tau, TFunc]=TimeConstant(TF)
%%time constant for first order continuous transfer functions.
den=cell2mat(TF.Denominator);
num=cell2mat(TF.Numerator);
len=length(den);
if(den(len)~=1)
den=den/den(len);
num=num/den(len);
end
tau=den(len-1);
TFunc=tf(num,den);
end
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!