Lab Report
Lab Report
LABORATORY REPORT
ECU Staff:
Click here to
enter text.
X 17/04/2016
Students, please be aware that this section is for lecturers to fill out after assignment submission. It is a side-measure
intended to measure writing and literacy, and is not part of your official assessment…
ENS5253:Control Systems Laboratory Report
Introduction
Rotational Inverted Pendulum is a pendulum attached to the end of a pivoted arm which rotates
in the horizontal plane while the pendulum rotates in a vertical plane. The pendulum is normally
suspended in a downwards position due to gravity but it can be made to rotate and ultimately
stand in upright position by applying various control and balancing algorithms to it. The study
of mathematical model, dynamic control and balancing algorithms of inverted pendulum serves
as a basis for control of much more complex systems like robots, rockets, spacecrafts and even
skyscraper buildings (Quyen & Thuyen, 2012).
In this laboratory report, the laboratory setup and procedure of swing up control and balance of
rotary inverted pendulum using PID controller is reported along with discussion of the result. A
graphical programming language known as Laboratory Virtual Instrument Engineering
Workbench (LabVIEW), developed by National Instruments used in laboratory for control and
balance of pendulum is also briefly discussed.
Theory
The control of swing up and balance of inverted pendulum was achieved through graphical
virtual instrument (VI) program in NI LabVIEW which interacts with the pendulum in real time
through a data acquisition card. The LabVIEW program consist of front panel and block
diagram. The front panel serves as user interface wherein input for program can be entered
while the output of the program is displayed as indicators. The graphical programing can be
done in block diagram where the input and controls are processed and the consequent program
output is used to control the physical device. The front panel is built using controls and
indicators from controls palette. Indicator graphs were used to display angle and voltage of the
pendulum while swing up control parameters and balance control parameters were used as the
interactive control (National Instruments, 2013).
Programming blocks from various palettes such as control and function palettes required to
execute at every time step for control and balance of physical rotatory inverted pendulum were
placed within simulation loop. Simulation loop is one of the essential tools which provides the
option to define integration algorithm, length of simulation and other timing parameters such as
clock in a looped system.
Signal generators can be used to generate various signals such as step signal by placing the
signal generator into the simulation loop from the signal generation palette available in the
library. The signal parameters can be adjusted according to requirement by performing double
click on it and assigning the desired value (Chaffe & Horowitz, n.d.).
In LabVIEW programming, arrays are a very effective tool in dealing with collection of similar
data and also when history needs to be saved for repetitive computations. Arrays are composed
of elements which are data or value within the array and dimensions which is the size of the
array itself defined by the length, height and depth. It can either be a control or an indicator but
it can never be mixture of both. On the other hand, clusters can be used to group different
elements such as Boolean value and a numeric value. However, clusters can either be control or
an indicator just like arrays but it can’t be mixture of both (National Instruments, 2013).
The data flow path between various virtual instruments and functions within the block diagram
is provided by wires connecting them. When the cursor is moved over the terminal of objects
within the block diagram, a spool appears which is used to connect objects. However, wire
connection can only be provided with compatible terminals and data types. Wires vary in color,
size and style to represent different data types and also terminals with the same color as wire
can be only be connected to that particular terminal (National Instruments, 2013).
The horizontally rotating arm of the rotary inverted pendulum is mounted on output gear of the
gear transmission system driven by a dc servomotor. The rotating angle of the arm is measured
by an encoder attached to the shaft of the arm while the angular position of the pendulum is
measured by another encoder located at the pendulum end hinged to the pivoted arm. The
system is controlled through a LabVIEW program which is interfaced by data acquisition card.
The graphical program used to control and balance the inverted pendulum is shown below:
Figure 1: Block diagram for control and balance of rotatory inverted pendulum
The control palette is available for the front panel only whereas the function palette is accessible
only for block diagram. The front panel consists of indicators such as numeric graphical display
and several Boolen controls and indicators such as arrays, clusters and buttons obtained from
the control palette. The controls and indicators can be found under subpalettes depending upon
its type. Similarly, various functions and virtual instruments necessary for building the block
diagram can be located under functions subpalette.
For this laboratory, graphical program was built in NI LabVIEW to firstly swing up the inverted
pendulum and then a successive program to balance the pendulum in the upright position was
implemented using Proportional Integrator Differentiator (PID) controller.
The output of the system is regulated by the controller to follow the specified reference value.
The control signal generated by controller are usually a function of difference between the
output of the system and the specified reference input (Akhtaruzzaman & Shafie, 2010). When
the input is continuously changing, the control system should be able to regulate the output
effectively. Conversely, the controller should remain unaffected by external disturbances and
noise (Sirisha & Junghare, 2014).
The control parameter values for this laboratory experiment was obtained by trail and error
method. Initially all the gains were set to zero and then the proportional gain increased
gradually until a satisfactory response time was obtained. The integral gain was increased until
the offset was completely eliminated within acceptable time period but the gain was maintained
low enough to not cause instability of the system. Differential gain was selected such that the
system reaches to its reference value adequately fast after a disturbance. The control and
balance parameters obtained in the laboratory experiment are shown in the figure below;
The implementation of LabVIEW program and selection of control parameters through trial and
error method, the rotatory inverted pendulum was made to swing up and stay upright only for
few seconds which could be attributed to the method of trail and error used to determine the
control parameters.
Conclusion
The rotatory inverted pendulum is one of the simplest and compact structures representing
multivariable, non-linear systems and its associated control challenges provides a suitable
platform to study and develop non-linear control algorithms which serves as a basis for much
more complex systems. The inverted pendulum is also used in most of the control laboratory
around the globe to study and research various control techniques. Therefore, various control
algorithms have been developed over the years to model and control the inverted pendulum but
the conventional PID controller remains the most preferred due to its simplicity and economic
benefits.
There are several software and hardware tools available to implement various control systems
but NI LabVIEW was used for this laboratory experiment as it provides the flexibility to
simulate and control physical hardware through a data acquisition card representing real world
control system complexity (Demirtas, Altun, & Istanbullu, 2013). LabVIEW is a visual
programming tool which can be customized and modified to suit our requirement in simulating
a system model and experimenting on physical hardware. The block diagram can be built using
various control and function palettes available within the vast library of the software.
Additionally, different types of graphs can be used to represent one or more parameters to help
analysis and understanding of a system.
In this laboratory experiment, the control system was programed in the LabVIEW and the
parameters obtained through trial and error method. The various aspects of control and balance
of rotatory inverted pendulum was examined in the process of achieving upright position of the
pendulum.
References
Akhtaruzzaman, M., & Shafie, A. A. (2010). Modeling and control of a rotary inverted
pendulum using various methods, comparative assessment and result analysis. Paper
presented at the 1342-1347. doi:10.1109/ICMA.2010.5589450
Chaffe, M., & Horowitz, M. (n.d.). LabVIEW for control analysis and design. Retrieved from
http://ecee.colorado.edu/shalom/ecee4638/LVTutorial.pdf
Demirtas, M., Altun, Y., & Istanbullu, A. (2013). Virtual laboratory for sliding mode and PID
control of rotary inverted pendulum. Computer Applications in Engineering
Education, 21(3), 400-409. doi:10.1002/cae.2048
Mandic, P., Lazarevic, M., Stojanovic, S., & Ristanovic, M. (2014). Real time control of rotary
inverted pendulum. Annals of the Faculty of Engineering Hunedoara,12(2), 211.
Quyen, N.D., & Thuyen, N.V. (2012). Rotary inverted pendulum and control of rotary inverted
pendulum by artificial neural network. Retrieved from
http://www.iop.vast.ac.vn/theor/conferences/nctp/proc/37/243-249.pdf
Sirisha, V., & Junghare, A.S. (2014). A comparative study of controllers for stabilizing a rotary
inverted pendulum. International Journal of Chaos, Control, Modelling and Simulation,
3(1). doi:10.5121/ijccms.2014.3201