0% found this document useful (0 votes)
56 views42 pages

Study of Software Interface For Adaptive Control System

The document discusses the theory and design of an adaptive control system, which uses a layered software architecture to synchronize fast and slow changing processes, with the goal of compensating for parameter variations in nonlinear systems and non-stationary disturbances through adjustable controller parameters and a mechanism for real-time parameter adjustment based on process feedback.

Uploaded by

Lin Chong
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views42 pages

Study of Software Interface For Adaptive Control System

The document discusses the theory and design of an adaptive control system, which uses a layered software architecture to synchronize fast and slow changing processes, with the goal of compensating for parameter variations in nonlinear systems and non-stationary disturbances through adjustable controller parameters and a mechanism for real-time parameter adjustment based on process feedback.

Uploaded by

Lin Chong
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

STUDY OF SOFTWARE INTERFACE

FOR ADAPTIVE CONTROL SYSTEM

A THESIS SUBMITTED IN PARTIAL FULFILLMENT


OF THE REQUIREMENTS FOR THE DEGREE OF

Bachelor of Technology
In
Electronics & Instrumentation Engineering

By

ABHISHEK KUMAR SRIVASTAVA


ROLL NO -10307003
&
SANDEEP CHHABRA
ROLL NO -10307020

Department of Electronics and Communication Engineering


(Electronics and Instrumentation Engineering)
National Institute of Technology
Rourkela
2007
STUDY OF SOFTWARE INTERFACE
FOR ADAPTIVE CONTROL SYSTEM

A THESIS SUBMITTED IN PARTIAL FULFILLMENT


OF THE REQUIREMENTS FOR THE DEGREE OF

Bachelor of Technology
In
Electronics & Instrumentation Engineering

By

ABHISHEK KUMAR SRIVASTAVA


ROLL NO -10307003
&
SANDEEP CHHABRA
ROLL NO -10307020

Under the Guidance of


Prof.S.K. PRAMANIK

Department of Electronics and Communication Engineering


(Electronics and Instrumentation Engineering)
National Institute of Technology
Rourkela

2007
CERTIFICATE

This is to certify that the thesis entitled, “Study of Software Interface For Adaptive Control System”
submitted by Sri Abhisek Kumar Srivastava & Sri Sandeep Chhabra in partial fulfillment of the requirements
for the award of Bachelor of Technology Degree in Electronics & Instrumentation Engineering at the National
Institute of Technology ,Rourkela (Deemed University) is an authentic work carried out by them under my
supervision and guidance.

To the best of my knowledge, the matter embodied in the thesis has not been submitted to any other
University / Institute for the award of any Degree or Diploma.

Date: Prof. S.K. Pramanik


Dept. of ECE (E&IE)
National Institute of Technology
Rourkela - 769008
ACKNOWLEDGEMENT

We owe a deep sense of gratitude to one and many for the successful completion of this project.
Special thanks to my project guide Prof. S.K. Pramanik without whose able guidance this wouldn’t
have been possible in the first place.
We extend our thanks to Dr. G.Panda, HOD, and ECE Dept. for accepting our project.
CONTENTS

Abstract ……………………………………….

Chapter-1……………………………………………………................1
1.1 Introduction …………………………………………………..2
1.2 Theory of adaptive control system ……………………………….2
1.3 Theory of layered architecture ……………………………….4
1.4 Water Fall diagram for software development ……………………6

Chapter-2……………………………………………………...............7
2.1 Mathematical model of adaptive control ……………………….8
2.2 Self tuning control …………………………………..............11

Chapter-3……………………………………………………………..13
3.1 Numerical analysis of adaptive control algorithm ……...............14
3.2 Software modules developed with explanation…………………...16
3.2.1 Module –I………………………………………………………...16
3.2.2 Module-II…………………………………………………….......23

Chapter-4……………………………………………………………..30
4.1 Concluding comment about the success of the project ………….31
4.2 Probable industrial application of this project …………………..31
4.3 Limitation of existing technology …………………………....32
4.4 Advantages of adaptive control …………………………......32

Reference …………………………………………………….......33.

i
Abstract

Title:
Study of Software interface for Adaptive control system

1) Introduction:

Memory S
O Process
F 1
T
A
Computer R
E
Process
Inter 2
Face
: :
Keyboard

Slow system
Fast system

Software interface will synchronize the two processors

This is the basic software interface of the personal computer in which two processes that is fast
system consisting of memory, computer, keyboard and process which is slow system is synchronized
with software interface.

2) Simulation:
The software interface for adaptive control system has been analyzed.
ii
The results for first order system have been analyzed, plotted and interpreted for various initial conditions.
The graph has been available in matlab.

3) Layered architecture:
This stage takes care of the total integrated software system. The layer architecture has been
conceived which is shown below

COMPUTE POINT LAYER

TUNING LAYER

DATA MANAGEMENT LAYER

In computer point layer we do mathematical modeling which has been


described in simulation section. The results are stored into various routines which
has been designated as private and public depending on the methods of data
sharing .Tuning layer tunes the process control by performing various tasks
such as checking for divergence etc. It takes data from compute point layer. Next
comes the data management layer which is responsible to various functions namely
Input/Output graphics display etc. So, various routines have been tried to get this
layer into operation.
Conclusion:
The integrated software which has been developed here is expected to be
class room model of a commercial system available in industry. Hence this has been
submitted as Undergraduate project.
iii
List of figures

1. An Adaptive Controller(fig. 1.1)…………………………………………….3


2. Block diagram of layered architecture( fig 1.2) ………….............................5
3. Waterfall diagram of system development (fig 1.3)………………………...6
4. A general configuration of self tuning controller (fig 2.1)…………………12

iv
CHAPTER 1

Introduction
Theory of Adaptive Control System
Theory of Layered Architecture
Water fall diagram of software development

1
CHAPTER I

1.1 Introduction

Adaptive control is a special type of non linear feedback control in which the stages
of the process can be separated into two categories which can change at different rates. The
slowly changing states are viewed as parameter with fast time scale for the ordinary
feedback and slower one for updating regulator parameters. One of the goals of adaptive
control is to compensate for parameter variations which may occur due to nonlinear
actuators ,changes in the operating conditions of the process and non stationary
disturbances acting on the process.

1.2 Theory of adaptive control system :

An adaptive controller is a controller that can modify its behavior in response to changes in
the dynamics of the process and the disturbances. Adaptive control can be considered as a
special type of nonlinear feedback control in which the stages of the process can be separated
into two categories, which can change at different rates. The slowly changing states are
viewed as parameters with a fast time scale for the ordinary feedback and a slower one for
updating regular parameters. One of the goals of adaptive control is to compensate for
parameter variations, which may occur due to nonlinear actuators, changes in the operating
conditions of the process, and non stationary disturbances acting on the process.

2
Parameter
adjustment

Control
Parameters

Set point
Controller
Plant
Control
signal

An adaptive Controller (fig. 1.1)

An adaptive controller is a controller with adjustable parameter and a mechanism for


adjusting the parameters. An adaptive control system can be thought of as having two
loops. One loop is normal feedback with the process (plant) and controller. The other loop
is a parameter adjustment loop. A block diagram of an adaptive control system is shown
above.

3
1.3 Theory of layered architecture:

A layered architecture is designed as a hierarchy of


client –server process that minimizes interaction between layers. Each layer act as a client
for the module above it and acts as server from the model below it in a layered architecture
.Layered architecture has been used in data base systems, operating systems, computer to
computer communication systems and layered control for robots. The digital VAX, virtual
memory system (VMS) architecture is an example.
The user layer of VMS is the only layer visible to the system user. It provides the tools,
editors, compilers and application packages needed by users. The supervisor layers provide
the command language interpreter (CLI), which provides an interface between users and
inner layers of the operating system. Command lines are typed after the system prompt ‘$’
as in

$ Show time {display current date and time}


3-5-2004 12.00.00

The supervisor layer provides system services and a record management system. The
kernel layer takes care of memory management, input/output, process and time
management .This form of layering is very restrictive to prevent users from tempering with
kernel and other system functions. It is security minded form of layering.

Kernel layer:
Handle input/output (devices), schedules and control process, manages memory.

Executive layer:
Provides record managements.
4
Supervisor layer:
Provides command language, interpreter (interface between user and inner layer of VMS).
User layer:
Provides utilities, application libraries, tools, programming languages.

Others, less restrictive form of layering are possible and have been introduced .A recent
and successful alternative to VMS form of layered architecture has been developed by
Brooks in organizing control systems for intelligent mobile robots.(Brooks ,1986).

BLOCK DIAGRAM OF LAYERED ARCHITECTURE

COMPUTE
COMPUTEPOINT
POINTLAYER
LAYER

TUNING LAYER

DATA MANAGEMENT LAYER

fig.(1.2)

5
Waterfall diagram of system Development

Feasibility
study Requirement
analysis &
specification
Design
specification
Coding
and
Module
testing

Integration
& System
testing

Delivery

Maintenance

fig.(1.3)

6
CHAPTER 2

Mathematical model of Adaptive Control


Self tuning control

7
CHAPTER 2

2.1 MATHEMATICAL MODEL OF ADAPTIVE CONTROL:

Consider a first order system.

Reference model:
dym/dt=-amym+bmr ………………………………………(1)
Where r is the reference signal and am >0

Process plant:
dy/dt=-ay+bu ………………………………………(2)

Controller:
u=θ1r-θ2y ……………………………………….(3)
where θ1 and θ2 are parameters
error:
e=y-ym ………………………………………. (4)
Substitution of control law in the plant dynamics yields
dy/dt=-ay+b(θ1r-θ2y) ……………………………………… (5)
=>dy/dt=-(a+bθ2) y +b(θ1r) ………………………………………..(6)
Subtracting reference model equation from process plant equation.
dy/dt - dym/dt =de/dt ………………………………………. (7)
=>de/dt=-ame-(bθ2+a-am)+(bθ1-bθm)r ……………………… (8)

From the error dynamics given in eqn above ,we can observe that the tracking error will go
to zero if bθ2=am-a and bθ1 = bm. Thus the parameter should reach this goal.
8
Usually the Lyapunov function is quadratic in tracking error and controller parameter
estimation error since it is expected that the adaptation mechanism will drive both the
tracking error and error in estimation of controller parameters to zero. Thus a valid
Lyapunav function for the error dynamics equation can be taken as

V(e,θ1,θ2) = ½ (e² +( 1/bγ)(bθ2 + a - am)² + (1/bγ)(bθ1 - bm)²) ………..(9)


Where bγ>0.
This function is zero when e is zero and the controller parameters are equal to correct
values. For a valid Lyapunov function, the time derivative of the Lyapunov function must
be negative. The derivative is given as

dV/dt = ede/dt + (1/γ)(bθ2 + a - am)dθ2/dt + (1/γ)(bθ1 – bm)dθ1/dt ……(10)

Substituting eqn. (8) in the above equation and rearranging we get,


dV/dt=-ame²+(1/γ)(bθ2+a-am)(dθ2/dt-γye)+(1/γ)(bθ1-bm)(dθ1/dt+γre) ….(11)

If the parameter are updated as

dθ1/dt=-γre

dθ2/dt =γye

Then dV/dt=-ame²

Thus dV/dt is negative semidefinite which implies that V(t)≥V(0). This ensures that e must
be bounded. To ensure tracking error goes to zero, We compute second time derivative of
Lyapunov function.

d²V/dt²=-2amede/dt

9
Substituting eqn. (8) in the above eqquationand rearranging we get,

d²V/dt²=-2ame(-ame-(bθ2+a-am)y+(bθ1-bm)r)= f(e,θ1,θ2,y,r)

Since all the parameters are bounded and y=e+ym is bounded , d²v/dt²is also bounded which
in turn implies that dV/dt is uniformly continuous . Now using Barbalat’s lemma, we
conclude that tracking error converges to zero.

10
2.2 Self tuning Control:

Self tuning control has two essential components

1. Parameter estimation
2. Control law

Parameter estimation: Parameter estimation is a key element in self –tuner and is


performed on-line. The model parameters are based on the measurable process input,
process output, and state signals. A number of recursive parameter estimation schemes are
employed for self –tuning control. The most population scheme is the recursive least
squares estimation method.

Control law: The control law is derived based on control performance criterion
optimization. Since the parameters are estimated on-line, the calculation of control law is
based on procedure called certainty equivalent in which the current parameter estimates are
accepted while ignoring their uncertainties. This approach of designing controller using
estimated parameters of the transfer function process is known as indirect self-tuning
method.

11
DESIGN PARAMETER
DURATTION ESTIMATION
(MODELING)

SET POINT
+ CONTROLLER PLANT
output
output
-

Fig. 2.1

A GENERAL CONFIGURATION OF SELF TUNING CONTROLLER

12
CHAPTER 3

Numerical analysis of Adaptive Control algorithm


Software modules developed
Module 1
Module 2

13
Chapter-3

3.1 Numerical analysis of adaptive control algorithm:

Reference model:
dym/dt = -amym +bmr
where r is the reference signal and am>0.
Process Plant:
dy/dt= -ay+bu
Controller:
u=θ1r-θ2y
from the above two equations we get
dy/dt=-ay+b(θ1r-θ2y)
=>(yn+1-yn)/dt=(-a-bθ2)yn +bθ1r
=>(yn+1-yn)=h[(-a-bθ2)yn +bθ1r]
=>yn+1= yn + h[(-a-bθ2)yn +bθ1r]
=>yn+1= yn (1- h(a+bθ2))+bθ1r ………….(1)

Similarly for reference model


dym/dt = -amym +bmr
=>ym,n+1 - ym,n =h(-amym,n +bmr)
=>ym,n+1 = ym,n + h(-amym,n +bmr)
=>ym,n+1 = (1- ham)ym,n + hbmr ……………(2)

Error:
e=y-ym
=>e,n+1=y,n+1-ym,n+1
14
Parameters are updated as
dθ1/dt=-γre
=>(θ1,n+1-θ1,n)/dt =-γren
=>(θ1,n+1-θ1,n) =-γrenh
=>θ1,n+1 = θ1,n - γrenh …………...(4)

dθ2/dt=γye
=>(θ2,n+1-θ2,n)/dt =γynen
=>θ2,n+1 = θ2,n + γynenh …………...(5)

From the above equations software modules are developed. The parameters and variables
are initialized appropriately.

15
3.2 Software modules developed with explanation

3.2.1 Module 1: The plant dynamics is given asdy/dt=-ay+bu, where a=1 and b=2.The
plant response is required to follow the model given by dym/dt = - 3ym + 3r.The adaptation
gain is chosen to be equal to 1.5. The initial values of both parameters of the controller are
chosen to be zero. The initial conditions of the plant and the model are both zero. The
reference signal r(t) =2 is used.

clear all;
clc;
close all;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

k=input('Enter the number of iterations: ');


ym= zeros(1,k+1);
y= zeros(1,k+1);
e= zeros(1,k+1);
theta= zeros(k+1,2);
h= 0.01;
am= 3;
bm= 3;
r= 2;
a=1;
b=2;
gama=1.5;

for i=1:k
y(i+1)= y(i)*(1-h*(a+b*theta(i,2)))+h*b*theta(i,1)*r;

16
ym(i+1)=((1-h*am)*ym(i))+h*bm*r;
e(i+1)=y(i+1)-ym(i+1);
theta(i+1,1)= theta(i,1)-gama*r*e(i)*h;
theta(i+1,2)= theta(i,2)+gama*y(i)*e(i)*h;
end;

figure(1);
plot(ym);
figure(2);
plot(theta(:,1));
figure(3);
plot(theta(:,2));
figure(4);
plot(y);
figure(5);
plot(e);

17
18
19
20
21
22
3.2.2 Module 2:In this module the problem statement is same as in the previous module.
The reference signal used in this module is r(t)= 2*sin(3t).

clear all;
clc;
close all;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

k=input ('Enter the number of iterations: ');


ym= zeros(1,k+1);
y= zeros(1,k+1);
e= zeros(1,k+1);
theta= zeros(k+1,2);
h= 0.01;
am= 3;
bm= 3;
a=1;
b=2;
gama=1.5;
for i=1:k
r=2*sin(3*h*i);
y(i+1)= y(i)*(1-h*(a+b*theta(i,2)))+h*b*theta(i,1)*r;
ym(i+1)=((1-h*am)*ym(i))+h*bm*r;
e(i+1)=y(i+1)-ym(i+1);
theta(i+1,1)= theta(i,1)-gama*r*e(i)*h;
theta(i+1,2)= theta(i,2)+gama*y(i)*e(i)*h;
end;
23
figure(1);
plot(ym);
figure(2);
plot(theta(:,1));
figure(3);
plot(theta(:,2));
figure(4);
plot(y);
figure(5);
plot(e);

24
25
26
27
28
29
CHAPTER 4

Conclusion
Industrial Applications
Limitations of Existing Technology
Advantages of Adaptive Control

30
4.1 Concluding comment about the success of the project

The Model Reference Adaptive Controller (MRAC) for a first order system is illustrated
using Lyapunov synthesis approach. We see from the simulation that the process plant
follows the reference model and the tracking error converges to zero. The controller
parameters also converge to their optimum values. Two modules are simulated using two
different reference models.

4.2 Probable industrial applications of the project

1) Application in an autonomous underwater vehicle

Autonomous underwater vehicles (AUVs) are no longer engineering curiosities. They


have been under development for over three decades and in last few years there have
been significant advances towards their use in operational motions. All though ROVs
play an important role in the offshore industries, their operational effectiveness is
limited by the tethered cable and the reliance and the cost of some kind of support
platforms. This paper investigates the applications of process control architecture to
control the yaw angle of an AUV.

2) Application in batch chemical reactor


In a batch chemical reactor, the reactants are initially charged into the reaction vessel of
the batch reactor and are then agitated for a certain period of time to allow the reaction
to take place. Upon completion of the reaction, The products are discharged. For a
specific reaction there is an optimum temperature profile according to which the
temperature of the reactor mass should be varying to obtain best results. Automatic
temperature control is achieved by adaptive control systems.
31
4.3 Limitations of the existing technology

There are several problems with the existing technology. These include:

1) Impulse and step response models over parameterized and limit application of the
Algorithm to strictly stable process
2) Tuning is required to achieve normal stability
3) Hardware limitations

Impulse and step response models are known to be over parameterized .The dynamics of
the first order process ,for example ,can be described by three numbers using a parametric
response will typically require from 30 to 120 coefficients to describe the same dynamics.
These difficulties can be over come at the identification step by first identifying a low order
model and then calculation of the impulse coefficients however the impulse response still
requires more storage space than is necessary. A potentially more significant problem with
the impulse and step response model is that they are limited to strictly stable process while
it is certainly possible to modify the algorithms to accommodate a pure integrator, these
modification may lead to other problems, such as adding the derivative of a noisy output
signal in the feedback bath.

4.4 Advantages of the adaptive control

High performance control systems can be implemented when the plant dynamic
characteristics are poorly known or when large and unpredictable variations occur. An
adaptive controller that does not require any knowledge about the signs or bounds of the
high frequency gain is proposed for a scalar plant. Adaptive control compensates for
parameter variations, which may occur due to nonlinear actuators, changes in the operating
conditions of the process, and non stationary disturbances acting on the process.

32
REFERENCES

1. Gopal Nagrath, “Control system engg”

2. Peters J.F. & Pedryez W, “Software Engg. -An engineering approach”

3. Prakap Rudra, “Matlab”

33

You might also like