Professional Documents
Culture Documents
modeling
SSK5220
Cyber-Physical Systems Modeling
Chapter 2
Model based
Design
Part 1 , 2 ,
3
2
Overview
What is
Modeling?
Developing insight about a system, process, or
artifact through imitation
Examples:
Modeling physical phenomena, continuous dynamics – Ordinary
Differential Equations (ODEs)
Feedback control systems – time-domain modeling
Modeling modal behavior, discrete dynamics – FSMs, hybrid
automata
Modeling sensors and actuators – calibration, noise
Modeling software – concurrency, real-time models
Modeling networks – latencies, error rates, packet loss
7
Overview
A Quick
Recipe
At a Glance: Model-based
8
Step 7 (Simulate) : Solve the problem using a desktop simulation tool, use
platform-based design to separate application logic and architecture-specific
software (modular components)
Step 8 (Construct) : Build the device may impact earlier modeling. Allows
individual components and subsystems to be tested against theoretical
models, which facilitates co-iteration between simulation and testing.
Step 9 – Step 10
Overview
Modeling of Continuous
Dynamics
5
Modeling of Continuous
□Dynamics
Ordinary differential equations (ODE)
□ Laplace transforms
□ feedback control systems
□ stability analysis
□ robustness analysis
…
6
Modeling of Continuous
□Dynamics
Classical mechanics: mechanical parts that moves
□ Applications:
□ Mechanical objects
□ Electric circuits,
□ Chemical Processes,
□ Biological processes
□ Motion of mechanical parts may be modeled using
differential equations (integral equations)
□ It works only for smooth motions – with assumptions
□ Linearity - system's response to input is assumed to be linear
□ time invariance - system's behavior doesn't change over time
□ continuity - system's behavior is assumed to be continuous,
without sudden jumps or disruptions in its motion
□ Others ➔ Collisions of mechanical parts are modeled using discrete
instantaneous events (hybrid systems modeling)
□ Collisions involves abrupt changes in velocity, position, or
energy.
An Example: Modeling 7
Helicopter
Dynamics
8
□ Six degrees
of freedom:
□ Position in a 3
dimensional space: x, y, z
□ Orientation: pitch, yaw,
roll ➔ Angle of rotation
Notation
Vector-valued functions
10
Notation
Orientation
(force is applied)
Torque
Angular version of force is torque➔ For a point mass
rotating around a fixed axis:
Ty(t ) = r f (t )
angular momentum, momentum
Second Law
T(t) = IӪ(t)
Rotational Version of Newton’s 15
Second Law
Rotational Version of Newton’s 16
Second Law
Model-order Reduction
Model-order Reduction
□ key points and objectives
1. Complex Systems: In many engineering and scientific applications,
complex systems are modeled with high-dimensional equations or
numerical simulations. These models can be computationally
expensive and challenging to analyze.
2. Reducing Computational Burden: One primary objective of MOR is
to reduce the computational burden associated with solving,
simulating, or analyzing these high-dimensional models. This can lead
to faster simulations and more efficient computations.
3. Preserving Key Properties: While reducing the model's order, MOR
aims to preserve key properties of the system, such as its stability,
response to specific inputs, or dynamic behavior. It ensures that the
reduced model accurately captures the phenomena of interest.
17
Model-order Reduction
□ Methods: employs various mathematical and numerical
techniques to perform the dimensionality reduction.
□ Proper Orthogonal Decomposition (POD): This method identifies
dominant modes of the system and retains only the most significant
ones.
□ Balanced Truncation: It balances the system and then truncates it to
reduce its order while maintaining key dynamics.
□ Krylov Subspace Methods: These iterative methods are used to
compute a reduced model based on certain approximations.
□ Model Reduction by Interpolation (Krylov and Loewner): These
methods construct reduced models by interpolating key system
responses.
17
Model-order Reduction
1.Applications:
1. MOR is applied in various fields, including control systems,
electromagnetics, structural mechanics, and fluid dynamics.
2. It is used in the design and analysis of complex systems like aircraft,
space systems, electronic circuits, and structural designs.
3. In control theory, reduced-order models are often used to design
controllers that maintain system stability and desired performance.
Control system
problem: Apply
torque using the tail
rotor to
counterbalance the
torque of the top
rotor.
19
Simple
Example
□ Helicopter has two rotors
► One above that provided lift
► One on the tail
□ Goal: Model a helicopter.
□ Assumptions:
► Helicopter position is fixed at the origin ➔
we do not need any equation governing the
dynamics of position.
► Helicopter remains vertical ➔ pitch and roll
are fixed at zero
□ Simplified model.
20
Simple
Example
Therefore, we may now model the helicopter by a system that takes
as input a continuous time signal Ty, the torque around the y axes.
21
References
All the content of this lecture has been adapted from the
book and lectures of Edward A. Lee and S. Seshia
2.2 Actor Model of Systems
oA system is a function that
accepts an input signal
and yields an output
signal
o Continuous time system- x:R→R , Y:R→
operates on continuous
time signals
R
o The domain and range of SX→Y
the system function are
sets of signals, which
X=Y=(R→R)
themselves are functions
o Parameters may affect
the definition of the
function S
o Tool: LabView, Simulink
Actor model of the helicopter
oParameters of the
model are shown in
the box. The input
and output relation
is given by the
equation to the
right
Cascade composition
S(R→R)2→(R→R)
2.3 Properties of Systems
. Causal systems
. Memoryless systems
. Linearity and time invariance
. Stability
Causal Systems
Memoryless Systems
. A system has memory if the output depends not only on the
current inputs, but also on past inputs (or future inputs, if not
causal).
. In a memoryless system, the output at time t depends only on the
input at time t .
. Formally, a system is memoryless if there exists a function
f : A → B such that for all x ‘ X and for all t ℝ
(S(X))(t ) = f(x (t ))
x1(t) y1(t)
Linear System
x2(t) y2(t)
Linear System
x(t-t0)
y(t-t0)
t
t
t0
t0
Stability
y e
K
Mathematical
Analysis
Mathematical Analysis
(cont)
Helicopter Model with Separately
Controlled Torques
Mathematical
Analysis
Continuous vs Discrete Signals
. Continuous, also called continuous time, signals defined as
x:R→R
. Discrete, also called discrete time, signals defined as
Key Concepts in Model-Based Design
o Models describe physical dynamics
o Specifications are executable models
o Models are composed to form designs
o Models evolve during design
o Deployed code may be (partially) generated from
models
o Modeling languages have semantics
o Modeling languages themselves may be modeled
(meta models)
o For embedded systems, this is about
o Time
o Concurrency
o Dynamics
Summary