Professional Documents
Culture Documents
ModuleIII B Modeling
ModuleIII B Modeling
Topics to be covered
What is modeling?
What is a system?
Definition(s)
A system is an operator that transforms an input signal u into a unique output signal y.
A system is a function mapping input signals into output signals.
Systems with one input and one output are called single-input, single-output (SISO) systems, while
the ones withmore than one input and output are called multi-input, multi-output (MIMO) systems.
Definition
A system G is said to be causal if, for any t0 ∈ R (resp. k0 ∈ Z) the output at time t0 (resp. at step k0 )
depends only on the input up to, and including, time t0 (resp. up to, and including, step k0 ).
A system is causal if it is non-anticipatory, i.e., it cannot respond to inputs that will be applied in the future,
but only on past and present inputs. (Strictly causal systems only depend on past inputs).
Most control systems that are implementable in practice are, in fact causal. In general, it is not possible to
predict the inputs that will b applied in the future.
However, there are some cases in which non-causal systems can act be interesting to study:
Off-line processing.
For example, a system that is used as a filter to smooth a certain signal, or possibly to “rip” a song
from a CD to an MP3 file.
Examples of linear systems: scaling system, differentiator, integrator, running average, time shift
etc..
Examples of nonlinear systems: sign detector, multiplier (sometimes), comparator, adaptive filter..
x(t0 ) = 𝛼x0,1 + 𝛽x0,2
u(t) = 𝛼u1 + 𝛽u2 , t ≥ t0 → 𝛼y1 + 𝛽y2
Dr. Jagat Jyoti Rath Mechatronics 8 / 56
How to Describe Systems?
Many systems in real world, such as ones in automotive and aerospace industry (safety-critical systems,
autopilots, cruise control, autonomous vehicles, ...), biology and medicine (cardiac assist devices,
anesthesia delivery, systems biology ...) etc. have nonlinear behavior. For ease of analysis, we analyze
these systems by some approximations as linear systems. (Note: In later lecture we will read how to do this
approximation.)
This is important because such systems are linear when initial conditions are all zero.
What next?
Time Characteristics?
Frequency Characteristics?
Thus the way this system is changing i.e. acceleration is a function of its current state i.e. position.
Now what would happen if initialize the above system with some energy?
Now what would happen if initialize the above system with some energy?
Now what would happen if initialize the above system with some energy?
Acceleration
Velocity
Position
k
So what happens:
Here we initialize the system by Acceleration changes velocity, that changes position and in
stretching the spring and letting turn that changes acceleration back again.
it go.. The mass just oscillates back and forth, and as there is no
damping this continues for ever as energy is conserved.
Now what would happen if initialize the above system with some energy?
Acceleration
Velocity
Position
k
So what happens:
Here we initialize the system by Acceleration changes velocity, that changes position and in
stretching the spring and letting turn that changes acceleration back again.
it go.. The mass just oscillates back and forth, and as there is no
damping this continues for ever as energy is conserved.
Similar to this mass-spring system we see how energy changes for any arbitrary system by analyzing the
relationship between
x¤ = f (x)
The energy gives us information about stability of a system. Typically if energy is decreasing over time, we
have a stable system and vice-versa.
The way the system changes can also be influenced by external inputs i.e.
x¤ = f (x, u)
This external input corresponds to an external energy which is either added or removed form the original
system over time.
The way the system changes can also be influenced by external inputs i.e.
x¤ = f (x, u)
This external input corresponds to an external energy which is either added or removed form the original
system over time.
Thus time evolution of systems is a function of current state and external input.
The way the system changes can also be influenced by external inputs i.e.
x¤ = f (x, u)
This external input corresponds to an external energy which is either added or removed form the original
system over time.
Thus time evolution of systems is a function of current state and external input.
State-space modeling is basically a representation which repackages the above time evolution dynamics of
the system in a more convenient way, i.e. by converting the set of higher order differential equations (2nd
order from mass spring example) into a set of first order ones for a system.
For representing system dynamics in state space, following terms need to be understood:
State
Output or Measurements
State Space
For representing system dynamics in state space, following terms need to be understood:
State
Output or Measurements
State Space
Example: Rechargeable flashlight – the state is the current state of charge of the battery. If you know that
state, then you do not need to know how that level of charge was achieved (assuming a perfect battery) to
predict the future performance of the flashlight.
But to consider all nonlinear effects, you might also need to know how many cycles the battery has
gone through
Key point is that you might expect a given linear model to accurately model the charge depletion
behavior for a given number of cycles, but that model would typically change with the number cycles
If the question is to predict where the system will be in next 1 second, then what information do we need?
If the question is to predict where the system will be in next 1 second, then what information do we need?
We need information of system constants i.e. k and m
what external force is acting on the mass i.e. u
We also need to know the initial conditions i.e. is the mass moving and how hard is spring pulling
on the mass?
Answers to these questions would help us in predicting the system after 1 second.
Let’s try answering the questions, assuming now we have the information of the constants k and m.
Let’s try answering the questions, assuming now we have the information of the constants k and m.
So to know if the mass is moving or not, we can check its velocity. Based on energy conservation velocity
might be varying considering the mass will be moving back and forth.
To determine how the spring is pulling, we consider the spring force as a variable which can be expressed
as, spring force = k x distance/ position of mass relative to un-stretched string.
Let’s try answering the questions, assuming now we have the information of the constants k and m.
So to know if the mass is moving or not, we can check its velocity. Based on energy conservation velocity
might be varying considering the mass will be moving back and forth.
To determine how the spring is pulling, we consider the spring force as a variable which can be expressed
as, spring force = k x distance/ position of mass relative to un-stretched string.
Thus using position and velocity as two state variables we can predict future behavior of the system. Hence
it is a second order system.
Considering our spring mass system, there are two energy storage elements:
spring stores potential energy
mass stores kinetic energy
So with time, the dynamics of system keeps evolving as energy transfer occurs between one element and
another, and eventually dissipates as heat energy.
Considering our spring mass system, there are two energy storage elements:
spring stores potential energy
mass stores kinetic energy
So with time, the dynamics of system keeps evolving as energy transfer occurs between one element and
another, and eventually dissipates as heat energy.
At any given time, if we know how much energy is present in each element
↓
We know information of the state x
Note that states don’t directly represent the energy of a system, they just indicate how energy can be
determined.
State space, in simple terms thus helps in giving information about energy is stored, and how transfer
occurs between elements.
x¤ = Ax + Bu (1)
y = Cx + Du (2)
In the above description Eq.(1) is called the state equation and Eq.(2) is called the output equation.
Further,
x ∈ R n is the state vector x = {x1 , x2 , . . . , xn }
u ∈ R m are the inputs u = {u1 , u2 , . . . , um }
y ∈ R p are the outputs i.e. y = {y1 , y2 , . . . , yp }
A ∈ R n×n is the state transition matrix
B ∈ R n×m is the system input matrix
C ∈ R p×n is the output matrix
D ∈ R p×m is the feed-forward matrix
In the entire representation, the variable which appears the most is the state vector. But what are states?
State Equation
The state equation establishes relationship between state vector x, how the state vector changes x¤ , and the
external inputs u.
State Equation
The state equation establishes relationship between state vector x, how the state vector changes x¤ , and the
external inputs u.
State Equation
The state equation establishes relationship between state vector x, how the state vector changes x¤ , and the
external inputs u.
The A matrix depicts how the states affect and interact with each other, while B matrix depicts how
external inputs affects the states.
Output Equation
Output Equation
y = 𝛼u
with 𝛼 denoting a scalar gain. For this system, A = B = C = 0 and there is no state evolution. But the D
matrix is the value of the gain of the multiplier i.e. D = 𝛼.
The output equation will assume significance later on when we read about feedback control design in future
lectures.
For this system, the input is force f (t) and the output is displacement y(t).
Now, Spring force = -ky (Hooke’s law), damper force = - b (Linear approximation of Stoke’s law). Then
using the FBD shown here,
As there are two storage elements, we can define the state variables as mass displacement and velocity i.e.
Here,
y1 (t) and y2 (t) denote the displacement of the associated mass from its static equilibrium position
The input is the applied force u(t) = f (t), and the outputs are taken as the mass displacements
Newton’s second law applied to each mass yields the coupled second order differential equations:
Note that the energy-storage elements are the two springs and the two masses. Thus we we can define state
variables in terms of mass displacements and velocities as:
It was convenient earlier to define the second state variable as the difference in mass displacements,
x2 (t) = y2 (t)y1 (t), because this relative displacement is the amount the second spring is stretched.
But what if we took absolute position as the second state i.e. x2 (t) = y2 (t)?
Response
For the modeled dynamics, we want to check how state evolution has occurred/ will occurred for various
input signals. Thus, we want to find the response or output of the system.
xic (t0 ) = x0
uic (t) = 0 ; t ≥ t0 , → yic
Forced response
xf (t0 ) = 0
uf (t) = u(t); t ≥ t0 , → yic
xic (t0 ) = x0
uic (t) = 0 ; t ≥ t0 , → yic
Forced response
xf (t0 ) = 0
uf (t) = u(t); t ≥ t0 , → yic
y = yic + yf
i.e., we can always compute the output of a linear system by adding the output corresponding to zero input
and the original initial conditions, and the output corresponding to a zero initial condition, and the original
input.
In other words, we can study separately the effects of non-zero inputs and of non-zero initial conditions.
The complete case can be recovered from these two responses.
Dr. Jagat Jyoti Rath Mechatronics 32 / 56
Frequency Domain Modeling
Consider the following differential equation dynamics:
d2 x(t) dx(t)
a1 + a2 + a3 x(t) = f (t)
dt2 dt
where a1 , a2 , a3 are some scalars, x(t) are the state(s) and f (t) is an external input. To find the response of
x(t) we have to solve the above ordinary differential equation (ODE). Can use SS technique. But:
Challenging to find with various f(t) and initial conditions
If the order of the system increases, very difficult to solve.
d2 x(t) dx(t)
a1 + a2 + a3 x(t) = f (t)
dt2 dt
where a1 , a2 , a3 are some scalars, x(t) are the state(s) and f (t) is an external input. To find the response of
x(t) we have to solve the above ordinary differential equation (ODE). Can use SS technique. But:
Challenging to find with various f(t) and initial conditions
If the order of the system increases, very difficult to solve.
d2 x(t) dx(t)
a1 + a2 + a3 x(t) = f (t)
dt2 dt
where a1 , a2 , a3 are some scalars, x(t) are the state(s) and f (t) is an external input. To find the response of
x(t) we have to solve the above ordinary differential equation (ODE). Can use SS technique. But:
Challenging to find with various f(t) and initial conditions
If the order of the system increases, very difficult to solve.
Laplace Transform
d2 x(t) dx(t)
a1 + a2 + a3 x(t) = f (t)
dt2 dt
where a1 , a2 , a3 are some scalars, x(t) are the state(s) and f (t) is an external input. To find the response of
x(t) we have to solve the above ordinary differential equation (ODE). Can use SS technique. But:
Challenging to find with various f(t) and initial conditions
If the order of the system increases, very difficult to solve.
Laplace Transform
Using LT, the above ODE can be written as the following algebraic equation:
where s is a complex number. Now we get an easy algebraic relationship between input F (s) and state (or
output) X(s).
d2 x(t) dx(t)
a1 + a2 + a3 x(t) = f (t)
dt2 dt
where a1 , a2 , a3 are some scalars, x(t) are the state(s) and f (t) is an external input. To find the response of
x(t) we have to solve the above ordinary differential equation (ODE). Can use SS technique. But:
Challenging to find with various f(t) and initial conditions
If the order of the system increases, very difficult to solve.
Laplace Transform
Using LT, the above ODE can be written as the following algebraic equation:
where s is a complex number. Now we get an easy algebraic relationship between input F (s) and state (or
output) X(s).
How will the rotation of the motor shaft vary with time?
The speed will not immediately assume the full-speed value but will only attain that speed after some time.
How will the rotation of the motor shaft vary with time?
The speed will not immediately assume the full-speed value but will only attain that speed after some time.
– Consider another situation: A hydraulic system is used to open a valve that allows water into a tank to
restore the water level to that required.
The water level will not immediately assume the required level but will only attain that level after some
time.
All these building blocks can be considered to have a force as an input and a displacement as an output.
What next?
Considering that reaction force input from the ground is causing displacement of the driver in the car, can
the mechanical model of a suspension system be developed?
For example, consider a Motor operating through gear trains to rotate loads, can the mechanical model be
developed?
All these building blocks can be considered to have a potential difference/ current as an input and a
charge/current as an output.
All these building blocks can be considered to have a potential difference/ current as an input and a
charge/current as an output.
Mechanical–electrical analogies are used to represent the function of a mechanical system as an equivalent
electrical system by drawing analogies between mechanical and electrical parameters.
Mechanical–electrical analogies are useful in general where the system includes transducers
between different energy domains.
Example: Mechanical parts of acoustic systems suffer from resonance effects which can be treated
via electrical filters.
Example: Mechanical filters—these use mechanical devices to implement an electrical function.
Both magnetostrictive and piezoelectric transducers are used in mechanical filters.
The bigger the resistance, the bigger the pressure difference for a given rate of flow.
Hydraulic linear resistances occur with the orderly flow through capillary tubes and porous plugs but
non-linear resistances occur with flow through sharp-edged orifices or if the flow is turbulent.
For such a capacitance, the rate of change of volume is equal to the difference between the
volumetric rate at which liquid enters the container and leaves the container.
What?
Hydraulic inertance is the equivalent of inductance in electrical systems or a spring in mechanical systems.
To accelerate a fluid and so increase its velocity, a force is required
The net force acting on the liquid is equal to the pressure difference times the cross-sectional areas.
Pneumatic Resistance
Pneumatic resistance is defined as the resistance to the mass rate of flow of air. It relates the mass rate of
flow to the pressure difference accordingly.
Pneumatic Capacitance
Pneumatic capacitance C is due to the compressibility of the gas, and is comparable with the way in which
the compression of a spring stores energy.
Pneumatic Inertance
Pneumatic inertance is due to the pressure drop necessary to accelerate a block of gas.
For hydraulics the volumetric rate of flow and for pneumatics the the mass rate of flow is analogous
to the electric current in an electrical system.
For both hydraulics and pneumatics the pressure difference is analogous to the potential difference
in electrical systems.
Develop a hydraulic model for the following system showing a liquid entering and leaving a container.
Infant Incubator: Despite the ambient temperature and humidity variations, infant body temperature
should be kept constant through the body’s self-thermoregulation process. This is done through the
regulation of the temperature, relative humidity, and the oxygen concentration within the incubator cabinet.
So what should we model?
Infant Incubator: Despite the ambient temperature and humidity variations, infant body temperature
should be kept constant through the body’s self-thermoregulation process. This is done through the
regulation of the temperature, relative humidity, and the oxygen concentration within the incubator cabinet.
So what should we model?