Balancing of An Inverted Pendulum Using PD Controller: June 2012
Balancing of An Inverted Pendulum Using PD Controller: June 2012
Balancing of An Inverted Pendulum Using PD Controller: June 2012
net/publication/283733217
CITATIONS READS
14 8,388
6 authors, including:
M R I Sarker
Rajshahi University of Engineering & Technology
35 PUBLICATIONS 121 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Chanchal Saha on 13 November 2015.
Abstract
Balancing of an inverted pendulum robot by moving a cart along a horizontal track is a classical problem in the
field of Control Theory and Engineering, for the beginners to understand its dynamics. Several physical models
can also be simplified as elastic inverted pendulums like rockets and walking robots. Many researchers have been
applying different control algorithm and design techniques such as PID Controller, State Space, Neural Network,
Genetic Algorithm (GA) even Particle Swam Optimization (PSO), in both digital and analog domain using
various sensors. However, this can also be done by using a single potentiometer as a sensor and PD controller as
the design algorithm. The comparison or difference between the reference and the potentiometer generates
control signal to drive the system. In this case, it consists of a thin vertical rod attached at the bottom, referred to
as pivot point mounted on a mobile toy car. The car, depending upon the direction of the deflection of the
pendulum moves horizontally in order to bring the pendulum to absolute rest. The main idea behind this control
process is the use of PD (Proportional and Derivative) controller to generate signal to control the speed and
direction of the motor. The only sensor used in this project was a potentiometer (pot) which was attached with
the pendulum rod. The variation in its resistance causes change in voltage and afterward, it was compared with
the reference voltage to generate the appropriate control signal. PROTIUS software was used for circuit
simulation, frequency responses of the system were analyzed in MATLAB with different values of KP and KD.
Finally, to represent the system stability, root locus diagram was drawn using MATLAB.
Key words: Inverted pendulum, PD controller, System stability, Output responses, Root locus
Φ( s) 7.407 s
= 3
U ( s) s + 0.26s − 36.296s − 7.26
2
III. Controller design and simulation Fig. 4 Block diagram in MATLAB Simulink
The Proportional Derivative (PD) is a type of The system was examined for different values of Kp
feedback controller whose output, a Control Variable and Kd. For instance, three critical combinations of Kp
(CV), is generally based on the error (e) between and Kd (Table 2) are presented to understand the entire
some user-defined Reference Point (RP) and some trend of system stability.
measured Process Variable (PV). Based on the error
each element of the PD controller performs a Case Case 1 Case 2 Case 3
Gain
particular action. Kp 1 1 10
Proportional (Kp): Hence, error is multiplied by a Kd 1 50 50
gain Kp, an adjustable amplifier. In many systems, Kp
is responsible for process stability: too low, and the Table 2 Combinations of Kp and Kd
PV will drift away; too high, the PV will oscillate [3].
Case 1: In this case, the values of both Kp and Kd are
Derivative (Kd): The rate of change of error taken 1. Fig. 5 shows the corresponding MATLAB
multiplied by a gain, Kd. In many systems, Kd is codes. As can be seen in Fig. 6, the system was
responsible for system response: too high and the PV unstable as well as the response time was also pretty
will oscillate; too low and the PV will respond high (t>8 sec.).
sluggishly. The designer should also note that
derivative action can amplify any noise in the error Case 2: In case 2, the value of Kp was increased to 50
signal [3]. with keeping the value of Kd unchanged. The output
response (Fig. 7) was found stable with some initial
Tuning of a PD controller involves the adjustment of oscillations.
Kp, and Kd to achieve some user defined "optimal"
character of system response. Case 3: For case 3, the value of Kp and Kd were
considered 10 and 50 respectively. The output
In this problem, the main concern was to control the
pendulum's position, which should return to its
response (Fig. 8) was found quite stable and the
response time was very low (t<1 sec.)
β1
Rotary type potentiometer was used to sense (position
β1 sensor) the angle of the pendulum. The circuit was
operated by two separate power supply, viz. ± 12V for
the Op-amp circuit and ± 17V for the motor driving
circuit.
Fig. 10 NPN and PNP Darlington transistor
Here, β new = β1 × β2 Æ IC = ID × β new.
Therefore, DC motor rotated faster due to the higher
new collector current. As the Darlington transistors
get heated faster, a heat sink was connected.