INTRODUCTION TO AUTOMATIC CHAPTER 1: CONTROL SYSTEM Control system: Subsystems and processes (or plants) assembled for the purpose of obtaining a desired output with desired performance. Input: stimulus Desired response Control system Output: response Actual response Examples: In nature pancreas regulating our blood sugar. A motor speed controller regulating the speed to the desired amount. OPEN LOOP AND CLOSED LOOP CONTROL SYSTEMS Open-loop: the system gives an output based on pre-determined relationship between the output and input. OR simply is not dependent on the output “no feedback”. Example: Automatic dish washer Input Advantages • Simple design • Cheap Control System output Dis-advantages • Can not eliminate the effect of disturbances. • Can not be used for systems requiring higher accuracy. OPEN LOOP AND CLOSED LOOP CONTROL SYSTEMS Closed-loop: the system gives an output based on not only pre-determined relationship between the output and input but also every time checks whether the output is in desired range. OR simply is dependent on the output “feedback”. Are self-correcting. Examples: Walking man (eyes open), tracking systems Control System Input Advantages • Able to reject disturbances • More accurate Dis-advantages • Complex. • Expensive. output MATHEMATICAL MODELLING OF CHAPTER 2: PHYSICAL SYSTEMS Mathematical modelling: representation of Electrical networks physical systems mathematically which make Voltage source =i = = ∫id them easy for computation and simulation Current source i = purposes. Mathematical modelling of Mechanical systems Translational: F=ma=Bv=kx Rotational: T=Jα=Bω=kθ Analogy F-V F-I = ∫ d = MATHEMATICAL MODELLING OF MECHANICAL SYSTEMS: TRANSLATIONAL ∑ B Damper B k Spring k m = F-Fb-Fs=ma Where: F=ma-Fb-Fs F-applied force F=ma+Bv+kx Fb-force by damper F=m Mass m +kx Fs-force of spring a-acceleration F=m F = Force F +B = +Bv+k ∫ d d d = d d Or d = v- velocity x- displacement d MECHANICAL TRANSLATIONAL k k1 B1 x1…. CONT.… m1 k2 x1…. m1 L1 L2 B12 B x2….. m2 F x2….. m2 F MATHEMATICAL MODELLING OF MECHANICAL SYSTEMS: ROTATIONAL ∑ k J = α T-Tb-Ts= α T Where: T=Jα+Tb+Ts T-applied torque F=Jα+Bω+kθ Tb-torque resistance by damper B T=J +B +kθ Ts-torque resistance by spring α-angular acceleration ω- angular velocity = Or θ= ∬ α d = ∫ ω d α= θ- angular displacement MECHANICAL ROTATIONAL CONT.… k1 J1 B1 J2 k12 ϴ1 T ϴ2 J2 T N2 k1 B2 J1 = = N1 B1 ELECTRICAL NETWORKS R L i C iR iL R L i v v = v= i + + + i= + ∫id F-v R-B L-m F=m − + i= -B C + +Bv+k ∫ d F-i iC -k C-m 1 + 1 d + d d ANALOGOUS CIRCUITS Find f-v, f-i and draw circuit x1…. k k1 B1 m1 k2 x1…. m1 L1 L2 B12 B x2….. m2 F x2….. m2 F ELECTROMECHANICAL SYSTEMS Ra JL La eb= kbω N2 Tm=ktia ia ea N1 eb Tm, θ TRANSFER FUNCTIONS Transfer function: a mathematical equation that relates input of a function to the output [ { } ]. { } 1. The equation is derived after converting the function into Laplace domain 2. All initial conditions are zero 3. Works only for linear functions BASIC LAPLACE TRANSFORM TABLE Time domain Laplace domain u(t) step input 1 tu(t) 1 s2 ! tnu(t) e-atu(t) d ( ) f(t)±g(t) sn+1 1 s+a ( ) s snF(s) F(s)±G(s) FIND TRANSFER FUNCTION For the mechanical system given above find transfer function a. Input force to displacement 1 (x1) b. Input force to displacement 2 (x2) k1 B1 R x1…. m1 L C k2 i v B12 x2….. m2 Voltage input to the system to voltage at capacitor F SIMPLIFYING MULTIPLE SUBSYSTEM BLOCK DIAGRAM REDUCTION Forward path G1(s) Takeoff point R(s) G2(s) Summing point C(s) G3(s) Feedback path Block BLOCK DIAGRAM REDUCTION Block diagram R(s) R(s) Transfer function G(s) C(s) G1(s) R(s) R(s) ± G2(s) G(s) H(s) ± ( ) ( ) G(s) C(s) G2(s) G1(s) CONT.… G1(s)G2(s) Series blocks G1(s)±G2(s) Parallel blocks G( ) 1 ∓ H s G( ) feedback C(s) C(s) BLOCK DIAGRAM REDUCTION MOVING TAKEOFF POINT G3 G1 G3/G1 G2 G1 G3 G1 G2 G2 G1G3 G1 G2 BLOCK DIAGRAM REDUCTION MOVING SUMMING POINT G3/G2 G3 G1 G2 G1 G3 G1 G2 G2G3 G2 G1 G2 BLOCK DIAGRAM REDUCTION examples H1 G6 R(s) G1 G2 G3 G5 G4 C(s) SIGNAL FLOW GRAPH (SFG) i 1 a 2 b 3 j c 4 d 5 e 7 f k 8 g 9 h 10 m m • Node: a point where a path start or stop (i.e. 1, 2, 3…) • Touching loop: loops having common node • Path gain: value on arrow (i.e. a, b, c…) • Non-touching loop: loops without common node. • Loop: start and sink on same node. • Dummy node: a path with gain equal to 1. • Self loop:- start and sink on same node without intermediate nodes SIGNAL FLOW GRAPH REDUCTION e j f a b k c d a b c d g = k= ef + ab + hg d= c(ef + ab + hg) f k h d= kc e ℎ( + ) 1− g h i SFG Masons Gain Formula(MGF) 9 = 5 = ∑ Δ Δ Pi-gain of the ith forward path N- total number of forward paths ∆= 1 - ∑ loop gains + ∑ nontouching-loop gains taken two at a time + ∑ nontouching-loop gains taken three at a time – ∑ nontouching-loop gains taken four at a time … ∆i= value of ∆ after eliminating all the loops that touch its forward path. G9 R(s) G1 G2 G10 G3 G4 G5 H1 G6 G7 G9 H2 G8 C(s) BD TO SFG Convert into SFG and find gain using MGF H1 G6 R(s) G1 G2 G3 G5 G4 C(s) CONTENTS Feedback and its properties Stability Time response Experimental determination of transfer function First order system response Controllers Second order system response Physical realization of controllers Steady state error Simulation of Mechanical Control Systems Using SIMULINK By: Chalachew W. FEEDBACK AND ITS PROPERTIES A control system mainly categorized into open and closed loop systems. Closed loop systems use plant response(output) for determining appropriate control action from controller. These closed loop systems are also called feedback controllers. A controller with a feedback may affect properties like Parameter variation: variation of parameters which are expected (i.e. working domain). Overall gain: the magnitude in which the input is multiplied. Disturbance: parameter variation which is unexpected. Sensitivity: the amount of deviation on a parameter caused by deviation in another parameter. Stability: response of a system to be in a given band (BIBO). Time constant: time required the system response to reach 63% of final/desired output. PARAMETER VARIATION For a given system with input R(s), output C(s) and parameter G(s). So transfer function (i.e. tf=C(s)/R(s)) becomes G(s). R(s) G(s) For closed loop R(s) G(s) C(s) tf = G(s) 1 − G s H(s) tf = G s + ∆G(s) 1 − [G s +∆G(s)]H(s) H(s) C(s) R(s) G(s)+∆G(s) What will be the new tf if G(s) becomes C(s) H(s) G(s)+∆G(s) tf = For open loop ( ) ∆G(s) ( ) For G(s)>>∆G(s) tf=G(s)+∆G(s) R(s) + + G(s)+ ∆G(s) C(s) From this we can conclude parameter variation has less effect on closed loop system than open loop system. OVERALL GAIN Open loop tf=G(s) Closed loop Generally closed loop system has smaller over all gain. DISTURBANCE Disturbance on open loop system Disturbance on a closed system may occur on D(s) R(s) ( ) = ( ) G1(s) G2(s) G2(s) C(s) a. b. c. Forward path Output or Feedback path To study the effect of disturbance we remove the input and examine the response caused by the disturbance DISTURBANCE ON FORWARD PATH D(s) D(s) R(s) G1(s) G2(s) G2(s) C(s) C(s) G1(s) H(s) H(s) Making the input zero C(s) G2(s) = (s) 1 − G1(s)G2(s)H(s) DISTURBANCE ON OUTPUT D(s) D(s) R(s) G1(s) C(s) C(s) G1(s) H(s) H(s) Making the input zero C(s) 1 = (s) 1 − G1(s)H(s) DISTURBANCE ON FEEDBACK PATH R(s) R(s) G(s) H1(s) G(s) C(s) H2(s) H1(s) H2(s) D(s) C(s) H1(s)G(s) = (s) 1 − H1(s)H2(s)G(s) From these equations we can conclude that closed system less affected by disturbance. C(s) SENSITIVITY How much is the impact of variation in parameter ‘b’ on parameter ‘a’. = ⋅ ( ) a= Effect of variation of forward path gain on overall transfer function on open loop. a=G(s) ( ) = = b=G(s) = Effect of variation of forward path gain on overall transfer function on closed loop. ⋅ = ( ) ( ) ⋅ ( ) =1x1=1 ( ) ( [ ) ; b=G(s) ]⋅ ( ) [ ] ( ) So, closed loop systems are less sensitive than open loop systems. STABILITY AND TIME CONSTANT In general, if properly designed closed loop systems can improve both stability and time constant. For stable open loop system making it closed loop may affect the system negatively (i.e. may become unstable.) TIME RESPONSE Transient/natural response, and die out as time goes. lim → Steady state /forced response, transient response die out. Total response C(t)= : response of the system as the input is applied =0 : response of a system which remain after + Order: Order (i.e. highest degree) of differential equations(denominator after cancelling common factors in the numerator) describing the system. For system equation represented with numerator and denominator zeros of numerator is called zeros of the system and zeros of denominator is called poles of the system. FIRST ORDER SYSTEM RESPONSE Time constant: time in which the response reaches 63% of the final value. Let G(s) first order system with tf G(s)= and R(s)= (i.e. unit step input) Output C(s)=R(s)G(s)= . The maximum possible value of c(t) is 1 which is the final value and 63% becomes 0.63. 1-e e C(s)= . = + =>A=1, B=-1; C(s)= − c(t)=1-e =0.63 = 0.37 e = - t=-0.994 taking inverse Laplace transform t≈ 1/ 0.37 OPEN VS CLOSED LOOP TIME CONSTANT R(s) C(s) Comparing & = k C(s)=R(s). C(s)= . C(s)= − t= = ; ; b= ; − = ( ) ; > 1, ℎ . FIRST ORDER SYSTEM RESPONSE Rise time ( ): time taken for the system to reach 10%-90% of the final output. 1-e =0.9 = 1-e 1-e . = =0.1 = = Settling time ( ): time taken the output to reach and stay ±2% of final output for the first time. . − = . − . = . =0.98 SECOND ORDER SYSTEM RESPONSE General second order system - natural frequency – damping constant Find natural frequency and damping constant of a. b. ( ) , if ( ) f t = 27 ( ), M = 3, fv =6, K=27 G(s)=s2+4.2s+36 CLASSIFICATION OF 2 ND ORDER SYSTEM USING DAMPING RATIO = 1− SECOND-ORDER UNDER DAMPED RESPONSE SPECIFICATIONS SECOND-ORDER SYSTEM RESPONSE SPECIFICATIONS UNDERDAMPED lim → STEADY STATE ERROR e ∞ =lim → = ∞ = lim → R(s) =lim 1+G(s)H(s) → Steady state error: error of a system as time approaches to infinity. Determine order and type of G(s) then find steady state error for system with E(s)=R(s)-H(s)C(s) a. 1 G(s)=s+2, H(s)=0 b. 1 G(s)=s+2, H(s)=1 c. 1 G(s)=s(s+2) , H(s)=1 d. G(s)= C(s)=E(s)G(s) E(s)=R(s)-E(s)G(s)H(s) E(s)(1+G(s)H(s))=R(s) R(s) E(s)=1+G(s)H(s) 1 , H(s)=1 (s+2) For step, ramp and parabolic input RELATIONSHIP BETWEEN INPUT, SYSTEM TYPE, STATIC ERROR CONSTANTS AND STEADY STATE ERRORS STABILITY OF CONTROL SYSTEM Stability and transient response of a system affected by location of closed loop poles in s-plane. Routh-Hurwitz: tells us number of poles on the right half s-plane. Root-Locus: shows graphically the movement of poles on s-plane for different parameter k. As the parameter changes If the pole goes to the right the system is becoming unstable. If the pole goes to the left the system is becoming more stable. ? ROUTH-HURWITZ STABILITY CRITERION How can I know a pole lie on RHP ROUTH-HURWITZ STABILITY CRITERION CONT.… s4 a4 a2 a0 The necessary and sufficient condition the system to be stable is there SHOULD NOT BE any sign change in the first column. s3 a3 a1 0 If there is any sign change s2 b1 b2 0 s1 c1 0 0 The system is unstable. The number of sign change shows the number of poles in the RHP. s0 d1 0 0 If there is zero The system is marginally stable. OPEN VS CLOSED LOOP STABILITY R(s) C(s)= C(s)= Closed loop 1 1 C(s) k C(s)= Open loop ; ; closed loop ; open loop - k - k For >0; the system is stable If >0; to be the system stable k should be less than 1 (i.e. k<1); ROUTH-HURWITZ STABILITY CRITERION Check stability of a system given by 1. G(s)= 2 and H(s)=0.3; s +4s+2 2. ( ) = ( ) s3 3. ( ) = ( ) s5+3s4+3s3 +6s2+5s+3 4. ( ) = ( ) s5+2s4+3s3 +6s2+5s+3 +5s2+10s+2 CONT.… SPECIAL CASES OF ROUTH-HURWITZ 1. Zero in the first column of row Check stability of the system a. Substitute with small number ε: check for sign change for positive and negative ε. b. 2. a. ( ) = ( ) s5+2s4+3s3 +6s2+5s+3 b. ( ) = ( ) s5+7s4+6s3 +42s2+8s+56 Reverse coefficients: reverse coefficients of the polynomial. Row of zero Use coefficients of auxiliary polynomial. Auxiliary polynomial is derivative of the polynomial just above row zero NB: In these cases the system never become stable but it can be marginally stable. DESIGN USING ROUTH-HURWITZ Finding the range of ‘gain’ in which the given system can be stable. Find value of k in which the system a. G(s)=s(1+0.5s)(1+0.5s) and H(s)=0.2 b. G(s)=s(1+0.6s)(1+0.4s) and H(s)=0.3 i. To be stable ii. To be marginally stable, how much is its’ frequency of sustained oscillation EXPERIMENTAL DETERMINATION OF TRANSFER FUNCTION Approximated to 1st or 2nd order system Some parameters need to be collected using sensors. 1st order system: G(s)=s+a Whose step response is / / C(s)=s(s+a) = s - s+a The collected data plotted with time to determine the transfer function. C(t)=a (1- ) C(ꝏ)=a If we get the time constant from experiment we can easily determine the transfer function. EXPERIMENTAL DETER… CONT.… 2nd order system: Percent overshoot and settling time used for determining denominator or poles of the transfer function. NB: In both cases the system should settle to some final value. CONTROLLERS We can alter system dynamics (parameters) to Commonly used industrial controllers meet the required responses but sometimes are:- this cannot be done because of several ON-OFF reasons. Proportional Proportional-Derivative (PD) At this time we need to use controllers. Proportional-Integral (PI) Proportional-Integral-Derivative (PID) CONTROLLERS CONT.… Water level controller is used as an example in this topic. The in flow amount controlled by a servo motor based on the set point. The out flow is uncontrolled. The deviation of the water level from set point (desired level) is error signal which is going to feed the controller. The controller turns the servo to open and close the tap based on the error amount. The angle movement is from 0⁰(fully closed), 45⁰(half open) 90⁰ (fully open). Assumption: Negative error(0⁰)_Zero error(45⁰)_Positive error(90⁰) ON-OFF CONTROLLER This two position works as a switch, Dead band is introduced to prevent chattering If the level is below set point, tap is fully open. effect If the level is on and above set point, tap is fully Dead band a range of values below or above set closed. Solenoid operated valves and relays are ONOFF type controllers Even though, these controllers are simple and economical they are not suitable for complex systems. point in which the controller take no action. PROPORTIONAL The control action is proportional to the present error. u=Kp x e If the error is about negative the tap turns toward 0⁰. If the error is about positive the tap turns toward 90⁰ Make the system responds faster . The motion is continuous. May not eliminate steady state error. INTEGRAL The control action is proportional to summation of the past errors. u=Ki ∫ e d U(s)= E(s) If the error was more positive, most likely the tap remain open. If the error was more negative, most likely the tap remain closed. Eliminate steady state error. DERIVATIVE The control action is proportional to rate of change of the error. Dependent on the trend of the error rather than current condition. u=Kd U(s)=sKd x E(s) If the error rate is positive, the tap should be more open. If the error is negative, the tap should be more closed. Derivative controller does not used alone. Reduce oscillation so reduces settling time PROPORTIONAL INTEGRAL (PI) Combination of proportional and integral controllers. u = Kp ∗ e(t) + Ki ∫ e d So make the response faster without offset. There may be oscillation. PROPORTIONAL DERIVATIVE (PD) Proportional and derivative controllers are combined. u(t)= ∗ + () So the system is faster and have less overshoot. PROPORTIONAL INTEGRAL DERIVATIVE (PID) Combines the three controllers and their advantages. PID controller is assumed to have faster response, no steady state error, small overshoot, less settling time and oscillation. u t = Kp ∗ e t + Ki e d + d ( ) d PHYSICAL REALIZATION OF INDUSTRIAL CONTROLLERS USING OPAMP Proportional Eo R2 =− Ei R1 Integral =− Derivative =− (sCR1+1) PID =− ( )( ) Physically these controllers can be tuned by using variable resistor. Varying the value of the resistor will alter the gain value. TUNING PID CONTROLLER ZIEGLER-NICHOLS RULE METHOD 1 There are two tuning methods in Ziegler-Nichols tuning rules. u t = Kp ∗ e t + Ki ∫ e(t) d + ( ) Method 1: Used for a system exhibits s-shaped response for step input. Type of Controller P Kp T L PI Ki Kd 0 0 0.9 T L T 0.3 0.9 ∗ L L 1.2 T L T 1 1.2 ∗ L 2L PID 0 0.6 TUNING PID CONTROLLER ZIEGLER-NICHOLS RULE METHOD 2 First find critical gain (Kcr): Gain at which the system exhibits sustained oscillation with Ki and Kd zero. Critical period (Pcr): Period of the system at critical gain. Type of Controller Kp Ki Kd P 0.5Kcr 0 0 PI 0.45Kcr PID Kcr Pcr 0 3.6 Kcr Pcr 0.075Kcr*Pcr 1.2 0.6Kcr