THE REACTION WHEEL PENDULUM

Similar documents
Mechatronic System Case Study: Rotary Inverted Pendulum Dynamic System Investigation

Automatic Control Systems. -Lecture Note 15-

Example: Modeling DC Motor Position Physical Setup System Equations Design Requirements MATLAB Representation and Open-Loop Response

Example: DC Motor Speed Modeling

Real-Time Implementation of a LQR-Based Controller for the Stabilization of a Double Inverted Pendulum

The Control of an Inverted Pendulum

Lab 6a: Pole Placement for the Inverted Pendulum

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

FEEDBACK CONTROL SYSTEMS

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

Inverted Pendulum System

DC Motor Position: System Modeling

Stabilization of Motion of the Segway 1

Lecture 9 Nonlinear Control Design. Course Outline. Exact linearization: example [one-link robot] Exact Feedback Linearization

Appendix A: Exercise Problems on Classical Feedback Control Theory (Chaps. 1 and 2)

The Control of an Inverted Pendulum

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Mechanical Engineering 2.04A Systems and Controls Spring 2013

Satellite Attitude Control System Design Using Reaction Wheels Bhanu Gouda Brian Fast Dan Simon

Inverted Pendulum: State-Space Methods for Controller Design

Modeling and control design for a semi-active suspension system with magnetorheological rotary brake

Double Inverted Pendulum (DBIP)

MEM04: Rotary Inverted Pendulum

ECEN 420 LINEAR CONTROL SYSTEMS. Lecture 6 Mathematical Representation of Physical Systems II 1/67

Lab 3: Quanser Hardware and Proportional Control

Rotary Motion Servo Plant: SRV02. Rotary Experiment #11: 1-DOF Torsion. 1-DOF Torsion Position Control using QuaRC. Student Manual

Kinetic Energy of Rolling

Design and Comparison of Different Controllers to Stabilize a Rotary Inverted Pendulum

ME 3210 Mechatronics II Laboratory Lab 4: DC Motor Characteristics

Quanser NI-ELVIS Trainer (QNET) Series: QNET Experiment #02: DC Motor Position Control. DC Motor Control Trainer (DCMCT) Student Manual

Laboratory Exercise 1 DC servo

Dr Ian R. Manchester Dr Ian R. Manchester AMME 3500 : Review

MEAM 510 Fall 2011 Bruce D. Kothmann

DC-motor PID control

Manufacturing Equipment Control

Lab 5a: Pole Placement for the Inverted Pendulum

Mechatronics Modeling and Analysis of Dynamic Systems Case-Study Exercise

ENGG4420 LECTURE 7. CHAPTER 1 BY RADU MURESAN Page 1. September :29 PM

The control of a gantry

Introduction to Control (034040) lecture no. 2

Department of Mechanical Engineering

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

Automatic Control II Computer exercise 3. LQG Design

MEAM 510 Fall 2012 Bruce D. Kothmann

Dynamic Modeling of Rotary Double Inverted Pendulum Using Classical Mechanics

ECE 5670/6670 Lab 8. Torque Curves of Induction Motors. Objectives

Control of Electromechanical Systems

EE 422G - Signals and Systems Laboratory

Digital Control Semester Project

University of Utah Electrical & Computer Engineering Department ECE 3510 Lab 9 Inverted Pendulum

Lecture 9 Nonlinear Control Design

FAULT DETECTION for SPACECRAFT ATTITUDE CONTROL SYSTEM. M. Amin Vahid D. Mechanical Engineering Department Concordia University December 19 th, 2010

System Parameters and Frequency Response MAE 433 Spring 2012 Lab 2

Line following of a mobile robot

Lab 11: Rotational Dynamics

Linear Motion Servo Plant: IP02. Linear Experiment #4: Pole Placement. Single Pendulum Gantry (SPG) Student Handout

Position Control Experiment MAE171a

Linear Experiment #11: LQR Control. Linear Flexible Joint Cart Plus Single Inverted Pendulum (LFJC+SIP) Student Handout

UNIVERSITY OF WASHINGTON Department of Aeronautics and Astronautics

Rotary Inverted Pendulum

Mechatronics Engineering. Li Wen

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) =

kx m x B N 1 C L, M Mg θ

QNET Experiment #04: Inverted Pendulum Control. Rotary Pendulum (ROTPEN) Inverted Pendulum Trainer. Instructor Manual

Stepping Motors. Chapter 11 L E L F L D

Acceleration Feedback

Introduction to Feedback Control

Lecture 12. Upcoming labs: Final Exam on 12/21/2015 (Monday)10:30-12:30

Bangladesh University of Engineering and Technology. EEE 402: Control System I Laboratory

State Feedback Controller for Position Control of a Flexible Link

(Refer Slide Time: 00:01:30 min)

Lab 3: Model based Position Control of a Cart

Lecture Module 5: Introduction to Attitude Stabilization and Control

Video 5.1 Vijay Kumar and Ani Hsieh

YTÜ Mechanical Engineering Department

Lecture 6: Control Problems and Solutions. CS 344R: Robotics Benjamin Kuipers

DEVELOPMENT OF DIRECT TORQUE CONTROL MODELWITH USING SVI FOR THREE PHASE INDUCTION MOTOR

Linear State Feedback Controller Design

YTÜ Mechanical Engineering Department

Laboratory 11 Control Systems Laboratory ECE3557. State Feedback Controller for Position Control of a Flexible Joint

Control System Design

Embedded Control: Applications and Theory

Rotational Kinetic Energy

Two-Mass, Three-Spring Dynamic System Investigation Case Study

1 Introduction. 2 Process description

Coupled Drive Apparatus Modelling and Simulation

Understanding Precession

Matlab-Based Tools for Analysis and Control of Inverted Pendula Systems

Trajectory-tracking control of a planar 3-RRR parallel manipulator

SRV02-Series Rotary Experiment # 1. Position Control. Student Handout

Final Examination Thursday May Please initial the statement below to show that you have read it

Represent this system in terms of a block diagram consisting only of. g From Newton s law: 2 : θ sin θ 9 θ ` T

Physics 351, Spring 2015, Homework #6. Due at start of class, Friday, February 27, 2015

System simulation using Matlab, state plane plots

Advanced Control Theory

D(s) G(s) A control system design definition

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

Passivity-based Control of Euler-Lagrange Systems

Positioning Servo Design Example

Multivariable Control Laboratory experiment 2 The Quadruple Tank 1

2.004 Dynamics and Control II Spring 2008

Transcription:

THE REACTION WHEEL PENDULUM By Ana Navarro Yu-Han Sun Final Report for ECE 486, Control Systems, Fall 2013 TA: Dan Soberal 16 December 2013 Thursday 3-6pm

Contents 1. Introduction... 1 1.1 Sensors (Encoders)... 1 1.2 Actuators... 1 1.3 The Equilibrium Positions... 1 1.4 Implementation... 2 2 Mathematical Model... 3 2.1 Derivation of differential equations from Lagrangian... 3 2.1.1 Summary... 5 2.2 Linearization into state space form... 5 3. Full State Feedback Control with Friction Compensation... 7 3.1 PI Controller with friction compensation... 7 3.1.1 P controller... 7 3.1.2 Angular Approximation... 8 3.1.3 PI controller... 8 3.1.4 Friction compensator... 9 3.1.5 Friction compensator implementation... 10 3.2 Stability Proof... 11 3.3 Maximum Disturbance... 11 3.4 Windows Target Implementation... 12 4. Full State Feedback Control with Decoupled Observer... 13 4.1 Observers... 13 4.1.1 Why Observers... 13 4.1.2 Decoupling... 14 4.2 Error Stability Proof... 15 4.3 Maximum disturbance... 15 4.4 Windows Target Implementation... 16 5. Conclusion... 17 6. Extra Credit... 18 6.1 Up and Down Stabilizing Control... 18 6.2 Swing-Up Control... 19 ii

1. Introduction The Reaction Wheel Pendulum (RWP) consists of a pendulum with a rotating wheel (rotor). The rotor is actuated by a 24 volt magnet DC motor mounted on the pendulum. This motor can produce a torque on the wheel and causes the wheel to spin. The momentum from the spinning wheel causes the pendulum to move. In this project, we use the motor to control the movement of the pendulum. Figure 1.1 Schematic Diagram of System 1.1 Sensors (Encoders) The RWP is provided with two optical encoders. These encoders are relative as opposed to absolute encoders. They measure relative angle between the fixed and moving rotor. These values are initialized to zero at the start of each run. These two relative encoders are: : The relative angle between the pendulum and fixed base. : relative angle between the pendulum and wheel These encoder angles can be used to define a set of generalized coordinates to represent our system. : The angle of the pendulum measured counterclockwise from the vertical : The angle of the rotor measured counterclockwise from the vertical 1.2 Actuators There is one actuator in our entire system. This is the 24 volt magnet DC motor mounted on the pendulum. 1.3 The Equilibrium Positions The RWP has two equilibrium points: 1. Up: This equilibrium point is unstable because gravity will force the pendulum out of this position and is the point we are interested in designing our system to stay in. This location is at. 2. Down: This position is stable, because the gravity forces the rotor and pendulum to stay in this position. We denote this location as. 1

Figure 1.2 Unstable and Stable Equilibrium Points 1.4 Implementation In order to control the encoders, it was made a model with Windows Target. The model was made basis on the file c6xlib. This system has two encoder values, we only used one Encoder block for both data channels. To access both, we used the Demux block at the Encoder block output. The upper output of the Demux is channel 0 and the bottom channel is channel 1. Figure 1.3 Encoder Implementation 2

2 Mathematical Model We already know that the RWP uses relative encoders that measure relative angles and these can be used to create generalized equations about our system models. We will be using the Lagrangian method which allows us to deal with scalar rather than vectors which is a simple and convenient method of deriving equations of motion in electromechanical systems. 2.1 Derivation of differential equations from Lagrangian The RWP has two degrees of freedom, being the angles of the pendulum and of the rotor. In order to define the mathematical model, the next variables were defined: mp mr m Jp Jr lp lr l k i mass of the pendulum and motor housing/stator mass of the rotor combined mass of rotor and pendulum moment of inertia of the pendulum about its center of mass moment of inertia of the rotor about its center of mass distance from pivot to the center of mass of the pendulum distance from pivot to the center of mass of the rotor distance from pivot to the center of mass of pendulum and rotor torque constant of the motor input current to motor First, we define a set of generalized coordinates q1 and q2 as follows to represent our 2 degrees of freedom (DOF) system. Next, we compute the Kinetic Energy and Potential Energy equations in terms of these generalized coordinates. Figure 2.1 Schematic maximum and minimum position of the pendulum Potential and Kinetic Energies of Pendulum and Rotor 3

Potential Energy (P) Kinetic Energy(P) Potential Energy(R) Kinetic Energy(R) The Rotor potential energy is always zero because the rotor height is less than the pendulum length the height of the rotor is zero in every moment of the movement. The Lagrangian is defined as the difference between the kinetic and potential energies. The lagrangian is a function of the generalized coordinates and their derivatives: Thus, the Lagrangian equations of the RWP system are: And the derivatives respect to the generalized coordinates qr and qp, which were defined previously are: To define the torque of the pendulum and rotor, the next relation was used: Now, integrating everything in the form: generalized torque in the kth direction. where τk is the 4

The Lagrange equations of the system are: Lagrange Equations of Pendulum and Rotor Lagrange Equations Pendulum Lagrange Equations Rotor After that, we integrated the friction to our system. The mass on the pendulum is large enough that the friction on the pendulum link can be ignored. However, there is a significant amount of friction on the rotor link. Because of the rotor is attached directly to the motor we modeled the friction as follow: The motor current i is generated by a pulse width modulation system, which is controlled from the computer. Due to current feedback, the current is proportional to the control command u from the computer. The control variable used in the computer is scaled so that 10 units correspond to maximum current. Therefore: We assume the friction is a function of the rotor speed F(ωr), and the resulting equations are: Or we can write them in the next form: where: 2.1.1 Summary 2.2 Linearization into state space form The Reaction Wheel Pendulum (RWP) has equations of motion, ignoring friction, given by 5

With this equations and two more variables that we defined as: Our system is nonlinear, thus we linearize it about the equilibrium point that we chose:, in other words, we linearized about the inverted position. With this equilibrium point we defined the next equations: And we linearized the sinusoidal function: Our final equations after the linearization are: With this equations we got the next matrix: 6

3. Full State Feedback Control with Friction Compensation We want to model the friction in terms of velocity. Because the information provided from the encoders are not velocity, we use an approximation instead. The motion of the wheel can be modeled as: where Jr is moment of inertia, and ωr is the speed of the rotor. There is also friction, due mainly to the motor brushes and represented as a torque τf. To obtain ωr, we take the first derivative of θr. Putting the motion of the wheel equation in terms of friction, we got the following: 3.1 PI Controller with friction compensation 3.1.1 P controller In order to develop a PI control with friction compensation, first we design the p controller without the friction compensator using the next block diagram: Figure 3.1 General block diagram of velocity controller Computing the transfer function of this block diagram, we got the following: We know that br = 198 and that the rise time is inversely proportional to the factor σ, which represent the pole real part in the s-plane. Therefore we can conclude: Looking at P control only, for a rise time of 0.2 sec and using the following rise time equation, we can compute the value of Kp: 7

We chose a gain Kp of 0.0555. However, P control is not enough to get rid of steady state error. Figure 3.2 Simulink P control block diagram 3.1.2 Angular Approximation In order to implement our proportional controller it is necessary to estimate the angular velocity of our RWP. We used a continuous derivative approximation to estimate the angular velocity of the wheel and the pendulum. This approximation consist in to keep the frequency response of the derivative function s similar at low frequencies, but refrain from amplifying the high frequency noise. To accomplish this we place a pole at a sufficiently high frequency, we got the following transfer function: 3.1.3 PI controller Because of a P control is not enough to get rid of steady state error, we designed a PI control to meet the specification of no steady state error. First we computed the damping ratio ( ζ ) and frequency (ωn ) based on the specifications: We used ωn = 5.45 and ζ=0.545 to develop our PI controller. The transfer function of our controller G(s) and the transfer function of our system H(s) are: To compute we used the denominator of our system transfer function and the characteristic polynomial for a second order transfer function: 8

3.1.4 Friction compensator To characterize friction we used the control effort of our system using a closed-loop system identification. Analyzing the following friction equation, defined before: We see that for non-zero friction, the control effort will be non-zero as well. The value of friction for any velocity is merely the steady state control effort for a setpoint of that velocity. Thus, we defined the following equation: where ucl is the closed-loop controller. In order to find an expression for F(ω), we developed a series of experiments running the motor at various speeds and recording the steady-state control effort for each speed. We did this for negative and positive velocities. After, we plot and fit the data acquired in a plot of ω vs ucl.we got the next results: Figure 3.3 Negative Velocities Plot 9

Figure 3.4 Positive Velocities Plot Then we compute the values for +b and +c from the linear equation got from the positive velocities plot, and we computed the values -b and -c from the linear equation got from the negative velocities plot. With this information we wrote one positive and one negative expression for F(ω): 3.1.5 Friction compensator implementation With this values of +b,-b,+c and -c we add the friction compensator to our system with the block Coulomb and viscous friction. The final block diagram of our system is the following: Figure 3.5 With and Without Friction Compensation Systems We made a comparison between the results implementing the P controller, PI controller and with or without friction compensator in our system. The results are the following: 10

The conclusion of this table is that it is unnecessary to implement the friction compensator with any kind of controller, because the friction compensator can meet the specifications by itself. This is possible because the unique disturbance of our system is the friction and we are eliminating it with the friction compensator. 3.2 Stability Proof Because of we don t care what θr is, and it does not affect any of the other states we created the following system in order to check the stability of our system: Then we computed the equilibrium points of our system solving the following equations: From this equations we concluded that the equilibrium points are: 3.3 Maximum Disturbance Max Two State Feedback Three-State Feedback IC dev 0.0439*π (δθp) 0.388*π (θp).0368*π (δθp) 0.331*π (θp) 11

Pulse 8.85 8.09 dist 6.47 7.51 3.4 Windows Target Implementation Figure 3.6 Three-State Feedback Control In Windows Target, x matrix delta_theta_p, theta_p_dot, delta_theta_r and theta_r_dot were multiplied with the respective feedback gain matrix K. Only three gains were applied since we have only a 3-state feedback control. These values were summed, saturated and put through the Motor. In Figure 3.6, we can see the constant pi was subtracted from theta_p to ensure that we are converging to the correct equilibrium point. 12

4. Full State Feedback Control with Decoupled Observer 4.1 Observers An observer is a dynamic system whose input includes the control u and the output y and whose output is an estimate of the state vector x. We use observers because not all state variables can be measured and therefore we need an estimate of the state vector for state feedback. 4.1.1 Why Observers The observer replaces the full state feedback controller we designed previously. The observer will estimate both velocities of the system. And since we re designing a full-order observer, it will also estimate both positions. Observer poles have to be sufficiently farther than the desired closed loop poles. Figure 4.1 Illustration of Pole locations There were originally four states together as shown in this diagram: Figure 4.2 Block Diagram of System with Observer the standard differential equation for an observer is: 13

where: The above equation can be manipulated to be in the familiar form of Ax+Bu: The derivation is as follows: In conclusion, our Observer state form can be broken down into A, B, C and D matrices. 4.1.2 Decoupling We can decouple the Observer because our state-space model has the form of: Matrix A can be sectioned off into blocks of 2x2 matrices where the top right and bottom left blocks are 0. 14

such that our new vector Equations are This proves that our subsystems are independent of each other, in other words decoupled. This is because A is in block diagonal form. This property also proves that the eigenvalues of A is the union of the eigenvalues of M and the eigenvalues of N. Because of this, we can create the two blocks indepently in matlab with the place command and keep the same poles. Unfortunately, Matlab doesn t check for independence, so our A-LC matrix is wrong. However, it is sufficient to just zero out the terms instead of calculating the block diagonals and then combining. 4.2 Error Stability Proof 4.3 Maximum disturbance Max Observer 4-state Observer 2-state IC deviation 0.0266*π (δθp) 0.206*π (θp) 0.0365*π (δθp) 0.317*π (θp) Pulse 6.19 6.95 Disturbance 5.89 6.75 15

4.4 Windows Target Implementation Figure 4.3 Windows Target simulation with observer In the simulation, we take the decoded relative angles to create θp and θr. Then take the derivative for theta_p_dot and theta_r_dot. These four values are being fed into the observer State System whose A, B, C and D matrices are the observer matrices. The matrix K is from the previous 3-state feedback controller. And the -1 gain makes sure that that K is negative. The results are combined with the friction compensator and then the resulting u re-enters the Motor. 16

5. Conclusion 17

6. Extra Credit 6.1 Up and Down Stabilizing Control In the previous chapters, when the pendulum fell outside a maximum IC deviation, the pendulum would become unstable and try endlessly to return back to the equilibrium point at theta_p = pi. In this section, we use switching control such that if the pendulum falls outside the theta_p=pi equilibrium point, the pendulum will converge to a second equilibrium point theta_p=0. Figure 6.1 Switching Control The down controller is for the lower equilibrium point and the up controller is for the upper equilibrium point as from the previous sections. The deciding factor uses the function block cosine on theta_p. If the cosine of theta_p is greater than the breakpoint, then we use down control and if it is less than the breakpoint, we use up control. The down controller requires a new set of feedback values that converge to the other equilibrium point. The derivation is as follows. Since the only difference between this controller and the previous controller is that delta_theta_p = theta_p+0 instead of theta_p_pi, then: Where the resulting K values were: 18

Figure 6.2 Switch Control for two equilibrium points 6.2 Swing-Up Control Non-linear control can be useful when used with other control algoithms. We use a switch to switch between nonlinear and linear control. The switch is approximately the same as the previous switch control, with the cosine of the angle as a deciding factor. The idea for swing-up control is to give momentum to the system at the correct times and location. Figure 6.3 Illustration of Nonlinear Swingup Control This can be achieved by looking at energy. We can measure kinetic and potential energy and based on this information, determine how much work the motor must do onto the wheel to propel the pendulum upwards. 19

In the Windows Target implementation, we can see that if the cosine of theta_p causes the switch control to switch to non-linear control, the new system implements the above equations with a gain of 8.8 (found through trial and error) that will swing the system up. Figure 6.4 Switch Control for Up Swing 20