Application to Stabilizing Control of Nonlinear Mobile ...

3 downloads 0 Views 3MB Size Report
L. Distance between the wheel's center and the pendulum's center of gravity .... Choi, Ming-Tao Kang, Hak-Kyeong Kim, Sang-Yong Park and Sang-Bong Kim.
한국해양공학회지 제23권 제2호, pp 1-7, 2009년 4월 (ISSN 1225-0767)

Application to Stabilizing Control of Nonlinear Mobile Inverted Pendulum Using Sliding Mode Technique Nak-Soon Choi*, Ming-Tao Kang**, Hak-Kyeong Kim*, Sang-Yong Park*** and Sang-Bong Kim* *Dept. of Mechanical Eng., College of Eng., Pukyong National University, Busan, Korea **Institute of High Energy Physics, Beijing, China ***Department of Computer Science and Information, BaekSeok Culture University, Cheonan, Korea KEY WORDS: Mobile inverted pendulum, Ackermann’s formula, Sliding mode controller ABSTRACT: This paper presents a sliding mode controller based on Ackermann's formula and applies it to stabilizing a two-wheeled mobile inverted pendulum in equilibrium. The mobile inverted pendulum is a system with an inverted pendulum on a mobile cart. The dynamic modeling of the mobile inverted pendulum was established under the assumptions of a cart with no slip and a pendulum with only planar motion. The proposed sliding mode controller was based upon a class of nonlinear systems whose nonlinear part of the modeling can be linearly parameterized. The sliding surface was obtained in an explicit form using Ackermann’s formula, and then a control law was designed from reachability conditions and made the sliding surface attractive to the equilibrium state of the mobile inverted pendulum. The proposed controller was implemented in a Microchip PIC16F877 micro-controller. The developed overall control system is described. The simulation and experimental results are presented to show the effectiveness of the modeling and controller.

1. Introduction

is applied to control two-wheeled mobile inverted pendulum. The dynamic modeling of two wheeled mobile inverted

The two-wheeled mobile inverted pendulum is a relatively

pendulum incorporated with electrical dynamic modeling of

novel inverted pendulum, which is composed of an inverted pendulum attached to a mobile cart with two coaxial wheels.

the DC motor of the wheel is proposed. Based on the modeling linearizing this dynamic modeling, the sliding surface is

Grasser et al. (2002) built a mobile inverted pendulum JOE.

chosen in an explicit form using Ackermann’s formula, and

There are many works on sliding mode control theory in literatures. Kim (2006) proposed depth and heading control of

the control law is extracted from the reachability conditions. The control law contains two parts: the static controller and

an AUV with modelling nonlinearity, parameter, uncertainty

the dynamic controller. The static controller designed by pole

and disturbance to keep the desired depth and heading angle in a towering tank based on a sliding mode control using

assignment method contributes to obtain the sliding surface in an explicit form using Ackermann’s formula (Ackermann

estimated hydrodynamic coefficients. Lee et al. (1998) proposed

et al., 1998). The dynamic controller designed by reachability

quasi-sliding mode control of an AUV with long sampling interval and parameter uncertainty to keep constant altitude

condition makes the sliding surface attractive to the equilibrium state of the mobile inverted pendulum. The overall control

and path in a vertical plane. Chen et al. (1998) proposed robust

system is developed to stabilize the mobile inverted pendulum.

adaptive sliding-mode control using fuzzy modeling for a mobile inverted pendulum system with unknown uncertainties

The controller is implemented in a Microchip PIC16F877 micro-controller. Finally, the simulation and experimental results

such as the variation of parameters and a bounded extended

on computer are presented to show the effectiveness of the

disturbance. Ackermann et al. designed a sliding mode controller based on Ackermann’s Formula (1994; 1998). Their

proposed controller.

2. Dynamic Modeling

simulation results proved that the trolly mobile inverted pendulum with bounded known perturbation force can be balanced by this controller (Ackermann et al., 1994). The control

2.1 Dynamic modeling of dc motor of the wheel

theories can be expected to be useful to control AUV, ship swing

Figure 1 shows the configuration of DC motor for its

and buoy swing on the vertical and horizontal plane, etc. In this paper, a practical controller via sliding mode control

dynamic modeling (Necsulescu, 2002). The nomenclature of DC motor is shown in Table 1.

교신저자 김상봉: 부산광역시 남구 용당동 산100, 051-629-6158, [email protected]

1

2

Nak-Soon Choi, Ming-Tao Kang, Hak-Kyeong Kim, Sang-Yong Park and Sang-Bong Kim

Fig. 1 The diagram of DC motor Table 1 Nomenclature of DC motor Parameters

Description

Units

V

Terminal voltage

[V]

i

Current through armature

[A]

θ ω

Angle of rotor shaft Angular velocity of motor shaft

[rad/s]

Ve

Back electromotive force voltage

[V]

Ke

Back electromotive voltage constant [Vs/rad]

IR

Moment of inertia of the rotor

[rad]

[Kg․m2]

Tm

Magnetic torque acting on the rotor

Km

Magnetic torque constant

Ta

Torque of the motor acting on the wheel

Kf

Viscous frictional coefficient

xr

Position of the cart

[m]

Mw

Mass of the wheel

[Kg]

Iw

Moment of inertia of the wheel

D

[Nm] [Nm/A] [Nm] [Nm/rad] Fig. 3 Free body diagram of the mobile inverted pendulum

[Kg․m2]

Reaction forces between left/right wheel and pendulum

[N]

Distance between the wheels

[m]

HL, PL; HR, PR

Fig. 2 Definition of state-space variable

X-Y plane in Fig. 2. It is assumed that the wheels of the mobile inverted pendulum always stay in contact with the ground, has no slip, rolls purely and moves only in the X direction. The inverted pendulum only rotates in the X-Y plane.

R

Nominal terminal resistance

[Ω]

This paper gives the equations for the right wheel since the

r

Wheel radius

[m]

ones for the left wheel are completely analogous. According to Fig. 3, the force, moment around the center and angular velocity

Mp

Mass of the inverted pendulum

[Kg]

Ip

Moment of inertia of the wheel

[Kg․m ]

L

Distance between the wheel's center and the pendulum's center of gravity

g

Gravitational acceleration

2

[m] 2

[m/sec ]

The motor inductance and the friction of DC motor are negligible, and current derivative also is given as zero. Dynamic model of the motor can be obtained as         

(1)

   

(3)

       

(4)

       

(5)

From (2), the relation of torque between motor and the wheel is expressed as               

(6)

The forces in the horizontal direction, the forces perpendicular to the pendulum and the moments around the center of mass

where             

of the right wheel on the horizontal direction are expressed as

of inverted pendulum are given as (2)

2.2 Dynamic modeling of mobile inverted pendulum In this paper, the mobile inverted pendulum is restricted to

                   

(7)

                                

(8)









Application to Stabilizing Control of Nonlinear Mobile Inverted Pendulum Using Sliding Mode Technique              

(9)

    





(10)

where φ represents a small angle from the vertical direction. From (3)~(10), the linear mathematical model of mobile inverted pendulum in the state-space form is obtained as                                          

      

characteristic polynomial of (14). Substituting (15) into (14), the state equation of closed loop system is obtained as      ≡   

(16)

The sliding surface is chosen as

  ,     (11)

(17)

where

             ≡        .

where 

                where λ1, λ2, λ3, λ4 are the desired eigenvalues and P(λ) is

The following assumptions are given as     ,   ,     and

3

CST is the left eigenvector of A − bkT associated with λ4 as

 

          ,     

follows:

      

           ,                      ,     

(18)

Proof of (15) is presented by Ackermann et al. (1994; 1998). The dynamic system as perturbed system is obtained as follows by substituting (13) and (15) into (12).

    ,                

                 

(19)

A new variable z is defined as

3. Design of Stabilizing Controller The linear time-invariant controllable system in (11) can be expressed as   

(12)

                      ,  ,                   



(20)

where q = [x1, x2, x3]T is the first three state variables of x and S = CSTx becomes the last state variable of z.

(21)

where            ,                    ,     

The control law is defined as (13)

where static controller ua contributes the design of sliding surface, and dynamic controller u1 directly makes sliding surface attractive to the equilibrium state of the mobile inverted pendulum. The static system is nominal system as follows: (14)

The static controller is given by Ackermann’s formula as follows:

                       

                     

           

          









            

                      

        ,           



                     

where u is a scalar control as terminal voltage V.

      

  

The new coordinate system can be obtained as

  

   

     ⋯  ⋯          

(15) 

,



                     

 

4

Nak-Soon Choi, Ming-Tao Kang, Hak-Kyeong Kim, Sang-Yong Park and Sang-Bong Kim

 is shown in Appendix A. The proof of  From (20) and (21), (21) is partitioned as follows:

Table 2 Numerical values of system's parameters

        

(22)

     

(23)

Parameters

Values

Units

r

0.05

[m]

Mp

1.13

[Kg]

Ip

0.004

[Kg․m2]

Ke

0.007

[Vs/rad]

Km

0.006

[Nm/A]

R

The dynamic controller is chosen as    

(24)

where      

3

[Ω]

Mw

0.03

[Kg]

Iw

0.001

[Kg․m ]

L

0.07

[m]

g

9.8

[m/s2]

D

0.285

Proof of (24) is presented by Ackermann et al. (1994; 1998). To reject the chattering problem, there is a simple but effective method: boundary layer control instead of a signum function (Wu et al., 2007).

4. Simulation and Experiments 4.1 Hardware design The configuration of overall control system is shown in Fig. 4. One PIC16F877 micro-controller is used as master controller, which receives the signal from sensors, renders the proposed controller and sends velocity command to motor driver. Tilt sensor provides a precise measurement of the pitch angle of the inverted pendulum. Incremental encoder is utilized to measure angular velocity of wheel. These measurements can be calculated and fed back to the proposed controller in order to impose the desired closed loop dynamics. The motors are driven via LMD18200 Dual Full-Bridge Drivers. 4.2 Controllability for the mobile inverted pendulum The parameters for the two wheeled mobile inverted pendulum are given in Table 2.

2

[m]

Substituting system’s parameters into (11) can be rewritten as follows:                                     



   

(25)

The controllability matrix is as follows:                                   

  



(26)

It is readily shown that the rank of this controllability matrix is 4. So this system is controllable. 4.3 Simulation and experimental results Simulation and experiments are done to prove the effectiveness of the proposed controller for the mobile inverted pendulum in Fig. 5(a). Fig. 5(b) shows controller developed for experiment of the mobile inverted pendulum. The desired eigenvalues of the sliding surface are λ1 = − 1,

λ2 = − 1, λ3 = − 3 and the positive parameters M(x, t) = M0

Fig. 4 The configuration of control system

Fig. 5 Mobile inverted pendulum in experiments and controller

Application to Stabilizing Control of Nonlinear Mobile Inverted Pendulum Using Sliding Mode Technique

5

Fig. 6 Cart position xr

Fig. 9 Inverted pendulum angular velocity 

Fig. 7 Angular velocity ω of wheel

Fig. 10 Control input u

Fig. 8 Inverted pendulum angle ϕ

Fig. 11 Sliding surface

= 5 in dynamic controller is established. The initial values are xr = 0.5 m and ϕ = 0.3 rad.

zero after 5 seconds in simulation. Figure 7 presents that the

Figure 6 shows that the cart position xr is bounded around

6

Nak-Soon Choi, Ming-Tao Kang, Hak-Kyeong Kim, Sang-Yong Park and Sang-Bong Kim

wheel angular velocity ω is within ± 1.5 rad/s in simulation after the mobile inverted pendulum is stable. Figure 8 shows that the inverted pendulum angle ϕ is stable after 3 seconds in simulation. Figure 9 presents that the angular velocity  of inverted pendulum is within ± 0.05 rad/s in simulation. Figure 10 shows that control input u versus time in simulation. After 5 seconds, control input is switched within ± 5 V. Figure 11 shows that the sliding surface converge zero within 1 second in simulation. The angular velocity of wheel motor in experiment is shown in Fig. 12. It is vibrated within ± 2 rad/s after 10 seconds. Figure 13 show that pendulum angle

ϕ is bounded within ± 0.2 rad. Figure 14 shows that control input u in experiment is vibrated within ± 5 V. From Figs. 6~14, in the initial state, cart moves fast to be stable. After it is stable, all states are vibrated around equilibrium state.

Fig. 14 Control input of  in experiment time

5. Conclusion This paper presents a sliding mode controller for stabilizing the mobile inverted pendulum. The dynamic modeling of the mobile inverted pendulum is described as a class of nonlinear systems whose nonlinear part can be linearly parameterized. Based on the linearized model, the control law is obtained by combining the static controller and dynamic controller. The static controller yields the sliding surface in an explicit form with the help of Ackermann’s formula, and then the dynamic controller is designed to make the sliding surface attractive to the system state. To implement the proposed controller, the controller for experiment is developed based on Microchip PIC16F877 micro-controller to realize real-time stabilization for the mobile inverted pendulum. Simulation and experiment Fig. 12 Angular velocity ω of wheel in experiment

are carried out to verify the effectiveness of the proposed modeling and controller. The simulation and experimental results show that the pendulum is stabilized with the pendulum angle ϕ bounded within ± 0.2 rad by the proposed controller. The better controller to reduce this vibration must be designed.

References Ackermann, J. and Utkin, V. (1994). ”Sliding Mode Control Design Based on Ackermann’s Formula”, Proceedings of the 33rd Conference on Decision and Control, pp 36223627. Ackermann, J. and Utkin, V. (1998). ”Sliding Mode Control Design Based on Ackermann’S Formula”, IEEE Transaction Automatic Control, Vol 43, No 2, pp 234-237. Fig. 13 Measured angle ϕ in experiment

Chen, C.S. and Chen, W.L. (1998). ”Robust Adaptive Slidingmode Control Using Fuzzy Modeling for an Inverted-

Application to Stabilizing Control of Nonlinear Mobile Inverted Pendulum Using Sliding Mode Technique pendulum System”, IEEE Transaction Industrial Electronics, Vol 45, No 2, pp 297-306. Grasser, F., D’Arrigo, A., Colombi, S. and Rufer, A.C. (2002). ”JOE: A Mobile, Inverted Pendulum”, IEEE Transaction Industrial Electronics, Vol 49, No 1, pp 107-114.

7

where

                               

(A3)

Kim, J.Y. (2006). ”Controller Design for an Autonomous Underwater Vehicle Using Estimated Hydrodynamic Coefficients”, J. of Ocean Engineering and Technology,

From (18), (A1) and (A3), the followings can be obtained

Vol 20, No 6, pp 7-17.

          

Lee, P.M., Jeon, B.H. and Hong, S.W. (1998). ”Quasi-sliding Mode Control of an Autonomous Underwater Vehicle

              















 

 

            

with Long Sampling Interval”, J. of Ocean Engineering and Technology, Vol 12, No 2, pp 130-138. Necsulescu, D. (2002). Mechatronics, Prentice Hall.

            

Wu, J., Pu, D. and Ding, H. (2007). ”Adaptive Robust Motion

            

Control of SISO Nonlinear Systems with Implementation on Linear Motors”, Journal of Mechatronics, Vol 17, No 4-5, pp 263-270.

        



       



   

                                                    



           

 



           

           



(A1)

   



                                                                















      



                    

                                                     

         2008년 7월 30일 원고 접수 2009년 2월 9일 최종 수정본 채택

                



       

   







 ⋮       ⋮   



 ⋮   ⋮      ⋮           ⋮              ⋮      ⋯⋯⋯⋯⋯ ⋯ ⋯⋯⋯⋯⋯ ⋯ ⋯⋯⋯⋯⋯ ⋮ ⋯⋯    ⋮   

Proof of (21)

               

(A5)

Substituting (A5) into (A2) can be rewritten as follows:

Appendix A



(A4)



                           

(A2)

Suggest Documents