Vous êtes sur la page 1sur 7

From the main problem, the dynamic equations in state-space form are given below.

(1) (2) he above has the form of a standard set of state-space equations as described below. (!) (") For the original problem setup and the derivation of the above equations, please refer to the #$ %otor &osition' (ystem %odeling) page *ith a 1-radian step reference, the design criteria are the following. (ettling time less than +.+"+ seconds ,vershoot less than 1-. /o steady-state error, even in the presence of a step disturbance input First create a new m-file) and type in the following commands (refer to main problem for the details of getting these commands). 0 1 !.222"3--4 b 1 !.5+663--4 7 1 +.+26"4 8 1 "4 9 1 2.653--4 : 1 ;+ 1 + + -b<0 7<0 + -7<9 -8<9=4 > 1 ;+ 4 + 4 1<9=4 $ 1 ;1 + +=4 # 1 +4 motor?ss 1 ss(:,>,$,#)4

Designing the full state-feedback controller


(ince all of the state variables in our problem are very easy to measure (simply add an ammeter for current, a tachometer for speed, and a potentiometer for position), we can design a full-state feedbac@ controller for the system without worrying about having to add an observer. he control law for a fullstate feedbac@ system has the form u 1 r - Kc x. he associated bloc@ diagram is given below. 8ecall that the characteristic polynomial for this closed-loop system is the determinant of sI(A-B*Kc) where s is the 9aplace variable. (ince the matrices A and B*Kc are both !A! matrices, there should be ! poles for the system. his fact can be verified with the %: 9:> command order. Bf the given system is controllable, then by designing a full state-feedbac@ controller we can move these three poles anywhere weCd li@e. *hether the given system is controllable or not can be determined by chec@ing

the ran@ of the controllability matriA ; B AB A^2B ...=. he %: 9:> command ctrb constructs the controllability matriA given A and B. :dditionally, the command ran@ determines the ran@ of a given matriA, though it can be numerically unreliable. herefore, we will use the command det to calculate the determinant of the controllability matriA where a full ran@ matriA has a non-Dero determinant. he following commands eAecuted at the command line will verify the systemCs order and whether or not it is controllable. sys?order 1 order(motor?ss) determinant 1 det(ctrb(:,>)) sys?order 1 ! determinant 1 -!."-!-eE2" From the above, we @now that our system is controllable since the determinant of the controllability matriA is not Dero and hence we can place the systemCs closed-loop poles anywhere in the s-plane. *e will first place the poles at -2++, -1++E1++i and -1++-1++i. >y ignoring the effect of the first pole (since it is faster than the other two poles), the dominant poles correspond to a second-order system with zeta 1 +.5 corresponding to +.1-. overshoot and sigma 1 1++ which corresponding to a settling time of +.+"+ seconds. ,nce we have determined the pole locations we desire, we can use the %: 9:> commands place or ac@er to determine the controller gain matriA, Kc, to achieve these poles. *e will use the command place since it is numerically better conditioned than ac@er. Fowever, if we wished to place a pole with multiplicity greater than the ran@ of the matriA B, then we would have to use the command ac@er. :dd the following code to the end of your m-file. p1 1 -1++E1++i4 p2 1 -1++-1++i4 p! 1 -2++4 7c 1 place(:,>,;p1, p2, p!=) 7c 1 +.++1! -+.+26" -!.GG2G 8eferring bac@ to the equations and schematic at the top of the page, we see that employing a statefeedbac@ law u 1 r - Kc x, the state-space equations become the following. (5) (-) *e can generate the closed-loop response to a step reference by adding the following lines to the end of your m-file. 8un your m-file in the command window and you should generate a plot li@e the one shown below. t 1 +'+.++1'+.+54 sys?cl 1 ss(:->H7c,>,$,#)4 step(sys?cl,t)

/ote that our given requirements are not met, specifically, the steady-state error is much too large. >efore we address this, letCs first loo@ at the systemCs disturbance response.

Disturbance response
Bn order to observe the systemCs disturbance response, we must provide the proper input to the system. Bn this case, a disturbance is physically a load torque that acts on the inertia of the motor. his load torque acts as an additive term in the second state equation (which gets divided by J, as do all the other terms in this equation). *e can simulate this simply by modifying our closed-loop input matriA, B, to have a 1 < J in the second row assuming that our current input is only the disturbance. :dd the following lines to your m-file and re-run. dist?cl 1 ss(:->H7c,;+4 1<0 4 +=, $, #)4 step(dist?cl,t)

/otice that the error due to the step disturbance is non-Dero. herefore, this will also need to be compensated for.

Adding integral action


From prior eAamples, we @now that if we put an eAtra integrator in series with the plant it can remove the steady-state error due to a step reference. Bf the integrator comes before the inIection of the disturbance, it will also cancel a step disturbance input in steady state. his changes our control structure so that it now resembles the bloc@ diagram shown in the following figure. *e can model the addition of this integrator by augmenting our state equations with an eAtra state for the integral of the error which we will identify with the variable w. his adds an eAtra state equation, where the derivative of this state is then Iust the error, e = y - r where y = theta. his equation will be placed at the bottom of our matrices. he reference r, therefore, now appears as an additional input to our system. he output of the system remains the same. (6) (2) (G)

hese equations represent the dynamics of the system before the loop is closed. *e will refer to the system matrices in this equation that are augmented with the additional integrator state as Aa, Ba, Ca, and Da. he vector multiplying the reference input r will be referred to as Br. *e will refer to the state vector of the augmented system as xa. /ote that the reference, r, does not affect the states (eAcept the integrator state) or the output of the plant. his is eApected since there is no path from the reference to the plant input, u, without implementing the state-feedbac@ gain matriA Kc. Bn order to find the closed-loop equations, we have to loo@ at how the input, u, affects the plant. Bn this case, it affects the system in eAactly the same manner as in the unaugmented equations eAcept now u 1 -Kc x - Ki w. *e can also rewrite this in terms of our augmented state as u 1 -Ka xa where Ka 1 ; Kc Ki =. (ubstituting this u into the equations above provides the following closed-loop equations. (1+) (11) Bn the above, the integral of the error will be fed bac@, and will result in the steady-state error being reduced to Dero. /ow we must redesign our controller to account for the augmented state vector. (ince we need to place each pole of the system, we will place the pole associated with the additional integrator state at -!++, which will be faster than the other poles. :dd the following lines to your m-file which reflect the closed-loop equations presented above. /ote that since the closed-loop transition matriA Aa-Ba*Ka depends on Ba, it will be used in the place command rather than Br. 8unning your m-file will then produce the plot shown below. :a 1 ;+ 1 + + + -b<0 7<0 + + -7<9 -8<9 + 1 + + +=4 >a 1 ;+ 4 + 4 1<9 4 + =4 >r 1 ;+ 4 + 4 +4 -1=4 $a 1 ;1 + + +=4 #a 1 ;+=4 p" 1 -!++4 7a 1 place(:a,>a,;p1,p2,p!,p"=)4 t 1 +'+.++1'.+54 sys?cl 1 ss(:a->aH7a,>r,$a,#a)4 step(sys?cl,t)

o observe the disturbance response, we use a similar approach to that used without the integral action. dist?cl 1 ss(:a->aH7a,;+ 4 1<0 4 +4 +=,$a,#a)4 step(dist?cl,t)

*e can see that all of the design specifications are close to being met by this controller. he settle time may be a little large, but by placing the closed-loop poles a little farther to the left in the compleA splane, this requirement can also be met.

Vous aimerez peut-être aussi