0% found this document useful (0 votes)
7 views35 pages

Modeling and Simulation of Systems

Uploaded by

mh5tb9n5jz
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views35 pages

Modeling and Simulation of Systems

Uploaded by

mh5tb9n5jz
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Modeling and

Simulation of
Physical Systems
Introduction
• Modeling is the process of representing the behavior of a real system by a
collection of mathematical equations and logic. Simulation is the process of
solving the model and is performed on a computer.
• Component modeling, which is the derivation of mathematical equations
suitable for computer simulation, plays a critical role during the design stages
of a mechatronic system.
• For all but the simplest systems, the performance aspects of components
(such as sensors, actuators, and mechanical geometry) and their effect on
system performance can only be evaluated by simulation.
• Any modeling task requires the formulation of mathematical models suitable
for computer simulation or solution.
Operator Notation and Transfer Functions
• For ease in writing linear lumped-parameter differential equations, the D
operator is introduced.
• Any linear lumped differential equation can be converted to operator form
by simply substituting the operation using differentiation or integration
with the appropriate operator.
D OPERATOR FOR DIFFERENTIATION AND INTEGRATION
Operator Notation and Transfer Functions
• The cause–effect relationship for many systems can be approximated by
a linear ordinary differential equation.
• For example, consider the following second-order dynamic system with
one input, r(t) , and one output, y(t).

• This type of system is called a single input–single output or SISO system.


The transfer function is another way of writing a SISO system.
• The transfer function is the ratio of the output variable over the input
variable represented as the ratio of two polynomials in the D or s
operator.
Operator Notation and Transfer Functions
• Any linear ordinary differential equation can be converted to transfer
function form using the following three step procedure.

• Step 1. Rewrite the equation using operator notation

• Step 2. Collect and factor all output terms on the left side and input
terms on the right side:

• Step 3. Obtain the transfer function by solving for the ratio of the
output over the input signal:
Operator Notation and Transfer Functions
• The transfer function consists of two polynomials in the D or s operator,
a numerator polynomial, and a denominator polynomial.
• A monic polynomial has its highest D or s-power coefficient set to 1. To
minimize the number of coefficients in a transfer function, the
numerator and denominator polynomials are usually written in monic
form with any gain factored out.
• For example, the following transfer function is converted to monic form
by factoring 16 out of the numerator and 5 out of the denominator.
EXAMPLES
• Write the following differential equations in D-operator form:
a)

b)

c)

d)
EXAMPLES
• The following equations represent systems with input r(t) and output x(t).
x(t)
Compute the transfer function T(D)= for each system. Present your
r(t)
results in monic form using D operator notation.

a) b)

c) d)
Block Diagrams,
Manipulations, and
Simulation
Block Diagrams—Introduction
• Because block functions may be nonlinear as well as linear, the collection
of special function blocks is practically unlimited and almost never the
same between vendors of block diagram languages.
• There is, however, a fundamental set of three basic blocks that all block
diagram languages possess. These blocks are the summing junction, the
gain, and the integrator. An example system using these three blocks is
shown below,
Block Diagrams—Introduction
• The vertical signal, 𝑌𝑜 , entering the integrator from the top represents
the initial condition on the integrator. When this signal is omitted, the
initial condition is assumed to be 0.
• The initial condition also could be represented as a summing junction
downstream of the integrator, as shown below:
Block Diagrams—Introduction
• Once a system is represented in block diagram form, it can be analyzed
or simulated.
• Analysis of block diagram systems involves reductions, usually to obtain
the transfer characteristic between signals.
Block Diagrams—Manipulations
• Block diagrams are rarely constructed in a standard form, and it is often
necessary to reduce them to more efficient or understandable forms.
• The ability to simplify a block diagram is often a critical step in
understanding its function and behaviour.
Block Diagrams—Manipulations
• Series Block Reduction
• SERIES MANIPULATION—SERIES BLOCKS MULTIPLY
Block Diagrams—Manipulations
• Parallel Block Reduction
• PARALLEL MANIPULATION—PARALLEL BLOCKS ADD
Block Diagrams—Manipulations
• Moving Pick-Off Points
• Pick-off points are wire origination points located on a wire as opposed to a
block output.
• When a signal is picked-off of a wire, both the signals and the picked-off signal
are identical.
• It is often necessary to move pick-off points either downstream or upstream in
order to create a parallel block configuration which can then be reduced using the
parallel block reduction rule.
Block Diagrams—Manipulations
• Moving Pick-Off Points
• Downstream
• When a pick-off point is shifted downstream over a block, the
inverse of the block appears in the feedback path.
Block Diagrams—Manipulations
• Moving Pick-Off Points
• Upstream
• When a pick-off point is shifted upstream over a block, the block
appears in the feedback path.
Block Diagrams—Manipulations
• Moving Blocks Through Summing Junctions
• Moving blocks through summing junctions is based on the
distributive property of the summation operation, 𝑦 = 𝑘 𝐴 + 𝐵 =
𝑘𝐴 + 𝑘𝐵.
• Care must be taken to preserve the correct sign conventions.
• Two situations are considered:
• Moving a block through a summing junction in the upstream
direction
• Moving a block through a summing junction in the downstream
direction
Block Diagrams—Manipulations
• Moving Blocks Through Summing Junctions
• Moving blocks upstream through a summing junction
Block Diagrams—Manipulations
• Moving Blocks Through Summing Junctions
• Moving blocks downstream through a summing junction
Block Diagrams—Manipulations
• Basic Feedback System Form
• One of the crucial ingredients of automatic control is feedback. It
provides the mechanism for attenuating the effects of parameter variations
and disturbances and enhancing dynamic tracking ability.
• The basic feedback system (BFS) shown below is the fundamental block
diagram representing a feedback system.
Block Diagrams—Manipulations
• Basic Feedback System Form
• The variable R is the input to the BFS, E is the control or error
variable, and Y is the output.
• The closed-loop transfer function for the BFS is computed by writing
two equations in three variables, R, E, and Y; then combining the
equations to eliminate E; and solving for the ratio of Y/R.
Block Diagrams—Manipulations
• Basic Feedback System Form
• These steps are illustrated here.
• Step 1. 𝐸 =𝑅−𝐻 𝐷 ∙𝑌
• Step 2. 𝑌 =𝐺 𝐷 ∙𝐸
• Steps 1. → 2. 𝑌 = 𝐺 𝐷 ∙ (𝑅 − 𝐻(𝐷) ∙ 𝑌)
𝑌 + 𝐺 𝐷 ∙ 𝐻 𝐷 ∙ 𝑌 = 𝐺(𝐷) ∙ 𝑅
𝑌∙ 1+𝐺 𝐷 ∙𝐻 𝐷 =𝐺 𝐷 ∙𝑅
𝒀 𝑮(𝑫)
=
𝑹 𝟏+𝑮 𝑫 ∙𝑯(𝑫)
Block Diagrams—Manipulations
• Basic Feedback System Form
• The function 𝐺(𝐷) ∙ 𝐻 𝐷 represents the transfer function around the loop of
the feedback system and is called the loop transfer function (LTF).
• If a system is in BFS form, its closed loop transfer function (CLTF or T) can be
written directly as

𝑓𝑜𝑟𝑤𝑎𝑟𝑑 𝑡𝑟𝑎𝑛𝑠𝑓𝑒𝑟 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛 𝐺(𝐷)


𝑇= =
1 + 𝑙𝑜𝑜𝑝 𝑡𝑟𝑎𝑛𝑠𝑓𝑒𝑟 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛 1 + 𝐺 𝐷 ∙ 𝐻(𝐷)
• The denominator of T is called the return difference and is defined as 1 + loop
transfer function.
Block Diagrams—Manipulations
• Example 1
• Simplify the mass–spring–damper system model shown below. The
system has two feedback loops which represent the reaction forces
exerted by the damper and the spring.
Block Diagrams—Manipulations
• Solution
Block Diagrams—Manipulations
• Example 2
• A control structure used in many high-performance systems
combines feedforward control for fast response and feedback control
for accuracy at lower frequencies. A block diagram of such a control
structure being used to control a plant, G(s), is presented below:
Block Diagrams—Manipulations
• Solution
Block Diagrams—Manipulations
• Example 3
• This example demonstrates series, parallel, and pick-off point movement
manipulations. The block diagram below, is to be reduced such that two blocks
are present: one in the forward loop and one in the feedback loop. The reduced
system will be in BFS form.
Block Diagrams—Manipulations
• Solution
Simulation
• Most visual simulation environments perform three basic functions.
• Graphical Editing: Used for the creation, editing, storage, and
retrieval of models. Also used to create model inputs, orchestrate the
simulation, and to present the model results.
• Analysis: Used to obtain transfer functions, compute frequency
response, and evaluate sensitivity to disturbances.
• Simulation: Numerical solution of the block diagram model.
Simulation
• The simulation process consists of three steps.
• Step 1. Initialization
• Step 2. Iteration
• Step 3. Termination

• In the initialization step, the equations for each block in the system
model are sorted according to the pattern in which the blocks are
connected.
• For example, a model consisting of three blocks (A, B, and C)
connected in series (input to A is exogenous, output of A to input of
B, output of B to input of C) would have its equations sorted with the
Block A equations first, followed by those in Block B, and then by
those in Block C.
Simulation
• The exogenous input to A would preceed the sorted list, as it is needed to
process the A block.
• In the iteration step, differential equations present in the model are solved
using numerical integration and/or differentiation, and the simulation time is
advanced. Discrete equations are also solved in the iteration section.
• Results are presented in the termination step along with any other post-
processed calculations. Output may be saved to a file, displayed as a digital
reading, or graphically displayed as a chart, strip chart, meter readout, or even
as an animation.
Thank you for listening

You might also like