Numerical Simulation of Dynamic Systems XXVII · Numerical Simulation of Dynamic Systems XXVII...

244
Numerical Simulation of Dynamic Systems XXVII Numerical Simulation of Dynamic Systems XXVII Prof. Dr. Fran¸ cois E. Cellier Department of Computer Science ETH Zurich May 28, 2013

Transcript of Numerical Simulation of Dynamic Systems XXVII · Numerical Simulation of Dynamic Systems XXVII...

Numerical Simulation of Dynamic Systems XXVII

Numerical Simulation of Dynamic Systems XXVII

Prof. Dr. Francois E. CellierDepartment of Computer Science

ETH Zurich

May 28, 2013

Numerical Simulation of Dynamic Systems XXVII

Logarithmic Quantization

Introduction

Introduction

This 27th and final presentation of the class on the Numerical Simulation of DynamicSystems deals with “Chapter 13 of a 12-chapter book,” i.e., it discusses a number ofissues related to Quantized State System (QSS) solvers that were discovered onlyafter the book went to print.

Numerical Simulation of Dynamic Systems XXVII

Logarithmic Quantization

Introduction

Introduction

This 27th and final presentation of the class on the Numerical Simulation of DynamicSystems deals with “Chapter 13 of a 12-chapter book,” i.e., it discusses a number ofissues related to Quantized State System (QSS) solvers that were discovered onlyafter the book went to print.

� Until now, we have always controlled the absolute integration error. It may bemore robust to control the relative integration error, as this quantity doesn’tneed to be set for each simulation separately. Hence being able to specify therelative error tolerance makes the software more robust and user-friendly.

Numerical Simulation of Dynamic Systems XXVII

Logarithmic Quantization

Introduction

Introduction

This 27th and final presentation of the class on the Numerical Simulation of DynamicSystems deals with “Chapter 13 of a 12-chapter book,” i.e., it discusses a number ofissues related to Quantized State System (QSS) solvers that were discovered onlyafter the book went to print.

� Until now, we have always controlled the absolute integration error. It may bemore robust to control the relative integration error, as this quantity doesn’tneed to be set for each simulation separately. Hence being able to specify therelative error tolerance makes the software more robust and user-friendly.

� Until now, we have only dealt with non-stiff QSS-based integrators. Yet, weknow from the earlier presentations that large systems are almost invariably stiff,and consequently, we shall need also stiff QSS-based integrators. Suchalgorithms have meanwhile been developed and shall be discussed in thispresentation.

Numerical Simulation of Dynamic Systems XXVII

Logarithmic Quantization

Introduction

Introduction

This 27th and final presentation of the class on the Numerical Simulation of DynamicSystems deals with “Chapter 13 of a 12-chapter book,” i.e., it discusses a number ofissues related to Quantized State System (QSS) solvers that were discovered onlyafter the book went to print.

� Until now, we have always controlled the absolute integration error. It may bemore robust to control the relative integration error, as this quantity doesn’tneed to be set for each simulation separately. Hence being able to specify therelative error tolerance makes the software more robust and user-friendly.

� Until now, we have only dealt with non-stiff QSS-based integrators. Yet, weknow from the earlier presentations that large systems are almost invariably stiff,and consequently, we shall need also stiff QSS-based integrators. Suchalgorithms have meanwhile been developed and shall be discussed in thispresentation.

� Also of importance are special solvers for dealing with marginally stable systems,and indeed, an F-stable QSS-based solver has also been developed since thebook went to press.

Numerical Simulation of Dynamic Systems XXVII

Logarithmic Quantization

Introduction

Introduction II

� A type of models that we haven’t dealt with in this class is models that containdelays. We call a set of ordinary differential equations with delays a delaydifferential equation (DDE) model, and we call algorithms that are suitable forthe simulation of DDE models numerical DDE solvers. A QSS-based DDEsolver has meanwhile also been developed and shall be discussed.

Numerical Simulation of Dynamic Systems XXVII

Logarithmic Quantization

Introduction

Introduction II

� A type of models that we haven’t dealt with in this class is models that containdelays. We call a set of ordinary differential equations with delays a delaydifferential equation (DDE) model, and we call algorithms that are suitable forthe simulation of DDE models numerical DDE solvers. A QSS-based DDEsolver has meanwhile also been developed and shall be discussed.

� Finally, a few remarks shall be offered on the use of QSS-based algorithms inreal-time simulations.

Numerical Simulation of Dynamic Systems XXVII

Logarithmic Quantization

Logarithmic Quantization

Choosing the Quantum Size

Let us suppose that we wish to simulate a system in which a state variable x1 growsfrom 0 to 1000, while x2 grows from 0 to 1.

Numerical Simulation of Dynamic Systems XXVII

Logarithmic Quantization

Logarithmic Quantization

Choosing the Quantum Size

Let us suppose that we wish to simulate a system in which a state variable x1 growsfrom 0 to 1000, while x2 grows from 0 to 1.

� Using QSS, if we use a quantum of ΔQ1 = ΔQ2 = 0.1, variable q1 will change10, 000 times, while variable q2 will change only 10 times.

Numerical Simulation of Dynamic Systems XXVII

Logarithmic Quantization

Logarithmic Quantization

Choosing the Quantum Size

Let us suppose that we wish to simulate a system in which a state variable x1 growsfrom 0 to 1000, while x2 grows from 0 to 1.

� Using QSS, if we use a quantum of ΔQ1 = ΔQ2 = 0.1, variable q1 will change10, 000 times, while variable q2 will change only 10 times.

� Using QSS2 or QSS3, the number of steps differs in a less dramatic way, but itstill depends on the amplitude of the signals to be integrated.

Numerical Simulation of Dynamic Systems XXVII

Logarithmic Quantization

Logarithmic Quantization

Choosing the Quantum Size

Let us suppose that we wish to simulate a system in which a state variable x1 growsfrom 0 to 1000, while x2 grows from 0 to 1.

� Using QSS, if we use a quantum of ΔQ1 = ΔQ2 = 0.1, variable q1 will change10, 000 times, while variable q2 will change only 10 times.

� Using QSS2 or QSS3, the number of steps differs in a less dramatic way, but itstill depends on the amplitude of the signals to be integrated.

� Consequently, an appropriate value of the quantum used for each state variabledepends on the variability of that state variable.

Numerical Simulation of Dynamic Systems XXVII

Logarithmic Quantization

Logarithmic Quantization

Choosing the Quantum Size

Let us suppose that we wish to simulate a system in which a state variable x1 growsfrom 0 to 1000, while x2 grows from 0 to 1.

� Using QSS, if we use a quantum of ΔQ1 = ΔQ2 = 0.1, variable q1 will change10, 000 times, while variable q2 will change only 10 times.

� Using QSS2 or QSS3, the number of steps differs in a less dramatic way, but itstill depends on the amplitude of the signals to be integrated.

� Consequently, an appropriate value of the quantum used for each state variabledepends on the variability of that state variable.

� Unfortunately, before performing the simulation, we normally do not know, howthe state variables will develop over time.

Numerical Simulation of Dynamic Systems XXVII

Logarithmic Quantization

Logarithmic Quantization

Choosing the Quantum Size

Let us suppose that we wish to simulate a system in which a state variable x1 growsfrom 0 to 1000, while x2 grows from 0 to 1.

� Using QSS, if we use a quantum of ΔQ1 = ΔQ2 = 0.1, variable q1 will change10, 000 times, while variable q2 will change only 10 times.

� Using QSS2 or QSS3, the number of steps differs in a less dramatic way, but itstill depends on the amplitude of the signals to be integrated.

� Consequently, an appropriate value of the quantum used for each state variabledepends on the variability of that state variable.

� Unfortunately, before performing the simulation, we normally do not know, howthe state variables will develop over time.

We need some mechanism to adjust the size of the quantum automatically duringthe simulation in accordance with the values that the state variable assumes overtime.

Numerical Simulation of Dynamic Systems XXVII

Logarithmic Quantization

Logarithmic Quantization

Logarithmic Quantization

We shall set the quantum proportional to the absolute value of each state. Also, toavoid problems around zero, we shall limit the minimum quantum value.

Numerical Simulation of Dynamic Systems XXVII

Logarithmic Quantization

Logarithmic Quantization

Logarithmic Quantization

We shall set the quantum proportional to the absolute value of each state. Also, toavoid problems around zero, we shall limit the minimum quantum value.

Thus, we shall express the quantum size as:

ΔQi (t) = max(ΔQreli · |xi (tk )|, ΔQmini)

where tk is the time of the last change of qi (t).

Numerical Simulation of Dynamic Systems XXVII

Logarithmic Quantization

Logarithmic Quantization

Logarithmic Quantization

We shall set the quantum proportional to the absolute value of each state. Also, toavoid problems around zero, we shall limit the minimum quantum value.

Thus, we shall express the quantum size as:

ΔQi (t) = max(ΔQreli · |xi (tk )|, ΔQmini)

where tk is the time of the last change of qi (t).

The parameters Qrel and Qmin can be specified for each hysteretic quantizedintegrator separately.

Numerical Simulation of Dynamic Systems XXVII

Logarithmic Quantization

Logarithmic Quantization

Logarithmic Quantization

We shall set the quantum proportional to the absolute value of each state. Also, toavoid problems around zero, we shall limit the minimum quantum value.

Thus, we shall express the quantum size as:

ΔQi (t) = max(ΔQreli · |xi (tk )|, ΔQmini)

where tk is the time of the last change of qi (t).

The parameters Qrel and Qmin can be specified for each hysteretic quantizedintegrator separately.

This idea can be applied to all QSS methods.

Numerical Simulation of Dynamic Systems XXVII

Logarithmic Quantization

Logarithmic Quantization

Logarithmic Quantization II

Logarithmic Quantizer

ΔQmin

x(t)

q(t)

Numerical Simulation of Dynamic Systems XXVII

Logarithmic Quantization

Relative Error Control

Perturbed Representation

Recall that the QSS approximation of a linear time-invariant ODE:

xa(t) = A · xa(t) + B · u(t)

can be written as:x(t) = A · q(t) + B · u(t)

Numerical Simulation of Dynamic Systems XXVII

Logarithmic Quantization

Relative Error Control

Perturbed Representation

Recall that the QSS approximation of a linear time-invariant ODE:

xa(t) = A · xa(t) + B · u(t)

can be written as:x(t) = A · q(t) + B · u(t)

Defining Δx(t) � q(t) − x(t), we have:

x(t) = A · (x(t) + Δx(t)) + B · u(t)

Numerical Simulation of Dynamic Systems XXVII

Logarithmic Quantization

Relative Error Control

Perturbed Representation

Recall that the QSS approximation of a linear time-invariant ODE:

xa(t) = A · xa(t) + B · u(t)

can be written as:x(t) = A · q(t) + B · u(t)

Defining Δx(t) � q(t) − x(t), we have:

x(t) = A · (x(t) + Δx(t)) + B · u(t)

This perturbed representation does not depend on the type of quantization. However,with logarithmic quantization, the upper bound of |Δx(t))| depends on the state valuex(t).

Numerical Simulation of Dynamic Systems XXVII

Logarithmic Quantization

Relative Error Control

Stability and Error Bound

Assume that matrix A = V · Λ · V−1 is Hurwitz, and define:

R � |V| · |Re(Λ)−1Λ| · |V−1|

Numerical Simulation of Dynamic Systems XXVII

Logarithmic Quantization

Relative Error Control

Stability and Error Bound

Assume that matrix A = V · Λ · V−1 is Hurwitz, and define:

R � |V| · |Re(Λ)−1Λ| · |V−1|

Let ΔQrel be a diagonal matrix with entries ΔQreli , and let ΔQmin be a column vectorwith components ΔQmini

. Then, provided that all eigenvalues of the matrix R · ΔQrel

lie inside the unit circle, it can be shown that:

|e(t)| ≤ (I(n) − R · ΔQrel)−1 · R · max(ΔQrel · xmax,ΔQmin)

where xmax is the column vector of the maximum absolute values reached by eachcomponent of the analytical solution xa(t).

Numerical Simulation of Dynamic Systems XXVII

Logarithmic Quantization

Relative Error Control

Logarithmic Quantization and Relative Error Control

� Generally, ΔQrel is chosen small, which ensures that all eigenvalues of R · ΔQrel

lie inside the unit circle.

Numerical Simulation of Dynamic Systems XXVII

Logarithmic Quantization

Relative Error Control

Logarithmic Quantization and Relative Error Control

� Generally, ΔQrel is chosen small, which ensures that all eigenvalues of R · ΔQrel

lie inside the unit circle.

� In this case, we can approximate (I(n) − R · ΔQrel)−1 ≈ I(n).

Numerical Simulation of Dynamic Systems XXVII

Logarithmic Quantization

Relative Error Control

Logarithmic Quantization and Relative Error Control

� Generally, ΔQrel is chosen small, which ensures that all eigenvalues of R · ΔQrel

lie inside the unit circle.

� In this case, we can approximate (I(n) − R · ΔQrel)−1 ≈ I(n).

� Also, xmax is normally much bigger than ΔQmin.

Numerical Simulation of Dynamic Systems XXVII

Logarithmic Quantization

Relative Error Control

Logarithmic Quantization and Relative Error Control

� Generally, ΔQrel is chosen small, which ensures that all eigenvalues of R · ΔQrel

lie inside the unit circle.

� In this case, we can approximate (I(n) − R · ΔQrel)−1 ≈ I(n).

� Also, xmax is normally much bigger than ΔQmin.

� Usually, we shall choose ΔQreli = tolrel for all i .

Numerical Simulation of Dynamic Systems XXVII

Logarithmic Quantization

Relative Error Control

Logarithmic Quantization and Relative Error Control

� Generally, ΔQrel is chosen small, which ensures that all eigenvalues of R · ΔQrel

lie inside the unit circle.

� In this case, we can approximate (I(n) − R · ΔQrel)−1 ≈ I(n).

� Also, xmax is normally much bigger than ΔQmin.

� Usually, we shall choose ΔQreli = tolrel for all i .

In this case, we obtain:

|e(t)| ≤ (I(n) − R · ΔQrel)−1 · R · max(ΔQrel · xmax,ΔQmin) ≈ R · tolrel · |xmax|

Numerical Simulation of Dynamic Systems XXVII

Logarithmic Quantization

Relative Error Control

Logarithmic Quantization and Relative Error Control

� Generally, ΔQrel is chosen small, which ensures that all eigenvalues of R · ΔQrel

lie inside the unit circle.

� In this case, we can approximate (I(n) − R · ΔQrel)−1 ≈ I(n).

� Also, xmax is normally much bigger than ΔQmin.

� Usually, we shall choose ΔQreli = tolrel for all i .

In this case, we obtain:

|e(t)| ≤ (I(n) − R · ΔQrel)−1 · R · max(ΔQrel · xmax,ΔQmin) ≈ R · tolrel · |xmax|

The use of logarithmic quantization yields an intrinsic control of the relative error.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

QSS Methods and Stiff Systems

QSS Methods and Stiff Systems

The linear time-invariant system:

x1(t) = 0.01 x2(t)

x2(t) = −100 x1(t) − 100 x2(t) + 2020

has eigenvalues λ1 ≈ −0.01 and λ2 ≈ −99.99, and consequently, the model is stiff.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

QSS Methods and Stiff Systems

QSS Methods and Stiff Systems

The linear time-invariant system:

x1(t) = 0.01 x2(t)

x2(t) = −100 x1(t) − 100 x2(t) + 2020

has eigenvalues λ1 ≈ −0.01 and λ2 ≈ −99.99, and consequently, the model is stiff.

The QSS method approximates this system by:

x1(t) = 0.01 q2(t)

x2(t) = −100 q1(t) − 100 q2(t) + 2020

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

QSS Methods and Stiff Systems

QSS Methods and Stiff Systems

The linear time-invariant system:

x1(t) = 0.01 x2(t)

x2(t) = −100 x1(t) − 100 x2(t) + 2020

has eigenvalues λ1 ≈ −0.01 and λ2 ≈ −99.99, and consequently, the model is stiff.

The QSS method approximates this system by:

x1(t) = 0.01 q2(t)

x2(t) = −100 q1(t) − 100 q2(t) + 2020

Let us simulate this system using the QSS solver with initial conditions x1(0) = 0 andx2(0) = 20 and with the quantization ΔQ1 = ΔQ2 = 1.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

QSS Methods and Stiff Systems

QSS Methods and Stiff Systems II

0 50 100 150 200 250 300 350 400 450 500−5

0

5

10

15

20

25

t

q1(t

),q

2(t

)

q1(t)

q2(t)

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

QSS Methods and Stiff Systems

QSS Methods and Stiff Systems III

4 4.2 4.4 4.6 4.8 5 5.2 5.4 5.6 5.8 6−5

0

5

10

15

20

25

t

q1(t

),q

2(t

)

q1(t)

q2(t)

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

QSS Methods and Stiff Systems

QSS Methods and Stiff Systems IV

� Stiff systems usually provoke fast oscillations on the QSS solutions.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

QSS Methods and Stiff Systems

QSS Methods and Stiff Systems IV

� Stiff systems usually provoke fast oscillations on the QSS solutions.

� Consequently, the number of steps is very large.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

QSS Methods and Stiff Systems

QSS Methods and Stiff Systems IV

� Stiff systems usually provoke fast oscillations on the QSS solutions.

� Consequently, the number of steps is very large.

� In the simulated example, there were 21 changes in q1 and 15, 995 changes inq2 for a final simulation time of tf = 500 seconds .

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

QSS Methods and Stiff Systems

QSS Methods and Stiff Systems IV

� Stiff systems usually provoke fast oscillations on the QSS solutions.

� Consequently, the number of steps is very large.

� In the simulated example, there were 21 changes in q1 and 15, 995 changes inq2 for a final simulation time of tf = 500 seconds .

Evidently, the QSS method is not appropriate for the simulation of stiff systems.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Backward QSS: Basic Idea

How can we prevent oscillations?

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Backward QSS: Basic Idea

How can we prevent oscillations?

� In classical solvers, we had to use future values of state derivatives, i.e., implicitmethods, in order to obtain stiff system solvers.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Backward QSS: Basic Idea

How can we prevent oscillations?

� In classical solvers, we had to use future values of state derivatives, i.e., implicitmethods, in order to obtain stiff system solvers.

� Let us try to do the same also in QSS-based methods. We shall choose qj suchthat it represents a future value of xj .

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Backward QSS: Basic Idea

How can we prevent oscillations?

� In classical solvers, we had to use future values of state derivatives, i.e., implicitmethods, in order to obtain stiff system solvers.

� Let us try to do the same also in QSS-based methods. We shall choose qj suchthat it represents a future value of xj .

� In QSS, after a step in qj , we set qj (t) = xj(t). Now, we shall setqj (t) = xj (t) ± ΔQj depending on the sign of xj (t).

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Backward QSS: Basic Idea

How can we prevent oscillations?

� In classical solvers, we had to use future values of state derivatives, i.e., implicitmethods, in order to obtain stiff system solvers.

� Let us try to do the same also in QSS-based methods. We shall choose qj suchthat it represents a future value of xj .

� In QSS, after a step in qj , we set qj (t) = xj(t). Now, we shall setqj (t) = xj (t) ± ΔQj depending on the sign of xj (t).

� It may happen that xj(t)∣∣xj +ΔQj

< 0 and xj (t)∣∣xj−ΔQj

> 0. In that case, we

cannot choose a suitable value for qj . However in that case, there must exist avalue qj ∈ (xj − ΔQj , xj + ΔQj ) for which xj = 0.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Backward QSS: Basic Idea

How can we prevent oscillations?

� In classical solvers, we had to use future values of state derivatives, i.e., implicitmethods, in order to obtain stiff system solvers.

� Let us try to do the same also in QSS-based methods. We shall choose qj suchthat it represents a future value of xj .

� In QSS, after a step in qj , we set qj (t) = xj(t). Now, we shall setqj (t) = xj (t) ± ΔQj depending on the sign of xj (t).

� It may happen that xj(t)∣∣xj +ΔQj

< 0 and xj (t)∣∣xj−ΔQj

> 0. In that case, we

cannot choose a suitable value for qj . However in that case, there must exist avalue qj ∈ (xj − ΔQj , xj + ΔQj ) for which xj = 0.

� If this happens, we keep qj (t) = xj(t), but set xj(t) = 0, i.e., no further internaltransition gets scheduled for the state variable in question.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Backward QSS: Basic Idea

How can we prevent oscillations?

� In classical solvers, we had to use future values of state derivatives, i.e., implicitmethods, in order to obtain stiff system solvers.

� Let us try to do the same also in QSS-based methods. We shall choose qj suchthat it represents a future value of xj .

� In QSS, after a step in qj , we set qj (t) = xj(t). Now, we shall setqj (t) = xj (t) ± ΔQj depending on the sign of xj (t).

� It may happen that xj(t)∣∣xj +ΔQj

< 0 and xj (t)∣∣xj−ΔQj

> 0. In that case, we

cannot choose a suitable value for qj . However in that case, there must exist avalue qj ∈ (xj − ΔQj , xj + ΔQj ) for which xj = 0.

� If this happens, we keep qj (t) = xj(t), but set xj(t) = 0, i.e., no further internaltransition gets scheduled for the state variable in question.

This is an implicit algorithm, but it does not require a Newton iteration, as qj (t) canonly assume one of two values at each step. The method is called Backward QSS(BQSS) solver.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Backward Quantization

Backward Quantizer

ΔQ

Input

Output

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Backward Quantization II

� In non-stiff QSS solvers, the trajectories of q(t) and x(t) at the beginning of thestep always move away from each other. The next internal transition isscheduled to occur at time t, where |q(t−) − x(t)| = ΔQ. At that time, q(t) isreset to q(t+) = x(t).

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Backward Quantization II

� In non-stiff QSS solvers, the trajectories of q(t) and x(t) at the beginning of thestep always move away from each other. The next internal transition isscheduled to occur at time t, where |q(t−) − x(t)| = ΔQ. At that time, q(t) isreset to q(t+) = x(t).

� In stiff QSS solvers, the trajectories of q(t) and x(t) at the beginning of thestep always move toward each other. The next internal transition is scheduledto occur at time t, where |q(t−) − x(t)| = 0. At that time, q(t) is reset toq(t+) = x(t) ± ΔQ.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Backward Quantization II

� In non-stiff QSS solvers, the trajectories of q(t) and x(t) at the beginning of thestep always move away from each other. The next internal transition isscheduled to occur at time t, where |q(t−) − x(t)| = ΔQ. At that time, q(t) isreset to q(t+) = x(t).

� In stiff QSS solvers, the trajectories of q(t) and x(t) at the beginning of thestep always move toward each other. The next internal transition is scheduledto occur at time t, where |q(t−) − x(t)| = 0. At that time, q(t) is reset toq(t+) = x(t) ± ΔQ.

� In BQSS, if q(t+) cannot be chosen such that the trajectories move towardeach other, then no internal transition is scheduled, i.e., the time advancefunction is set to ∞, and x(t) is set to x(t) = 0 irrespective of the current valueof the input signal to the hysteretic quantized integrator.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Backward Quantization II

� In non-stiff QSS solvers, the trajectories of q(t) and x(t) at the beginning of thestep always move away from each other. The next internal transition isscheduled to occur at time t, where |q(t−) − x(t)| = ΔQ. At that time, q(t) isreset to q(t+) = x(t).

� In stiff QSS solvers, the trajectories of q(t) and x(t) at the beginning of thestep always move toward each other. The next internal transition is scheduledto occur at time t, where |q(t−) − x(t)| = 0. At that time, q(t) is reset toq(t+) = x(t) ± ΔQ.

� In BQSS, if q(t+) cannot be chosen such that the trajectories move towardeach other, then no internal transition is scheduled, i.e., the time advancefunction is set to ∞, and x(t) is set to x(t) = 0 irrespective of the current valueof the input signal to the hysteretic quantized integrator.

� Higher-order stiff QSS solvers need additional provisions that shall be discussedin due course.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Backward QSS: An Example

1

x1, q1

05 10

x1 = 0.21

q1 = 1

x1 = 0.01q2

t = 4.762

21

x2, q2

20t

t

x2 = 20

x2 = −100q1 − 100q2 + 2020

q2 = 21

19

18

2

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Backward QSS: An Example

1

x1, q1

0

x1 = 0.19

q1 = 2

x1 = 0.01q2

t = 4.774

21

x2, q2

20t

t

x2 = −80

x2 = −100q1 − 100q2 + 2020

q2 = 1919

18

2

t = 4.762

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Backward QSS: An Example II

0 50 100 150 200 250 300 350 400 450 500−5

0

5

10

15

20

25

t

q1(t

),x 1

(t),

q2(t

),x 2

(t)

x1(t), q1(t)

x2(t), q2(t)

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Quantization Functions in BQSS

xi

qi

ΔQi

ε

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Quantization Functions in BQSS

xi

qi

ΔQi

ε

� BQSS uses a lower andan upper hystereticquantization functionfor each state.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Quantization Functions in BQSS

xi

qi

ΔQi

ε

� BQSS uses a lower andan upper hystereticquantization functionfor each state.

� They compute a lowerand an upper quantizedstate, q

jand qj .

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Quantization Functions in BQSS

xi

qi

ΔQi

ε

� BQSS uses a lower andan upper hystereticquantization functionfor each state.

� They compute a lowerand an upper quantizedstate, q

jand qj .

� The quantized state qj

is chosen from them inaccordance with thesign of xj .

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

BQSS Definition

Given the system:x(t) = f(x(t), u(t))

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

BQSS Definition

Given the system:x(t) = f(x(t), u(t))

BQSS approximates it as:x(t) = f(q(t), u(t)) + Δf

where the components qj of q take the values of either the lower quantized state qj(t)

or the upper quantized state qj (t), such that:

fj(q(t), u(t)) · (qj (t) − xj (t)) > 0

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

BQSS Definition

Given the system:x(t) = f(x(t), u(t))

BQSS approximates it as:x(t) = f(q(t), u(t)) + Δf

where the components qj of q take the values of either the lower quantized state qj(t)

or the upper quantized state qj (t), such that:

fj(q(t), u(t)) · (qj (t) − xj (t)) > 0

∃qj ∈ (qj(t), qj (t))

∣∣fj (q

(j)(t),u(t))= 0

with q(j)(t) = [q1, . . . , qj , . . . , qn]T .

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

BQSS Definition II

In the BQSS approximation:

x(t) = f(q(t), u(t)) + Δf

the terms Δfj will satisfy:

Δfj =

{0, if fj (q(t), u(t)) · (qj − xj) > 0−fj(q(t), u(t)), otherwise

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Algorithm to Obtain q(t)

When a state xi (t) reaches the quantized state qi (t), we proceed as follows:

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Algorithm to Obtain q(t)

When a state xi (t) reaches the quantized state qi (t), we proceed as follows:

Algorithm:

1. We update qiand qi and choose qi = qi or qi = q

idepending on the sign of

xi (t−).

2. We evaluate the functions fj depending on qi .

3. If some fj changes its sign:

� We change qj according to the new sign of xj .

Otherwise

� End of the Algorithm.

4. We evaluate the functions fj depending on the quantized states qi that changedand we return to step 3.

Restriction: We do not allow any qj to change more than once in the process.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

BQSS and PowerDEVS

� The block diagram structure of BQSS is the same as that of QSS.

q1(t)

qn(t)

.

.

.

u(t)

q(t)

d1(t)

dn(t)

f1(·)

fn(·) Int. BQSS

Int. BQSS

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

BQSS and PowerDEVS

� The block diagram structure of BQSS is the same as that of QSS.

q1(t)

qn(t)

.

.

.

u(t)

q(t)

d1(t)

dn(t)

f1(·)

fn(·) Int. BQSS

Int. BQSS

� The static functions are the same as for QSS.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

BQSS and PowerDEVS

� The block diagram structure of BQSS is the same as that of QSS.

q1(t)

qn(t)

.

.

.

u(t)

q(t)

d1(t)

dn(t)

f1(·)

fn(·) Int. BQSS

Int. BQSS

� The static functions are the same as for QSS.

� The hysteretic quantized integrators are similar, but:

� they compute qi in accordance with the algorithm just outlined,

� when the calculated value of qi does not agree with the sign of xi , they

act as if xi = 0.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Stability and Error Bound of BQSS

BQSS is very similar to QSS, but it has an additional perturbation term that enforcesthat xi = 0 when a consistent value for qi cannot be found.

x(t) = f[q(t), t] + Δf(t) = f[x(t) + Δx(t), t] + Δf(t)

where |Δxi | ≤ ΔQi + εi .

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Stability and Error Bound of BQSS

BQSS is very similar to QSS, but it has an additional perturbation term that enforcesthat xi = 0 when a consistent value for qi cannot be found.

x(t) = f[q(t), t] + Δf(t) = f[x(t) + Δx(t), t] + Δf(t)

where |Δxi | ≤ ΔQi + εi .

As a consequence:

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Stability and Error Bound of BQSS

BQSS is very similar to QSS, but it has an additional perturbation term that enforcesthat xi = 0 when a consistent value for qi cannot be found.

x(t) = f[q(t), t] + Δf(t) = f[x(t) + Δx(t), t] + Δf(t)

where |Δxi | ≤ ΔQi + εi .

As a consequence:

� The global error formula of BQSS for linear time-invariant stable systems nowbecomes:

|xa(t) − x(t)| ≤ |V| · |Re(Λ)−1V−1| · |A| · (ΔQ + ε) ; ∀t ≥ 0

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Stability and Error Bound of BQSS

BQSS is very similar to QSS, but it has an additional perturbation term that enforcesthat xi = 0 when a consistent value for qi cannot be found.

x(t) = f[q(t), t] + Δf(t) = f[x(t) + Δx(t), t] + Δf(t)

where |Δxi | ≤ ΔQi + εi .

As a consequence:

� The global error formula of BQSS for linear time-invariant stable systems nowbecomes:

|xa(t) − x(t)| ≤ |V| · |Re(Λ)−1V−1| · |A| · (ΔQ + ε) ; ∀t ≥ 0

� The hysteresis width ε should now be chosen smaller than the quantum, so itdoes not introduce unnecessary errors.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Stability and Error Bound of BQSS

BQSS is very similar to QSS, but it has an additional perturbation term that enforcesthat xi = 0 when a consistent value for qi cannot be found.

x(t) = f[q(t), t] + Δf(t) = f[x(t) + Δx(t), t] + Δf(t)

where |Δxi | ≤ ΔQi + εi .

As a consequence:

� The global error formula of BQSS for linear time-invariant stable systems nowbecomes:

|xa(t) − x(t)| ≤ |V| · |Re(Λ)−1V−1| · |A| · (ΔQ + ε) ; ∀t ≥ 0

� The hysteresis width ε should now be chosen smaller than the quantum, so itdoes not introduce unnecessary errors.

� The simulation trajectories are numerically stable for any quantum adopted.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Example: Second-order Linear System

� Eigenvalues

λ1 = −0.01;λ2 = −99.99

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Example: Second-order Linear System

� Eigenvalues

λ1 = −0.01;λ2 = −99.99

� Initial states

x1(0) = 0; x2(0) = 20

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Example: Second-order Linear System

� Eigenvalues

λ1 = −0.01;λ2 = −99.99

� Initial states

x1(0) = 0; x2(0) = 20

� QuantizationS1 ΔQ1,2 = 1S2 ΔQ1,2 = 0.1S3 ΔQ1,2 = 0.01

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Example: Second-order Linear System

� Eigenvalues

λ1 = −0.01;λ2 = −99.99

� Initial states

x1(0) = 0; x2(0) = 20

� QuantizationS1 ΔQ1,2 = 1S2 ΔQ1,2 = 0.1S3 ΔQ1,2 = 0.01

� Number of EventsS1 x1 : 20; x2 : 22S2 x1 : 201; x2 : 201S3 x1 : 2006; x2 : 2024

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Example: Second-order Linear System

� Eigenvalues

λ1 = −0.01;λ2 = −99.99

� Initial states

x1(0) = 0; x2(0) = 20

� QuantizationS1 ΔQ1,2 = 1S2 ΔQ1,2 = 0.1S3 ΔQ1,2 = 0.01

� Number of EventsS1 x1 : 20; x2 : 22S2 x1 : 201; x2 : 201S3 x1 : 2006; x2 : 2024

� Error BoundS1 e1 ≤ 3; e2 ≤ 5S2 e1 ≤ 0.3; e2 ≤ 0.5S3 e1 ≤ 0.03; e2 ≤ 0.05

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Example: Second-order Linear System

� Eigenvalues

λ1 = −0.01;λ2 = −99.99

� Initial states

x1(0) = 0; x2(0) = 20

� QuantizationS1 ΔQ1,2 = 1S2 ΔQ1,2 = 0.1S3 ΔQ1,2 = 0.01

� Number of EventsS1 x1 : 20; x2 : 22S2 x1 : 201; x2 : 201S3 x1 : 2006; x2 : 2024

� Error BoundS1 e1 ≤ 3; e2 ≤ 5S2 e1 ≤ 0.3; e2 ≤ 0.5S3 e1 ≤ 0.03; e2 ≤ 0.05

x1(t) = 0.01 x2(t)

x2(t) = −100 x1(t) − 100 x2(t) + 2020

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Example: Second-order Linear System

� Eigenvalues

λ1 = −0.01;λ2 = −99.99

� Initial states

x1(0) = 0; x2(0) = 20

� QuantizationS1 ΔQ1,2 = 1S2 ΔQ1,2 = 0.1S3 ΔQ1,2 = 0.01

� Number of EventsS1 x1 : 20; x2 : 22S2 x1 : 201; x2 : 201S3 x1 : 2006; x2 : 2024

� Error BoundS1 e1 ≤ 3; e2 ≤ 5S2 e1 ≤ 0.3; e2 ≤ 0.5S3 e1 ≤ 0.03; e2 ≤ 0.05

x1(t) = 0.01 x2(t)

x2(t) = −100 x1(t) − 100 x2(t) + 2020

0 50 100 150 200 250 300 350 400 450 500−5

0

5

10

15

20

25

Time

qi

ΔQi = 1ΔQi = 0.1

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Example: Second-order Linear System II

Some remarks:

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Example: Second-order Linear System II

Some remarks:

� As there are no oscillations, the number of events is the division between eachsignal amplitude and the corresponding quantum.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Example: Second-order Linear System II

Some remarks:

� As there are no oscillations, the number of events is the division between eachsignal amplitude and the corresponding quantum.

� Consequently, the number of steps grows inversely proportional to thequantization.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Example: Second-order Linear System II

Some remarks:

� As there are no oscillations, the number of events is the division between eachsignal amplitude and the corresponding quantum.

� Consequently, the number of steps grows inversely proportional to thequantization.

� The simulation reaches a stable situation some time before t = 500 seconds ,and after that, the simulation stops, as no further events are being scheduled.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Example: Second-order Linear System II

Some remarks:

� As there are no oscillations, the number of events is the division between eachsignal amplitude and the corresponding quantum.

� Consequently, the number of steps grows inversely proportional to thequantization.

� The simulation reaches a stable situation some time before t = 500 seconds ,and after that, the simulation stops, as no further events are being scheduled.

� The theoretical error bound is conservative in this example.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Main Features of BQSS

Advantages:

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Main Features of BQSS

Advantages:

� BQSS solves the problem of high-frequency oscillations exhibited whensimulating stiff systems using explicit QSS methods.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Main Features of BQSS

Advantages:

� BQSS solves the problem of high-frequency oscillations exhibited whensimulating stiff systems using explicit QSS methods.

� BQSS does not require Newton iterations, which permits the efficient numericalsimulation of many stiff systems.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Main Features of BQSS

Advantages:

� BQSS solves the problem of high-frequency oscillations exhibited whensimulating stiff systems using explicit QSS methods.

� BQSS does not require Newton iterations, which permits the efficient numericalsimulation of many stiff systems.

� BQSS is also efficient for discontinuity handling.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Main Features of BQSS

Advantages:

� BQSS solves the problem of high-frequency oscillations exhibited whensimulating stiff systems using explicit QSS methods.

� BQSS does not require Newton iterations, which permits the efficient numericalsimulation of many stiff systems.

� BQSS is also efficient for discontinuity handling.

� BQSS can be used for real-time simulation of stiff systems.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Main Features of BQSS

Advantages:

� BQSS solves the problem of high-frequency oscillations exhibited whensimulating stiff systems using explicit QSS methods.

� BQSS does not require Newton iterations, which permits the efficient numericalsimulation of many stiff systems.

� BQSS is also efficient for discontinuity handling.

� BQSS can be used for real-time simulation of stiff systems.

Disadvantages:

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Main Features of BQSS

Advantages:

� BQSS solves the problem of high-frequency oscillations exhibited whensimulating stiff systems using explicit QSS methods.

� BQSS does not require Newton iterations, which permits the efficient numericalsimulation of many stiff systems.

� BQSS is also efficient for discontinuity handling.

� BQSS can be used for real-time simulation of stiff systems.

Disadvantages:

� Spurious equilibrium points may appear in nonlinear systems due to the termsΔfi .

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Backward QSS Method

Main Features of BQSS

Advantages:

� BQSS solves the problem of high-frequency oscillations exhibited whensimulating stiff systems using explicit QSS methods.

� BQSS does not require Newton iterations, which permits the efficient numericalsimulation of many stiff systems.

� BQSS is also efficient for discontinuity handling.

� BQSS can be used for real-time simulation of stiff systems.

Disadvantages:

� Spurious equilibrium points may appear in nonlinear systems due to the termsΔfi .

� The number of steps grows linearly with the accuracy. Unfortunately, we havenot found any way to extend the BQSS algorithm to higher orders ofapproximation accuracy.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

LIQSS: Basic Idea

The Linearly Implicit QSS (LIQSS) algorithm is based on an idea very similar to thatof BQSS.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

LIQSS: Basic Idea

The Linearly Implicit QSS (LIQSS) algorithm is based on an idea very similar to thatof BQSS.

� Just as in BQSS, we shall choose qj such that it represents a future value of xj .

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

LIQSS: Basic Idea

The Linearly Implicit QSS (LIQSS) algorithm is based on an idea very similar to thatof BQSS.

� Just as in BQSS, we shall choose qj such that it represents a future value of xj .

� Just as in BQSS, we set qj (t) = xj(t) ± ΔQj depending on the sign of xj(t).

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

LIQSS: Basic Idea

The Linearly Implicit QSS (LIQSS) algorithm is based on an idea very similar to thatof BQSS.

� Just as in BQSS, we shall choose qj such that it represents a future value of xj .

� Just as in BQSS, we set qj (t) = xj(t) ± ΔQj depending on the sign of xj(t).

� The main difference with BQSS is that, when we cannot find qj such that xj

moves towards it, we now attempt to determine the value of qj that makesxj = 0, instead of enforcing xj = 0 by adding a perturbation term Δfj .

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

LIQSS: Basic Idea

The Linearly Implicit QSS (LIQSS) algorithm is based on an idea very similar to thatof BQSS.

� Just as in BQSS, we shall choose qj such that it represents a future value of xj .

� Just as in BQSS, we set qj (t) = xj(t) ± ΔQj depending on the sign of xj(t).

� The main difference with BQSS is that, when we cannot find qj such that xj

moves towards it, we now attempt to determine the value of qj that makesxj = 0, instead of enforcing xj = 0 by adding a perturbation term Δfj .

� The search for qj is done in a linear manner.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

LIQSS: Basic Idea

The Linearly Implicit QSS (LIQSS) algorithm is based on an idea very similar to thatof BQSS.

� Just as in BQSS, we shall choose qj such that it represents a future value of xj .

� Just as in BQSS, we set qj (t) = xj(t) ± ΔQj depending on the sign of xj(t).

� The main difference with BQSS is that, when we cannot find qj such that xj

moves towards it, we now attempt to determine the value of qj that makesxj = 0, instead of enforcing xj = 0 by adding a perturbation term Δfj .

� The search for qj is done in a linear manner.

� Contrary to BQSS, once we have computed a new value for qj , no furtherinternal transition will be scheduled, until xj has advanced by ±ΔQj , even if thesign of xj changes during the step.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

LIQSS and PowerDEVS

� The block diagram structure of LIQSS is the same as that of QSS and BQSS.

q1(t)

qn(t)

.

.

.

u(t)

q(t)

d1(t)

dn(t)

f1(·)

fn(·) Int. LIQSS

Int. LIQSS

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

LIQSS and PowerDEVS

� The block diagram structure of LIQSS is the same as that of QSS and BQSS.

q1(t)

qn(t)

.

.

.

u(t)

q(t)

d1(t)

dn(t)

f1(·)

fn(·) Int. LIQSS

Int. LIQSS

� The static functions are the same as for QSS and BQSS.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

LIQSS and PowerDEVS

� The block diagram structure of LIQSS is the same as that of QSS and BQSS.

q1(t)

qn(t)

.

.

.

u(t)

q(t)

d1(t)

dn(t)

f1(·)

fn(·) Int. LIQSS

Int. LIQSS

� The static functions are the same as for QSS and BQSS.

� The hysteretic quantized integrators are similar, but:

� before they output a new value for qi , they estimate the value of the

derivative xi that each of the two options would produce;

� if one of them has the correct sign, i.e., xi → qi , that value is chosen;

� otherwise, the value qi is estimated that makes xi = 0.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Stability and Error Bound of LIQSS

Given the system:x(t) = f(x(t), u(t))

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Stability and Error Bound of LIQSS

Given the system:x(t) = f(x(t), u(t))

Its LIQSS approximation is governed by the same expression as that of QSS:

x(t) = f(q(t), u(t)) = f(x(t) + Δx(t), u(t))

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Stability and Error Bound of LIQSS

Given the system:x(t) = f(x(t), u(t))

Its LIQSS approximation is governed by the same expression as that of QSS:

x(t) = f(q(t), u(t)) = f(x(t) + Δx(t), u(t))

However, qi can now differ from xi by an amount of 2 · ΔQi (after sign changes in xi ).

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Stability and Error Bound of LIQSS

Given the system:x(t) = f(x(t), u(t))

Its LIQSS approximation is governed by the same expression as that of QSS:

x(t) = f(q(t), u(t)) = f(x(t) + Δx(t), u(t))

However, qi can now differ from xi by an amount of 2 · ΔQi (after sign changes in xi ).

The properties of LIQSS are almost identical to those of QSS, but the error boundis twice the error bound of QSS.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Example: Second-order Linear System

� Eigenvalues

λ1 = −0.01;λ2 = −99.99

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Example: Second-order Linear System

� Eigenvalues

λ1 = −0.01;λ2 = −99.99

� Initial states

x1(0) = 0; x2(0) = 20

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Example: Second-order Linear System

� Eigenvalues

λ1 = −0.01;λ2 = −99.99

� Initial states

x1(0) = 0; x2(0) = 20

� QuantizationS1 ΔQ1,2 = 1S2 ΔQ1,2 = 0.1S3 ΔQ1,2 = 0.01

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Example: Second-order Linear System

� Eigenvalues

λ1 = −0.01;λ2 = −99.99

� Initial states

x1(0) = 0; x2(0) = 20

� QuantizationS1 ΔQ1,2 = 1S2 ΔQ1,2 = 0.1S3 ΔQ1,2 = 0.01

� Number of EventsS1 x1 : 21; x2 : 25S2 x1 : 201; x2 : 203S3 x1 : 2006; x2 : 2026

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Example: Second-order Linear System

� Eigenvalues

λ1 = −0.01;λ2 = −99.99

� Initial states

x1(0) = 0; x2(0) = 20

� QuantizationS1 ΔQ1,2 = 1S2 ΔQ1,2 = 0.1S3 ΔQ1,2 = 0.01

� Number of EventsS1 x1 : 21; x2 : 25S2 x1 : 201; x2 : 203S3 x1 : 2006; x2 : 2026

� Error BoundS1 e1 ≤ 2; e2 ≤ 6S2 e1 ≤ 0.2; e2 ≤ 0.6S3 e1 ≤ 0.02; e2 ≤ 0.06

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Example: Second-order Linear System

� Eigenvalues

λ1 = −0.01;λ2 = −99.99

� Initial states

x1(0) = 0; x2(0) = 20

� QuantizationS1 ΔQ1,2 = 1S2 ΔQ1,2 = 0.1S3 ΔQ1,2 = 0.01

� Number of EventsS1 x1 : 21; x2 : 25S2 x1 : 201; x2 : 203S3 x1 : 2006; x2 : 2026

� Error BoundS1 e1 ≤ 2; e2 ≤ 6S2 e1 ≤ 0.2; e2 ≤ 0.6S3 e1 ≤ 0.02; e2 ≤ 0.06

x1(t) = 0.01 x2(t)

x2(t) = −100 x1(t) − 100 x2(t) + 2020

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Example: Second-order Linear System

� Eigenvalues

λ1 = −0.01;λ2 = −99.99

� Initial states

x1(0) = 0; x2(0) = 20

� QuantizationS1 ΔQ1,2 = 1S2 ΔQ1,2 = 0.1S3 ΔQ1,2 = 0.01

� Number of EventsS1 x1 : 21; x2 : 25S2 x1 : 201; x2 : 203S3 x1 : 2006; x2 : 2026

� Error BoundS1 e1 ≤ 2; e2 ≤ 6S2 e1 ≤ 0.2; e2 ≤ 0.6S3 e1 ≤ 0.02; e2 ≤ 0.06

x1(t) = 0.01 x2(t)

x2(t) = −100 x1(t) − 100 x2(t) + 2020

0 50 100 150 200 250 300 350 400 450 500−5

0

5

10

15

20

25

Time

qi

ΔQi = 1ΔQi = 0.1

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Example: Second-order Linear System II

Some remarks:

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Example: Second-order Linear System II

Some remarks:

� As there are no oscillations, the number of events is the division between eachsignal amplitude and the corresponding quantum.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Example: Second-order Linear System II

Some remarks:

� As there are no oscillations, the number of events is the division between eachsignal amplitude and the corresponding quantum.

� Consequently, the number of steps grows inversely proportional to thequantization.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Example: Second-order Linear System II

Some remarks:

� As there are no oscillations, the number of events is the division between eachsignal amplitude and the corresponding quantum.

� Consequently, the number of steps grows inversely proportional to thequantization.

� The simulation reaches a stable situation some time before t = 500 seconds ,and after that, the simulation stops, as no further events are being scheduled.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Example: Second-order Linear System II

Some remarks:

� As there are no oscillations, the number of events is the division between eachsignal amplitude and the corresponding quantum.

� Consequently, the number of steps grows inversely proportional to thequantization.

� The simulation reaches a stable situation some time before t = 500 seconds ,and after that, the simulation stops, as no further events are being scheduled.

� The theoretical error bound is conservative in this example.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Main Features of LIQSS

Advantages:

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Main Features of LIQSS

Advantages:

� LIQSS shares the main advantages of BQSS.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Main Features of LIQSS

Advantages:

� LIQSS shares the main advantages of BQSS.

� LIQSS solves the problem of spurious equilibrium points of BQSS.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Main Features of LIQSS

Advantages:

� LIQSS shares the main advantages of BQSS.

� LIQSS solves the problem of spurious equilibrium points of BQSS.

Disadvantages:

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Main Features of LIQSS

Advantages:

� LIQSS shares the main advantages of BQSS.

� LIQSS solves the problem of spurious equilibrium points of BQSS.

Disadvantages:

� The number of steps still grows linearly with the accuracy. However, it ispossible to obtain higher-order LIQSS methods.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Main Features of LIQSS

Advantages:

� LIQSS shares the main advantages of BQSS.

� LIQSS solves the problem of spurious equilibrium points of BQSS.

Disadvantages:

� The number of steps still grows linearly with the accuracy. However, it ispossible to obtain higher-order LIQSS methods.

� LIQSS only looks at the main diagonal of the Jacobian matrix, allowing itsometimes to happen that xj changes its direction without causing amodification of qj . In such cases, LIQSS can provoke oscillations depending onthe system structure, i.e., the algorithm may lose its stiffly-stable nature.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

LIQSS2: Basic Idea

� LIQSS2 is similar to QSS2. The quantized variables qj (t) are piecewise linear.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

LIQSS2: Basic Idea

� LIQSS2 is similar to QSS2. The quantized variables qj (t) are piecewise linear.

� Each section of qj (t) starts at xj(t) ± ΔQj with a slope of qj (t) = xj(t)|qj (t).

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

LIQSS2: Basic Idea

� LIQSS2 is similar to QSS2. The quantized variables qj (t) are piecewise linear.

� Each section of qj (t) starts at xj(t) ± ΔQj with a slope of qj (t) = xj(t)|qj (t).

� We shall attempt to ensure, just as in the case of LIQSS, that xj (t) movestoward qj (t). That is, we demand that xj(t) · (qj (t) − xj (t)) > 0.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

LIQSS2: Basic Idea

� LIQSS2 is similar to QSS2. The quantized variables qj (t) are piecewise linear.

� Each section of qj (t) starts at xj(t) ± ΔQj with a slope of qj (t) = xj(t)|qj (t).

� We shall attempt to ensure, just as in the case of LIQSS, that xj (t) movestoward qj (t). That is, we demand that xj(t) · (qj (t) − xj (t)) > 0.

� When this is not possible, we shall use a linear approximation to find the valueqj (t) with slope qj (t) = xj (t)|qj (t), for which xj(t) = 0.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

LIQSS2: Basic Idea

� LIQSS2 is similar to QSS2. The quantized variables qj (t) are piecewise linear.

� Each section of qj (t) starts at xj(t) ± ΔQj with a slope of qj (t) = xj(t)|qj (t).

� We shall attempt to ensure, just as in the case of LIQSS, that xj (t) movestoward qj (t). That is, we demand that xj(t) · (qj (t) − xj (t)) > 0.

� When this is not possible, we shall use a linear approximation to find the valueqj (t) with slope qj (t) = xj (t)|qj (t), for which xj(t) = 0.

� Although this is an implicit algorithm, there is no need for Newton iterations totake place, as only three possible trajectories can be chosen for qj (t).

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

LIQSS2: Trajectories

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

LIQSS2 and PowerDEVS

� The block diagram structure of LIQSS2 is the same as that of QSS2.

q1(t)

qn(t)

.

.

.

u(t)

q(t)

d1(t)

dn(t)

f1(·)

fn(·) Int. LIQSS2

Int. LIQSS2

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

LIQSS2 and PowerDEVS

� The block diagram structure of LIQSS2 is the same as that of QSS2.

q1(t)

qn(t)

.

.

.

u(t)

q(t)

d1(t)

dn(t)

f1(·)

fn(·) Int. LIQSS2

Int. LIQSS2

� The static functions are the same as for QSS2.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

LIQSS2 and PowerDEVS

� The block diagram structure of LIQSS2 is the same as that of QSS2.

q1(t)

qn(t)

.

.

.

u(t)

q(t)

d1(t)

dn(t)

f1(·)

fn(·) Int. LIQSS2

Int. LIQSS2

� The static functions are the same as for QSS2.

� The hysteretic quantized integrators are similar, but:

� before they output a new value for qi , they estimate the value of the

second derivative xi that each of the two options would produce;

� if one of them has the correct sign, i.e., xi → qi , that value is chosen;

� otherwise, the value qi is estimated that makes xi = 0.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Stability and Error Bound of LIQSS2

Given the system:x(t) = f(x(t), u(t))

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Stability and Error Bound of LIQSS2

Given the system:x(t) = f(x(t), u(t))

Its LIQSS2 approximation is governed by the same expression as that of QSS:

x(t) = f(q(t), u(t)) = f(x(t) + Δx(t), u(t))

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Stability and Error Bound of LIQSS2

Given the system:x(t) = f(x(t), u(t))

Its LIQSS2 approximation is governed by the same expression as that of QSS:

x(t) = f(q(t), u(t)) = f(x(t) + Δx(t), u(t))

However, just as in the case of LIQSS, qi can now differ from xi by an amount of2 · ΔQi (after sign changes in xi ).

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Stability and Error Bound of LIQSS2

Given the system:x(t) = f(x(t), u(t))

Its LIQSS2 approximation is governed by the same expression as that of QSS:

x(t) = f(q(t), u(t)) = f(x(t) + Δx(t), u(t))

However, just as in the case of LIQSS, qi can now differ from xi by an amount of2 · ΔQi (after sign changes in xi ).

The properties of LIQSS2 are identical to those of LIQSS.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Example: Second-order Linear System

� Eigenvalues

λ1 = −0.01;λ2 = −99.99

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Example: Second-order Linear System

� Eigenvalues

λ1 = −0.01;λ2 = −99.99

� Initial states

x1(0) = 0; x2(0) = 20

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Example: Second-order Linear System

� Eigenvalues

λ1 = −0.01;λ2 = −99.99

� Initial states

x1(0) = 0; x2(0) = 20

� QuantizationS1 ΔQ1,2 = 1S2 ΔQ1,2 = 0.1S3 ΔQ1,2 = 0.01

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Example: Second-order Linear System

� Eigenvalues

λ1 = −0.01;λ2 = −99.99

� Initial states

x1(0) = 0; x2(0) = 20

� QuantizationS1 ΔQ1,2 = 1S2 ΔQ1,2 = 0.1S3 ΔQ1,2 = 0.01

� Number of EventsS1 x1 : 5; x2 : 8S2 x1 : 18; x2 : 22S3 x1 : 57; x2 : 65

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Example: Second-order Linear System

� Eigenvalues

λ1 = −0.01;λ2 = −99.99

� Initial states

x1(0) = 0; x2(0) = 20

� QuantizationS1 ΔQ1,2 = 1S2 ΔQ1,2 = 0.1S3 ΔQ1,2 = 0.01

� Number of EventsS1 x1 : 5; x2 : 8S2 x1 : 18; x2 : 22S3 x1 : 57; x2 : 65

� Error BoundS1 e1 ≤ 2; e2 ≤ 6S2 e1 ≤ 0.2; e2 ≤ 0.6S3 e1 ≤ 0.02; e2 ≤ 0.06

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Example: Second-order Linear System

� Eigenvalues

λ1 = −0.01;λ2 = −99.99

� Initial states

x1(0) = 0; x2(0) = 20

� QuantizationS1 ΔQ1,2 = 1S2 ΔQ1,2 = 0.1S3 ΔQ1,2 = 0.01

� Number of EventsS1 x1 : 5; x2 : 8S2 x1 : 18; x2 : 22S3 x1 : 57; x2 : 65

� Error BoundS1 e1 ≤ 2; e2 ≤ 6S2 e1 ≤ 0.2; e2 ≤ 0.6S3 e1 ≤ 0.02; e2 ≤ 0.06

x1(t) = 0.01 x2(t)

x2(t) = −100 x1(t) − 100 x2(t) + 2020

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Example: Second-order Linear System

� Eigenvalues

λ1 = −0.01;λ2 = −99.99

� Initial states

x1(0) = 0; x2(0) = 20

� QuantizationS1 ΔQ1,2 = 1S2 ΔQ1,2 = 0.1S3 ΔQ1,2 = 0.01

� Number of EventsS1 x1 : 5; x2 : 8S2 x1 : 18; x2 : 22S3 x1 : 57; x2 : 65

� Error BoundS1 e1 ≤ 2; e2 ≤ 6S2 e1 ≤ 0.2; e2 ≤ 0.6S3 e1 ≤ 0.02; e2 ≤ 0.06

x1(t) = 0.01 x2(t)

x2(t) = −100 x1(t) − 100 x2(t) + 2020

0 50 100 150 200 250 300 350 400 450 5000

5

10

15

20

25

t

q1(t

),x 1

(t),

q2(t

),x 2

(t)

x1

q1

q2

x2

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Example: Second-order Linear System II

Some remarks:

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Example: Second-order Linear System II

Some remarks:

� The number of steps grows inversely proportional to the square root of thequantization.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Example: Second-order Linear System II

Some remarks:

� The number of steps grows inversely proportional to the square root of thequantization.

� The theoretical error bound is conservative in this example.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Main Features of LIQSS2

Advantages:

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Main Features of LIQSS2

Advantages:

� LIQSS2 shares all the advantages of LIQSS.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Main Features of LIQSS2

Advantages:

� LIQSS2 shares all the advantages of LIQSS.

� LIQSS2 is second-order accurate.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Main Features of LIQSS2

Advantages:

� LIQSS2 shares all the advantages of LIQSS.

� LIQSS2 is second-order accurate.

� The number of steps grows with the square root of the accuracy.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Main Features of LIQSS2

Advantages:

� LIQSS2 shares all the advantages of LIQSS.

� LIQSS2 is second-order accurate.

� The number of steps grows with the square root of the accuracy.

� Recent results indicate that LIQSS2 is particularly well suited for simulatingpower electronics circuits.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Main Features of LIQSS2

Advantages:

� LIQSS2 shares all the advantages of LIQSS.

� LIQSS2 is second-order accurate.

� The number of steps grows with the square root of the accuracy.

� Recent results indicate that LIQSS2 is particularly well suited for simulatingpower electronics circuits.

Disadvantages:

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Main Features of LIQSS2

Advantages:

� LIQSS2 shares all the advantages of LIQSS.

� LIQSS2 is second-order accurate.

� The number of steps grows with the square root of the accuracy.

� Recent results indicate that LIQSS2 is particularly well suited for simulatingpower electronics circuits.

Disadvantages:

� LIQSS2 only looks at the main diagonal of the Jacobian matrix, allowing itsometimes to happen that xj changes its direction without causing amodification of qj . In such cases, LIQSS2 can provoke oscillations depending onthe system structure, i.e., the algorithm may lose its stiffly-stable nature.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

LIQSS3: Basic Idea

� LIQSS3 is similar to QSS3. The quantized variables qj (t) are piecewiseparabolic.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

LIQSS3: Basic Idea

� LIQSS3 is similar to QSS3. The quantized variables qj (t) are piecewiseparabolic.

� Each section of qj (t) starts at xj(t) ± ΔQj with a slope of qj (t) = xj(t)|qj (t)

and a second derivative of qj (t) = xj(t)|qj (t).

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

LIQSS3: Basic Idea

� LIQSS3 is similar to QSS3. The quantized variables qj (t) are piecewiseparabolic.

� Each section of qj (t) starts at xj(t) ± ΔQj with a slope of qj (t) = xj(t)|qj (t)

and a second derivative of qj (t) = xj(t)|qj (t).

� We shall attempt to ensure, just as in the cases of LIQSS and LIQSS2, thatxj(t) moves toward qj (t). That is, we demand that

...x j(t) · (qj (t) − xj (t)) > 0.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

LIQSS3: Basic Idea

� LIQSS3 is similar to QSS3. The quantized variables qj (t) are piecewiseparabolic.

� Each section of qj (t) starts at xj(t) ± ΔQj with a slope of qj (t) = xj(t)|qj (t)

and a second derivative of qj (t) = xj(t)|qj (t).

� We shall attempt to ensure, just as in the cases of LIQSS and LIQSS2, thatxj(t) moves toward qj (t). That is, we demand that

...x j(t) · (qj (t) − xj (t)) > 0.

� When this is not possible, we shall use a linear approximation to find the valueqj (t) with slope qj (t) = xj (t)|qj (t) and with second derivative qj (t) = xj (t)|qj (t),

for which...x j (t) = 0.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

LIQSS3: Basic Idea

� LIQSS3 is similar to QSS3. The quantized variables qj (t) are piecewiseparabolic.

� Each section of qj (t) starts at xj(t) ± ΔQj with a slope of qj (t) = xj(t)|qj (t)

and a second derivative of qj (t) = xj(t)|qj (t).

� We shall attempt to ensure, just as in the cases of LIQSS and LIQSS2, thatxj(t) moves toward qj (t). That is, we demand that

...x j(t) · (qj (t) − xj (t)) > 0.

� When this is not possible, we shall use a linear approximation to find the valueqj (t) with slope qj (t) = xj (t)|qj (t) and with second derivative qj (t) = xj (t)|qj (t),

for which...x j (t) = 0.

� Although this is an implicit algorithm, there is no need for Newton iterations totake place, as only three possible trajectories can be chosen for qj (t).

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Main Features of LIQSS3

Advantages:

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Main Features of LIQSS3

Advantages:

� LIQSS3 shares all the advantages of LIQSS2.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Main Features of LIQSS3

Advantages:

� LIQSS3 shares all the advantages of LIQSS2.

� LIQSS3 is third-order accurate.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Main Features of LIQSS3

Advantages:

� LIQSS3 shares all the advantages of LIQSS2.

� LIQSS3 is third-order accurate.

� The number of steps grows with the cubic root of the accuracy.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Main Features of LIQSS3

Advantages:

� LIQSS3 shares all the advantages of LIQSS2.

� LIQSS3 is third-order accurate.

� The number of steps grows with the cubic root of the accuracy.

� Recent results indicate that LIQSS3 is particularly well suited for simulatingpower electronics circuits.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Main Features of LIQSS3

Advantages:

� LIQSS3 shares all the advantages of LIQSS2.

� LIQSS3 is third-order accurate.

� The number of steps grows with the cubic root of the accuracy.

� Recent results indicate that LIQSS3 is particularly well suited for simulatingpower electronics circuits.

Disadvantages:

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Stiff Systems

Linearly Implicit QSS Methods

Main Features of LIQSS3

Advantages:

� LIQSS3 shares all the advantages of LIQSS2.

� LIQSS3 is third-order accurate.

� The number of steps grows with the cubic root of the accuracy.

� Recent results indicate that LIQSS3 is particularly well suited for simulatingpower electronics circuits.

Disadvantages:

� LIQSS3 only looks at the main diagonal of the Jacobian matrix, allowing itsometimes to happen that

...x j changes its direction without causing a

modification of qj . In such cases, LIQSS3 can provoke oscillations depending onthe system structure, i.e., the algorithm may lose its stiffly-stable nature.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Marginally Stable Systems

QSS and BQSS and Marginally Stable Systems

Marginally Stable Systems

The following system is known as the harmonic oscillator:

x1(t) = x2(t)

x2(t) = −x1(t)

The harmonic oscillator is the simplest marginally stable system.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Marginally Stable Systems

QSS and BQSS and Marginally Stable Systems

Marginally Stable Systems

The following system is known as the harmonic oscillator:

x1(t) = x2(t)

x2(t) = −x1(t)

The harmonic oscillator is the simplest marginally stable system.

If we consider, for instance, the initial states x1(0) = 4 and x2(0) = 0, we obtain theanalytical solution:

x1(t) = 4 cos(t)

x2(t) = 4 sin(t)

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Marginally Stable Systems

QSS and BQSS and Marginally Stable Systems

Marginally Stable Systems

The following system is known as the harmonic oscillator:

x1(t) = x2(t)

x2(t) = −x1(t)

The harmonic oscillator is the simplest marginally stable system.

If we consider, for instance, the initial states x1(0) = 4 and x2(0) = 0, we obtain theanalytical solution:

x1(t) = 4 cos(t)

x2(t) = 4 sin(t)

We already know that F-stable methods are needed to properly integrate such systems.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Marginally Stable Systems

QSS and BQSS and Marginally Stable Systems

Marginally Stable Systems

The following system is known as the harmonic oscillator:

x1(t) = x2(t)

x2(t) = −x1(t)

The harmonic oscillator is the simplest marginally stable system.

If we consider, for instance, the initial states x1(0) = 4 and x2(0) = 0, we obtain theanalytical solution:

x1(t) = 4 cos(t)

x2(t) = 4 sin(t)

We already know that F-stable methods are needed to properly integrate such systems.

Let us check what happen with QSS and BQSS.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Marginally Stable Systems

QSS and BQSS and Marginally Stable Systems

QSS, BQSS and Marginally Stable Systems

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Marginally Stable Systems

QSS and BQSS and Marginally Stable Systems

QSS, BQSS and Marginally Stable Systems II

The results are consistent with what we know about classic time-slicing methods:

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Marginally Stable Systems

QSS and BQSS and Marginally Stable Systems

QSS, BQSS and Marginally Stable Systems II

The results are consistent with what we know about classic time-slicing methods:

� The numerical solution with the forward QSS method gains energy andgenerates output trajectories that are numerically unstable, just as ForwardEuler would.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Marginally Stable Systems

QSS and BQSS and Marginally Stable Systems

QSS, BQSS and Marginally Stable Systems II

The results are consistent with what we know about classic time-slicing methods:

� The numerical solution with the forward QSS method gains energy andgenerates output trajectories that are numerically unstable, just as ForwardEuler would.

� The numerical solution with the backward QSS method loses energy andgenerates output trajectories that are asymptotically stable, just as BackwardEuler would.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Marginally Stable Systems

QSS and BQSS and Marginally Stable Systems

QSS, BQSS and Marginally Stable Systems II

The results are consistent with what we know about classic time-slicing methods:

� The numerical solution with the forward QSS method gains energy andgenerates output trajectories that are numerically unstable, just as ForwardEuler would.

� The numerical solution with the backward QSS method loses energy andgenerates output trajectories that are asymptotically stable, just as BackwardEuler would.

Evidently, neither of the two methods is suited for the simulation of marginallystable systems.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Marginally Stable Systems

Centered QSS Method

Centered QSS Method

The simplest F-stable time-slicing method is the trapezoidal rule, which combinesForward and Backward Euler. So, it may make sense to try some combination of QSSand BQSS.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Marginally Stable Systems

Centered QSS Method

Centered QSS Method

The simplest F-stable time-slicing method is the trapezoidal rule, which combinesForward and Backward Euler. So, it may make sense to try some combination of QSSand BQSS.

Recall that:

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Marginally Stable Systems

Centered QSS Method

Centered QSS Method

The simplest F-stable time-slicing method is the trapezoidal rule, which combinesForward and Backward Euler. So, it may make sense to try some combination of QSSand BQSS.

Recall that:

� In QSS, we take qj as the last quantized value intersected by xj .

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Marginally Stable Systems

Centered QSS Method

Centered QSS Method

The simplest F-stable time-slicing method is the trapezoidal rule, which combinesForward and Backward Euler. So, it may make sense to try some combination of QSSand BQSS.

Recall that:

� In QSS, we take qj as the last quantized value intersected by xj .

� In BQSS, we take qj as the next quantized value intersected by xj .

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Marginally Stable Systems

Centered QSS Method

Centered QSS Method

The simplest F-stable time-slicing method is the trapezoidal rule, which combinesForward and Backward Euler. So, it may make sense to try some combination of QSSand BQSS.

Recall that:

� In QSS, we take qj as the last quantized value intersected by xj .

� In BQSS, we take qj as the next quantized value intersected by xj .

Let us see what happens if we take qj as the mean value between the last and thenext quantized values, i.e., if we choose qj in the middle of the quantization interval.We shall call this new method Centered QSS (CQSS) solver.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Marginally Stable Systems

Centered QSS Method

Centered Quantization

Centered Quantizer

ΔQ

Input

Output

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Marginally Stable Systems

Centered QSS Method

CQSS Simulation of the Harmonic Oscillator

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Marginally Stable Systems

Centered QSS Method

CQSS Features

� CQSS preserves the periodical behavior of the harmonic oscillator.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Marginally Stable Systems

Centered QSS Method

CQSS Features

� CQSS preserves the periodical behavior of the harmonic oscillator.

� It has been proven that CQSS preserves the geometrical properties of generalHamiltonian (conservative, frictionless) systems: the method is symmetric,symplectic, and it preserves ρ-reversibility.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Marginally Stable Systems

Centered QSS Method

CQSS Features

� CQSS preserves the periodical behavior of the harmonic oscillator.

� It has been proven that CQSS preserves the geometrical properties of generalHamiltonian (conservative, frictionless) systems: the method is symmetric,symplectic, and it preserves ρ-reversibility.

� Just like QSS and BQSS, the method does not call for Newton iterations. Infact, it is the only known solver that exhibits F-stability while terminating thecomputations associated with a single step in a fixed amount of real time thatcan be calculated beforehand.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Marginally Stable Systems

Centered QSS Method

CQSS Features

� CQSS preserves the periodical behavior of the harmonic oscillator.

� It has been proven that CQSS preserves the geometrical properties of generalHamiltonian (conservative, frictionless) systems: the method is symmetric,symplectic, and it preserves ρ-reversibility.

� Just like QSS and BQSS, the method does not call for Newton iterations. Infact, it is the only known solver that exhibits F-stability while terminating thecomputations associated with a single step in a fixed amount of real time thatcan be calculated beforehand.

� Consequently, CQSS is well suited for real-time simulation of marginally stablesystems with low to modest accuracy requirements.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Marginally Stable Systems

Centered QSS Method

CQSS Features

� CQSS preserves the periodical behavior of the harmonic oscillator.

� It has been proven that CQSS preserves the geometrical properties of generalHamiltonian (conservative, frictionless) systems: the method is symmetric,symplectic, and it preserves ρ-reversibility.

� Just like QSS and BQSS, the method does not call for Newton iterations. Infact, it is the only known solver that exhibits F-stability while terminating thecomputations associated with a single step in a fixed amount of real time thatcan be calculated beforehand.

� Consequently, CQSS is well suited for real-time simulation of marginally stablesystems with low to modest accuracy requirements.

� Unfortunately, CQSS is only first-order accurate. There are reasons to believethat higher-order CQSS methods cannot be constructed.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Marginally Stable Systems

Centered QSS Method

CQSS Features

� CQSS preserves the periodical behavior of the harmonic oscillator.

� It has been proven that CQSS preserves the geometrical properties of generalHamiltonian (conservative, frictionless) systems: the method is symmetric,symplectic, and it preserves ρ-reversibility.

� Just like QSS and BQSS, the method does not call for Newton iterations. Infact, it is the only known solver that exhibits F-stability while terminating thecomputations associated with a single step in a fixed amount of real time thatcan be calculated beforehand.

� Consequently, CQSS is well suited for real-time simulation of marginally stablesystems with low to modest accuracy requirements.

� Unfortunately, CQSS is only first-order accurate. There are reasons to believethat higher-order CQSS methods cannot be constructed.

� It is certainly possible to design higher-order QSS-based solvers that aredecently well suited for the simulation of marginally stable systems, e.g., bycreating a cyclic method, in which steps of QSSi toggle with steps of LIQSSi .Unfortunately, these methods will not preserve the geometric properties ofCQSS in a strict sense, and they will not be truly F-stable.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Delay Differential Equations

DQSS Methods

Delay Differential Equations

Delay differential equations (DDEs) are similar to ODEs, but their right-handfunctions also depend explicitly on past state values.

x(t) = f(x(t), x(t − τ1(x, t)), ..., x(t − τm(x, t)), u(t))

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Delay Differential Equations

DQSS Methods

Delay Differential Equations

Delay differential equations (DDEs) are similar to ODEs, but their right-handfunctions also depend explicitly on past state values.

x(t) = f(x(t), x(t − τ1(x, t)), ..., x(t − τm(x, t)), u(t))

The delay functions τj (·) can be constant, or they can depend on time and/or thestate itself. Instead of an initial state, DDEs need an initial history to be solvable.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Delay Differential Equations

DQSS Methods

Delay Differential Equations

Delay differential equations (DDEs) are similar to ODEs, but their right-handfunctions also depend explicitly on past state values.

x(t) = f(x(t), x(t − τ1(x, t)), ..., x(t − τm(x, t)), u(t))

The delay functions τj (·) can be constant, or they can depend on time and/or thestate itself. Instead of an initial state, DDEs need an initial history to be solvable.

� DDEs require numerical integration algorithms similar to those for ODEs.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Delay Differential Equations

DQSS Methods

Delay Differential Equations

Delay differential equations (DDEs) are similar to ODEs, but their right-handfunctions also depend explicitly on past state values.

x(t) = f(x(t), x(t − τ1(x, t)), ..., x(t − τm(x, t)), u(t))

The delay functions τj (·) can be constant, or they can depend on time and/or thestate itself. Instead of an initial state, DDEs need an initial history to be solvable.

� DDEs require numerical integration algorithms similar to those for ODEs.

� The algorithms are however more complex, as they must look backward in timein order to compute the state derivatives.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Delay Differential Equations

DQSS Methods

Delay Differential Equations

Delay differential equations (DDEs) are similar to ODEs, but their right-handfunctions also depend explicitly on past state values.

x(t) = f(x(t), x(t − τ1(x, t)), ..., x(t − τm(x, t)), u(t))

The delay functions τj (·) can be constant, or they can depend on time and/or thestate itself. Instead of an initial state, DDEs need an initial history to be solvable.

� DDEs require numerical integration algorithms similar to those for ODEs.

� The algorithms are however more complex, as they must look backward in timein order to compute the state derivatives.

� From the point of view of the numerical integration, DDEs have some featuresin common with discontinuous ODEs.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Delay Differential Equations

DQSS Methods

DDEs and QSS Methods

Recently obtained results show that QSS methods provide an efficient andcomparatively simple solution to the numerical integration of DDEs.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Delay Differential Equations

DQSS Methods

DDEs and QSS Methods

Recently obtained results show that QSS methods provide an efficient andcomparatively simple solution to the numerical integration of DDEs.

Given a DDE:

x(t) = f(x(t), x(t − τ1(x, t)), ..., x(t − τm(x, t)), u(t))

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Delay Differential Equations

DQSS Methods

DDEs and QSS Methods

Recently obtained results show that QSS methods provide an efficient andcomparatively simple solution to the numerical integration of DDEs.

Given a DDE:

x(t) = f(x(t), x(t − τ1(x, t)), ..., x(t − τm(x, t)), u(t))

The so-called DQSS methods (DQSS1, DQSS2, or DQSS3) approximate it as:

x(t) = f(q(t), q(t − τ1(q, t)), ...,q(t − τm(q, t)), u(t))

where the components of q and x are related by quantization functions of the givenapproximation order.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Delay Differential Equations

DQSS Methods

DQSS and PowerDEVS

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Delay Differential Equations

DQSS Methods

DQSS and PowerDEVS

The block diagram of a DQSScontains:

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Delay Differential Equations

DQSS Methods

DQSS and PowerDEVS

The block diagram of a DQSScontains:

� hysteretic quantizedintegrators to computeqi (t),

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Delay Differential Equations

DQSS Methods

DQSS and PowerDEVS

The block diagram of a DQSScontains:

� hysteretic quantizedintegrators to computeqi (t),

� static functions to computexi (t),

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Delay Differential Equations

DQSS Methods

DQSS and PowerDEVS

The block diagram of a DQSScontains:

� hysteretic quantizedintegrators to computeqi (t),

� static functions to computexi (t),

and also:

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Delay Differential Equations

DQSS Methods

DQSS and PowerDEVS

The block diagram of a DQSScontains:

� hysteretic quantizedintegrators to computeqi (t),

� static functions to computexi (t),

and also:

� static functions to computeτj (t), and

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Delay Differential Equations

DQSS Methods

DQSS and PowerDEVS

The block diagram of a DQSScontains:

� hysteretic quantizedintegrators to computeqi (t),

� static functions to computexi (t),

and also:

� static functions to computeτj (t), and

� a new type of delay blocksthat compute qi (t − τj (t))given qi (t) and τj (t).

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Delay Differential Equations

DQSS Methods

DQSS and PowerDEVS II

Each of the PowerDEVS blocks can be implemented as a DEVS model.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Delay Differential Equations

DQSS Methods

DQSS and PowerDEVS II

Each of the PowerDEVS blocks can be implemented as a DEVS model.

� We already have seen the DEVS models for the hysteretic quantized integrators.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Delay Differential Equations

DQSS Methods

DQSS and PowerDEVS II

Each of the PowerDEVS blocks can be implemented as a DEVS model.

� We already have seen the DEVS models for the hysteretic quantized integrators.

� We also have seen the DEVS models for static functions.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Delay Differential Equations

DQSS Methods

DQSS and PowerDEVS II

Each of the PowerDEVS blocks can be implemented as a DEVS model.

� We already have seen the DEVS models for the hysteretic quantized integrators.

� We also have seen the DEVS models for static functions.

� We only need to still build a DEVS model for the delay block.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Delay Differential Equations

DQSS Methods

DQSS and PowerDEVS II

Each of the PowerDEVS blocks can be implemented as a DEVS model.

� We already have seen the DEVS models for the hysteretic quantized integrators.

� We also have seen the DEVS models for static functions.

� We only need to still build a DEVS model for the delay block.

Dd(t) = y(t − τ(t))

τ(t)

y(t)

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Delay Differential Equations

DQSS Methods

The Delay Block

The inputs of the delay block y(t) and τ(t) and the output d(t) = y(t − τ(t)) arepiecewise polynomial trajectories. The maximum order of the polynomials depends onthe approximation order of the method.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Delay Differential Equations

DQSS Methods

The Delay Block

The inputs of the delay block y(t) and τ(t) and the output d(t) = y(t − τ(t)) arepiecewise polynomial trajectories. The maximum order of the polynomials depends onthe approximation order of the method.

� The first input y(t) will be represented as a sequence of events at times tyk ,

carrying values y0,k , y1,k , y2,k , so that:

y(t) = y0,k + y1,k · (t − tyk ) + y2,k · (t − ty

k )2; for tyk < t < ty

k+1

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Delay Differential Equations

DQSS Methods

The Delay Block

The inputs of the delay block y(t) and τ(t) and the output d(t) = y(t − τ(t)) arepiecewise polynomial trajectories. The maximum order of the polynomials depends onthe approximation order of the method.

� The first input y(t) will be represented as a sequence of events at times tyk ,

carrying values y0,k , y1,k , y2,k , so that:

y(t) = y0,k + y1,k · (t − tyk ) + y2,k · (t − ty

k )2; for tyk < t < ty

k+1

� The second input τ(t) will be represented as a sequence of events at times tτj ,

carrying values τ0,j , τ1,j , τ2,j , so that:

τ(t) = τ0,j + τ1,j · (t − tτj ) + τ2,j · (t − tτ

j )2; for tτj < t < tτ

j+1

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Delay Differential Equations

DQSS Methods

The Delay Block

The inputs of the delay block y(t) and τ(t) and the output d(t) = y(t − τ(t)) arepiecewise polynomial trajectories. The maximum order of the polynomials depends onthe approximation order of the method.

� The first input y(t) will be represented as a sequence of events at times tyk ,

carrying values y0,k , y1,k , y2,k , so that:

y(t) = y0,k + y1,k · (t − tyk ) + y2,k · (t − ty

k )2; for tyk < t < ty

k+1

� The second input τ(t) will be represented as a sequence of events at times tτj ,

carrying values τ0,j , τ1,j , τ2,j , so that:

τ(t) = τ0,j + τ1,j · (t − tτj ) + τ2,j · (t − tτ

j )2; for tτj < t < tτ

j+1

� The DEVS delay model computes the corresponding event sequences ofd(t) = y(t − τ(t)).

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Delay Differential Equations

DQSS Methods

The Delay Algorithm

]

]

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Delay Differential Equations

DQSS Methods

Theoretical Properties of DQSS

Given a DDE with constant delays of the form:

x(t) = A · x(t) +m∑

i=1

Ai · x(t − τi )

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Delay Differential Equations

DQSS Methods

Theoretical Properties of DQSS

Given a DDE with constant delays of the form:

x(t) = A · x(t) +m∑

i=1

Ai · x(t − τi )

where the analytical solution x(t) = 0 corresponding to the trivial initial history isasymptotically stable, then:

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Delay Differential Equations

DQSS Methods

Theoretical Properties of DQSS

Given a DDE with constant delays of the form:

x(t) = A · x(t) +m∑

i=1

Ai · x(t − τi )

where the analytical solution x(t) = 0 corresponding to the trivial initial history isasymptotically stable, then:

� The absolute global error committed by any DQSS method is bounded for anyquanta adopted.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Delay Differential Equations

DQSS Methods

Theoretical Properties of DQSS

Given a DDE with constant delays of the form:

x(t) = A · x(t) +m∑

i=1

Ai · x(t − τi )

where the analytical solution x(t) = 0 corresponding to the trivial initial history isasymptotically stable, then:

� The absolute global error committed by any DQSS method is bounded for anyquanta adopted.

� The error goes to zero when the quantization goes to zero.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Delay Differential Equations

DQSS Methods

Theoretical Properties of DQSS

Given a DDE with constant delays of the form:

x(t) = A · x(t) +m∑

i=1

Ai · x(t − τi )

where the analytical solution x(t) = 0 corresponding to the trivial initial history isasymptotically stable, then:

� The absolute global error committed by any DQSS method is bounded for anyquanta adopted.

� The error goes to zero when the quantization goes to zero.

There is a similar property for general nonlinear DDE models with state and timedependent delays. In that case, a stronger condition (input-to-state stability) isrequired for the original system, and the global error boundedness is only guaranteedfor sufficiently small quanta.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Delay Differential Equations

DQSS Methods

DQSS Features

� The usage of QSS methods for DDE simulations provides highly efficientalgorithms that often improve on the results obtained by classic time-slicingmethods.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Delay Differential Equations

DQSS Methods

DQSS Features

� The usage of QSS methods for DDE simulations provides highly efficientalgorithms that often improve on the results obtained by classic time-slicingmethods.

� While conventional methods for ODEs must be almost entirely reformulated todeal with DDEs, QSS methods reduce the problem of the delays to polynomialmanipulations locally managed by a new atomic DEVS block. The staticfunctions and hysteretic quantized integrators remain unchanged.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods for Delay Differential Equations

DQSS Methods

DQSS Features

� The usage of QSS methods for DDE simulations provides highly efficientalgorithms that often improve on the results obtained by classic time-slicingmethods.

� While conventional methods for ODEs must be almost entirely reformulated todeal with DDEs, QSS methods reduce the problem of the delays to polynomialmanipulations locally managed by a new atomic DEVS block. The staticfunctions and hysteretic quantized integrators remain unchanged.

� DQSS solvers have strong theoretical properties regarding stability, convergence,and accuracy that guarantee the correctness of the results.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods and Real Time Simulation

QSS Methods in Real Time

QSS Methods in Real Time

QSS methods have features that make them particularly suitable for runningsimulations in real time:

Numerical Simulation of Dynamic Systems XXVII

QSS Methods and Real Time Simulation

QSS Methods in Real Time

QSS Methods in Real Time

QSS methods have features that make them particularly suitable for runningsimulations in real time:

� They detect and handle discontinuities without iterations.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods and Real Time Simulation

QSS Methods in Real Time

QSS Methods in Real Time

QSS methods have features that make them particularly suitable for runningsimulations in real time:

� They detect and handle discontinuities without iterations.

� They can integrate many stiff systems in predetermined time, i.e., withoutrequiring Newton iterations.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods and Real Time Simulation

QSS Methods in Real Time

QSS Methods in Real Time

QSS methods have features that make them particularly suitable for runningsimulations in real time:

� They detect and handle discontinuities without iterations.

� They can integrate many stiff systems in predetermined time, i.e., withoutrequiring Newton iterations.

� If real-time speed cannot be attained, accuracy can be sacrificed by increasingthe quantum. This would only affect accuracy, whereas stability will bepreserved.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods and Real Time Simulation

QSS Methods in Real Time

QSS Methods in Real Time

QSS methods have features that make them particularly suitable for runningsimulations in real time:

� They detect and handle discontinuities without iterations.

� They can integrate many stiff systems in predetermined time, i.e., withoutrequiring Newton iterations.

� If real-time speed cannot be attained, accuracy can be sacrificed by increasingthe quantum. This would only affect accuracy, whereas stability will bepreserved.

� They offer dense output. Thus, the simulation outputs can be communicated atany instant of time.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods and Real Time Simulation

QSS Methods in Real Time

QSS Methods in Real Time

QSS methods have features that make them particularly suitable for runningsimulations in real time:

� They detect and handle discontinuities without iterations.

� They can integrate many stiff systems in predetermined time, i.e., withoutrequiring Newton iterations.

� If real-time speed cannot be attained, accuracy can be sacrificed by increasingthe quantum. This would only affect accuracy, whereas stability will bepreserved.

� They offer dense output. Thus, the simulation outputs can be communicated atany instant of time.

� These algorithms are naturally asynchronous. Hence distributing QSSsimulations across a parallel multi-processor architecture is trivial.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods and Real Time Simulation

PowerDEVS in Real Time

PowerDEVS in Real Time

A version of PowerDEVS runs on a real-time operative system called Linux RTAI,with the following features:

Numerical Simulation of Dynamic Systems XXVII

QSS Methods and Real Time Simulation

PowerDEVS in Real Time

PowerDEVS in Real Time

A version of PowerDEVS runs on a real-time operative system called Linux RTAI,with the following features:

� Simulations can be synchronized with the real-time clock with a precision ofroughly 1μs .

Numerical Simulation of Dynamic Systems XXVII

QSS Methods and Real Time Simulation

PowerDEVS in Real Time

PowerDEVS in Real Time

A version of PowerDEVS runs on a real-time operative system called Linux RTAI,with the following features:

� Simulations can be synchronized with the real-time clock with a precision ofroughly 1μs .

� PowerDEVS-RT offers special modules to detect and process hardwareinterrupts.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods and Real Time Simulation

PowerDEVS in Real Time

PowerDEVS in Real Time

A version of PowerDEVS runs on a real-time operative system called Linux RTAI,with the following features:

� Simulations can be synchronized with the real-time clock with a precision ofroughly 1μs .

� PowerDEVS-RT offers special modules to detect and process hardwareinterrupts.

� PowerDEVS-RT permits to communicate with input and output hardware portsin a very simple fashion.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods and Real Time Simulation

PowerDEVS in Real Time

PowerDEVS in Real Time

A version of PowerDEVS runs on a real-time operative system called Linux RTAI,with the following features:

� Simulations can be synchronized with the real-time clock with a precision ofroughly 1μs .

� PowerDEVS-RT offers special modules to detect and process hardwareinterrupts.

� PowerDEVS-RT permits to communicate with input and output hardware portsin a very simple fashion.

� PowerDEVS-RT has been successfully used in the real-time simulation of powerelectronic converters, working at frequencies where most real-time simulationtools fail.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods and Real Time Simulation

Conclusions

Conclusions

� A broad palette of different QSS-based algorithms has been presented in the lastthree presentations.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods and Real Time Simulation

Conclusions

Conclusions

� A broad palette of different QSS-based algorithms has been presented in the lastthree presentations.

� QSS-based algorithms have meanwhile proven themselves to offer an interestingand innovative new approach to numerical ODE, DAE, and DDE solutions formany different problems.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods and Real Time Simulation

Conclusions

Conclusions

� A broad palette of different QSS-based algorithms has been presented in the lastthree presentations.

� QSS-based algorithms have meanwhile proven themselves to offer an interestingand innovative new approach to numerical ODE, DAE, and DDE solutions formany different problems.

� QSS-based algorithms can be highly competitive when used for applicationswith low to average accuracy requirements. Problems calling for high-orderalgorithms cannot be dealt with effectively using QSS-based solvers.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods and Real Time Simulation

Conclusions

Conclusions

� A broad palette of different QSS-based algorithms has been presented in the lastthree presentations.

� QSS-based algorithms have meanwhile proven themselves to offer an interestingand innovative new approach to numerical ODE, DAE, and DDE solutions formany different problems.

� QSS-based algorithms can be highly competitive when used for applicationswith low to average accuracy requirements. Problems calling for high-orderalgorithms cannot be dealt with effectively using QSS-based solvers.

� Already QSS4 is rarely more cost-effective than QSS3, because the increasedoverhead eats into the benefit to be reaped from the larger step sizes. AlreadyQSS5 will require iterations in every step, because a fifth-order polynomial willhave to be solved, which can only be done iteratively.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods and Real Time Simulation

Conclusions

Conclusions II

� QSS-based algorithms are of particular interest for the simulation of systemsexhibiting frequent discontinuities, as state events can be handled much moreefficiently by state-quantization algorithms than by time-slicing algorithms.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods and Real Time Simulation

Conclusions

Conclusions II

� QSS-based algorithms are of particular interest for the simulation of systemsexhibiting frequent discontinuities, as state events can be handled much moreefficiently by state-quantization algorithms than by time-slicing algorithms.

� The benefit of QSS-based solvers becomes even more pronounced when thediscontinuous system to be simulated is furthermore stiff. A typical applicationof stiff discontinuous systems are models of switching power electronic circuits.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods and Real Time Simulation

Conclusions

Conclusions II

� QSS-based algorithms are of particular interest for the simulation of systemsexhibiting frequent discontinuities, as state events can be handled much moreefficiently by state-quantization algorithms than by time-slicing algorithms.

� The benefit of QSS-based solvers becomes even more pronounced when thediscontinuous system to be simulated is furthermore stiff. A typical applicationof stiff discontinuous systems are models of switching power electronic circuits.

� QSS-based solvers are very promising for the simulation of large-scale models, asthey exploit the sparsity inherent in these models naturally and directly.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods and Real Time Simulation

Conclusions

Conclusions II

� QSS-based algorithms are of particular interest for the simulation of systemsexhibiting frequent discontinuities, as state events can be handled much moreefficiently by state-quantization algorithms than by time-slicing algorithms.

� The benefit of QSS-based solvers becomes even more pronounced when thediscontinuous system to be simulated is furthermore stiff. A typical applicationof stiff discontinuous systems are models of switching power electronic circuits.

� QSS-based solvers are very promising for the simulation of large-scale models, asthey exploit the sparsity inherent in these models naturally and directly.

� QSS-based solvers perform equally well as classical solvers when dealing withsmall-scale models of systems without discontinuities. Yet in those cases, thereis nothing that the QSS solvers can exploit that would make them moreattractive than the much simpler classical ODE solvers.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods and Real Time Simulation

Conclusions

Conclusions III

� QSS-based algorithms are of particular interest for real-time simulation.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods and Real Time Simulation

Conclusions

Conclusions III

� QSS-based algorithms are of particular interest for real-time simulation.

� Since QSS solvers are naturally asynchronous, they can be easily distributedover a multi-processor architecture.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods and Real Time Simulation

Conclusions

Conclusions III

� QSS-based algorithms are of particular interest for real-time simulation.

� Since QSS solvers are naturally asynchronous, they can be easily distributedover a multi-processor architecture.

� The communication band-width is minimized, because communication betweentwo processors only takes place at event times. As long as not much ishappening, there is no need to communicate at all. Thus, also thecommunication occurs in a naturally asynchronous fashion.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods and Real Time Simulation

Conclusions

Conclusions III

� QSS-based algorithms are of particular interest for real-time simulation.

� Since QSS solvers are naturally asynchronous, they can be easily distributedover a multi-processor architecture.

� The communication band-width is minimized, because communication betweentwo processors only takes place at event times. As long as not much ishappening, there is no need to communicate at all. Thus, also thecommunication occurs in a naturally asynchronous fashion.

� The communication band-width is furthermore minimized, because only a singlebit needs to be communicated between processors to indicate a state change. Amessage of “1” means that the sending state incremented its level, whereas amessage of “0” means that it decremented its level. As long as the statevariable doesn’t change its level, it doesn’t send an output event through itsoutput channel.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods and Real Time Simulation

References

References

1. Bergero, F., E. Kofman, and F.E. Cellier (2013), “A Novel ParallelizationTechnique for DEVS Simulation of Continuous and Hybrid Systems,”Simulation, in press.

2. Migoni, G., M. Bortolotto, E. Kofman, and F.E. Cellier (2013), “LinearlyImplicit Quantization–based Integration Methods for Stiff Ordinary DifferentialEquations,” Simulation Modelling Practice and Theory, 35(6), pp.118-136.

3. Migoni, G., E. Kofman, and F.E. Cellier (2012), “Quantization-basedNew Integration Methods for Stiff ODEs,” Simulation, 88(4), pp.387-407.

4. Castro, R., E. Kofman, and F.E. Cellier (2011), “Quantization-basedIntegration Methods for Delay Differential Equations,” Simulation ModellingPractice and Theory, 19(1), pp.314-336.

5. Kofman, E., F.E. Cellier, and G. Migoni (2010), “Continuous SystemSimulation and Control,” in: Discrete Event Simulation and Modeling:Theory and Applications (Model-Based Design), (G.A. Wainer and P.J.Mosterman, eds.), CRC Press, Boca Raton, FL, pp.75-107.

Numerical Simulation of Dynamic Systems XXVII

QSS Methods and Real Time Simulation

References

References II

1. Bergero, Federico (2012), Simulaciones de Sistemas Hıbridos por EventosDiscretos: Tiempo Real y Paralelismo, Ph.D. Dissertation, Faculty of ExactSciences, Engineering, and Land-surveying, National University of Rosario,Argentina.

2. Migoni, Gustavo (2010), Simulacion por Cuantificacion de Sistemas Stiff, Ph.D.Dissertation, Faculty of Exact Sciences, Engineering, and Land-surveying,National University of Rosario, Argentina.