MECH466: Automatic Control · 2020. 10. 27. · 3 Course information Required Textbook: Modern...

Post on 29-Mar-2021

8 views 0 download

Transcript of MECH466: Automatic Control · 2020. 10. 27. · 3 Course information Required Textbook: Modern...

1

Control Systems

Dr. Assaad A. Al SahlaniDepartment of Mechanical Engineering

Michigan State University

Lecture 0Introduction

2

Instructor Class Instructor: Dr. Assaad A. Alsahlani, Associate Professor at ME department, 2328J Engineering Building, Email: alsahlan@egr.msu.edu

Office Hours 2328J EB, MWF 10-11am

Laboratory Instructor: Dr. Brian Feeny, 2430 Engineering Building Email: feeny@egr.msu.edu

3

Course information Required Textbook: Modern Control Systems, Richard C. Dorf and Robert H.

Bishop, Prentice Hall, 12th edition, 2010, ISBN-10: 0-13-602458-0

4

Main components of the course Lectures (about 40 lectures) Old Math Quiz Midterm1, Midterm2 Final (Final exam period) Laboratory work Grading: Homework plus Math Quiz (10%), Exam 1 (20%),

Exam 2 (20%), Final Exam (comprehensive) (25%),Laboratory work (25%)

Homework will be due in one week from the day it isassigned

5

Tips to pass this course Come to the lectures as many times as you can. Print out and bring lecture slides to the lecture. Do “Exercises” given at the end of each lecture. Do homework every week. Read the textbook and the slides. Make use of instructor’s office hours. If you want to get a very good grade… Read the textbook thoroughly. Read optional references too. Do more than given “Exercises”. Use and be familiar with Matlab.

6

Math Prerequisites Complex Numbers Add, Subtract, Multiply, Divide

Linear Algebra Matrix Multiply, Inverse, Sets of Linear Eq.

Linear Ordinary Differential Equations Laplace Transform to Solve ODE’s Linearization Logarithms Modeling of Physical Systems Mechanical, Electrical, Thermal, Fluid

Dynamic Responses 1st and 2nd Order Systems of ODE’s

7

Prerequisites: Complex Numbers Ordered pair of two real numbers

Conjugate Addition

Multiplication

8

Complex Numbers Euler’s identity

Polar form Magnitude Phase

9

Logarithm The logarithm of x to the base b is written The logarithm of 1000 to the base 10 is 3, i.e.,

Properties:

Why?

10

Summary & Exercises Prerequisites Complex numbers, Linear Algebra, Logarithm,

Laplace transform Dynamics

Next Introduction

Exercises Buy the course textbook and keep it! Review today’s slides on complex numbers and

logarithm Read Chapter 1 and 2 of the textbook.

2017-2018 11

What is “Control”? Make some object (called system, or plant)

behave as we desire. Imagine “control” around you! Room temperature control Car/bicycle driving Voice volume control “Control” (move) the position of the pointer Cruise control or speed control Process control etc.

2017-2018 12

What is “Control Systems”? Why do we need control systems? Convenient (room temperature control, laundry

machine) Dangerous (hot/cold places, space, bomb removal) Impossible for human (nanometer scale precision

positioning, work inside the small space that humancannot enter)

It exists in nature. (human body temperature control) Lower cost, high efficiency, etc.

Many examples of control systems around us

2017-2018 13

Open-Loop Control Open-loop Control System Toaster, microwave oven, shooting a basketball

Calibration is the key! Can be sensitive to disturbances

PlantController

(Actuator)

Signal Input input output

2017-2018 14

Example: Toaster A toaster toasts bread, by setting timer.

Objective: make bread golden browned and crisp. A toaster does not measure the color of bread during the

toasting process. For a fixed setting, in winter, the toast can be white and in

summer, the toast can be black (Calibration!) A toaster would be more expensive with sensors to

measure the color and actuators to adjust the timer basedon the measured color.

ToasterSetting of timer Toasted bread

2017-2018 15

Example: Laundry machine A laundry machine washes clothes, by setting a

program.

A laundry machine does not measure how cleanthe clothes become. Control without measuring devices (sensors) are

called open-loop control.

MachineProgram setting Washed clothes

2017-2018 16

Closed-Loop (Feedback) Control Compare actual behavior with desired behavior Make corrections based on the error The sensor and the actuator are key elements of

a feedback loop Design control algorithm

Plant

Sensor

Signal Input Error output

+ -ActuatorController

2017-2018 17

Attempts to change the direction of the automobile.

Manual closed-loop (feedback) control. Although the controlled system is “Automobile”, the

input and the output of the system can bedifferent, depending on control objectives!

Ex: Automobile direction control

Auto

Steeringwheelangle

DirectionDesireddirection

Eye

HandBrain

Error

2017-2018 18

Attempts to maintain the speed of the automobile.

Cruise control can be both manual and automatic. Note the similarity of the diagram above to the

diagram in the previous slide!

Ex: Automobile cruise control

AutoAcceleration Speed

Desiredspeed

Sensor

ActuatorController

DisturbanceError

2017-2018 19

Basic elements in feedback controlsystems

PlantInput OutputReference

Sensor

ActuatorController

Disturbance

Control system design objectiveTo design a controller s.t. the output follows

the reference in a “satisfactory” mannereven in the face of disturbances.

Error

2017-2018 20

Systematic controller design process

PlantInput OutputReference

Sensor

ActuatorController

Disturbance

1. Modeling

Mathematical model

2. Analysis

Controller

3. Design

4. Implemenation

2017-2018 21

Goals of this courseTo learn basics of feedback control systems Modeling as a transfer function and a block diagram

• Laplace transform (Mathematics!)• Mechanical, electrical, electromechanical systems

Analysis• Step response, frequency response• Stability: Routh-Hurwitz criterion, (Nyquist criterion)

Design• Root locus technique, frequency response technique,

PID control, lead/lag compensator Theory, (simulation with Matlab), practice in laboratories

2017-2018 22

Course roadmap

Laplace transform

Transfer function

Models for systems• mechanical• electrical• electromechanical

Linearization

Modeling Analysis Design

Time response• Transient• Steady state

Frequency response• Bode plot

Stability• Routh-Hurwitz• (Nyquist)

Design specs

Root locus

Frequency domain

PID & Lead-lag

Design examples

(Matlab simulations &) laboratories

2017-2018 23

Summary & Exercises Introduction Examples of control systems Open loop and closed loop (feedback) control Automatic control is a lot of fun!

Next Laplace transform

Exercises Buy the course textbook at the Bookstore. Read Chapter 1 and Apendix A, B of the textbook.

Fall 2008 24

Control Systems

Lecture 1Introduction

Fall 2008 25

Tips to pass this course Come to the lectures as many times as you can. Print out and bring lecture slides to the lecture. Do “Exercises” given at the end of each lecture. Read the textbook and the slides. Make use of instructor’s office hours. If you want to get a very good grade…

Fall 2008 26

What is “Control”? Make some object (called system, or plant)

behave as we desire. Imagine “control” around you! Room temperature control Car/bicycle driving Voice volume control “Control” (move) the position of the pointer Cruise control or speed control Process control etc.

Fall 2008 27

What is “Control Systems”? Why do we need control systems? Convenient (room temperature control, laundry

machine) Dangerous (hot/cold places, space, bomb removal) Impossible for human (nanometer scale precision

positioning, work inside the small space that humancannot enter)

It exists in nature. (human body temperature control) Lower cost, high efficiency, etc.

Many examples of control systems around us

Fall 2008 28

Open-Loop Control Open-loop Control System Toaster, microwave oven, shooting a basketball

Calibration is the key! Can be sensitive to disturbances

PlantController

(Actuator)

Signal Input input output

Fall 2008 29

Example: Toaster A toaster toasts bread, by setting timer.

Objective: make bread golden browned and crisp. A toaster does not measure the color of bread during the

toasting process. For a fixed setting, in winter, the toast can be white and in

summer, the toast can be black (Calibration!) A toaster would be more expensive with sensors to

measure the color and actuators to adjust the timer basedon the measured color.

ToasterSetting of timer Toasted bread

Fall 2008 30

Example: Laundry machine A laundry machine washes clothes, by setting a

program.

A laundry machine does not measure how cleanthe clothes become. Control without measuring devices (sensors) are

called open-loop control.

MachineProgram setting Washed clothes

Fall 2008 31

Closed-Loop (Feedback) Control Compare actual behavior with desired behavior Make corrections based on the error The sensor and the actuator are key elements of

a feedback loop Design control algorithm

Plant

Sensor

Signal Input Error output

+ -ActuatorController

Fall 2008 32

Attempts to change the direction of the automobile.

Manual closed-loop (feedback) control. Although the controlled system is “Automobile”, the

input and the output of the system can bedifferent, depending on control objectives!

Ex: Automobile direction control

Auto

Steeringwheelangle

DirectionDesireddirection

Eye

HandBrain

Error

Fall 2008 33

Attempts to maintain the speed of the automobile.

Cruise control can be both manual and automatic. Note the similarity of the diagram above to the

diagram in the previous slide!

Ex: Automobile cruise control

AutoAcceleration Speed

Desiredspeed

Sensor

ActuatorController

DisturbanceError

Fall 2008 34

Basic elements in feedback controlsystems

PlantInput OutputReference

Sensor

ActuatorController

Disturbance

Control system design objectiveTo design a controller s.t. the output follows

the reference in a “satisfactory” mannereven in the face of disturbances.

Error

Fall 2008 35

Systematic controller design process

PlantInput OutputReference

Sensor

ActuatorController

Disturbance

1. Modeling

Mathematical model

2. Analysis

Controller

3. Design

4. Implemenation

Fall 2008 36

Goals of this courseTo learn basics of feedback control systems Modeling as a transfer function and a block diagram

• Laplace transform (Mathematics!)• Mechanical, electrical, electromechanical systems

Analysis• Step response, frequency response• Stability: Routh-Hurwitz criterion, (Nyquist criterion)

Design• Root locus technique, frequency response technique,

PID control, lead/lag compensator Theory, (simulation with Matlab), practice in laboratories

Fall 2008 37

Course roadmap

Laplace transform

Transfer function

Models for systems• mechanical• electrical• electromechanical

Linearization

Modeling Analysis Design

Time response• Transient• Steady state

Frequency response• Bode plot

Stability• Routh-Hurwitz• (Nyquist)

Design specs

Root locus

Frequency domain

PID & Lead-lag

Design examples

(Matlab simulations &) laboratories

Fall 2008 38

Summary & Exercises Introduction Examples of control systems Open loop and closed loop (feedback) control Automatic control is a lot of fun!

Next Laplace transform

Exercises Buy the course textbook at the Bookstore. Read Chapter 1 and Apendix A, B of the textbook.

39

Control Systems

Lecture 2Laplace transform

40

Course roadmap

Laplace transformTransfer function

Models for systems• electrical• mechanical• electromechanical

Block diagrams

Linearization

Modeling Analysis Design

Time response• Transient• Steady state

Frequency response• Bode plot

Stability• Routh-Hurwitz• (Nyquist)

Design specs

Root locus

Frequency domain

PID & Lead-lag

Design examples

(Matlab simulations &) laboratories

41

Laplace transform One of most important math tools in the course! Definition: For a function f(t) (f(t)=0 for t<0),

We denote Laplace transform of f(t) by F(s).

f(t)

t0F(s)

(s: complex variable)

42

Examples of Laplace transform Unit step function

Unit ramp function

f(t)

t0

1

f(t)

t0

(Memorize this!)

(Integration by parts)

43

Integration by parts

EX.

44

Examples of Laplace transform (cont’d) Unit impulse function

Exponential function

f(t)

t0

f(t)

t0

1

(Memorize this!)

Width = 0Height = infArea = 1

45

Examples of Laplace transform (cont’d)

Sine function

Cosine function(Memorize these!)

Remark: Instead of computing Laplacetransform for each function, and/ormemorizing complicated Laplace transform,use the Laplace transform table !

46

Laplace transform table

Inverse Laplace Transform

47

Properties of Laplace transform1. Linearity

Ex.

Proof.

48

Properties of Laplace transform2.Time delay

Ex.

Proof.f(t)

0 T

f(t-T)

t-domain s-domain

49

Properties of Laplace transform3. Differentiation

Ex.

Proof.

t-domain s-domain

50

Properties of Laplace transform4. Integration

Proof.

t-domain s-domain

51

Properties of Laplace transform5. Final value theorem

Ex.

if all the poles of sF(s) are inthe left half plane (LHP)

Poles of sF(s) are in LHP, so final value thm applies.

Ex.

Some poles of sF(s) are not in LHP, so final valuethm does NOT apply.

52

Properties of Laplace transform6. Initial value theorem

Ex.

Remark: In this theorem, it does not matter ifpole location is in LHS or not.

if the limits exist.

Ex.

53

Properties of Laplace transform7. Convolution

IMPORTANT REMARK

Convolution

54

Summary & Exercises Laplace transform (Important math tool!) Definition Laplace transform table Properties of Laplace transform

Next Solution to ODEs via Laplace transform

Exercises Read Chapters 1 and 2. Solve Quiz Problems.

55

Control Systems

Lecture 3Solution to ODEs via Laplace transform

56

Course roadmap

Laplace transformTransfer function

Models for systems• electrical• mechanical• electromechanical

Block diagramsLinearization

Modeling Analysis Design

Time response• Transient• Steady state

Frequency response• Bode plot

Stability• Routh-Hurwitz• Nyquist

Design specs

Root locus

Frequency domain

PID & Lead-lag

Design examples

(Matlab simulations &) laboratories

57

Laplace transform (review) One of most important math tools in the course! Definition: For a function f(t) (f(t)=0 for t<0),

We denote Laplace transform of f(t) by F(s).

f(t)

t0F(s)

(s: complex variable)

58

An advantage of Laplace transform We can transform an ordinary differential

equation (ODE) into an algebraic equation (AE).

ODE AE

Partial fractionexpansionSolution to ODE

t-domain s-domain

12

3

59

Example 1ODE with initial conditions (ICs)

1. Laplace transform

60

Properties of Laplace transformDifferentiation (review)

t-domain

s-domain

61

2. Partial fraction expansion

Multiply both sides by s & let s go to zero:

Similarly,

unknowns

Example 1 (cont’d)

62

3. Inverse Laplace transform

Example 1 (cont’d)

If we are interested in only the final value of y(t), applyFinal Value Theorem:

63

Example 2

S1

S2

S3

64

In this way, we can find a rathercomplicated solution to ODEs easily by

using Laplace transform table!

65

Example: Newton’s law

We want to know the trajectory of x(t). By Laplace transform,

M

(Total response) = (Forced response) + (Initial condition response)

66

EX. Air bag and accelerometer Tiny MEMS accelerometer Microelectromechanical systems (MEMS)

(Pictures from various websites)

67

Ex: Mechanical accelerometer

68

Ex: Mechanical accelerometer (cont’d) We would like to know how y(t) moves when unit

step f(t) is applied with zero ICs. By Newton’s law

69

Ex: Mechanical accelerometer (cont’d) Suppose that b/M=3, k/M=2 and Ms=1. Partial fraction expansion

Inverse Laplace transform

0 2 4 6 8 10-0.5

-0.4

-0.3

-0.2

-0.1

0

Time [sec]

Am

plit

ude

70

Summary & Exercises Solution procedure to ODEs

1. Laplace transform2. Partial fraction expansion3. Inverse Laplace transform

Next, modeling of physical systems usingLaplace transform

Exercises Derive the solution to the accelerometer problem. E2.4 of the textbook in page 135.

71

Control Systems

Lecture 4Modeling of electrical systems

72

Course roadmap

Laplace transformTransfer function

Models for systems• electrical• mechanical• electromechanical

Block diagrams

Linearization

Modeling Analysis Design

Time response• Transient• Steady state

Frequency response• Bode plot

Stability• Routh-Hurwitz• Nyquist

Design specs

Root locus

Frequency domain

PID & Lead-lag

Design examples

(Matlab simulations &) laboratories

73

Controller design procedure (review)

plantInput OutputRef.

Sensor

ActuatorController

Disturbance

1. Modeling

Mathematical model2. Analysis

Controller

3. Design

4. Implemenation

What is the “mathematical model”? Transfer function Modeling of electrical circuits

74

Representation of the input-output (signal)relation of a physical system

A model is used for the analysis and design ofcontrol systems.

Mathematical model

Physicalsystem

Model

Modeling

Input Output

75

Modeling is the most important and difficult taskin control system design. No mathematical model exactly represents a

physical system.

Do not confuse models with physical systems! In this course, we may use the term “system” to

mean a mathematical model.

Important remarks on models

76

Transfer function A transfer function is defined by

A system is assumed to be at rest. (Zero initialcondition)

77

Impulse response Suppose that u(t) is the unit impulse function

and system is at rest.

The output g(t) for the unit impulse input is calledimpulse response. Since U(s)=1, the transfer function can also be

defined as the Laplace transform of impulseresponse:

System

78

Models of electrical elements:(constitutive equations)

v(t)

i(t)

R

Resistance CapacitanceInductance

v(t)

i(t)

L v(t)

i(t)

C

Laplacetransform

79

Impedance Generalized resistance to a sinusoidal

alternating current (AC) I(s) Z(s): V(s)=Z(s)I(s)

V(s)I(s)Z(s)

Time domain Impedance Z(s)

Resistance

Capacitance

Inductance

Element

Memorize!

80

Kirchhoff’s Voltage Law (KVL) The algebraic sum of voltage drops around any

loop is =0.

81

Kirchhoff’s Current Law (KCL) The algebraic sum of currents into any junction

is zero.

82

Impedance computation Series connection

Proof (Ohm’s law)

V(s)I(s)

Z1(s) Z2(s)

V1(s) V2(s)

83

Impedance computation Parallel connection

Proof (Ohm’s law)

KCL

V(s)

I(s) Z1(s)

Z2(s)

I1(s)

I2(s)

84

Modeling example

Kirchhoff voltage law (with zero initial conditions)

By Laplace transform,

v1(t)

i(t)

R2Input

R1

v2(t) OutputC

85

Modeling example (cont’d)

Transfer function

v1(t)

i(t)

R2Input

R1

v2(t) OutputC

(first-order system)

86

vd

Example: Modeling of op amp

Impedance Z(s): V(s)=Z(s)I(s) Transfer function of the above op amp:

Vi(s)

I(s)

InputZi(s)

Vo(s) Output

-+

i- Rule2: vd=0Rule1: i-=0Zf(s)

If(s)

87

Modeling example: op amp

By the formula in previous two pages,

vi(t)

i(t)

R2

Input

R1

vo(t) Output

C

-+

i-

vd

Vd=0

i-=0

(first-order system)

88

vd

Modeling exercise: op amp

Find the transfer function!

vi(t)

R2

Input

R1

vo(t) Output

C2

-+

i- Vd=0

i-=0

C1

89

More exercises Find a transfer function from v1 to v2.

Find a transfer function from vi to vo.

90

Summary & Exercises Modeling Modeling is an important task! Mathematical model Transfer function Modeling of electrical systems

Next, modeling of mechanical systems Exercises Do the problems in page 19 of this lecture note.

91

Control Systems

Lecture 5Modeling of mechanical systems

92

Course roadmap

Laplace transformTransfer function

Models for systems• electrical• mechanical• electromechanical

Block diagrams

Linearization

Modeling Analysis Design

Time response• Transient• Steady state

Frequency response• Bode plot

Stability• Routh-Hurwitz• Nyquist

Design specs

Root locus

Frequency domain

PID & Lead-lag

Design examples

(Matlab simulations &) laboratories

93

Time-invariant & time-varying A system is called time-invariant (time-varying)

if system parameters do not (do) change in time. Example: Mx’’(t)=f(t) & M(t)x’’(t)=f(t) For time-invariant systems:

This course deals with time-invariant systems.

SysTime shift Time shift

94

Newton’s laws of motion 1st law: A particle remains at rest or continues to move in a

straight line with a constant velocity if there is nounbalancing force acting on it.

2nd law: : translational

: rotational

3rd law: For every action has an equal and opposite reaction

95

Translational mechanical elements:(constitutive equations)

Mass DamperSpring

M

f(t)x(t) f(t) x1(t)

K x2(t)

f(t)

f(t) x1(t)

B x2(t)

f(t)

96

Mass-spring-damper system

M

x(t)

K B

97

Free body diagram

Newton’s law: F=ma

M

K B

Direction of actual force will beautomatically determined by therelative values!

98

Mass-spring-damper system

Equation of motion

By Laplace transform (with zero initial conditions),

M

x(t)

K B

(2nd order system)

99

Gravity?

At rest, y coordinate: x coordinate:

K

M

KM

100

Automobile suspension system

M2

f(t)x2(t)

K1 B

K2

M1x1(t)

automobile

suspension

wheel

tire

101

Automobile suspension system

Laplace transform with zero ICs

G2 G1

G3

F X2 X1

Block diagram

102

Rotational mechanical elements(constitutive equations)

Moment of inertia FrictionRotational spring

JK

Btorque

rotation angle

103

Torsional pendulum system Ex.2.12

J

K

B

friction betweenbob and air

104

Torsional pendulum system

Equation of Motion

By Laplace transform (with zero ICs),

J

K

B

friction betweenbob and air

(2nd order system)

105

Example

By Newton’s law

By Laplace transform (with zero ICs),

106

Example (cont’d) From second equation:

From first equation:

G2Block diagram

G1

(2nd order system)

(4th order system)

107

Rigid satellite Ex. 2.13

Thrustor

Doubleintegrator

• Broadcasting• Weather forecast• Communication• GPS, etc.

108

Summary & Exercises Modeling of mechanical systems Translational Rotational

Next, block diagrams. Exercises Derive equations for the automobile suspension

problem.

109

Exercises (Franklin et al.) Quarter car model: Obtain a transfer function

from R(s) to Y(s).

Road surface

M1x (t)

Ks B

Kw

M2 y(t) Answer

110

Control Systems

Lecture 7Linearization, time delays

111

Course roadmap

Laplace transform

Transfer function

Models for systems• electrical• mechanical• electromechanicalBlock diagramsLinearization

Modeling Analysis Design

Time response• Transient• Steady state

Frequency response• Bode plot

Stability• Routh-Hurwitz• Nyquist

Design specs

Root locus

Frequency domain

PID & Lead-lag

Design examples

(Matlab simulations &) laboratories

112

What is a linear system? A system having Principle of Superposition

A nonlinear system does not satisfythe principle of superposition.

System

113

Linear systems Easier to understand and obtain solutions Linear ordinary differential equations (ODEs), Homogeneous solution and particular solution Transient solution and steady state solution Solution caused by initial values, and forced solution

Add many simple solutions to get more complexones (use superposition!) Easy to check the Stability of stationary states

(Laplace Transform)

114

Why linearization? Real systems are inherently nonlinear. (Linear

systems do not exist!) Ex. f(t)=Kx(t), v(t)=Ri(t) TF models are only for linear time-invariant (LTI)

systems. Many control analysis/design techniques are

available for linear systems. Nonlinear systems are difficult to deal with

mathematically. Often we linearize nonlinear systems before

analysis and design. How?

115

How to linearize it? Nonlinearity can be approximated by a linear

function for small deviations around anoperating point Use a Taylor series expansion

Linear approximation

Nonlinear function

Operating point

Old coordinate

New coordinate

116

Linearization Nonlinear system: Let u0 be a nominal input and let the resultant

state be x0

Perturbation: Resultant perturb: Taylor series expansion:

117

Linearization (cont.)

notice that ; hence

L. sys.N. sys

118

Motion of the pendulum

Linearize it at Find u0

New coordinates:

Linearization of a pendulum model

119

Linearization of a pendulum model (cont’)

Taylor series expansion of

120

Time delay transfer function TF derivation

The more time delay is, the more difficult tocontrol (Imagine that you are controlling thetemperature of your shower with a very longhose. You will either get burned or frozen!)

(Memorize this!)

121

Summary and Exercises Modeling of Nonlinear systems Systems with time delay

Next Modeling of DC motors

Exercises Linearize the pendulum model at /4