0 views

Uploaded by ShivankyJaiswal

control of an unstable inverted pendulum system

- Validation of a Multivariable Relay-Based PID Autotuner With Specified
- MEX 7
- Speed and Power Control Hydro Turbine Unit
- pidcontrollers
- Sem 2 2010 Automatic Control Theory Answers
- This Interactive Learning Module (ILM) is Part
- Instrumentation and Process Control Rr322301
- NHẬP MÔN Simulink
- BKF3483 Process Control Instrumentation
- Lab 7 QUBE-Servo PD Control Workbook
- QNET DCMCT - Workbook (Student)
- Process Modelling Simulation and Control
- Mfa Merit Exercises 5 Simulink 5174 2
- Chapter 8
- Lecture7 PID Controllers
- Prelab3 Solution
- Me 471 Closed Loop Hydraulic Positioning System
- Model-based Tuning.pdf
- 01582679 Laboratory Experimental Testing of Inerters
- Assignment II

You are on page 1of 11

Part -1

Aim : PID control of cart model position in offline and real time mode.

- crane control,

- inverted pendulum control,

- swing up control.

Each of these control problems has its particular characteristic. The pendulum is a nonlinear

plant, thus control over a wide range of angles by one simple linear controller is impossible. The

nonlinear pendulum model has been linearised to give two separate models for the upright and

hanging pendulum position. Corresponding models have been also obtained in the course of the

identification experiments. Based on these linear models, simple control algorithms can be

designed, one of which is the very widely used PID controller.

The plant itself is called an open loop system that means it has no controller. The pendulum can

be treated as a SISO or SIMO system depending on how many states we want to control.

Matlab provides various analysis methods for linear systems as far as dynamics are concerned

(root locus, frequency analysis tools – Bode diagrams, Nyquist plots, pole and zero maps etc.).

Controllers can be designed using the information which Matlab provides about the dynamics of

the system.

Plant control

There are numerous control algorithms however PID control is the most popular because of its

simplicity. A general schematic of a simple closed loop control system is presented in figure

below

Figure -2 Simple closed-loop control system

Assuming that the plant is represented by its linear model its transfer function can be

described as:

B(s)

G(s) =

A(s)

where s is the Laplace operator. The idea of control algorithms is to find such a controller

(transfer function, discrete transfer function, any nonlinear), which will fulfil our

requirements (certain dynamic response, certain frequency damping, good response to the

dynamic changes of the desired value etc.). The controller input is the e(t) error signal.

Sometimes disturbance signals are also measured. Depending on the present and past values

of the error signal, the controller performs such an action (changes the u(t) control signal) so

that the y(t) is as close as possible to the ydesired(t) value at all times.

There are many controller design and tuning methods. All of them consider the behaviour of

the closed loop system and provide controller parameters according to the assumed system

characteristics. With the known plant transfer function G(s) it is possible to find satisfactory

parameters of the C(s) controller such that the closed loop system will have the desired

characteristics described by the transfer function Tc(s):

C(s).G(s)

Tc(s) =

1+C(s).G(s)

A PID controller consists of 3 blocks: Proportional, Integral and Derivative. The equation

governing the PID controller is as follows:

By means of the Laplace transform such a structure can be represented as a transfer function:

Each block of the PID controller plays an important role. However for some applications, the

integral or derivative part has to be excluded to give satisfactory results. The proportional

block is mostly responsible for the speed of the system reaction. However for oscillatory

plants it might increase the oscillations if the value of P is set to be too large.

The integral part is very important and assures zero error value in the steady state, which

means that the output will be exactly what we want it to be. Nevertheless the integral action

of the controller causes the system to respond more slowly to the desired value changes and

for systems where fast reaction is very important it has to be omitted. Certain nonlinearities

will also cause problems for the integration action.

The derivative part is introduced to make the response faster. However it is very sensitive to

noise and may cause the system to react very nervously. Thus very often it is omitted in the

controller design. Filtering of the derivative output may reduce the nervous reaction but also

slows down the response of the controller and sometimes undermines the benefit of using the

derivative part. Very often filtering can help to reduce the high frequency noise without

degrading the control system performance in the lower frequency band.

There are several PID tuning techniques. Most often Ziegler-Nichols rules are used or a relay

experiment is undertaken. Very often the closed loop system roots are analysed and set in the

desired position by means of correctly chosen P, I and D components. The Matlab Control

System Toolbox provides a root locus tool which helps in such design.

Procedure :

1.Load the OE model obtained in Cart Identification into the workspace then create a discrete

transfer function Gd(z):

2. Convert from discrete Gd to continuous form Gc:

Gc = d2c(Gd, 'zoh')

3. To aid design of the controller use the root locus tool which is part of the Control System

Toolbox. Open it by entering the rltool command in the Matlab workspace.

4. Feed the values of Gc and get a root locus plot like below

Figure -3 Root Locus Diagram

5. Move the poles, zeros and the gain to obtain for example faster step response of the closed

loop system.

6. Then export the controller into Workspace and test it either using the offline simulation of the

nonlinear model of the cart with PID_CartModelN.mdl, or on the model that we have identified.

7. Next we test in real time model. For that open CartControl.mdl as presented in the figure

below.

8. Since the controller is already designed our task is to vary the controller P, I and D values and

observe how the signal xdesired(t) is tracked by the system.

9. Open the PID controller block and make any desired changes before running the model.

(Make sure the changes of the P, I and D gains will not have a destructive effect on the

pendulum).

10. Feed different P,I and D values, also try the values obtained from root locus diagram.

11. Before running the experiment make sure the cart is at zero position and the pendulum is not

swinging.

12. After feeding the values, deploy it to the real time model, push the start button on the control

panel of the experiment setup and run the simulation diagram.

13. Open the oscilloscope block as soon as after running the model. Three waveforms are

displayed: the cart control voltage, the desired cart position and the actual cart position.

14. Try for different values of P, I and D and observe the respective waveforms.

Results :

The final P,I and D value calculated from the root locus diagram are

The below figure presents real-time simulation results of the cart PID control. Figure uses

correctly chosen I and D values. The simulation illustrated that an increase of I value may slow

the system down and cause more overshoot. We also noticed that the larger the D value the faster

the response but the more nervous the control signal u becomes. Very energetic control signal

changes can often lead to break down of the control unit. The result presented in figure -5

proves how efficient controllers can be designed when an identification experiment is

incorporated

Figure –5 Controller response with P= 29.5, I = 68.3 and D = 3.203;

Pink colour is the controller response and yellow is the control signal.

Part - 2

Aim: To control an inverted pendulum using PID controllers both offline and real time.

Apparatus Required :Inverted pendulum setup, computer, DC motor & interface, MATLAB

Simulink.

Theory :Inverted pendulum control is divided into two control problems. First is the swing up

control, which allows the pendulum to reach the upright position (θ = 0) and the second is the

pendulum PID control around that equilibrium point.

The goal of the control is to bring the pendulum to an upright position with as minimal angular

velocity as possible. This will ensure that the stabilizing controller, which takes over from the

swing-up controller, will have an easy task.

A large velocity value at the point of controller changeover could cause the pendulum to over

swing or cause very nervous reactions of the cart or even cause it to hit the end of the track.

The movement of the cart is caused by pulling the belt in two directions by the DC motor

attached at the end of the rail. By applying a voltage to the motor we control the force with

which the cart is pulled. The value of the force depends on the value of the control voltage. The

voltage is our control signal. The two variables that are read from the pendulum (using optical

encoders) are the pendulum position (angle) and the cart position on the rail.

The controller’s task will be to change the DC motor voltage depending on these two variables,

in such a way that the desired control task is fulfilled (stabilizing in an upright position, swinging

or crane control).

We have to design two separate PID controllers and sum their outputs to produce the final

control signal.

This approach could lead to an unsatisfactory result because of the possibility of interaction

between the two controllers if designed incorrectly.

We will design two PID controllers one for position and one for angle control are as shown in

Figure. The final controller output will be thus a linear combination of two controller output

signals.

Figure -3 Control system for position and angle controllers for the inverted

pendulum system

The control signal will be the weighted sum of the errors of four pendulum states : x – cart

position, x. - cart velocity, θ - pendulum angle, θ. pendulum angular velocity. Later on,

integration action can be introduced to see how it influences the inverted pendulum control.

Procedure :

1) Test the pendulum control algorithm firstly on the model using ModelInvertedPD.mdl. A

nonlinear model is used for the pendulum stabilisation.

2) Change the controller P, D and I gains to see how they influence the control action.

3) Vary the initial value of the θ0 angle to see how the controllers perform.

For the θ0 initial angle choose different values ranging from 0 to 0.5 radians.

4) Then we have to perform real time pendulum stabilisation. Use the real-time model

PendStabPD.mdl. This model implements PID stabilisation control but has no swing-up

controller.

5) Before running the experiment make sure the cart is at zero position and the pendulum is

not swinging.

6) Make sure the control starts with the pendulum hanging freely and not moving otherwise

the wrong initial value of the angle will be read by the controller.

7) Open the PID controller block and make any desired changes before running the model.

(Make sure the changes of the P, I and D gains will not have a destructive effect on the

pendulum).

8) After feeding the values, deploy it to the real time model, push the start button on the

control panel of the experiment setup and run the simulation diagram.

9) Open the oscilloscope block as soon as after running the model. Three waveforms are

displayed: the cart control voltage, the cart position and the angle. Try for different values

of P, I and D and observe the respective waveforms.

Observations :

By trial and error procedure kp,ki and kd values are substituted and the following response was

observed.

Table – 1 Observations for different kp, ki and kd values.

SI kp ki kd kp ki kd OBSERVATION

No.

1 29.5 68.3 3.203 25 0.2 1.5 Not stable and limit switch was not

touched.

2 29.5 68.3 3.203 40 0.6 1.5 Momentarily stable but touched the

limit switch

3 29.5 68.3 3.203 30 0.2 1.5 Momentarily stable and not touched

the limit switch

4 7 0.5 4 30 0.6 2 Obtained an unstable behaviour and

limit switch was touched

5 7 0.5 4 25 0.2 1.5 Pendulum was stabilised in the

upright position and remained in

upright position till the end of

simulation time.

The final P, I and D value calculated from trial and error procedure are

The below figure presents real-time simulation results of the inverted pendulum control.

Figure uses finally tuned controller settings.

Figure – 4 Real time simulation results

Response obtained was good and satisfactory and controller is found to be stabilising the

pendulum in the upright position.

The simulation illustrated that an increase of I value may slow the system down and cause more

overshoot.

We also noticed that the larger the D value the faster the response but the control signal u

abruptly increases and such control signal changes can often lead to break down of the control

unit.

Conclusion :We can see from observation table that as open-loop system is unstable, the design

of PID controller is difficult. Here, PID controller is already defined for the given system. So,

Even a small deviation from those pre-designed values makes even the closed-loop system

unstable. This shows us that control of unstable system has to be very carefully designed and it is

much sensitive to controller gains.

- MEX 7Uploaded bydatUPstudentdoe
- Speed and Power Control Hydro Turbine UnitUploaded bynamsvmore
- pidcontrollersUploaded bynguyễn ngọc ánh
- Instrumentation and Process Control Rr322301Uploaded byNizam Institute of Engineering and Technology Library
- Validation of a Multivariable Relay-Based PID Autotuner With SpecifiedUploaded bySutha Sangapillai
- Sem 2 2010 Automatic Control Theory AnswersUploaded byNang Truong
- NHẬP MÔN SimulinkUploaded bymuondangnhap
- Lab 7 QUBE-Servo PD Control WorkbookUploaded byLuis Enriquez
- This Interactive Learning Module (ILM) is PartUploaded byanoopkntpc
- BKF3483 Process Control InstrumentationUploaded byasepsow
- QNET DCMCT - Workbook (Student)Uploaded byJuan Carlos Álvarez
- Process Modelling Simulation and ControlUploaded byscribide
- Mfa Merit Exercises 5 Simulink 5174 2Uploaded byJames
- Chapter 8Uploaded byLin Chong
- Lecture7 PID ControllersUploaded byPham Co
- Prelab3 SolutionUploaded byksajj
- Me 471 Closed Loop Hydraulic Positioning SystemUploaded byAbhishek Kumbalur
- Model-based Tuning.pdfUploaded byCecep Atmega
- 01582679 Laboratory Experimental Testing of InertersUploaded byนิติพล ไชยวงศ์
- Assignment IIUploaded byQinyi Qj
- 3_ReportGuidelines_GET431Uploaded byIrfan Haider
- PIDUploaded byjoel_jose_9
- marwan hUploaded byganeen hahgdha
- A Design for a Controller Was Created and Implemented to Step the Angle of the Satellite Position as Quickly as PossibleUploaded byYasir Khan
- Advantage of crone controller for level process and DC Motor system compared with PID,H-∞ CONTROLLERSUploaded byIRJET Journal
- automoatizacion IEEE.docxUploaded byHector Jhair Lesmes Correal
- ie8006165Uploaded byjanurang
- ie3_cst_salt.pdfUploaded byWill Vega
- CE slidesUploaded byfawad
- 07041979Uploaded byShaheer Durrani

- ACFrOgB0dR6gYVpy6oGLQm3AqpobC_I6zGsyru75QpSWNfZ5snReTZ4ve-opWkB1oM4L52B_d3Ymb9Z7oEiFC6Ds4_9oCyFRF1HWZFmi_bMhmXH3qcrSAn4CLL2X8Ng=Uploaded byShivankyJaiswal
- Conical Tank With DEADBEAT ControllerUploaded byShivankyJaiswal
- Ninteger ManualUploaded byAhmedEL-Naggar
- deadbeat controller designUploaded byShivankyJaiswal
- Mems ReportUploaded byShivankyJaiswal
- Micro-electro mechanical system.pptxUploaded byShivankyJaiswal
- Soft Sensor ReportUploaded byShivankyJaiswal
- PresentationUploaded byShivankyJaiswal
- Level Flow PCUploaded byMurali Tharan
- Serpas DissertationUploaded byShivankyJaiswal
- Camera Ready PaperUploaded byShivankyJaiswal
- final pptUploaded byShivankyJaiswal
- Control SchemeUploaded byShivankyJaiswal

- Mrsm Add Maths p2 2004Uploaded bymurulikrishan
- PRACTICUM (Programmed Instructional Material)Uploaded byAGNES.P.VARGHESE
- Homework 1Uploaded byKristin Kathleen Creech Lassonde
- Chapter 4 Trigonometry (5.2-5.1)_unlockedUploaded byAlyssa L
- Wrong Number SeriesUploaded byMahendraKumar
- Switching Theory and Logic CircuitsUploaded byReethu Paravada
- Vector Logic - Wikipedia, The Free EncyclopediaUploaded byjoe smoe
- derivatives and integrals of vector functionsUploaded byJoel
- 163 Textbook CodingUploaded byDjenela Mabagos
- 8thmath.pdfUploaded byViji Kathir
- Astrom Opt PID IEE Kosarac OljaUploaded byOlja Tešić
- 2015 mtapUploaded byAko Si Chokey
- Basic of Convolution an WaveletUploaded byanima1982
- Signals and Systems Kuestion (EE).pdfUploaded bysanthosh
- Module 12(a) - ProgressionsUploaded byhsgenius
- Ashenafi AgizawUploaded byTebsu Tebsuko
- Rational FunctionsUploaded byaditya2053
- gen ad math gtgUploaded byJerry Abalos-Gulong Obinguar-Gabac Lpt
- VHDL Implementation of an Optimized 8-Point FFT_IFFT Processor in Pipeline Architecture for OFDM SystemsUploaded byMohamd mezar
- CS_pamphlet_en.pdfUploaded byninja
- ManualUploaded byPriyanka Ramani
- Approximating___pi_.pdfUploaded byToby Reichelt
- SPM Linear LawUploaded byNg Yievia
- Diferentes Tareas en Los Libros de Texto_BrändströmUploaded byFerned O Guzman
- Zamor MGF 1106 Syllabus Summer 2017Uploaded byTrey Cross
- General Class of Polynomials, I Function and H -Function Associated With Feynman IntegralUploaded byIOSRjournal
- HM Symbols CrystallographyUploaded byAlbus Severus
- Day16-InterpolationPolyUploaded byRuth Limbo
- Lagranges IdentityUploaded byBrenda Michelle Reyes
- LSD1513 - Multiview Alignment Hashing ForUploaded bySwetha Pattipaka