Vous êtes sur la page 1sur 40

DEVELOPMENT OF A MODEL REFERENCE

ADAPTIVE CONTROL ALGORITHM FOR A


PENDULUM

THESIS SUBMITTED IN FUFILLMENT OF THE


REQUIREMENT OF THE DEGREE OF

Bachelor of Technology in
Electrical Engineering
By
Opeolu VO
STUDENT NUMBER: 210210648

Supervisor: Mr. Y.D. Mfoumboulou


Co-supervisor: Prof. R. Tzoneva
Bellville Campus

NOVEMBER 2015
Declaration

I, Victory Opeolu Oluwadamilare, declare that the contents of this project represent
my own unaided work, and that the project has not previously been submitted for
academic examination towards any qualification. Furthermore, it represents my own
opinions and not necessarily those of the Cape Peninsula University of Technology.

Signed Date

ii
Abstract

Most pendulum control system analysis are linear i.e. pendulum is moving uniformly
without any change in mass/distortion/angle. This research shows the control of a
nonlinear pendulum using the Model Reference adaptive control (MRAC)scheme
adaptive model of the pendulum when it is nonlinear i.e. it no longer moves
uniformly.
The main objectives of this project are to:

- Develop a mathematical model of the nonlinear pendulum


- Develop a linearized model of the pendulum
- Simulate the nonlinear and linearized plant models
- Design a nonlinear linearizing controller based on the second method
of the Lyapunov theory and Model Reference Adaptive control.
- Simulate the closed-loop system
- PLC implementation of the closed loop system

The nonlinear control of the pendulum is developed using model reference adaptive
control scheme. After reviewing various papers, the Lyapunov method for stability is
found to be the most reliable approach to solve the nonlinearities in nonlinear
systems. The focus of this research is to develop a model reference adaptive control
algorithm for a nonlinear pendulum on the basis of Lyapunov stability theory.
After the linear and the nonlinear models of the pendulum were developed, the
results are computer-generated using appropriate MATLAB and Simulink.

iii
Acknowledgements

I dedicate my project work to God for I could not have done any of it without His help and
grace.

I would also like to thank my supervisor, Mr Mfoumboulou for his help en route to completing
this project. He has been a major influence with his insights into control engineering.

The financial assistance of the National Research Foundation towards this project is
acknowledged. Opinions expressed in this project and the conclusions arrived at, are those
of the author, and are not necessarily to be attributed to the National Research Foundation.

iv
Glossary

MRAC Model Reference Adaptive control

MRAS Model Reference Adaptive Scheme

Simulation and link


Simulink

LTI Linear Time Invariant

PLC Programmable logic controller

MRC Model Reference Control

Symbols and Abbreviations

x System ststes
Adjustment parameter
Natural Frequency
ym Reference model output
y Plant output
- State error
%OS Percentage Overshoot

v
Table of Contents

Declaration.................................................................................................................ii
Acknowledgements..................................................................................................iv
Glossary .................................................................................................................... v
Symbols and Abbreviations ........................................................................................ v
Table of Contents .....................................................................................................vi
List of figures .......................................................................................................... vii
1. Adaptive Control ............................................................................................... 1
1.1. Introduction .................................................................................................... 1
1.1.1. Brief History................................................................................................. 1
1.1.2. Applications................................................................................................. 1
2. PROBLEM DESCRIPTION ................................................................................. 3
2.1. Problem Statement ..................................................................................... 3
2.2. Research Aim .............................................................................................. 3
2.3. Research Objectives ................................................................................... 3
3. Mathematical model .......................................................................................... 4
3.1. Introduction ................................................................................................. 4
3.2. Modelling of physical systems .................................................................. 4
3.3. Modelling of pendulum system .................................................................. 4
3.4. Nonlinear model .......................................................................................... 6
3.5. Linearized Pendulum .................................................................................. 7
3.6. Pendulum analysis and Simulation ........................................................... 9
3.7. Results Analysis ....................................................................................... 10
3.8. Nonlinear vs Linear Pendulum................................................................. 11
4. Control design ................................................................................................. 13
4.1. Linear system ............................................................................................ 13
4.1.1. Controllability ..................................................................................... 13
4.1.2. Observability ....................................................................................... 14
4.2. Linear Control Design Techniques .......................................................... 14
4.2.1. Pole placement Control...................................................................... 14
4.3. Nonlinear Control Systems ...................................................................... 16
4.3.1. Model Reference Adaptive control .................................................... 17
4.3.2. MRAC working principle .................................................................... 17

vi
5. Adaptive controller design for pendulum system ........................................ 20
5.1. Reference Model ....................................................................................... 20
5.2. Lyapunov controller design ..................................................................... 20
5.3. Simulation of Model reference adaptive control system and results ... 22
6. Conclusion....................................................................................................... 24
7. References ....................................................................................................... 25
Appendices A: Simulink Blocks.............................................................................. A
Appendices B: MATLAB Script File ........................................................................C

List of figures

Figure 1: An adaptive control structure (Landau, et al., 2011) .............................. 1


Figure 2: A simple pendulum representation (Russell, 2011) ............................... 4
Figure 03: Oscillation with various degrees of damping (Slung.com, 2015) ........ 5
Figure 4: Pole Zero representation of system ....................................................... 8
Figure 5: Nonlinear representation of Pendulum Model ....................................... 9
Figure 6: Linearized pendulum model in Simulink .............................................. 10
Figure 7: Linearized Pendulum output ................................................................. 10
Figure 8: Nonlinear Pendulum Output.................................................................. 11
Figure 9: Nonlinear vs Linear Pendulum.............................................................. 11
Figure 10: Controllability graphical illustration ................................................... 13
Figure 11: General Closed loop system with controller (Mataifa, 2015) ............ 14
Figure 12: Simulink Control block for pole Placement control .......................... 15
Figure 13: System response after pole placement .............................................. 16
Figure 14: General Block diagram of MRAC (Coman & Boldisor, 2014) .............. 17
Figure 15: Lyapunov stable and unstable system (Lavretsky, 2011) .................. 19
Figure 16: Block diagram of the Adaptive closed loop system ......................... 22
Figure 17: Simulink nonlinear controller with adjustment parameter ............... 22
Figure 18: Simulink Model Reference adaptive control system ......................... 23
Figure 19: Controlled Nonlinear model ................................................................ 23
Figure 20: Simulating both Math models to one output ....................................... A
Figure 21: Nonlinear Adaptive Controller .............................................................. A
Figure 22: Closed loop Model reference control ................................................... B

vii
1. Adaptive Control

1.1. Introduction
Adaptive control is coined from the word adapt which means to adjust or to
conform. Based on this broad definition, according to Landau, et al. (2011),
adaptive control can be defined as a set of techniques used for automatic
adjustment of a controller(s) in real time so as to maintain a specific and
consistent level of performance of the control system when the disturbance
factors of the plant dynamic model are unknown and/or change in time. The
adaptive controller is inherently nonlinear and therefore, the analysis and
design rely on the Lyapunov Stability theory (Lavretsky, 2011).

Figure 1: An adaptive control structure (Landau, et al., 2011)

1.1.1. Brief History


Extensive adaptive control research first started in the early 1950s in
connection with the design of autopilots for aircrafts operating over a wide
range of speeds and altitudes. A problem of this system then was that with
ordinary constant-gain, linear feedback control could work well in one
operating condition but not over the whole flight sysstem and the solution was
to implement a more sophisticated system that could work over a wide range
of operating conditions. Interest diminished later partly due to the crash of a
test flight as adaptive control techniques available then were too difficult to
implement. Over the last decade, coherent theories with many practical
applications have been developed (strm & Wittenmark, 1994) (Lavretsky,
2011).
1.1.2. Applications
Specific situations where adaptive control is applicable include:
- The automatic tuning of a controller with unknown but constant plant
parameters
1
- When the plant model change(s) is/are unpredictable with time.
Adaptive control applications include the aerospace engineering, and an example
is the Autonomous Formation flight (AFF), sponsored by NASA, Boeing and
UCLA. This system was modelled using adaptive control techniques and was
successfully completed and tested in December 2001.

2
2. PROBLEM DESCRIPTION

2.1. Problem Statement


The research work in this thesis gives an approach to develop a model reference
adaptive control methodology for the adaptive control of a damped pendulum.

2.2. Research Aim


The aim of this project is to develop an algorithm for the control of the nonlinear
pendulum based on the Lyapunov theory and MRAC.

2.3. Research Objectives


Achieving this aim requires the following objectives:
- Developing the mathematical model of the pendulum
- Developing a linearized model of the pendulum
- Simulating the nonlinear and linearized plant models
- Designing an adaptive controller based on Model Reference Adaptive
control (MRAC).
- Simulating the closed-loop system using appropriate software
- PLC implementation of the closed loop system

3
3. Mathematical model

3.1. Introduction
A mathematical model according to (Dahleh, et al., 2011) is simply the behavioural
representation of physical objects/systems in mathematical terms. They are in form
of equations used in describing the behaviour of the system.

3.2. Modelling of physical systems


There are different types of physical systems, some of which include electrical
systems, mechanical systems, biological systems, amongst others, For the purpose
of this project, the physical system being modeled is a mechanical system.

3.3. Modelling of pendulum system


A simple pendulum may be described ideally as a point mass suspended by a
massless string from some point about which it is allowed to swing back and forth
in a place (Parks, 2000).
It consists of a suspended light string with a small radius, attached to a small object
(preferably sphere metal) with specific mass as seen in Figure 2. When the object
is deflected from its equilibrium, it oscillates back and forth.

Figure 2: A simple pendulum representation (Russell, 2011)

4
For small angles of deflection, the periodic motion is harmonic i.e. the pendulum
moves easily and smoothly with no external disturbances. For this condition
(harmonic motion), the period of the simple pendulum is given by the following
formula:


= 2 (3.1)

2

= 4 (3. 2)

However, we know practically that due to obstacles such as air resistance and
friction, the pendulum will not oscillate forever. The oscillatory amplitude reduces
gradually due to the frictional forces until the system is ultimately at rest, thereby
giving damped oscillations.
There are three classifications of damped oscillations (University of Georgia, 2015;
Slung.com, 2015) namely:
- Critically-damped: The damping force is such that the system returns
to equilibrium as quickly as possible and stops at that point.
- Over-damped: The damping force is greater than the minimum
needed to prevent oscillations, thereby returning the system to
equilibrium without oscillating. Also, it takes longer to do so than a
critically damped system.
- Under-damped: It oscillates about the equilibrium point, with the
amplitude decreasing with each cycle.
These classifications are illustrated in Figure 3 below:

Figure 03: Oscillation with various degrees of damping (Slung.com, 2015)

5
Using equation 2, the gravitational acceleration can be determined by the slope of
the T2 vs. L graph.
The equation of motion may also be obtained by applying Newtons second law for
rotational systems:
= = 2 ( ), =
2
sin = 2 2 (3.3)

It is also assumed that the damping constant k, is proportional to velocity, and its
represented as a negative force because the damping force is in the opposite
direction of motion.
2
2 sin = 2 2 (3.4)

The complete model is rearranged as:


2
+ + sin = (3.5)
2 2 2

3.4. Nonlinear model


State Space model is basically a representation of the dynamics of a system as a
first order differential or difference equation, using state variables. They are
represented with the general LTI state form:

() = () + () (3.6)
() = () + () (3.7)
() , ()

Due to the compactness this representation, large and complex systems can be
analysed easily using these two equations.
The state of the system is he collection of variables required to describe a system
at any point in time. In this case, the variables are the angle/position and the
angular velocity.
() = 1 () ()

() = 2 () ( )
1 () = 2

2 () = 2 2 1 + 2

6
The vector representation

2 () 0
[ 1] = [ ] + [1
] (3.8)
2 sin 1 () 2 1 () 2

1 ()
() = [1 0] [ ] (3.9)
2 ()
Expressing (a) and (b) as a standard nonlinear model,
2 () 0
() = [ ] ; () = [1
] (3.10)
sin 1 () 2 1 () 2

3.5. Linearized Pendulum


Linearization is basically a linear approximation of a nonlinear system that is valid
in a small region around the operating point (The MathWorks, Inc., 2015).
A pendulum is considered linear if small angular aproximation is no longer
appropriate, or it swings completely around its pivot or there is no analytical
solution with a sinusoidal restoring force. However, to understand the general
dynamic/behaviour of the system, the nonlinear model is linearized around a
desired operating point.
(1 (), 2 (), () = 0
2 ()
(, , ) = [ ] , (3..11)
sin 1 () () + 1 2
2 1

0 1 0
= [ cos ()] ;
= [1 2 ] ; 1 1 ,
1
2 1

The linearised equation becomes:


0 1 0
() = [ ] () + [ 1 ] () (3.12)
2 [0 0] 2

1 ()
() = [1 0] [ ] (3.13)
2 ()
which is in th format:
() = +
() = () + ()
The parameters for the simple pendulum are shown in the table below:

7
Parameter Value
Ball mass, m [kg] 0.5
Length of the string, l [m] 0.5
Damping coefficient due to frictin, k [Kg.m2/s] 0.2
Acceleration due to gravity, g [m/s2] 9.81

With these given parameters, the state space representation becomes:


0 1 1 0
[ 1] = [ ] [ ] + [ ] ()
2 19.62 1.6 2 8
1
= [1 0] [ ] + 0
2

The transfer function of this system can then be calculated using the formula:
() = ( )1
0 1 0
= [ ] ; = [ ] ; = [1 0]; = 0;
19.62 1.6 8
1
0 0 1 0
() = [1 0] [[ ] [ ]] [ ]
0 19.62 1.6 8
8
() = (3.14)
2 +1.6+19.62

This system is further analysed with MATLAB to check for the stability of the
system using command [zer, pol] = tf2zp(num, den)

Figure 4: Pole Zero representation of system

From the system, it is seen that the poles are on the left which is the stable region.

8
3.6. Pendulum analysis and Simulation
Simulation is an activity in which an actual or proposed system is replaced by an
abstract model (generally said to be a simulation model), having almost the same
cause-and-effect relationships as the actual system (Kriger, 2015). It involves the
generation of an artificial history to draw inferences concerning the operationg
characteristics of the system that is represented.
Simulations allows a clear understanding of how a system behaves, thereby
choosing the most applicable control technique for stabilizing the system. In this
case, MATLAB is used as the programming software for both nonlinear and
linearized models. For the initial conditions, the position was assumed to start at
small angle i.e. x1 = 30 = 0.05rad and x2 = 0;
The parameters are introduced in a MATLAB m-file, saved as
pendulum_system.m, while the linear and nonlinear models is saved as
lin_nlin_Syresponse.mdl. The simulink diagrams can be found in the Figures 5
and 6below:

Figure 5: Nonlinear representation of Pendulum Model

9
Figure 6: Linearized pendulum model in Simulink

3.7. Results Analysis


The system behaves as a underdamped system. As seen from figure 7and 8, the
pendulum ball starts from the initial position, the amplitude then reduces
gradually until it goes back to rest.

Figure 7: Linearized Pendulum output

10
Figure 8: Nonlinear Pendulum Output

3.8. Nonlinear vs Linear Pendulum

Figure 9: Nonlinear vs Linear Pendulum

11
From Figure 9, it can be seen that:
- The linear response has a similar behaviour with the nonlinear
response.
- The nonlinear response has more vibrations compared to the linear
response
- The settling time for the nonlinear system is higher than the linear
system i.e. it takes longer for the nonlinear pendulum to go to rest
position (0).
Nonlinear control is therefore important as as it ensures more accurate desired
stability properties.

12
4. Control design

In general, control system design aims to satisfy certain performance objectives such
as stability, disturbance rejection, accurate input tracking, and robustness or
insensitivity to parameter uncertainty and a design standpoint is to view the plant
system as an approximation of the nonlinear system (linearized model), to which
established linear control techniques may be applied (Shimkin, 2009).

4.1. Linear system


Controllability and observability represent two major concepts of modern control
systems theory. These concepts were first introduced by R. KAlman in 1960
(Rutgers University, 2015). According to (Remsing, 2006), a control system
naturally should be designed such that the input u controls all the startes; and also
that all the states can be observed from the output y. The concept of controllability
and observability formalize these ideas

4.1.1. Controllability

In order to get a desired response, the dynamic system under control input must
be controllable. According to (Padhi, 2010), a system is said to be controllable at
time t0, if it is possible to by means of an unconstrained control vector to transfer
the system from any initial state X0 to any other state in a finite interval of time.
The controllability of a system depends on the system matrix A and the control
influence matrix B.
.

Figure 10: Controllability graphical illustration

If the rank of [ 1 ] is n, then the system is controllable.


Checking for the controllability of this system, the calculations for AB and A2B
are:

13
0
= [ ]
8
0 1 0 8
= [ ] [ ]= [ ]
19.62 1.6 8 12.8
0 .8
= [ ];
8 12.8
The system is therefore controllable as the columns are independent of each
other. Also, using the function ctrd(A,B) in MATLAB shows the rank of the matrix
2, meaning it is controllable.

4.1.2. Observability
A system is said to be observable at time t0 if, with the system in state X(t0) ,it is
possible to determine this state from the observation of the output over a finite
interval of time.. A system must be observable to see what is going on inside a
system under observation (Rutgers University, 2015)

4.2. Linear Control Design Techniques


There are different linear control techniques that can be applied to the system.
They include PID control, cascade control, pole placement, optimal control and so
on. For this model however, pole-placement method is used.

4.2.1. Pole placement Control


The controller matrix is determined in such a way that the closed loop system has
desired place of its poles. The closed loop system can be drawn as follows:

r U B xd x C y

H x

Figure 11: General Closed loop system with controller (Mataifa, 2015)

The desired performance of the system according to (Mataifa, 2015), the desired
performance of the closed loop can be determined by using a transfer function,

14
performance specification or location of the poles in the complex plane. However,
for this system, performance specification is used.
The settling time is assumed to be less than 0.09s and the percentage overshoot
less than 1.5%.
< 0.09
%. < 1.5%
% 1.5
( ) ( )
100 100
= %
= 1.5
= 0.8
2 +2 ( ) 2 +2 ( )
100 100

4 4
= = = 0.09 = 44.44

. = . ; = cos 1 0.8 = 36.870


= 44.4 tan 36.87 = 33.24
1 = + . = 44.4 33.24;
2 1 ,
2 = 44.4 + 33.24
() = ( + 1 )( + 2 ) = ( 44.4 33.24)( 44.4 + 33.24)
In MATLAB, the function place(A,B,[p1 p2]) to get the controller parameters k1 and
k2. The Simulink block and result can be seen from the Figures 12 and 13 below.

Figure 12: Simulink Control block for pole Placement control

15
Figure 13: System response after pole placement

Using the stepinfo command in MATLAB, the following system results was found:
Rise Time: 0.0552
Settling Time: 0.0683
Settling Min: 0.0025
Settling Max: 0.0027
Overshoot: 1.4542
Undershoot: 0
Peak: 0.0027
Peak Time: 0.0954
From these results, it is seen that the settling time and the %OS are well within the
chosen range (Ts<0.09; %OS < 1.5%).

4.3. Nonlinear Control Systems


According to (Shimkin, 2009), nonlinear control systems are systems where
nonlinearity plays a significant role, either in the controlled process (plant) or in the
controller itself. Nonlinear control theory is concerned with the analysis and design
of nonlinear control systems.

16
While linearizing the behaviour of the plant and applying a linear control method is
an effective method of controlling the system, it is only effective for a certain range
of conditions which in this case is small angles (200 of less). Large deviations from
200 upwards leads to instabilities and the eventual failure of the system to remain in
the desired position (Russell, 2011; Xie, 2003).

4.3.1. Model Reference Adaptive control


Model reference adaptive control (MRAC) is a direct adaptive strategy with some
adjustable controller parameters and an adjusting mechanism to adjust them.
(Coman & Boldisor, 2014).

Reference Ym
Model
controller
parameters
Adjustment
Mechanism

r
u
y
Controller Plant

Figure 14: General Block diagram of MRAC (Coman & Boldisor, 2014)

4.3.2. MRAC working principle


Model reference adaptive control strategy is used to design the adaptive
controller that works on the principle of adjusting the controller parameter so that
the output of the actual plant tracks the output of a reference model having the
same reference input (Priyank & Nigam, 2013).
From figure 14, the reference model is used to give an ideal response of the
adaptive control system to the reference input. The controller is usually described
by a set of adjustable parameters. The Adjustment mechanism component is
used to modify the parameters of the controller so that the actual plant could
track the reference model (Priyank & Nigam, 2013).
An important goal of the MRAC is to be successful in eliminating the gap between
system output and reference model. This gap is the error signal, () and its size
depends on the chosen model reference, the process () which must follow

17
the output signal, and the command signal. It is said that when, for all command
signals, the error signal is reduced to zero, a perfect model can be achieved
(Coman & Boldisor, 2014).
To develop the adjustment mechanism, mathematical approaches like Lyapunov
theory, theory of augmented error and MIT rule can be used. For this system,
Lyapunovs method is used as it provides a better stability (Sapiee, et al., 2008;
Pankaj, et al., 2011).

4.3.2.1. Lyapunov Design


Lyapunovs theory was developed for both time-invariant systems and time-
varying systems and is a more powerful theorem used to design adaptive
controllers (strm & Wittenmark, 1994).
In Lyapunov-based design, a stable system is synthesized firstly, by choosing
a candidate Lyapunov function V, and then selecting a state feedback control
law that renders the derivative of V negative

4.3.2.1.1. Stability
According to Remsing (2006), there is no simple concept of stability,
therefore different definitions are possible. A system is considered to
be:
- Stable if for any positive there exists a positive scalar such that
() < Implies () < for all 0 .
- Asymptotically stable if it is stable and if in addition () 0
- Unstable if it is not stable; that is, there exists an > 0 such that for
every > 0 there exists an (0 ) with (0 ) < , (1 ) < for
some 1 > 0 .
- Completely unstable if there exists an > 0 such that for every > 0
and for every (0 ) with (0 ) < , (1 ) < for some 1 > 0 .
By definition, the equilibrium state = 0 of autonomous nonlinear dynamic
system is said to be stable if:
> 0, > 0, {(0) < } { 0, () < }

18
The stated Lyapunov Stability means that the system trajectory can be kept
arbitrary close to the origin by starting sufficiently close to it (Lavretsky, 2011) as
seen in figure 7 below.

Figure 15: Lyapunov stable and unstable system (Lavretsky, 2011)

19
5. Adaptive controller design for pendulum system

5.1. Reference Model


The reference model is selected based on the behaviour of the pole-placed
controlled linearized model. The block diagram is seen in figure 12

5.2. Lyapunov controller design


From chapter 3, the nonlinear system is represented as:
() = () + () (5.1)
() = () + (5.2)
() , ()
and the linearized system is represented as
() = + (5.3)
() = + () (5.4)
The error vector is defined by
= , (5.5)

The requirements towards the closed loop systems are that the error has to be
reduced to zero by a suitable control vector u. In order to include the model
equation and the plant equation in the error, it is necessary to differentiate the error
equation (5.5) according to the time:
= = + () ()
= + + () ()
= ( ) + + () ()
= + + () () (5.6)

The Lyapunov function assumed to be in quadratic form:


() = (5.7)
Where is a real symmetric matrix/positive definite.

Seeing as V() is in quadratic form and the matrix P is positive definite, it is true
that V() is positive definite.
Differentiating the positive definite function V() along the system trajectory, its time
derivative is obtained.

20
() = +
= [ + + () ()] + [ + + () ()]
= + + () () + + +
() ()
= [ + ] + 2

2 = + () () () () +
+
= + () () () () + +

= 2 [ () () + ]
= [ () () + ] (5.8)
Calculating the nonlinear linearization controller u is done by some transformations
of the expression for N
= [ + () ()] 0
= [ + ()] [()] 0 (5.9)
[ + ()] [()] . Since the expressions from both sides of the
equation are scalars, the equation can be modified to give:

[+ ()]
(5.10)
[()]
In MATLAB, the function lyap(Ar, Q) is used to calculate P.
The parameters are updated as:
1
= (5.11)

2
= , (5.12)

Parameter (Plant Model) Value


Ball mass, m [kg] 1
Length of the string, l [m] 1
Damping coefficient due to frictin, k [Kg.m2/s] 1.2
Acceleration due to gravity, g [m/s2] 9.81

21
+
U

_
Yd

y C

thetha

Uc
e

y
Adjustment
Parameters

Figure 16: Block diagram of the Adaptive closed loop system

5.3. Simulation of Model reference adaptive control system and results

Figure 17: Simulink nonlinear controller with adjustment parameter

22
Figure 18: Simulink Model Reference adaptive control system

Figure 19: Controlled Nonlinear model

23
Figure 19 shows the controlled output of the system when the gain is 2. It shows a
low settling time and a low %OS

6. Conclusion
This thesis covers the linear and nonlinear control of the pendulum system. Pole
Placement method was used to control the linearized system and MRAS based on
Lyapunovs second method was used to design the nonlinear controller. The
controlled system is fairly stable as it has very little settling time and low overshoot.

24
7. References

Anon., 2014. Design of Adaptive Controller Based On Lyapunov. World Academy of


Science, Engineering and TechnologyInternational Journal of Electrical, Computer,
Energetic, Electronic and Communication Engineering, 8(1), pp. 176-179.
strm, K. J. & Wittenmark, B., 1994. Adaptive control. 2nd ed. Lund: Addison-
Wesley Publishing Company.
Coman, S. & Boldisor, C., 2014. Adaptive PI controller design to control a mass-
damper-spring process. Engineering Sciences, 7(2), pp. 69-74.
Dahleh, M., Dahleh, M. A. & Verghese, G., 2011. Dynamic Systems and Control.
massachusetts: MIT OpenCourseWare.
Garikayi, t. et al., 2013. MODEL REFERENCE ADAPTIVE CONTROL SYSTEM
FOR MOISTURE REGULATION IN COTTON GAINING. Stellenbosch: SAIIE25.
Gorinevsky, 2005. Linear systems. Stanford: Stanford University.
Ioannou, P. A. & Sun, J., 2015. Robust Adaptive Control. Los Angeles: University of
Southern Carlifornia.
Kanso, W. M., 1990. MODEL REFERENCE ADAPTIVE CONTROL ALGORITHM
ON A SEXUND ORDER DYNARIC MODEL. IEEE, I(90), pp. 1179-1182.
Kriger, K., 2015. Introduction to Simulation. Cape Town: Cape Peninsula University
of Technology.
Landau, I. D., Lozano, R., M'Saad, M. & Karimi, A., 2011. Adaptive Control
Algorithms, Analysis and Applications. [Online]
Available at: http://www.landau-adaptivecontrol.org/
[Accessed 20 June 2015].
Lavretsky, E., 2011. Adaptive Control: Introduction, Overview, and Applications.
Pasadena: California Institute of Technology.
Misbawu, A., Edmund, A.-S. K. & Shahrouz, E., 2014. Adaptive Control Strategy
using Lyapunov. International Journal of Engineering Research & Technology
(IJERT), 3(9), pp. 1557-1561.
MIT OpenCOurseWare, 2010. Feedback Control Systems. [Online]
Available at: http://ocw.mit.edu/courses/aeronautics-and-astronautics/16-30-
feedback-control-systems-fall-2010/lecture-notes/MIT16_30F10_lec05.pdf
[Accessed 13 October 2015].
MIT OpenCourseWare, 2011. Response to Damping. Massachusetts: MIT
OpenCourseWare.
Moreno, J. A. & Osorio, M., 2008. A Lyapunov approach to second-order sliding
mode controllers and observers. Cancun, IEEE, pp. 2856-2861.

25
Padhi, R., 2010. Controllability and Observability of Linear Time Invariant Systems.
Bangalore: Indian Institute of Science.
Pankaj, S., Kumar, J. S. & Nema, R., 2011. Comparative Analysis of MIT Rule and
Lyapunov Rule in Model Reference Adaptive Control Scheme. Innovative Systems
Design and Engineering, 2(4), pp. 154-163.
Portland State University, 2010. Oscillations. [Online]
Available at:
https://files4.smallpdf.com/files/2e184c6724ce4d48884710e64f156481.pdf?name=s
election.pdf
[Accessed 10 October 2015].
Priyank, J. & Nigam, M., 2013. Design of a Model Reference Adaptive Controller
using Modified MIT Rule for a second order system. Advance in Electronic and
Electric Engineering, 3(4), pp. 477-484.
Raptis, I. & Valavanis, K., 2011. Linear and Nonlinear Control of Small-Scale
Unmanned Helicopters. [Online]
Available at: http://www.springer.com/978-94-007-0022-2
[Accessed 22 October 2015].
Remsing, C., 2006. Linear Control Systems. [Online]
Available at:
https://www.ru.ac.za/media/rhodesuniversity/content/mathematics/documents/thirdye
ar/linearcontrol/AM32LC3%20Linear%20Ctrl%20Sys.pdf
[Accessed 2015 October 12].
Russell, D. A., 2011. The Simple Pendulum. [Online]
Available at: http://www.acs.psu.edu/drussell/Demos/Pendulum/Pendula.html
[Accessed 12 May 2015].
Rutgers University, 2015. Controllability abd Observability. [Online]
Available at: http://www.ece.rutgers.edu/~gajic/psfiles/chap5traCO.pdf
[Accessed 10 October 2015].
Sapiee, M. R., Abdullah, F., Noordin, A. & Jahari, A. N., 2008. PI Controller Design
Using Model Reference Adaptive Control Approaches For A Chemical Process.
Johor, SCOReD, pp. 155-1 - 155-4.
Sename, O., 2014. Modelling, analysis and control of linear systems using.
Grenoble: CNRS-INPG.
Shimkin, N., 2009. Nonlinear Control Systems. Haifa: Springer-Verlag GmbH.
Slung.com, 2015. Damped Oscillations. [Online]
Available at: http://www.splung.com/content/sid/2/page/damped_oscillations
[Accessed 11 October 2015].
The MathWorks, Inc., 2015. Linearizing Nonlinear Nodels. [Online]
Available at: http://www.mathworks.com/help/slcontrol/ug/linearizing-nonlinear-

26
models.html
[Accessed 22 October 2015].
The MathWorks, Inc., n.d. What Are State-Space Models?. [Online]
Available at: http://www.mathworks.com/help/ident/ug/what-are-state-space-
models.html
[Accessed 12 October 2015].
University of Georgia, 2015. The Simple Pendulum. [Online]
Available at: https://www.physast.uga.edu/uploads/phys1111_stancil/notes13a.pdf
[Accessed 10 October 2015].
Xie, Y., 2003. Linearized Control, Massachusetts: Massachusetts Institute of
Technology.

27
Appendices A: Simulink Blocks

Figure 20: Simulating both Math models to one output

Figure 21: Nonlinear Adaptive Controller

A
+ U

_
Yd

y C

Figure 22: Closed loop Model reference control

B
Appendices B: MATLAB Script File

% Opeolu VO
% 210210648
% Developmet of a MRAC algorithm for a pendulum system

close all
clear
clc

thetha = (3*pi)/180;

mr = 10;
lr = 10;
kr = 1.2;

m = 0.5;
l = 0.5;
g = 9.81;
k = 0.2;
i = 1/(m*l*l);

tspan = 0:0.01:10;
tspan2 = 0:0.01:1;

x=[(3*pi)/180 0];
U = zeros(size(tspan));
U2 = zeros(size(tspan2));

A = [0 1; ((-g/l)) (-k/(m*l*l))];
B = [0 i]';
C = [1 0];
D = [0];

% nonlinear plant
Ar = [0 1; ((-g/lr)*sin(x(1))) (-kr/(mr*lr*lr))];
Br = [0 i]';
Cr = [1 0];
Dr = [0];

sys = ss(A,B,C,D)
[num, den] = ss2tf(A, B, C, D)
num = round(num);
Gs = tf(sys) %transfer function of the system

C
[zer, pol] = tf2zp(num, den) % Zero pole representation
% [res, pol, k] = residue(num, den) % Residues / Pole
representation
% R = roots(den) % Roots
% zplane(zer,pol)
% pzmap(Gs)

Cn1 = ctrb(A,B) %check for controllability


rank(Cn1)

Cn2 = obsv(A,C) %check for observability


rank(Cn2)

poles = eig(A)

% system simulation with initial conditions


figure
lsim(sys, U, tspan,x)
ylabel('position(rad)')
title('Underdamped System Representation')

Z1 = stepinfo(Gs, 'RiseTimeLimits', [0.05,0.95])

% ===============

% Pole placement control

p1 = -41.4 + 32.97i;
p2 = -41.4 - 32.97i;

K11 = place(A,B,[p1 p2])


k1 = K11(1)
k2 = K11(2)
sys1 = ss(A-B*K11, B, C,0);

figure
lsim(sys1, U2, tspan2,x)
ylabel('position (rad)')
title('Underdamped System Representation')

Z1 = stepinfo(sys1, 'RiseTimeLimits', [0.05,0.95])

Gs1 = tf(sys1)

% ======================
% lyapunov Control

Q = [1 0; 0 1];

D
Xp = lyap(Ar,Q)

gain = 1;

% ============================================

% Simulations

% ============================================

% System responses comparisons

figure
sim('lin_nlin_SysResponse.mdl') % Simulating the Simulink model
plot(sys_responses);
grid
legend('nonlinear response', 'linear response')
title('Pendulum nonlinear and linearised model response at x0 =
pi/60') %x0-initial condition
ylabel('position (rad)')

figure
plot(nlin_resp)
legend('nonlinear response')
title('Pendulum nonlinear model response at x0 = pi/60')
ylabel('position (rad)')
grid

figure
plot(lin_resp)
grid
legend('linearized response')
title('Pendulum linearized model response at x0 = pi/60')
ylabel('position (rad)')

% ========

figure
sim('math_models.mdl') % Simulating the Simulink model
plot(lin_nlin);
grid
legend('x', 'y')

% =========

E
% adaptive control

figure
sim('lyapAdaptComplete_v2.mdl') % Simulating the Simulink for
adaptive control model
plot(lyap_MRC);
grid
title('Model Reference control of nonlinear pendulum system')
ylabel('position(rad)')
legend('Reference output', 'Plant output ')

Vous aimerez peut-être aussi