CHAPTER 4: CONTROLLER DESIGN AND SIMULATION RESULTS
4.3 INPUT-OUTPUT LINEARIZATION
Given the system (4.31) below
(4.31)
is the desired output from the physical system. The aim of input-output linearization (4.31) is to obtain a state feedback control law " " , that linearizes the map between the system output " "
and a certain virtual control input " " through the state transformation constituted of the output and its derivatives with respect to time up to the order " ", where " " is the relative degree of the input-output linearized system. If r is less than the order " " of the nonlinear system, then the nonlinear system is only partially feedback linearized and therefore consists of a feedback linearized system controllable by the virtual linear control " " and an
37 system hence the internal dynamics is uncontrollable by the virtual control. The internal dynamics must therefore be stable for the nonlinear system to be stabilizable by the feedback linearized virtual control " ". However, for an unstable internal dynamics, an input-state linearization must be done if possible or a way to deal with the unstable zero dynamics designed for input output linearization to be applied. Input-output linearization becomes input- state linearization if the relative degree is equal to the order of the system.
To design an input-output(angle) linearization control for the output in (4.33) above, we differentiate repeatedly until appears as shown below:
. Where . and are designed by pole
38
placement using the characteristic equation and the linearizing control action is:-
. (4.34) The relative degree of the feedback linearized system is and therefore an internal dynamics of
order exists. To analyze the stability of the internal dynamics is computationally intensive and therefore the zero dynamics would be analyzed instead. The zero dynamics occurs when the linearized states have been driven to zero by . The zero dynamics is therefore given as:
, .
It can be seen that the zero dynamics has two poles at the origin and is therefore unstable. A simulation of this controller is shown to confirm the instability of the zero dynamics as shown in figure 4.2 below.
Figure 4.3: Input-Output Linearization with Pendulum angle as output and unstable zero dynamics(cart)
As a result of the unstable zero dynamics in the cart above, another input-output linearization will be attempted with the cart as output.
Let . Where Cart reference position, then:
,
. Where
39
and are designed by placing poles in the characteristic equation, . The linearizing control action is therefore:
The relative degree of the feedback linearized system is and therefore a zero dynamics of order exists. Analysis of the zero dynamics gives the system:-
(4.35) From (4.35), it is hard to tell the stability of the zero dynamics, hence a simulation is done with the cart set to track a reference of 1meter and the results shown below:
Figure 4.4: Input-Output Linearization with Cart as Output and stable zero dynamics (pendulum) From Figure 4.3, it can be inferred that the zero dynamics with the cart distance as the output of linearization is stable but oscillatory.
4.3.2 INPUT TO OUTPUT(ANGLE) LINEARIZATION WITH INTERNAL DYNAMICS STABILIZING CONTROL(FL/ZDC)
In this section, a controller is proposed to stabilize the unstable internal dynamics associated with the system obtained after performing an input-output linearisation with respect to the pendulum angle. The controller is based on the theorem due to Lyapunov and the idea of singularly perturbed systems as done in [8,27]. Two controllers are therefore designed and combined to
40
control the system. The first controller is the input-output(angle) linearization controller in eqn.
(4.34) designed with angle as output. The second controller is the proposed Lyapunov based controller. By setting the controller gains such that the system exhibits two -time scale behaviour(fast dynamics for pendulum and slow dynamics for cart) [27], the system is made singularly perturbed. The two dynamics of the singularly perturbed system can therefore be independently stabilized by both controllers based on the principle of singular perturbation theory .
Theorem 4.2 (Lyapunov theorem for local stability)[37]: Consider the system (43). If in containing the equilibrium point , there exists a function with continuous first order derivatives such that
is positive definite in
is negative definite in D,
Then the equilibrium point is stable
According to the theorem of Lyapunov, a stable system has a Lyapunov function that is positive definite with a derivative that is negative (semi) definite . In order to design a stabilizing control for the zero dynamics, a new control input is defined for the feedback linearized system in (4.34) as below:
(4.33) where zero dynamics stabilizing control. Substituting in the inverted pendulum system in the following closed loop system is obtained:
To design , the Lyapunov function is defined based on the states in the internal dynamics:
such that . where and with cart reference position, and cart reference velocity and
The derivative of the Lyapunov function is therefore:
41
+ + But . Therefore, simplifies as given in (4.37)
+ (4.37) The control action is designed to make the internal dynamics asymptotically stable by making negative definite as shown below:
where (4.38) Equating (4.37) to (4.38) and substituting for from (4.36), the control action is derived thus:
where (section 4.3.1 ) (4.39)
The total control action applied to the nonlinear plant is therefore the sum of the input to angle linearization control and the zero dynamics control as shown in (4.40) below:
(4.40)
However, it is realized that doing the summation in (4.40) above, eliminates which is the virtual control for the feedback linearized output . Therefore, a difference was taken instead and the control law (4.41) obtained and found to stabilize the system.
(4.41)
4.3.3 TUNING AND SIMULATION OF INPUT-OUTPUT(ANGLE) LINEARIZATION WITH ZERO DYNAMICS CONTROLLER
Figures A4.1-A4.3(Appendix A) show the MATLAB/Simulink implementation of the controller.
Tuning the controller above involves selecting the poles for the feedback linearized virtual control which determines the values of and . The parameters determine the rate of convergence to zero of the states in the internal dynamics. After trying various values, the parameters for the controller are fixed by placing poles at and making and and chosen as and respectively. Figure 4.4 presents a simulation of the system with this control law tracking a cart reference of 0.3m from an initial angular position of about . From Figure 4.5, it can be inferred that the controller stabilizes the pendulum after and tracks the cart after with a rise time of without
42
overshoot. The control action used is within the interval which meets the constraint on the input. The cart also stays within the constraints of the cart length i.e.
and both pendulum and cart have zero steady state error. Further investigation revealed that the maximum angular displacement that can be given to the system and still obtain satisfactory control meeting all constraints is about . Also, ignoring the constraints in the system shows that the controller is almost globally attractive. It can stabilize the pendulum from any arbitrary initial position except at and where , as .
Figure 4.6 demonstrates the tracking ability of the controller in the presence of noise and disturbance. The noise power is about 0.02 and a disturbance of 0.2 on both outputs occurs at 10s, 20s and 35s. It can be observed from figure 4.6 that the controller track the reference satisfactorily and has good recovery from disturbance even in the presence of noise. The control action and cart distance remain within the physical constraints even with the addition of noise and disturbance.
Figure 4.5: Input-Output(angle) Lin. and internal dynamics (cart) stabilizing control added.
43
Figure 4.6: Tracking, disturbance rejection and noise suppression of FL/ZDC