modeling and analysis of systems lecture #2 - state …guilldrion/files/syst0002-20… ·  ·...

69
Modeling and Analysis of Systems Lecture #2 - State-Space Representation Guillaume Drion Academic year 2015-2016 1

Upload: vokien

Post on 02-Apr-2018

220 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Modeling and Analysis of SystemsLecture #2 - State-Space Representation

Guillaume DrionAcademic year 2015-2016

1

Page 2: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Outline

Systems modeling: signals (domain, image), systems (static, dynamic).

State-space representation: general form.

State-space representation in discrete-time.

State-space representation in continuous-time.

Interconnections of systems/models.

2

Page 3: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Outline

Systems modeling: signals (domain, image), systems (static, dynamic).

State-space representation: general form.

State-space representation in discrete-time.

State-space representation in continuous-time.

Interconnections of systems/models.

3

Page 4: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Systems modeling

Modeling and analysis of systems: open loop. “Observing and analyzing the environment”

SYSTEMInput Output

4

Page 5: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Systems modeling

Modeling and analysis of systems: open loop. “Observing and analyzing the environment”

Example (lecture #1): Input = flow of blood coming out of the heart (electric current). Output = blood pressure in the vascular system (voltage). System = aortic valve (resistance) + arteries (conductance) + capillaries (resistance).

SYSTEMInput Output

Left ventricle

Aortic valve (r)

Aorta

Arterial compliance (Ca)

Peripheryvessels

(R1, R2, ..., Rn)

r

RCaP(t)

u(t)

PCa(t)Pr(t)

5

Page 6: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Systems modeling

Modeling and analysis of systems: open loop. “Observing and analyzing the environment”

SYSTEMInput Output

6

Page 7: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Signals

Inputs and outputs are signals.Examples:

“Hi!” on a computer is “01001000 01101001 00100001” (Ascii) => Discrete, binary signal x[n].

7

Page 8: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Signals

Inputs and outputs are signals.Examples:

“Hi!” on a computer is “01001000 01101001 00100001” (Ascii) => Discrete, binary signal x[n].

Electrical signaling of a neuron:

=> Continuous signal x(t), larger than VK and smaller than VNa.

400 ms20 mV

VK

VNa

8

Page 9: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Signals: domain and image

Inputs and outputs are signals.

Signals (x) are defined by their domain (X) and their image (Y):

Domain (for us): (discrete signal) or (continuous signal).

Image: set of values that the signal can take (ex: probabilities/binary signals).

9

Page 10: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Signals: domain and image

Inputs and outputs are signals.Examples:

“Hi!” on a computer is “01001000 01101001 00100001” (Ascii) => Discrete, binary signal x[n].

Electrical signaling of a neuron:

=> Continuous signal x(t), larger than VK and smaller than VNa.

400 ms20 mV

Domain Image

Domain Image (+⊂ℝ)

VK

VNa

10

Page 11: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Signals: domain and image

A continuous signal can have a somehow “discrete image”... Ex: current flowing through an ion channel over time:

... and a discrete signal can have a “continuous image”. Ex: many digitized signals.

11

Page 12: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Why should we care about the domain of a signal?

Time-shift

Time-reversal

Time-scaling

Comparing continuous and discrete signals:

12

Page 13: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Time-shift

Time-reversal

Time-scaling

Why should we care about the domain of a signal?

Some values are not allowed for α

Comparing continuous and discrete signals:

13

Page 14: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Why should we care about the image of a signal?

In theory, you can design any system using mathematical modeling.

Ex: we want to design a system that controls the movement of a robot arm for weight lifting, and proudly come up with this system that works perfectly:

But in real-life, the values that the signals can take are constrained. You have to take this limitations of the signal image into account in your model!

Ex: in the robot, the voltage signal cannot exceed some saturation voltage. With your design, the robot can barely lift his arm, let alone any additional weight...

Input voltage

Lifted weight ( relative to arm weight)

123456

14

Page 15: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Why should we care about the image of a signal?

In theory, you can design any system using mathematical modeling.

Ex: we want to design a system that controls the movement of a robot arm for weight lifting, and proudly come up with this system that works perfectly:

But in real-life, the values that the signals can take (image) are constrained. You have to take this limitation into account in your model!

Ex: in the robot, the voltage signal cannot exceed some saturation voltage. With our design, the robot can barely lift his arm, let alone any additional weight...

Input voltage

Lifted weight ( relative to arm weight)

123456

Voltage saturation

15

Page 16: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Systems modeling

Modeling and analysis of systems: open loop. “Observing and analyzing the environment”

SYSTEMInput Output

16

Page 17: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Systems: static vs dynamic

Static: output value only depends on the current input value.

Otherwise: dynamic.

SYSTEMInput Output

Input 0

1

Output

0

K

17

Page 18: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Systems: static vs dynamic

Static: output value only depends on the current input value.

Otherwise: dynamic.

SYSTEMInput Output

Input 0

1

Output

0

K

Input 0

1

Output

0

K

18

Page 19: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Systems: static vs dynamic

Static: output value only depends on the current input value.

Otherwise: dynamic.

SYSTEMInput Output

Input 0

1

Output

0

K

Input 0

1

Output

0

K

19

Page 20: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Systems: static vs dynamic

Static: output value only depends on the current input value.

Ex: electrical resistance:

The value of VR(t*) only depends on i(t*).

Otherwise: dynamic.

Ex: electrical inductor:

The value of VL(t*) depends on i(t*) but also depends on i(t) with t<t*.

SYSTEMInput Output

20

Page 21: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Systems: static vs dynamic

In a dynamical system, the output value depends on past input values.It has memory, which has to be stored “somewhere”.

=> Concept of states and state-space representation (Ch2).

SYSTEMInput Output

Input 0

1

Output

0

K

21

Page 22: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Outline

Systems modeling: signals (domain, image), systems (static, dynamic).

State-space representation: general form.

State-space representation in discrete-time.

State-space representation in continuous-time.

Interconnections of systems/models.

22

Page 23: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Systems: state-space representation

The state-space is defined by 3 sets and 2 functions:

Sets:

U: Input space. “Everything that goes in”

Y: Output space. “Everything that goes out/is measured/you care about”

X: state space. “Everything that has some dynamics”

Functions:

f : X x U X. “update” function. Describes the dynamics of the system.

h : X x U Y. output function. Describes the output of the system.

23

Page 24: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Linear systems: A,B,C,D representation

Linear, time-invariant (LTI) dynamical systems can be represented in the form

where A describes how the dynamics of the system evolve (dynamics matrix) B describes how the input influences the states (input matrix) C describes how the states “are seen” in the output (output matrix). D describes how the input directly influences the output (feedthrough matrix).

The output is therefore a function of the input and the states. Simple but recurrent case: the output is one of the states.

y = Cx + Du

x = Ax + Bu

24

Page 25: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Finite-state machines and infinite-state machines

If the states can take a finite number of values (state function with finite image): finite-state machines (finite-state automata). Ex: binary systems: each state can only take the value 0 or 1.

Finite-state machines are studied in informatics.

Otherwise: infinite-state machines (this course).

25

Page 26: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Outline

Systems modeling: signals (domain, image), systems (static, dynamic).

State-space representation: general form.

State-space representation in discrete-time.

State-space representation in continuous-time.

Interconnections of systems/models.

26

Page 27: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

State-space representation in discrete-time: general form

General form of a state-space representation in discrete-time:

Discrete systems are very intuitive to use, but can have interesting dynamics (be careful of the domain of the signals!)

27

Page 28: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Example #1: the Fibonacci sequence

The Fibonacci sequence is the series where each number is the sum of the two previous ones: 0,1,1,2,3,5,8,13,21,...

It writes

In this series, the ratio converges towards the golden ratio .

We will use the Fibonacci sequence to create a system whose output converges towards the golden ratio.

28

Page 29: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

The Fibonacci sequence: states

First step: identify the states of the system. How many states are needed?

In a discrete system, for any function of n, look at the maximum time-shift.How many values do you need to “store” in memory?

Here:

2 states: and .

29

Page 30: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

The Fibonacci sequence: update function

Fibonacci sequence:

States: and

Update function:

30

Page 31: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

The Fibonacci sequence: output function

Output:

States: and

Output function:

31

Page 32: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

The Fibonacci sequence: dynamical system

The full dynamical system reads

Implementation in matlab:

% Variables initialization n = 1:1:10; % "time" x1 = ones(1,length(n)); % state variable #1 x2 = ones(1,length(n)); % state variable #2 y = ones(1,length(n)); % Output % System for i = 2:length(n) % Update functions x1(i) = x1(i-1) + x2(i-1); x2(i) = x1(i-1); % Output functions y(i) = x1(i)/x2(i); end

32

Page 33: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

The Fibonacci sequence: simulation

1 2 3 4 5 6 7 8 9 100

20

40

60

80

100Fibonacci sequence - x1[n]

1 2 3 4 5 6 7 8 9 100

20

40

60Fibonacci sequence - x2[n]

1 2 3 4 5 6 7 8 9 100

0.5

1

1.5

2Fibonacci sequence - y[n]

33

Page 34: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Example #2: the logistic map

In 1838, Pierre-François Verhulst proposed a dynamical model for the growth of a population (N) depending on the intrinsic growth rate (r) and the maximum number of individuals the environment can support (K).

This equation is called the logistic equation.

Simple behavior: If r >> and N << K: the population grows fast. If N = K: the population does not grow anymore.

Mathematical modeling is widely used in ecology.

34

Page 35: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Example #2: the logistic map

Simulation of the logistic equation for different growth rates and K=1.

1 1.5 2 2.5 3 3.5 4 4.5 50

0.2

0.4

0.6

0.8

1Logistic equation, r=2

1 1.5 2 2.5 3 3.5 4 4.5 50

0.2

0.4

0.6

0.8

1Logistic equation,r=4

time

N

N

35

Page 36: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Example #2: the logistic map

In 1976, Robert May proposed a “discrete equivalent”

As opposed to the continuous system, the dynamics of the discrete system is extremely rich, and can be “chaotic” for certain values of α.

vs

36

Page 37: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Example #2: the logistic map: simulations

0 10 20 30 40 50 600

0.2

0.4

0.6

0.8

1Logistic map, a=2

0 10 20 30 40 50 600

0.2

0.4

0.6

0.8

1Logistic map, a=3.3

0 10 20 30 40 50 600

0.2

0.4

0.6

0.8

1Logistic map, a=4

37

Page 38: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Example #2: the logistic map: simulations

0 10 20 30 40 50 600

0.2

0.4

0.6

0.8

1Logistic map, a=2

0 10 20 30 40 50 600

0.2

0.4

0.6

0.8

1Logistic map, a=3.3

0 10 20 30 40 50 600

0.2

0.4

0.6

0.8

1Logistic map, a=4

38

Page 39: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Example #2: the logistic map: simulations

0 10 20 30 40 50 600

0.2

0.4

0.6

0.8

1Logistic map, a=2

0 10 20 30 40 50 600

0.2

0.4

0.6

0.8

1Logistic map, a=3.3

0 10 20 30 40 50 600

0.2

0.4

0.6

0.8

1Logistic map, a=4

39

Page 40: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Example #2: the logistic map

In 1976, Robert May proposed a “discrete equivalent”

As opposed to the continuous system, the dynamics of the discrete system are extremely rich, and can be “chaotic” for certain values of α.

This dynamical richness comes from the nonlinearity of the system.But it highlights the fact that continuous and discrete systems are not always “equivalent”.

vs

40

Page 41: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Outline

Systems modeling: signals (domain, image), systems (static, dynamic).

State-space representation: general form.

State-space representation in discrete-time.

State-space representation in continuous-time.

Interconnections of systems/models.

41

Page 42: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

State-space representation in continuous-time: general form

General form of a state-space representation in continuous-time:

!! State-space representations are not unique !! But all representations describe the same system, i.e. with the same (and unique) inputs, outputs and transfer function.

42

Page 43: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

State-space representation in continuous-time: identifying states

Method #1

Identify inputs and outputs.

Identify independent means of energy storage.

Identify state variables.

Write model (using laws of physics, etc.).

Method #2

Write model (using laws of physics, etc.).

Identify inputs and outputs.

Identify state variables.

43

Page 44: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

State-space representation in continuous-time: identifying states

Method #1

Identify inputs and outputs.

Identify independent means of energy storage.

Identify state variables.

Write model (using laws of physics, etc.).

Method #2

Identify inputs and outputs.

Write model (using laws of physics, etc.).

Identify state variables.

44

Page 45: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Example #1: modeling a RC circuit

R

CV

i

vC(t)vR(t)

45

Page 46: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

RC circuit: method #1

Identify inputs and outputs.

Identify energy storage.

Identify state variables.

Write model.

R

CV

i

vC(t)vR(t)

46

Page 47: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

RC circuit: method #1 - inputs and outputs

Identify inputs and outputs.

Identify energy storage.

Identify state variables.

Write model.

Inputs: active sources voltage source:

Outputs: or

R

CV

i

vC(t)vR(t)

47

Page 48: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

RC circuit: method #1 - energy storage

Identify inputs and outputs.

Identify energy storage.

Identify state variables.

Write model.

A capacitor accumulates charges

R

CV

i

vC(t)vR(t)

48

Page 49: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

RC circuit: method #1 - state variables

Identify inputs and outputs.

Identify energy storage.

Identify state variables.

Write model.

A capacitor accumulates charges

State variable:

R

CV

i

vC(t)vR(t)

49

Page 50: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

RC circuit: method #1 - model

Identify inputs and outputs.

Identify energy storage.

Identify state variables.

Write model.

R

CV

i

vC(t)vR(t)

Input: . Output: or . State:

Kirchhoff:

Which gives

50

Page 51: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

RC circuit: method #2

Identify inputs and outputs.

Write model

Identify state variables.

R

CV

i

vC(t)vR(t)

51

Page 52: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

RC circuit: method #2 - model

Identify inputs and outputs.

Write model

Identify state variables.

Input: . Output: or .

Kirchhoff:

State variable:

R

CV

i

vC(t)vR(t)

52

Page 53: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

RC circuit: method #2 - state variable

Identify inputs and outputs.

Write model

Identify state variables.

Input: . Output: or .

Kirchhoff:

State variable:

R

CV

i

vC(t)vR(t)

53

Page 54: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

RC circuit: method #2 - state-space model

Identify inputs and outputs.

Write model

Identify state variables.

Input: . Output: or . State:

Kirchhoff:

Which gives

R

CV

i

vC(t)vR(t)

54

Page 55: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

RC circuit: two different, but equivalent, state-space models

A capacitor accumulates charges

The accumulation of charges creates a voltage gradient .

They both represent the same energy storage.

55

Page 56: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Example #2: modeling a RL circuit

Exercise:

R

LV

i

vL(t)vR(t)

56

Page 57: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Example #3: modeling a RLC circuit

R

LV

i

vL(t)vR(t)

C

vC(t)

57

Page 58: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

RLC circuit: inputs, outputs, states, equations

R

LV

i

vL(t)vR(t)

C

vC(t)

Identify inputs and outputs.

Identify energy storage.

Identify state variables.

Write model.

Input: . Output: or or .

Energy storage/variable. Capacitor: . Inductor: .

Kirchhoff:

58

Page 59: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

RLC circuit: state-space model

R

LV

i

vL(t)vR(t)

C

vC(t)

Identify inputs and outputs.

Identify energy storage.

Identify state variables.

Write model.

Kirchhoff: with and .

State-space model:

59

Page 60: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

RLC circuit: state-space model

R

LV

i

vL(t)vR(t)

C

vC(t)

Identify inputs and outputs.

Identify energy storage.

Identify state variables.

Write model.

Kirchhoff:

You could also use (try it at home)

or or

60

Page 61: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Example #4: driven pendulum

u

θ

m

l

mg

61

Page 62: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Driven pendulum: modelingu

θ

m

l

mg with moment of inertia.

which gives .

What do I do with a ?

62

Page 63: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Driven pendulum: statesu

θ

m

l

mg with moment of inertia.

which gives .

What do I do with a ?

States: . If I want to write the system in the form ,the second state should be (the energy is stored in the position and speed).

63

Page 64: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Driven pendulum: state-space modelu

θ

m

l

mg

with and .

This gives the state-space representation

This model is nonlinear, so out of the scope of this course.

However, we can study the effect of small variations around a specific point through a linearization of the system around this point.

64

Page 65: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Driven pendulum: linearizationu

θ

m

l

mgIdea behind linearizing a system around a specific point:

x

f(x)

See tutorials.

65

Page 66: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Outline

Systems modeling: signals (domain, image), systems (static, dynamic).

State-space representation: general form.

State-space representation in discrete-time.

State-space representation in continuous-time.

Interconnections of systems/models.

66

Page 67: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Interconnections of systems

Complex state-space models can be decomposed into simpler, interconnected models.

Useful for instance if you want to split the modeling work.

Feedforward interconnection:

Feedback interconnection: and .

u1 y1 u2 y2

u1 y1 u2 y2

67

Page 68: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Example: designing a DC motor

You want to design a DC motor, and ask team #1 to work on the electrical part and team #2 to work on the mechanical part separately (black board).

RL

Vin

i

vL(t)vR(t)vc(t) w

68

Page 69: Modeling and Analysis of Systems Lecture #2 - State …guilldrion/Files/SYST0002-20… ·  · 2016-02-17Outline Systems modeling: signals (domain, image), systems (static, dynamic)

Outline

Systems modeling: signals (domain, image), systems (static, dynamic).

State-space representation: general form.

State-space representation in discrete-time.

State-space representation in continuous-time.

Interconnections of systems/models.

69