? Modeling and Simulation of Dynamic Systems
? Modeling and Simulation of Dynamic Systems
Index
1.1 Modeling
Definition:
Modeling is the process of creating a simplified representation of a real-world system. This can
include using:
• Mathematical equations
• Block diagrams
• Computer simulations
The main goal is to understand, predict, and analyze the behavior of a system under various
conditions.
Purpose of Modeling:
• To study systems that are too complex, dangerous, or costly to test in real life.
Mathematical
Equations describing system behavior F=maF = ma
Models
• Cost & Time Saving: Avoids expensive and time-consuming real-world tests.
• Risk Reduction: Enables safe testing of hazardous situations (e.g., aircraft crash, nuclear
systems).
1.2 Simulation
Definition:
Simulation is the act of executing a model to observe how the system behaves over time under
different conditions. Usually performed using computers and simulation tools.
Examples:
Tool Use
It allows:
What is a System?
Types of Systems:
2. Identify inputs and outputs – What goes in? What do we get out?
4. Simulate the system – Run the model using tools like MATLAB.
3. Model Validation – Check if the model behaves like the real system.
4. Simulation & Result Analysis – Run the model and study results.
Flowchart:
MATLAB:
Simulink:
• An add-on to MATLAB used for modeling, simulating, and analyzing dynamic systems
using a block diagram approach.
• Offers ready-made libraries for different systems – mechanical, electrical, hydraulic, etc.
o Aerospace control
Important Terms
Term Description
Dynamic System A system where output depends on past and current inputs
Steady State Final value reached after all changes settle down
Real-Life Example: Spring-Mass-Damper System
Physical Description:
Mathematical Model:
Where:
• m = mass
• c = damping coefficient
• k = spring constant
• x = displacement
Simulink Representation:
Definition:
Mechanical systems involve masses, springs, and dampers. These systems follow Newton’s Laws
of Motion, especially the second law which says:
F=m⋅aF = m \cdot a
Where:
• FF = Force applied
• mm = Mass
• aa = Acceleration
Mechanical Elements:
1. Mass (Inertia)
o Resists acceleration.
o Force relation:
(where xx is displacement)
2. Spring (Elasticity)
F=kxF = kx
(where kk is spring constant, xx is displacement)
o Force relation:
Rotational Analogues:
Translational Rotational
Rotational Forms:
This is a second-order differential equation describing how the system responds to an external
force over time.
Electrical systems can be modeled using Kirchhoff’s Laws and component relationships (Ohm’s
Law, etc.).
1. Resistor (R):
o Relation: V=IRV = IR
2. Inductor (L):
3. Capacitor (C):
Kirchhoff’s Laws:
If we apply a voltage V(t)V(t) to a resistor (R), inductor (L), and capacitor (C) in series, the total
voltage drop is:
Mechanical Electrical
Mechanical Electrical
These analogies help convert mechanical models into electrical circuits for easier simulation
using tools like Simulink.
Thermal systems involve heat transfer, and we use analogies with electrical systems to model
them. The most common modeling method uses concepts of thermal resistance and thermal
capacitance.
Key Concepts:
1. Heat Flow (Q):
2. Temperature (T):
Where:
• QQ = Heat flow
Where:
• QQ = Heat added
Thermal Electrical
Example:
A heater warms a metal plate. The plate's temperature increases gradually because of its
thermal capacitance, and the heat loss to air depends on the thermal resistance of the surface-
air layer.
Hydraulic systems involve the flow of liquids (usually incompressible). Modeling these systems
requires concepts of pressure, flow rate, and hydraulic resistance.
Key Concepts:
• Pressure (P):
Force per unit area (N/m² or Pascals).
Analogous to Voltage (V).
Hydraulic Elements:
Hydraulic Electrical
Hydraulic Resistance:
Where:
• QQ = Flow rate
Hydraulic Capacitance:
C=QΔPC = \frac{Q}{\Delta P}
Where:
• QQ = Volume stored
Hydraulic Inertance:
In a water supply pipe, water flow depends on valve opening (resistance), pipe wall flexibility
(capacitance), and mass of moving water (inertance).
Bond Graphs are a unified modeling technique that represents energy flow across different
domains—mechanical, electrical, thermal, hydraulic, etc.
Purpose:
This unit focuses on different ways of building system models (based on knowledge or data) and
explains how to differentiate between linear and nonlinear systems.
Modeling is the foundation for simulation and analysis. Depending on what we know about the
system, we choose different modeling approaches:
1. Superposition:
2. Homogeneity (Scaling):
Mathematical Representation:
a1⋅x1+a2⋅x2→a1⋅y1+a2⋅y2a_1 \cdot x_1 + a_2 \cdot x_2 \rightarrow a_1 \cdot y_1 + a_2 \cdot
y_2
• Can use powerful techniques like transfer functions, frequency response, and stability
analysis
• May involve:
Examples of Nonlinearities:
Type Example
Real Examples:
• Often use:
o Numerical solvers
o Simulink simulation
Modeling Approach:
Example:
A hydraulic actuator pushes a load. The input is fluid pressure; the output is load displacement.
Resistance from the valve and compressibility of fluid act like damping and stiffness.
Examples:
• DC Motor
• Stepper motor
• Generator
• Solenoids
DC Motor Modeling Example
Where:
• VV = Input voltage
• LL = Armature inductance
• RR = Resistance
• ii = Armature current
Where:
• JJ = Moment of inertia
Torque Generation:
Steps in Modeling:
This unit explains how to mathematically represent dynamic systems using transfer functions,
and how to analyze their time-domain behavior.
Definition:
A transfer function represents the relationship between the input and output of a linear time-
invariant (LTI) system in the Laplace domain, assuming zero initial conditions.
TF=Y(s)U(s)TF = \frac{Y(s)}{U(s)}
Where:
• Allows use of tools like Bode plots, root locus, and Nyquist plots.
Definition:
The Laplace transform is a mathematical operation that transforms a function of time f(t)f(t)
into a function of a complex variable ss, making it easier to solve differential equations.
f(t)f(t) F(s)F(s)
dfdt\frac{df}{dt} sF(s)sF(s)
These parameters describe how a system behaves when subjected to a unit step input.
Parameters:
Parameter Description
Rise Time (tr) Time to rise from 10% to 90% of final value
Maximum Overshoot (Mp) Amount by which the response exceeds final value
Settling Time (ts) Time for output to stay within 2% or 5% of final value
General Equation:
Where:
• KK = system gain
• u(t)u(t) = input
Transfer Function:
Y(s)U(s)=Kτs+1\frac{Y(s)}{U(s)} = \frac{K}{\tau s + 1}
Step Response:
Key Characteristics:
• No overshoot or oscillation.
Standard Form:
Where:
• ωn\omega_n = natural frequency
Types of Responses:
Where:
This unit introduces Simulink, a block-diagram-based tool in MATLAB for modeling, simulating,
and analyzing dynamic systems. It also explains System Identification, the process of developing
models using experimental data.
What is Simulink?
Simulink is a graphical modeling tool used to simulate and analyze dynamic systems. It allows
users to build block diagrams instead of writing complex code.
Features of Simulink:
• Used for control systems, signal processing, power systems, and more.
1. Spring-Mass-Damper System
• Equation:
• Simulink components:
2. Pendulum Model
• Equation:
3. DC Motor
• Electrical equation:
V=L⋅didt+Ri+KbωV = L \cdot \frac{di}{dt} + Ri + K_b \omega
• Mechanical equation:
o Current generation
o Torque production
Definition:
System Identification is the process of building a mathematical model of a system using input-
output data rather than physical laws.
1. Parametric Methods
• Common models:
o Least Squares
o Maximum Likelihood
2. Non-Parametric Methods
o Impulse response
o Step response
o Frequency response
o Data import
o Model fitting
o Model validation
o Frequency analysis
Summary of Unit 5:
Spring-Mass-
Mechanical vibration system using integrators and gains
Damper
System
Build models from experimental data using ARX, OE, etc.
Identification