Modeling and Simulation of Mechatronic Systems
Modeling and Simulation of Mechatronic Systems
Modeling and Simulation of Mechatronic Systems
WARNING: This material is for educational (teaching) purposes only and should be used according to the
copyright and “fair use” rules. No further reproduction or distribution of this material is permitted. Any further
reproduction or distribution of the material or some parts of the material may require prior approval from the
copyright owner. If the use of this material excess the “fair use” rules, the user may be responsible for copyright
violations.
Gordana Janevska
Contents
1. INTRODUCTION TO MECHATRONICS
DEFINING MECHATRONICS
KEY ELEMENTS OF MECHATRONICS
APPLICATIONS OF MECHATRONIC SYSTEMS
THE PURPOSE OF MODELLING AND SIMULATION OF MECHATRONIC
SYSTEMS
2. BASICS
MODELS AND SIMULATION: THE VIRTUAL REALITY
SYSTEMS AND MODELS
TYPES OF MATHEMATICALMODELS
Input-output model versus state space model
Static versus dynamic systems
A (loose) classification of dynamic models
Lumped versus Distributed parameters
Linear versus nonlinear models
Continuous versus discrete models
Continuous-time versus discrete-time models
Deterministic versus stochastic models
Summary
MODEL VALIDATION
MODEL AND SIMULATION
1
VI Front Panel
Block diagram
Icon and connector pane
Three LabVIEW Palettes
Status Toolbar
Show context Help
Help Options
4. THEORETICAL MODELING
MODEL PARAMETERS AND SIGNALS
PHASES OF MODELING
Phase 1: Structuring the Problem
Phase 2: Setting up the Basic Equations
Phase 3: Forming the final model
SOME BASIC RELATIONSHIPS IN PHYSICS
Electrical Systems
Mechanical Systems
Translational Mechanical Systems
Rotational Mechanical Systems
Fluid Systems
Thermal Systems
Analogies between physical sub-areas
MODEL SIMPLIFICATION
5. BOND GRAPHS
INTRODUCTION
EFFORTS AND FLOWES
JUNCTIONS
SIMPLE BOND GRAPHS
TRANSFORMERS AND GYRATORS
SYSTEMS WITH MIXED PHYSICAL VARIABLES
CAUSALITY: SIGNALS BETWEEN SUBSYSTEMS
STATE EQUATIONS FROM BOND GRAPHS
CONCLUSIONS
7. SIMULATION
USING MODELS FOR SIMULATION
NUMERICAL INTEGRATION ALGORITHMS
2
SCALING OF THE MODEL EQUATIONS
BLOCK DIAGRAMS AND SUBSYSTEMS
SIMULATION LANGUAGES
DC MOTOR – EXAMPLE
MODELING DC MOTOR POSITION
Physical Modeling
Mathematical Modeling
MATLAB representation and open-loop response
Building the Model in SIMULINK
LabVIEWrepresentation and open-loop response
LABVIEW SIMULATION OF DC MOTOR
3
MODELING AND SIMULATION
OF MECHATRONIC SYSTEMS
1. INTRODUCTION TO
MECHATRONICS
INTRODUCTION TO MECHATRONICS
DEFINING MECHATRONICS
MECHANICS
ELETRONICS
The meaning of this word continuously evolves after the original definition.
Today it has come to mean multidisciplinary systems engineering. The
definition that mechatronics is simply the combination of different
technologies is no longer sufficient to explain mechatronics
4
INTRODUCTION TO MECHATRONICS
DEFINING MECHATRONICS
INTRODUCTION TO MECHATRONICS
DEFINING MECHATRONICS
5
INTRODUCTION TO MECHATRONICS
DEFINING MECHATRONICS
INTRODUCTION TO MECHATRONICS
6
INTRODUCTION TO MECHATRONICS
KEY ELEMENTS OF
MECHATRONICS
INTRODUCTION TO MECHATRONICS
The key elements of the mechatronics approach are presented in the figure:
7
INTRODUCTION TO MECHATRONICS
INTRODUCTION TO MECHATRONICS
8
INTRODUCTION TO MECHATRONICS
The importance of modeling and analysis in the design process has never been more
important.
Designs are usually the result of the improvement of an existing system, the innovative
combination of existing systems, or the application of new technology or new
k
knowledge
l d tot an existing
i ti system.
t In
I all
ll this,
thi understanding
d t di what h t exists
i t is
i paramountt
and modeling is essential to that understanding.
Once a concept has been developed in the conceptual phase of design it is evaluated
through modeling , not by building and testing the physical system, sensors, actuators,
and controls, all integrated into the design concept.
INTRODUCTION TO MECHATRONICS
9
INTRODUCTION TO MECHATRONICS
More and more, simulation is being used to detect and eliminate integration issues.
Simulation has been used on individual components and subsystems for quite some
time,
i bbut the
h reall value
l becomes
b apparent with
i h the
h ability
bili off virtual
i l integration
i i off those
h
individual systems. The tremendous cost savings of finding problems before you
commit to hardware are well-known. What's more important, however, is being able to
optimize system performance. That's something you can only achieve in simulation
when you can combine those different domains with the controllers in a single
simulation environment.
By running simulations early in the design process, engineers can try out new
technologies and see if they will improve the design.
Experimental study on physical prototypes is expensive and time consuming. Virtual
prototyping, as a new way of dynamic simulation of the controlled machine, is more
compliant with time and budget constraints of R&D industrial centers. If design choices
on the mechanical as well as on the electronic side can be tested before assembling the
physical prototype, the time to market is shortened and the knowledge of the system is
improved, obviously as long as the simulation plant is a reliable replication of reality
and the simulation tool is reasonably easy to use for people coming from different areas.
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
10
MODELING AND SIMULATION
OF MECHATRONIC SYSTEMS
2. BASICS
BASICS
MODELS AND SIMULATION: THE VIRTUAL REALITY
11
BASICS
MODELS AND SIMULATION: THE VIRTUAL REALITY
Through system modeling and simulation, the engineers have a powerful tool
which allows them to:
¾ Answer essential issues and also examine the border areas without risk
¾ Test in advance the characteristics and modify if necessary, when the system is a
concept in the design process.
Besides their advantages, the modeling and simulation also have some pitfalls:
¾ Too simple model can not describe all aspects of the real system (process)
¾ Too complex
p model requires
q too much time and effort in the creation and
simulation
¾ A model can also be not valid
¾ Selection of appropriate integration algorithm is very important and only in this
way a correct simulation is ensured.
BASICS
MODELS AND SIMULATION:
THE VIRTUAL REALITY
12
BASICS
MODELS AND SIMULATION: THE VIRTUAL REALITY
There are actually two distinct models of an actual dynamic physical system and the
distinction between them is most important
¾ Ph
Physical
i l model
d l – an imaginary
i i physical
h i l systemt – a slice
li off reality,
lit which
hi h isi an approximation
i ti
of the actual system capturing the essential elements in as much detail as the need for the
model requires. In modeling dynamic physical systems we use engineering judgment and
simplifying assumptions to develop a physical model.
¾ Mathematical model – The laws of nature (physics, chemistry, biology) are applied to the
physical model (not the physical system) and the mathematical equations describing the
system are derived.
Hierarchy of Models, depending on the particular need for the model
p , , y
more‐complex, more‐realistic, less‐easily‐solved
Truth Design
Model Model
less ‐complex, less‐realistic, more‐easily‐solved
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
BASICS
MODELS AND SIMULATION: THE VIRTUAL REALITY
13
BASIC CONCEPTS
System
Control
C l Inputs
I
Subsystem: a component of a larger system
A system is a defined part of the real world. Essential for defining a system is
the system boundary to the environment. Interactions with the environment are
described by system inputs and system outputs.
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
BASIC CONCEPTS
For the modeling it is necessary to abstract the given real problem, i.e. to
y
define a suitable system, which can then be used as a model for the original
g
problem. It can be noted here that the experience is playing a great role in
model development
14
BASIC CONCEPTS
TYPES OF MATHEMATICAL MODELS
Input--output model versus state space model
Input
Inputs, u: External influences on the
system
y ((force, current, …))
Outputs, y: Variables of interest to
be calculated or measured (position,
velocity, …)
Input‐output system model
Input-output models, regardless of the complexity of the context, described the output
variables y directly by the inputs u. A system is considered as a device that
transformed inputs to outputs.
The state space
p model includes additional internal variables – state variables,, x
State variables, x: Represent the status or memory of the system.
The state is a collection of variables that summarize the past of a system for the
purpose of prediction the future.
Initial states x(t0) and inputs u(t) completely determine future outputs y(t) and
states x(t), t≥t0 .
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
BASIC CONCEPTS
TYPES OF MATHEMATICAL MODELS
Static versus dynamic systems
In a static system, the outputs are defined by algebraic combinations of the inputs.
Dependencies of variables upon one another are fixed (independent of time).
Example: V=i R
and even V(t) =i(t)R
that is, the fact that current must be multiplied by resistance to
give voltage (the dependency) is independent of time.
In dynamic systems, the output variables due to memory effects show complex
dependencies. The present output of the system depends on past inputs.
Dependencies of variables upon one another change with time.
A slightly narrower definition: A dynamic system is a system that is described by
differential and/or difference equations.
Example:
A capacitor connected to a resistor with an external voltage V
The voltage over the capacitor depends on the charge and thereby
on earlier values of the current and voltage V
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
15
BASIC CONCEPTS
TYPES OF MATHEMATICAL MODELS
A (loose) classification of dynamic models
BASIC CONCEPTS
TYPES OF MATHEMATICAL MODELS
Lumped versus Distributed parameters
16
BASIC CONCEPTS
TYPES OF MATHEMATICAL MODELS
Linear versus nonlinear models
Th
The mathematical
th ti l description
d i ti off a linear
li model
d l consists
i t off a li
linear combination
bi ti
of inputs and outputs. Linear models, both analytically and numerically, are
much more efficient to deal with, especially stability analysis can be performed
easily and closed. Unfortunately, linearity is only one ideal shape, real systems
are almost always non-linear.
All other models are called nonlinear. Nearly all physical elements or systems
are inherently nonlinear if there are no restrictions at all placed on the
allo able values
allowable al es of the inp
inputs,
ts ee.g.,
g sat
saturation,
ration dead-zone,
dead one sq square-law
are la
nonlinearities
BASIC CONCEPTS
TYPES OF MATHEMATICAL MODELS
Linear versus nonlinear models
A linear system satisfies the properties of superposition and homogeneity
The superposition property states that for a system initially at rest with zero energy
the response to several inputs applied simultaneously is the sum of the individual
responses to each input applied separately
When the system at rest is subjected to an excitation x1(t), it provides a response
y1(t). Furthermore, when the system is subjected to an excitation x2(t), it provides a
corresponding response y2(t). For a linear system, it is necessary that the excitation
x1(t) + x2(t) result in a response y1(t) + y2(t). This is usually called the principle of
superposition.
The property of homogeneity: the magnitude scale factor must be preserved, i.e.
multiplying
lti l i theth inputs
i t by
b any constant
t t multiplies
lti li the
th outputs
t t byb the
th same constant.
t t
For a system with an input x(t) that results in an output y(t), the response of a linear
system to a constant multiple β of an input x must be equal to the response to the
input multiplied by the same constant so that the output is equal to β y
Non-linear systems do not satisfy both these criteria
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
17
BASIC CONCEPTS
TYPES OF MATHEMATICAL MODELS
Linear versus nonlinear models
Often, the theoretical modeling goes through a nonlinear model, which is then linearized
around an operating point. If the values of the inputs are confined to a sufficiently small range,
th original
the i i l nonlinear
li model
d l off the
th system
t may often
ft bbe replaced
l d bby a lilinear model
d l whose
h
response closely approximates that of the nonlinear model. A linear approximation is as
accurate as the assumption of small signals is applicable to the specific problem.
Example:
The normal operating point of the system consists of mass M sitting on a nonlinear spring is
the equilibrium position that occurs when the spring force balances the gravitational force M g
(g is the gravitational constant). Thus, f0 = M g.
For the nonlinear spring with f = y 2, the equilibrium
position ( g))1/2. The
i i iis y0 = (M h li
linear model
d l ffor small
ll
deviation is
∆f = m ∆ y, where
Thus, m = 2 y0.
BASIC CONCEPTS
TYPES OF MATHEMATICAL MODELS
Continuous versus discrete models
The distinction continuous – discrete dates back to the controversy between analog
((=continuous)) and digital
g ((=discrete)) simulation. However, use of these attributes
without further precision may causes confusion, so it should be avoid. Both, dynamic
systems and models have dependent and independent variables and one, several or all
may change continuously or in discrete way.
The contrast continuous-time and discrete-time is not a precise. Systems may change
at discrete instants of time in a deterministic manner or, such changes may occur
stochastically. Therefore, it is better to make distinction between three properties:
continuous-time and discrete-time − discrete-event − hybrid: There are systems
which change continuously with time.time Other systems change only at certain instants
of time or during rather short intervals. Moreover, there are systems subjected to a
sequence of countable events where it can be assumed that nothing of interest take
place between them (discrete-event system or model, respectively). Furthermore,
there are systems where both continuous time and discrete-events are present (hybrid
systems).
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
18
BASIC CONCEPTS
TYPES OF MATHEMATICAL MODELS
Continuous--time versus discrete-
Continuous discrete-time models
A mathematical model that describes the relationship between time continuous signals
is called time continuous. Differential equations
q are often used to describe such a
relationship.
A model that directly expresses the relationships between the values of the signals at
the sampling instants is called a discrete time or sampled model. Such a model is
typically described by difference equation.
BASIC CONCEPTS
TYPES OF MATHEMATICAL MODELS
Continuous--time versus discrete-
Continuous discrete-time models
Example
A continuous-time model of a damped linear oscillator is given by the differential equation
The discretization of this model with a sampling time Ts =0.25 s results in a difference
equation of the form
19
BASIC CONCEPTS
TYPES OF MATHEMATICAL MODELS
Deterministic versus stochastic models
Deterministic system - all system inputs are explicitly known during the time and the
system parameters are either constant or their variations are also known
known. A model is
called deterministic if it works with an exact relationship between measurable and
derived variables and expresses itself without uncertainty. Deterministic systems
show in principle predictable behavior, if modeled exactly; the future behavior can
be computed from its present state and the known influence on it.
Stochastic system – the system inputs or parameters are known only from statistical
measurements or can be specified only probabilistically. A model is stochastic if it
works with uncertainty or probability concepts. A stochastic, mathematical model
contains quantities that are described using stochastic variables or stochastic
processes.
The stochastic models are especially important because in every measurement
noise occurs. To get models or to estimate optimal experimental conditions from these
noisy measurements, the stochastic system theory must be considered. The important
area of system identification is therefore also dependent on stochastic models.
BASIC CONCEPTS
TYPES OF MATHEMATICAL MODELS
Summary
The most realistic physical model of a dynamic system leads to differential equations
of motion that are:
¾ nonlinear, partial differential equations with time-varying and space-varying
parameters
¾ These equations are the most difficult to solve.
The simplifying assumptions lead to a physical model of a dynamic system that is less
realistic and to equations of motion that are:
¾ linear, ordinary differential equations with constant coefficients
¾ These
Th equations
ti are easier
i tot solve
l andd design
d i with
ith
This dilemma between easy-to-handle and realistic has been formulated very nicely
by Pindyck already in 1972: ‘Our preoccupation with linear time-invariant systems is not
a reflection of a belief in a linear time-invariant real world, but instead a reflection of the
present state of the art of describing the real world’.
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
20
BASIC CONCEPTS
TYPES OF MATHEMATICAL MODELS
BASIC CONCEPTS
MODEL VALIDATION
Model validation procedure After the model creation, it must be examine whether the
model fulfills its purpose well, i.e. whether the model reflects
the reality sufficiently well. A model is not useful until its
validity has been tested and established.
Models have been developed to help in solving certain
problems. We call a model that is useful in this way valid with
regard to the purpose in mind. Deciding if a certain model is
valid is called model validation.
The model validation is not a one step, but an iterative process
that is closely associated with the actual modeling task.
21
BASIC CONCEPTS
Simulation models are a special subset of mathematical or physical models that allow
the user to ask "what if" questions about the system. Changes are made in the physical
conditions
diti or their
th i mathematical
th ti l representation
t ti andd the
th modeld l is
i run many times
ti to
t
"simulate" the impacts of the changes in the conditions. The model results are then
compared to gain insight into the behavior of the system.
The form in which a model must be brought for a simulation crucially depends on the
simulation software that is used. In graphical interfaces, a block diagram representation
is sufficient (e.g. Simulink), other programs require a specific mathematical description
of programming (Matlab, ACSL). Nevertheless, the essential core of a simulation is
the mathematical description which is completely platform independent.
The simulation provides a numerical experiment on a suitably prepared model.
Each experiment must provide the same result under the same conditions regardless of
experimenter, time and place of performing. But all experiment defining parameters
must be known. Therefore, it is particularly important the simulation parameters such
as initial conditions, integration algorithm, step size, tolerances, etc. to be saved and
reproducible.
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
22
MODELING AND SIMULATION
OF MECHATRONIC SYSTEMS
3. INTRODUCTION TO
MATLAB, Simulink
and LabVIEW
23
INTRODUCTION TO MATLAB, SIMULINK AND LABVIEW
INTRODUCTION TO MATLAB
MATLAB Environment
Command window
Variable browser
Click on the MATLAB
icon/start menu initialises
the Matlab environment:
The main window is the
dynamic command
interpreter which allows
the user to issue Matlab
commands
The variable browser
shows which variables
currently exist in the
workspace
Command history
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
24
INTRODUCTION TO MATLAB, SIMULINK AND LABVIEW
INTRODUCTION TO MATLAB
Vectors
Basic operations on vectors:
Manipulating vectors is almost as easy as creating them.
• For example, suppose you would like to add a constant (e.g. 3) to each of the elements in
vector 'a'. The equation for that looks like:
b=a+3
MATLAB should return:
b=
4 5 6 7 8 9 12 11 10
• Now suppose, you would like to add two
vectors together. If the two vectors are
the same length, it is easy. Simply add the
the same length, it is easy. Simply add the
two as shown below:
c=a+b
c=
5 7 9 11 13 15 21 19 17
• Subtraction of vectors of the same length works exactly the same way
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
sin(pi/4)
ans =
0.7071
To determine the usage of any function, type help [function name] at the
Matlab command window.
25
INTRODUCTION TO MATLAB, SIMULINK AND LABVIEW
INTRODUCTION TO MATLAB
Plotting
Suppose you wanted to plot a sine wave
as a function of time.
¾ First make a time vector
t=0:0.25:7;
¾ compute the sin value at each time
y = sin(t);
plot(t,y)
The plot command has extensive add-on capabilities
Recommendation: visit the plotting page to learn more about it
Two Useful Symbols:
¾ Semicolon ; (If a semicolon is typed at the end of a command, the output of the command
is not displayed).
¾ Percent Sign % (When the % is typed in the beginning of a line, the line is designated as a
comment. Comments are frequently used in programs to add explanations or descriptions).
If the polynomial is missing any coefficients, you must enter zeros in the
appropriate place in the vector.
y = [1 0 0 0 1]
26
INTRODUCTION TO MATLAB, SIMULINK AND LABVIEW
INTRODUCTION TO MATLAB
Polynomials
27
INTRODUCTION TO MATLAB, SIMULINK AND LABVIEW
INTRODUCTION TO MATLAB
C = B'
Matrices
C =
Transpose 1 5 9
2 6 10
The transpose of a matrix can be found 3 7 11
using the apostrophe key 4 8 12
E = [1 2;3 4]
Matrix Inverse X = inv(E)
In MatLab, we execute inv(E) to
X =
find the inverse of the matrix E
-2.0000 1.0000
1 5000
1.5000 -0.5000
-0 5000
Determinant E = [1 2;3 4]
In MatLab, we execute det(E) to det(E)
find the determinant of the matrix E ans =
-2
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
28
INTRODUCTION TO MATLAB, SIMULINK AND LABVIEW
INTRODUCTION TO MATLAB
E = [1 2;3 4];
Matrices E.^3 % element-by-element cubing
ans =
Matrix Powers 1 8
If E is a matrix
matrix, the operation E. 2 squares
E ^2 27 64
each element in E. To square the matrix, E^3 % multiply matrix by itself
i.e., compute E*E, E must be a square ans =
matrix and we use the operation E^2. If you 37 54
81 118
have a square matrix, like E, you can also eig(E)
multiply it by itself as many times as you ans =
like by raising it to a given power. -0.3723
5.3723
You can also find the eigenvalues of a matrix.
p = poly(E)
The "poly" function creates a vector that p =
includes the coefficients of the characteristic 1.0000 -5.0000 -2.0000
polynomial. Remember that the eigenvalues roots(p)
of a matrix are the same as the roots of its ans =
characteristic polynomial. 5.3723
-0.3723
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
The file must be saved before it can be executed. To execute it, chose the Run
icon, or type the file name in the Command Window and press Enter.
29
INTRODUCTION TO MATLAB, SIMULINK AND LABVIEW
INTRODUCTION TO MATLAB
Getting help in MATLAB
MatLab includes extensive help tools, which are especially useful for
interpreting function syntax.
30
INTRODUCTION TO MATLAB, SIMULINK AND LABVIEW
INTRODUCTION TO SIMULINK
Starting SIMULINK
31
INTRODUCTION TO MATLAB, SIMULINK AND LABVIEW
INTRODUCTION TO SIMULINK
Basic Elements
There are two major classes of items in Simulink:
¾ Blocks are used to ggenerate,, modify,
y, combine,, output,
p , and display
p y signals;
g ; and
¾ Lines are used to transfer signals from one block to another.
Blocks - There are several general classes of blocks:
¾ Sources: Used to generate various signals
¾ Sinks: Used to output or display signals
¾ Discrete: Linear, discrete-time system elements (transfer functions, state-space
models, etc.)
¾ Linear: Linear, continuous-time system elements and connections (summing junctions,
gains, etc.)
¾ Nonlinear: Nonlinear operators (arbitrary functions, saturation, delay, etc.)
¾ Connections: Multiplex, Demultiplex, System Macros, etc.
Lines - transmit signals in the direction indicated by the arrow. Lines must always transmit
signals from the output terminal of one block to the input terminal of another block.
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
32
INTRODUCTION TO MATLAB, SIMULINK AND LABVIEW
INTRODUCTION TO SIMULINK
Simple Example
The simple model consists of three blocks: Step, Transfer Fcn, and Scope. The Step
is a source block from which a step input signal originates.
originates This signal is
transferred through the line in the direction indicated by the arrow to the Transfer
Function linear block. The Transfer Function modifies its input signal and outputs
a new signal on a line to the Scope. The Scope is a sink block used to display a
signal much like an oscilloscope.
This dialog box contains fields for the numerator and the
denominator of the block's transfer function. By entering a
vector containing the coefficients of the desired numerator or
denominator polynomial, the desired transfer function can be
entered. For example, to change the denominator to s^2+2s+1,
enter the following into the denominator field: [1 2 1].
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
33
INTRODUCTION TO MATLAB, SIMULINK AND LABVIEW
INTRODUCTION TO SIMULINK
Simple Example
Modifying Blocks
Running Simulations
34
INTRODUCTION TO MATLAB, SIMULINK AND LABVIEW
INTRODUCTION TO SIMULINK
Simple Example
Configuration Parameters
Now, we will change the parameters of the system and simulate
the system again. Double-click on the "Transfer Fcn" block in the
model window and change the denominator to
[1 20 400]
Re-run the simulation and you should see what appears as a flat
line in the scope window. Hit the autoscale button, and you
should see the following in the scope window.
Notice that the autoscale button only changes the vertical axis. Since the new transfer function has
a very fast response, it is compressed into a very narrow part of the scope window. This is not
really a problem with the scope, but with the simulation itself. Simulink simulated the system for
a full ten seconds even though the system had reached steady state shortly after one second.
To correct this, you need to change the parameters of the simulation itself.
In the model window, select Configuration Parameters from the
Simulation menu.
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
35
INTRODUCTION TO MATLAB, SIMULINK AND LABVIEW
INTRODUCTION TO LABVIEW
36
INTRODUCTION TO MATLAB, SIMULINK AND LABVIEW
INTRODUCTION TO LABVIEW
VI Front Panel Front Panel Icon
Toolbar
• When you run a VI, you must
have the front panel open so Boolean
that you can input data to the Control Graph
executing program. Legend
• The front panel is where you
see your program’s output.
Front Panel Waveform
• Controls = Inputs Graph
• Indicators = Outputs Scale
Plot Legend
Legend
g
¾ Block Diagram
• Accompanying “program” for front panel
• Components “wired” together.
37
INTRODUCTION TO MATLAB, SIMULINK AND LABVIEW
INTRODUCTION TO LABVIEW
Block diagram
Block
The block diagram window Diagram
Toolbar Divide
de
h ld the
holds h graphical
hi l source Function
code of a LabVIEW VI – it is SubVI
the actual executable code Graph
Terminal
• You construct the block
diagram by wiring together Wire
Data
objects that perform specific
functions.
While Loop Numeric Timing Boolean Control
• The various components of Constant Function Terminal
Structure
a block diagram are
In this block diagram, the subVI Temp calls the subroutine which retrieves
terminals, nodes and wires. a temperature from a Data Acquisition (DAQ) board. This temperature is
plotted along with the running average temperature on the waveform graph
Temperature History. The Power switch is a boolean control on the Front
Panel which will stop execution of the While Loop. The While Loop also
contains a Timing Function to control how frequently the loop iterates.
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
38
INTRODUCTION TO MATLAB, SIMULINK AND LABVIEW
INTRODUCTION TO LABVIEW
Three LabVIEW Palettes
¾ The Tools palette is available on the front panel and the block diagram.
A tool is a special operating mode of the mouse cursor.
Automatic Selection Tool
Operating Tool Scrolling Tool
Positioning/Resizing Tool Breakpoint Tool
Labeling Tool Probe Tool
Wiring Tool Color Copy Tool
Shortcut Menu Tool Coloring Tool
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
39
INTRODUCTION TO MATLAB, SIMULINK AND LABVIEW
INTRODUCTION TO LABVIEW
LabVIEW Palettes
¾ The Controls palette
Use the Controls palette to place
controls and indicators on the front
panel.
• Select View » Show Controls
Palette or right-click the front
panel workspace to display the
Controls palette
• I th
In the front
f t panell mode,
d right
i ht
click any empty place, the
“control palette” will be shown.
After you choose proper screen,
you can pin that screen
40
INTRODUCTION TO MATLAB, SIMULINK AND LABVIEW
INTRODUCTION TO LABVIEW
Status Toolbar
Additi
Additional
l Buttons
B tt on the
th Di
Diagram Toolbar
T lb
Run Button
Execution Highlighting Button
Continuous Run Button
Retain Wire Values Button
Abort Execution
Step Function Buttons
• Click the Run button to run the VI. While the VI runs, the Run button appears with a black arrow if the VI is a top-level VI,
meaning it has no callers and therefore is not a subVI.
• Click the Continuous Run button to run the VI until you abort or pause it. You also can click the button again to disable
continuous running.
• While the VI runs, the Abort Execution button appears. Click this button to stop the VI immediately.
• Click the Pause button to pause a running VI. When you click the Pause button, LabVIEW highlights on the block diagram the
location where you paused execution. Click the Pause button again to continue running the VI.
• Select the Text Settings pull-down menu to change the font settings for the VI, including size, style, and color.
• Select the Align Objects pull-down menu to align objects along axes, including vertical, top edge, left, and so on.
• Select the Distribute Objects pull-down menu to space objects evenly, including gaps, compression, and so on.
• Select the Resize Objects pull-down menu to change the width and height of front panel objects.
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
41
INTRODUCTION TO MATLAB, SIMULINK AND LABVIEW
INTRODUCTION TO LABVIEW
Help Options
Context Help
• Online help
• Lock help
• Simple/Complex Diagram help
• Ctrl + H
Online reference
• All menus online
• Pop up on functions in diagram to access online info directly
42
MODELING AND SIMULATION
OF MECHATRONIC SYSTEMS
4. THEORETICAL MODELING
THEORETICAL MODELING
MODEL PARAMETERS AND SIGNALS
43
THEORETICAL MODELING
MODEL PARAMETERS AND SIGNALS
In systems/models, there are usually signals and variables that influence other variables
in the system, but are not themselves influenced by the behavior of the system. Those
variables are called external signals
signals. In a block diagram the external signals are always
marked by arrows coming from outside.
An external signal can be one of two types:
¾ Input or control signal: An external signal in the system whose time
variations we can choose. Denoted by u1(t), u2(t) ... uR(t). If we
assign these inputs in vector form, we obtain the input vector u(t)
¾ Disturbance signal: An external signal
in the system
y that we cannot influence. Disturbance
Denoted by z1(t), z2(t) . . . zQ(t) , Inputs System
Subsystem Outputs
respectively
Control System
Inputs
THEORETICAL MODELING
MODEL PARAMETERS AND SIGNALS
Internal variable: A variable in the system that is neither an output nor an external
signal. In a system there is always a (not unique) number of internal or system state
variables that allow a complete description
Disturbance
off system
t dynamics.
d i If we assigni these
th Inputs System
states in vector form, we obtain the state Subsystem Outputs
vector x(t)
Control System
Inputs
44
THEORETICAL MODELING
PHASES OF MODELING
THEORETICAL MODELING
PHASES OF MODELING
Phase 1: Structuring the Problem
Phase 1 consists of an attempt to divide the system into subsystems, an effort to
determine cause and effect
effect, what variables are important and how they interact.
interact
When doing this work, it is important to know the intended use of the model.
The result of phase 1 is a block diagram or some similar description. This phase
puts the greatest demands on the modeler in terms of the understanding of and
intuition for the physical system. It is also in this phase that the level of
complexity and degree of approximation are determine.
In summary, Phase 1 can be formulated by the following requirements:
¾ Determine the external signals and outputs of the system. Decide what
internal variables are important for the system description
¾ Formulate the interaction between external signals, internal variables and
outputs using a block diagram
For more complex systems, it is more efficient to first divide the system into subsystems and
then divide the subsystems further into blocks.
45
THEORETICAL MODELING
PHASES OF MODELING
Phase 2: Setting up the Basic Equations
Phase 2 involves the examination of the subsystems, the blocks, that the
structuringg of pphase 1 pproduced. The relationships
p between constants and variables
in the subsystems have to be formulated. For this purpose, those laws of nature
and basic physical equations that are assumed to hold in the appropriate areas are
used. This often means that certain approximations and idealizations (point mass,
ideal gas, and the like) have to be made in order to avoid too complicated
expressions. For non technical systems, for which generally accepted basic
equations are often lacking, this phase gives the opportunity for new hypotheses
and innovative thinking.
A proven approach in formulating the basic equations of a block or subsystem is :
¾ Writing down the conservation laws that are relevant for the particular block
¾ Using appropriate constitutive relations to express the conservation laws by
means of the model variables. A dimension control at this point eliminates
tedious debugging later
¾ It may be possible to carry out a linearization of the equations at this point
THEORETICAL MODELING
PHASES OF MODELING
Phase 3: Forming the final model
Phase 3 in contrast to the other phases, is a more formal step aiming at the suitable
organization of the equations and relationships left by phase 2. Even if the model in some
sense is
i ddefined
fi d already
l d after
ft phase
h 2,
2 this
thi step
t isi usually
ll necessary to
t give
i a modeld l suitable
it bl
for analysis and simulation. It is not always necessary to carry the work all the way to an
explicit form. For the purpose of simulation it might be enough to achieve state-space
models for the subsystems together with instructions for the interconnection.
State-Space Model Transfer Function
1. Suitable choice of state variables 1. Selection of input signal ui(t) and output
(state vector x(t)) signal yj(t)
2. Express the time derivative of the 2. Laplace transform of differential equations
state vector dx(t)/dt by the state 3. Forming the (algebraic) equations with
vector x(t) itself and the input vector elimination of all variables except Ui(s)
u(t) and Yj(s)
3. Express the output vector y(t) by the 4. Formulate the transfer function
state vector x(t) and input vector u(t)
46
THEORETICAL MODELING
SOME BASIC RELATIONSHIPS IN PHYSICS
Electrical Systems
For many engineering applications it turns out that the same type of
equations appear despite the diversity of the physical systems Starting from
these analogies it is possible to do systematic modeling for a broad class of
systems. Because of these analogies, the electrical systems are discussed
here in the first place.
Consider electrical circuits consisting of resistors, capacitors, inductors, and
transformers. The basic equations used to describe such circuits consist of
relationships between the fundamental quantities:
¾ Voltage u (volt, V)
¾ Current
C t i (ampere,
( A)
Electrical components are described in
terms of their voltage / current relations.
RLC parallel circuit
RLC series circuit
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
THEORETICAL MODELING
SOME BASIC RELATIONSHIPS IN PHYSICS
Electrical Systems
Memory elements
¾ In these (idealized) elements,
elements energy can be stored.
stored
¾ An ideal inductor is described by:
¾ An ideal capacitor is described by:
47
THEORETICAL MODELING
SOME BASIC RELATIONSHIPS IN PHYSICS
Electrical Systems
Resistance element
Transformer
For a linear resistor with resistance R
An ideal transformer transforms
(ohm, Ω) the relationship between
voltage and current in such a way that
current and voltage is given by the well
their product is constant:
known Ohm's law:
THEORETICAL MODELING
SOME BASIC RELATIONSHIPS IN PHYSICS
Electrical Systems
Other basic laws
Kirchhoff's
Ki hh ff' laws
l are basic
b i tto th
the analyses
l off
electrical circuits:
a) Kirchhoff's Current Node Law RLC parallel circuit
In a given node the sum of RLC series circuit
currents must be zero:
48
THEORETICAL MODELING
SOME BASIC RELATIONSHIPS IN PHYSICS
Mechanical Systems
Motion and force are concepts used to describe the behavior of engineering systems
that employ mechanical components aspects that can be taught
taught. Motion is a term
used to describe the movement of a point relative to another and it is described using
the terms distance, velocity, and acceleration.
Motion in mechanical systems Mechanical systems can be of two
can be: types:
¾ Translational ¾ Translational systems.
¾ Rotational, or ¾ Rotational system.
¾ Combination of above
THEORETICAL MODELING
SOME BASIC RELATIONSHIPS IN PHYSICS
Mechanical Systems
Translational Mechanical Systems
Mechanical translation is governed by the laws of mechanics,
mechanics which are
relationships between the variables:
Force F (newton, N)
Velocity v (meters per second, m/s)
In general, these quantities are three dimensional vectors. Most of the
following relationships can be formulated as vector equations, but for
simplicity here are limited to the representation of scalar relations.
49
THEORETICAL MODELING
SOME BASIC RELATIONSHIPS IN PHYSICS
Mechanical Systems
Translational Mechanical Systems
Memory elements
¾ For an ideal (linear) spring, the reciprocal
¾ Even with mechanical translational elements, value of spring constant 1/k [m/N] can be
energy can be saved; the ideal inductance considered as capacity.
here is obviously the mass m [kg] .
Newton's second law gives:
The spring force is proportional to the
The above equation can elongation (or compression), i.e. it is
also be written as proportional to the integral of the
difference in velocity between the end
points:
i t
In the previous equations, F(t) has to be
understood as a sum of forces acting on a body
Energy stored in a moving mass is Energy stored in a spring is potential
kinetic energy Ek [J] : energy Ep [J] :
THEORETICAL MODELING
SOME BASIC RELATIONSHIPS IN PHYSICS
Mechanical Systems
Translational Mechanical Systems
¾ Resistance element ¾ Transformer
At translational motion in real systems, The ideal transformer corresponds to
friction is always present. In general, a rigid lever. For an ideal transformer with
friction is described by: the lever ratio α, therefore, the following
The most common case perhaps is equations can be applied:
dry friction:
50
THEORETICAL MODELING
SOME BASIC RELATIONSHIPS IN PHYSICS
Mechanical Systems
Translational Mechanical Systems
¾ Other
Oth basic
b i llaws
For a translational mechanical system at rest, the sum of
attacking forces is always zero:
THEORETICAL MODELING
SOME BASIC RELATIONSHIPS IN PHYSICS
Mechanical Systems
Rotational Mechanical Systems
Mechanical systems with rotational parts like motor and gear
boxes, are very common. For these systems the laws of
mechanics relate the basic variables:
Torque M (newton-meter, Nm) M,θ
Angular velocity ω (radians per second, s-1)
M,θ
¾ Memory elements
The ideal inductance here is the moment of inertia J [Nm/s2], while
the torque on the axis is proportional to the angular acceleration, i.e.:
51
THEORETICAL MODELING
SOME BASIC RELATIONSHIPS IN PHYSICS
Mechanical Systems
Rotational Mechanical Systems
¾ Memory elements
Torsion is the twisting of an object due to an applied torque.
The torsional stiffness k [Nm] is defined by the relationship
between the angular velocity and the torque: M,θ
M,θ
The torsion of an axis gives rise to
a torque described by:
THEORETICAL MODELING
SOME BASIC RELATIONSHIPS IN PHYSICS
Mechanical Systems
Rotational Mechanical Systems
¾ Resistance element
The rotational friction is a function of the angular velocity:
with different functions r analogous to translational friction.
The power dissipation at rotation is:
¾ Transformer
The ideal transformer corresponds to a friction-free
pair of gears. For an ideal transformer with the ratio α,
therefore, the following equations can be applied:
52
THEORETICAL MODELING
SOME BASIC RELATIONSHIPS IN PHYSICS
Fluid Systems
The fluid systems discussed here are limited to flows of incompressible fluids in
pipes and tanks. (Incompressible fluids are those for which the volume is
unaffected by the pressure.)
Typical applications are in chemical industrial systems and hydraulic systems.
The treatment of compressible fluids is more complicated, partly because there
are temperature changes when the volume is altered.
THEORETICAL MODELING
SOME BASIC RELATIONSHIPS IN PHYSICS
Fluid Systems
Memory elements
¾ For a fluid flow through a tube, the pressure difference p between the end points of
the tube results in a force that accelerates the fluid.
fluid
The force is
where A is the cross-sectional area. If the density of the fluid
is ρ, than the mass to be accelerated is ρlA. Newton's force Flow through a tube. p1 and p2 are the
law gives: pressures at the end points of the tube
where v(t) is the velocity of the fluid. The velocity corresponds to a fluid flow Q = v(t)A,
therefore the above equation can be written as:
or in integral notation:
where The frictionless flow through a tube
corresponds to a stored kinetic energy
is the fluid inertia [kg/m4] represents the pipe. E [J] defined by
53
THEORETICAL MODELING
SOME BASIC RELATIONSHIPS IN PHYSICS
Fluid Systems
Memory elements
THEORETICAL MODELING
SOME BASIC RELATIONSHIPS IN PHYSICS
Fluid Systems Resistance element
When liquid flows through a tube there is normally a loss of power through
friction against
g the walls and internal friction in the fluid. This leads to a ppressure
drop over the tube. Conversely, it can be said that a pressure drop is needed to
maintain a certain flow. The pressure drop depends on the flow. In general it can
be written:
The function r(Q) depends on the tube geometry.
If the tube is thin or filled with a porous medium, d'Arcy's law
applies:
where Rf [kg/m4s] is called the flow resistance. If the tube
contains a sudden change in area (an orifice or a valve), than: p1 Q p2
with a constant H.
p = p1 − p 2
The energy loss through friction Flow through an orifice
phenomena is given by:
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
54
THEORETICAL MODELING
SOME BASIC RELATIONSHIPS IN PHYSICS
Fluid Systems
Transformer
The ideal transformer
f corresponds
p to a friction-free
double piston. For an ideal transformer with the ratio α,
therefore, the following equations can be applied:
THEORETICAL MODELING
SOME BASIC RELATIONSHIPS IN PHYSICS
Thermal Systems
Thermal systems involve heating of objects and transport of thermal energy. The laws
governing these phenomena are typically expressed as relationships between the
quantities:
Temperature T (kelvin, K)
Heat flow rate q (watt, W)
Other basic laws
Memory elements
Heating of a body means that the Heat transfer between two bodies with
temperature increases as heat flows temperatures T1 and T2 is often assumed to
into it. be proportional to the temperature difference
∆T = T2 − T1 :
C [J/K] is the thermal capacity
W [J/Ks] is called the heat transfer coefficient
This relationship
Thi l ti hi can bbe written
itt as:
Furthermore, the sum of all heat flow rates at
one point must be zero:
55
THEORETICAL MODELING
SOME BASIC RELATIONSHIPS IN PHYSICS
Analogies between physical sub-
sub-areas
Obviously there are strong analogies between the different areas of modeling. A
common basic structure can therefore be found in all areas:
¾ There are always two variables sufficient to completely describe the systems,
which are commonly used as:
Effort variables e
Flow variables f
¾ The relationships between these variables have the following forms:
Effort storage: Power dissipation:
Flow storage:
S
Sum off fl
flows equall to
t zero:
Static relationship:
Sum of efforts (with signs)
Inductive energy storage:
equal to zero:
Capacitive energy storage: Transformation of variables:
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
THEORETICAL MODELING
SOME BASIC RELATIONSHIPS IN PHYSICS
Analogies between physical sub-
sub-areas
56
THEORETICAL MODELING
MODEL SIMPLIFICATION
All models contain simplifications of the real processes. The model must be
manageable for our purposes. A model with thousands of variables is impossible to
use for
f analysis
l i andd requires
i llong executioni times
i ffor simulation.
i l i Simple
i l model
d l
primarily means a model whose order (the dimension of the state vector) is small.
Simple could also mean that the relationships between variables are easily
computable or that the model is linear rather than nonlinear.
The model simplification can be done under the first two phases of modeling but
also in the completed model to reduce complexity. The model simplification can
be done by:
1. Neglect of small effects - Approximations
2. Separation of time constants
Hierarchy of Models, depending on the particular need for the model
3. Aggregation of State Variables more‐complex, more‐realistic, less‐easily‐solved
THEORETICAL MODELING
MODEL SIMPLIFICATION
57
THEORETICAL MODELING
MODEL SIMPLIFICATION
Separation of Time Constant
In the same system there are often time constants of different orders of magnitude. Still,
the interest might be focused on a certain time scale.
The following rules can be applied:
9 Concentrate the modeling on phenomena whose time constants are of interest when
considering the intended use of the model
9 Subsystems whose dynamics are considerably faster are approximated with static
relationships
9 Variables of subsystems whose dynamics are appreciably slower are approximated as
constant
By observing these rules,
rules there are two major advantages:
1. Due to the neglect of very fast and very slow dynamics, the order of the model is lower
2. A model with time constants of the same magnitude is easier to simulate numerically
For some systems there might really be interest in time constants of quite different magnitude.
In such a case, the possibility of using two different models (one for each time scale) should be
considered, and each one of them should be simplified using the preceding procedure.
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
THEORETICAL MODELING
MODEL SIMPLIFICATION
Aggregation of State Variables
A number of physical phenomena are described by partial differential equations (PDE). Typical
examples are field equations, waves, flow, and heat conduction problems. In mathematical
models of dynamic systems to be used in simulation, PDEs are often unsuitable. Often partial
differential equations are reduced to ordinary differential equations via difference
approximations of the spatial variables. This corresponds to aggregation.
58
THEORETICAL MODELING
MODEL SIMPLIFICATION
Aggregation of State Variables
Example: Heat Conduction
Consider a metal rod whose left end point is heated by an external source.
THEORETICAL MODELING
MODEL SIMPLIFICATION
Linearization
The linearization of a mathematical model is often used simplification when deviations are
viewed from an operating point (steady state, time derivatives equal to zero).
The linearization of a nonlinear dynamical system can be done analytically or numerically.
Analytical linearization
If the analytical description of a nonlinear dynamical system is given by a nonlinear ordinary
differential equation, a Taylor series expansion can be calculated, and than higher derivatives
can be neglected (this applies to the continuous non-linearities).
⎡ ( k1 ) ( k2 ) ( kn )
⎤
F ⎢ x1 , x&1 ,..., x1 , x2 , x& 2 ,..., x2 ,......., x& n ,..., xn ⎥ = 0
⎣ ⎦ Linear differential equation: ( k1 )
Taylor series around the operating point is F = a10 ∆x1 + a11 ∆x&1 + . . . . + a1k1 ∆ x1 + ( k )
∂F ∂F ∂F ( k1 ) 2
59
THEORETICAL MODELING
MODEL SIMPLIFICATION
Linearization
Example
T - output temperature
q - supplied heat flux
c - specific heat capacity of air Now we calculate the partial derivatives and
remembering that
- mass flow
Te input temperature
we obtain the linearized differential equation
The implicit form of the equation:
THEORETICAL MODELING
MODEL SIMPLIFICATION
Linearization
Numerical linearization
Prerequisite is the existence of a nonlinear simulation model. The linearization
procedure than is applying to each state and each input of the model as follows:
1. The value of the state vector in the operation point is sets as initial
condition
2. All inputs are equal to zero
3. A single state or input is excited by a disturbance of small amplitude. To do
this, the model should be integrated numerically
4. From the recorded changes in the remaining states, the corresponding
difference quotient between excited variable and the remaining variables is
determined numerically
This process leads to discrete linear state space model describing the dynamics
for small deviations around the operating point.
60
THEORETICAL MODELING
MODEL SIMPLIFICATION
61
MODELING AND SIMULATION
OF MECHATRONIC SYSTEMS
5. BOND GRAPHS
BOND GRAPHS
INTRODUCTION
62
BOND GRAPHS
EFFORTS AND FLOWES
Graphical format for bonds
Half Arrow
The basic idea of bond graphs is that many
e
models
d l can be
b ddescribed
ib d iin terms off effort
ff t Subsystem 1 Subsystem 2
variables e and flow variables f. f
Bond
Effort and flow
u F p e
i v Q f
electrical mechanical hydraulic general
Efforts and flows
The products ui, Fv, pQ, and e f have the dimension of power.
The horizontal line, the bond, is therefore interpreted as a
connection between subsystems that exchange energy.
BOND GRAPHS
EFFORTS AND FLOWES
Flow Storage
Many physical elements can be modeled as flow storage,
storage Fl storage
Flow
for example, a capacitor for electric current or a tank for
water flow. With bond graphs this is represented e
according to figure, where the C denotes the storage C
f
element (C as in capacitive).
The bond symbolizes the energy flow from the rest of e
the system into the element. If the relationship between C:β
f
e and f is linear, then the coefficient β is often
included in the graph.
graph
or
63
BOND GRAPHS
EFFORTS AND FLOWES
BOND GRAPHS
JUNCTIONS
Series Junction
Consider the electric circuit
Regardd voltage
l u as an input
i signal
i l Effort source
The energy flowing into the system is divided between the u
resistor, the capacitor, and the inductor. Se System
i
Resistor
Efforts satisfy the relation: R : R1
u − u1 − u2 − u3 = 0
u1 i
u u2 u1 i
Se s Inductor u u2
i i Se s I : L1
u3 i i i
u3 i
Capacitor
C : C1
s – represents a series connection
Power flow in an electric circuit
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
64
BOND GRAPHS
JUNCTIONS
Series Junction
IIn general,
l series
i junction
j ti (an
( s junction)
j ti ) iis characterized
h t i d bby:
¾ The same flow: f1 = f2 = . . . = fn
¾ The sum of efforts equal to zero: e1 + e2 + . . . + en = 0
s junction
BOND GRAPHS
Electric parallel circuit
JUNCTIONS
Parallel Junction
Analogously to the previous,
previous it is natural to define a
junction where e and f have changed roles. A parallel Flow source
junction (p junction) is define with the following rules: u
¾ Identical efforts : e1 = e2 = . . . = en Sf System
i
¾ Sum of flow equal to zero: R : R1
f1 + f2 + . . . + fn = 0
u i1
u u
Sf p C : C1
i i2
u i3
It is: i − i1 − i2 − i3 = 0 ,
f1 + f2 − f3 = 0 and there is the same voltage
I : L1 (effort) at all the bonds.
p junction
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
65
BOND GRAPHS
JUNCTIONS
Simplifications in Bond Graphs
In a number of cases, bond graphs can be Merging of junctions
simplified.
p For example:
p
¾ Junctions that have only two bonds
(with the half arrows pointing in the
same direction) can be removed.
¾ A direct application of the definitions
shows that two adjacent junctions of the
same kind can be merged.
Removal of junctions
BOND GRAPHS
SIMPLE BOND GRAPHS
Mechanical system
Consider the mechanical system. A body, which is moving without
friction with the velocity v, is pulled with the force F. F is regarded
as the input (effort source). In this case, all energy is stored as
kinetic energy (effort storage, an I element).
v
F
m
Effort source
F
Se System F
v Se I:m
v
66
BOND GRAPHS
SIMPLE BOND GRAPHS
F F1 Energy in spring
Se s I:m
v v
F2 v
F = F1 + F2
C : (1/k)
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
BOND GRAPHS
SIMPLE BOND GRAPHS
v
Mechanical system with spring
k F
and friction
m
In this case, the mass slides along the surface
with a certain friction. It is assumed that the
friction is a nonlinear function of the velocity
Ff (t) = r (v (t)) The energy supplied by F is R : Ff = r (v)
now divided into three components. The
friction loss is an R element. The velocity v is
Ff v
common to all bonds, that is a junction with
common flow - a series junction. F F1
Se s I:m
v v
F2 v
C : (1/k)
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
67
BOND GRAPHS
SIMPLE BOND GRAPHS
Electrical system
The voltage
g u is regarded
g as input.
p This
corresponds to an effort source.
Effort source
There is a series connection between R1 and L1,
where R1 and L1 are R and I elements u
Se System
respectively.
In the subsystem consisting of R2
I : L1 and C1 the energy is divided between
I : L1 C : C1
R2 (R element) and C1 (C element) in
a p junction (a common voltage).
u u
Se s R2 C1 Se s p
R : R1 R : R1 R : R2
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
BOND GRAPHS
TRANSFORMERS AND GYRATORS
Transformer
68
BOND GRAPHS
TRANSFORMERS AND GYRATORS
Gyrator
BOND GRAPHS
SYSTEMS WITH MIXED PHYSICAL VARIABLES
DC Motor
69
BOND GRAPHS
SYSTEMS WITH MIXED PHYSICAL
VARIABLES Inductor Rotation
DC Motor
The storages in the inductor and also
rotational energygy correspond
p to I
Source Conversion
elements, while the resistor and the
friction are R elements. Both junctions
have common flow variables, so they
are s junctions.
Resistor Friction
The conversion between electrical and
mechanical energy is a gyrator. I : L1 I:J
Assumption: a general nonlinear
relationship for the friction: M f = r (ω) MJ ω
u
Se s GY s
i i k ω
Mf ω
R : R1 R : Mf = r (ω)
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
BOND GRAPHS
SYSTEMS WITH MIXED PHYSICAL VARIABLES
Mechanical – Hydraulic System
70
BOND GRAPHS
SYSTEMS WITH MIXED PHYSICAL
VARIABLES
Mechanical – Hydraulic
System
F p
The energy flow to the right is partly Se s TF System
v1 Q1
stored in the tank and partly taken to 1/A1
the cylinder on the right. A common
pressure means a p junction.
I : m1
F p
Se s TF p
System
v1 Q1
1/A1
I : m1 C : (A3/ρg)
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
BOND GRAPHS
SYSTEMS WITH MIXED
PHYSICAL VARIABLES
F p
Mechanical – Se s TF p
System
v1 Q1
Hydraulic System 1/A1
At the cylinder to
the right there is are I : m1 C : (A3/ρg)
conversion to
mechanical energy Se R : Ff = r (v2)
which is divided
into kinetic energy F v1 Ff v2
and friction losses.
p p
s TF p TF s
Q1 Q2 v2
1/A1 A2
p v2
I : m1 C : (A3/ρg) I : m2
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
71
BOND GRAPHS
CAUSALITY : SIGNALS BETWEEN SUBSYSTEMS
BOND GRAPHS
CAUSALITY : SIGNALS BETWEEN SUBSYSTEMS
Regarding e as the input gives the block Choosing f as the input gives instead the
diagram shown in the figure following block diagram
e f f e
72
BOND GRAPHS
CAUSALITY : SIGNALS BETWEEN SUBSYSTEMS
Causality of Junction
¾ For an s junction there is a common
fl and
flow d the
h sum off the
h efforts
ff iis zero:
f1 = f2 = . . . = fn and
e1 + e2 + . . . + en = 0
All bonds of an s junction except one
shall have the causal stroke at the s Causality of an s junction
¾ For an p junction the roles of effort and flow change places and the rule
therefore becomes:
Precisely one of the bonds of a p junction shall have the causal stroke at the p.
Causality of Transformers and Gyrator
BOND GRAPHS
CAUSALITY : SIGNALS BETWEEN SUBSYSTEMS
73
BOND GRAPHS
CAUSALITY : SIGNALS BETWEEN SUBSYSTEMS
BOND GRAPHS
CAUSALITY : SIGNALS BETWEEN SUBSYSTEMS
Causality for an Electrical System
Step 5, according to the rule
we must mark causalities at the
l ft junction
left j ti
74
BOND GRAPHS
STATE EQUATIONS FROM BOND GRAPHS
A great advantage of bond graphs is that the choice of state variables is natural.
The memory of the system lies in the I and C elements. It is natural to associate
one state variable with each such element.
element
¾ For an effort storage
If we introduce above state equations for all I and C elements, we get a state-space description as
soon as all flows of C elements and all efforts of I elements are expressed in states and inputs. We
can then do calculations as if the I elements were flow sources and the C elements effort sources.
We can then propagate the signals through the graph using the causality marks as local
information whether a signal is to be regarded as an input or an output.
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
BOND GRAPHS
STATE EQUATIONS FROM BOND GRAPHS
Relations among variables for an
electrical system
75
BOND GRAPHS
STATE EQUATIONS FROM BOND GRAPHS
Relations among variables for an
electrical system
If we introduce the state variables xl= i and x2= vc,
we get directly,
directly by reading the bonds at the I and C
elements, the equations
or equivalently
BOND GRAPHS
STATE EQUATIONS FROM BOND GRAPHS
Algorithm for Equation Sorting
1. Choose a source and write its input signal in the forward list and the
equation of the other bond variable in the backward list.
list
2. Check adjacent bonds. If some variable is defined in terms of already
calculated variables, write its equation in the forward list and the
equation of the other bond variable in the backward list. Do this as far
into the bond graph as possible
3. Repeat steps 1 and 2 until all sources have been treated
4. Choose an I and write the equation in the forward list and
in the backward list
5. Do the analogy to step 2
6. Repeat steps 4 and 5 for all I elements have been processed
7. Do the analogy of steps 4, 5, and 6 for all C element
8. Do the analogy of step 2
9. Reverse the order of the backward list and put it after the forward list
76
BOND GRAPHS
STATE EQUATIONS FROM BOND GRAPHS
DC Motor
State variables:
BOND GRAPHS
STATE EQUATIONS FROM BOND GRAPHS
DC Motor
u1= u
The complete list of equations is
i2=(1/L1)x1
obtained by putting the reverse backward
list after the forward list giving i3=i2
i4=i2
M1=k i4
Bond graph for a DC motor ω2=(1/J) x2
I : L1 I:J ω3=ω2
M3 = r (ω3)
u 2 i2 M 2 ω2
u1 u4 M1 ω1=ω2
Se:u s GY s
i1 i4 ω1 u4=k ω1
k
u 3 i3 M 3 ω3 u3=R1i3
77
BOND GRAPHS
STATE EQUATIONS FROM BOND GRAPHS
DC Motor
u1= u
i2=(1/L
(1/L1)x1
i3=i2
Eliminating all variables that
i4=i2 are not states gives:
M1=k i4
ω2=(1/J) x2
= u1 −R1i3 −k ω1 = u1 − R1i3 − k ω2
ω3=ω2
= u1 −R1i3 − (k/J) x2 = u1 − R1i2 − (k/J) x2
M3 = r (ω3) = u1 −(R1/L1) x1 − (k/J) x2 = u −(R1/L1) x1 − (k/J) x2
ω1=ω2 = M1 − r (ω3)
u4=k ω1 = M1 − r (ω2) = M1 − r((1/J) x2)
u3=R1i3 = k i4 − r (x2/J) = k i2 − r(x2 /J)
= (k/L1) x1 − r(x2 /J)
i1=i2
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
BOND GRAPHS
CONCLUSIONS
78
MODELING AND SIMULATION
OF MECHATRONIC SYSTEMS
6. EXPERIMENTAL MODELING
- IDENTIFICATION
EXPERIMENTAL MODELING
- IDENTIFICATION
INTRODUCTION
79
EXPERIMENTAL MODELING
- IDENTIFICATION
BASICS OF EXPERIMENTAL MODELING
Most practical problems dealing with systems with exactly one input or output
(single-input, single-output: SISO systems). Therefore, the majority
of procedures for such systems have been designed.
Transfer Function
¾ Continuous-time domain
A linear dynamic SISO system is described by differential equation in
continuous-time domain:
(n) (m)
bn y (t ) + ...... + b1 y& (t ) + b0 y (t ) = a m u (t ) + . . . . + a1u& (t ) + a 0 u (t )
where input signal u(t) and output y(t) are continuous-time functions. If
u(t) and y(t) have the Laplace transforms U(s) and Y(s) respectively, and the
initial conditions are equal
eq al to zero
ero (u(t) (t) = 0 t ≤ 0),
( (t) = y(t) 0) than the Laplace
Transform of the above equation gives:
EXPERIMENTAL MODELING
- IDENTIFICATION
BASICS OF EXPERIMENTAL MODELING
Transfer Function
¾ Discrete-time domain
A linear dynamic SISO system in discrete-time domain is described by a
difference equation:
In both cases (continuous-time and discrete-time), the zeros of the transfer function
numerator are called zeros of the transfer function, and the zeros of the denominator
are called poles of the transfer function. Apparently, a transfer function (and thus the
dynamic system behavior) is fully described through the poles and zeros.
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
80
EXPERIMENTAL MODELING
- IDENTIFICATION
BASICS OF EXPERIMENTAL MODELING
Transfer Function
¾ Continuous-time domain By the transfer function, the dynamic
Example:
transition behavior of a linear system
A continuous time linear dynamic model is given i described
is d ib d in
i frequency
f domain.
d i
by the differential equation:
EXPERIMENTAL MODELING
- IDENTIFICATION
BASICS OF EXPERIMENTAL MODELING
Transfer Function
¾ Discrete-time domain
Example:
A discrete time linear dynamic model is given
by the difference equation:
Here, the representation is already in factored form. Relationship between input U and
Zeros and poles of the transfer function are: output Y is:
No zero point
The only pole at: p1 = 0.5
81
EXPERIMENTAL MODELING
- IDENTIFICATION
BASICS OF EXPERIMENTAL MODELING
Transfer Function
¾ Weight function and Transition function Continuous-time system
EXPERIMENTAL MODELING
- IDENTIFICATION
SIMPLE PRELIMINARY IDENTIFICATION
Step-response analysis
The first step in modeling (structuring phase) is to decide which
quantities and variables are important to describe what happens in the
system. It is then also necessary to decide, or guess, how the variables
affect each other, which time constants are important and which
relationships can approximately be described as static ones. A simple and
common kind of experiment that shows how and in what time span
various variables affect each other is called step-response analysis or
transient analysis. In such experiments the inputs vary (typically one at
the time) as a step: u(t) = u0, t < t0; u(t) = u1, t ≥ t0. The other measurable
variables in the system are recorded during this time. We thus study the
step response of the system.
82
EXPERIMENTAL MODELING
- IDENTIFICATION
SIMPLE PRELIMINARY IDENTIFICATION
Step-response analysis
The following information can be obtained from consideration of the step response:
• Concerned by the specific input outputs (variables) can be determined, and that
is especially beneficial in MIMO system. This makes it easier to draw block
diagrams for the system and to decide which influences can be neglected.
• The time constants of the system are clearly visible. From this we can see
which parts of the model can be modeled statically (since they are much faster than
the dynamics of interest).
• The system characteristics (oscillatory, weakly damped, a periodic, with dead
time)) is clear. Similarly,
y, one can see the steadyy gain.
g
Because of the easy implementation and immediate information, this method is probably the
most widely used method of identification in industrial practice.
Disadvantage of this method is that the obtained information is somewhat limited. Practical
limits in the amplitude of the input, together with disturbances and measurement errors may
make it difficult to determine quantitative models with a reasonable degree of accuracy.
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
EXPERIMENTAL MODELING
- IDENTIFICATION
SIMPLE PRELIMINARY IDENTIFICATION
Step-response analysis
Example
For a step input u(t) = ∆uσ(t) the output
is y(t).
Approaching the system behavior by a
PT1 element with time delay (structural
assumption!), the general form of the
transfer function will be:
The parameters Ks, T and Tt are determined Note: There are also methods
from the step response using the following for model structures as a PT2 element:
rules:
, ,
The parameters ∆u (input step size), ∆y (steady- and as a PTn element
state value of output), Ta (compensation time)
and Tu (delay time) can be read from Figure.
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
83
EXPERIMENTAL MODELING
- IDENTIFICATION
SIMPLE PRELIMINARY IDENTIFICATION
Frequency Analysis
This relationship is so-called Bode plot
A linear system is uniquely determined by its
clearly presented taking the frequency
impulse response or its frequency response
i ω (x-axis)
axis ( i ) llogarithmic
i h i scale,
l while
hil
G(iω) (the Laplace transform of the impulse
the amplitude gain A (ω) = | G (iω) | is
response evaluated at s = i ω).
measured in decibels. The phase shift
φ (ω) is generally indicated in degrees.
If a linear system has the transfer function In Matlab bode command exists for the
G(s) and the input is: continuous-time systems and discrete-time
systems. An example of a result from
then the stationary output will be: Matlab is shown in Fig.
EXPERIMENTAL MODELING
- IDENTIFICATION
SIMPLE PRELIMINARY IDENTIFICATION
Frequency Analysis
The method of frequency analysis is often
This is a procedure which allows easy
used to build models of systems. The
identification:
following advantages and disadvantages
1. The system has been stimulated by a
can be pointed out:
harmonic function with known frequency,
• Easy to use and requires no complicated
amplitude and phase.
data processing
2. After possible transients have faded away,
• Requires no structural assumptions about
the amplitude y0 and phase φ are measured
the system, other than it being linear
out from the output signal.
• It is easy to concentrate on frequency
3. One point in the Bode diagram is
ranges of special interest (for example
determined with obtained A(ω) and φ (ω),
around resonance frequencies)
q )
i the
i.e. th complex
l numberb G(iω
G(i 1) can bbe
• The basic result is a table or a graph of the
determined.
function G(iωk) k=0,...,M. This cannot be
4. By repeating this procedure for a number of
used directly for simulation.
different ω, we can get a good estimate of
• Frequency analysis may need long periods
the function G(iω).
of experimentation if G(iω) has to be
determined at many frequencies
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
84
EXPERIMENTAL MODELING
- IDENTIFICATION
PARAMETER ESTIMATION
EXPERIMENTAL MODELING
- IDENTIFICATION
PARAMETER ESTIMATION
Basics of Parameter Estimation
The previous equation can be written in vector notation,
which results in:
85
EXPERIMENTAL MODELING
- IDENTIFICATION
PARAMETER ESTIMATION
Basics of Parameter Estimation
In practical measurements,
however, measurement noise
al a s occur.
always occ r This problem is
illustrated in Figure. Measurement
noise n(k) always comes from
imperfections, and we only can
measure the real output
EXPERIMENTAL MODELING
- IDENTIFICATION
PARAMETER ESTIMATION
86
EXPERIMENTAL MODELING
- IDENTIFICATION
PARAMETER ESTIMATION
Least-Squares (LS) algorithm
EXPERIMENTAL MODELING
- IDENTIFICATION
PARAMETER ESTIMATION
Least-Squares (LS) algorithm
¾ Model structures
A noise model is necessary to describe the real measurement noise
noise. However,
However the
structure and parameters of this noise model is not a priori, but must first be
determined together with the transfer function of the unknown dynamical system.
The most general model, which includes all others as
special cases, is the Box-Jenkins-Model (BJ-Model).
The output Y(z) is described in the discrete frequency
domain by
87
EXPERIMENTAL MODELING
- IDENTIFICATION
PARAMETER ESTIMATION
Least-Squares (LS) algorithm
¾ Model structures
An important special case is when the properties of the
disturbance signals are not modeled, and the noise
model is chosen so that its transfer function is equal to 1.
This special case is known as an output-error model
(OE-Model) since the noise source will then be the
difference (error) between the actual output and the
noise-free output.
EXPERIMENTAL MODELING
- IDENTIFICATION
PARAMETER ESTIMATION
Least-Squares (LS) algorithm
¾ Model structures
Another popular variant is the ARMAX model (AutoRegression
with MovingAverage of white noise and eXtra input); a
common denominator for both transfer functions is assumed
88
EXPERIMENTAL MODELING
- IDENTIFICATION
PARAMETER ESTIMATION
Least-Squares (LS) algorithm
¾ Model structures
Regarding
g g the selection of appropriate
pp p model structure, some ggeneral points
p of view can
be listed:
The ARX model is the easiest to estimate since the corresponding estimation problem
is of a linear regression type. The foremost disadvantage is that the disturbance model
comes along with the system's poles. It is therefore easy to get an incorrect estimate of
the system dynamics because the A polynomial also has to describe the disturbance
properties. Higher orders in A and B than necessary may be required. If the signal-to-
noise ratio is good, this disadvantage is less important
The OE model has the advantage that the system dynamics can be described separately
andd th
thatt no parameters
t are wastedt d on a disturbance
di t b model.
d l If the
th system
t operatest
without feedback during the data collecting, a correct description of the transfer
function can be obtained regardless of the nature of disturbance. However,
minimization of the criterion function can be more difficult than in the ARMAX case.
The BJ model is the "complete model“ in which the disturbance properties are
modeled separately from the system dynamics
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
EXPERIMENTAL MODELING
- IDENTIFICATION
PARAMETER ESTIMATION
89
EXPERIMENTAL MODELING
- IDENTIFICATION
PARAMETER ESTIMATION
EXPERIMENTAL MODELING
- IDENTIFICATION
IDENTIFICATION IN CLOSED LOOP
In closed loop, various problems arise: Identification in closed loop - Indirect identification
• The controller transfer function has a full effect
on the
h iinput-output data
d
• Noise inputs act at first only to the output, but
through the feedback they are returned again to
the input: This results in a correlation between
measurement noise and input signal.
However, closed-loop parameter estimation can be
performed correctly. Two methods can be Identification in closed loop - Direct Identification
distinguished:
1. Indirect identification: Only the output y(k) is
measured, and the control variable must be w(k)=0
2. Direct Identification: Both the output y(k) and the
manipulated variable u(k) are measured, ant there
is no restrictions for the reference variable w(k).
90
EXPERIMENTAL MODELING
- IDENTIFICATION
IDENTIFICATION AS A TOOL FOR MODEL BUILDING
EXPERIMENTAL MODELING
- IDENTIFICATION
IDENTIFICATION AS A TOOL FOR MODEL BUILDING
91
EXPERIMENTAL MODELING
- IDENTIFICATION
IDENTIFICATION AS A TOOL FOR MODEL BUILDING
EXPERIMENTAL MODELING
- IDENTIFICATION
IDENTIFICATION AS A TOOL FOR MODEL BUILDING
92
EXPERIMENTAL MODELING
- IDENTIFICATION
IDENTIFICATION AS A TOOL FOR MODEL BUILDING
Model Structure
The advantages and disadvantages of different model structures (ARX, ARMAX, BJ,
OE state space) have already been discussed above.
OE, above In practice usually there is not
enough information to select a priori the most suitable model. Therefore, we tried
with different model structures to obtain a good result. The validation of the various
models is discussed later.
Model Order
To determine the order and delays of a model, the following procedure is quite useful:
• First get a reasonable estimate of the delay. Pick the delay that gives the best model
performance (sum of squared prediction errors on a validation set)
• Then test manyy ARX models of different orders with this delay. y Pick the orders that
give the best model performance
• The model may be of unnecessarily high order to describe the system dynamics, since
the poles of an ARX model also describe the noise properties. Thus plot the zeros and the
poles of the resulting model (with uncertainty regions marked) and look for
cancellations. The surviving numbers of poles and zeros give us indications of the
necessary order for the dynamics from input to output.
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
EXPERIMENTAL MODELING
- IDENTIFICATION
IDENTIFICATION AS A TOOL FOR MODEL BUILDING
Model Validation
To validate a model is to investigate
g if it can be accepted,
p ggiven its intended use.
This is closely related to the concept of model quality.
Computing models from different measurement records and in different structures
and then evaluating their input-output properties (for example in a Bode diagram
or in simulation) is an important tool for gaining confidence in the model. If
approximately the same model properties are obtained under such varied
conditions, we should feel confident that the model found some significant
features of the system.
A natural test of the model's ability to reproduce the system's behavior is to
simulate the model from input only and then compare the simulated output with
the measured one.
It is important to get as much advice as possible from available validation
possibilities. The final validation criterion is, however, that the model is working
well when it is used for its purpose: simulation, analysis, control design, or
whatever.
93
MODELING AND SIMULATION
OF MECHATRONIC SYSTEMS
7. SIMULATION
SIMULATION
USING MODELS FOR SIMULATION
In the previous parts a brief overview on methods for system modeling was
given. These models can be used for a number of purposes, for example:
¾ Increasing the understanding of the system itself
¾ Predicting the future behavior of the system
¾ Carrying a technical computations for control design
¾ Optimizing construction
¾ Studying human-machine cooperation.
Regardless of the purpose, we almost always want to study the solutions to the
model equations. The classical way of attacking the problem has been to solve the
equations using analog computers. Today the equations are most often solved
numerically in a computer. Regardless of the method, the solving of the equations,
together with the presentation of the result, is usually called simulation.
Modern technology gives a wide range of possibilities for presenting the results
from simulations in such a way so that the real system's behavior is illustrated.
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
94
SIMULATION
NUMERICAL INTEGRATION ALGORITHMS
Assumption: no matter how the model was entered by the user, the simulation
language/program has been able to convert it to a standard state-space form.
Matlab for example always uses an internal state space representation even if only one
transfer function is entered.
It should be noted that the intention was not to consider the numerical methods in
details, but rather the most common algorithms with their properties essential for a
simulation are discussed.
Fundamentals of numerical methods
A state-space form of a model: The vector of initial conditions is
given, and we are now looking for an
- state
t t vector
t appro imation of the state vector
approximation ector x at
- input vector time points
If the input is fixed to a certain vector , than 0 < t1 < t2 < . . . < tN
the influence of u can be expressed as a time The algorithm will thus generate the
variation off f and write: values x1, x2, . . . , xN, which
approximate x(t1), x(t2), . . . , x(tN)
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
SIMULATION
NUMERICAL INTEGRATION ALGORITHMS
Euler’s method
The simplest algorithm is obtained by approximating
with a difference ratio:
where:
The term f (tj, xj) thus corresponds to the derivative of
the function x at tj (slope of the tangent in one-
dimensional case). This gives the recursive equation
95
SIMULATION
NUMERICAL INTEGRATION ALGORITHMS
Euler’s method
If xj+1 is not included in the expression for F, xj+1 is obtained directly by evaluating
the right side. The method is then said to be explicit. In other cases the method is
implicit, and an equation system has to be solved to get xj+1. Euler's method is
obviously an explicit one-step method.
It is of course important to know how accurate a method is in solving differential
equations, i.e. the error estimation is important for each numerical method.
The one-step error, or the local error :
ej = x(tj) − zj The fact that the region
g of stabilityy
of a differential equation does not
where: zj = F (t, x(tj–k), x(tj–k+1), . . ., zj) necessarily coincide with the one
For Euler's method it is: valid for the numerical algorithm is
ej+1 = x(tj+1) − xj+1 = x(tj+1) − x(tj) − ∆t f (tj, xj) something to remember when trying
to determine the stability of a
for tj < ξ < tj+1 dynamic system by simulation.
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
SIMULATION
NUMERICAL INTEGRATION ALGORITHMS
Method of Runge-Kutta
Again consider:
96
SIMULATION
NUMERICAL INTEGRATION ALGORITHMS
Methods of Adams
The methods of Adams form a family of multistep methods that can be
written in the form:
SIMULATION
NUMERICAL INTEGRATION ALGORITHMS
97
SIMULATION
NUMERICAL INTEGRATION ALGORITHMS
Stiff Differential Equations
Stiff differential equations are characterized by the fact that their solutions contain
both fast and slow components and that the difference between their time constants is
large. An example is the differential equation:
SIMULATION
NUMERICAL INTEGRATION ALGORITHMS
98
SIMULATION
SCALING OF THE MODEL EQUATIONS
The simulation work is made easier through scaling of the equations. Scaling
means that in the equation
The scaling can be used to get the same order of magnitude of the variables and
th b avoid
thereby id numerical
i l problems.
bl Another
A th use off scalingli is
i to
t reduce
d the
th number
b off
cases that we need to simulate.
The amplitude and time scaling are useful as a way of making "standardized
simulations". In addition the scaling can be physically necessary when the simulation
takes place in terms of analog, physical quantities. Scaling can also give
considerably better numerical properties in digital simulation.
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
SIMULATION
SCALING OF THE MODEL EQUATIONS
We want to investigate how an originally empty tank is filled with a constant input
flow u for different values of three parameters (a, A, and u) in the model. If each
parameter has to assume N values, N3 simulations are, in principle, needed. However,
if the model's behavior under scaling is utilized,
utilized only one simulation is needed.
needed
Applying:
99
SIMULATION
SCALING OF THE MODEL EQUATIONS
SIMULATION
BLOCK DIAGRAMS AND SUBSYSTEMS
Block diagrams give a clear graphical representations of dependencies within and between
dynamical systems. They help to illustrate the basic sub-models and their interaction in
Phase 1 of modeling. On the other hand, many simulation programs perform a simulation
using block diagram presentation (e.g. Simulink).
The order of the system (number of states)
For preparation of detailed block diagrams, it corresponds exactly to the number of integrators.
is helpful to transform the differential
equation:
u x1
f1(x,u) ∫
u xn
This system of equations involves two types of operations:
fn(x,u) ∫
static nonlinear transformations and integration
Block structure of a dynamic system
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
100
SIMULATION
BLOCK DIAGRAMS AND SUBSYSTEMS
SIMULATION
BLOCK DIAGRAMS AND SUBSYSTEMS
Connecting subsytems
¾ Series circuit y=v w
u
u y=v w
x z
101
SIMULATION
BLOCK DIAGRAMS AND SUBSYSTEMS
Connecting subsytems
¾ Feedback Block diagram of an algebraic loop
x
u=w y=v
z
Such a structure is hidden in any
dynamic system, and only an
y=v approximate iterative solution
[[x z]] can be found.
found
Algebraic loop in a simulation can
Block diagram of a feedback of two systems presented in state not be resolved directly. Simulink reports
space form. The replacement system also consists of the an algebraic loop in the Matlab Command
sum of the states of the original systems, but the output from Window, simultaneously, an iterative
one is the same as the input in the other subsystem solution of the loop tries.
SIMULATION
SIMULATION LANGUAGES
To make simulation possible, there must be a systematic way in which the user can
enter a system description into the computer. We may call it a simulation language.
S
Severall approaches
h are possible:
ibl
1. The system is defined by subroutines written in a standard programming
language
2. The system description might be entered graphically in terms of block
diagrams
3. The system description is entered graphically in terms of bond graphs
Basic components of Matlab and Simulink as a simulation tool are already discussed
in previously parts.
In summary it can be point out that modern computer and programming tools turn
simulation into a relatively straight forward procedure compared to the modeling work.
Difficulties can arise with models that are not in state-space form and that have very
stiff systems. Complicated models can demand very large computer resources. In some
cases the problem may need to be attended to on the modeling level, for example, by
model reduction.
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
102
MODELING AND SIMULATION
OF MECHATRONIC SYSTEMS
TRANSLATIONAL MECHANICAL
SYSTEM WITH MASSES, SPRING
AND FRICTION
Train system -
EXAMPLE
Physical Modeling
We will consider a toy train consisting of an engine and a car. Assuming that the train only
travels in one direction, we want to apply control to the train so that it has a smooth start-up
and stop, along with a constant-speed ride.
The mass of the engine and the car will be represented by M1 and M2, respectively. The
two are held together by a spring, which has the stiffness coefficient of k. F represents
the force applied by the engine, and the Greek letter, µ, represents the coefficient of
rolling friction.
Physical Model Parameters
For this example, we will assume the following values for the physical parameters:
Mass of the engine M1 (M1 = 1 kg)
Mass of the car M2 (M2 = 0.5 kg)
Spring stiffness coefficient k (k = 1 N/m)
Coefficient of rolling friction µ ( µ = 0.002 s/m)
Force applied by the engine F – input
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
103
TRANSLATIONAL MECHANICAL SYSTEM WITH
MASSES, SPRING AND FRICTION
Mathematical Modeling
The system can be represented by
following Free Body Diagrams:
According to Newton's law, the sum of forces acting on a mass equals the mass times its
acceleration. In this case, the forces acting on M1 are the spring, the friction and the force
applied by the engine. The forces acting on M2 are the spring and the friction. The equations of
motion in the horizontal direction are the following :
Transfer Function
104
TRANSLATIONAL MECHANICAL SYSTEM WITH
MASSES, SPRING AND FRICTION
State Space
This set of system equations can now be manipulated into state-variable form. The state variables
are the positions, X1 and X2, and the velocities, V1 and V2; the input is F. The state variable
equations will be:
MATLAB representation
Transfer Function
m-file
M1=1;
M2=0.5;
k=1;
F=1;
u=0.002;
0 002
g=9.8;
num=[M2 M2*u*g k];
den=[M1*M2 2*M1*M2*u*g M1*k+M1*M2*u*u*g*g+M2*k M1*k*u*g+M2*k*u*g];
train=tf(num,den);
105
TRANSLATIONAL MECHANICAL SYSTEM WITH
MASSES, SPRING AND FRICTION
MATLAB representation
St t S
State Space
m-file
M1=1;
M2=0.5;
k=1;
F=1;
u=0.002;
g=9.8;
A=[ 0 1 0 0; -k/M1 -u*g k/M1 0; 0 0 0 1; k/M2 0 -k/M2 -u*g];
B=[ 0; 1/M1; 0; 0];
C=[0 1 0 0];
D=[0];
train=ss(A,B,C,D)
106
TRANSLATIONAL MECHANICAL SYSTEM WITH
MASSES, SPRING AND FRICTION
Sum(forces_on_M1)=M1*x1''
Sum(forces_on_M2)=M2*x2''
Sum(forces_on_M1)=M1*x1''
Sum(forces_on_M2)=M2*x2''
107
TRANSLATIONAL MECHANICAL SYSTEM WITH
MASSES, SPRING AND FRICTION
Sum(forces_on_M1)=M1*x1''
Sum(forces_on_M2)=M2*x2''
Sum(forces_on_M1)=M1*x1''
Sum(forces_on_M2)=M2*x2''
108
TRANSLATIONAL MECHANICAL SYSTEM WITH
MASSES, SPRING AND FRICTION
Sum(forces_on_M1)=M1*x1''
Sum(forces_on_M2)=M2*x2''
Forces on M2:
For the first force, we will use the
same spring force we just generated
(k*(x1-x2)
(k (x1-x2) )), except that it adds in
with positive sign.
The last force to add is the friction
on M2 (F_friction_2=mu*g*M2*v2).
Sum(forces_on_M1)=M1*x1''
Sum(forces_on_M2)=M2*x2''
The input of the system will be the
force, F, provided by the engine. We
already have placed the function
generator at the input.
input The output of
the system will be the velocity of the
engine. Drag a Scope block from the
Sinks block library into your model.
Tap a line off the output of the "v1"
integrator block to view the output.
Label the scope "View_v1"
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
109
TRANSLATIONAL MECHANICAL SYSTEM WITH
MASSES, SPRING AND FRICTION
TRAIN SYSTEM - EXAMPLE
Running the Model
M1=1;
M2=0.5;
k=1;
m-file
F=1;
mu=0.002;
g=9.8;
110
TRANSLATIONAL MECHANICAL SYSTEM WITH
MASSES, SPRING AND FRICTION
TRAIN SYSTEM - EXAMPLE
Obtaining MATLAB Model
111
TRANSLATIONAL MECHANICAL SYSTEM WITH
MASSES, SPRING AND FRICTION
TRAIN SYSTEM - EXAMPLE
Building the Model in LABVIEW
http://www.ni.com
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
2. Multiplying
p y g the outputs
p of each of these
Summation blocks by 1/M will give the
acceleration. Drag two Gain blocks into
the model (from the Signal Arithmetic Sum(forces_on_M1)=M1*x1''
Sum(forces_on_M2)=M2*x2''
section of the Simulation palette). Attach
each one with a wire to the outputs of
the Summation blocks. These Gain
blocks should contain 1/M for each of
the masses. Double-click on each Gain
block, and change the Parameter Source
f
from C
Configuration
fi ti DiDialog
l B Box tto
Terminal. Label these two Gain blocks
"a1" and "a2".
http://www.ni.com
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
112
TRANSLATIONAL MECHANICAL SYSTEM WITH
MASSES, SPRING AND FRICTION
TRAIN SYSTEM - EXAMPLE
Building the Model in LABVIEW
http://www.ni.com
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
http://www.ni.com
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
113
TRANSLATIONAL MECHANICAL SYSTEM WITH
MASSES, SPRING AND FRICTION
TRAIN SYSTEM - EXAMPLE
Building the Model in LABVIEW
http://www.ni.com
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
114
TRANSLATIONAL MECHANICAL SYSTEM WITH
MASSES, SPRING AND FRICTION
TRAIN SYSTEM - EXAMPLE
Building the Model in LABVIEW
115
TRANSLATIONAL MECHANICAL SYSTEM WITH
MASSES, SPRING AND FRICTION
TRAIN SYSTEM - EXAMPLE
Building the Model in LABVIEW
http://www.ni.com
116
TRANSLATIONAL MECHANICAL SYSTEM WITH
MASSES, SPRING AND FRICTION
TRAIN SYSTEM - EXAMPLE
Running the Model in LABVIEW
Before running the model, we need to
assign
g numerical values to each of the
variables used in the model. For the train
system, use the following values:
M1 = 1 kg
M2 = 0.5 kg
k = 1 N/sec
F= 1 N
u = 0.002 s/m
g = 9.8 m/s^2
Enter these values using the front panel
controls.
l
Now, we need to give an appropriate input to the
engine. Double-click on the Signal Generator (F block).
Select a square wave with frequency .001Hz and
amplitude -1 (positive amplitude steps negative before
stepping positive).
http://www.ni.com
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
117
MODELING AND SIMULATION
OF MECHATRONIC SYSTEMS
DC MOTOR -
EXAMPLE
DC MOTOR
EXAMPLE
MODELING DC MOTOR POSITION
Physical Modeling
DC motor directly provides rotary motion and, coupled with wheels or drums and
cables, can provide transitional motion.
The electric circuit of the armature and the free body
diagram of the rotor are shown in the figure
Physical Model Parameters
Moment of inertia of the rotor J (J = 3.2284E-6 kgm2/s2)
Damping coefficient of the mechanical system b (b = 3.5077E-6 Nms)
Electromotive force constant K (K=Ke=Kt = 0.0274 Nm/Amp)
Electric resistance R (R = 4 Ω)
Electric inductance L (L = 2.75E-6 H)
Source Voltage V – input
Position of shaft θ - output
Assumption: The rotor and shaft are treated as a rigid
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
118
DC MOTOR
EXAMPLE
MODELING DC MOTOR POSITION
Mathematical Modeling
The motor torque
torque, T,
T is related to the armature current
current, i,
i by a constant
factor Kt. The back emf, e, is related to the rotational velocity by following
equations:
DC MOTOR
EXAMPLE
MODELING DC MOTOR POSITION
Transfer Function
119
DC MOTOR
EXAMPLE
MODELING DC MOTOR POSITION
State Space
DC MOTOR
EXAMPLE
MODELING DC MOTOR POSITION
m-file
J=3.2284E-6;
b=3.5077E-6;
K=0.0274;
R=4;
L=2.75E-6;
num=K;
den=[(J*L) ((J*R)+(L*b)) ((b*R)+K^2)
^ 0];
motor=tf(num,den);
step(motor,0:0.001:0.2)
120
DC MOTOR
EXAMPLE
MODELING DC MOTOR POSITION
DC MOTOR
EXAMPLE
MODELING DC MOTOR POSITION
121
DC MOTOR
EXAMPLE
MODELING DC MOTOR POSITION
DC MOTOR
EXAMPLE
MODELING DC MOTOR POSITION
122
DC MOTOR
EXAMPLE
MODELING DC MOTOR POSITION
DC MOTOR
EXAMPLE
MODELING DC MOTOR POSITION
123
DC MOTOR
EXAMPLE
MODELING DC MOTOR POSITION
DC MOTOR
EXAMPLE
MODELING DC MOTOR POSITION
124
DC MOTOR
EXAMPLE
MODELING DC MOTOR POSITION
DC MOTOR
EXAMPLE
MODELING DC MOTOR POSITION
Building the Model in SIMULINK
¾Extracting a Digital Model into MATLAB
[A,B,C,D]=dlinmod('motorposmodel',.001)
[num den]=ss2tf(A B C D)
[num,den]=ss2tf(A,B,C,D)
A =
1.0000 0.0000 0.0010
0 0.0000 -0.0065
0 0.0055 0.9425
B =
0.0010
0.2359
2.0589
C =
1 0 0
D =
0
num =
0 0.0010 0.0010 0.0000
den =
1.0000 -1.9425 0.9425 0
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
125
DC MOTOR
EXAMPLE
DC MOTOR
EXAMPLE
MODELING DC MOTOR POSITION
http://www.ni.com
126
DC MOTOR
EXAMPLE
MODELING DC MOTOR POSITION
http://www.ni.com
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
DC MOTOR
EXAMPLE
MODELING DC MOTOR POSITION
127
DC MOTOR
EXAMPLE
MODELING DC MOTOR POSITION
DC MOTOR
EXAMPLE
MODELING DC MOTOR POSITION
128
DC MOTOR
EXAMPLE
MODELING DC MOTOR POSITION
http://www.ni.com
DC MOTOR
EXAMPLE
MODELING DC MOTOR POSITION
http://www.ni.com
129
DC MOTOR
EXAMPLE
MODELING DC MOTOR POSITION
DC MOTOR
EXAMPLE
MODELING DC MOTOR POSITION
http://www.ni.com
130
DC MOTOR
EXAMPLE
DC MOTOR
EXAMPLE
131
DC MOTOR
EXAMPLE
DC MOTOR
EXAMPLE
132
DC MOTOR
EXAMPLE
DC MOTOR
EXAMPLE
133
DC MOTOR
EXAMPLE
DC MOTOR
EXAMPLE
Wire the output from “Vapp” into the “+” input of the addition block, then
wire the outputs from the two multiplication blocks into each of the “-“ inputs.
Next, add another
multiplication block and change
its terminals to “x” and “÷” by
double-clicking to bring up the
configuration window. Connect
the output of the addition block
to the “x” input and connect
“L” to the “÷” input
134
DC MOTOR
EXAMPLE
Right-click on the output of the latest multiplication block and select “Create” →“Indicator”
Re-label this block “di/dt.” We have now completed the basic block diagram for the electrical
portion of our system.
We will now add an integrator
block to compute the value of I(t).
Open the functions palette, select
“Control Design and Simulation”
→“Simulation” →“Continuous
Linear Systems” → “Integrator”
Wire the input to this block to the
output of the last multiplication
block ((to which our “di/dt”
indicator is now connected.).
Create a second indicator. Re-label
it to “I”. Connect the integrator
output to the empty terminal on the
first multiplication block
DC MOTOR
EXAMPLE
135
DC MOTOR
EXAMPLE
Now we will begin to diagram the equations for the mechanical part of the system.
To do this, first add three constant doubles, three multiplication blocks, and one
addition block.
The three constants will be
“Kt”, “B” and “J”. Wire them
according to the equation
given above.
DC MOTOR
EXAMPLE
136
DC MOTOR
EXAMPLE
DC MOTOR
EXAMPLE
Switch back to the front panel by pressing Ctrl+E. You will notice two
graph windows, one input, and one output.
137
DC MOTOR
EXAMPLE
DC MOTOR
EXAMPLE
138
DC MOTOR
EXAMPLE
Click the Run button (or press Ctrl+R) to run the simulation
and get the results.
139
MODELING AND SIMULATION
OF MECHATRONIC SYSTEMS
FLUID FLOW RESERVOIR
MODELING -
EXAMPLE
Physical Modeling
The reservoir (or tank) contains water that
evacuates through an output port. Water is fed
to the reservoir through a pipe controlled by an
input valve. The variables of interest are:
• fluid velocity V [m/s] Tank with free outflow
• fluid height in the reservoir H [m]
• pressure p [N/m2]
We want to construct a model of how the outflow depends on the inflow, i.e. to
establish the system configuration and then obtain the appropriate mathematical
models describing the fluid flow reservoir from an input-output perspective.
The general equations of motion and energy describing fluid flow are quite
complicated (coupled nonlinear partial differential equations). Some selective
assumptions that reduce the complexity of the mathematical model have to be made.
140
FLUID FLOW MODELING
EXAMPLE
FLUID FLOW RESERVOIR
Tank with free outflow
Physical Modeling
Key assumptions:
• The
Th watert iin th
the ttankk is
i incompressible
i ibl with
ith
constant density ρ [kg/m3]
• The flow is inviscid (viscosity can be neglected
in our model development)
• The flow is irrotational (the water in the tank is irrotational). For an inviscid fluid,
an initially irrotational flow remains irrotational
•The water flow in the tank and output port is steady (the velocity does not change
with time). If the output port area is too large, then the flow through the reservoir may
not be slow enough to establish the steady-state
steady state condition that we are assuming exists
and our model will not accurately predict the fluid flow motion.
Physical Model Parameters
The constants for the reservoir
system are:
Mathematical Modeling
To obtain a mathematical model of the flow
within the reservoir, basic principles of
science and engineering (for example, the
principle of conservation of mass) should be
used. The mass of water in the tank at any
given time is: m = ρ A1H
Taking the time derivative, using the fact that we consider uncompressible fluid
(ρ=const.) and tank with area A1, which is not change with time, as well knowing
that the change
g in mass in the reservoir is equal
q to the mass that enters the tank
minus the mass that leaves the tank, we obtain following relation:
141
FLUID FLOW MODELING
EXAMPLE
FLUID FLOW RESERVOIR
Tank with free outflow
Mathematical Modeling
From Bernoulli's equation,
q it follows:
where:
v1 - water velocity at the mouth of the reservoir,
p1 and p2 - pressures at the input and output, respectively.
But p1 and p2 are equal to atmospheric pressure, and A2 is sufficiently small (A2=A1/100),
so the water flows out slowly and the velocity v1 is negligible. Thus Bernoulli's equation
reduces to:
Using equation for v2, the exit mass flow rate will be:
Mathematical Modeling
Introducing:
g
We obtain:
These equations
Th ti representt our model
d l off the
th water
t tank
t k system,
t where
h the th input
i t is
i Q1
and the output is Q2. It is a nonlinear, first-order, ordinary differential equation model.
The nonlinearity comes from the H1/2 term. The model has the functional form :
142
FLUID FLOW MODELING
EXAMPLE
FLUID FLOW RESERVOIR
Tank with free outflow
Mathematical Modeling
A set of linearized equations
q describing g the
height of the water in the reservoir is obtained
using Taylor series expansions about an
equilibrium flow condition. When the tank
system is in equilibrium, we have:
We can define Q* and H* as the equilibrium input mass flow rate and water level,
respectively. The relationship between Q*and H* is given by :
We can write the water level and input mass flow rate as:
where ∆H and ∆Q1 are small deviations from the equilibrium (steady-state) values.
143
FLUID FLOW MODELING
EXAMPLE
FLUID FLOW RESERVOIR
Tank with free outflow
Mathematical Modeling
Similarly,
y for the output
p variable Q2 we have:
Transfer function
It is convenient to obtain the input-output
relationship in the form of a transfer function.
Taking the time-derivative of:
Taking the Laplace transform (with zero initial conditions), the transfer function
will be: It describes the relationship between the change in the
output mass flow rate ∆Q2(s) due to a change in the
input mass flow rate ∆Q1(s)
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
144
FLUID FLOW MODELING
EXAMPLE
FLUID FLOW RESERVOIR
Tank with free outflow
Transfer function
The transfer function relationship between
the change in the input mass flow rate and the
change in the water level in the tank, ∆H(s)
can also be obtained. The Laplace transform
(with zero initial conditions) of:
gives:
Step response
Given the linear time-invariant model Consider the step input: ∆Q1(s)(s)=qq0/s ,
of the water tank system: where q0 is the magnitude of the step input,
and the initial condition is ∆Q2(0)=0. Then
from the transfer function ∆Q2/ ∆Q1 , the
the step response can be obtained. The input thank response will be:
∆Q1(s) is actually a change in the input mass
flow rate from the steady-state value Q*.
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
Step response
We see that in the steady state, the deviation of the output mass flow rate from the
equilibrium value is equal to the deviation of the input mass flow rate from the
equilibrium value.
145
FLUID FLOW MODELING
EXAMPLE
FLUID FLOW RESERVOIR
Tank with free outflow
Step response
Similarlyy for the water level it is:
The steady state change in water level due to the step input of magnitude q0 is:
The above analytic analysis of the linear system model to step input is a valuable way
to gain insight into the system response to test signals. Analytic analysis is limited,
however, in the sense that a more complete representation can be obtained with
carefully constructed numerical investigations using computer simulations of both the
linear and nonlinear mathematical models.
TEMPUS IV Project: 158644 -JPCR
Development of Regional
Interdisciplinary Mechatronic
MODELING AND SIMULTION OF MECHATRONIC SYSTEMS
Studies - DRIMS
Step response
146
THE
MECHATRONICS
HANDBOOK
Editor-in-Chief
Robert H. Bishop
The University of Texas at Austin
Austin, Texas
CRC PR E S S
Boca Raton London New York Washington, D.C.
147
0066_Frame_C20 Page 90 Wednesday, January 9, 2002 5:49 PM
a flow entering the servochamber 4 (see Fig. 20.120) while the other controls the flow exiting towards
discharge. By means of appropriate action, the control signal is converted into a pressure proportional
signal.
The following magnitudes are differentiated (the subscripts 1 and 2 refer, respectively, to the rear 1
and front 2 chambers of the pistons):
dP G 1 nRT 1i P1 n dx
--------1 = ------------------------------------------------------------------------
- – -------------------------------- ------ (20.58)
dt A 1 ( x 0 + x m1 + x ) ( P 1 /P 1i )
( 1 – n )/n ( x 0 + x m1 + x ) dt
dP 2 G 2 nRT 2i P2 n dx
-------- = ------------------------------------------------------------------------ + --------------------------------
- ------ (20.59)
dt A 2 ( x 0 + x m2 – x ) ( P 2 /P 2i )
( 1 – n )/n ( x 0 + x m2 − x ) dt
dx
2
( P 1 – P amb )A 1 – ( P 2 – P amb )A 2 – F e – g dx/dt
-------2- = --------------------------------------------------------------------------------------------------------
- (20.60)
dt M
The flow proportional valve V1 is modeled as a variable section pneumatic resistance. The equations
used for calculating mass flow rate G through a pneumatic resistance, characterized by a conductance C
and by a critical ration b, in accordance with ISO 6358, which connects two environments A and B, with
respective pressures of PA and PB, taken to be positive in the A → B direction, are
P
sonic flow: G = r0 PA C for 0 < -----B ≤ b (20.61)
PA
P B /P A – b 2 P
subsonic flow: G = r 0 P A C 1 – ----------------------
- for b < -----B ≤ 1 (20.62)
1–b PA
P
sonic flow: G = –r0 PB C for 0 < -----A ≤ b (20.63)
PB
2
P A /P B – b P
subsonic flow: G = – r 0 P B C 1 – ----------------------
- for b < -----A ≤ 1 (20.64)
1–b PB
149
0066_Frame_C20 Page 92 Wednesday, January 9, 2002 5:49 PM
Hypothesizing a bipolar reference signal, it can be assumed that the range Vref > 0 corresponds to the
supply–user connection, while the field Vref < 0 corresponds to the user–discharge connection. The
appropriate equation of flow above must be rewritten in the same way.
Calculation of the conductance of the flow proportional valve is made considering the static and
dynamic link between the reference voltage Vref and the opening of the passage aperture A V in accordance
with modeling of the second order of the type:
2
d AV dA
+ 2zs n ---------V + s n A V = K s s n V ref
2 2
-----------
2
(20.65)
dt dt
where ζ is the damping factor, σn is the valve’s natural frequency, and Ks is its area static gain.
Assuming a static relation of the linear type between the opening A V and the conductance C, as an
initial approximation, we get
where K V is the flow static gain of the valve, function of the maximum conductance Cmax, and of the
maximum value of the reference voltage Vref max:
C max
K V = --------------
- (20.67)
V ref max
The complete dynamic relation between reference voltage and conductance is, therefore,
2
dC dC
--------2- + 2zs n ------- + s n C = K c s n V ref
2 2
(20.68)
dt dt
The nonlinear model of the pneumatic servosystem with the position reference xset and the force
disturbance Fe as inputs, is made up of a nonlinear system of nine equations, of order eight overall, of
the type:
150
0066_Frame_C20 Page 93 Wednesday, January 9, 2002 5:49 PM
in discharge. This hypothesis is physically acceptable; hypothesizing b = 0.3, Ps = 10 bar, Pamb = 1 bar, we
get that P1 can vary between 3.33 bar and 10 bar. It is the same for P2.
Linearizing the subsonic feed flow rate curve with a secant passing through the points P1 = Ps, G1 = 0
∗
and P1 = b 1Ps, G1 = G1 sonic, of angular coefficient KL1, we get
G 1 = K L1 ( P s – P 1 ) (20.69)
where
G 1sonic rn C1 Ps rn C1
K L1 = -------------------
∗
- = ----------------------
∗
- = -------------
∗
(20.70)
Ps – b1 Ps Ps ( 1 – b1 ) 1 – b1
or
rn ( Ps – P1 )
G 1 = -------------------------
∗
-C 1 (20.71)
( 1 – b1 )
In the neighborhood P1 = P1r and C1 = C1r = 0 (the subscript r indicates of reference), we get
r n ( P s – P 1r )
G 1 = ---------------------------
∗
- C 1 = K 11 C 1 (20.72)
( 1 – b1 )
Equation (20.72) is valid for Vref1 > 0, to which C1 > 0 corresponds analytically.
The flow rate discharge is expressed by
G1 = rn C1 P1 (20.73)
G 1 = r n P 1r C 1 = K 12 C 1 (20.74)
Equation (20.74) is valid for Vref1 < 0, to which C1 < 0 corresponds analytically.
Calculating a mean of slopes K11 and K12 we get a mean slope Kmean given by
∗
K 11 + K 12 r n ( P s – b 1 P 1r )
K mean = --------------------
- = --------------------------------
∗
- (20.75)
2 2 ( 1 – b1 )
∗
r n ( P s – b 1 P 1r )
G 1 = --------------------------------
∗
-C 1 = K 1 C 1 (20.76)
2 ( 1 – b1 )
151
0066_Frame_C20 Page 94 Wednesday, January 9, 2002 5:49 PM
FIGURE 20.124 Block diagram of the linearized model of a pneumatic servosystem with position control.
∗
r n ( P s – b 2 P 2r )
G 2 = --------------------------------
∗
-C 2 = K 2 C 2 (20.77)
2 ( 1 – b2 )
The continuity equations of the mass in the piston chambers e) and f ), linearized in the reference
neighborhood defined by
x = x r, P 1 = P 1r, P 2 = P 2r ,
Ṗ 1 = Ṗ 1r = 0, Ṗ 2 = Ṗ 2r = 0, x˙ = x˙r = 0
x m1 = x m2 = 0, n = 1
become
P 1r A 1 x0 + xr
G 1 = -------------x
˙ + A 1 --------------
- Ṗ 1 (20.78)
RT RT
P 2r A 2 x0 – xr
G 2 = − -------------x
˙ + A 2 --------------
- Ṗ 2 (20.79)
RT RT
where C.I. indicates the initial conditions, K OLV is the static gain in speed, K OLF is the gain of the force
disturbance, σA and ζA are, respectively, the actuator’s natural frequency and the damping factor, and Gc
is the compensator law.
This result is shown in the block diagram in Fig. 20.125. Figure 20.126, on the other hand, shows the
closed loop block diagram with position feedback. Obvious similarities can be seen when this plan is
152
0066_Frame_C20 Page 95 Wednesday, January 9, 2002 5:49 PM
∗
RTr 1 1 ( 1/d – b )
K OLV = -------------n K V -----------------
∗
- --- -----------------------
∗
- (20.81)
2 (1 – b ) A (1 – b )
x 0 [ 1 – ( x r /x 0 ) ]
2
K OLF = ------------------------------------
- (20.82)
2dPs A
2dP s A
sA = -----------------------------------------
- (20.83)
x 0 m [ 1 – ( x r /x 0 ) ]
2
x 0 [ 1 – ( x r /x 0 ) ]
2
z A = g ------------------------------------
- (20.84)
8dP s Am
On the basis of the design specifications, it is possible to choose the size and characteristics of the
servosystem components, operating first on the linearized model, and then checking the complete
effectiveness of the choice made with a complete nonlinear system model.
References
Andersen, B. W., The analysis and design of pneumatic systems, Wiley, New York, 1967.
Bouteille, D., Belforte, G., Automazione flessibile, elettropneumatica e pneumatica, Tecniche Nuove, Milano,
1987.
153
0066_Frame_C20 Page 96 Wednesday, January 9, 2002 5:49 PM
Belforte, G., D’ Alfio, N., Applicazioni e prove dell’automazione a fluido, Levrotto & Bella, Torino, 1997.
Belforte, G., Manuello Bertetto, A., Mazza, L., Pneumatica: corso completo, Tecniche Nuove, Milano,
1998.
Blackburn, J. F., Reethof, G., Shearer, J. L., Fluid power control, MIT Press, Cambridge, 1960.
Dransfield, P., Hydraulic control systems—design and analysis of their dynamics, Springer, Berlin, 1981.
Esposito, A., Fluid power with applications, 5th ed., Prentice-Hall, Upper Saddle River, NJ, 2000.
Gotz, W., Hydraulics. Theory and applications, Robert Bosch Automation Technology Division Training,
Ditzingen, 1998.
Hehn, A. H., Fluid power troubleshooting, 2nd ed., Dekker, New York, 1995.
Introduction to hydraulic circuits and components, The University of Bath, Bath, 2000.
Introduction to control for electrohydraulic systems, The University of Bath, Bath, 1999.
Jacazio, G., Piombo, B., Meccanica applicata alle macchine 3: Regolazione e servomeccanismi, Levrotto &
Bella, Torino, 1994.
Johnson, J. E., Electrohydraulic servo systems, 2nd ed., Penton IPC, Cleveland, 1977.
Johnson, J. L., Design of electrohydraulic systems for industrial motion control, Penton IPC, Cleveland,
1991.
Johnson, J. L., Basic electronics for hydraulic motion control, Penton IPC, Cleveland, 1992.
Lewis, E. E., Stern, H., Design of hydraulic control systems, McGraw-Hill, New York, 1962.
Mang, T., Dresel, W., Lubricants and lubrications, Wiley-VCH, Weinheim, 2001.
McCloy, D., Martin, H. R., The control of fluid power, Longman, London, 1973.
Merritt, H. E., Hydraulic control systems, Wiley, New York, 1967.
Moog, Technical Bulletins, 101–152, Moog, New York.
Muller, R., Pneumatics. Theory and applications, Robert Bosch Automation Technology Division Training,
Ditzingen, 1998.
Nervegna, N., Oleodinamica e Pneumatica, Politeko, Torino, 1999.
Parr, A., Hydraulics and pneumatics: a technician’s and engineer’s guide, 2nd ed., Butterworth Heinemann,
Oxford, 1998.
Shetty, D., Kolk, R. A., Mechatronics system design, PWS publishing company, Boston, 1997.
Tonyan, M. J., Electronically controlled proportional valves: selection and application, Dekker, New York,
1985.
Viersma, T. J., Analysis, synthesis and design of hydraulic servosystems and pipelines, Elsevier, Amsterdam,
1980.
Yeaple, F., Fluid power design handbook, 3rd ed., Dekker, New York, 1996.
Introduction
In many applications (from medicine and biotechnology to aerospace and security), the use of nano-
and microscale structures, devices, and systems is very important [1–4]. This chapter discusses the
analysis, modeling, design, and fabrication of electromagnetic-based microscale structures and devices
(microtransducers controlled by ICs). It is obvious that to attain our objectives and goals, the synergy
of multidisciplinary engineering, science, and technology must be utilized. In particular, electromagnetic
*
This section is a part of the book: S. E. Lyshevski, MEMS and NEMS: Systems, Devices, and Structures, CRC Press,
Boca Raton, FL, 2001. 154
Modeling and Simulation of a Pneumatic
Servosystem for Position Control
M. A. Sharifi K.
BACKGROUND
The circuitry plan of a pneumatic servosystem capable of controlling position can be similar to that
shown in Fig. 1. in homework 1 for hydraulic actuation. The signal of the transducer of the desired magnitude
must be specially fed back in a closed loop on the regulator depending on the controlled magnitudes.
In the plan in figure 2, the axial position of the piston, fed back by means of the position transducer, is
determined by controlling the pressure in thrust chambers 1 and 2by means of the flow proportional interfaces.
The position reference is compared with the feedback signal and the error is compensated in a control regulator.
On the basis of the valve opening strategy used, the signal is sent to the regulating valves which feed the
chambers of the piston, hypothesized to be symmetrical. The pressure forces acting on the thrust surfaces of the
piston oppose the external force disturbance [1].
Fig. 1.
MODELING
The closed loop block diagram of the linearized model with position feedback is shown in Fig. 2. [1].
Fig. 2.
1 (1 𝛿 − 𝑏 )
∗
𝑅𝑇𝜌𝑛 1
𝐾𝑂𝐿𝑉 = 𝐾𝑉
2 (1 − 𝑏 ∗ ) 𝐴 (1 − 𝑏 ∗ )
155
𝑥𝑟 2
𝑥0 [1 − ( 𝑥0 ) ]
𝐾𝑂𝐿𝐹 =
2𝛿𝑃𝑠 𝐴
2𝛿𝑃𝑠 𝐴
𝜎𝐴 = 𝑥
𝑥0 𝑚[1 − ( 𝑟 𝑥0 )2 ]
𝑥𝑟 2
𝑥0 𝑚[1 − ( 𝑥0 ) ]
𝜁𝐴 = 𝛾
8𝛿𝑃𝑠 𝐴
𝐶𝑚𝑎𝑥
𝐾𝑉 =
𝑉 𝑟𝑒𝑓 𝑚𝑎𝑥
𝑃1
𝑏∗ = for 𝐺1 = 𝐺1,𝑠𝑜𝑛𝑖𝑐
𝑃𝑠
𝑃1𝑟
𝛿=
𝑃𝑠
𝑃1𝑟 = 𝑃1 in the reference neighborhood
𝑥𝑟 = 𝑥 in the reference neighborhood.
TABLE I
𝜎𝑛 valve's natural frequency
𝜁 valve's damping factor
R air constant
T cylinder air temperature
𝜌𝑛 air density
C pneumatic conductance of servovalve
𝑉𝑟𝑒𝑓 reference voltage corresponding to 𝑥𝑟𝑒𝑓
G mass flow rate of air entering chamber
A piston thrust section
𝑥0 piston half stroke
m mass of the translating parts of piston
𝛾 coefficient of viscous friction
PARAMETERS
Parameters of servovalve are determined using [2]. Parameters of hydraulic actuator are derived from
[3].
According to [2], the servovalve dynamic can be represented as a second-order transfer function
𝑃 1
𝑠 =𝑘
𝑖 1 + 2𝜁 𝜔𝑛 + (𝑠 𝜔𝑛 )2
𝑠
in which
𝑝𝑠𝑖
ζ = 0.4 , 𝑓𝑛 = 250 𝐻𝑧 , 𝑘 = 125 𝑚𝐴.
Comparing k from above transfer function (TF) to K from presented model, we find out that the output
of above TF is not the same as that of corresponding block in model which is velocity (m/s). From the equations
for 𝐾𝑂𝐿𝑉 in modeling, to make the outputs the same, we have
In equation above, 𝐶 = 4.84𝑒 − 9 𝑚3 /(𝑠. 𝑃𝑎) from [4]. Also, according to [1], an acceptable values for 𝛿 is
0.75.
156
𝑙
𝐴 = 2.5 𝑐𝑚2 , 𝑥0 = = 5 𝑐𝑚, 𝑃𝑠 = 586 𝑘𝑃𝑎, and 𝑚 = 10 𝑘𝑔
2
According to the fact that 𝛾 shows the influence of viscous friction, while other kinds of friction are
𝑠𝑁
neglected, it is reasonable to say that 𝛾 is the total friction coefficient. So, using [5], we have 𝛾 = 65 .
𝑚
𝑥𝑟
Also, to simplify calculations, I assumed that = 0.75.
𝑥0
Table 2 shows the values of parameters of model shown in Fig. 2 using above values and equations of
previous part.
TABLE II
𝐾𝑂𝐿𝑉 16.94 Pa/mA
𝜎𝑛 1.571e3 rad/sec
𝜁 0.4
𝐾𝑂𝐿𝐹 1.706e-4 m/N
𝜎𝐴 24.21 rad/sec
𝜁𝐴 0.134
SIMULATION
Now that we obtained the parameters of the model, we can simulate the servosystem. Following is the
block diagram of the simulated system (Fig. 4.).
Fig. 4.
𝑋𝑆𝐸𝑇 = 0.0375 𝑢 𝑡 − 1
𝐹𝑒𝑥𝑡 = 1000 𝑢 𝑡 − 1
𝐺𝑐 = 𝑘 𝑝𝑟𝑜𝑝𝑜𝑟𝑡𝑖𝑛𝑎𝑙 𝑐𝑜𝑚𝑝𝑒𝑛𝑠𝑎𝑡𝑜𝑟
Fig. 5: k =1
157
Fig. 6: k = 10
Fig. 7: k = 0.1
Fig. 8: k = 0.01
As results show, for (k = 1) system is unstable and increasing k (k = 10) does not solve this problem.
However, decreasing k (k = 0.1) leads to system's stability and also a good response in which not only the effect
of disturbance 𝐹𝑒𝑥𝑡 is almost completely compensated in steady state response, but also rising time is acceptable
(𝑡𝑟 ≈ 1.25 𝑠𝑒𝑐). More decrease in k (k = 0.01) leads to instability which is not desired.
Finally, a sine wave and a saw-tooth wave with amplitude of 0.0375 and frequency of 0.5Hz are
applied to the model. Fig. 9. and Fig. 10. show the output to sine and saw-tooth wave, respectively.
Fig. 9.
Fig. 10.
158
As you can see the system does not response to periodic inputs above properly, because the frequency
of inputs is big according to settling time of system (𝑡𝑠 ≈ 2.5𝑠𝑒𝑐); so, system cannot follow the input. Following
figures are the output of system to sine and saw-tooth inputs with same amplitude but frequency of 0.25Hz. As
shown, dividing the frequency of input down to 0.25Hz leads to a much better response .
Fig. 11.
Fig. 12.
REFERENCES
[1] THE MECHATRONICS HANDBOOK, pp.603-608
[2] TECHNICAL BULLETIN 103, TRANSFER FUNCTION FOR MOOG SERVOVALVES, pp.3-4
[3] E. J. Barth, J. Zhang, and M. Goldfarb, Control Design for Relative Stability in a PWM-Controlled Pneumatic System,
pp.3
[4] K. Kawashima, Y. Ishii, T. Funaki, T. Kagawa, Determination of Flow Rate Characteristics of Pneumatic Solenoid
Valves Using an Isothermal Chamber
[5] Z. Situm, J. Petric, M. Crnecovic, Sliding Control Applied to Pneumatic Servo Drive, pp. 6
159
Literature
1. Dr. Martin Kozek, Modellbildung und Simulation, Institut für Maschinen- und
Prozessautomatisierung, Technische Universität Wien, Oktober 2000
2. L. Ljung, T. Glad, Modeling of Dynamic Systems, Prentice-Hall information and system
sciences series, 1994.
3. R.C. Dorf, R.H. Bishop, Modern Control Systems, Addison-Wesley, 7th edition, 1995.
4. Georg Pelz, Mechatronic Systems: Modelling and Simulation with HDLs, John Wiley &
Sons Ltd, 2003
5. Robert H. Bishop (Editor), The mechatronics handbook, CRC Press LLC, 2002
160