Chapter 27 Example: Inverted pendulum on a cart The figure to the right shows a rigid inverted pendulum B attached by an ideal frictionless pin (revolute) joint to a cart A (modeled as a particle). The cart A slides on a straight horizontal frictionless track. The track is fixed in a Newtonian reference frame N . x , b y , b z are x, n y, n z and b Right-handed orthogonal unit vectors n fixed in N and B respectively, with: y vertically upward x horizontally right and n • n z parallel to B’s axis of rotation in N z = b • n y directed from A to the distal end of B • b Complete the figure to the right by adding the identifiers N , A, B, x, b y, b z. x , n y , n z , b Bcm , L, Fc , x, θ, n Quantity Mass of A Mass of B Distance between A and Bcm (B’s center of mass) z B’s moment of inertia about Bcm for b Earth’s gravitational constant x measure of feedback-control force applied to A n x measure of A’s position vector from No (a point fixed in N ) n y with -n z sense y to b Angle from n 27.1 Symbol mA mB L Izz g Fc x θ Value 10.0 kg 1.0 kg 0.5 m 0.08333 kg∗m2 9.8 m/s2 Specified Variable Variable F=ma Kinematics (space and time) Kinematics is the study of the relationship between space and time, independent of the influence of mass or forces. The kinematic quantities normally needed for motion analysis are listed below. In many circumstances, it is efficient to form rotation matrices, angular velocities, and angular accelerations before position vectors, velocities, and accelerations. Kinematic Quantity Rotation matrix Angular velocity Angular acceleration Position vectors Velocity Acceleration R r ω v α a Quantities needed for analyzing the inverted pendulum on a cart bRn , the rotation matrix relating b x , b y, b z and n x , n y , n z N B ω , B’s angular velocity in N α , B’s angular acceleration in N N B r A/No and r Bcm /A , the position vector of A from No and of Bcm from A N A v and NvBcm , A’s velocity in N and Bcm ’s velocity in N N A a and NaBcm , A’s acceleration in N and Bcm ’s acceleration in N c 1992-2015 Paul Mitiguy. All rights reserved. Copyright 295 Chapter 27: Example: Inverted pendulum on a cart 27.2 Rotation matrix x , b y , b z and n x, n y , n z is The relative orientation of two sets of right-handed orthogonal unit vectors b b n j (i, j = x, y, z). All frequently stored in a 3 × 3 rotation matrix denoted R whose elements are bi · n rotation matrices are orthogonal, which means its inverse is equal to its transpose, and which means the x, b y, b z and n x , n y , n z , matrix can be written as a table read horizontally or vertically. To relate b redraw these unit vectors in the geometrically-suggestive way shown below. To determine the 1st row of x is expressed in terms of n x, n y, n z as shown below. Similarly, the 2nd and 3rd the bRn rotation matrix, b b n y and b z in terms of n x , n y , n z. rows of R are found by expressing b by θ bRn x n y n z n x b cos(θ) -sin(θ) 0 y = sin(θ) n x + cos(θ) n y b y b sin(θ) cos(θ) 0 z = n z b z b 0 0 1 x = cos(θ) n x − sin(θ) n y b θ bx 27.3 Angular velocity (special 2D case) Since 3D angular velocity is complicated, many textbooks only define simple angular velocity, which is useful for two-dimensional analysis.1 When a vector λ is fixed in both a reference frame B and a reference frame N , B has a simple angular velocity in N that can be calculated via equation (1). N B ω = (simple) ± θ̇ λ (1) The sign of θ̇ λ is determined by the right-hand rule. If increasing θ causes a right-hand rotation of B in N about +λ , the sign is positive, otherwise it is negative. 27.3.1 N Simple angular velocity example: Step-by-step process to calculate ω B z is fixeda in both B and N , so B has a simple angular velocity in N . Due to the pin joint, b z is a unit vector fixed in both N and B (parallel to the pin joint) • b θ z y is fixed in N and perpendicular to b • n B y is fixed in B and perpendicular to b z • b y , and θ̇ is its time-derivative y and b • θ is the angle between n y and • After pointing the four fingers of your right hand in the direction of n curling them in the direction of by , your thumb points in the bz direction. z that is negative: Since the right-hand rule produces a sign of b N B ω z = -θ̇ b N a A vector is said to be fixed in reference frame B if its magnitude is constant and its direction does not change in B. 27.3.2 Angular velocity and vector differentiation N For any vector v, the golden rule for vector differentiation relates dv (the ordinary time-derivative dt of v in a reference frame N ) to: • N B ω , B’s angular velocity in N dv , the ordinary time-derivative of v in B • dt N dv = dt B 1 B dv + dt N B ω ×v (2) One of the major obstacles in three-dimensional kinematics is properly calculating angular velocity. Note: See 3D dynamics textbooks for undergraduates/professionals at www.MotionGenesis.com. c 1992-2015 Paul Mitiguy. All rights reserved. Copyright 296 Chapter 27: Example: Inverted pendulum on a cart Equation (2) is one of the most important formulas in kinematics because v can be any vector, e.g., a unit vector, a position vector, a velocity vector, a linear/angular acceleration vector, a linear/angular momentum vector, or a force or torque vector. 27.4 Angular acceleration Equation (3) defines the angular acceleration of a reference frame B in a reference frame N . N B α also happens to be equal to the time-derivative in B of Nω B . B N B Note: Calculate with d ω dt N N if it is easier to compute than B α d ω . dt B’s angular acceleration in N is most easily calculated with its alternate definition, i.e., 27.5 N B ∆ N B α N N B B N B = d ω dt B N B d ω dt = d ω dt = (3) z ) d (-θ̇ b z = -θ̈ b dt B = Position vectors (inspection and vector addition) B • Inspection of the figure: r A/No • Inspection of the figure: r Bcm /A x = xn y = Lb (A’s position vector from N ) N (Bcm ’s position vector from A) L y + x n r Bcm /No = r Bcm /A + r A/No = L b x • Vector addition: x A (Bcm ’s position vector from No ) 27.6 Velocity and acceleration N Bcm v (the velocity of a point Bcm in a reference frame N ) is defined as the time-derivative in N of r Bcm /No (Bcm ’s position vector from No ). N y ) x + L b dr Bcm /No d (x n = = dt dt N N y ) x ) d (L b d (x n + = dt dt B d (L by ) y x + + Nω B × L b = ẋ n dt z × L b y x + 0 + -θ̇ b = ẋ n N Bcm ∆ v ∆ = N dr Bcm /No dt (4) Point No is any point fixed in N B N L x x ẍ n N Bcm ∆ a = N N Bcm d v dt (5) N N x ) x) x + θ̇ L b x) d (ẋ n d (ẋ n d (θ̇ L b = + dt dt dt B x ) d (θ̇ Lb x) = x + -θ̇ 2 L b y x + θ̈ L b + Nω B × (θ̇ L b + ẍ n dt N N Bcm d v dt A x x + θ̇ L b ẋ n a (the acceleration of point Bcm in reference frame N ) is defined as the time-derivative in N of NvBcm (Bcm ’s velocity in N ). = = θ N Bcm a v N = N Bcm N Bcm ∆ N = c 1992-2015 Paul Mitiguy. All rights reserved. Copyright 297 Chapter 27: Example: Inverted pendulum on a cart 27.7 Forces, moments, and free-body diagrams (2D) F=ma To draw a free-body diagram (FBD), isolate a single body (or system S of A and B) and draw all the external contact and distance forces that act on it. Shown right are FBDs with all the external forces on the cart A and pendulum B.a Quantity Fc N Rx Ry mA g mB g Description x measure of control force applied to A n y measure of the resultant normal force on A from N n x measure of the force on B from A across the revolute joint n y measure of the force on B from A across the revolute joint n -n y measure of Earth’s gravitational force on A -n y measure of Earth’s gravitational force on B Resultant force on A: Resultant force on B: Resultant force on S: Type Contact Contact Contact Contact Distance Distance mB g Rx Ry FA = (Fc − Rx ) n x + (N − mA g − Ry ) n y B F = Rx n x + (Ry − mB g) n y S F = Fc n x + [N − (mA + mB ) g] n y a A Alternately, to use the efficient road-map/D’Alembert method ) to eliminate “constraint forces” Rx and Ry , draw a FBD of the system S consisting of A and B (no need to draw A alone). Since the revolute joint between A and B is ideal, action/reaction is used to minimize the number of unknowns. z component of The b the moment of all forces on B about Bcm isa B Fc FBD of B Ry Rx mA g N FBD of A 0 : /B cm B/Bcm = r A/Bcm × (Rx n y ) x + Ry n y ) + × (-mB g n r Bcm M z z x + Ry n y ) = [L cos(θ)Rx − L sin(θ)Ry ] b = -L by × (Rx n a Note: The rotation table to useful for calculating the cross-products (b y × n y × n x ) and (b y ). 27.8 Dynamics requires: Mass, center of mass, inertia • Mass of each particle and body, e.g., mA (mass of particle A) and mB (mass of body B). • Location of each particle and body center of mass, e.g., r A/No and r Bcm /A . • Inertia dyadic of each rigid body about a point fixed on the body. Since B’s angular z ) suffices for this analyses. velocity in N is simple, Izz (B’s moment of inertia about Bcm for b 27.9 F=ma Newton/Euler laws of motion for A and B separately (inefficient) An inefficient way to form this system’s equations of motion is with separate analyses of A and B. Using F = ma for particle A and body B [in conjunction with the previous free-body diagrams (FBDs)] yields, FA = mA ∗ NaA x : Dot-multiply with n ⇒ x + (N − mA g − Ry ) n y = mA ẍ n x (Fc − Rx ) n Fc − Rx = mA ẍ FB = mB ∗ NaBcm ⇒ y : Dot-multiply with n N − mA g − Ry = 0 x − θ̇ 2 L b y ) y = mB (ẍ n x + θ̈ L b x + (Ry − mB g) n Rx n x and n y (use the rotation table to calculate dot-products) gives Dot-multiplication with n y · n x · n x ) − θ̇ 2 L (b x) Rx = mB ẍ + θ̈ L (b Rx = mB ẍ + θ̈ L cos(θ) − θ̇ 2 L sin(θ) y · n x · n y ) − θ̇ 2 L (b y) (Ry − mB g) = mB θ̈ L (b (Ry − mB g) = mB -θ̈ L sin(θ) − θ̇ 2 L cos(θ) Note: Separate analyses of A and B is less efficient than the road-map/D’Alembert method c 1992-2015 Paul Mitiguy. All rights reserved. Copyright 298 Chapter 27: and Homework ??.12. Example: Inverted pendulum on a cart 27.9.1 Dynamics for a rigid body with a simple angular velocity (special 2D case) B mB g B/Bcm= I Nα B M z zz Euler’s equation for a rigid body B with a simple angular velocity in a Newtonian reference frame N is: (8.3) z = n B/Bcm is the b z component of the moment of all forces on B about Bcm . • M z z . • I is B’s moment of inertia about the line passing through Bcm and parallel to b • zz N B α is B’s angular acceleration in N . z produces Assembling these terms and subsequent dot-multiplication with b Rx L cos(θ) Rx − L sin(θ) Ry = -Izz θ̈ Ry θ Summary of Newton/Euler equations of motion (inefficient) B Fc − Rx = mA ẍ N − mA g − Ry = 0 N L Rx = mB [ẍ + θ̈ L cos(θ) − θ̇ 2 L sin(θ)] (Ry − mB g) = mB [-θ̈ L sin(θ) − θ̇ 2 L cos(θ)] L cos(θ) Rx − L sin(θ) Ry = -Izz θ̈ x A Fc There are 5 unknown variables in the previous set of equations, namely Rx , Ry , N , x, θ. Note: Once θ(t) is known, θ̇(t) and θ̈(t) are known. Similarly, once x(t) is known, ẋ(t) and ẍ(t) are known. 27.9.2 Equations of motion via road-maps/D’Alembert (efficient) For various purposes (e.g., control system design), it is useful to eliminate the unknown “constraint forces” Rx , Ry , N . Although tedious linear-algebra can reduce the previous set of 5 equations in 5 unknowns to 2 equations in 2 unknowns (ẍ, θ̈), it is more efficient to use road maps/D’Alembert or the methods of Lagrange or Kane as they automatically eliminate Rx , Ry , N . Fc = (mA + mB ) ẍ + mB L cos(θ) θ̈ − mB L sin(θ) θ̇ 2 Road-map equation for x ⇒ Road-map equation for θ 27.10 ⇒ mB g L sin(θ) = mB L cos(θ) ẍ + (Izz + mB L2 ) θ̈ Matrix form of nonlinear and linearized equations of motion For numerical solution and various control-systems techniques, it can be useful to write this system’s nonlinear equations of motion in matrix form as -mB L sin(θ) θ̇ 2 ẍ mB L cos(θ) mA + mB 1 = + Fc -mB g L sin(θ) mB L cos(θ) Izz + mB L2 0 θ̈ θ B N L x Fc A Certain stability analyses and control-system techniques depend on linear ODEs. Using the small angle approximations cos(θ) ≈ 1, sin(θ) ≈ θ, and the small rate approximation θ̇ 2 ≈ 0, this system’s equations of motion can be linearized and put into various matrix forms, e.g., Linearized ẍ x mB L mA + mB 0 0 1 + matrix form Fc = 2 Izz + mB L θ mB L 0 mB g L 0 θ̈ 0 0 1 0 x 0 0 State-space form 0 0 1 θ 0 F = d = Izz (mA + mB ) + mA mB L2 + 2 2 2 ẋ 0 0 (−g L mB ) / d (Izz + mB L ) / d c 0 (-L mB ) / d θ̇ 0 [g L mB (mA + mB )] / d 0 0 c 1992-2015 Paul Mitiguy. All rights reserved. Copyright 299 Chapter 27: Example: Inverted pendulum on a cart
© Copyright 2026 Paperzz