You are on page 1of 14

BALOCHISTAN UNIVERSITY OF INFORMATION

TECHNOLOGY
ENGINEERING & MANAGEMENT SCIENCES

An Optimized Genetic Algorithm (GA) & Extended State Observer


(ESO) based Linear Quadratic Regulator (LQR) Controller for Ball
& Beam System

A report submitted for the complete fulfillment of the requirements for the final year
project of

BECHOLAR OF SCIENCE (BS)

in

ELECTRONIC ENGINEERING

By

Name: SHAHID HASAN MIAN CMS ID: 29014

Name: MUSHTAQ ALI KHAN CMS ID: 30430

Name: EJAZ UL HAQ CMS ID: 28969

Supervisor Co-Supervisor

______________________________ ______________________________
Dr. ANAYATULLAH ENGR. SARA AYUB
Assistant Professor Assistant Professor
Chairperson Electronic Engineering Electrical Engineering Department,
Department, FICT, BUITEMS. FICT, BUITEMS.

September 2017
Contents
Abstract ............................................................................................................................2
Motivation ........................................................................................................................3
Introduction ......................................................................................................................3
Literature Review ............................................................................................................8
Problem Statement .........................................................................................................10
Project/Research Objectives ..........................................................................................10
Proposed Methodology ..................................................................................................10
Workload Division .........................................................................................................12
Gantt chart......................................................................................................................12
References ......................................................................................................................13

1|Page
Abstract
The Ball and Beam system (BBS) is an unstable nonlinear system, it gives a good and
simple approximation of many real time complicated systems such as aircraft takeoff,
air craft turning in the space and a walking robot having load in one arm. Different
advance control techniques can be tested on simple model of BBS. System comprises of
a long beam which is moved by using servo motor and a ball on which it moves with
respect to beam motion. Providing appropriate beam angle to give the stability to the ball
and beam in a specific position with certain specifications, is a challenging research
problem. Performance of the system is greatly dependent on accurate and efficient
control action. In this research work an optimized Linear Quadratic Regulator (LQR)
controller with the help of Extended State Observer (ESO) and Genetic Algorithm (GA).
Disturbance estimation is carried out using state observe, these states are used in
controller to reduce the effect of actual disturbance and uncertainties in the plant. LQR
with GA will find the feedback gain vector. Simulation work will be carried out in
Simulink MATLAB, and result will be validated in googol tech Ball and Beam system.

2|Page
Motivation
Ball & Beam System resembles with many real time systems such as aircraft take off
aircraft turning in the space robot walking with load in one arm. The simple structure of
Ball & Beam System offers easy modeling and testing of different intelligent control
techniques. It motivates us to do some research in this area.

Introduction
Ball & Beam System:
Ball & Beam is a piece of lab equipment designed especially for courses in automatic
control principle, modern control engineering, and electrical motor control. The control
system designed with this experiment equipment is capable of controlling the position
of a stainless steel ball on the track by adjusting the rotating angle of a beam, and for
doing research in motion control field. It can serve as a convenient tool for practical
implementation of many classical and modern control system design methods.
The Ball & Beam control system consists of a v-grooved steel bar and a free rolling ball.
The linear sensor measures the position of the ball on the track by measuring the output
voltage from the stainless steel bar. A DC motor is connected to a gear reducer, which
controls the angle of beam, accordingly realize the position

Ball & Beam System Features and Benefits:


The ball-beam system is a frequently encountered example of a nonlinear dynamical
system. While the ideal ball-beam system is indeed nonlinear, its practical
implementation in the lab has additional non-linearities, including:
 Dead band,
 Backlash introduced by the DC motor and belt pulley,
 Discrete position sensing,
 Uneven rolling surface.
These effects are traditionally hard to measure and to model. However they may
drastically influence the behavior of the system under control. How to build a robust
control for such systems is one of the most important questions of modern theory.

3|Page
Ball & Beam product offered by Googol Technology is a universal tool to study the
control of systems possessed both non-linear dynamics and most common non-linear
effects observed in real control systems.
From control point of view the mechanical plant of ball-beam systems poses another
important feature – instability. Beside traditional theoretical difficulties, in many cases
the study of such systems may involve certain practical risk to the health of researcher
because of dangerous and unpredictable behavior of unstable mechanisms. Ball&Beam,
being simple, compact and safe, is the best laboratory solution to this problem. Equipped
with modern intelligent power drive module and intuitive programming Windows
interface it is an ideal tool for control systems modeling.
Ball & Beam Functional Components
Ball & Beam System is functionally divided into the following components, as shown in
Figure 1.

FIGURE 1: BASIC COMPONENTS AND THEIR INTERCONNECTION OF BALL & BEAM.

4|Page
 Ball & Beam apparatus that includes
 Mechanical plant with built-in DC servo motor and DC voltage supply,
 IPM100 intelligent servo drive system,
 PC with the control program.

The details of functional blocks are discussed in the following sections.

Mechanical Plant:
The mechanical plant consists of a base, a beam, a ball, a lever arm, a belt pulley, a
support block and a motor as shown in Figure 2.
The ball can roll freely along the whole length of the beam. The beam is connected to
the fixed support block at one side and to the movable lever arm at another one. In turn
the motion of the lever arm is controlled by the DC brush motor through belt pulley.
The motor is equipped with built-in rotary optical incremental encoder (1000P/R) that
provides feedback information about current actual rotary position of the motor shaft. In
the slot along the beam there is a linear potentiometer sensor that senses current linear
actual position of the ball on the beam. Both measured positions are fed back to the
control system to organize a closed loop control.
As the servo gear turns by an angle theta, the lever arm changes the angle of the beam
by alpha. When the beam is moved away from horizontal position, gravity causes the
ball to roll along the beam.
The purpose is to design and implement a control algorithm that moves the shaft of the
motor in such a way that the desired position of the ball is stabilized on the beam.

FIGURE 2: FUNCTIONAL COMPONENTS OF MECHANICAL PLANT

5|Page
Intelligent Drive:
The motion of the motor’s shaft is governed by IPM100 intelligent drive. This is a high
precision, fully digital servo drive with embedded intelligence and 100W power
amplifier suitable for brushless/brush motors. Based on feedback information from
sensors it computes and then applies appropriate PWM modulated voltage to the motor
windings in such a way that a sufficient torque moves the motor shaft according the user
programmed control algorithm.
The drive is called “intelligent” because besides built-in power amplifier for control
signal amplification and PWM-modulation it has an on-board Digital Signal Processor
(DSP), memory and other digital logic which offer advanced motion control and PLC
functionality. Real-time trajectory generation, closed loop servo control, handling
commands from host computer and processing I/O signals are executed on-board
according to the stored programs and on-line commands from host PC. This embedded
intelligence provides a true real-time control performance independent of any delays
caused by PC’s non-real time Operating System.
Although the drive can operate both in stand-alone and slave modes, Ball & Beam
application examples given in this manual make use of its stand-alone features.
Physically IPM100 is located inside the electric control box and communicates with the
upper-level PC through RS-232 interface. The DC voltage to the drive is provided by
the DC power supply also inside the electric control box.

PC-based Control Software:


The user programs the drive with the high-level Technosoft Motion Language (TML) in
IPM Motion Studio running on host PC. The code and on-line commands are
downloaded to the drive for execution through PC’s COM port.
IPM Motion Studio is an advanced and intuitive-based Windows Integrated
Development Environment for the set-up and analysis of motion control applications
with IPM drives. With this platform it is easy to:
 Identify motor, sensor and load parameters
 Tune and adjust the servo-drive control loops
 Build flexible motion control algorithms/programs using TML
 Analyze and evaluate the behavior of the system

6|Page
The user can define the motor commands to be applied to the motor. The Motion Wizard
tool can help to generate all TML instructions in a graphical way without need to write
any actual TML code. Specific selection and definition dialogs can be opened, viewed
and edited depending on the command type to be generated.
The advanced graphics tools include Data Logger, Control Panel, Watches for TML
parameters, registers and memory. They can be used to perform real-time analysis of the
behavior of the motion system.
It is advisable for users to read “IPM100 Motion Studio User Manual” for more details
on IPM operation before assuming any practical steps with Ball & Beam.

7|Page
Literature Review
The accurate control of ball position on beam is a challenging task. The performance
analysis of ball and beam system is carried out using PID, state space, lag-lead, robust
LQR, observer based LQG controllers, and performance characteristics of the system
was presented. There are many research work has been done to control the ball in desired
position on the beam. Some conventional techniques have been developed for BBS, such
as proportional plus derivative (PD) controller. There are number of advanced control
techniques have been designed, such as an optimized full state feedback controller has
been designed with the help of Linear Quadratic Regulator (LQR) theory & Genetic
Algorithm (GA) as an optimization method. LQR with GA will find the optimum
feedback gain vectors which are associated with the all states of the Ball & Beam
System. LQR with GA will find the optimum feedback gain vector which are associated
with the all state of ball & beam system [1]. ESO based Control design for ball and beam
system which is one of the most sought after problem for control engineering students.
In this design an estimation of a virtual state (“disturbance”) is carried out online with
state observer & these states are used in controller to nullify the effects of actual
disturbances in the plant [2]. To model the ball and beam system considering nonlinear
factors and coupling effect and to design Proportional Integral Derivative (PID)
controller to control the ball position. The system consists of an Arduino microcontroller.
It receives the ball position from ultrasonic distance sensor and compares it with the
desired distance which can be set by the user. PID algorithm has built in Arduino to
process the difference in signal between desired and real position into control signal.
Arduino sends control signal to the DC servomotor which rotates to change the ball
position and meet the desired distance [3]. A vision guided robotic ball-beam balancing
control system, consisting of a robot manipulator (actuator), a ball-beam system (plant)
and a machine vision system (feedback). The machine vision system feedbacks real-time
beam angle and ball position data at a speed of 50 frames per second. Based on feedback
data, the end-effector of a robot manipulator is driven to control the ball position by
maneuvering of the inclination angle of the ball-beam system [4]. A gain scheduling
PID controller for stabilizing the ball and beam system [5]. An effective approach about
the self-adaptive fuzzy PID control and fuzzy control [6]. Addresses the control and real
time modelling of ball and beam system. Different types of controllers are being used to

8|Page
balance a ball on a beam at a pre-defined location with precise amount of force and
torque in minimum time for stable operation of the system [7]. To enhance the
performance of the system more efficient controllers are needed hence currently many
researchers are doing research in this area.

9|Page
Problem Statement
Providing an appropriate beam angle to give the stability to the ball on the beam in a
specific position with certain specifications is a challenging task for control system
researchers so there is still a need of efficient controller for BBS.

Project/Research Objectives
 Mathematical Analysis of Ball and Beam system
 To design an efficient Extended State Observer (ESO) based Linear Quadratic
Regulator (LQR) controller with the help of Genetic Algorithm.
 Performance analysis and comparison of proposed approach with previous literature.

Proposed Methodology
1. Mathematical Modeling of BBS
BSS is non-linear unstable system controller is needed to make this system stable.
We need mathematical model of the system to control it.
2. Simulation of Open loop unstable BSS system
Initially open loop BSS system is simulated using mathematical model
3. Full state feedback controller
Full state feedback controller will be designed to estimate the optimum angle of the
beam.
4. Disturbance estimation
Actual Disturbance and uncertainties in plant are nullified in controller by
estimating virtual states (disturbance) by using extended state observer
5. Optimization of Gain vector
System efficiency is greatly dependent on optimum control action. Gain vector is
estimated by LQR controller and Genetic Algorithm.
6. Performance Evaluation
Performance of the proposed system will be tested on the googol Ball and Beam
system.

10 | P a g e
FIGURE 3: PROPOSED METHODOLOGY

Flow Chart:

FIGURE 4: Flow chart

11 | P a g e
Workload Division

Name Literature Analysis Simulation Designing & Hardware of Thesis


Review of BBS & Simulation of Implementation Writing
Interfacing Controller
of BBS
Shahid Hasan 45% 33% 40% 40% 33% 40%
Mian
Mushtaq Ali 30% 33% 30% 30% 33% 35%
Khan
Ejaz ul Haq 25% 33% 30% 30% 33% 25%

TABLE 1: WORK LOAD DIVISION TABLE.

Gantt chart
Jun-17 Jul-17 Aug-17 Sep-17 Oct-17 Nov-17 Dec-17 Jan-18 Feb-18 Mar-18 Apr-18 May-18 Jun-18 Jul-18 Aug-18
Topic Selection
Literature Review
Proposal
Defence ppt
Analysis of BBS
Simulation & Interfacing of BBS
Initial ppt
Designing & Simulation of Controller
Hardware Implementation*
Thesis Writing Thesis Writing Thesis Writing
Final ppt
Figure 5: GANTT CHART

* Hardware implementation is subjected to availability of time.

12 | P a g e
References

[1] Sumanta K, Nigam,M “An optimized Full State feedback controller for Ball and Beam
System” International Journal of Latest Trends in Engineering and Technology (IJLTET) 318-
326 (2016) 2278-621X V6 I4.
[2] Choudhary, M. K., and G. Naresh Kumar. "ESO Based LQR Controller for Ball and Beam
System." IFAC-PapersOnLine 49, no. 1 (2016): 607-610.

[3] Ali, Awadalla Taifour, A. M. Ahmed, H. A. Almahdi, Osama A. Taha, and A. Naseraldeen.
"Design and Implementation of Ball and Beam System using PID Controller." MAYFEB
Journal of Electrical and Computer Engineering 1 (2017).
[4] Shih, Ching-Long, Jung-Hsien Hsu, and Chi-Jen Chang. "Visual Feedback Balance
Control of a Robot Manipulator and Ball-Beam System." Journal of Computer and
Communications 5, no. 09 (2017): 8.

[5] Krishna, Bipin, Sagnik Gangopadhyay, and Jim George. "Design and simulation of gain
scheduling PID controller for ball and beam system." (2012): 199-203.

[6] Shabeer A K. VijayK “Adaptive Fuzzy PID for the control of Ball and Beam System”
International Journal of Engineering Research & Technology (IJERT) P. 1942- 1947

[7] Valluru, Sudarshan K., Madhusudan Singh, and Supriya Singh. "Prototype design and
analysis of controllers for one dimensional ball and beam system." In Power Electronics,
Intelligent Control and Energy Systems (ICPEICES), IEEE International Conference on, pp.
1-6. IEEE, 2016.

13 | P a g e

You might also like