0 views

Uploaded by ShivankyJaiswal

control of an unstable inverted pendulum system

- Euro
- 00526915.pdf
- Coordinated+Controller+Tuning+of+a+Boiler+Turbine+Unit+with+New+Binary+Particle+Swarm+Optimization+Algorithm
- Dynamic simulation and control of direct rotary dryers.pdf
- Continuous Process Dynamics, Stability, Control and Automation [2015]
- Updated Exercise Instructions
- Control Systems
- Validation of a Multivariable Relay-Based PID Autotuner With Specified
- 709d2f0a874cd997d638338134b2d704d2da
- 409646-pp-1348-1352-srilakshmi
- PID_Tips_1
- 0---10.1.1.206.4845.pdf
- PSO Algorithm
- Chapter 2 Mathematical Models of Systems (1)
- ITA
- 2216E-OPR.pdf
- PID Controller
- Mt
- Model Free
- [Åström, Karl J.; Hägglund, Tore] PID Controlle(BookZZ.org) 075

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.

- EuroUploaded bysaravanan
- 00526915.pdfUploaded byErna Utami
- Coordinated+Controller+Tuning+of+a+Boiler+Turbine+Unit+with+New+Binary+Particle+Swarm+Optimization+AlgorithmUploaded byMonowar Hossain
- Dynamic simulation and control of direct rotary dryers.pdfUploaded byPedro Romero
- Continuous Process Dynamics, Stability, Control and Automation [2015]Uploaded byXavier Martinez
- Updated Exercise InstructionsUploaded bylizxcano
- Control SystemsUploaded byhelloworld100
- Validation of a Multivariable Relay-Based PID Autotuner With SpecifiedUploaded bySutha Sangapillai
- 709d2f0a874cd997d638338134b2d704d2daUploaded byAnonymous mCRn5XQ5j
- 409646-pp-1348-1352-srilakshmiUploaded byvis
- PID_Tips_1Uploaded byOwd LovLa
- 0---10.1.1.206.4845.pdfUploaded byJudy Ann Bose
- PSO AlgorithmUploaded byqwerty baral
- Chapter 2 Mathematical Models of Systems (1)Uploaded byHassan Allawi
- ITAUploaded byMisael Fernando Gamba Gomez
- 2216E-OPR.pdfUploaded bySanctaTiffany
- PID ControllerUploaded byZakariya
- MtUploaded byerik5abilio
- Model FreeUploaded byRiad Tifa
- [Åström, Karl J.; Hägglund, Tore] PID Controlle(BookZZ.org) 075Uploaded byablbabybb
- Pid ControllersUploaded byBalaji Raman
- 2_060_paulusova.pdfUploaded byselvam
- control of dc-dc converterUploaded byleemoh8190
- Industrial Automation and Control Interview Questions Instrumentation ToolsUploaded bymahamd saied
- project3Uploaded byapi-358662729
- PID ControllerUploaded byabdussamih
- PID ControllersUploaded bysklux
- Magnetic levitation control systemUploaded byYashaswa Jain
- shipmdlUploaded bywernlan
- CD 2 Manuals English STEP 7 - PID Temperature ControlUploaded bydamaya1701

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

- Securing Ad-hoc Networks Using IpsecUploaded byaksssudhakar
- List of Important AP Statistics Concepts to Know (1)Uploaded bym234567
- طراحی پایپینگ اطراف پمپ هاUploaded byMorteza Dianatfar
- Diseño de BushingsUploaded byIWue
- The Progress of Desulfurization Technology for Crude OilUploaded byjose
- Thermodynamics of Phase TransformationUploaded byCharan Cherry
- PHY10 Lesson 2 Kinematics (Full)Uploaded byJohn Luke Cruz
- Punch List FormatUploaded byนพพร วิเศษศิริกุล
- Geopak ReviewUploaded bydeapak50
- Audio Cable Length Tester NF 308RUploaded byghiulaiv
- Ecological amplitude of plants.pdfUploaded byMichaiel Piticar
- Survey Wireless Mesh Networking Security Technology Threats 1657Uploaded byHemal
- Data Center MigrationUploaded byAditya Soumava
- Development of a Low-Power SRAM CompilerUploaded byexfmln
- aminoacidUploaded byapi-267795899
- Brooks PP Ch 9 RTP.pptUploaded byAn Hoài
- lenzs_lawUploaded byMunie Rosnan
- Enactments in Couples Therapy - Scott WoolleyUploaded byautkeh
- Rhino 5200.pdfUploaded byDragan Lazic
- JCCatalogUploaded bycat6313
- Stud Bolts General DescriptionUploaded byalisha_shetty05
- Lecture 1Uploaded byMohanakrishnan Singh
- Java FlowCharts OperatorsUploaded bysullivan583
- IJMECE160702Uploaded byAzmi
- DBMS Technical publication Chapter 3Uploaded bykishore5783
- File Handling in C++Uploaded byAnik
- Lab4TheveninStevensUploaded bykarthikhrajv
- Shale 2014Uploaded byKilaparthi Satyavamma
- Perl Reference CardUploaded byuuuuuuuuu
- Manual Simulasi Mikromagnetik dengan VampireUploaded byelrohm