case study - 1 lcs lab
TRANSCRIPT
s = tf('s');>> J = 0.01;>> b = 0.1;>> K = 0.01;>> R = 1;>> L = 0.5;>> tf1 = (K)/(((J*s+b)*(L*s+R))+K^2)
tf1 = 0.01 --------------------------- 0.005 s^2 + 0.06 s + 0.1001>>step(tf1)tf2 = feedback(tf1,1)
tf2 = 0.01 --------------------------- 0.005 s^2 + 0.06 s + 0.1101 Continuous-time transfer function.
>> step(tf2)>> Kp = 100;>> tf3_open = series(Kp,tf1)
tf3_open = 1 --------------------------- 0.005 s^2 + 0.06 s + 0.1001 Continuous-time transfer function.
>> tf3_closed = feedback(tf3_open,1)
tf3_closed = 1 ------------------------ 0.005 s^2 + 0.06 s + 1.1 Continuous-time transfer function.
>> step(tf3_closed)>> Ki = 1;>> PI_tf = Kp+(Ki/s)
PI_tf = 100 s + 1 --------- s Continuous-time transfer function.
>> tf4 = feedback((series(PI_tf,tf1)),1)
tf4 = s + 0.01 ----------------------------------- 0.005 s^3 + 0.06 s^2 + 1.1 s + 0.01 Continuous-time transfer function.
>> step(tf4)>> tf4_open = series(tf1,PI_tf)
tf4_open = s + 0.01 ------------------------------- 0.005 s^3 + 0.06 s^2 + 0.1001 s Continuous-time transfer function.>> tf4_closed = feedback(tf4_open,1)
tf4_closed = s + 0.01 ----------------------------------- 0.005 s^3 + 0.06 s^2 + 1.1 s + 0.01 Continuous-time transfer function.
>> step(tf4_closed)>> Kd = 1;>> PD_tf = Kp + (s*Kd)
PD_tf = s + 100 Continuous-time transfer function.
>> tf5_open = series(PD_tf,tf1)
tf5_open = 0.01 s + 1 --------------------------- 0.005 s^2 + 0.06 s + 0.1001 Continuous-time transfer function.
>> tf5_closed = feedback(tf5_closed,1)Undefined function or variable 'tf5_closed'. >> tf5_closed = feedback(tf5_open,1)
tf5_closed = 0.01 s + 1 ------------------------ 0.005 s^2 + 0.07 s + 1.1 Continuous-time transfer function.
>> step(tf5_closed)>> PID_tf = Kp + (Kd*s) + (Ki/s)
PID_tf = 10 s^2 + 100 s + 200 -------------------- s Continuous-time transfer function.
>> tf6_open = series(tf1,PID_tf)
tf6_open = 0.1 s^2 + s + 2 ------------------------------- 0.005 s^3 + 0.06 s^2 + 0.1001 s Continuous-time transfer function.
>> tf6_closed = feedback(tf6_open,1)
tf6_closed = 0.1 s^2 + s + 2 -------------------------------- 0.005 s^3 + 0.16 s^2 + 1.1 s + 2 Continuous-time transfer function.
>> step(tf6_closed)