Inverted Pendulum Swing Up Controller

Similar documents
Motomatic Servo Control

ME 3200 Mechatronics I Laboratory Lab 8: Angular Position and Velocity Sensors

Robust Control Design for Rotary Inverted Pendulum Balance

Automatic Control Systems 2017 Spring Semester

Robotic Swing Drive as Exploit of Stiffness Control Implementation

THE SINUSOIDAL WAVEFORM

Where: (J LM ) is the load inertia referred to the motor shaft. 8.0 CONSIDERATIONS FOR THE CONTROL OF DC MICROMOTORS. 8.

MTE 360 Automatic Control Systems University of Waterloo, Department of Mechanical & Mechatronics Engineering

Introduction to Servo Control & PID Tuning

Lab Exercise 9: Stepper and Servo Motors

Laboratory Assignment 5 Digital Velocity and Position control of a D.C. motor

Wien-Bridge oscillator has simplified frequency control

Optimal Control System Design

The Mathematics of the Stewart Platform

L E C T U R E R, E L E C T R I C A L A N D M I C R O E L E C T R O N I C E N G I N E E R I N G

Design and Implementation of an Inverted Pendulum Controller to be used as a Lab Setup

Sfwr Eng/TRON 3DX4, Lab 4 Introduction to Computer Based Control

Control Design for Servomechanisms July 2005, Glasgow Detailed Training Course Agenda

DC SERVO MOTOR CONTROL SYSTEM

SRI VENKATESWARA COLLEGE OF ENGINEERING AND TECHNOLOGY

DC motor control using arduino

CHAPTER 11 TEST REVIEW -- MARKSCHEME

The Discussion of this exercise covers the following points: Angular position control block diagram and fundamentals. Power amplifier 0.

Segway Robot Designing And Simulating, Using BELBIC

Lab 2A: Introduction to Sensing and Data Acquisition

ACTUATORS AND SENSORS. Joint actuating system. Servomotors. Sensors

Figure 2.1 a. Block diagram representation of a system; b. block diagram representation of an interconnection of subsystems

School of Surveying and Construction Management

1. Measure angle in degrees and radians 2. Find coterminal angles 3. Determine the arc length of a circle

Position Control of DC Motor by Compensating Strategies

UNIVERSITY OF JORDAN Mechatronics Engineering Department Measurements & Control Lab Experiment no.1 DC Servo Motor

Hybrid LQG-Neural Controller for Inverted Pendulum System

Ball Balancing on a Beam

BENE 2163 ELECTRONIC SYSTEMS

Position and Velocity Sensors

3/23/2015. Chapter 11 Oscillations and Waves. Contents of Chapter 11. Contents of Chapter Simple Harmonic Motion Spring Oscillations

FUZZY LOGIC CONTROL FOR NON-LINEAR MODEL OF THE BALL AND BEAM SYSTEM

(i) Sine sweep (ii) Sine beat (iii) Time history (iv) Continuous sine

Feedback Devices. By John Mazurkiewicz. Baldor Electric

Technological Studies. - Applied Electronics (H) TECHNOLOGICAL STUDIES HIGHER APPLIED ELECTRONICS OP-AMPS. Craigmount High School 1

Module 7 : Design of Machine Foundations. Lecture 31 : Basics of soil dynamics [ Section 31.1: Introduction ]

Readings: FC: p : lead compensation. 9/9/2011 Classical Control 1

Closed-Loop Position Control, Proportional Mode

Final Reg Wave and Sound Review SHORT ANSWER. Write the word or phrase that best completes each statement or answers the question.

MSK4310 Demonstration

Penn State Erie, The Behrend College School of Engineering

Phasor. Phasor Diagram of a Sinusoidal Waveform

ECE 203 LAB 6: INVERTED PENDULUM

Interfacing dspace to the Quanser Rotary Series of Experiments (SRV02ET)

Servo Closed Loop Speed Control Transient Characteristics and Disturbances

Latest Control Technology in Inverters and Servo Systems

Brushed DC Motor Microcontroller PWM Speed Control with Optical Encoder and H-Bridge

Based on the ARM and PID Control Free Pendulum Balance System

DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING BANGLADESH UNIVERSITY OF ENGINEERING & TECHNOLOGY EEE 402 : CONTROL SYSTEMS SESSIONAL

Tracking Position Control of AC Servo Motor Using Enhanced Iterative Learning Control Strategy

Design and Development of Novel Two Axis Servo Control Mechanism

Fundamentals of Servo Motion Control

INTEGRATED CIRCUITS. AN1221 Switched-mode drives for DC motors. Author: Lester J. Hadley, Jr.

A Case Study in Modeling and Process Control: the Control of a Pilot Scale Heating and Ventilation System

PART 2 - ACTUATORS. 6.0 Stepper Motors. 6.1 Principle of Operation

Response spectrum Time history Power Spectral Density, PSD

SRV02-Series. Rotary Servo Plant. User Manual

Electrical Engineering XYZ Everything on Electrical Engineering

Active Vibration Isolation of an Unbalanced Machine Tool Spindle

D102. Damped Mechanical Oscillator

Modeling And Pid Cascade Control For Uav Type Quadrotor

VibroBlock Systems, Some Basic Concepts And the VBC 2000/2500

2. Experiment s Title: The Linear and Rotary Potentiometer - AMEM 211

A Do-and-See Approach for Learning Mechatronics Concepts

EE 368 Electronics Lab. Experiment 10 Operational Amplifier Applications (2)

Module 5. DC to AC Converters. Version 2 EE IIT, Kharagpur 1

CDS 101/110: Lecture 10-2 Loop Shaping Design Example. Richard M. Murray 2 December 2015

TigreSAT 2010 &2011 June Monthly Report

User Guide IRMCS3041 System Overview/Guide. Aengus Murray. Table of Contents. Introduction

Application Note #2442

Torque on a Current Loop: Motors. and Meters

The PID controller. Summary. Introduction to Control Systems

Experiment VI: The LRC Circuit and Resonance

Mechanical Spectrum Analyzer in Silicon using Micromachined Accelerometers with Time-Varying Electrostatic Feedback

A Searching Analyses for Best PID Tuning Method for CNC Servo Drive


Module 2: Lecture 4 Flight Control System

Intelligent Learning Control Strategies for Position Tracking of AC Servomotor

STATION NUMBER: LAB SECTION: RC Oscillators. LAB 5: RC Oscillators ELECTRICAL ENGINEERING 43/100. University Of California, Berkeley

MEM01: DC-Motor Servomechanism

Description of a Function Generator Instrument

combine regular DC-motors with a gear-box and an encoder/potentiometer to form a position control loop can only assume a limited range of angular

BME 3512 Bioelectronics Laboratory Five - Operational Amplifiers

ME 461 Laboratory #5 Characterization and Control of PMDC Motors

UNIT I. Operational Amplifiers

Vibration Fundamentals Training System

Operation and Maintenance Manual

LM13600 Dual Operational Transconductance Amplifiers with Linearizing Diodes and Buffers

Electric Circuit Fall 2016 Pingqiang Zhou LABORATORY 7. RC Oscillator. Guide. The Waveform Generator Lab Guide

Pre-Calculus Notes: Chapter 6 Graphs of Trigonometric Functions

(1.3.1) (1.3.2) It is the harmonic oscillator equation of motion, whose general solution is: (1.3.3)

ELECTRICAL CIRCUITS 6. OPERATIONAL AMPLIFIERS PART III DYNAMIC RESPONSE

PID CONTROL FOR TWO-WHEELED INVERTED PENDULUM (WIP) SYSTEM

Magnetic Levitation System

A Differential Look at the Watt s Governor

Transcription:

Dublin Institute of Technology ARROW@DIT Conference Papers School of Mechanical and Design Engineering 2011-09-29 Inverted Pendulum Swing Up Controller David Kennedy Dublin Institute of Technology, david.kennedy@dit.ie James Conlon Dublin Institute of Technology, James.Conlon@dit.ie Follow this and additional works at: http://arrow.dit.ie/engschmeccon Part of the Mechanical Engineering Commons Recommended Citation Kennedy, D., Conlon, J.: Inverted Pendulum Swing Up Controller. MTSM 2011: 2nd. International Conference, Split, Croatia, September 29th- 30th., 2011 This Conference Paper is brought to you for free and open access by the School of Mechanical and Design Engineering at ARROW@DIT. It has been accepted for inclusion in Conference Papers by an authorized administrator of ARROW@DIT. For more information, please contact yvonne.desmond@dit.ie, arrow.admin@dit.ie, brian.widdis@dit.ie. This work is licensed under a Creative Commons Attribution- Noncommercial-Share Alike 3.0 License

Inverted Pendulum Swing up Controller David Kennedy and James Conlon Department of Mechanical Engineering Dublin Institute of Technology 1.1 Abstract The inverted pendulum is a classic control problem. The system is open loop unstable and continuously wants to reach equilibrium by falling over. The system must be stabilised by means of feedback. The developed inverted pendulum system is shown in Figure 1. In order to balance the pendulum in the inverted position the pivot must be moved continuously to correct the falling pendulum. This is similar to trying to vertically balance a broom on your hand. This interesting control problem is fundamentally the same as those involved in rocket or missile propulsion. The rocket has to balance on its engine as it accelerates. As the rocket tends to fall over, the rocket thrust must be deflected sideways to restore the rockets course. This is just one of many practical applications of the system. This paper describes the technology introduced to achieve this design and development which is now a working piece of demonstration kit for control and mechatronic engineering. Keywords: Controls, Inverted Pendulum, Open-loop. Figure 1. Inverted Pendulum at rest and in active mode

2.1 Inverted Pendulum designs Figure 2. shows a basic schematic of the inverted pendulum Y P e n d u l u m P i v o t θ X Figure 2. Inverted Pendulum. The Pendulum is free to rotate at one end and is fixed to a pivot point at the other. The unit is free to move in the x-axis. This action (velocity, acceleration and deceleration) combined with the mass of the pendulum, creates enough momentum to force the pendulum to rotate and take up the inverted position as shown. The cart balanced Inverted Pendulum as shown in Figure 3. is the most common. As the pendulum falls one way the motor drives the cart in the same direction to prevent the pendulum from falling over. y Inverted Pendulum Belt Drive x θ Carriage Pulley Servo Motor Figure 3. The Cart balanced inverted pendulum A stabilisation controller keeps the pendulum in the inverted position by sending the appropriate signals to the servomotor. For the servo loop, a potentiometer was used for position feedback and a tachometer on the motor shaft for velocity feedback. A potentiometer was also used to measure pendulum angle θ. When switched off the pendulum is in the pendant position (hanging down). The purpose of the swing up controller is to swing the pendulum from the pendant position to the

inverted position at which point the stabilisation controller takes over to stabilise the pendulum and return the carriage to its desired position on the track. A simple swing up routine uses strategic cart movements to gradually add energy to the pendulum. This involves placing the cart under closed loop position control. Then a routine is developed to prescribe the cart s movement. This movement is such that the cart does work on the pendulum, in a consistent and efficient manner. It is also important to gradually reduce cart movement amplitude so that the swing up routine delivers the pendulum to the inverted pendulum position with small angular velocity [1]. A swing up strategy suggested by K. J. Åström and K. Furutais [2] was further developed and simplified as follows: From the resting pendent position: Switch the system to position control of the cart Drive the position control system with an appropriate displacement signal to raise the pendulum to above the horizon When the angle of the pendulum is small enough (with respect to the inverted position) switch to the stabilisation controller to keep the pendulum balanced. Developing a forcing function Based on Research and investigations of other inverted pendulums completing a swing up routine, the relationship between the movement of the carriage and the pendulum angle was observed. This led to the design and specification of the type of displacement signal that should be applied to the carriage. Based on this, a computer simulation of the motion of the carriage and pendulum was developed. 2.2 Solid edge motion Simulation A model representing a simplified version of the track, carriage and pendulum was constructed and the solid edge model is shown in Figure 4. Figure 4 Solid Edge model of a track, carriage and pendulum system. The joints in the model are defined. For example the pendulum is supported by and free to rotate around the potentiometer shaft and the carriage is free to translate along the track. Once the model was constructed, different functions could be applied to the carriage and the motion of the pendulum observed. A harmonic force (sine wave) was applied to the carriage and the motion of the pendulum noted. After some redesign and alteration to the amplitude and frequency of a sin wave it was clear that a sin wave of a certain amplitude and frequency would swing the pendulum to the inverted position.

Figure 5 shows a series of images taken from the solid edge program during the computer simulation. Figure 5. Computer simulation positions of pendulum due to input signals Sine waves of varying amplitude and frequency were applied to the cart and optimum values recorded. The optimum values are the values which cause the pendulum to

approach the inverted position with as small an angular velocity as possible. The length of the track sets an obvious limitation on the maximum amplitude that can be applied. The optimum values for the harmonic function to swing up the pendulum from the pendant position to the inverted position were: Amplitude = 350mm Frequency = 232deg/sec The equation of the harmonic function in solid edge is given by f(t) = A.sin(w.(t-T0)-j)+B (1) Where A = Amplitude w = Frequency T0 = Offset Time j = Phase shift B = Average value With T0, B and j equal to zero this reduces to the simple function f(t) = A*sin(wt) (2) Figure 6. shows some of the values for the simulation applied to Solid Edge. Figure 6. Solid Edge Simulation values

The required carriage movement is sinusoidal, with amplitude (distance) 350mm and frequency 232deg/sec. Different values would be obtained for different carriage and pendulum masses. The carriage position potentiometer voltage varied from -9.31V to +9.31V over the entire length of track. Track length = 918mm Therefore 18.62V = 0.02V / mm of track 918mm Therefore an Amplitude of 350mm = 350mm X 0.02V/mm = 7V The frequency of 232 deg/sec must be converted to a frequency in Hz. 232deg/ sec = 360deg 0.644Hz A sine wave generator was used to apply a sine wave of 14V peak to peak with frequency 0.644 Hz to the position loop set point. The response of the pendulum was then observed. These values were fine tuned to improve performance. The tuning process was found to be very simple and straightforward. The pendulum did swing from the pendant position to the inverted position and did so in a most predictable and repetitive manner. 2.3 Switching Criteria As the pendulum approaches the inverted position a method of switching between the swing up controller and stabilization controller is required. Three switching criteria were considered. 1. The stabilization controller has a limited region around the 0 (vertical) position in which it can control the pendulum. This is because the stabilization controller is based on the linearised system about the 0 point. If the stabilization controller is switched on when the pendulum is outside this region of attraction the system will not be able to stabilize the pendulum. 2. The pendulum must have an angular velocity below a certain value when the stabilization controller switches on. If the angular velocity is too large it will cause the motor to apply a large force to the carriage to try and catch the pendulum, causing the carriage to run out of track. 3. The pendulum should not be allowed to go through the 0 vertical as this would lead the pendulum to perform nonlinear rotation around its pivot with a non zero velocity. The best switching moment occurs when the pendulum is approaching the

0 vertical position with a small angular velocity. The switchover method is illustrated in Figure 7. Reference + Swing up controller - Stabilisation controller Servo set point Position servo Carriage position Pendulum Mass position Switchover relay Figure 7. Switch over design The literature suggested switching from the swing up controller to the stabilization controller at an angle within + or - 5 of the vertical and an angular velocity of less than 3rad/sec. It was decided to investigate the possibility of switching from the swing up controller to the stabilisation controller using the pendulum angular position only. A simple circuit comprising a general purpose 741 operational amplifier configured as a comparator and whose output switched a transistorised relay was designed to control the switch over and this is illustrated in Figure 8. +12V 2 Pendulum Angle θ 10K Pendulum offset 10K +12V -12V +12V 100 100K 33K - + 100K θ +12V 10K -12V + - Switch over value set 5 Swing up detect θ 7 transistorised Plug in relay To stabilisation controller 10-12V Figure 8. 741 Operational Amplifier

3.1 Pendulum potentiometer offset When the pendulum is balanced the output from the pendulum angle potentiometer should be 0 volts. Also, for the swing up controller to operate correctly the pendulum angle signal must always be known. Since the θ potentiometer has a dead zone where no voltage output is available a design modification is required. This dead zone (in the pendant position) is illustrated in Figure 9 (a). To ensure an output signal at all times the potentiometer is rotated such that during swing up from the pendant position to the balanced position an output signal is always present, even when the pendulum swings slightly anti clockwise on swing up. This means that when the pendulum is vertical, the output voltage is not 0 volts. This is illustrated in figure 9 (b). This makes it necessary to subtract a value from the potentiometer such that a value of 0 volts is available when the pendulum is balanced. This was achieved using an inverting summer configuration (IC1) and pendulum offset potentiometer as shown in Figure 8. The pendulum is held in the vertical position and the pendulum offset potentiometer adjusted such that the output from the operational amplifier is 0 volts. Figure 9 (a) Pendant Position Figure 9 (b) Activated Initially with the pendulum in the pendant position the comparator (IC9)is negatively saturated and the relay is in the position shown allowing the sine wave to drive the motor so as to increase the kinetic energy of the pendulum. As the pendulum moves towards the inverted position the voltage from the pendulum potentiometer gets smaller. When this voltage is less than the voltage on the non inverting input of the comparator the output becomes positively saturated and the relay switches. The relay switches from swing up to balance and the Pendulum remains balanced. The pendulum offset potentiometer was adjusted to achieve optimum switchover. The optimum angle to switchover was larger than expected, approximately 70 o from the vertical. The design was completed using an Intersil 8038 function generator chip to generate the low frequency sin wave. The diode was fitted to ensure that only a positive half cycle was applied. This ensures that the carriage always swings up in the same direction from the middle of the track. The relay connections and function generator are illustrated in Figure 10.

-12V 5.5K 50K Period adjust 1K +12V Swing up function generator 4 5 6 7 Intersil 8 8038 2 10 11 12 Swing up start 4.7uF 68K IC8 IN4148 100K Amplitude adjust + - 6K 14K -12V To position servo setpoint 1 11 4 3 8 9 12V transistorised Plug in relay From stabilisation controller Figure 10. The relay connections and function generator 4.1 Conclusions The swing up controller is efficient and reliable. Its repeatability to swing the pendulum to the vertical position is consistent. The switch over is seamless and the pendulum balances every time. No complex mathematics are required and the circuitry comprises just a sine wave and a relay. The adjustments to tune the system are simple and straightforward. References 1. J. Golten & A. Verwer Control System Design and Simulation 1991 Mc Graw Hill, London 2. K. J. Åström and K. Furuta Swinging Up A Pendulum By Energy Control Presented at IFAC 13th World Congress, San Francisco, California, 1996.