Professional Documents
Culture Documents
Robot Locomotion
Winter 2010
mp g
Figure 1: Cart-pole system. To begin, we will derive the simple relationships giving the position and velocity of the pendulum: xp = L sin xp = L cos + x yp = L cos yp = L sin The Lagrangian for a dynamic system is dened as: L = T V where T is the kinetic energy and V is the potential energy. For the cart-pole system: 1 1 p 2 T = M x2 + m p x2 + y p 2 2 1 1 2 = M x + mp L2 cos2 2 2L cos x + x2 + L2 sin2 2 2 2 1 1 = (M + mp ) x2 + mp L2 cos2 2 + L2 sin2 2 mp L cos x 2 2 1 1 = (M + mp ) x2 + mp L2 2 mp L cos x 2 2
(Last revised January 10, 2010)
(6)
Homework 1
ECE 594D
Robot Locomotion
Winter 2010
And the potential energy is: V = mp gyp = mp gL cos So the Lagrangian is: L= 1 1 (M + mp ) x2 + mp L2 2 mp L cos x mgL cos p 2 2 (8) (7)
Next, for each generalized coordinate, qn , and its associated actuating force (if any), n , we can derive an equation of motion: d L dL = n (9) dt qn qn For the x coordinate of the cart: n L x d L dt x L x = Fx = (M + mp ) x mp L cos = (M + mp ) xp + mp L sin 2 mp L cos =0 (10) (11) (12) (13)
Combining these expressions as required by Equation 8, we obtain one equation of motion: Fx = (M + mp ) x + mp L sin 2 mp Lcos For the (unactuated) angle of the pendulum, p , L d L dt L =0 = mp L2 mp L cos xp x = mp L2 mp L cos + mp L sin xp = mp L sin x + mp gL sin (15) (16) (17) (18) (14)
Again using Equation 8, we get the second equation of motion: 0 = mp L2 mp L cos + mp L sin xp mp L sin x mp gL sin x x = mp L2 mp L cos mp gL sin (19)
Homework 1
ECE 594D
Robot Locomotion
Winter 2010
Linearization
Assuming the pendulum remains near = 0, we can linearize the equations of motion given in 14 and 19. For the linearization, we assume: sin cos 1 2 0 Equation 14 can then be approximated as: Fx = (M + mp ) x mp L and equation 19 becomes: 0 = mp L + mp L2 mp gL x (20) (21)
After a bit of mathematical gymnastics, we can also rewrite the two nonlinear equations of motion (14 and 19) to express each acceleration explicitly: 2 sinmp L cos + sin gM + sin mp g + cos Fx = L (mp cos2 + M + mp ) mp L sin cos 2 + (M + mp ) g sin + cos Fx = (M + mp (1 cos2 )) L x= = sinmp L2 + sin mp cos g + Fx mp cos2 + M + mp mp L sin 2 + mp g sin cos + Fx M + mp (1 cos2 )
(24)
(25)
Homework 1