Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
9 views

L1 Modeling State Space

This document provides an outline for a lecture on modeling and the state-space representation. The lecture will introduce basic concepts of modeling and simulation such as different types of mathematical models including dynamic vs steady-state and lumped-parameter vs distributed-parameter models. It will then cover the state-space representation, explaining concepts like inputs, parameters, states, and outputs. The lecture will discuss writing models in state-space form and visualizing the solution of state-space models, and will cover whether models are linear or time-invariant.

Uploaded by

Viktor Snoeckx
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

L1 Modeling State Space

This document provides an outline for a lecture on modeling and the state-space representation. The lecture will introduce basic concepts of modeling and simulation such as different types of mathematical models including dynamic vs steady-state and lumped-parameter vs distributed-parameter models. It will then cover the state-space representation, explaining concepts like inputs, parameters, states, and outputs. The lecture will discuss writing models in state-space form and visualizing the solution of state-space models, and will cover whether models are linear or time-invariant.

Uploaded by

Viktor Snoeckx
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 57

Lecture 1:

Introduction to modeling &


the state-space representation
Dominik Bongartz

Systems Analysis of Chemical Processes – H06T4A


Lecture Outline: Systems Analysis of Chemical Processes

Part 1: Time domain 1.1: Modeling & simulation – basic concepts


L1: Modeling & state-space representation

L2: Linear algebra review


1.2: The state-space representation
L3: Analytical solution of linear systems

L4: Steady states & stability of linear systems

L5: Nonlinear systems


1.3: Constructing state-space models
Part 2: Frequency domain
L6: The Laplace transformation

L7: The transfer function

L8: Gain, poles, & zeros of transfer functions

L9: Graphical representation of transfer functions

L10: Common transfer functions

2
Part 1.1:
Modeling & Simulation –
Basic Concepts

3
Intended Learning Outcomes

After this lecture part, you….

• know the definitions of basic terms in modeling and simulation

• can explain the differences between common types of mathematical models

• can give examples for when to use which models

4
Model?

Definition: Model
To a person P, an object M is a model of an object O
to the extent that P can use M to answer questions that interest them about O. à Depends on goal!
M. Minksy (1965), Matter, mind and models.

Our focus
Mathematical models:

( 𝑡 ) , 𝑢 (𝑡 ))
𝑓 (𝑥
̇𝑥 (𝑡) = 𝑥 , (𝑡) 𝑢(𝑡))
ℎ(
𝑦 (𝑡 ) =
𝜕𝑇 𝜕 !𝑇
𝜕𝑡 = 𝑘 𝜕𝑥 !

𝑦 = 𝐴𝑥

Pictures: Wikimedia commons

5
Simulation?

Definition: Simulation
Simulation is the process of designing a model of a real system and conducting experiments with this model
for the purpose either of understanding the behavior of the system and its underlying causes
or of evaluating various designs of an artificial system or strategies for the operation of the system.
R.E. Shannon (1975), Systems simulation: The art and science.

System of interest Mathematical model Simulation result Understanding


𝑥"
Simulation
Modeling experiment Interpretation
𝑥(𝑡)
̇ = 𝑓(𝑥(𝑡), 𝑢(𝑡))
“come up with
𝑦(𝑡) = ℎ(𝑥, (𝑡) 𝑢(𝑡)) “solve the “what does
𝑥!
the quantities equations to that tell us
and equations get values for about our
describing our the quantities system?”
system” involved”

6
Types of Mathematical Models
Our focus
Dynamic Steady-state
models models

Quantities describing the system Quantities describing the system


are functions of time are constant over time
Often contain differential equations Often only algebraic (“normal”) equations
Especially important, e.g., for Can be a useful approximation, e.g., for
• batch processes • designing flow processes
• changing boundary conditions • things that change very slowly
• control! (catalyst degradation, …)
𝑥"

𝑥"

𝑥!
𝑥!

7
Types of Mathematical Models
Our focus
Distributed-parameter Lumped-parameter
models models

Quantities describing the system Quantities describing the system


are functions of space are constant throughout space
Partial differential equations Ordinary differential equations
or differential-algebraic equations
May be needed, e.g., when Often sufficient for
analyzing the design of a reactor,
• analyzing whole processes
heat exchanger, … • control

𝑥"

𝑥!

𝑡 = 0𝑠 𝑡 = 1𝑠

Reactor picture: www.comsol.com

8
Types of Mathematical Models
Our focus
Continuous Discrete
models models

Quantities are continuous Quantities only take discrete values


functions of time and/or change only at certain time points
and/or change at pre-defined events
and/or equations change (!)

Sufficient for most applications Can be useful, e.g., for


• modeling opening a closed valve
• data measured at given time points
𝑥"

𝑥!

9
Intended Learning Outcomes

After this lecture part, you….

ü know the definitions of basic terms in modeling and simulation

ü can explain the differences between common types of mathematical models

ü can give examples for when to use which models

10
Part 1.2:
The State-Space Representation

11
Intended Learning Outcomes

After this lecture part, you….

• can explain the concepts of inputs, parameters, states, and outputs

• can write down the general forms of models in state-space representation

• know ways to visualize the solution of state-space models

• can recognize whether a model is linear or time-invariant

12
Quantities in State-Space Models

System
“Degrees of freedom”, Inputs Outputs “Dependent variables”,
values need to be known values can be computed
to conduct a simulation from the model equations
experiment
𝑢" (𝑡) 𝑦" (𝑡)
𝑢 𝑡 = ⋮ ∈ ℝ#" 𝑦 𝑡 = ⋮ ∈ ℝ##
𝑢#" (𝑡) Parameters States / state variables 𝑦## (𝑡)
𝑝" 𝑥" (𝑡)
• Control inputs (adjusted by 𝑝= ⋮ ∈ ℝ#! ⋮
𝑥 𝑡 = ∈ ℝ#$ • Measured variables
process operator) 𝑝#! 𝑥#$ (𝑡) • Controlled variables (things we
• Disturbances (determined want to keep at certain values)
by environment)
• Constant over time, • Describe state of the system
e.g. reactor volume, (“what does the system
molar masses, … currently look like”?), e.g.,
temperature, mole fractions, …

• 𝑛$ = 𝑛% = 1 : Single Input Single Output (SISO) system


• 𝑛$ , 𝑛% > 1: Multiple Input Multiple Output (MIMO) system

13
Continuous Models in State-Space Representation

𝑑𝑥"
(𝑡)
𝑑𝑥 𝑑𝑡
𝑥̇ 𝑡 ≔ (𝑡) = ⋮
𝑑𝑡 𝑑𝑥#$
(𝑡)
𝑑𝑡
𝑥̇ 𝑡 = 𝑓 𝑥 𝑡 , 𝑢 𝑡 , 𝑡, 𝑝 state equations, dynamics
𝑦 𝑡 = ℎ 𝑥 𝑡 , 𝑢 𝑡 , 𝑡, 𝑝 output equations
𝑥 0 = 𝑥& initial conditions

Once 𝑢(𝑡), 𝑝, and 𝑥& are fixed, these initial values Once 𝑥 𝑡 has been computed, easy
are differential equations with initial to obtain 𝑦(𝑡): just evaluate the right-
conditions (= initial value problem) hand side, no equation to solve
à Can be solved for 𝑥(𝑡)

14
Visualizing Solutions of State-Space Models

State-space model Simulation result / solution


Conduct simulation
𝑥̇ 𝑡 = 𝑓 𝑥 𝑡 , 𝑢 𝑡 , 𝑡, 𝑝
?
experiment:
𝑥 𝑡 ,𝑦 𝑡
𝑦 𝑡 = ℎ 𝑥 𝑡 , 𝑢 𝑡 , 𝑡, 𝑝 Fix values for
𝑢(𝑡), 𝑝, and 𝑥!
𝑥 0 = 𝑥& and solve the Visualize
model equations

Option 1: Plot states (or outputs) over time Option 2: Plot trajectory in state space

15
More Examples for Visualization in the State Space

Example system with 𝑛' = 3 Example system with 𝑛' = 2

à Trajectories from multiple initial values: „phase portrait“

16
Classification of State-Space Models: Time Invariance

Time-variant Time-invariant
model model

𝑥̇ 𝑡 = 𝑓 𝑥 𝑡 , 𝑢 𝑡 , 𝒕, 𝑝 𝑥̇ 𝑡 = 𝑓 𝑥 𝑡 , 𝑢 𝑡 , 𝑝
𝑦 𝑡 = ℎ 𝑥 𝑡 , 𝑢 𝑡 , 𝒕, 𝑝 𝑦 𝑡 = ℎ 𝑥 𝑡 ,𝑢 𝑡 ,𝑝
𝑥 0 = 𝑥& 𝑥 0 = 𝑥&

à Time occurs explicitly on right-hand sides à Time does not occur explicitly on right-hand sides

Examples:

𝑥̇ " 𝑡 = 𝑥" 𝑡 ! + 𝒕 ⋅ 𝑥! 𝑡 𝑥̇ " 𝑡 = 𝑥" 𝑡 ! + 𝟐 ⋅ 𝑥! 𝑡


𝑥̇ ! 𝑡 = −𝑥" 𝑡 + 𝑝" ⋅ 𝑢(𝑡) 𝑥̇ ! 𝑡 = −𝑥" 𝑡 + 𝑝" ⋅ 𝑢(𝑡)
𝑦 𝑡 = 𝑝! ⋅ 𝑥" 𝑡 𝑦 𝑡 = 𝑝! ⋅ 𝑥" 𝑡 )

17
Classification of State-Space Models: Time Invariance – Effect

Time invariant model à for given initial values and inputs, we always get the same response (i.e., 𝑥(𝑡), 𝑦(𝑡))

Example: input shifted in time leads to same output, but also shifted in time

𝑢(") (𝑡) 𝑦 (") (𝑡)


𝑢! 𝑡
= 𝑢(") (𝑡 − 𝜏)
𝜏 𝜏 𝑦 (!) 𝑡
= 𝑦 (") (𝑡 − 𝜏)

18
19 Faculty, department, unit ...
Classification of State-Space Models: Linearity

Nonlinear Linear
model model

𝑥̇ 𝑡 = 𝑓 𝑥 𝑡 , 𝑢 𝑡 , 𝑡, 𝑝 𝑥̇ 𝑡 = 𝐴 𝑝, 𝑡 𝑥 𝑡 + 𝐵 𝑝, 𝑡 𝑢(𝑡)
𝑦 𝑡 = ℎ 𝑥 𝑡 , 𝑢 𝑡 , 𝑡, 𝑝 𝑦 𝑡 = 𝐶 𝑝, 𝑡 𝑥 𝑡 + 𝐷 𝑝, 𝑡 𝑢(𝑡)
𝑥 0 = 𝑥& 𝑥 0 = 𝑥&

à 𝑓 or ℎ nonlinear functions of x(t) or u(t) à 𝑓 or ℎ linear functions of x(t) and u(t)


à 𝐴, 𝐵, 𝐶, 𝐷 known matrices (for given 𝑝 and 𝑡)

Examples:

𝑥̇ " 𝑡 = 𝑥" 𝑡 𝟐 + 𝒙" (𝒕) ⋅ 𝒙𝟐 𝒕 𝑥̇ " 𝑡 = 𝑥" 𝑡 + 𝑥! 𝑡


𝑥̇ ! 𝑡 = −𝑥" 𝑡 + 𝑢 𝑡 + 𝟓 𝑥̇ ! 𝑡 = −𝑥" 𝑡 + 𝑢 𝑡
𝑦 𝑡 = 𝑥" 𝑡 + 𝑥! (𝑡) 𝑦 𝑡 = 𝑥" 𝑡 + 𝑥! (𝑡)

20
Classification of State-Space Models: Linear Time-Invariant Models (“LTI models”)

𝑥̇ 𝑡 = 𝐴 𝑝 𝑥 𝑡 + 𝐵 𝑝 𝑢(𝑡)
𝑦 𝑡 = 𝐶 𝑝 𝑥 𝑡 + 𝐷 𝑝 𝑢(𝑡)
𝑥 0 = 𝑥&

à 𝑓 or ℎ linear functions of x(t) and u(t)


à 𝐴, 𝐵, 𝐶, 𝐷 known matrices that do not depend on 𝑡

• 𝐴: system matrix / state-dynamics matrix, 𝑛' ×𝑛'


• 𝐵: input matrix, 𝑛' ×𝑛$
• 𝐶: output matrix, 𝑛% ×𝑛'
• 𝐷: throughput matrix, 𝑛% ×𝑛$

21
Classification of State-Space Models: Overview

nonlinear linear

𝑥̇ 𝑡 = 𝑓 𝑥 𝑡 , 𝑢 𝑡 , 𝒕, 𝑝 𝑥̇ 𝑡 = 𝐴 𝑝, 𝒕 𝑥 𝑡 + 𝐵 𝑝, 𝒕 𝑢(𝑡)
time-variant 𝑦 𝑡 = ℎ 𝑥 𝑡 , 𝑢 𝑡 , 𝒕, 𝑝 𝑦 𝑡 = 𝐶 𝑝, 𝒕 𝑥 𝑡 + 𝐷 𝑝, 𝒕 𝑢(𝑡)
𝑥 0 = 𝑥& 𝑥 0 = 𝑥&

Our focus (mostly)


𝑥̇ 𝑡 = 𝑓 𝑥 𝑡 , 𝑢 𝑡 , 𝑝 𝑥̇ 𝑡 = 𝐴 𝑝 𝑥 𝑡 + 𝐵 𝑝 𝑢(𝑡)
time-invariant 𝑦 𝑡 = ℎ 𝑥 𝑡 ,𝑢 𝑡 ,𝑝 𝑦 𝑡 = 𝐶 𝑝 𝑥 𝑡 + 𝐷 𝑝 𝑢(𝑡)
𝑥 0 = 𝑥& 𝑥 0 = 𝑥&

22
23 Faculty, department, unit ...
24 Faculty, department, unit ...
Intended Learning Outcomes

After this lecture part, you….

ü can explain the concepts of inputs, parameters, states, and outputs

ü can write down the general forms of models in state-space representation

ü know ways to visualize the solution of state-space models

ü can recognize whether a model is linear or time-invariant

25
Part 1.3:
Constructing State-Space Models

26
Intended Learning Outcomes

After this lecture part, you….

• know a basic strategy for constructing continuous dynamic models

• can transform certain differential-algebraic equations to state-space models

• can transform higher-order differential equations to state-space models

27
Modeling Strategy: Constructing Continuous Dynamic Models

1. Identify suitable subsystems & interfaces

2. For each subsystem, set up balances and further equations

3. Set up equations connecting subsystems

28
Modeling Strategy, Step 1: Identify Subsystems & Interfaces

System

Connections

System
components

29
Modeling Strategy, Step 1: Identify Subsystems & Interfaces

System

(Sub)system Interfaces

30
Modeling Strategy, Step 1: Identify Subsystems & Interfaces

System
Decomposition

(Sub)system

Elementary system

𝑥̇ 𝑡 = …

31
Modeling Strategy, Step 1: Identify Subsystems & Interfaces

System

• Why decompose into subsystems?


• More manageable to describe with equations
• Reusability of models!
Decomposition

Aggregation
(Sub)system • When to stop with decomposition? What makes a
good elementary system?
• Storage of material or energy
• Sufficiently homogeneous, i.e., can describe
with one / few temperatures, mole fractions, …

Elementary system • Later: put models back together

𝑥̇ 𝑡 = …

32
Modeling Strategy, Step 1: Identify Subsystems & Interfaces – Example: Methanol Producion

Picture: www.clariant.com

33
Modeling Strategy, Step 1: Identify Subsystems & Interfaces – Example: Methanol Producion
Synthesis loop

Purge

Feed preparation

Synthesis gas
(H2, CO, CO2)
Product purification

Methanol

Material flow
Power input
Water
Heat flow

34
Modeling Strategy, Step 1: Identify Subsystems & Interfaces – Example: Methanol Producion
Synthesis loop

Feed preparation

Synthesis gas
(H2, CO, CO2)
Product purification

Methanol

Material flow
Power input
Water
Heat flow

35
Modeling Strategy, Step 2: Balances & Other Equations

Step 2a: Balances (thermodynamics) Rate of change of Ψ in control volume =


inflow of Ψ
Control volume
– outflow of Ψ
Extensive quantity Ψ + internal generation of Ψ
– internal consumption of Ψ
Flows of Ψ into / out of
control volume
Suitable quantities Ψ:
• Material: overall mass / amount of substance (moles),
Generation / consumption of Ψ in control volume individual chemical species masses / amounts
• Energy

36
Modeling Strategy, Step 2: Balances & Other Equations

Step 2a: Balances (thermodynamics) Rate of change of Ψ in control volume =


inflow of Ψ
Control volume
– outflow of Ψ
Extensive quantity Ψ + internal generation of Ψ
– internal consumption of Ψ
Flows of Ψ into / out of
control volume
Suitable quantities Ψ:
• Material: overall mass / amount of substance (moles),
Generation / consumption of Ψ in control volume individual chemical species masses / amounts
• Energy

Step 2b: Other equations (thermodynamics, transport, kinetics, …)

Goal: link Ψ, inflow / outflow, generation / consumption to other quantities


Examples:
• Equations of state (ideal gas, …)
• Equations describing outflow through valve
• Arrhenius law (reaction rate constant as function of temperature)

37
Modeling Strategy, Step 2: Balances & Other Equations – Example: Blending Process

Step 2a: Balances


Inflow component 𝐴 Inflow component 𝐵
• Mass of component 𝐴:
𝑚̇ + 𝑡 = 𝐽+,- (𝑡) − 𝐽+./0 (𝑡)
Mass flow rate: Mass flow rate:
𝐽'() 𝐽*()
• Total mass (𝐴+𝐵):
𝑚̇ t = 𝐽+,- 𝑡 + 𝐽1,- 𝑡 − 𝐽./0 (𝑡)

Outflow

Mass flow rates:


𝐽'+,-
𝐽+,- (= 𝐽'+,- + 𝐽*+,- )

Goal: Predict mass fraction of 𝐴 in the outflow, 𝑦+./0 (t)

38
Modeling Strategy, Step 2: Balances & Other Equations – Example: Blending Process

Step 2a: Balances


Inflow component 𝐴 Inflow component 𝐵
• Mass of component 𝐴:
𝑚̇ + 𝑡 = 𝐽+,- (𝑡) − 𝐽+./0 (𝑡)
Mass flow rate: Mass flow rate:
𝐽'() 𝐽*()
• Total mass (𝐴+𝐵):
Fill level: 𝑚̇ t = 𝐽+,- 𝑡 + 𝐽1,- 𝑡 − 𝐽./0 (𝑡)
ℎ(𝑡)
Outflow Step 2b: Other equations
• Valve characteristic: 𝐽./0 𝑡 = R h t
Base area: 𝐴./01 Mass flow rates:
𝐽'+,- • Compute fill level: ℎ 𝑡 = 𝑚(𝑡)/(𝜌 𝐴2345 )
𝐽+,- (= 𝐽'+,- + 𝐽*+,- )
• Outflow of 𝐴: 𝐽+./0 𝑡 = 𝑦+./0 t 𝐽./0 (𝑡)

• Outflow same composition as tank: 𝑦+./0 t = y6 t


Goal: Predict mass fraction of 𝐴 in the outflow, 𝑦+./0 (t)
• Definition of mass fraction: 𝑦+ 𝑡 = 𝑚+ (𝑡)/𝑚(𝑡)

39
Modeling Strategy, Step 3: Equations Connecting Subsystems

System

(Sub)system 1 (Sub)system 2

40
Modeling Strategy, Step 3: Equations Connecting Subsystems

System

(Sub)system 1 (Sub)system 2

Typical:
• Outflow of subsystem 1 = inflow of subsystem 2
• Pressure at interface is equal in subsystems 1 and 2
• …

41
Modeling Strategy: What Have We Achieved?

1. Identify suitable subsystems & interfaces

2. For each subsystem, set up balances and further equations à We have a model! J
But is it a state-space model?

3. Set up equations connecting subsystems

Model consisting of
• Balances in subsystems à ordinary differential equations
• Other equations in subsystems à algebraic equations
• Equations connecting subsystems à algebraic equations

à Differential-Algebraic Equation (DAE) system – not a state-space model L

42
From Differential-Algebraic Equations to State-Space Models

1. Identify inputs, outputs, states & parameters

2. Eliminate remaining variables (if possible)

à can write in state-space representation

43
From Differential-Algebraic Equations to State-Space Models – Example

Blending process model (DAE): 𝐽'() 𝐽*()


𝑚̇ + 𝑡 = 𝐽+,- 𝑡 − 𝐽+./0 𝑡
𝑚̇ t = 𝐽+,- 𝑡 + 𝐽1,- 𝑡 − 𝐽./0 (𝑡)

𝐽./0 𝑡 = R h t ℎ(𝑡)
ℎ 𝑡 = 𝑚(𝑡)/(𝜌 𝐴2345 ) 𝐽'+,- , 𝐽+,-
𝐽+./0 𝑡 = 𝑦+./0 t 𝐽./0 (𝑡)
𝑦+./0 t = y6 t 𝐴./01
𝑦+ 𝑡 = 𝑚+ (𝑡)/𝑚(𝑡)

Parameters 𝑝

44
From Differential-Algebraic Equations to State-Space Models – Example

Blending process model (DAE): 𝐽'() 𝐽*()


𝑚̇ + 𝑡 = 𝐽+,- 𝑡 − 𝐽+./0 𝑡
𝑚̇ t = 𝐽+,- 𝑡 + 𝐽1,- 𝑡 − 𝐽./0 (𝑡)

𝐽./0 𝑡 = 𝐑 h t ℎ(𝑡)
ℎ 𝑡 = 𝑚(𝑡)/(𝝆 𝑨𝐛𝐚𝐬𝐞 ) 𝐽'+,- , 𝐽+,-
𝐽+./0 𝑡 = 𝑦+./0 t 𝐽./0 (𝑡)
𝑦+./0 t = y6 t 𝐴./01
𝑦+ 𝑡 = 𝑚+ (𝑡)/𝑚(𝑡)

;
Parameters 𝑝 = 𝑅, 𝜌, 𝐴2345
<
Inputs 𝑢(𝑡) = 𝐽+,- 𝑡 , 𝐽+./0 𝑡

45
From Differential-Algebraic Equations to State-Space Models – Example

Blending process model (DAE): 𝐽'() 𝐽*()


𝑚̇ + 𝑡 = 𝑱𝐢𝐧 ./0
𝑨 𝒕 − 𝐽+ 𝑡
𝑚̇ t = 𝑱𝐢𝐧 𝐢𝐧
𝑨 𝒕 + 𝑱𝑩 𝒕 − 𝐽
./0
(𝑡)

𝐽./0 𝑡 = R h t ℎ(𝑡)
ℎ 𝑡 = 𝑚(𝑡)/(𝜌 𝐴2345 ) 𝐽'+,- , 𝐽+,-
𝐽+./0 𝑡 = 𝑦+./0 t 𝐽./0 (𝑡)
𝑦+./0 t = y6 t 𝐴./01
𝑦+ 𝑡 = 𝑚+ (𝑡)/𝑚(𝑡)

;
Parameters 𝑝 = 𝑅, 𝜌, 𝐴2345
<
Inputs 𝑢 𝑡 = 𝐽+,- 𝑡 , 𝐽+./0 𝑡
Outputs 𝑦 𝑡

46
From Differential-Algebraic Equations to State-Space Models – Example

Blending process model (DAE): 𝐽'() 𝐽*()


𝑚̇ + 𝑡 = 𝐽+,- 𝑡 − 𝐽+./0 𝑡
𝑚̇ 𝑡 = 𝐽+,- 𝑡 + 𝐽1,- 𝑡 − 𝐽./0 (𝑡)

𝐽./0 𝑡 = R h t ℎ(𝑡)
ℎ 𝑡 = 𝑚(𝑡)/(𝜌 𝐴2345 ) 𝐽'+,- , 𝐽+,-
𝐽+./0 𝑡 = 𝒚𝐨𝐮𝐭
𝑨 𝒕 𝐽./0 (𝑡)
𝒚𝐨𝐮𝐭
𝑨 𝒕 = y6 t 𝐴./01
𝑦+ 𝑡 = 𝑚+ (𝑡)/𝑚(𝑡)

;
Parameters 𝑝 = 𝑅, 𝜌, 𝐴2345
<
Inputs 𝑢 𝑡 = 𝐽+,-𝑡 , 𝐽+./0 𝑡
Outputs 𝑦 𝑡 = (𝑦+./0 𝑡 )
States 𝑥 𝑡

47
From Differential-Algebraic Equations to State-Space Models – Example

Blending process model (DAE): 𝐽'() 𝐽*()


𝒎̇ 𝑨 𝒕 = 𝐽+,- 𝑡 − 𝐽+./0 𝑡
𝒎̇ 𝒕 = 𝐽+,- 𝑡 + 𝐽1,- 𝑡 − 𝐽./0 (𝑡)

𝐽./0 𝑡 = R h t ℎ(𝑡)
ℎ 𝑡 = 𝒎(𝒕)/(𝜌 𝐴2345 ) 𝐽'+,- , 𝐽+,-
𝐽+./0 𝑡 = 𝑦+./0 𝑡 𝐽./0 (𝑡)
𝑦+D$E 𝑡 = y6 t 𝐴./01
𝑦+ 𝑡 = 𝒎𝑨 (𝒕)/𝒎(𝒕)

;
Parameters 𝑝 = 𝑅, 𝜌, 𝐴2345
<
Inputs 𝑢 𝑡 = 𝑡 , 𝐽+./0 𝑡
𝐽+,-
Outputs 𝑦 𝑡 = (𝑦+./0 𝑡 )
States 𝑥 𝑡 = 𝑚+ 𝑡 , 𝑚 ;

48
From Differential-Algebraic Equations to State-Space Models – Example

Blending process model (DAE): 𝐽'() 𝐽*()


𝑚̇ + 𝑡 = 𝐽+,- 𝑡 − 𝑱𝐨𝐮𝐭
𝑨 𝒕
𝑚̇ 𝑡 = 𝐽+,- 𝑡 + 𝐽1,- 𝑡 − 𝑱𝐨𝐮𝐭 (𝒕)

𝑱𝐨𝐮𝐭 𝒕 = R 𝐡 𝐭 ℎ(𝑡)
𝒉 𝒕 = 𝑚(𝑡)/(𝜌 𝐴2345 ) 𝐽'+,- , 𝐽+,-
𝑱𝐨𝐮𝐭
𝑨 𝒕 = 𝑦+./0 𝑡 𝑱𝐨𝐮𝐭 (𝒕)
𝑦+D$E 𝑡 = 𝐲𝐀 𝐭 𝐴./01
𝒚𝑨 𝒕 = 𝑚+ (𝑡)/𝑚(𝑡)

;
Parameters 𝑝 = 𝑅, 𝜌, 𝐴2345
<
Inputs 𝑢 𝑡 = 𝐽+,-𝑡 , 𝐽+./0
𝑡
Rest: 𝐽+./0 𝑡 , 𝐽./0 𝑡 , h t , y6 t à eliminate!
Outputs 𝑦 𝑡 = (𝑦+./0 𝑡 )
States 𝑥 𝑡 = 𝑚+ 𝑡 , 𝑚(𝑡) ;

49
From Differential-Algebraic Equations to State-Space Models – Example

Eliminate
Blending process model (DAE): Blending process model (state-space model):
other
𝑚̇ + 𝑡 = 𝐽+,- 𝑡 − 𝑱𝐨𝐮𝐭
𝑨 𝒕 𝑚̇ + 𝑡 = 𝐽+,- 𝑡 − 𝑚+ (𝑡)R/(𝜌 𝐴2345 )
variables
𝑚̇ 𝑡 = 𝐽+,- 𝑡 + 𝐽1,- 𝑡 − 𝑱𝐨𝐮𝐭 (𝒕) 𝑚̇ 𝑡 = 𝐽+,- 𝑡 + 𝐽1,- 𝑡 − 𝑚(𝑡)R/(𝜌 𝐴2345 )
𝑦+D$E 𝑡 = 𝑚+ (𝑡)/𝑚(𝑡)
𝑱𝐨𝐮𝐭 𝒕 = R 𝐡 𝐭
𝒉 𝒕 = 𝑚(𝑡)/(𝜌 𝐴2345 )
𝑱𝐨𝐮𝐭
𝑨 𝒕 = 𝑦+./0 𝑡 𝑱𝐨𝐮𝐭 (𝒕)
𝑦+D$E 𝑡 = 𝐲𝐀 𝐭
𝒚𝑨 𝒕 = 𝑚+ (𝑡)/𝑚(𝑡)

;
Parameters 𝑝 = 𝑅, 𝜌, 𝐴2345
<
Inputs 𝑢 𝑡 = 𝐽+,-𝑡 , 𝐽+./0
𝑡
Outputs 𝑦 𝑡 = (𝑦+./0 𝑡 )
States 𝑥 𝑡 = 𝑚+ 𝑡 , 𝑚(𝑡) ;

50
From Differential-Algebraic Equations to State-Space Models – Example

Eliminate
Blending process model (DAE): Blending process model (state-space model):
other
𝑚̇ + 𝑡 = 𝐽+,- 𝑡 − 𝑱𝐨𝐮𝐭
𝑨 𝒕 𝑚̇ + 𝑡 = 𝐽+,- 𝑡 − 𝑚+ (𝑡)R/(𝜌 𝐴2345 )
variables
𝑚̇ 𝑡 = 𝐽+,- 𝑡 + 𝐽1,- 𝑡 − 𝑱𝐨𝐮𝐭 (𝒕) 𝑚̇ 𝑡 = 𝐽+,- 𝑡 + 𝐽1,- 𝑡 − 𝑚(𝑡)R/(𝜌 𝐴2345 )
𝑦+D$E 𝑡 = 𝑚+ (𝑡)/𝑚(𝑡)
𝑱𝐨𝐮𝐭 𝒕 = R 𝐡 𝐭
Rename to identify
𝒉 𝒕 = 𝑚(𝑡)/(𝜌 𝐴2345 ) states, …
𝑱𝐨𝐮𝐭
𝑨 𝒕 = 𝑦+./0 𝑡 𝑱𝐨𝐮𝐭 (𝒕)
𝑦+D$E 𝑡 = 𝐲𝐀 𝐭 p"
𝑥̇ " 𝑡 =− 𝑥 𝑡 + 𝑢" 𝑡
𝒚𝑨 𝒕 = 𝑚+ (𝑡)/𝑚(𝑡) 𝑝! 𝑝G "
p"
𝑥̇ ! 𝑡 =− 𝑥 𝑡 + 𝑢" 𝑡 + 𝑢! 𝑡
𝑝! 𝑝G !
Parameters 𝑝 = 𝑅, 𝜌, 𝐴2345 ; 𝑥" 𝑡
<
𝑦 𝑡 =
𝑥! 𝑡
Inputs 𝑢 𝑡 = 𝐽+,- 𝑡 , 𝐽+./0 𝑡
𝑥 0 = 𝑥&
Outputs 𝑦 𝑡 = (𝑦+./0 𝑡 )
States 𝑥 𝑡 = 𝑚+ 𝑡 , 𝑚(𝑡) ;

51
From Differential-Algebraic Equations to State-Space Models – Example

p"
𝑥̇ " 𝑡 = − 𝑥 𝑡 + 𝑢" 𝑡
𝑝! 𝑝G " Is the model time-variant?
p"
𝑥̇ ! 𝑡 = − 𝑥 𝑡 + 𝑢" 𝑡 + 𝑢! 𝑡
𝑝! 𝑝G !
𝑥" 𝑡
𝑦 𝑡 =
𝑥! 𝑡

𝑡 does not occur explicitly à time invariant

52
From Differential-Algebraic Equations to State-Space Models – Example

p"
𝑥̇ " 𝑡 = − 𝑥 𝑡 + 𝑢" 𝑡
𝑝! 𝑝G " Is the model linear?
p"
𝑥̇ ! 𝑡 = − 𝑥 𝑡 + 𝑢" 𝑡 + 𝑢! 𝑡
𝑝! 𝑝G !
𝑥" 𝑡
𝑦 𝑡 =
𝑥! 𝑡

Try to write as
linear system

H%
−I 0
& I' 1 0
𝑥̇ 𝑡 = 𝐴 𝑥 𝑡 + 𝐵 𝑢 𝑡 , with 𝐴 = H% , B= à state equations linear
0 − 1 1
I& I'
' E
𝑦 𝑡 = '% à output equations nonlinear
& E

à The model is nonlinear

53
What About Higher-Order Differential Equations?

à Can convert to state-space model by introducing


𝑥̈ 𝑡 + 𝑝" 𝑥̇ 𝑡 + 𝑝! 𝑥(𝑡) = 𝑢(𝑡)
new states for the derivatives (see handout)

54
Intended Learning Outcomes

After this lecture part, you….

ü know a basic strategy for constructing continuous dynamic models

ü can transform certain differential-algebraic equations to state-space models

ü can transform higher-order differential equations to state-space models

55
Lecture Outline: Systems Analysis of Chemical Processes

Part 1: Time domain 1.1: Modeling & simulation – basic concepts


L1: Modeling & state-space representation

L2: Linear algebra review


1.2: The state-space representation
L3: Analytical solution of linear systems

L4: Steady states & stability of linear systems

L5: Nonlinear systems


1.3: Constructing state-space models
Part 2: Frequency domain
L6: The Laplace transformation

L7: The transfer function

L8: Gain, poles, & zeros of transfer functions

L9: Graphical representation of transfer functions

L10: Common transfer functions

56
See you next week!

You might also like