real time control of an inverted pendulum

Upload: kashif-aziz-awan

Post on 13-Jul-2015

154 views

Category:

Documents


2 download

DESCRIPTION

COMSATS Institute of Information Technology Abbottabad FIT 2011

TRANSCRIPT

RealReal-Time Control of an Inverted Pendulum:A Comparative Study.

Muhammad Hamza Qamar Zahid Zaka-ur-Rehman Furqan Tahir Zulfiqar KhalidCOMSATS Institute of Information Technology, Islamabad.

Authors

1. 2.

Applications. Compare various control algorithms.a) b) c) Stabilization of Inverted Pendulum. Regulation of Cart. PID, Pole Placement, LQR and Fuzzy.

3. 4.

Disturbance rejection properties. Control energy requirements.

Theme of the Paper

1. 2. 3. 4. 5. 6.

Introduction (Section I.) Mathematical Model (Section II.) MATLAB Simulation (Section III.) Real Time Results. Implementation Issues. (Section IV.) Conclusion (Section V.)

Organization of the Paper

Introduction & ApplicationIn Brief

y

Inverted Penduluma) is a Classical problem. b) provides a good benchmark.

y y y y y

Crane stabilization. Space Rocket lift-offs. Earth-Quake proof building designs. Robot maneuvers. Human standing still.

Intro. & Apps

Mathematical ModelLagrangian Analysis & Newtonian Analysis.

y y

Force: Positive towards right. Cart displacement: Positive in the right half Plane. Angular displacement of Pendulum: Positive when measured anticlockwise from the vertical.

y

Conventions

Linearized equations by making following small angle approximations:

1 dotsquare 0

sin cos

System Equations

State Space Model

Inverted Pendulum is:4th order SIMO system. Under-actuated. Non-minimum phase system. Unstable system with open loop poles at {0, -5.3928, 5.1603, -0.0830} Controllable and Observable.

System Analysis

Feedback Digital Inverted Pendulum 33-200Symbol M m L I fc QUANTITY Mass of cart. Mass of Pendulum. Length of the pendulum. Moment of inertia. Coefficient of frictional force between ground and the cart. Value 2.4Kg 0.23Kg 0.36m 0.099Kg.m2 0.05Kg/s

fp

Coefficient of frictional force between pendulum and the pivot.

0.005 kgm/s rad

G

Gravitational force

9.81m/s2

System Parameters

Controller DesignPID, Pole Placement, LQR and Fuzzy

PID Controller Structure

Pole Placement and LQR Controller Structure

Fuzzy Logic Controller Structure

Controller Structures

MATLAB Simulation ResultsPID, Pole Placement, LQR and Fuzzy

MATLAB Simulation Domain Discrete of Pendulum Angle Sampling Time = 0.05 sec

MATLAB Simulation of Cart Position

MATLAB Simulation of Control Signal

Controller

P

I

D

Cart Pendulum

0.4 40

0.001 5

0.64 9

Weighting matrices for LQR are as Q and R are chosen to be Q = diag(30, 30, 30, 30) R=1

Settling time of 4 sec & Overshoot of 5 %, Poles computed for Pole Placement are as {0.95010.0464i, 0.95010.0464i, 0.7788, 0.7788}/x NL NS Z PS PL NL NL NL NS NM Z NS NL NL NM Z PM Z NL NM Z PM PL PS NM Z PM PL PL PL Z PM PS PL PL

Design Parameters

RealReal-Time Implementationof an Inverted Pendulum

y

20 samples/sec gave a very slow unstable response. We found that 100 samples/sec was adequate. The pendulum system provides two outputs namely and x. Therefore, we estimated the remaining states ( dot and xdot). The PID gains also needed some fine tuning as given in the Table below:

y

y

Controller

P

I

D

Cart Pendulum

5 40

1.5 5

1.3 9

Real Time Implementation Issues

y

Poles of Pole Placement and the weighting matrices for LQR also been fined tuned. In real-time implementation of fuzzy logic controller, the 25 rules were extended to 49 rules which provided us with a more precise control./x NL NM NS Z PS PM PL NL NL NL NL NL NM NM Z NM NL NL NL NM NM Z PM NS NL NL NM NM Z PM PM Z NL NM NM Z PM PM PL PS NM NM Z PM PM PL PL PM NM Z PM PM PL PL PL PL Z PM PM PL PL PL PL

y

Real Time Implementation Issues

RealReal-Time Videos ofan Inverted Pendulum

y y y y

PID Pole Placement LQR Fuzzy

Videos

RealReal-Time Implementation Results ofan Inverted Pendulum

Disturbance Profile (In Degree)

Pendulum Angle Results

Cart Position Results

Control Signal Results

Controller

PID

POLE PLACEMENT

LQR

Fuzzy

Output

0.9203

6.0696

0.8334

0.7163

Net Control Energy

3.2e+04

9.17E+03

2.71e+03

1.77e+03

PERFORMANCE COMPARISON USING ISE