J = 0.2; b = 0.1; K = 0.2; R = 10; L = 5; s = tf('s'); p = K/((J*s+b)*(L*s+R)+K^2); step(p,200) [y,t]=step(p,200); stepinfo(y) With the following code, I want to measure the rise time. Using the stepinfo command, this is what pops in my command window : ans = struct with fields: RiseTime: 94.5571 %%Rise time SettlingTime: 172.5924 SettlingMin: 0.1735 SettlingMax: 0.1923 Overshoot: 0 Undershoot: 0 Peak: 0.1923 PeakTime: 1378 But when I check the parameters using the step response graph, the answer is different. So, why am I getting two different rise times? Any solution?
Prashant Kumar answered .
2025-11-20
You are not calling stepinfo correctlly.
stepinfo(p)
produces:
ans =
struct with fields:
RiseTime: 4.4144
SettlingTime: 8.0108
SettlingMin: 0.1735
SettlingMax: 0.1923
Overshoot: 0
Undershoot: 0
Peak: 0.1923
PeakTime: 23.2961