The dynamics of a Mobile Inverted Pendulum (MIP)

Similar documents
In the presence of viscous damping, a more generalized form of the Lagrange s equation of motion can be written as

System simulation using Matlab, state plane plots

Classical Mechanics Comprehensive Exam Solution

In this section of notes, we look at the calculation of forces and torques for a manipulator in two settings:

Rotational Kinetic Energy

MEM04: Rotary Inverted Pendulum

Modeling and Experimentation: Compound Pendulum

Robot Control Basics CS 685

Physics 201. Professor P. Q. Hung. 311B, Physics Building. Physics 201 p. 1/1

Robotics. Dynamics. Marc Toussaint U Stuttgart

Positioning Servo Design Example

Case Study: The Pelican Prototype Robot

Rotation. Kinematics Rigid Bodies Kinetic Energy. Torque Rolling. featuring moments of Inertia

Lab 6a: Pole Placement for the Inverted Pendulum

CP1 REVISION LECTURE 3 INTRODUCTION TO CLASSICAL MECHANICS. Prof. N. Harnew University of Oxford TT 2017

Modelling and Control of DWR 1.0 A Two Wheeled Mobile Robot

MAE 142 Homework #2 (Design Project) SOLUTIONS. (a) The main body s kinematic relationship is: φ θ ψ. + C 3 (ψ) 0 + C 3 (ψ)c 1 (θ)

EE Homework 3 Due Date: 03 / 30 / Spring 2015

ECEn 483 / ME 431 Case Studies. Randal W. Beard Brigham Young University

Lab 6d: Self-Erecting Inverted Pendulum (SEIP)

CONTROL OF THE NONHOLONOMIC INTEGRATOR

2.003SC Recitation 3 Notes:V and A of a Point in a Moving Frame

HW3 Physics 311 Mechanics

EQUATIONS OF MOTION: ROTATION ABOUT A FIXED AXIS (Section 17.4) Today s Objectives: Students will be able to analyze the planar kinetics of a rigid

VIBRATING BASE PENDULUM. Math 485 Project team Thomas Bello Emily Huang Fabian Lopez Kellin Rumsey Tao Tao

Prof. Rupak Mahapatra. Physics 218, Chapter 15 & 16

1. The first thing you need to find is the mass of piece three. In order to find it you need to realize that the masses of the three pieces must be

Rotational Motion. Rotational Motion. Rotational Motion

M2A2 Problem Sheet 3 - Hamiltonian Mechanics

Stabilizing the dual inverted pendulum

Kinematics for a Three Wheeled Mobile Robot

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Physics Department 8.01 Physics I Fall Term 2009 Review Module on Solving N equations in N unknowns

Modeling and Control of a Segway

Physics 218 Lecture 21

MECH 3140 Final Project

Rotational motion problems

MCE 366 System Dynamics, Spring Problem Set 2. Solutions to Set 2

Problem 1. Mathematics of rotations

Lagrangian Dynamics: Generalized Coordinates and Forces

Robotics. Dynamics. University of Stuttgart Winter 2018/19

Introduction to Feedback Control

Classical Mechanics III (8.09) Fall 2014 Assignment 3

Torque/Rotational Energy Mock Exam. Instructions: (105 points) Answer the following questions. SHOW ALL OF YOUR WORK.

DYNAMICS OF SERIAL ROBOTIC MANIPULATORS

Chapter 10. Rotation of a Rigid Object about a Fixed Axis

= o + t = ot + ½ t 2 = o + 2

Dynamics Final Report

Different Modelling and Controlling Technique For Stabilization Of Inverted Pendulam

Robot Dynamics II: Trajectories & Motion

CEE 271: Applied Mechanics II, Dynamics Lecture 25: Ch.17, Sec.4-5

Video 1.1 Vijay Kumar and Ani Hsieh

Dynamic Modeling of Rotary Double Inverted Pendulum Using Classical Mechanics

Exam 1 September 11, 2013

Lagrangian Dynamics: Derivations of Lagrange s Equations

Multi-Objective Trajectory Planning of Mobile Robots Using Augmented Lagrangian

(W: 12:05-1:50, 50-N202)

Quadrotor Modeling and Control

Designing Information Devices and Systems II Spring 2018 J. Roychowdhury and M. Maharbiz Homework 7

Chapter 3. State Feedback - Pole Placement. Motivation

Two Dimensional Rotational Kinematics Challenge Problem Solutions

Interactions Between Two Non-Stationary Pendulums

Phys 270 Final Exam. Figure 1: Question 1

ECE557 Systems Control

Phys 7221 Homework # 8

PHYSICS I. Lecture 1. Charudatt Kadolkar. Jul-Nov IIT Guwahati

Torque and Rotation Lecture 7

ME 375 Final Examination Thursday, May 7, 2015 SOLUTION

Classical Mechanics Review (Louisiana State University Qualifier Exam)

Emulation of an Animal Limb with Two Degrees of Freedom using HIL

SRV02-Series Rotary Experiment # 7. Rotary Inverted Pendulum. Student Handout

Controlling the Inverted Pendulum

Chapter 9 [ Edit ] Ladybugs on a Rotating Disk. v = ωr, where r is the distance between the object and the axis of rotation. Chapter 9. Part A.

7 Kinematics and kinetics of planar rigid bodies II

Massachusetts Institute of Technology Department of Physics. Final Examination December 17, 2004

Artificial Intelligence & Neuro Cognitive Systems Fakultät für Informatik. Robot Dynamics. Dr.-Ing. John Nassour J.

Physics 351, Spring 2017, Homework #12. Due at start of class, Friday, April 14, 2017

MAE143a: Signals & Systems (& Control) Final Exam (2011) solutions

Lab 11: Rotational Dynamics

Swinging-Up and Stabilization Control Based on Natural Frequency for Pendulum Systems

Experiment P26: Rotational Inertia (Smart Pulley)

Systems Analysis and Control

Robotics I. Test November 29, 2013

Computational and mathematical modeling of an industrialautomobile robot: a multi-purpose case of study

3 Space curvilinear motion, motion in non-inertial frames

Two-Dimensional Rotational Kinematics

Nonholonomic Constraints Examples

LQ Control of a Two Wheeled Inverted Pendulum Process

ME 230: Kinematics and Dynamics Spring 2014 Section AD. Final Exam Review: Rigid Body Dynamics Practice Problem

General Definition of Torque, final. Lever Arm. General Definition of Torque 7/29/2010. Units of Chapter 10

1 x(k +1)=(Φ LH) x(k) = T 1 x 2 (k) x1 (0) 1 T x 2(0) T x 1 (0) x 2 (0) x(1) = x(2) = x(3) =

Research Article On the Dynamics of the Furuta Pendulum

11-2 A General Method, and Rolling without Slipping

ESM 3124 Intermediate Dynamics 2012, HW6 Solutions. (1 + f (x) 2 ) We can first write the constraint y = f(x) in the form of a constraint

Design, realization and modeling of a two-wheeled mobile pendulum system

Multibody simulation

28. Pendulum phase portrait Draw the phase portrait for the pendulum (supported by an inextensible rod)

FUZZY LOGIC CONTROL Vs. CONVENTIONAL PID CONTROL OF AN INVERTED PENDULUM ROBOT

P211 Spring 2004 Form A

Automatic Control II Computer exercise 3. LQG Design

A Ferris wheel in Japan has a radius of 50m and a mass of 1.2 x 10 6 kg. If a torque of 1 x 10 9 Nm is needed to turn the wheel when it starts at

Transcription:

The dynamics of a Mobile Inverted Pendulum (MIP) 1 Introduction Saam Ostovari, Nick Morozovsky, Thomas Bewley UCSD Coordinated Robotics Lab In this document, a Mobile Inverted Pendulum (MIP) is a robotic platform that resembles an autonomous segway-like vehicle with two independently-actuated wheels and enough motor torque to not only balance while driving aggressively in in a segway-like mode, but also to perform a self-uprighting maneuver from a horizontal configuration. Several MIP prototype designs are currently being developed at the UCSD Coordinated Robotics Lab; mymip is one of the simplest of these designs, and is built from inexpensive, commercial-off-the-shelf (COTS) parts together with a few custom pieces easily fabricated on an inexpensive 3D printer. Other prototypes that climb stairs and pick up and throw balls are also being developed. In this document, the equations of motion of a MIP, moving in a straight line on a level surface, are developed from first principles. 2 Equations of Motion 2.1 Free Body Diagrams Figure 1: Wheel Figure 2: Rod 1

Where: m w = mass of wheel m r = mass of rod I w = Inertia of wheel I r = Inertia of rod τ = torque from motors (input) R = radius of wheel L = length from end to center of mass of the rod L T = length of rod P x and P y = reaction force between wheel and rod in the x and y direction, respectively a t = tangential force a n = normal force g = gravity (9.81 m/s) 2.2 Kinematics Position (r) of rod center of mass (CM): Velocity (ṙ) of rod CM: Acceleration ( r) of rod CM: r = xî L sin(θ)î + L cos(θ)ĵ (2.2.1) ṙ = ẋî θl cos(θ)î θl sin(θ)ĵ (2.2.2) r = (ẍ θl cos θ + θ 2 L sin θ)î ( θl sin θ + θ 2 L cos θ)ĵ 2.3 Dynamics (2.2.3a) = (ẍ cos θ θl)(cos θî + sin θĵ) (ẍ sin θ + θ 2 L)(cos θĵ sin θî) (2.2.3b) Angular acceleration of wheel: Linear acceleration of wheel CM in î direction: Linear acceleration of wheel CM in ĵ direction: Angular acceleration of rod: Linear acceleration of rod CM in î direction: I w φ = τ F R (2.3.1) m w ẍ = P x F (2.3.2) 0 = N P y m w g (2.3.3) I r θ = τ + Py L sin θ + P x L cos θ (2.3.4) m r (ẍ θlcosθ + θ 2 L sin θ) = P x (2.3.5) Linear acceleration of rod CM in ˆn = cos θî + sin θĵ direction: m r (ẍ cos θ θl) = m r g sin θ + P y sin θ + P x cos θ (2.3.6) 2

2.4 Derivation of Equations of Motion Using the dynamic equations we can derive the equations of motion: Starting with (??), rearrange to get P y sin θ + P x cos θ = I r θ + τ L plug the above equation into (??) m r (ẍ cos θ θl) = m r g sin θ + I r θ + τ L multiplying everything by L and distributing m r (2.4.1) (2.4.2) m r Lẍ cos θ m r θl 2 = m r gl sin θ + I r θ + τ (2.4.3) and rearrange to get Equation of Motion #1 (m r L cos θ)ẍ + (I r + m r L 2 ) θ = m r gl sin θ τ (2.4.4) Now using the (??) and (??) P x = m w ẍ F (2.4.5) Plugging both into (??) F = I w φ τ R (2.4.6) m r (ẍ θl cos θ + θ 2 L sin θ) = m w ẍ F (2.4.7) m r (ẍ θl cos θ + θ 2 L sin θ) = m w ẍ + I w φ τ (2.4.8) R multiplying everything by R and distrubuting m r m r Rẍ m r R θl cos θ + m r R θ 2 L sin θ = m w Rẍ + I w φ τ (2.4.9) and rearrange to get to get Equation of Motion #2 I w φ (mr R + m w R)ẍ + (m r RL cos θ) θ = m r R θ 2 L sin θ + τ (2.4.10) Now applying no slip condition, ẍ = R φ, to (??) and (??) Final Equations of Motion for the MIP are: (m r RL cos θ) φ + (I r + m r L 2 ) θ = m r gl sin θ τ (2.4.11) (I w + (m r + m w )R 2 ) φ + (m r RL cos θ) θ = m r RL θ 2 sin θ + τ (2.4.12) 3

2.5 Re-derivation of Equations of Motion using Lagrangian Dynamics Kinetic Energy of Wheel: T w = 1 2 m wẋ 2 + 1 2 I w φ 2 (2.5.1) Kinetic Energy of Rod: T r = 1 2 m r(ẋ L θ cos θ) 2 + 1 2 m r(l θ sin θ) 2 + 1 2 I r θ 2 (2.5.2) Potential Energy: V = m r gl cos θ (2.5.3) Now using the Euler-Lagrange Equation: d dt ( L ) L q i q (2.5.4) where the lagrangian is written as L = T w + T r V (2.5.5) and the generalized coordinate is x q = φ (2.5.6) θ d dt ( L ẋ ) L x = d dt (m wẋ + m r (ẋ L θ cos θ)) + 0 (2.5.7) = m w ẍ + m r ẍ m r L θ cos θ + m r L θ 2 sin θ (2.5.8) d dt ( L L ) φ φ = d dt (I w φ) 0 (2.5.9) = I w φ (2.5.10) d dt ( L θ ) = d dt ( m rl(ẋ L θ cos θ) cos θ + m r L(L θ sin θ) sin θ + I r θ) (2.5.11) = d dt ( m rlẋ cos θ + m r L 2 θ + Ir θ) (2.5.12) = m r L(ẍ cos θ ẋ θ sin θ) + m r L 2 θ + Ir θ (2.5.13) L θ = m rl θ sin θ(ẋ L θ cos θ) + m r L θ cos θ(l θ sin θ) + m r gl sin θ (2.5.14) 4

Putting everything together, you get: (m w + m r )ẍ (m r L cos θ) θ + m r L θ 2 sin θ = Q x (2.5.15) I w φ = Qφ (2.5.16) ( m r L cos θ)ẍ + (I r + m r L 2 ) θ m r gl sin θ = Q θ (2.5.17) Now by solving the Euler-Lagrange equations, the equations of motion can be written in the form: S T M(q)S ν + S T F (q, q) = S T B(q)u (2.5.18) where u is the torque from the motors. Now using the equations found above and putting them into the form above, you get: (m w + m r ) 0 (m r L cos θ) M(q) = 0 I w 0 (2.5.19) ( m r L cos θ) 0 (I r + m r L 2 ) x ẋ q = φ, q = φ, ν = θ θ [ ] φ, F (q, q) = θ m r L θ 2 sin θ 0 m r gl sin θ, B = Now defining the no slip equation ẋ + R φ = 0 and applying it: 0 1 1 A = [ 1 R 0 ] (2.5.20) R 0 S = 1 0 (2.5.21) 0 1 Plugging in everything into equation??, you get: [ (mw + m r )R 2 ] [ ] [ + I w m r RL cos θ) φ mr RL (m r RL cos θ) (I r + m r L 2 + θ 2 ] sin θ = ) θ m r gl sin θ [ ] τ τ (2.5.22) Finally, multiplying through all the matrices you get the below equations of motion for the MIP which are the same as those computed previously. (I w + (m w + m r )R 2 ) φ + (m r RL cos θ) θ = m r RL θ 2 sin θ + τ (2.5.23) 3 Control of MIP (m r RL cos θ) φ + (I r + m r L 2 ) θ = m r gl sin θ τ (2.5.24) There are a number of ways that we control ifling or a segway as it is a SIMO system. We will develop both a controller using classical controls and state space control 5

3.1 Classical Controls Typically classical controls are used to develop a controller for a SISO system. In the case of ifling/segway we have a SIMO system. As this system has two modes of interest (controlling θ and φ) that have natural frequencies that are significantly different we can use a method called Successive Loop Closure (SLC). SLC allows us to apply classical control techniques to control SIMO systems. The basic idea behind SLC is that we can create a feedback loop within a second feedback loop as depicted in figure??. The inner loop contains the control of the fast dynamics (θ) while the outer feedback loop contains the controls of the slower dynamics (φ). Figure 3: Successive loop closure of a SIMO plant G(s) designed with fast θ dynamics and slow φ dynamics. Note this is the idealization of the system for the purpose of control design. Starting with the Equations of motion for ifling found in previous sections: Linearize ( using small angle approximation) the equations of motion: (I w + (m w + m r )R 2 ) φ + (m r RL) θ = τ (3.1.1) (m r RL) φ + (I r + m r L 2 ) θ = m r glθ τ (3.1.2) Now take the Laplace transform of the linearized equations of motion: (I w + (m w + m r )R 2 )s 2 Φ + (m r RL)s 2 Θ = τ (3.1.3) (m r RL)s 2 Φ + (I r + m r L 2 )s 2 Θ = m r glθ τ (3.1.4) Now to get the transfer function of the fast dynamics we want Θ τ. So solve for phi and then plug it into the next other equation Φ = τ m r RLs 2 Θ (I w + (m w + m r )R 2 )s 2 (3.1.5) m r RLτ m 2 rr 2 L 2 s 2 Θ+(I w +(m w +m r )R 2 )(I r +m r L 2 )s 2 Θ = (m r glθ τ)(i w +(m w +m r )R 2 ) (3.1.6) Solving for Θ τ and simplifying, the transfer function for fast dynamics of ifling is: 6

G 1 = Θ τ = m r RL + I w + (m w + m r )R 2 ( (I w + (m w + m r )R 2 )(I r + m r L 2 ) + m 2 rr 2 L 2 )s 2 + m r gl(i w + (m w + m r )R 2 ) (3.1.7) Going through the same process of finding the fast dynamics transfer function using equations(??) we can find also find the slow dynamics transfer function, Φ Θ G 2 = Φ Θ = (I r + m r RL)s 2 + m r gl (I w + (m w + m r )R 2 + m r RL)s 2 (3.1.8) Now that we have the transfer functions for the fast (G1) and slow (G2) system we can design the controllers that stabilize the fast (G1) and slow (G2) dynamics of the system. Note that though we will be finding the controllers necessary to control the system that these controllers will only work in simulations. The controllers will very likely fail to control the MIP in reality. The reason for this is that our current transfer functions do not not include the motor dynamics. This will be introduced in the next section. The reader is also encouraged to write a MatLab program to help in designing a controller as this is an iterative process. The reader is highly discourage from applying the random control design (RCD) strategies facilitated by root locus graphical user interfaces such as sisotool in Matlab. 3.1.1 Design of the Fast Controller Without Motor Dynamics Figure 4: Root Locus, Bode Plot and Step Response for the Fast Inner Loop. 7

To start the design of the controller plot the root locus for G1. Looking at the uncontrolled root locus in the above figure it should be apparent that a lead controller with negative gain is needed to bring the root locus into the stable region (left hand plane). To determine the amount of lead required we will need to determine our desired crossover frequency (ω c ). To do this will need to first selected an appropriate rise time (t r ) to stabilize the fast system quickly. A good start for a MIP will be t r = 0.07secs Now, knowing our desired t r, the desired crossover frequency can be found using the following rule of thumb: w c = 1.8 = 1.8 = 25.714 (3.1.9) t r 0.07 With a desired crossover frequency (ω cdesired ) we will also want to selected a desired dampening (ζ) for the system. Let choose ζ =.55. Using this information we get the following equation: 1 p/z 1 φ max = sin p/z + 1 p z = 1 + sin(100ζ) = 10 (3.1.10) 1 sin(100ζ) Finally, the last equation needed for the design of a lead controller is: ω cdesired = 2 zp zp = 25.714 2 (3.1.11) Now with the knowledge that pz = 25.714 2 and p/z = 10 we can determine the pole and zero of the lead controller. From here we can look at the bode plot to determine the amount of gain (K) needed to place our crossover frequency at the desired frequency of 25.714 rad/sec. Once we have our crossover frequency set we can look at the closed loop step response to double check that we have a stable system with the desired performance. The resulting controller (D1) using the provide mass properties of MyMIP and the method outline above is: Note: Notice the negative gain! D1 = 1.3700 s + 8.1316 s + 81.3157 (3.1.12) 3.1.2 Design of the Slow Controller Without Motor Dynamics The process for designing the slow controller (D2) is exactly the same as designing the fast controller (D1), in this case, even though the root locus is different. A lead controller will need to be used to bring the root locus into the stable region. The difference between the slow controller and the fast controller as mentioned before is with the desired crossover frequency, which allows for the use of SLC. Lets use a desired t r = 0.7secs for the outer loop. Going through exactly the same steps as outlined in the design of the fast controller section the resulting controller for the slow system will be: 8

Figure 5: Root Locus, Bode Plot and Step Response for the Slow Outer Loop. Notice: No negative gain this time! D1 = 0.1076 s + 0.8132 s + 8.1316 (3.1.13) 3.1.3 The Final SLC Controlled System Without Motor Dynamics Figure 6: Root Locus, Bode Plot and Step Response for the Slow Outer Loop. Note that the provide rise time and dampening values are provided as a good starting point for designing the controllers for MIPs. These controllers are not meant to be the best that can be designed. They were used only to show the reader the process involved 9

in designing a controller for each system. It is strongly encouraged that the read play around with the rise time and dampening values to see their affect on the controllers and the control of the overall system. // 10