Conference PaperPDF Available

High-Speed Precise Simulation Using Modified Z-Transform

Authors:

Abstract

Equations for modelling of the elementary dynamic blocks based on the modified z-transform for the high-speed precise computer simulation are described in this paper.
High-Speed Precise Simulation
Using Modified Z-Transform
Volodymyr I. Moroz
Abstract – Equations for modelling of the elementary
dynamic blocks based on the modified z-transform for
the high-speed precise computer simulation are de-
scribed in this paper.
I. INTRODUCTION
The object-oriented computer simulation is based
on the principle that complete model can be con-
structed from the some simpler subsystems. That prin-
ciple can be extended in order to create a whole mod-
eled system from the simplest elementary blocks.
Similar approach is used in widely known simulation
environments such as Simulink (MathWorks, Inc.) but
applied numeric methods for simulation have more
than 30-year history [2]. This fact produces some
problems during computer simulation of impulse and
discrete systems because the traditional numeric meth-
ods used for ordinary differential equations (ODE) ap-
proximate the solving function by the limited Taylor
series and are useful only for "smooth" solutions.
The modern electric drives are constructed usually
under pulse-width modulation (PWM) principle and
uses the power semiconductor switches (such as
IGBT-transistors). Their models are unsuitable for
solving when the classic numeric methods for ODEs
are used because their solutions have singular pointes.
The other way of simulation is "semi-analytic"
methods usage that produce the sufficiently simple but
efficient model equations. For example, z-transform
can generate simple high-speed and precise model
equations [4]. This approach is rather rarely used now
because it needs additional analytic preparation before
computer simulation. The increasing computer power
and modern simulation environments, easy in usage,
don't make those methods popular too.
II. FUNDAMENTALS
The two basic principles are used in order to obtain
recurrent modelling equations based on z-transform.
1. Analytic response y(t) of the elementary dynamic
block is determined by analytic description of the
usually unknown input signal x(t). Using holds
(known from discrete systems theory) can solve
this problem by approximation of the free input
signal x(t) by the pieces of low-order polynomial
[3], [4].
Author works in the Institute of the Electrical Power Engineering
and Control Systems, Lviv Polytechnic National University, 12
Bandera str., 79013 Lviv, Ukraine, e-mail: vmoroz@polynet.lviv.ua
2. All of the real systems, that can be described by
transfer functions, have the nominator polynomial
order no greater than denominator polynomial or-
der [1], [3]. In this case we can decompose (resi-
due) those systems to the elementary particles (fig.
1) [1]:
1) zero poles (integration parts of the transfer
function);
2) simple real poles (the first order block);
3) complex conjugate of the poles (the second or-
der block).
0
Ts
1
12
1
22 +ξ+ TssT
2n
d
-order block
1
s
t-order block
I
ntegrato
r
1+TsK
Fig. 1. The types of the elementary dynamic blocks.
Those three blocks are the elementary parts for con-
struction of the whole designed computer model.
The responses of the every elementary dynamic
block can be represented as the discrete transfer func-
tions using z-transform and signal transformation by
holds. Traditionally applying of the first and third
transformation types from Table I [4] produce corre-
sponding recurrent equations for computer simulation.
The signal transformation by first-order hold allows to
obtain more accurate but more complicate model
equation for middle- and high-order systems espe-
cially.
TABLE I
SIGNAL TRANSFORMATION TYPES WITH Z-TRANSFORM
1.
s
ehs
1
Zero-order hold
2.
()
see s
h
hs 2
1
Zero-order hold with half-period forward
compensation (modified z-transform with
m = 0.5 is using to produce discrete trans-
fer function)
3.
(
)
2
2
1
hs
ee hshs
First-order hold
Note: h – is the sampling period.
Proposed by author usage of the modified z-
transform (see second signal transformation type in
the Table I) for the half-period delay compensation of
zero-order hold gives the simpler recurrent modelling
equations with accuracy similar to the first-order hold.
III. DIGITAL MODELS OF THE BASIC BLOCKS
The basic principles of the equation building proc-
ess using z-transform are known [1], [3], [4]. Only the
way of modified z-transform using with the half-
period forward compensation is described below in
this article. This approach is based on the known ta-
bles of the modified z-transform ([5], for example, –
very old but still actual book) and produce the quit
simple modelling recurrent equations.
a. Integrator
Integrator is the simplest dynamic block frequently
using in the computer simulation. After one-period
forward shifting (once multiply discrete transfer func-
tion by z1) and modified z-transform with shifting m =
0.5 can be written:
1
1
2
5.0,
11
+
=
=
z
zh
m
Tss
e
Zsh
()
11 2++ ++= iiii xx
h
yy .
The obtained digital model of the integrator is equal
to model by first-order hold (see [4]).
b. First-order block
The first-order block is other very useful block for
the computer simulation because it corresponds to the
first-order ODE. Using the described approach we ob-
tain it recurrent equation:
T
h
T
h
T
h
sh
ez
Keze
m
Ts
K
s
e
Z
2
2
+
=
=
+
1
5.0,
1
1
+
+=
+
+T
h
ii
T
h
T
h
ii exxKeeyy 2
1
2
11.
c. Second-order block
Using any type of the signal transformation (see ta-
ble I) with second-order block leads to very compli-
cate expression that is not suitable in practice. The
best way is converting of the second-order differential
equation into the system of the two first-order ODEs
and usage of the described transformations for the
every part:
xyyTyT =+
ξ+
2
2
ξ
=+
ξ
=
.
22
;
Tyx
zz
T
zy
This way slightly reduces accuracy but simplify ob-
tained recurrent equations. The accuracy can be im-
provement by the small reducing of the step size.
IV. SIMULATION RESULTS
The obtained recurrent equations were verified us-
ing computer simulation.
a. First-order block
The analytic solution for the test sinusoidal input
signal was compared with different (see table I) com-
puter models of the first-order dynamic block with
T = 1, K = 1 with the various steps. Also the digital
model based on 4th-order Gear's formula (or BDF –
Backward Differentiation Formula) was compared.
The results for the step h = 0.2 s are presented in
fig. 2.
0 1 2 3 4 5 6 7 8 9 10
-0.4
-0.2
0
0.2
0.4
0.6
t, s
y(t)
0 1 2 3 4 5 6 7 8 9 10
0
0.02
0.04
0.06
0.08
0.1
t, s
|Errors|
Marks of digital models of the 1st order block
+ using zero-order hold
x using zero-order hold with half-period compensation
−•− using first-order hold
−◊− using 4th-order Gear's formula (for comparison)
Fig. 2. Digital models' of 1st-order block responses for SIN input and
errors for step h = 0.2 s
Remark
The every recurrent equation that describes 1st-orde
r
dynamic block and is produced by z-transform consist o
f
the exp function evaluation. This fact isn't a problem in the
real-time or high-speed simulation systems because the
modern microprocessors calculate exp function very fast.
For example, there are time of calculations for exp(x) o
the different processors (calculated in MATLAB):
Intel Pentium-200 MMX – approx. 6 µs;
Intel Celeron-1400 MHz – approx. 0.3 µs;
AMD Sempron 2000 MHz – approx. 0.11 µs.
In the critical case (slow microcontrollers, for example)
exp function evaluation can be excluded from the main
program loop and calculate before as a constant.
b. Second-order block
The analytic solution for the test sinusoidal input
was compared with two computer models of the 2nd-
order dynamic block (based on the 2nd-order ODE and
on the system of the two 1st-order ODEs). This models
obtained by the modified z-transform with half-period
forward compensation. The models was tested for the
parameters T = 1, ξ = 0.6 with the various steps. Also
the digital model based on 4th-order Gear's formula
was compared. The results for the step h = 0.5 s are
presented in fig. 3.
0 5 10 15
-1
-0.5
0
0.5
1
t, s
y(t)
0 5 10 15
0
0.01
0.02
0.03
0.04
0.05
t, s
|Errors|
Marks of digital models of the 2nd-order block
x based on the traditional description as 2nd-order ODE
x based on the description as the system of two 1st-order
ODEs
−◊− using 4th-order Gear's formula (for comparison)
Fig. 3. Digital models' of 2nd-order block responses for SIN input
and errors for step h = 0.5 s
c. DC electric drive
The computer simulation of the simple chopper-fed
DC electric drive (fig. 4) with proposed approach was
carried out in MATLAB. The standard function for
ODEs of MATLAB was used for comparison. Load
torque for the motor changed from 5 to 20 Nm at
t = 0.4 s. The calculation time for AMD Sempron
processor (2000 MHz) was for:
standard MATLAB functions for ODE with auto-
matic step size control (presented on fig. 5, a):
ode23 – 7.14 s;
ode45 – 11.69 s;
ode113 – 10.19 s;
proposed approach with fixed step h = 10-5 s (no
best variant of step selection) – 0.67 s (presented
in fig. 5, b).
M
ω
i
a
P
I-controller
ω
ref
H
ysteresis current
controller with chopper
t
Fig. 4. The diagramm of the tested chopper-fed DC electric drive
Remark
The MATLAB realizations of the numeric methods fo
r
the stiff systems of ODEs (ode15s, ode23s,
ode23t, ode23tb) produce the some wrong results
for this model with default value of the error tolerance.
For accurate results the tolerance for these methods mus
t
be increased to 10-5 and better.
00.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5
0
20
40
60
80
100
120
t, s
I
a
[A],
ω
[
1
/
s
]
a) simulation results with standard MATLAB functions for ODE
00.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5
0
20
40
60
80
100
120
t, s
I
a
[A],
ω
[
1
/
s
]
b) simulation results with proposed approach
Fig. 5. The results of simulation of the DC electric drive
The calculation speed of the proposed approach can
be improved by the increasing step size and determin-
ing it value by the current switching conditions of the
controller's model.
V. CONCLUSIONS
Using modified z-transform for producing computer
models provides high-speed simulation with accuracy
like a middle-order (3d-4th-order) classical numeric
methods for ODEs. It is easy to use and understand
these modelling equations. They are suitable for real-
time simulation or control (or other high-speed) sys-
tems using low-productive microprocessors and mi-
crocontrollers especially.
Recurrent equations, based on modified z-trans-
form, are suitable for the simulation of the impulse and
discrete systems without limitations that inherent to
the classic numeric methods for ODEs.
REFERENCES
[1] R. C. Dorf, "Modern Control Systems", Fifth Edition, Addi-
son-Wesley Publishing Company, 1990.
[2] The MathWorks, Inc., Numerical Computing with MATLAB/
By C. Moler. – 2004: http://www.mathworks.com/moler .
[3] W. Siebert, "Circuits, Signals and Systems", London: The MIT
Press, 1986.
[4] J. M. Smith, "Mathematical Modeling and Digital Simulation
for Engineers and Scientists", A Wiley-Interscience Publica-
tion John Wiley & Sons, 1977.
[5] J. T. Tou "Digital and Sampled-Data Control Systems",
McGraw-Hill, New York, 1959.
... The next stage to solve the convolution integral is decomposition of the impulse response function of the whole system to the sum of the impulse responses of elementary dynamic blocks [3]:  integrator (zero pole);  single real pole (called as aperiodic block that corresponds to single first-order ODE);  pair of the complex conjugate poles (known as the second-order oscillated block). To improve properties of the zero-order hold we can use modified z-transform with the half-period forward compensation [4]. This approach produces the quit simple modeling recurrent equations for elementary dynamic blocks that can be considered as elementary parts of the total convolution integral approximation. ...
... The first-order block is equivalent to the first-order ODE. Using the proposed approach we have obtained modeling equation for computer simulation [4]: ...
... This way slightly reduces accuracy (that can be compensated by small reducing of the step size) but simplifies very much obtained recurrent equations [4]. ...
Conference Paper
Full-text available
The calculations of the electrical circuits using the convolution integral approximations based on z-transform are presented in the paper
... 2) The free input signal or excitation x(t) of the modelled system is undefined symbolically that's must be approximated by the polynomial x * (t) using signal samplings. This principle is used in z-transform on the basis of zero-and first-order approximation for the sampled signals [5]. ...
Article
Full-text available
The method of the computer simulation of the electromechanical systems using the recurrent equations based on the convolution integral approximations is presented in this paper. Optimal aproximation order was investigated. The results of the research confirmed by computer simulation of electric drive.
Conference Paper
Full-text available
The present paper explores the error estimation for piecewise approximation of nonlinear systems using convolution integral. The base for the proposed method is the relationship between convolution integral and z-transform. The problem of error estimation is simplified using complete system decomposition to two elementary dynamic blocks – integral (zero pole) and first-order (one real pole). For each block, possible cases of changes in their parameters are considered – one parameter in the integration block and up to two parameters in the first-order block. Theoretical principles confirmed by computer simulation using the simple model also been presented.
Article
An introductory text to circuits, signals, and systems is presented. The topics considered include: dynamic equations and their solutions for simple circuits, the unilateral Laplace transform, system functions, poles and zeros, interconnected systems and feedback, the dynamics of feedback systems, discrete-time signals and linear difference equations, the unilateral Z-transform and its applications, the unit sample response and discrete-time convolution, and convolutional representations of continuous-time systems. Also addressed are: impulses and the superposition integral, frequency-domain methods for general LTI systems, Fourier transforms and Fourier's theorem, sampling in time and frequency, real and ideal filters, duration-bandwidth relationships and the uncertainty principle, bandpass operations and analog communication systems, Fourier transforms in discrete-time systems, averages and random signals, and modern communication systems.
Numerical Computing with MATLAB/ By C. Moler
  • The Mathworks
  • Inc
The MathWorks, Inc., Numerical Computing with MATLAB/ By C. Moler. -2004: http://www.mathworks.com/moler.
  • W Siebert
W. Siebert, "Circuits, Signals and Systems", London: The MIT Press, 1986.