SYST0002 - General informations
Website: http://sites.google.com/site/gdrion25/teaching/syst0002
Contacts: Guillaume Drion - [email protected] Marie Wehenkel (teaching assistant) - [email protected]
Organization: 11 main lessons - Monday 10:45 to 12:45 9 tutorial sessions split in 4 groups - Monday 8:30 to 10:30 (room 1.97 of B28) - Monday 16:00 to 18:00 - Wednesday 9:00 to 11:00 - Friday 14:00 to 16:00
Theory and exercises follow the textbooks provided on the website (in French).The textbooks are the same as last year!
Schedule of the year
A1, A2, A3 and A4 correspond to 4 facultative assignments that could give you some bonus points.
Modeling and Analysis of SystemsLecture #1 - Introduction to Systems Modeling
Guillaume DrionAcademic year 2015-2016
So far, you have acquired most of the basic technical skills of an Engineer
Mathematical analysis
Ordinary differential equationsSeriesFourier transformConvolution Linear algebra
Matrix algebraDifference equationsPhysics
Laws of mechanicsLaws of electricity and electromagnetism
Informatics
AlgorithmsProgramming
Chemistry
Chemical reactionsOrganic chemistryThermodynamics
Numerical analysis
Numerical methodsOptimization
How will you apply these technical skills in a working environment?
Any project that you will be working on will require to combine the technical skills learned from various “disciplines”.
Linear algebra
Matrix algebraDifference equations
Informatics
AlgorithmsProgramming
Numerical analysis
Numerical methodsOptimization
Mathematical analysis
Ordinary differential equationsSeriesFourier transformConvolution
Physics
Laws of mechanicsLaws of electricity and electromagnetism
Chemistry
Chemical reactionsOrganic chemistryThermodynamics
The main goal of this course is to provide a general framework for the modeling, analysis, design and implementation of “systems”
SYSTEMS MODELING
AnalysisDesignImplementation
Linear algebra
Matrix algebraDifference equations
Informatics
AlgorithmsProgramming
Numerical analysis
Numerical methodsOptimization
Mathematical analysis
Ordinary differential equationsSeriesFourier transformConvolution
Physics
Laws of mechanicsLaws of electricity and electromagnetism
Chemistry
Chemical reactionsOrganic chemistryThermodynamics
Systems modeling in three courses
SYST0002: Modeling and analysis of systems: open loop. “Observing and analyzing the environment”
SYST0003: Linear control systems: closed loop. “Interacting with the environment”
SYST0017: Advanced topics in systems and control: goes further. (nonlinear systems, chaos, etc.)
SYSTEMInput Output
SYSTEMInput Output
CONTROLLER
Systems modeling in three courses
SYST0002: Modeling and analysis of systems: open loop. “Observing and analyzing the environment”
SYST0003: Linear control systems: closed loop. “Interacting with the environment”
SYST0017: Advanced topics in systems and control: goes further. (nonlinear systems, chaos, etc.)
SYSTEMInput Output
SYSTEMInput Output
CONTROLLER
Open loop systems modeling: analyzing the environment
Case study: cardiovascular physiology. Our system: heart + vessels + blood.
Question: how can the blood flow be continuous knowing that the heart generates pulses?
vs
Modeling the cardiovascular system
Measurements: pressure in the left ventricle LV (input) and in the Aorta Ao(output).
Modeling the cardiovascular system
Measurements: pressure in the left ventricle LV (input) and in the Aorta Ao(output).
LV: large variations. Ao: stays highly positive (between 80 and 120 mmHg).
InputOutput
LV and Ao pressure variations over time are signals.
Modeling the cardiovascular system
Pathology: some patients have higher systolic pressure with lower diastolic pressure. Why? (It happens mostly in older patients).
Answering this question is very important because these patients are prone to heart failures. What can we do to “fix” the problem?
Modeling the cardiovascular system: Otto Frank.
In 1899, german physiologist Otto Frank came up with a first mathematical representation of the LV-Ao system: the Windkessel Model.
We will use this example to introduce the different ways to model a system
1. Find an equivalent representation of the system under study (Ch2, Ch3)
2. Put system into equations (Ordinary Differential Equations or Difference Equations)
• State-space representation (Ch2-3-4)
3. Extract system input/output properties (Laplace/Fourier or z-transform) (Ch 5-6)
• Transfer function (Ch7)
• System analysis (effects of changes in parameters?) (Ch8-9-10)
Modeling scheme
1. Find an equivalent representation of the system under study
2. Put system into equations (Ordinary Differential Equations or Difference Equations)
• State-space representation
3. Extract system input/output properties (Laplace/Fourier transform or z-transform)
• Transfer function
• System analysis (effects of changes in parameters?)
Find an equivalent representation of the system under study
Linear algebra
Matrix algebraDifference equations
Informatics
AlgorithmsProgramming
Numerical analysis
Numerical methodsOptimization
Mathematical analysis
Ordinary differential equationsSeriesFourier transformConvolution
Physics
Laws of mechanicsLaws of electricity and electromagnetism
Chemistry
Chemical reactionsOrganic chemistryThermodynamics
Equivalent representation of the left ventricle-aorta (LV-Ao) system
Otto Frank took advantage of the water circuit analogy to electric circuit.
Left ventricle
Aortic valve (r)
Aorta
Arterial compliance (Ca)
Peripheryvessels
(R1, R2, ..., Rn)
r
RCaP(t)
u(t)
PCa(t)Pr(t)
Equivalent representation of the left ventricle-aorta (LV-Ao) system
Otto Frank took advantage of the water circuit analogy to electric circuit.
Left ventricle
Aortic valve (r)
Aorta
Arterial compliance (Ca)
Peripheryvessels
(R1, R2, ..., Rn)
r
RCaP(t)
u(t)
PCa(t)Pr(t)
The 3-Element Windkessel model - Circuit diagram
1. Equivalent circuit of the LV-Ao system
Left ventricle
Aortic valve (r)
Aorta
Arterial compliance (Ca)
Peripheryvessels
(R1, R2, ..., Rn)
r
RCaP(t)
u(t)
PCa(t)Pr(t)
The 3-Element Windkessel model - Circuit diagram
1. Equivalent circuit of the LV-Ao system
Left ventricle
Aortic valve (r)
Aorta
Arterial compliance (Ca)
Peripheryvessels
(R1, R2, ..., Rn)
r
RCaP(t)
u(t)
PCa(t)Pr(t)
The 3-Element Windkessel model - Circuit diagram
1. Equivalent circuit of the LV-Ao system
Left ventricle
Aortic valve (r)
Aorta
Arterial compliance (Ca)
Peripheryvessels
(R1, R2, ..., Rn)
r
RCaP(t)
u(t)
PCa(t)Pr(t)
The 3-Element Windkessel model - Circuit diagram
1. Equivalent circuit of the LV-Ao system
r
RCaP(t)
u(t)
PCa(t)Pr(t)
The 3-Element Windkessel model - Circuit diagram
1. Equivalent circuit of the LV-Ao system
Modeling scheme
1. Find an equivalent representation of the system under study
2. Put system into equations (Ordinary Differential Equations or Difference Equations)
• State-space representation
3. Extract system input/output properties (Laplace/Fourier transform or z-transform)
• Transfer function
• System analysis (effects of changes in parameters?)
The 3-Element Windkessel model - Circuit diagram
2. Mathematical description of the dynamical system: ordinary differential equations
r
RCaP(t)
u(t)
PCa(t)Pr(t)
The 3-Element Windkessel model - ODE’s
2. Mathematical description of the dynamical system: ordinary differential equations
Kirchhoff’s voltage law:
r
RCaP(t)
u(t)
PCa(t)Pr(t)
P(t) = Pr (t) + PCa(t) = ru(t) + PCa
(t)
The 3-Element Windkessel model - ODE’s
2. Mathematical description of the dynamical system: ordinary differential equations
Kirchhoff’s current law:
Kirchhoff’s voltage law:
r
RCaP(t)
u(t)
PCa(t)Pr(t)
P(t) = Pr (t) + PCa(t) = ru(t) + PCa
(t)
u(t) = iCa(t) + ir (t) = Ca
dPCa(t)
dt+
PCa(t)
R
The 3-Element Windkessel model - ODE’s
2. Mathematical description of the dynamical system: ordinary differential equations
r
RCaP(t)
u(t)
PCa(t)Pr(t)
P(t) = ru(t) + PCa(t)
Ca
dPCa(t)
dt+
PCa(t)
R= u(t)
The 3-Element Windkessel model - ODE’s
r
RCaP(t)
u(t)
PCa(t)Pr(t)
P(t) = ru(t) + PCa(t)
Ca
dPCa(t)
dt+
PCa(t)
R= u(t)
2. Mathematical description of the dynamical system: ordinary differential equations
Elements that vary over time are called variables. Ex: PCa (t)
Elements that are fixed are called parameters. Ex: r, R, Ca
u(t) is the input (commonly used),P(t) is the output.
The 3-Element Windkessel model - Simulation
2A. Validation of the model: simulation (ex: matlab)
u(t)
P(t)
r
RCaP(t)
u(t)
PCa(t)Pr(t)
P(t) = ru(t) + PCa(t)
Ca
dPCa(t)
dt+
PCa(t)
R= u(t)
The 3-Element Windkessel model - State-space
2B. State-space canonical representation
Linear, time-invariant (LTI) dynamical systems can be represented in the form
y = Cx + Du
x = Ax + Bu
where A is the dynamics matrix,
B is the input matrix,
C the output matrix,
D the feedthrough matrix.
Linear: the output is a linear function of the input (not y = x2 for instance)
Time-invariant: parameters do not change over time. (A, B, C and D does not depend on time). Here: the values of r, R and Ca are fixed.
The 3-Element Windkessel model - State-space
2B. State-space canonical representation
y = Cx + Du
x = Ax + Bu
where A is the dynamics matrix,
B is the input matrix,
C the output matrix,
D the feedthrough matrix.
P(t) = PCa(t) + ru(t)
dPCa(t)
dt= −
1
RCa
PCa(t) +
1
Ca
u(t)
Linear, time-invariant (LTI) dynamical systems can be represented in the form
Linear: the output is a linear function of the input (not y = x2 for instance)
Time-invariant: parameters do not change over time. (A, B, C and D does not depend on time). Here: the values of r, R and Ca are fixed.
The 3-Element Windkessel model - State-space
2B. State-space canonical representation
y = Cx + Du
x = Ax + Bu
where A is the dynamics matrix,
B is the input matrix,
C the output matrix,
D the feedthrough matrix.
P(t) = PCa(t) + ru(t)
x(t) = PCa(t), y(t) = P(t)
A = −
1
RCa
,B =1
Ca
,C = 1,D = r
dPCa(t)
dt= −
1
RCa
PCa(t) +
1
Ca
u(t)
Linear, time-invariant (LTI) dynamical systems can be represented in the form
Linear: the output is a linear function of the input (not y = x2 for instance)
Time-invariant: parameters do not change over time. (A, B, C and D does not depend on time). Here: the values of r, R and Ca are fixed.
The 3-Element Windkessel model - State-space
A - the dynamics matrix
y = Cx + Du
x = Ax + Bu x(t) = PCa(t), y(t) = P(t)
A = −
1
RCa
,B =1
Ca
,C = 1,D = r
u is the input of the system, y is the output. What is x?
x is called a state. A state describes the internal dynamics of the system.Hence the name state-space representation.
The matrix A describes how the states influence themselves (x = Ax), and therefore describes how the dynamics of the system evolve (dynamics matrix).
The 3-Element Windkessel model - State-space
B - the input matrix
y = Cx + Du
x = Ax + Bu x(t) = PCa(t), y(t) = P(t)
A = −
1
RCa
,B =1
Ca
,C = 1,D = r
The input not only directly affects the output of the system, but also affects the internal states.
The matrix B describes how the input influence the states (x = Bu) (input matrix).
The 3-Element Windkessel model - State-space
C - the output matrix
y = Cx + Du
x = Ax + Bu x(t) = PCa(t), y(t) = P(t)
A = −
1
RCa
,B =1
Ca
,C = 1,D = r
The output of a system is mostly shaped by its internal states.
The matrix C describes how the states are seen in the output (y = Cx) (output matrix).
The 3-Element Windkessel model - State-space
D - the feedthrough matrix
y = Cx + Du
x = Ax + Bu x(t) = PCa(t), y(t) = P(t)
A = −
1
RCa
,B =1
Ca
,C = 1,D = r
Some part of the input might also affect the output without “being affected” by the dynamics of the system.
The matrix D describes how the input directly influence the output (y = Du) (feedthrough matrix).
Why is the state-space representation important?
Isolation of the internal states (dimensionality of the system)
Analysis of key features of the system: stability, reachability, observability, etc.
Construction of a block diagram
Analysis in the frequency domain
y = Cx + Du
x = Ax + Bu
Block diagrams
INT
Display Control
Graphics Engine
TFT LCD Display
Proc & Mem I/F
SD/MMC
I/F
Audio Codec Camera
WLAN
Power Conv.
Battery
Keyboard/ Touchpad
USB PHY
DDR3512 MB
CMOS Camera
I/FI2S Audio
I/F
SD Card Slot
SPI I/F
Display Control
USB Ports
ARM
ARMADA610
TCON
IO3731
Security CPU
ARM
SDRAM
CPU
SDIOI/F
I2C I/F
SD/MMC
I/F
NAND FlashInternal SD
Accelerometer
USB Hub
32b
18b
8bI2C
Input Buttons GPIO
OneWire
FlashROM
FlashROM
SPI
PS2 (x2)
SPI
Open Firmware
XO-1.75 Block Diagram7/04/11
SPI I/FSPI
TWSI2
TWSI1
I2S
SSP1
SSP3
CCIC1
MMC2
MMC1
MMC3
I2C I/FGPIO
CMDACK
INT
INT
Always powered
Powered in idle and run
Optionally powered
EC
NAND Flash4GB eMMC
OR
USB
SPI I/FGPIO
Battery Charger
DC Input
Wikipedia: A block diagram is a diagram of a system in which the principal parts or functions are represented by blocks connected by lines that show the relationships of the blocks.
The 3-Element Windkessel model - Block diagram
2B. State-space canonical representation
y = Cx + Du
x = Ax + Bu
Block diagram representation (ex: implementation in Simulink)
x(t) = PCa(t), y(t) = P(t)
A = −
1
RCa
,B =1
Ca
,C = 1,D = r
+u(t) 1Ca
X(t) X(t)+
-1RCa
r
y(t)
Linear, time-invariant (LTI) dynamical systems can be represented in the form
Back to our case study
Questions:
How can the blood flow be continuous knowing that the heart generates pulses?
Some patients have higher systolic pressure with lower diastolic pressure. Why?
y = Cx + Du
x = Ax + Bu x(t) = PCa(t), y(t) = P(t)
A = −
1
RCa
,B =1
Ca
,C = 1,D = r
Modeling scheme
1. Find an equivalent representation of the system under study
2. Put system into equations (Ordinary Differential Equations or Difference Equations)
• State-space representation
3. Extract system input/output properties (Laplace/Fourier transform or z-transform)
• Transfer function
• System analysis (effects of changes in parameters?)
Frequency domain: introduction
You have seen the Fourier transform in mathematical analysis.
In this course, we will use the Fourier transform, and others such as the Laplace transform (continuous time) and z-transform (discrete time) to move from the time domain to the frequency domain.
where ω is an angular frequency (rad/s).
Frequency domain: introduction
You have seen the Fourier transform in mathematical analysis.
In this course, we will use the Fourier transform, and others such as the Laplace transform (continuous time) and z-transform (discrete time) to move from the time domain to the frequency domain.
where ω is an angular frequency (rad/s).
Frequency domain: introduction
The idea is to decompose a signal into the frequencies that compose it and analyze how a system transmit/transform these frequencies.
Example: a 5Hz sine wave
Frequency domain: introduction
The idea is to decompose a signal into the frequencies that compose it and analyze how a system transmit/transform these frequencies.
Low frequency High frequency
Frequency domain: Fourier transform vs Laplace transform
Fourier transform
where ω is an angular frequency (rad/s).
Laplace transform
where s is the complex frequency s = σ + jω.
Why working in the frequency domain?
Many advantages, here is one of them:
Time domain Frequency domain
The 3-Element Windkessel model - Transfer function
3. Input/output properties: transfer function (frequency domain via Laplace transform)
Idea: describe the system through a simple function that characterizes the way it affects an input U(s)
“s” is the complex number frequency (s = σ+jω). If σ=0: Fourier transform!
U(s) H(s) Y(s) and
The 3-Element Windkessel model - Transfer function
3. Input/output properties: transfer function (frequency domain via Laplace transform)
U(s) H(s) Y(s)
Idea: describe the system through a simple function that characterizes the way it affects an input U(s)
“s” is the complex number frequency (s = σ+jω). If σ=0: Fourier transform!
There are different ways to compute the transfer function of a system. However, it is convenient to start from the canonical state-space representation (if available)
y = Cx + Du
x = Ax + Bu
which gives
H(s) =Y (s)
U(s)= C (sI − A)−1
B + D (see next slide)
and
The 3-Element Windkessel model - Transfer function
Transfer function from state-space representation:
which gives
and therefore
(1)
(2)
(1)
(1) (2)
The 3-Element Windkessel model - Transfer function
3. Input/output properties: transfer function (frequency domain via Laplace transform)
Transfer function of the 3-Element Windkessel model ( )
H(s) =Y (s)
U(s)= C (sI − A)−1
B + D
A = −
1
RCa
,B =1
Ca
,C = 1,D = r
The 3-Element Windkessel model - Transfer function
H(s) =Y (s)
U(s)= C (sI − A)−1
B + D
3. Input/output properties: transfer function (frequency domain via Laplace transform)
Transfer function of the 3-Element Windkessel model ( )A = −
1
RCa
,B =1
Ca
,C = 1,D = r
= 1(s +1
RCa
)−11
Ca
+ r
The 3-Element Windkessel model - Transfer function
H(s) =Y (s)
U(s)= C (sI − A)−1
B + D
3. Input/output properties: transfer function (frequency domain via Laplace transform)
Transfer function of the 3-Element Windkessel model ( )A = −
1
RCa
,B =1
Ca
,C = 1,D = r
= 1(s +1
RCa
)−11
Ca
+ r
=R
RCas + 1+ r
The 3-Element Windkessel model - Transfer function
H(s) =Y (s)
U(s)= C (sI − A)−1
B + D
≡
K
τs + 1+ r => Low pass filter! (r<< physiologically)
K=R: gain τ=RCa: time constant ωc=1/τ: cutoff frequency
3. Input/output properties: transfer function (frequency domain via Laplace transform)
Transfer function of the 3-Element Windkessel model ( )A = −
1
RCa
,B =1
Ca
,C = 1,D = r
=R
RCas + 1+ r
= 1(s +1
RCa
)−11
Ca
+ r
The transfer function of the Windkessel model helps making predictions on the potential effects of physiological and/or pathological conditions on blood pressure
Low frequency High frequency
Low pass filter
τ = RCa
H(s) =R
RCas + 1+ r
The transfer function of the Windkessel model helps making predictions on the potential effects of physiological and/or pathological conditions on blood pressure
Pathology: some patients have higher systolic pressure with lower diastolic pressure. Why? (It happens mostly in older patients).
The transfer function of the Windkessel model helps making predictions on the potential effects of physiological and/or pathological conditions on blood pressure
Pathology: some patients have higher systolic pressure with lower diastolic pressure. Why? (It happens mostly in older patients).
Loss of low-pass filtering properties
The transfer function of the Windkessel model helps making predictions on the potential effects of physiological and/or pathological conditions on blood pressure
Pathology: some patients have higher systolic pressure with lower diastolic pressure. Why? (It happens mostly in older patients).
Loss of low-pass filtering properties
Low pass filter
τ = RCa
H(s) =R
RCas + 1+ r
The transfer function of the Windkessel model helps making predictions on the potential effects of physiological and/or pathological conditions on blood pressure
Atherosclerosis: loss of arterial compliance => Ca decreases => τ=RCa decreases
τ = RCa
Low pass filter
H(s) =R
RCas + 1+ r
Modeling the cardiovascular system: conclusion
The vascular system acts as a low-pass filter, following slow heart movements but filtering fast heart movements.
This allows to maintain a rather constant blood flow in the system.
InputOutput
Modeling scheme
1. Find an equivalent representation of the system under study
2. Put system into equations (Ordinary Differential Equations or Difference Equations)
• State-space representation
3. Extract system input/output properties (Laplace/Fourier transform or z-transform)
• Transfer function
• System analysis (effects of changes in parameters?)
Highlights of the day
1. Signals: continuous, discrete, domain, image.
2. Systems: open loop, closed loop, variables, parameters, inputs, outputs, states, modeling (ODEs or Difference Equations), simulation.
3. State-space representation: linear time-invariant (LTI) systems, “A, B, C, D” representation, block diagrams.
4. Frequency domain: Transforms, transfer functions.
5. Modeling scheme