SOUTHERN TAIWAN UNIVERSITY OF SCIENCE AND TECHNOLOGY Department of Mechanical Engineering Final Project of Modern Control Theory: DC Motor Name: Jeffrey Levin Student ID: MA11Y207 Adviser: Prof. Yung-Peng Wang February 15, 2015 1. Model Description A DC motor with the equivalent electric circuit of the armature and the free body diagram of the rotor is shown in the figure below: The differential equations for the systems are: J mm (t ) bm (t ) K t ia (t ) dia (t ) La dt Raia (t ) va (t ) K e m (t ) Assume the parameters' values are: J m 0.01 kg m 2 b 0.001 N m sec K t 0.02 N m/A K 0.02 V sec e Ra 10 Ω La 0.01 H Input and output for the following system are: Input (u ) = v a (t ) . Output ( y ) = q m (t ) ,q m (t ) , i a (t ) Let, x1 ( t ) = q m ( t ) . x 2 (t ) = q m (t ) x3 (t ) = i a (t ) So that, . x (t ) = x (t ) K b x (t ) = - J x (t ) + J 2 1 . t 2 2 m Ke . x (t ) = - L 3 a x3 (t ) m x 2 (t ) - Ra 1 x 3 (t ) + v a (t ) La La The state space equations for the DC motor system are: . x - ì ï ï ï =í ï ï ï î q m (t ) .. q (t ) i (t ) m a ì ï ï ï t =í ï ï ï î y( ) - . ü é ï ê 1 ï ê 0 ê ï ý =ê 0 - b Jm ï ê ï ê K ï ê 0 - e La þ êë ùì úï úï 0 úï Kt úí J m úï úï R úï - a La úûî ü ì ï t q m ( ) ï é 1 0 0 ùïï . úï ï ê t = 0 1 0 ý ê úí ( ) qm ï ê 0 0 1 úï ûï ï ë t ( ) ia ï ï þ î ü t q m ( ) ïï éê 0 ùú . ï ê ú t + 0 ý ( ) ê úv a ( t ) qm ï ê 1 ú ï ê L i a (t ) ï ë a úû þ ü t q m ( ) ïï é 0 ù . ú ï ê t + 0 ý ê ( ) q m ï ê úúva (t ) 0 û ï ë t ( ) ia ï þ Input the parameters' values to the state space equations, such that: . x - ì ï ï ï =í ï ï ï î q (t ) q (t ) m .. m i (t ) a ì ï ï ï t =í ï ï ï î y( ) - . ü ì ï ï ù ï é 0 ï 1 0 úï ï ê 2 ý = ê 0 -0.1 úí ï ê 0 -2 -1000 úï ûï ï ë ï ï þ î q (t ) q (t ) m . m i (t ) a ü ì ï ï ï é 1 0 0 ùï úï ï ê ý = ê 0 1 0 úí ï ê 0 0 1 úï ûï ï ë ï ï þ î q (t ) q (t ) m . m i (t ) q (t ) q (t ) m . m i (t ) a a ü ï ï é 0 ù ú ï ê ý + ê 0 úv a t ï ê 100 ú û ï ë ï þ () ü ï ï é 0 ù ú ï ê ý + ê 0 úv a t ï ê 0 ú û ï ë ï þ (1) () Compute the A,B,C and D matrices from Equation 1 to MATLAB in order to get the transfer function of the system. The MATLAB's commands are: >> [b,a]=ss2tf(A,B,C,D) From MATLAB computation, the transfer functions are: é 200 ê 3 ê s +1000.1s 2 +104 s ê 200 s G s =ê 3 2 ê s +1000.1s +104 s ê 100 s 2 +10 s ê 3 2 ë s +1000.1s +104 s () ù ú ú ú ú ú ú ú û 2. Open-loop System Analysis Eigenvalues The eigenvalues of matrix A, can easily be found in MATLAB eig command: >> lambda= eig(A) thus, the eigenvalues of the system are: lambda = 0 -0.1040 -999.9960 Poles Poles are the roots the system's transfer function denumerator. In MATLAB, the command to find the roots of the denumerator is roots (d), where d is the denumerator. In this case, d = [1 1000.1 104 0]. >> roots (d) ans = 0 -999.9960 -0.1040 Stability From the stability theory (Theorem 5.4), "the state space equation is marginally stable if and only if all eigenvalues of A matrix have zeros or negative real parts and those with zero real parts are simple roots of the minimal polynomial of A matrix". One of the eigenvalues of the A matrix is equal to zero and the others are negative real parts, thus the system is marginally stable. Controllability For LTI system, a system is controllable if and only if the controllability matrix "W" has full rank (i.e. rank (W) = n, where n is the number of states). In order to compute the controllability matrix for the state space system, ctrb command was used. rank computes the rank of a matrix. >> W = ctrb (A,B) W= 0 0 0 200 100 200 -200020 -100000 99999600 >> rank (W) ans = 3 From the results above, controllability matrix "W" has full rank of 3, where the number of states in our system also 3. Thus, the system is controllable. Observability For LTI system, a system is observable if and only if the observability matrix "OB" has full rank equals to n, where n is the number of states. The observability matrix of an LTI model and its rank can be determined in MATLAB using obsv and rank. >> OB = obsv (A,C) OB = 1.0e+05 * 0.0000 0 0 0 0.0000 0 0 0 0 0.0000 0.0000 0 -0.0000 0 0.0000 0 -0.0000 -0.0100 0 -0.0000 0.0000 0 -0.0000 -0.0200 0 0.0200 10.0000 >> rank (OB) ans = 3 Computation results exhibit the rank of the observability matrix "OB" is equal to the number of states, which are 3. Based on this, the system is observable. Simulations By using Simulink software, we can observe the behavior of the system, in this case motor position, motor speed and currrent. Figures below are the block diagram of the system and the state space block parameters: The block diagram used a constant input and the value was 1. The figures below are the output of system in relation with time: Next, the constant input was change to sine wave, with parameters as follow: The behavior of the system is like the pictures below: 3. Close-loop System Analysis For close-loop system, the gain need to be considered into the system, thus effect the state space equation. The gain values are 0.5, 1, and 2. The feedback gain is given by: ( v a (t ) = K q r ( t ) - q m ( t ) ) Substitute the equation above to the state space equation, thus the new state space equation becomes: x = (éë A ùû - éëB ùûéëK ùû) x + éë B ùûéë K ùûq . - r Eigenvalues, Poleas and Stability The new A matrix for the system is: é AA ù = é A ù - é B ùé K ù ë û ë û ë ûë û The new A matrix and eigenvalues for each gain are: K 0.5 [A] Matrix é 0 ù 1 0 ê ú é AA 1ù = ê 0 -0.1 2 ú ë û ê -50 -2 -1000 ú ë û Eigenvalues 1.0e+02 * -10.0000 + 0.0000i -0.0005 + 0.0031i -0.0005 - 0.0031i 1 é 0 1 0 ù ê ú é AA 2ù = ê 0 -0.1 2 ú ë û ê -100 -2 -1000 ú ë û 1.0e+02 * -10.0000 + 0.0000i -0.0005 + 0.0044i -0.0005 - 0.0044i 2 é 0 ù 1 0 ê ú é AA 3ù = ê 0 -0.1 2 ú ë û ê -200 -2 -1000 ú ë û 1.0e+02 * -10.0000 + 0.0000i -0.0005 + 0.0063i -0.0005 - 0.0063i 100 é ù 0 1 0 ê ú é AA 4ù = ê 0 0 2 ú ë û ê -10000 -2 -1000 ú ë û 1.0e+03 * -1.0000 + 0.0000i -0.0000 + 0.0045i -0.0000 - 0.0045i The eigenvalues of matrix AA is the pole of the system. From all K values (0.5, 1, 2, 100), the eigenvalues have real part <0. Therefore, it is concluded that the close-loop system is BIBO stable. From the variation of the eigenvalues from the table above, it is not clear the difference between them until the K value increased to 100. When K values are increased the real part of eigenvalues also increased ( from -0.05 to -0.00). Thus, the system is more unstable if the K values were increased. Simulation The close loop system of DC motor will be simulated in Simulink with different feedback gain (0.5, 1, 2, 100) to see the effect of K on the behavior of the system. The block diagrams, which were built in the Simulink is shown below. K Value 0.5 1 System Response 2 100 * Yellow curve describes the motor position. Purple curve describes the motor velocity. The blue curve describes the current in circuit. Figures above exhibit the effect of the K in the A matrix on the response of the system. The response of the system becomes a dynamic response. If K value was increased, the system will be very unstable (K = 100). The peak time of the motor position will be faster when K values were increased. Now, we changed the source signal with a sine wave with amplitude is 1 and sample time is 1. K value 0.5 1 System Response 2 100 * Yellow curve describes the motor position. Purple curve describes the motor velocity. The blue curve describes the current in circuit. 4. Conclusions 1. Open loop system By using MATLAB, we can easily check the eigenvalues, poles, stability, controllability and observability of a system. By typing lambda = eig (A) and root (d); where d is the denumerator of the system's transfer function, we can check the eigenvalues and poles of a system. If the real part of eigenvalues is lower or equal to zero, the system is stable. If the real part of eigenvalues is above zer, the system is unstable. In this study, one of the eigenvalues is equal to zero. Based on Theorem 5.4, it is concluded that the open loop system is marginally stable. The controllability and observability of a system can be checked easily by using the ctrb (A*B) and obsv (A*C), respectively. These commands will compute the controllability and observability matrix. In case the rank of the controllability and observability matrix are the same with the number of state, the system is controllable and observable. The simulation in the open loop system showed that when the input signal was constant, the output response was increased in relation with time. When the input signal was sine wave, the output response value will go up and down between a certain value like a sine wave. 2. Close loop system Feedback gain (K) values were considered to analyze the behavior of a close loop system. As a result, the A matrix from this system is different compared to the open loop system. The K values were 0.5, 1, 2, 100. For the eigenvalues, all of the K values will have negative real part, thus the system is BIBO stable. The bigger the K value, the more unstable the system will be. It is proved by the increasing values of the eigenvalues' real part every time the K value was increased. On simulation part, with constant input and sine wave input, when K values were increased, the peak time and rise time were decreased. The bigger the K values, the system will become more unstable.
© Copyright 2024 Paperzz