You are on page 1of 22

Quasi Equilibrium State Pendulum

QUASI EQUILIBRIUM
STATE PENDULUM

1EE370 3rd Year Under Graduate Mini Project

Atharva Kshirsagar 2012BEL020


Vijay Patil 2012BEL013
Guide: Dr. D R Patil
At Walchand College of Engineering, Sangli

EE Department, WCE Sangli 4


Quasi Equilibrium State Pendulum

EE Department, WCE Sangli 5


Quasi Equilibrium State Pendulum

Walchand College of Engineering, Sangli.


(A Govt. Aided Autonomous Institute)

Vishrambag, Sangli-416415 (MH), India


www.walchandsangli.ac.in

CERTIFICATE

DEPARTMENT OF ELECTRICAL ENGINEERING

This is to certify that the project entitled “Quasi Equilibrium State Pendulum” is a bonafide
work carried out by the students mentioned below, for 1EE370 Mini Project as a partial
fulfilment of course in Electrical Engineering under my supervision and guidance.

Submitted By

Name of the Students Enrolment No.

Atharva S Kshirsagar 2012BEL020


Vijay S Patil 2012BEL013

Dr. D S More Dr. D R Patil


(Head of the Department) (Project Guide)

(Internal Examiner)

EE Department, WCE Sangli 6


Quasi Equilibrium State Pendulum

Acknowledgement

We take this opportunity to express our gratitude to Dr. D R Patil for


permitting and encouraging us to take up this project and complete it successfully. Also, Dr.
Enikov and Dr. Campa, for their IEEE transactions paper established our interest and base for
taking up this project and helping out our enquiries over email.
We thank the Head of Department (Electrical Engineering) Prof. Dr. D S
More, our faculty, and non-teaching staff of Electrical Department who offered their valuable
time, guidance, and assistance directly or indirectly to carry out the project successfully.
Our sincere gratitude to our friends for constantly motivating us to fruitfully
completing the work.
We also thank our college’s Mechanical Workshop Staff & acknowledge
facilities provided by the Electrical Engineering Department.

Atharva S Kshirsagar [1]


Vijay S Patil [1]

[1]
Dept. of Electrical Engineering
Walchand College of Engineering, Sangli
Maharashtra.

EE Department, WCE Sangli 7


Quasi Equilibrium State Pendulum

Index

Sr No. Description Page No.

1 Abstract 6

2 Introduction 7

3 Suspended Pendulum System 9


4 Schematic Block Diagram 11
5 Xcos Model 12
6 Why Scilab/ Xcos 13
7 Results 14
8 Ziegler Nichols Method for PID tuning 15
7 Future scope 18
8 Model Reference Adaptive Control 18
9 Appendix I 18
10 Conclusion 20
11 References 20

EE Department, WCE Sangli 8


Quasi Equilibrium State Pendulum

Abstract

A mechanical pendulum can be modelled in a 2nd order system with Force being
input and φ, the output. However, this conventional pendulum has only one
equilibrium state, i.e. at (0, 0). An inverted pendulum can be designed and
controlled to have an equilibrium position at 180’. However, the pendulum is
unstable for remaining values of φ. This project can be used to make a pseudo
equilibrium position at any desired angle in a range of 0 and 180 deg. The setup
consists of a small dc electrical motor attached to one of the end of a light rod. The
motor drives a 6-in propeller and allows the rod to swing. Angular position is
measured by a potentiometer attached to the pivot point. The mathematical model
can be estimated using the systems identification toolbox in MATLAB. An
Arduino R3 produces the controlled voltage input to the motor. The board
communicates to Scilab-Xcos via USB interface through the serial port. Important
variable controlled in the project is the thrust of the propeller via speed control of
DC motor by changing the PWM input.

EE Department, WCE Sangli 9


Quasi Equilibrium State Pendulum

Introduction

1. Bang-bang control:
A bang-bang controller (on-off controller), also known as a hysteresis controller, is a
feedback controller that switches abruptly between two states. These controllers may be
realized in terms of any element that provide hysteresis. They are often used to control plant
that accepts binary input. But because of discontinuity between two states, they can
sometimes lead to the undesired Zeno effect (also known as the turning paradox), which has
to be taken care of using, for instance, sliding mode control.

2. PID control:

A proportional integral derivative controller (PID controller) is a control loop


feedback mechanism (controller) widely used in industrial control systems. A PID controller
calculates an error value as the difference between a measured process variable and a desired
set point.
The controller attempts to minimize the error by adjusting the process through use of
a manipulated variable. The PID controller algorithm involves three separate constant
parameters, and is accordingly sometimes called three term control: the proportional, the
integral and derivative values, denoted P, I, and D. Simply put, these values can be
interpreted in terms of time: P depends on the present error, I on the accumulation of past
errors, and D is a prediction of future errors, based on current rate of change. By tuning the
three parameters in the PID controller algorithm, the controller can provide control action
designed for specific process requirements. The response of the controller can be described in
terms of the responsiveness of the controller to an error, the degree to which the controller
overshoots the set point, and the degree of system oscillation.
Note: The use of the PID algorithm for control does not guarantee optimal control of
the system or system stability.

The Authors decided to use this controller because of its simplicity in modelling.

EE Department, WCE Sangli 10


Quasi Equilibrium State Pendulum

3. Sliding mode control:


Sliding mode control (SMC),is a nonlinear control method that alters the
dynamics of a nonlinear system by application of a discontinuous control signal that forces
the system to slide along the a cross-section of the system’s normal behaviour. Sliding mode
control is a kind of control technique of variable structure control systems. Sliding mode
control technique is based on forcing the error vector into desired dynamic and holding in this
dynamic.
Variable structure systems, was defined in Soviet Russia in 1964's for the first time by
Emelyanov and in that study, defining a line at the phase space of second order systems and
forcing and holding the states of system to that line under any initial situation was discussed.
The line whereof was discussed was called as surface, switching surface, sliding surface over
time. A disadvantage of this method has been the necessity to implement a discontinuous
signal which, in theoretical terms, must switch with infinite frequency to provide total
rejection of uncertainty.

4. Adaptive control

Adaptive Control covers a set of techniques which provide a systematic


approach for automatic adjustment of controllers in real time, in order to achieve or to
maintain a desired level of control system performance when the parameters of the plant
dynamic model are unknown and/or change in time.
Consider first the case when the parameters of the dynamic model of the plant
to be controlled are unknown but constant (at least in a certain region of operation). In such
cases, although the structure of the controller will not depend in general upon the particular
values of the plant model parameters, the correct tuning of the controller parameters cannot
be done without knowledge of their values.
Adaptive control techniques can provide an automatic tuning procedure in
closed loop for the controller parameters. In such cases, the effect of the adaptation vanishes
as time increases. Changes in the operation conditions may require a restart of the adaptation
procedure.

EE Department, WCE Sangli 11


Quasi Equilibrium State Pendulum

Suspended Pendulum System

The schematic diagram of the suspended pendulum control system is given in


Fig. 1. It is clear that in order to analysis and control of a physical system, it is
necessary to be known the mathematical model of it. On the pendulum system given
in Fig. 1. There is a DC motor with a propeller on the lead of a suspended stick. Here,
is the control input and the angle which is between pendulum arm and vertical axis is
the control variable. Pendulum is driven by DC motor. From Fig. 1. We can write the
transfer function of the suspended pendulum as follows:

Where;
Tss = the thrust which is provided by DC motor
L= length of pendulum
m= weight of pendulum
d= the distance from suspending point to centre of mass
J= inertia moment
g= acceleration of gravity
c= viscous damping coefficient
The rational equation between voltages V which applied to
DC motor and thrust T, can be written as follows:

EE Department, WCE Sangli 12


Quasi Equilibrium State Pendulum

Let’s the pendulum get the stability. Then, one can obtain:

In this way, from Eq. (2) can be written as

Where Theta is the angle at the stable situation. Thus, substituting leads to

Finally from Eq. (1) and Eq. (2) the open-loop block diagram of the pendulum system can be
obtained as follows:

Now, from above figure the transfer function of the suspended pendulum can be written as
follows:

EE Department, WCE Sangli 13


Quasi Equilibrium State Pendulum

Schematic

EE Department, WCE Sangli 14


Quasi Equilibrium State Pendulum

EE Department, WCE Sangli 15


Quasi Equilibrium State Pendulum

EE Department, WCE Sangli 16


Quasi Equilibrium State Pendulum

Xcos Model

EE Department, WCE Sangli 17


Quasi Equilibrium State Pendulum

Why Scilab-Xcos?

Scilab is a high-level, numerically oriented programming language. The language


provides an interpreted programming environment, with matrices as the main data type. By
using matrix-based computation, dynamic typing, and automatic memory management, many
numerical problems may be expressed in a reduced number of code lines, as compared to
similar solutions using traditional languages, such as FORTRAN, C, or C++. This allows
users to rapidly construct models for a range of mathematical problems. While the language
provides simple matrix operations such as multiplication, the Scilab package also provides a
library of high-level operations such as correlation and complex multidimensional arithmetic.
The software can be used for signal processing, statistical analysis, image enhancement, fluid
dynamics simulations, and numerical optimization.

Scilab also includes a free package called Xcos (based on Scicos) for modelling and
simulation of explicit and implicit dynamical systems, including both continuous and
discrete sub-systems. Xcos is the open source equivalent to Simulink from the MathWorks.

As the syntax of Scilab is similar to MATLAB, Scilab includes a source code translator for
assisting the conversion of code from MATLAB to Scilab. Scilab is available free of cost
under an open source license. Due to the open source nature of the software, some user
contributions have been integrated into the main program.

Scilab is one of the two major open-source alternatives to MATLAB. Scilab is


similar enough to MATLAB that some book authors (who use it) argue that it is easy to
transfer skills between the two systems.

Due to its open source licence, we decided to implement the project on Xcos, and
exploit this opportunity to learn the new software. Here is one comparison between two
leading simulators:

Matlab/ Simulink/ Scilab/ Xcos


SimPower Systems
Capability Very Good Good
Documentation Very Good Fair
User Support Very Good Fair
Installation Fair Fair
Sharing Fair Very Good
Price Rs. 2,00,000 Free

EE Department, WCE Sangli 18


Quasi Equilibrium State Pendulum

Results & System Tuning


1. Closed Loop Response Theta = 10.

Tp: 1.1s, Ts=4.7s


P = 0.66 I =0.0 D =0.0

2. Increasing Proportional gain such that there were oscillations of increasing


magnitude.
P = 0.6 I =0.0 D =0.0

EE Department, WCE Sangli 19


Quasi Equilibrium State Pendulum

3. After Perturbation, there was steady state error but oscillations of constant
magnitude.
P = 0.295

Tuning of a PID controller using Ziegler-Nichols Method


The PID controller encapsulates three of the most important controller structures in a single
package. The parallel form of a PID controller has transfer function:
C(S) = KP + (KI/S) + (Kd S)
=KP [1 + (1/TIS) + Td S] where:
KP = Proportional Gain
KI = Integral Gain
Kd= Derivative gain
Steps to determine PID controller parameters:
1. Reduce the integrator and derivative gains to 0.
2. Increase Kp from 0 to some critical value Kp=Kc at which sustained oscillations occur
3. Note the value Kc and the corresponding period of sustained oscillation, Tc
4. The controller gains are now specified as follows

PID Type Kp TI Td
P 0.5Ku Inf 0
PI 0.45Ku 0.833Tu 0
PID 0.6 Ku 0.5Tu 0.125Tu

EE Department, WCE Sangli 20


Quasi Equilibrium State Pendulum

Critical value of Kp at which sustained oscillations occur Ku=0.29 period of sustained


oscillation Tu =1.26 sec
Therefore, Kp = 0.6*0.29 =0.174
Kp = (2*0.174)/1.26 = 0.276
Kd = (0.174*1.26)/8 =0.027

4. Substituting the Ziegler Nichols Method values of PID.

P = 0.174 I = 0.2762 D =0.0275

EE Department, WCE Sangli 21


Quasi Equilibrium State Pendulum

5. On Fine tuning the PID controller, we get near perfect response.

P= 0.174 I=0.5 D=0.05

EE Department, WCE Sangli 22


Quasi Equilibrium State Pendulum

Future Scope

PID is very primitive type of controller which is very easy to understand and implement.
Further improvements that can be done are as follows:
1. Increasing the range of Angle control angle, up to 50 degrees.
2. Implementing Intelligent & Advanced controllers like Adaptive Control.

Model reference Adaptive Control (MRAC)


The general idea behind MRAC, also known as an MRAS or Model Reference
Adaptive System is to create a closed loop controller with parameters that can be updated to
change the response of the system. The output of the system is compared to a desired
response from a reference model. The control parameters are update based on this error. The
goal is for the parameters to converge to ideal values that cause the plant response to match
the response of the reference model. For example, you may be trying to control the position
of a robot arm naturally vibrates. You actually want the robot arm to make quick motions
with little or no vibration. Using MRAC, you could choose a reference model that could
respond quickly to a step input with a short settling time. You could then build a controller
that would adapt to make the robot arm move just like the model.
Likewise, the pendulum is prone to many oscillations and disturbances. But, we can
adapt the controller to the vibrations and swing the pendulum at our desired angle with very
small settling time.

EE Department, WCE Sangli 23


Quasi Equilibrium State Pendulum

APPENDIX - I

Components List

Component Description Rating

MOSFET IRF 530 N channel VDS=100V

Potentiometer Precision Angle sensor, 5 K +-0.15%


CCW type

DC motor - 18000 RPM @ 12V

Resistor .25 W CC 10 K

Diode Power Diode 1N4007 PIV=1000V I=3 A

Propeller High Speed 15 cms. dia


Aero-applications

Rod

Arduino UNO board 16 MHz 10 Bit ADC ATmega328

Power Supply Variable 12 V 1 Amp

EE Department, WCE Sangli 24


Quasi Equilibrium State Pendulum

Conclusion

The project described is a low cost and low maintenance platform suitable for lab
courses in dynamics and control systems. Many interesting experiments, for reinforcing
classroom concepts, can be developed. The platform can also be easily modified to
investigate complex and higher order systems.

As stated in the introduction PID control is not so robust and fails to give precise
results, having precision about 70%. The steady state error can be reduced by applying a
correct Proportional gain Kp, while the transient response can be bettered using Derivative
gain Kd.

Applications of this project as a model for feedback control, varying from Vehicle
dynamics to Robotics.

References

1. E. T. Enikov, Aeropendulum project, 2011 [Online]. http://aeropendulum.arizona.edu/


2. Slotine and Li, Applied Nonlinear Control, Prentice Hall, NJ – 1991.
3. Kizmaz, H., Sliding Mode Control of Suspended Pendulum, Modern Electric Power
Systems Proceedings – 2010.
4. M. Morari and E. Zafiriou, Robust Process Control, Englewood Cliffs, PH NJ – 1999.
5. V. Yurkevich, PID controller via singular perturbation technique, APEIE – 2009.
6. I.D. Landau et al., Adaptive Control, Communications and Control Engineering,
Springer – 2011.
7. Zadeh L. A. Fuzzy Sets. Intl J. Information Control – 1965.
8. Paul Oh, Motor-Propeller Damped Compound Pendulum Experiment, Mechanical
Engineering Department, Drexel University.
9. arduino.cc
10. scilab.org
11. B. Douglas, Control Systems Lectures, youtube.com

EE Department, WCE Sangli 25

You might also like