Zimmer - Effects of Event Free Noise Signals On Continuous Time Simulation Performance

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

8th Vienna International Conference on Mathematical Modelling

8th
8th Vienna
Vienna18International
February International Conference
Conference
- 20, 2015. Vienna on
on Mathematical
Mathematical
University Modelling
Modelling
of Technology, Vienna,
8th Vienna
February 18International
-- 20, 2015. Conference
Vienna on Mathematical
University of Modelling
Technology,
February
Austria
February 18
18 - 20,
20, 2015.
2015. Vienna
Vienna
Available
University
University of
of
online atVienna,
Technology,
Technology,
www.sciencedirect.com
Vienna,
Vienna,
Austria
Austria
Austria
ScienceDirect
IFAC-PapersOnLine 48-1 (2015) 280–285
Effects
Effects of
of Event-Free
Event-Free Noise
Noise Signals
Signals on
on
Effects of Event-Free
Continuous-Time Noise
Simulation Signals on
Performance
Continuous-Time Simulation Performance
Continuous-Time Simulation Performance
Franciscus L. J. van der Linden ∗∗∗ Andreas Klöckner ∗∗∗
Franciscus
Franciscus L. J.
J. van der Linden ∗ Andreas Klöckner
Franciscus L.
L. J. van der Linden
Linden ∗∗∗∗Andreas
Andreas Klöckner

vanDirk
der Zimmer
Dirk Zimmer Klöckner ∗
Dirk Zimmer
Dirk Zimmer



∗ DLR German Aerospace Center, Institute of System Dynamics and
∗ DLR
DLR German
German Aerospace Center, Institute of
of System
System Dynamics
Dynamics and

∗ DLR German Aerospace
Aerospace Center,
Center,
Control, 82234 Institute of System
InstituteGermany
Weßling, Dynamics and
and
Control,
Control,
Control, 82234
82234 Weßling,
82234 Weßling, Germany
Weßling, Germany
Germany
(e-mail: franciscus.vanderlinden@dlr.de).
(e-mail: franciscus.vanderlinden@dlr.de).
(e-mail: franciscus.vanderlinden@dlr.de).
(e-mail: franciscus.vanderlinden@dlr.de).
Abstract: Generating stochastic input signals such as noise in physical systems is traditionally
Abstract:
Abstract: Generating
Generating stochastic
stochastic input signals such as noise in physical systems is traditionally
implemented
Abstract: using discrete
Generating randominput
stochastic number
input signals such
such as
generators
signals noise
based
as based
noise on in
in physical
on systems
systems is
discrete time-events.
physical is traditionally
Within the
traditionally
implemented
implemented using
using discrete
discrete random
random number
number generators
generators based on discrete
discrete time-events.
time-events. Within the
Modelica
implemented community,
using time-event
discrete random free random
number number based
generators generators
on discrete recently beenWithin
have time-events. proposed
Within the
the
Modelica
Modelica community, time-event free
freeofrandom number generators have recently been proposed
in order tocommunity,
Modelica increase thetime-event
community, time-event
performance free random
system number
random number generators
generators
simulations. However, have
have therecently
impact been
recently been
of such proposed
proposed
signals
in
in order
order to
to increase
increase the
the performance
performance of
of system
systemorsimulations.
simulations. However,
However, the
the impact
impact of
of such
suchInsignals
signals
on
in commonly
order to used the
increase solvers, such as of
performance DASSL
system Radau IIA,However,
simulations. is still under the discussion.
impact of such order
signals
on
on commonly
commonly used
used solvers,
solvers, such
such as
as DASSL
DASSL or
or Radau
Radau IIA,
IIA, is
is still
still under
under discussion.
discussion. In
In order
order
to
on provide
commonly betterused understanding
solvers, such for
as modeling
DASSL orpractitioners,
Radau IIA, we
is examine
still under thediscussion.
influence of In event-
order
to
to provide
provide better
better understanding
understanding for
for modeling
modeling practitioners,
practitioners, we
we examine
examine the
the influence
influence of
of event-
event-
free
to noise models
provide better on simulationfor
understanding performance.
modeling To this end,weweexamine
practitioners, conductthe practical
influence simulation
of event-
free
free noise
free noise models
noise models on
on simulation
on simulation performance. To
To this end, we
we conduct practical simulation
experiments models
with systems of threeperformance.
simulation performance.
sizes, two solvers,To this
andend,
this end, we
different conduct
conduct
parameters. practical
practical
Results simulation
simulation
indicate
experiments with
experiments with systems
systems of of three
three sizes,
sizes, two
two solvers,
solvers, and
and different
different parameters.
parameters. Results Results indicate
indicate
that step-sizewith
experiments control
systems can ofhandle
three event-free
sizes, two noise generators
solvers, and different wellparameters.
and that they Results outperform
indicate
that
that step-size
step-size control
control can
can handle
handle event-free
event-free noise
noise generators
generators well
well and
and that
that they
they outperform
outperform
sampled
that generators.
step-size control The can findings
handle can be related
event-free to other
noise time-dependent
generators well and system
that they inputs.
outperform
sampled
sampled generators.
sampled generators. The
generators. The findings
The findings can
findings can be
can be related
be related to
related to other
to other time-dependent
other time-dependent system
time-dependent system inputs.
system inputs.
inputs.
© 2015, IFAC (International Federation of Automatic Control) Hosting by Elsevier Ltd. All rights reserved.
Keywords: Numerical simulation, Random number generators, Continuous time systems,
Keywords:
Keywords: Numerical simulation, Random number generators, Continuous time systems,
Integrators,Numerical
Keywords: simulation,
simulation, Random
Software performance
Numerical Random numbernumber generators,
generators, Continuous
Continuous time time systems,
systems,
Integrators,
Integrators, Software
Integrators, Software performance
Software performance
performance
1. INTRODUCTION signals are generated directly as a function of time. This
1.
1. INTRODUCTION
INTRODUCTION signals
signals are
are generated
generated directly as a function of time. This
1. INTRODUCTION eliminates
signals arethe need to directly
generated generateas
directly as a
a function
events. Instead,
function of
of time.
it putsThis
time. the
This
eliminates the need to generate events. Instead, it
it puts
puts the
Noise or other stochastic input signals are omnipresent eliminates eliminates the
the need
need to
to generate
generate events.
events.
step-size control of the ODE solver in charge. However, Instead,
Instead, it puts the
the
Noise or
or other stochastic input signals are omnipresent step-size
Noise
in realistic
Noise or other
system
other stochastic
simulation.
stochastic input
input signals
Adding
signals are to
noise
are omnipresent step-size control
step-size
a nominal performance
omnipresent control
controlimpact
of
of the
of the
the ODE
of ODE
ODE solver
solver in
solver
such signals inoncharge.
in charge.
charge.
the ODE
However,
However, the
solversthe
However, the
is
in realistic
in realistic system
system simulation.
simulation. Adding Adding noise noise to to a a nominal
nominal performance
performance impact impact of of such
such signals
signals on on the
the ODE
ODE solvers
solvers isis
system
in realistic simulation
system is especially
simulation. important
Adding noise for
to aassessing
nominal not yet fully understood.
performance impact of such Thesignals
general on proposition
the ODE claimed
solvers is
system
system simulation
simulation is
is especially
especially important
important for
for assessing
assessing not
not yet
yet fully
fully understood.
understood. The
The general
general proposition
proposition claimed
claimed
a system’s
system performance
simulation is or to important
especially evaluate aforcontroller’s
assessing is that
not yet step-size
fully control will
understood. The handle
general the influences claimed
proposition of such
a
a system’s performance or
or to to ofevaluate a
a controller’s is that
a system’s
system’s However,
properties. performance
performance or
simulation to evaluate
evaluate a controller’s
controller’s
natural fluctuations is is is that step-size
that
signals step-size
step-size
reasonably
control
control
control will
well, will
will handle
handle the
handle
if suitably the
the
smooth
influences
influences
influences of
of such
of
interpolationsuch
such
properties.
properties. However,
However, simulation
simulation of natural
of also
natural fluctuations
fluctuations is signals
is functions
signals reasonably well, if suitably smooth interpolation
not limited However,
properties. to controlsimulation
design, but of naturalapplies to various
fluctuations is signals reasonably
reasonably
are used and well,
well,the if
if suitably
suitably
frequency smooth
contentinterpolation
smooth interpolation
is bounded.
not limited
not limited to to control
control design,
design, but but alsoalso applies to to various
various functions are are used
used and and the the frequency content content is is bounded.
bounded.
other
not
other
fields to
limited
fields
such
such
as aircraft
control
as aircraft but also applies
design, airworthiness
airworthiness applies to various functions
requirements
requirements
In this case,
functions
In this case,arethe
theused and the frequency
polynomial
polynomial
approximations
frequency
approximations content used
used
for error
is bounded.
for error
other
(e.g.
other fields
EASA,
fields such
2007),
such as
as aircraft
estimating
aircraft airworthiness
power outcomes
airworthiness requirements
of wind In
requirements In this case,
estimations
this case, the
should
the polynomial
work adequately.
polynomial approximations
approximations used
used for
for error
error
(e.g.
(e.g. EASA,
EASA, 2007), estimating power outcomes of wind estimations should work adequately.
(e.g.
energy farms2007),
EASA, 2007), estimating
estimating
(e.g. Justus et al.,power
1976),outcomes
power outcomes of
of wind
or interpretation wind estimations
estimations shouldshould work work adequately.
adequately.
energy
energy farms
farms (e.g.
(e.g. Justus
Justus et
et al., 1976),
al.,(e.g.
1976), or
or interpretation
interpretation
of experimental
energy farms sensor
(e.g. Justusreadings
et al., 1976), Márton
or and van der Here,
interpretation Here,
we investigate the effects of such event-free noise on
we
of
of experimental
experimental
Linden,
of
sensor readings (e.g.
2012). sensor readings (e.g. Márton and
experimental sensor readings (e.g. Márton
Márton and van
and van
van
der
der
der
Here,
Here,
the we investigate
we investigate
investigate
integrator accuracy
the
the
the andeffects
effects
effects cost
of
of such
such
of (i.e. event-free
event-free
suchnumber
event-free noise
noise on
noise
of function on
on
Linden,
Linden, 2012).
2012). the integrator
the integrator
integrator accuracy
accuracy and
and cost (i.e.
cost (i.e.
(i.e.arenumber
number of function
of function
function
Linden, 2012). calls
the and run-time).accuracy Our expectations
and cost that
number (a)
of sampled
Typical noise generators are discrete-time processes, re- calls calls
calls
and run-time).
noise and run-time).
introduces
and run-time).
Our
Our
a relatively
expectations are
Our expectations
constant cost
expectations are that (a)
are that
for all(a)
that (a)
sampled
sampled
accuracies
sampled
Typical
Typical noise generators are discrete-time processes, re-
lying onnoise
Typical generators
recursively
noise generators are
perturbing
are discrete-time
an internalprocesses,
discrete-time state. Each
processes, re-
re- noise
noise
due
noise
introduces
introduces
to the
introduces
aa relatively
step-size
a relatively
being
relatively
constant
constant
limited
constant
cost
cost
by
cost
for
for
event
for
all
all
all
accuracies
accuracies
instances,
accuracies
lying
lying on recursively
on recursively
recursively perturbing
perturbing an internal
an internal
internal state. Each
state. Each
Each
lying on
perturbation of this stateperturbing an
is represented state.
by a time-event in due due to
due to the
(b)the
to the step-size
step-size
step-size being
being limited
limited by
limited
beingintegrators by
bycanevent
event
event instances,
instances,
instances,
perturbation
perturbation
the simulation.
perturbation
of
of
this
this state
of The
this state is
is represented
represented
high frequency
state is represented
by
by aaa time-event
of typical
by time-event
noise signals
time-event in that
in
in that
that (b)
(b)
variable
variable
variable
step-size
step-size
step-size integrators
integrators can
can
indeed
indeed
indeed
handle
handle
handle
the
the simulation. The high frequency of typical noise signals event-free
that (b) noise
variable signals
step-size by selecting
integrators suitable
can indeed step-sizes,
handle
thussimulation.
the causes a high
simulation. The
The high
number
high frequency of
of typical
of time-events.
frequency typical noise
This
noise signals
results
signals event-free
event-free
that (c)
event-free
noise
noise
event-free
noise
signals
signals
noise
signals
by
by selecting
selecting
outperforms
by selecting
suitable
suitable
sampled
suitable noise
step-sizes,
step-sizes,
for low
step-sizes,
thus
thus causes
causes a
a high number of time-events. This results
in small
thus
in smallcauses a high
step-sizes
step-sizeshighfor number
for
the ODE
number
the ODE
of
of time-events.
solver and
This
This results
solver and consequently
time-events. results that
consequently that (c)
(c)
accuracies
that (c)
event-free
event-free
by
event-free
noise
noise
allowing
noise
outperforms
outperforms
larger
outperforms step-sizes,
sampled
sampled
sampledthat
noise
noise
(d)
noise
for
for low
for low
smoothlow
in
in small
small
high step-sizes
step-sizes for
computational for
cost.the
theSee ODE
ODEe.g. solver
Felgnerand
solver andandconsequently
Frey (2010), accuracies
consequently accuracies by allowing larger step-sizes, that (d) smooth
high computational cost. See e.g. Felgner and Frey (2010), accuracies by
interpolations allowing
by further
allowingdecreaselarger
larger step-sizes,
step-sizes,
the cost of that
that
noise (d)
(d) smooth
smooth
simulation.
high computational
where
high computational
the influence cost. cost. See e.g.
of different
See e.g.solvers
Felgnerisand
Felgner and Frey (2010),
investigated
Frey (2010), interpolations further
on interpolations further decrease the the cost of of noise simulation.
simulation.
where
where the
the influence
influence of different solvers is investigated on interpolations further decrease decrease the cost cost of noise
noise simulation.
continuous,
where the stiff and of
influence different
hybrid
of different solvers
systems.
solvers is
is investigated
investigated on
on (1) We thus first introduce sampled and event-free noise
continuous,
continuous, stiff
stiff and
and hybrid
hybrid systems.
systems. (1)
(1) We
We thus
thus first
first introduce
introduce sampled
sampled and
and event-free
event-free noise
noise
continuous, stiff and hybrid systems.
Most modelers today use robust ODE or DAE solvers that (1) signals
We thus as used
first in this
introduce study
sampled in Sec.
and 2.
event-free noise
Most modelers today use robust ODE or DAE solvers that signals
signals as
as used
used in
in this
this study
study in
in Sec.
Sec. 2.
2.
Most
Most modelers
are suitable
modelers today
for highly
today use use robust
stiffrobust
systemsODEODEsuchoror DAE
asDAEDASSL solvers that
(Petzold,
solvers that (2) The
signals influence
as used of the
in thisnoisestudysignalsin on
Sec. a simple
2. integrator
(2)
(2) The
(2) The influence
influence of
of the
of the noise
the noise signals
signals on
on aaa simple
on simple integrator
are
are suitable
are suitable
suitable
1982) or Radau
for
for highly
for highly
highly stiff
stiff systems
stiff
IIA (see systems
systems
e.g. Hairer
such
such
suchandas
as DASSL
as DASSL
DASSL
Wanner,
(Petzold,
(Petzold,
(Petzold,
1996). The
model’s influence
performance noise signals
is then compared as aintegrator
simple integrator
function
1982) or Radau IIA (see e.g. Hairer and Wanner, 1996). model’s
model’s
model’s performance
performance
performance is
is
is then
then
then compared
compared
compared as
as
as a
a
a function
function
function
1982) or Radau
Especially
1982) or Radau
multi-stepIIA (see
IIA (see
methodse.g. Hairer
e.g. Hairer
like DASSL and Wanner,
and Wanner,
suffer from 1996).
the
1996). of the desired accuracy in Sec. 3.
Especially multi-step
multi-step methods
methods like like DASSL
DASSL suffersuffer from
from thethe of
of the
the desired
desired accuracy
accuracy in
in Sec.
Sec. 3.
3.
Especially
large number
Especially of time-events
multi-step methods since
likethe restart
DASSL at each
suffer fromtime-
the (3) The
of the example
desired model
accuracy is extended
in Sec. to
3. a critical damping
(3)
(3) The
The example model is extended to aa critical damping
large
large
large
number
event number
of
of time-events
time-events
is computationally
number of time-events
since
since
expensive
since
the
the
the
restart
restart
(see
restart
at
at
at
each
each
e.g. Lundvall
each
time-
time-
and
time- The example
(3) with
with
50 statesmodel
example
50 states
in Sec.is
model
in Sec.
extended
extended to
is 3.2.
3.2. to a critical
critical damping
damping
event
event is
event
Fritzson,is computationally
is computationally
computationally
2005). But also for
expensive
expensive
implicit(see
expensive (see
(see e.g.
e.g. Lundvall
e.g.
Runge-Kutta Lundvall
Lundvall and
and
and
method (4) with
with 50
50 states
We finally states
show in Sec.
in the 3.2.
Sec.influence
3.2. of the noise amplitude
(4)
(4) We
(4) We finally
We finally show
show the
the influence
the influence of the noise
noise amplitude
Fritzson,
Fritzson,
as Radau 2005).
Fritzson,
2005).
2005).
IIA, the
But
But
But
also
also for
enforced
also
implicit
implicit Runge-Kutta
forstep-sizes
for implicit Runge-Kutta
are often much
Runge-Kutta
method
method
lower
method finally
relative showsystem
to the states inof
influence the
ofSec.
the 4.noise amplitude
amplitude
as Radau IIA, the enforced step-sizes are often much lower relative
relative to
to the
the system
system states
states in
in Sec.
Sec. 4.
4.
as Radau
than
as RadauwhatIIA,IIA,
wouldthe
thebe enforced
required
enforced step-sizes
for the are
step-sizes are often
demanded
often muchmuch lower
precision. relative to the system states
lower Although we use noise signals in this work, the results are in Sec. 4.
than
than what
what would
would be
be required
required for
for the
the demanded
demanded precision.
precision.
than what would be required for the demanded precision. Although we use noise signals in this work, the results are
Recent work therefore proposes to generate event-free Although also relevant
Although we
we use noise
noise signals
for other
use types ofin
signals this
this work,
insignals. These
work, the results
theinclude are
results e.g.
are
Recent
Recent work
work therefore
therefore proposes
proposes to
to generate
generate event-free
event-free also
also relevant
relevant for
for other
other types
types of
of signals.
signals. These
These include
include e.g.
e.g.
continuous-time
Recent work noise signals
therefore proposes (Klöckner
to et al., 2014).
generate The also
event-free interpolation
relevant tables
for other or types
sine waves,
of as long
signals. These as include
the signalse.g.
continuous-time
continuous-time noise
continuous-time noise signals
noise signals (Klöckner
signals (Klöckner et
(Klöckner et al.,
et al., 2014).
al., 2014). The
2014). The interpolation
The interpolation tables
interpolation tables or
tables or sine
or sine waves,
sine waves, as
waves, as long
as long as
long as the
as the signals
the signals
signals
2405-8963 ©
Copyright © 2015,
2015,IFAC
IFAC (International Federation of Automatic Control)
280Hosting by Elsevier Ltd. All rights reserved.
Copyright
Peer review©
Copyright © 2015,
2015, IFAC
IFAC 280
280
Copyright ©under
2015,responsibility
IFAC of International Federation of Automatic
280Control.
10.1016/j.ifacol.2015.05.039
MATHMOD 2015
February 18 - 20, 2015. Vienna, Austria
Franciscus L. J. van der Linden et al. / IFAC-PapersOnLine 48-1 (2015) 280–285 281

1
1 raw

random signal
correlation, p

sinc
correlation linear
0.5 puncorrelated 0
puniform

−1
0
0 10 20 30 40 2.04 2.06 2.08 2.1 2.12 2.14
iterations time /s

Fig. 1. A high diffusion capacity allows to retrieve random Fig. 2. This study uses the “raw” sample-and-hold noise
numbers from an algorithm after a few iterations. signal (i.e. no interpolation), the “linear” interpo-
Here, ten steps allow to recover from a bad seed (see lation, and the continuous “sinc” interpolation (see
Klöckner et al., 2014, Fig. 3). Klöckner et al., 2014, Fig. 4).
are generated directly as a function of the time rather than the second is a linear interpolation, and the third applies a
of the system states. smooth interpolation using the sinc function as kernel. The
three interpolations are shown conceptually in Fig. 2. The
2. RANDOM SIGNALS sinc interpolation has very good low-pass characteristics. In
this study, we use all three interpolation functions in order
For this work, we use the Modelica Noise library (Klöckner to compare the effect of the interpolation’s smoothness on
et al., 2014). It allows to modularly compose a random the solver performance. Note that all interpolations can be
number generator, a probability density function, and an used with the sampled as well as the sample-free method.
interpolation function for the noise signal. The signal is
then readily available for complex multi-physics simulations 3. EFFECTS ON SOLVER PERFORMANCE
built on the modeling language Modelica.
In this section we study the behavior of two commonly
Several standard sampled random number generators are used solvers (DASSL & Radau IIA order 5) and the
provided, which all make use of a discrete-time state vector influence of interpolation of the event-free noise signal
s. The model generates events every ∆t seconds and iterates on the simulation.
the state vector from spre to snew in order to yield a new
random value r: To study these effects, two systems have been analyzed:
snew = f (spre ), A trivial system with one state and a larger system with
(1) 50 states. These systems will be studied in the following
r = g(snew ). sections. The proposed systems are simulated using the
The library additionally introduces a new, continuous- DASSL and Radau IIA order 5 solvers implemented in
time type of random number generator: DIRCS Immediate Dymola 2015 on a Windows based computer (Intel Xeon
Random with Continuous Seed (DIRCS). It relies heavily on E5-1620, 16GB ram). The influence of the solver accuracy
the diffusion capacity of certain random number generators: on the number of function evaluations and the simulation
They deliver high-quality random numbers after a few time is assessed. The systems are simulated 5000 seconds
iterations of the algorithm on a poor, non-random seed. to minimize the influence of initialization effects.
Simple generators recover reasonably well after a few steps
(see Fig. 1). This ability is exploited by seeding the random 3.1 Single state integrator system
number generator with a simple function of time, such as
shown in Eq. 2. The approach completely eliminates the To study the effects of event-free noise on a simple example,
need for discrete states in the noise model. a system is set up using Dymola combining a noise generator
int s [2] = (int∗) (&time); (2) and an integrator (see Figure 3a). This system represents
In this work, we use uniformly distributed random numbers a simple model with only a single state. The noise is
generated by a simple, multiple recursive generator with configured to produce a uniform noise on the interval [-1e-
the two states s1 and s2 . The same generator is used for 3,1e-3].
the discrete-time algorithm as well as within the DIRCS In the top two diagrams of Figure 4, the amount of evalua-
algorithm in order to yield comparable results in terms tions of the function ẋ = f (x, u, t) and the computational
of run-time. The quality of the random number is not
of interest in this study. The algorithm used is given
in Eq. 3. The parameters are heuristically chosen to be
ai = 134775813 and c = 2147483629.

snew
1 = ai · spre
i + 1 mod c
(a) simple intgrator (b) critical damping
s new
=s pre (3)
2 1
r= snew
1 /c Fig. 3. Noise generator coupled to two systems: A simple
The library also provides three different types of interpo- integrator as a trivial system with one state and a
lation: The first implements a sample-and-hold behavior, critical damping as a system with 50 states.

281
MATHMOD 2015
Franciscus L. J. van der Linden et al. / IFAC-PapersOnLine 48-1 (2015) 280–285
February 18 - 20, 2015. Vienna, Austria
282

time to simulate the system using the DASSL solver is


shown. As expected, the computational effort for the DASSL
sampled method is almost constant, i.e. it is independent of 108
the demanded integrator accuracy. The sample free DIRCS 107

Function evaluations
method needs less computational effort than sampled
methods for loose tolerances. The effort needed for the
sample-free noise signal approaches and eventually exceeds 105
the effort for sampled noise for very tight tolerances. This
effect can be explained as follows: No interpolation
103 Linear interpolation
• The sampled system halts the solver at each sample,
independent of the tolerance and restarts the calcula- Sinc interpolation
tion. This leads to an almost unchanged simulation 101
effort. 10−1 10−2 10−4 10−6 10−8
• As long as the error tolerance of the solver is above
the amplitude of the noise, the solver can neglect the
noisy input of the event-free system. This leads to a
reduction of simulation effort.

Simulation time / s
• At tight tolerances, the solver will try to exactly
follow the noise signal. However, when this signal 101
contains discrete steps in its value or in its derivatives,
the polynomial-based error estimations of the solver
perform badly. For non-interpolated signals, a restart
10−1
at the time-event is then the better strategy, leading to
slightly less computational effort for sampled systems.
A higher order interpolation routine leads to a reduction 10−3
in function evaluations for the event-free methods. The 10−1 10−2 10−4 10−6 10−8
smoother signal makes it easier for the solver to follow
the event-free noisy signal and can therefore reduce the Radau IIA
amount of steps. The interpolation function itself though 108
can increase the costs per function evaluation. The results
107
Function evaluations

of the simulation using the Radau IIA solver can be seen


in the bottom two diagrams of Figure 4. The Radau IIA
solver is especially suitable for stiff systems. Since systems
105
with noise are almost always stiff due to the combination of
high frequency noise on a low bandwith system. The results
from this test show that the Radau IIA solver has a similar 103
behaviour as the DASSL solver. Since the tolerances of
both solvers cannot be directly compared, no conclusions
about the performance can be made. 101
10−1 10−2 10−4 10−6 10−8
3.2 Critical damping system with 50 states

To investigate the effect of noise on nontrivial systems, an 103


example model has been created. A critical damping block
Simulation time / s

with a cut-off frequency of 10 Hz of order 50 is coupled to


the noise generator. This yields a system with 50 states. 101
The critical damping block has following transfer function:
1
y = s n u (4) 10−1
ω +1

with α = 2( n ) − 1 and ω = 2π αf . Here f is the cut off
1

frequency in Hz and n the system order. The set up of the 10−3


system can be seen in Figure 3b It is expected that in a 10−1 10−2 10−4 10−6 10−8
system with 50 states, a solver restart will have a relatively Relative tolerance of solver
heavy penalty on the simulation performance. A better
interpolated signal is therefore expected to have a positive Fig. 4. Function evaluations and simulation time as a
influence on the performance of the solvers. function of the integrator tolerance for a simple sys-
The results from the system with 50 states using the DASSL tem and different interpolation methods. Dashed lines
solver with the same setup as used before can be seen represent the sample based method, solid lines the
in the top two diagrams of Figure 5. The penalty on a sample free DIRCS method. Sample-free noise reduces
higher interpolation routine is not as high as in the simple computational costs, especially with loose tolerances.

282
MATHMOD 2015
February 18 - 20, 2015. Vienna, Austria
Franciscus L. J. van der Linden et al. / IFAC-PapersOnLine 48-1 (2015) 280–285 283

system. When observing the CPU-time for the integration,


it becomes clear that at higher integrator tolerances a DASSL
better interpolation of the event-free noise leads to a better 108
performance of the solver. The simulation time of the sinc 107

Function evaluations
interpolated event-free signal is always below the sampled
methods. In most real-life systems, an event-free signal
can therefore be preferred over a sampled signal. This 105
is even true at very high system accuracies. The results
from the same analysis as before using the Radau IIA No interpolation
solver can be seen in the bottom two diagrams of Figure 103 Linear interpolation
5. Using the Radau IIA solver, a similar pattern can be
Sinc interpolation
observed; the Sinc-interpolated, event-free method is for
most tolerances the most suitable interpolation method. 101
Using this combination, the method is always faster as all 10−1 10−2 10−4 10−6 10−8
sampled methods. However, the advantage is minimal for
very tight tolerances.
103

Simulation time / s
3.3 Error evaluation
101
Figure 6 shows the mean of the absolute difference between
the simulations discussed in the previous subsections and a
reference solution simulated with a relative solver tolerance
10−1
of 1 × 10−9 . The measure is evaluated over 2 500 000 grid
points of the simulations lasting 500 s with random numbers
generated at 100 Hz. Zero error is limited to 1 × 10−10 for
plotting. Note that the values can only be interpreted 10−3
relative to each other as no meaningful scaling exist . 10−1 10−2 10−4 10−6 10−8

For the integrator system and unsampled noise, the error Radau IIA
measure is linearly dependent on the demanded solver 108
tolerance. This shows the convergence of the simulation
107
Function evaluations

using an event-free noise generator. The error using sampled


noise is zero, if no interpolation is used; independent of the
solver choice. Using the Radau IIA solver, the error is also 105
zero for linear interpolation. As expected, the tolerance has
almost no influence on the error of sampled noise, because
the step-size is mainly controlled by the events generate 103
by the noise model. Using the sinc interpolation results
in medium error levels. This shows the influence of the
interpolation complexity on the error level. 101
10−1 10−2 10−4 10−6 10−8
In the critical damping simulation, there is no setting with
zero error. This system is sufficiently complex to require
additional steps in between the events instances. Unless 103
a certain tolerance is demanded, the error value is nearly
Simulation time / s

constant. This is an indicator that the system cannot be


sufficiently resolved using the specified tolerance. Using 101
tighter tolerances, results in a kink of the curves and a
linear dependency of the error level on the tolerance can
again be observed. The system is sufficiently resolved with
these tolerances and converges to the reference solution. 10−1
There is no error advantage of sampled or unsampled noise
generators in this region, if the DASSL solver is used. A
similar effect is also observed with the integrator system 10−3
and sampled sinc interpolation, using the DASSL solver. 10−1 10−2 10−4 10−6 10−8

The Radau IIA solver produces a similar error pattern


as the DASSL solver for the critical damping system and
unsampled noise. The kink in the curves is at tighter toler- Fig. 5. Function evaluations and simulation time as a
ances as compared to the DASSL solver. This corresponds function of the integrator tolerance for a complex sys-
well with the findings concerning function evaluations and tem and different interpolation methods. The findings
simulation time. The sampled noise results in surprisingly from the simple system are confirmed. Dashed lines
high error levels, which cannot be explained in the scope represent the sample based method, solid lines the
of this paper. sample free DIRCS method.

283
MATHMOD 2015
284 Franciscus L. J. van der Linden et al. / IFAC-PapersOnLine 48-1 (2015) 280–285
February 18 - 20, 2015. Vienna, Austria

Integrator (1 state)
100
Mean abs error (DASSL)

10−2 Fig. 7. An undamped spring-mass system is used to show


the effects of noise on a physical system simulation.
10−4
4. EFFECTS ON A PHYSICAL SYSTEM
10−6 No interpolation
Linear interpolation To investigate the effects of different noise levels on a
10−8 physical system, an undamped spring-mass system is
Sinc interpolation modeled using a mass of m = 1 kg and a spring stiffness
10−10 of c = 2π N/m (see Fig. 7). The system is perturbed
10−1 10−2 10−4 10−6 10−8 by moving the fixes point of the spring with a normally
distributed and smooth interpolated random variable u.
The resulting linear system is given by Eq. 5. The system
Mean abs error (Radau IIA)

100 is initialized with a fixed starting position of x0 = 1 m and


ẋ0 = 0 m/s.
10−2 m · ẍ = −c · (x + u) (5)
The system is simulated using the DASSL and Radau IIA
10−4 solvers with a fixed tolerance of 10−4 for a simulation time
of 5000 s. The variance of the perturbation is manipulated
10−6 between Var(u) = 10−8 m and 1 m and the number of func-
tion evaluations and the simulation are recorded. Figure 8
10−8
shows the results for both the event-free random number
generator and the sampled random number generator. Both
10−10
10−1 10−2 10−4 10−6 10−8 solvers show similar dependencies of the performance on
the demanded tolerance.
Critical damping (50 states) Using a sampled noise confirms the findings from the
10−2 preceding sections. The number of function evaluations
Mean abs error (DASSL)

as well as the simulation time are nearly constant for all


10−4 noise amplitudes. Both only increase at very high noise
amplitudes in the order of the natural oscillation of the
system, when using the DASSL solver.
10−6
An event-free noise generator decreases the number of
−8 function evaluations, as well as the simulation time by
10
more than an order of magnitude for small disturbances

10−10
Function evaluations

10−1 10−2 10−4 10−6 10−8 107

106 DASSL
Mean abs error (Radau IIA)

−2
10 Radau
105
−4
10
10−8 10−6 10−4 10−2 100
10−6 103
Simulation time / s

10−8 102

10−10 101
10−1 10−2 10−4 10−6 10−8
Tolerance 100
10−8 10−6 10−4 10−2 100
Fig. 6. Comparison of the mean absolute error to reference
simulation (tol=1e-9 for 500 samples per second). Amplitude
Dashed lines represent the sample based method, solid
lines the sample free DIRCS method. The sample-free Fig. 8. Function evaluations as a function of the system
methods converge to the reference solution. perturbation. When the perturbation is smaller than
the tolerance (10−4 ), the sample-free noise is ignored.

284
MATHMOD 2015
February 18 - 20, 2015. Vienna, Austria
Franciscus L. J. van der Linden et al. / IFAC-PapersOnLine 48-1 (2015) 280–285 285

below a threshold of approximately 10−4 m. This threshold Care must also be taken, when heavy tailed distributions
correlates to the desired simulation accuracy of 10−4 like the Cauchy distribution are used. Such distributions
times the natural oscillation amplitude of 1 m. Below the have a very large or undefined variance and might not be
threshold, the system is unaffected by the noise. Above properly evaluated using a sample-free method, because
this threshold, the number of function evaluations as well the solver might not evaluate single large peaks. In this
as the simulation time increase with stronger disturbances. case an event-based method should be used to guarantee
If the noise amplitude is in the same order of magnitude as proper results.
the nominal system oscillation, the event-free simulation
outperforms the model with sampled noise by roughly a REPRODUCIBLE RESEARCH
factor of 2.
We have found that continuous-time noise does not deterio- The results of this paper can be reproduced using the code
rate simulation performance, as long as the noise amplitude available on http://dlr-sr.github.io.
is below the solver accuracy. The solver naturally excludes
irrelevant noise from a system simulation. The sampled ACKNOWLEDGEMENTS
generator strongly affects the simulation performance, even
if the noise is irrelevant to the system’s states. Additionally, We thank W. Manbir for his valuable input.
even if the noise is relevant for the system simulation, an
event-free and smooth noise signal improves simulation REFERENCES
performance. EASA (2007). Certification specifications for large aero-
planes cs-25. amendment 3. Technical report, European
5. CONCLUSIONS AND DISCUSSION Aviation Safety Agency.
Felgner, F. and Frey, G. (2010). Comparison of 4 numerical
In this paper we have investigated the influence of event- solvers for stiff and hybrid systems simulation. In
free noise on two standard solvers: DASSL and Radau IIA 2010 IEEE 15th Conference on Emerging Technolo-
order 5. It is found that both investigated solvers show an gies & Factory Automation (ETFA 2010), 1–8. IEEE.
almost constant computational effort for the simulation of doi:10.1109/ETFA.2010.5641330.
event-based noise signals, independent of solver tolerance. Hairer, E. and Wanner, G. (1996). Solving Ordinary
The assessed variable step size solvers can handle the event- Differential Equations II, volume 14 of Springer Series in
free noise signals according to the tolerance settings of the Computational Mathematics. Springer Berlin Heidelberg,
solver: Using a tolerances larger than the noise amplitude, Berlin, Heidelberg. doi:10.1007/978-3-642-05221-7.
the solver mostly ignores the noise. If the tolerance is Justus, C.G., Hargraves, W.R., and Yalcin, A.
chosen below the amplitude of the signal, the solver used (1976). Nationwide assessment of potential
the event-free noise signal for the solution. output from wind-powered generators. J. Appl.
Meteor., 15(7), 673–678. doi:10.1175/1520-
Event-free noise has a lower computational cost compared 0450(1976)015<0673:NAOPOF>2.0.CO;2.
to the event-based noise at high tolerances for all analyzed Klöckner, A., van der Linden, F.L.J., and Zimmer, D.
models. For low tolerances, event-free noise also outper- (2014). Noise Generation for Continuous System Sim-
forms sampled noise, if non-trivial systems are assessed ulation. In Proceedings of the 10th International Mod-
and if continuous interpolations such as the linear or the elica Conference, 837–846. Modelica Association and
sinc interpolation are used. Linköping University Electronic Press, Lund, Sweden.
Interpolating the noise signal avoids discontinuous signals doi:10.3384/ECP14096837.
and helps the solver to reduce the number of necessary Lundvall, H. and Fritzson, P. (2005). Event handling
integration steps. Depending on the effort for a single in the OpenModelica compiler and run-time system.
time step, compared to the effort of the interpolation, this In Proceedings of the 46th Conference on Simulation
can lead to lower or higher CPU times for the simulation. and Modelling of the Scandinavian Simulation Soci-
Large systems benefit of the lower amount of function calls, ety (SIMS2005). Tapir Akademisk Forlag, Trondheim,
whereas in simple systems the penalty of the interpolation Norway. URL http://www.scansims.org/sims2005/
for each function call can be higher than the advantage SIMS2005_57.pdf. ISBN 82-519-2093-0.
of reducing the number of function calls. Since a linear Márton, L. and van der Linden, F. (2012). Temperature
interpolation has a low calculation effort, in most cases this dependent friction estimation: Application to lubricant
leads to a lower simulation time. The sinc interpolation health monitoring. Mechatronics, 22(8), 1078 – 1084.
becomes interesting when the model is large and a function doi:10.1016/j.mechatronics.2012.09.003.
call poses high computational cost. Petzold, L. (1982). Description of dassl: a differen-
tial/algebraic system solver. In 10th International
When using sample-free noise, care must be taken on how Mathematics and Computers Simulation Congress on
to choose the solver tolerances. When a high tolerance is Systems Simulation and Scientific Computation. Mon-
selected, the solver will ignore the influence of the sample- treal, Canada. URL http://www.osti.gov/scitech/
free noise. Only if the tolerance is chosen appropriately, servlets/purl/5882821.
the effect of the noise becomes visible in the simulation
results. This effect can be used to always include all noise
sources in a physical system simulation: only the signals,
which influence the behavior of the system, will lead to an
increase in simulation times.

285

You might also like