Given Transfer function of open loop: G(s)= 10/s(s+2)(s+4) How to find Rise Time, Peak time, Maximum overshoot, and setting time, using Matlab programming?
Using MATLAB programming: We can write the transfer function into numerator/denumerator as: G(s)= 10/(s^3+ 6s^2+ 8s) >> %-------This program is to plot the unit step response curve, as well as to find the rise time >> %peak time, maximum overshoot, and settling time. In this program, the rise time is calculated >> %as the time required for the response to rise from 10% to 90% of its final value-------------- >> >> num = [0 0 0 10]; >> den = [1 6 8 0]; >> t = 0:0.02:15; >> [y,x,t]= step(num,den,t); >> plot(t,y) >> grid >> title('Unit-Step Response') >> xlabel('t(sec)') >> ylabel('Output y(t)') >> >> r1 = 1; while y(r1)< 0.1, r1 = r1 + 1; end; >> r2 = 1; while y(r2)< 0.9, r2 = r2 + 1; end; >> >> rise_time = (r2-r1)*0.02 rise_time = 1.1000 >> [ymax,tp]= max(y); >> peak_time = (tp-1)*0.02 peak_time = 2.6400 >> max_overshoot = ymax-1 max_overshoot = 0.2146 >> s = 101; while y(s)> 0.98 & y(s)< 1.02; s=s-1; end; >> settine_time = (s-1)*0.02 settine_time = 2
SOLVING SIMPLE CONTROL AUTOMATIC PROBLEM!
ReplyDeleteGiven Transfer function of open loop:
G(s)= 10/s(s+2)(s+4)
How to find Rise Time, Peak time, Maximum overshoot, and setting time, using Matlab programming?
Using MATLAB programming:
ReplyDeleteWe can write the transfer function into numerator/denumerator as:
G(s)= 10/(s^3+ 6s^2+ 8s)
>> %-------This program is to plot the unit step response curve, as well as to find the rise time
>> %peak time, maximum overshoot, and settling time. In this program, the rise time is calculated
>> %as the time required for the response to rise from 10% to 90% of its final value--------------
>>
>> num = [0 0 0 10];
>> den = [1 6 8 0];
>> t = 0:0.02:15;
>> [y,x,t]= step(num,den,t);
>> plot(t,y)
>> grid
>> title('Unit-Step Response')
>> xlabel('t(sec)')
>> ylabel('Output y(t)')
>>
>> r1 = 1; while y(r1)< 0.1, r1 = r1 + 1; end;
>> r2 = 1; while y(r2)< 0.9, r2 = r2 + 1; end;
>>
>> rise_time = (r2-r1)*0.02
rise_time =
1.1000
>> [ymax,tp]= max(y);
>> peak_time = (tp-1)*0.02
peak_time =
2.6400
>> max_overshoot = ymax-1
max_overshoot =
0.2146
>> s = 101; while y(s)> 0.98 & y(s)< 1.02; s=s-1; end;
>> settine_time = (s-1)*0.02
settine_time =
2