introduction to signals and systems lecture #2 ... · in “state-space”, dynamical systems are...

79
Introduction to Signals and Systems Lecture #2 - Mathematical Representations of Dynamical Systems Guillaume Drion Academic year 2017-2018 1

Upload: others

Post on 22-Jul-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

Introduction to Signals and Systems Lecture #2 - Mathematical Representations of Dynamical Systems

Guillaume Drion Academic year 2017-2018

1

Page 2: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

Outline

Mathematical modeling: basics and illustrations

System dynamics: static gain, input integration and state interactions (feedback)

System output: update function vs output function

2

Page 3: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

A simple modeling example: the wheat and chessboard problem

If you start by putting one grain on the first square and double the number for each consecutive square: (i) how many grains would be put on the nth square? (ii) how many grains do you need to fill the chessboard?

3

Page 4: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

A simple modeling example: the wheat and chessboard problem

If you start by putting one grain on the first square and double the number for each consecutive square: (i) how many grains would be put on the nth square? (ii) how many grains do you need to fill the chessboard?

4

Mathematical model of the problem

What is ? What values can take? And ? What does the first equation describes? What does the second equation describes?

x[n] n x[n]

x[0] = 1,

x[n+ 1] = 2x[n]

Page 5: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

A simple modeling example: the wheat and chessboard problem

5

What is ? What values can take? And ?x[n] n x[n]

is the number of wheat grains on the nth square. is the square number.

can take values in the range .

can be any positive integer.

x[n] n

n

x[n]

Such function is called signal.

x[0] = 1,

x[n+ 1] = 2x[n]

[0, 63]

Page 6: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

A simple modeling example: the wheat and chessboard problem

6

What is ? What values can take? And ?x[n] n x[n]

is the number of wheat grains on the nth square. is the square number.

can take values in the range .

can be any positive integer.

x[n] n

n

x[n]

Such function is called signal.

This defines the domain of the signal .x[n]

x[0] = 1,

x[n+ 1] = 2x[n]

[0, 63]

Page 7: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

A simple modeling example: the wheat and chessboard problem

7

What is ? What values can take? And ?x[n] n x[n]

is the number of wheat grains on the nth square. is the square number.

can take values in the range .

can be any positive integer.

x[n] n

n

x[n]

Such function is called signal.

This defines the domain of the signal .x[n]

This defines the image of the signal .x[n]

x[0] = 1,

x[n+ 1] = 2x[n]

[0, 63]

Page 8: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

Signals: domain and image

Systems treat 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).

8

Page 9: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

Signals

Inputs, outputs, variables, etc. are signals. Examples: “Hi!” on a computer is “01001000 01101001 00100001” (Ascii) => Discrete, binary signal x[n].

9

Page 10: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

Signals

Inputs, outputs, variables, etc. 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

10

Page 11: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

Signals: domain and image

Inputs, outputs, variables, etc. 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

11

Page 12: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

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 digitalized signals.

12

Page 13: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

Why should we care about the domain of a signal?

Time-shift

Time-reversal

Time-scaling

Comparing continuous and discrete signals:

13

Page 14: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

Time-shift

Time-reversal

Time-scaling

Why should we care about the domain of a signal?

Some values of α lead to problems

Comparing continuous and discrete signals:

14

Page 15: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

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

15

Page 16: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

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

16

Page 17: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

Back to the wheat and chessboard problem

If you start by putting one grain on the first square and double the number for each consecutive square: (i) how many grains would be put on the nth square? (ii) how many grains do you need to fill the chessboard?

17

Mathematical model of the problem

What is ? What values can take? And ? What does the first equation describes? What does the second equation describes?

x[n] n x[n]

x[0] = 1,

x[n+ 1] = 2x[n]

Page 18: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

A simple modeling example: the wheat and chessboard problem

18

What does the first equation describes?

is the initial condition of my system.

A system/model can have a very different output for different initial conditions. Example:

vs

x[0] = 1,

x[n+ 1] = 2x[n]

x[0] = 1,

x[n+ 1] = 2x[n]

x[0] = 1

x[0] = 0,

x[n+ 1] = 2x[n]

Page 19: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

A simple modeling example: the wheat and chessboard problem

19

What does the second equation describes?

describes the “future” evolution of my signal .

This equation contains the dynamics of my system.

The signal is a variable of my mathematical model.

x[n+ 1] = 2x[n]x[n]

x[n]

x[0] = 1,

x[n+ 1] = 2x[n]

Page 20: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

A simple modeling example: the wheat and chessboard problem

If you start by putting one grain on the first square and double the number for each consecutive square: (i) how many grains would be put on the nth square?

20

x[0] = 1,

x[n+ 1] = 2x[n]

x[0] = 1 = 20,

x[1] = 2 ⇤ 1 = 2 = 21,

x[0] = 2 ⇤ 2 = 4 = 22,

...

Page 21: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

A simple modeling example: the wheat and chessboard problem

If you start by putting one grain on the first square and double the number for each consecutive square: (i) how many grains would be put on the nth square?

21

x[0] = 1,

x[n+ 1] = 2x[n]

x[0] = 1 = 20,

x[1] = 2 ⇤ 1 = 2 = 21,

x[0] = 2 ⇤ 2 = 4 = 22,

...

x[n] = 2n

This function describes the state of my system at “time” .n

Page 22: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous domain).

22

, are variables of the systems (the model describes their evolution). A system can have many variables (dimension).x[n]

is a parameter of the system. A system can have many parameters.a

x =dx

dt

(where )x[n+ 1] = ax[n]

! x[n] = a

n

x = ax

! x(t) = e

at

Discrete domain Continuous domain

x(t)

Page 23: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous domain).

23

is a parameter of the system. A system can have many parameters.a

x =dx

dt

(where )x[n+ 1] = ax[n]

! x[n] = a

n

x = ax

! x(t) = e

at

Discrete domain Continuous domain

a > 0a < 0

Page 24: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

A simple modeling example: the wheat and chessboard problem

If you start by putting one grain on the first square and double the number for each consecutive square: (ii) how many grains do you need to fill the chessboard?

24

x[0] = 1,

x[n+ 1] = 2x[n]

This function describes the output of my system at “time” .n

y[n] =nX

i=0

x[i]

Page 25: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

Modeling example: predator-prey model

25

H[n+ 1] = H[n] + bH[n]� aL[n]H[n]

L[n+ 1] = L[n] + cL[n]H[n]� dL[k]

Page 26: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

Modeling example: predator-prey model

26

H[n+ 1] = H[n] + bH[n]� aL[n]H[n]

L[n+ 1] = L[n] + cL[n]H[n]� dL[k]

1. If Hare or Lynx do not die or the food supply does not increase, the populations remain stable.

Page 27: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

Modeling example: predator-prey model

27

H[n+ 1] = H[n] + bH[n]� aL[n]H[n]

L[n+ 1] = L[n] + cL[n]H[n]� dL[k]

2. If Hares get more food (parameter ), their population increases. If Lynxes get more Hares to eat, their population increases with a rate .

bc

Page 28: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

Modeling example: predator-prey model

28

H[n+ 1] = H[n] + bH[n]� aL[n]H[n]

L[n+ 1] = L[n] + cL[n]H[n]� dL[k]

3. If Hares are eaten by lynxes, their population decreases with a rate . If Lynxes die, their population decreases with a rate .

ad

Page 29: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

Modeling example: predator-prey model

29

H[n+ 1] = H[n] + bH[n]� aL[n]H[n]

L[n+ 1] = L[n] + cL[n]H[n]� dL[k]

Observations/data

Model simulation

Page 30: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

Modeling example: neuron firing

30

Equivalent scheme

Page 31: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

Modeling example: neuron firing

31Equivalent scheme

Mathematical model

Page 32: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

Modeling example: neuron firing

32

Experimental data

Model simulation

Page 33: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

Examples of problems requiring mathematical modeling

33

Design of mass-damper Design of a robot arm

Design of a DC/DC converter

Page 34: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

Outline

Mathematical modeling: basics and illustrations

System dynamics: static gain, input integration and state interactions (feedback)

System output: update function vs output function

34

Page 35: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

System dynamics

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

SYSTEMInput Output

35

Page 36: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

System dynamics: static gain

Example #1: Applying a force on a spring.

36

kF

xF = kx () x =

1

k

F

F (Input)0

1

x (Output)

0

1/k

Page 37: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

System dynamics: static gain

Example #1: Applying a force on a spring. The output is solely shaped by the input at the present time: static system.

37

kF

xF = kx () x =

1

k

F

F (Input)0

1

x (Output)

0

1/kstatic gain

Page 38: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

System dynamics: static gain

Example #2: A current through a resistive wire.

38

R

i

V = Ri () i =1

RV

static gain

i (Input)0

1

V (Output)

0

R

Page 39: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

System dynamics: static gain

Mathematical representation: functions. 1 input, 1 output: where is the static gain.

More than one input and/or output: matrix representation:

39

y(t) = Ku(t) K

y(t) = k1u1(t) + k2u2(t) + · · ·+ knun(t)

=�k1 k2 · · · kn

0

BB@

u1

u2

· · ·un

1

CCA = Ku(t)

Page 40: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

System dynamics: input integration

Example #1bis: Applying a force on a damper.

40

F

x

cF = cv = cx

wherex =

dx

dt

=) x =1

c

F

F (Input)0

1

x (Output)

0

1/c

Page 41: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

System dynamics: input integration

Example #1bis: Applying a force on a damper. The output depends on past values of input: energy storage (memory). The energy from input F is stored in position x. x is a state of the system.

41

F

x

cF = cv = cx

wherex =

dx

dt

=) x =1

c

F

F (Input)0

1

x (Output)

0

1/c

Page 42: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

System dynamics: input integration

Example #2bis: A current “through” a capacitor. The energy from input i is stored in voltage V. V is a state of the system.

42

i

C i = CV () V =1

Ci

i (Input)0

1

V (Output)

0

1/C

Page 43: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

System dynamics: input integration

Integrators store past values of the input into states.

Mathematical representation: ordinary differential equations (continuous). or difference equations (discrete).

43

Input

State

x = Bu

x[n+ 1] = Bu[n]or

Page 44: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

System dynamics: state interactions

Example #1ter: Applying a force on a spring and a damper in parallel.

44

k

c

x

F

F = kx+ cx

Behavior?

Page 45: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

System dynamics: state interactions

Example #1ter: Applying a force on a spring and a damper in parallel. (a) : integration of the input

45

k

c

x

F

F = kx+ cx

=) x =1

c

[F � kx]

x =1

c

F ⌘ 1

c

u

Page 46: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

System dynamics: state interactions

Example #1ter: Applying a force on a spring and a damper in parallel. (a) : integration of the input (b) : does not depend on input - Internal dynamics!

46

k

c

x

F

F = kx+ cx

=) x =1

c

[F � kx]

x =1

c

F ⌘ 1

c

u

x = �k

c

x

Page 47: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

System dynamics: state interactions

Example #1ter: Applying a force on a spring and a damper in parallel. (b) : Internal dynamics. An increase in the position induces a decrease in the speed . Adding the spring adds negative feedback to the system.

47

k

c

x

F

F = kx+ cx

=) x =1

c

[F � kx]

x = �k

c

x

x

x

Page 48: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

System dynamics: state interactions

Example #1ter: Applying a force on a spring and a damper in parallel.

48

k

c

x

F

F = kx+ cx

=) x =1

c

[F � kx]

F (Input)0

1

x (Output)

0

?

Page 49: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

System dynamics: state interactions

Example #2ter: Applying an input voltage on an RC circuit. (a) : integration of the input (b) : Internal dynamics.

49

R

i

VC

i

i = iR + iC =V

R+ CV

=) V =1

C

i� V

R

V =1

Ci

V = � 1

RCV

Page 50: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

System dynamics: state interactions

Example #2ter: Applying an input voltage on an RC circuit.

50

R

i

VC

i

i = iR + iC =V

R+ CV

=) V =1

C

i� V

R

i (Input)0

1

V (Output)

0

?

Page 51: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

System dynamics: state interactions

Mechanical system vs electrical system.

51

=) V =1

C

i� V

R

�=) x =

1

c

[F � kx]

Mechanical system Electrical system

Page 52: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

System dynamics: state interactions

Mechanical system vs electrical system.

52

=) V =1

C

i� V

R

�=) x =

1

c

[F � kx]

Mechanical system Electrical system

F 1/c x

-k/c

y i 1/C V

-1/RC

y

Block diagram representation

Page 53: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

System dynamics: state interactions

Static gain of the mechanical and electrical systems?

53

=) V =1

C

i� V

R

�=) x =

1

c

[F � kx]

Mechanical system Electrical system

Input0

1

Output

0

?

Page 54: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

System dynamics: state interactions

Static gain of the mechanical and electrical systems?

54

=) V =1

C

i� V

R

�=) x =

1

c

[F � kx]

Mechanical system Electrical system

Steady-state: x = 0

x =F

k

1

c

[F � kx] = 0

=)

Page 55: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

System dynamics: state interactions

Static gain of the mechanical and electrical systems?

The damper (resp. capacitor) only plays a dynamical role (no static effect).

55

=) V =1

C

i� V

R

�=) x =

1

c

[F � kx]

Mechanical system Electrical system

Steady-state: Steady-state: x = 0 V = 0

V = Ri

1

C

i� V

R

�= 0

x =F

k

1

c

[F � kx] = 0

=) =)

Page 56: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

System dynamics: mathematical representation

The dynamics of a system are represented by ordinary differential equations (continuous) or difference equation (discrete) of the form

For linear systems, it writeswhere and are vectors, and and are matrices (dimensionality of the system).

56

x(t) = f(x(t), u(t)) x[n+ 1] = f(x[n], u[n])

x = Ax+Bu

x[n+ 1] = Ax[n] +Bu[n]

BAx u

Page 57: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

System dynamics: state interactions

Classical example : Newton’s second law of motion. State #1: position ( )State #2: speed ( )

57

F = mx

x2 = x

x1 = x

x1

x2

�=

0 10 0

� x1

x2

�+

0

1/m

�F

Page 58: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

System dynamics: state interactions

Classical example : Newton’s second law of motion. State #1: position ( )State #2: speed ( )

58

F = mx

x2 = x

x1 = x

x1

x2

�=

0 10 0

� x1

x2

�+

0

1/m

�F

Force affects speed (Input integration)

Speed affects position (state interactions)

Page 59: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

Outline

Mathematical modeling: basics and illustrations

System dynamics: static gain, input integration and state interactions (feedback)

System output: update function vs output function

59

Page 60: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

States are not always outputs of the system

Example: a series RC circuit in a black box but we cannot measure ! is the update function: it describes systems dynamics

60

R Vout

C

i

Vin

Vc =1

RC(Vin � Vc)

Vc

Vc =1

RC(Vin � Vc)

Page 61: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

States are not always outputs of the system

Example: a series RC circuit in a black box but we cannot measure ! Systems output? In terms of input and state: is the output function.

61

R Vout

C

i

Vin

Vc =1

RC(Vin � Vc)

Vc

y = VR = Vin � Vc

y = Vin � Vc

Page 62: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

States are not always outputs of the system

Example: a series RC circuit in a black box but we cannot measure ! update function output function

62

R Vout

C

i

Vin

Vc =1

RC(Vin � Vc)

Vc

Vc

=1

RC(V

in

� V c)

Vout

= Vin

� Vc

Page 63: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

General form of dynamical systems: state-space representation

63

A dynamical system is represented by its update function and its output function

For linear systems, it writeswhere , and are vectors,

, , and are matrices (dimensionality of the system).

x = f(x, u)

y = g(x, u)

x = Ax+Bu

y = Cx+Du

BA

x u y

DC

x[n+ 1] = Ax[n] +Bu[n]

y[n] = Cx[n] +Du[n]

x[n+ 1] = f(x[n], u[n])

y[n] = g(x[n], u[n])

Page 64: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

General form of dynamical systems: state-space representation

64

A dynamical system is represented by its update function and its output function

For linear systems, it writeswhere , and are vectors,

, , and are matrices (dimensionality of the system).

x = f(x, u)

y = g(x, u)

x = Ax+Bu

y = Cx+Du

BA

x u y

DC

x[n+ 1] = Ax[n] +Bu[n]

y[n] = Cx[n] +Du[n]

x[n+ 1] = f(x[n], u[n])

y[n] = g(x[n], u[n])

Page 65: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

Linear systems: A,B,C,D representation

Linear, time-invariant (LTI) dynamical systems can be represented in the formwhere describes how the dynamics of the system evolve (dynamics matrix) describes how the input influences the states (input matrix) describes how the states “are seen” in the output (output matrix). 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.

65

x = Ax+Bu

y = Cx+Du

BA

DC

Page 66: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

Linear systems: block diagram representation

66

Page 67: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

General form of dynamical systems

In this course, we will develop tools to analyze the behavior of dynamical systems.

In particular: stability, static behavior, dynamical behavior.

Input 0

1

Output #1

0

Output #2

0

K

Page 68: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

Why do we need general tools to analyze system dynamics? Illustration.

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.

Page 69: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

The logistic equation

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

69

Page 70: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

A discrete equivalent of the logistic equation: 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

70

Page 71: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

Dynamical behavior of the logistic map

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

71

Page 72: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

Dynamical behavior of the logistic map

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

72

Page 73: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

Dynamical behavior of the logistic map: chaos.

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

73

Page 74: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

Dynamical behavior of the logistic map: chaos.

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

74

Page 75: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

How can general tools help us analyze the behavior of dynamical systems?

Illustration: systems stability. Back to the spring-damper system .

if (classical spring): the spring acts against the movement, giving a stable steady-state to the position. negative feedback

if : the further the system is, the faster is goes away. the system will go away until the “negative spring” saturates. positive feedback

=) x =1

c

[F � kx]

k > 0

k < 0

Page 76: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

How can general tools help us analyze the behavior of dynamical systems?

Illustration: systems stability. Back to the spring-damper system .

if (classical spring): the spring acts against the movement, giving a stable steady-state to the position. negative feedback

if : the further the system is, the faster is goes away. the system will go away until the “negative spring” saturates. positive feedback

=) x =1

c

[F � kx]

k > 0

k < 0

Page 77: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

How can general tools help us analyze the behavior of dynamical systems?

Illustration: systems stability. Back to the spring-damper system .

if (classical spring): the spring acts against the movement, giving a stable steady-state to the position. negative feedback

if : the further the system is, the faster is goes away. the system will go away until the “negative spring” saturates. positive feedback

=) x =1

c

[F � kx]

k > 0

k < 0

Page 78: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

How can general tools help us analyze the behavior of dynamical systems?

In a linear system: no saturation Any positive feedback brings instability!

How to assess stability of a general linear system (1D): System is stable if .

a < 0x = ax+ bu

Page 79: Introduction to Signals and Systems Lecture #2 ... · In “state-space”, dynamical systems are modeled using difference equations (discrete domain) or differential equations (continuous

How can general tools help us analyze the behavior of dynamical systems?

In a linear system: no saturation Any positive feedback brings instability!

How to assess stability of a general linear system (1D): System is stable if .

How to assess stability of a general linear system (N-D): Multiple state-interactions: what are the feedbacks?N-feedback directions (eigenvectors of matrix ), each having its own amplitude (eigenvalues of ). The system is stable if (all feedbacks negative).

a < 0x = ax+ bu

x = Ax+Bu

R(eig(A)) < 0

AA