21
ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur Hasirci Clemson University, Electrical and Computer Engineering Department Spring 2013 1 ECE 893 Industrial Applications of Nonlinear Control is a companion course to ECE 874 Nonlinear Control. The main aim of the course is, as its name suggests, to present some industrial applications of basic analysis and design tools for nonlinear control. For this aim, the course has two main parts: Real-world examples, Real-time experiments. During the semester, some interesting examples such as anti-angiogenic tumor treatment, magnetic levitation trains, bioreactors, robot manipulators, land vehicles, turbulent systems etc. will be covered. Besides, six different controllers for a Permanent Magnet Direct Current (PMDC) motor will be designed and implemented. Experimental results to be obtained will provide a concrete comparison facility for real-time performances of various nonlinear control design techniques introduced in ECE 874, like backstepping, nonlinear adaptive/robust control, feedback linearization, observer design and so on. All course materials are available at www.duzce.edu.tr/ugurhasirci/ece893/ece893main.htm .

Lecture 1 non linear control

Embed Size (px)

DESCRIPTION

industrial application to nonlinear control system best reference. with different nonlinear industrial example

Citation preview

Page 1: Lecture 1 non linear control

1

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

ECE 893 Industrial Applications of Nonlinear Control is a companion course to ECE 874 Nonlinear Control.

The main aim of the course is, as its name suggests, to present some industrial applications of basic analysis and design tools for nonlinear control.

For this aim, the course has two main parts:• Real-world examples,• Real-time experiments.

During the semester, some interesting examples such as anti-angiogenic tumor treatment, magnetic levitation trains, bioreactors, robot manipulators, land vehicles, turbulent systems etc. will be covered. Besides, six different controllers for a Permanent Magnet Direct Current (PMDC) motor will be designed and implemented. Experimental results to be obtained will provide a concrete comparison facility for real-time performances of various nonlinear control design techniques introduced in ECE 874, like backstepping, nonlinear adaptive/robust control, feedback linearization, observer design and so on.

All course materials are available at www.duzce.edu.tr/ugurhasirci/ece893/ece893main.htm.

Page 2: Lecture 1 non linear control

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

2

Ugur Hasirci

Background• Gebze Institute of Technology ’11 PhD • Assistant Professor, Duzce University• Visiting Professor (postdoc), Clemson University

ResearchNonlinear control of

• Electromechanical systems• Bioengineering systems

2/3

1 pp pq

q bq dp q Guq

Page 3: Lecture 1 non linear control

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

3

In this first lecture, you will learn the following.

1. A brief revisiting of basic concepts• Control• System• State• Linear Systems• Nonlinear Systems

2. Simulation of dynamical systems• A Case Study: Single-Link Robots

3. The system to be controlled during the semester: PMDC Motor

Page 4: Lecture 1 non linear control

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

4

1. Basic Concepts: A Remainder

Control: Even if it has many meanings in science, “control” means, in engineering sciences, ensuring that a system always behaves as what you except from it. Consider an electrical motor; “controlling” the speed of this motor means that you are expected to keep motor velocity constant, say 1500 revolution per minute (rpm), in cases either there exists a huge load on motor shaft or no load on it. In this example, the motor is the system to be controlled, and 1500 rpm is the control objective. (Guess what is control input !) This does not necessarily means that the control objective is always a constant. It may needed that the motor speed must track a time-varying profile like sin(t) radian per second where t is the operation time.

System: While defining the “control” concept, we have used the word “system” a couple of times. Then the next question is what means “system”, again in engineering manner. A system is any assemblage or set of correlated members. The overall motor control system introduced above has such members:

• system input (voltage)• system states (guess what are these?)• system output (speed)

One is not expected to be an oracle to predict what is the next definition.

system statessystem input system output

Page 5: Lecture 1 non linear control

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

5

State: Roughly speaking, a “state” is one of the system variables needed to be regulated to control the system. Then the “state variables” are a subset of all system variables that can represent the system at any given time. Consider again the motor control system; since we aim to control the motor speed, the motor speed will be one of the state variables, but not the only one. One can drive the motor speed to a desired point (or trajectory) by regulating the current flows in motor windings. Then the electrical current must be the other state variable needed to control the system. At this point, an important question arises: How can one determine the state variables for a given system? The minimum number of state variables required to represent a given system is usually equal to the order of the system's defining differential equation. Most of the electromechanical systems are second-order system and thus usually have 2 state variables in their dynamical model, just like the electrical motor example above.

Proper selection of the state variables mostly relies on engineering experience and intuition.

Page 6: Lecture 1 non linear control

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

6

Linear Systems: A linear system is a system that satisfies homogeneity and additivity properties.

systemX1 Y1 system

aX1 aY1

Homogeneity

systemX2 Y2 system

X1+ X2 Y1+Y2

Additivity

!!!!!!!! There exists NO linear system in nature !!!!!!!! Linear systems are ideal systems developed by system analysts. After some extent, all systems are nonlinear. Consider again the motor control example and assume that the motor turns with a speed of 1000 rpm if you apply 100 V voltage to its windings. The motor will not turn with a speed of 5000 rpm if you apply 500 V.

This fact is valid for not only the engineering systems, but also all the systems available in nature, even social systems. If you tap your friend’s neck one time, he will smile you. But, just after that, if you tap two times successively, he (or she) will not smile you two times successively. Probably something bad will happen, since a human is not a linear system and it is a highly nonlinear and complicated system with unmodeled dynamics.

Page 7: Lecture 1 non linear control

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

7

All systems available in nature are modeled by differential equations. After getting a differential equation model, designer has two choices to convert this differential equation model to a more tractable model for control design and stability analysis:

• Transfer function model (frequency domain approach)• State-space model (time domain approach)

Transfer function models are only for linear systems (explain why, get A) while state-pace models are for both linear and nonlinear systems. Which is why, transfer function models are out of this course’s scope. For a linear system with n state variables, state-space model is in the form of x Ax Bu

y Cx Du

state equation

output equation

: state vector ( 1): system matrix ( ) : input matrix ( ): input vector ( 1): output vector ( 1)

C: output matrix ( ): feedforward matrix ( )

x nA n nB n pu py q

q nD q p

Page 8: Lecture 1 non linear control

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

8

Consider a second order differential equation such as2 0.1z z z u

By selecting the state variables as and , we can build the state-space model as 1x z 2x z

1 1 1 2 1 1

2 2 2 1 2 22

0 1 0

2 0.1 0.1 2 1x z x z x x x x

ux z x x x u x xx z

By selecting the output variable(s), the variable(s) to be controlled, the output equation can be also formed in the same way. For example, if the output variable is , then the output equation will be in the form of

Since the entries of the matrices and vectors in the state-space model given above are constants, i.e., not functions of time (t), this system is a Linear Time-Invariant (LTI) system.

Linear control is a mature subject with a variety of powerful methods. One can easily determine the system stability by using A matrix, system controllability by using A and B matrices, and system observability by using A and C matrices. There also exist many methods to design the control input signal (u) for linear systems.

1x

1

2

1 0x

yx

Page 9: Lecture 1 non linear control

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

9

Nonlinear Systems: A system is nonlinear if there exists at least one nonlinear component in the dynamical model associated to it. For example, following differential equation model and state-space model are nonlinear, and thus the systems modeled by these equations are nonlinear systems.

2

21 1 2

2

4 3 1x x x x u

x x xx u

It is obvious that the state-space model given above can not be written as state-space form for linear, that is

.x Ax Buy Cx Du

Instead, the general expression for state-space form of nonlinear systems is 1( ) ( ) , 0( )

( ) .

x f x x g x ug x

y h x x

Again, this general form is for time-invariant (autonomous) nonlinear systems.

Page 10: Lecture 1 non linear control

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

10

Some common nonlinear system behaviors causes that the set of analysis and design tools developed for linear systems does not work for nonlinear systems. One of the most characteristic example of these is chaotic behavior of nonlinear systems. In linear systems, small changes in initial conditions do not considerably effect the time-variation of system output. In nonlinear systems, on the other hand, the system output is extremely sensitive to initial conditions. The essential feature of chaos is the unpredictability of the system output.

Consider a simple mechanical nonlinear system:The following figure shows the time-variation of system output for two different initial conditions:

50.1 6sin( )x x x t

(0) 2, (0) 3 and (0) 2.01, (0) 3.01.x x x x

0 10 20 30 40 50 60 70 80 90 100-2.5

-2

-1.5

-1

-0.5

0

0.5

1

1.5

2

2.5

Time (sec)

x(t)

ECE 893 Chaotic Behavior

x(0)=2.01 and xdot(0)=3.01 x(0)=2 and xdot(0)=3 A very small change in the

initial conditions leads substantial difference at the system output.

Chaotic behavior also explains why transfer function approach can not be used in nonlinear system, since the transfer function approach assumes that all initial conditions are equal to zero, which is a very dangerous assumption for nonlinear systems.

Page 11: Lecture 1 non linear control

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

11

In addition to chaos, there are also some characteristic properties of nonlinear systems such as bifurcation, multiple equilibrium point, limit cycles etc. These features make the tools for linear systems useless for nonlinear systems. For this reason, we need some methods to analyze and design nonlinear control systems. The most powerful method is Lyapunov Stability Analysis Method. Since the issues of design and analysis are intertwined, this method also provides useful design tools.

Aleksandr Mikhailovich Lyapunov (1857 –1918) was a Russian mathematician, mechanician and physicist.

Lyapunov is known for his development of the stability theory of a dynamical system, as well as for his many contributions to mathematical physics and probability theory.

p.s. Bio information were directly taken from the most prestigious database of the world, Wikipedia !This implies his (or maybe her!) bio information could be a bit different.

Page 12: Lecture 1 non linear control

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

12

Before moving the simulation of dynamical system, our final revisiting will be on the comparison of open-loop and closed loop control systems.

Open-loop control:• Input designed to move the system to a desired state based on current conditions

and model of the system.• Example: Fill a water tank to a specified level based on flow-rate and time.

• If some of the water evaporates during filling then the level will be wrong • If flow rate is not exactly as expected then the level will be wrong.• Inaccurate time will lead to the wrong level.

Desired level

Actual level

No correction for errors !

Page 13: Lecture 1 non linear control

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

13

Closed-loop control:• Input changes as the error, difference between the desired output and the

measured output, changes.• Example – fill a tank to a specified level based on measuring the tank level and

turning flow “on” or “off” to reach the desired level.• Anything that prevents the tank from being filled to the desired level will be

compensated.

Desired level = Actual level System

Feedback

Desired level

+_

Input Error = Desired Level – Measured

Measurement

Page 14: Lecture 1 non linear control

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

14

2. Simulation of Dynamical Systems

During the semester, we will use MATLAB/Simulink environment to simulate and implement the controllers to be designed. But this lecture does not aim to teach this software. We assume that students are basically acquainted with the software. This subsection of the lecture aims to remind the students of some basics of Simulink through a simple example. The next lecture will be completely on MATLAB xPC Target real-time control prototyping software and Quanser Q4 real-time data acquisition card, following some basics of real-time control engineering.

Simulating a dynamical system practically means solving the differential equation represents the dynamical system numerically. Simulink provides many solvers that can be configured by user. Simulations provide a demonstration facility to observe the effects of the control input signal designed and also the effects of the control gains on the system performance. In this way, a control engineer finds an opportunity to modify (if needed) the control input signal and determine the optimum values of the control gains. This simplifies real-time implementation of the controller and also ensures avoiding possible control implementation problems that may lead some damages to the system to be controlled.

Page 15: Lecture 1 non linear control

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

15

The dynamics of an n-link robot manipulator can be written as( ) ( , ) ( ) ( )M q q H q q q G q F q

where( ) : Joint angle vector (n 1)( ) : Inertia matrix (n n)( , ) : Centripedal/Coriolis matrix (n n)( ) : Gravity vector (n 1)( ) : Friction vector (n 1) : Input torque (n 1)

q tM qH q qG qF q

Without loss of generality, we consider a single-link (n=1) robot manipulator for simplicity. For a single-link robotic arm, M(q) is the inertia of the arm and G(q) is the gravitational torque due to weight of the arm. The figure below shows the schematic diagram of the single-link robotic arm. By neglecting the friction force, the dynamics becomes

2 sin( )ml q mgl q where l is the length of the arm and g is the acceleration of gravity.

Page 16: Lecture 1 non linear control

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

16

By selecting the state variables as and , state-space representation becomes1x q 2x q

1 2

2 1 2sin( )

x xgx xl ml

which term is the nonlinear one?

Control objective is to drive the arm position to desired trajectory, qd. To observe the performance of the controller to be designed, a tracking error signal can be defined as

( ) ( ) ( ).de t q t q t

For this simulation example, let us design the control input signal as a simple PD controller:

( ) ( ) ( )p dt K e t K e t

Block diagram of the closed-loop control system with a unity feedback will be as follows.

( )dq t Kp

ddt Kd

( )q t( )e t+-

++

( )t

Page 17: Lecture 1 non linear control

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

17

Now let us build the simulation model step by step, by using Simulink s-functions.

Page 18: Lecture 1 non linear control

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

18

3. ExperimentsWe will design and implement 6 controllers for a PMDC motor with a nonlinear load. This experiments will provide a comparison facility for performance of various controllers for a nonlinear system, also an introduction to real-time control engineering via presenting some basics of data acquisition and processing. Following figures show a photo taken from experimental setup and the block diagram of the system. For feedback, we will use an encoder mounted on the motor shaft by manufacturer. The next lecture will be completely on the real-time issues including the use of the xPC Target and Q4 data acquisition system. This lecture aims to introduce experimental setup and controllers to be designed and implemented.

PMDC Motor Encoder

Data Acquisition

Card

Target PC with

xPC Target

Host PC with

Simulink

Linear Amplifier

Page 19: Lecture 1 non linear control

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

19

Use of permanent magnets in DC motor eliminates the necessity to a secondary power source and makes system dynamics linear. To add a nonlinear component to the system, we will use nonlinear load on motor shaft. Then the system equations will be

sin( ) T

V

Jq Bq N q K I

LI RI K q u

mechanical subsystem

electrical subsystem

: motor inertia: motor position : viscous friction coeffient : load constant : torque constant : voltage constant

: inductance of the motor windings : current flowing through motor winding

T

V

JqBNKKLI s

: resistance of the motor windings : voltage applied to the motor windings.

Ru

Page 20: Lecture 1 non linear control

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

20

Control objective : Drive the angular position of the motor , x1 , to a desired trajectory, x1d , by using the control input signal, u, the voltage applied to the motor.

By selecting the state variables as

sin( ) T

V

Jq Bq N q K I

LI RI K q u

mechanical subsystem

electrical subsystem

1

2

3

x qx qx I

we get the state-space representation as follows:

1 2

2 2 1 3

3 3 2

sin

1V

x xKB Nx x x x

J J JKRx x x u

L L L

Page 21: Lecture 1 non linear control

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

21

Controllers to be designed and implemented :1. Linear Controller : By neglecting the nonlinear part of the system dynamics, we will design a

linear controller to show its drawbacks.2. Nonlinear Controller with Feedforward Cancellation : Without using any special nonlinear

control technique, we design a feedback rule directly exploiting the benefits offered by Lyapunov stability analysis method.

3. Backstepping Controller : This system is a perfect tool to apply backstepping procedure and we will design and implement an exact model knowledge backstepping controller.

4. Adaptive Controller : Again by using the backstepping procedure, we will design a controller assumes that all system parameters are unknown for this time.

5. Observer Design : All controller introduced above assume that all state variables available for measurement. But this may not be the case for some applications. This design will provide a controller plus state observer for the system.

6. Feedback Linearization : The final controller will be a feedback linearizing controller, which produces a linear dynamic through designing the feedback rule, not via linearizing the system by using some numerical methods. This controller completely based on a nonlinear control design technique.

1 2

2 2 1 3

3 3 2

sin

1V

x xKB Nx x x x

J J JKRx x x u

L L L