Lecture 07+08 - 1st & 2nd Order Control Systems
Lecture 07+08 - 1st & 2nd Order Control Systems
5.2.1 Requirement:
R(S) is the input voltage
w(S) is the output angular movement of motor
Td(S) is the external disturbance signal Analyze under external Disturbance Closed loop with
feedback is better:
5.2.1 MATLAB Code for the Open-loop without tachometer feedback
of the above example (Case-I)
• % ---------------------------------------------------------------------------MEEN-4263 Control Engineering Lab
-------------------------------------------------------------
• % Author : Engr. Adnan Rasheed
• % Date : xxxxxxxx
• % Lab No. :5
• % Class : BEMTS VI (A & B)
• % File name : opentach.m
• % Description : The function implements the speed tachometer example.
• %------------------------------------------------------------------------------------- % Define Tachometer control system parameters
• Ra = 1; Km = 10; J= 2; b = 0.5; Kb = 0.1; Ka = 54; Kt = 1;
• num1 = [1]; den1 = [J b]; % Define G(s)= 1 / Js+b
• num2 = [Km*Kb/Ra]; den2 = [1]; % Define H(s) = Km*Kb/Ra
• [num,den] = feedback(num1,den1,num2,den2); % Find the T(S)= w(s) / Td(s)
• num = -num % Change the sign of T(s) since Td(s) is negative
• printsys(num,den); % print the final T(S)
• [step_resp,x,t] = step(num,den); % Compute response to step disturbance
• figure plot(t,step_resp); % plot step response
• title('Open-loop Disturbance Step Response');
• xlabel('time[sec]'); ylabel('speed'); grid;
• Final_val = step_resp(length(t)) % Find steady-state error, last value of output
• %-------------------------------------------------------------------------------------
•% End Function
• %-------------------------------------------------------------------------------------
5.2.3 MATLAB Code for the Open-loop without tachometer feedback
of the above example (Case-I)
The resulting system reduced to the following taking step Td(s):