**Meet the editor**

Dr. Karel Perutka received his Ph.D. degree in 2007 at Tomas Bata University in Zlin, Faculty of Applied Informatics, Czech Republic, where he is a senior lecturer. Technical Cybernetics was the principal branch of his thesis. Dr. Perutka is the author of one monograph about MATLAB, several book chapters about MATLAB and control theory, and author or co-author of more than fifty papers in the conference proceedings. He is a member of the organizing and reviewing committees of several conferences. Dr. Perutka is teaching MATLAB programming, electronics, microelectronics, diagnosis of digital systems and modulations and demodulations of signals. His main research interests are: adaptive control, real-time control, control of multivariable systems, applications of theory at FEC codes (turbo codes).

Contents

**Preface IX** 

Chapter 1 **Implementation of a New Quasi-Optimal Controller Tuning Algorithm for Time-Delay Systems 3** 

Chapter 2 **Control of Distributed Parameter Systems - Engineering Methods and Software Support in the MATLAB &** 

> **Simulink Programming Environment 27**  Gabriel Hulkó, Cyril Belavý, Gergely Takács,

**Electrical Engineering Simulation 51** 

**Design and Verification Using MATLAB and Finite Element Analysis 75** 

**Part 2 Hardware and Photonics Applications 95** 

Chapter 5 **Computational Models Designed in MATLAB to** 

I.V. Guryev, I.A. Sukhoivanov, N.S. Gurieva, J.A. Andrade Lucio and O. Ibarra-Manzano

Lutfi Al-Sharif, Mohammad Kilani, Sinan Taifour, Abdullah Jamal Issa, Eyas Al-Qaisi, Fadi Awni Eleiwi

**Improve Parameters and Cost of Modern Chips 97** 

Libor Pekař and Roman Prokop

Pavol Buček and Peter Zajíček

Lubomír Brančík

Chapter 3 **Numerical Inverse Laplace Transforms for** 

Chapter 4 **Linear Variable Differential Transformer** 

and Omar Nabil Kamal

Chapter 6 **Results Processing in MATLAB for Photonics Applications 119** 

Peter Malík

**Part 1 Theory 1** 

### Contents


**Part 1 Theory 1** 

	- **Part 2 Hardware and Photonics Applications 95**

#### X Contents

#### **Part 3 Power Systems Applications 153**


Contents VII

Chapter 18 **Robust Control of Active Vehicle Suspension Systems Using** 

Esteban Chávez Conde, Francisco Beltrán Carbajal,

Antonio Valderrábano González and Ramón Chávez Bracamontes

**Module for EV (Electric Vehicle) 443** Mohamed Amine Fakhfakh, Moez Ayadi,

**Robots in MATLAB® Environment 459**

Conghui Liang, Marco Ceccarelli and Giuseppe Carbone

S. M. Mizanoor Rahman, Ryojun Ikeura and Haoyong Yu

**Assist Robot for Manipulating Objects Based on Operator's Weight Perception 493** 

Ibrahim Ben Salah and Rafik Neji

Chapter 20 **Design and Simulation of Legged Walking** 

Chapter 21 **Modeling, Simulation and Control of a Power** 

Chapter 19 **Thermal Behavior of IGBT** 

**Part 6 Robot Applications 457** 

**Sliding Modes and Differential Flatness with MATLAB 425**


#### **Part 4 Motor Applications 339**


#### **Part 5 Vehicle Applications 407**

Chapter 17 **Automatic Guided Vehicle Simulation in MATLAB by Using Genetic Algorithm 409**  Anibal Azevedo


#### **Part 6 Robot Applications 457**

VI Contents

**Part 3 Power Systems Applications 153**

**Power Supply Systems Design 155**  Valeria Boscaino and Giuseppe Capponi

Valeria Boscaino and Giuseppe Capponi

Chapter 10 **Automatic Modelling Approach for Power Electronics**

Ricardo Vargas, M.A Arjona and Manuel Carrillo

Iman Mohammad Hoseiny Naveh and Javad Sadeh

**Design for LLC Resonant Converter 321**  Peter Drgoňa, Michal Frivaldský and Anna Simonová

Chapter 14 **Wavelet Fault Diagnosis of Induction Motor 341**  Khalaf Salloum Gaeid and Hew Wooi Ping

Chapter 15 **Implementation of Induction Motor Drive Control**

Chapter 16 **Linearization of Permanent Magnet Synchronous Motor Using MATLAB and Simulink 387**

**for Educational Purpose 365**

A. K. Parvathy and R. Devanathan

**Schemes in MATLAB/Simulink/dSPACE Environment** 

Christophe Versèle, Olivier Deblecker and Jacques Lobry

**in MATLAB by Using Genetic Algorithm 409** 

**Power System: Damping Detrimental Sub-Synchronous Oscillations 301** 

**Converters: Code Generation (C S Function, Modelica, VHDL-AMS) and MATLAB/Simulink Simulation 247** Asma Merdassi, Laurent Gerbaud and Seddik Bacha

Chapter 9 **Calculating Radiation from Power Lines for Power Line Communications 223** 

Chapter 8 **High Accuracy Modelling of Hybrid Power Supplies 189** 

Chapter 7 **MATLAB Co-Simulation Tools for** 

Cornelis Jan Kikkert

Chapter 11 **PV Curves for Steady-State Security** 

Chapter 13 **A New Approach of Control System** 

**Part 4 Motor Applications 339** 

**Part 5 Vehicle Applications 407**

Anibal Azevedo

Chapter 17 **Automatic Guided Vehicle Simulation** 

**Assessment with MATLAB 267**

Chapter 12 **Application of Modern Optimal Control in**


Preface

consists of six parts.

parameters systems.

MATLAB is a powerful software package developed by the MathWorks, Inc., the multi-national corporation with the company's headquarters in Natick, Massachusetts, United States of America. The software is a member of the family of the mathematical computing software together with Maple, Mathematica, Mathcad etc. and it became the standard for simulations in academia and practice. It offers easy-to-understand programming language, sharing source code and toolboxes which solve the selected area from practice. The software is ideal for light scientific computing, data processing and math work. Its strength lies in toolboxes for Control and Electrical Engineering.

This book presents interesting topics from the area of control theory, robotics, power systems, motors and vehicles, for which the MATLAB software was used. The book

First part of the book deals with control theory. It provides information about numerical inverse Laplace transform, control of time-delay systems and distributed

There are two chapters only in the second part of the book. One is about the application of MATLAB for modern chips improvement, and the other one describes

Next part of the book consists of chapters which have something in common with the power systems applications, for example two chapters are about power supply

This part is followed by the part about MATLAB applications used in fault diagnosis of induction motor, implementation of induction motor drive control and linearization

The last but one part of the book provides the application for vehicles, namely the guided vehicle simulation, new configuration of machine, behavior of module for

The last part deals with MATLAB usage in robotics, with the modeling, simulation

systems and one is about application of optimal control in power systems.

results of MATLAB usage for photonics applications.

electric vehicle and control of vehicle suspension system.

and control of power assist robot and legged walking robot.

of permanent magnet synchronous motors.

### Preface

MATLAB is a powerful software package developed by the MathWorks, Inc., the multi-national corporation with the company's headquarters in Natick, Massachusetts, United States of America. The software is a member of the family of the mathematical computing software together with Maple, Mathematica, Mathcad etc. and it became the standard for simulations in academia and practice. It offers easy-to-understand programming language, sharing source code and toolboxes which solve the selected area from practice. The software is ideal for light scientific computing, data processing and math work. Its strength lies in toolboxes for Control and Electrical Engineering.

This book presents interesting topics from the area of control theory, robotics, power systems, motors and vehicles, for which the MATLAB software was used. The book consists of six parts.

First part of the book deals with control theory. It provides information about numerical inverse Laplace transform, control of time-delay systems and distributed parameters systems.

There are two chapters only in the second part of the book. One is about the application of MATLAB for modern chips improvement, and the other one describes results of MATLAB usage for photonics applications.

Next part of the book consists of chapters which have something in common with the power systems applications, for example two chapters are about power supply systems and one is about application of optimal control in power systems.

This part is followed by the part about MATLAB applications used in fault diagnosis of induction motor, implementation of induction motor drive control and linearization of permanent magnet synchronous motors.

The last but one part of the book provides the application for vehicles, namely the guided vehicle simulation, new configuration of machine, behavior of module for electric vehicle and control of vehicle suspension system.

The last part deals with MATLAB usage in robotics, with the modeling, simulation and control of power assist robot and legged walking robot.

#### XIV Preface

This book provides practical examples of MATLAB usage from different areas of engineering and will be useful for students of Control Engineering or Electrical Engineering to find the necessary enlargement of their theoretical knowledge and several models on which theory can be verified. It helps with the future orientation to solve the practical problems.

Finally, I would like to thank everybody who has contributed to this book. The results of your work are very interesting and inspiring, I am sure the book will find a lot of readers who will find the results very useful.

> **Karel Perutka**  Tomas Bata University in Zlín Czech Republic

**Part 1** 

**Theory** 

**1** 

**Implementation of a New Quasi-Optimal** 

Systems and models with dead time or aftereffect, also called hereditary, anisochronic or time-delay systems (TDS), belonging to the class of infinite dimensional systems have been largely studied during last decades due to their interesting and important theoretical and practical features. A wide spectrum of systems in natural sciences, economics, pure informatics etc., both real-life and theoretical, is affected by delays which can have various forms; to name just a few the reader is referred e.g. to (Górecki et al., 1989; Marshall et al., 1992; Kolmanovskii & Myshkis, 1999; Richard, 2003; Michiels & Niculescu, 2008; Pekař et al., 2009) and references herein. Linear time-invariant dynamic systems with distributed or lumped delays (LTI-TDS) in a single-input single-output (SISO) case can be represented by a set of functional differential equations (Hale & Verduyn Lunel, 1993) or by the Laplace transfer function as a ratio of so-called quasipolynomials (El'sgol'ts & Norkin, 1973) in one complex variable *s*, rather than polynomials which are usual in system and control theory. Quasipolynomials are formed as linear combinations of products of *s*-powers and exponential terms. Hence, the Laplace transform of LTI-TDS is no longer rational and socalled meromorphic functions have to be introduced. A significant feature of LTI-TDS is (in contrast to undelayed systems ) its infinite spectrum and transfer function poles decide except some cases of distributed delays, see e.g. (Loiseau, 2000) - about the asymptotic

It is a well-known fact that delay can significantly deteriorate the quality of feedback control performance, namely stability and periodicity. Therefore, design a suitable control law for such systems is a challenging task solved by various techniques and approaches; a plentiful enumeration of them can be found e.g. in (Richard, 2003). Every controller design naturally requires and presumes a controlled plant model in an appropriate form. A huge set of approaches uses the Laplace transfer function; however, it is inconvenient to utilize a ratio of quasipolynomials especially while natural requirements of internal (impulse-free modes) and asymptotic stability of the feedback loop and the feasibility and causality of the

The meromorphic description can be extended to the fractional description, to satisfy requirements above, so that quasipolynomials are factorized into proper and stable meromorphic functions. The ring of stable and proper quasipolynomial (RQ)

**1. Introduction** 

stability as in the case of polynomials.

controller are to be fulfilled.

**Controller Tuning Algorithm for** 

**Time-Delay Systems** 

Libor Pekař and Roman Prokop

*Tomas Bata University in Zlín* 

*Czech Republic* 

## **Implementation of a New Quasi-Optimal Controller Tuning Algorithm for Time-Delay Systems**

Libor Pekař and Roman Prokop *Tomas Bata University in Zlín Czech Republic* 

#### **1. Introduction**

Systems and models with dead time or aftereffect, also called hereditary, anisochronic or time-delay systems (TDS), belonging to the class of infinite dimensional systems have been largely studied during last decades due to their interesting and important theoretical and practical features. A wide spectrum of systems in natural sciences, economics, pure informatics etc., both real-life and theoretical, is affected by delays which can have various forms; to name just a few the reader is referred e.g. to (Górecki et al., 1989; Marshall et al., 1992; Kolmanovskii & Myshkis, 1999; Richard, 2003; Michiels & Niculescu, 2008; Pekař et al., 2009) and references herein. Linear time-invariant dynamic systems with distributed or lumped delays (LTI-TDS) in a single-input single-output (SISO) case can be represented by a set of functional differential equations (Hale & Verduyn Lunel, 1993) or by the Laplace transfer function as a ratio of so-called quasipolynomials (El'sgol'ts & Norkin, 1973) in one complex variable *s*, rather than polynomials which are usual in system and control theory. Quasipolynomials are formed as linear combinations of products of *s*-powers and exponential terms. Hence, the Laplace transform of LTI-TDS is no longer rational and socalled meromorphic functions have to be introduced. A significant feature of LTI-TDS is (in contrast to undelayed systems ) its infinite spectrum and transfer function poles decide except some cases of distributed delays, see e.g. (Loiseau, 2000) - about the asymptotic stability as in the case of polynomials.

It is a well-known fact that delay can significantly deteriorate the quality of feedback control performance, namely stability and periodicity. Therefore, design a suitable control law for such systems is a challenging task solved by various techniques and approaches; a plentiful enumeration of them can be found e.g. in (Richard, 2003). Every controller design naturally requires and presumes a controlled plant model in an appropriate form. A huge set of approaches uses the Laplace transfer function; however, it is inconvenient to utilize a ratio of quasipolynomials especially while natural requirements of internal (impulse-free modes) and asymptotic stability of the feedback loop and the feasibility and causality of the controller are to be fulfilled.

The meromorphic description can be extended to the fractional description, to satisfy requirements above, so that quasipolynomials are factorized into proper and stable meromorphic functions. The ring of stable and proper quasipolynomial (RQ)

Implementation of a New Quasi-Optimal Controller Tuning Algorithm for Time-Delay Systems 5

( ) ( ) ( ) ( ) ( )

**H A x Ax Bu**

<sup>−</sup> <sup>=</sup> + + −+

*i i i*

+ −+ − + −

**Bu A x B u**

1 1

*H A*

*N N i*

η

*i i N L L*

= =

*i i*

η

1 0 0

τ

where **x** ∈*<sup>n</sup>* is a vector of state variables, **u** ∈*<sup>m</sup>* stands for a vector of inputs, **y** ∈*<sup>l</sup>* represents a vector of outputs, **A***i*, **A**(*τ*), **B***i*, **B**(*τ*), **C**, **H***i* are matrices of appropriate

distributed delays (Hale & Verduyn Lunel, 1993; Richard, 2003; Vyhlídal, 2003). If **H 0** *<sup>i</sup>* ≠ for any *i* = 1,2,...*NH*, model (1) is called neutral; on the other hand, if **H 0** *<sup>i</sup>* = for every *i* = 1,2,...*NH*, so-called retarded model is obtained. It should be noted that the state of model (1) is given not only by a vector of state variables in the current time instant, but also by a segment of the last model history (in functional Banach space) of state and input

**x u** ( )( ) *tt L* + + ∈−

 ττ

Convolution integrals in (1) can be numerically approximate by summations for digital implementation; however, this can destabilize even a stable system. Alternatively, one can integrate (1) and add a new state variable to obtain derivations on the right-hand side only. In the contrary, the model can also be expressed in more consistent functional form using Riemann-Stieltjes integrals so that both lumped and distributed delays are under one convolution. For further details and other state-space TDS models the reader is referred to

This contribution is concerned with retarded delayed systems in the input-output formulation governed by the Laplace transfer function matrix (considering zero initial conditions) as in (3). Hence, in the SISO case (we are concerning about here), the transfer function is no longer rational, as for conventional delayless systems, and a meromorphic

( ) () ( )

*s s*

 τ

exp exp d

1 0

adj exp exp d

= −− − − −

*s ss*

η

η

1 0

*N L i i*

det exp exp d

Δ= − − −− −

*s ss*

*N L i i*

( ) () ( )

 τ  ττ

> ττ

(3)

( ) () ( )

 ττ

τ

τ

function as a ratio of retarded quasipolynomials (RQ) is obtained instead.

1 2

1

+

*A*

*i N L i i*

**Γ C IA A A**

=

=+ − + −

*A*

*i*

= +

1 0

A (retarded or neutral) quasipolynomial of degree *n* has the generic form

1

**IA A A**

η

() () () ( )

= = <sup>Δ</sup>

**Γ Γ Y GU U**

*s ss s*

0

1

**Γ BB B**

+

*B*

*i*

=

1 0

2 0

() ()

*t t*

=

**y Cx**

dimensions, 0 ≤ ≤

variables

(Richard, 2003).

**2.2 Input-output model** 

η

*i*

=

*B*

*t t*

*t t*

d d d d

**x x**

( ) ()( ) () ( )

 ττ

*t td td*

0 0

*<sup>i</sup> L* are lumped (point) delays and convolution integrals express

*tt t*

η

 τ  ττ

, , ,0 (2)

(1)

meromorphic functions (**R***MS*) is hence introduced (Zítek & Kučera, 2003; Pekař & Prokop, 2010). Although the ring can be used for a description of even neutral systems (Hale & Verduyn Lunel, 1993), only systems with so-called retarded structure are considered as the admissible class of systems in this contribution. In contrast to many other algebraic approaches, the ring enables to handle systems with non-commensurate delays, i.e. it is not necessary that all system delays can be expressed as integer multiples of the smallest one. Algebraic control philosophy in this ring then exploits the Bézout identity, to obtain stable and proper controllers, along with the Youla-Kučera parameterization for reference tracking and disturbance rejection.

The closed-loop stability is given, as for delayless systems, by the solutions of the characteristic equation which contains a quasipolynomial instead of a polynomial. These infinite many solutions represent closed-loop system poles deciding about the control system stability. Since a controller can have a finite number of coefficients representing selectable parameters, these have to be set to distribute the infinite spectrum so that the closed-loop system is stable and that other control requirements are satisfied.

The aim of this chapter is to describe, demonstrate and implement a new quasi-optimal pole placement algorithm for SISO LTI-TDS based on the quasi-continuous pole shifting – the main idea of which was presented in (Michiels et al., 2002) - to the prescribed positions. The desired positions are obtained by overshoot analysis of the step response for a dominant pair of complex conjugate poles. A controller structure is initially calculated by algebraic controller design in **R***MS*. Note that the maximum number of prescribed poles (including their multiplicities) equals the number of unknown parameters. If the prescribed roots locations can not be reached, the optimizing of an objective function involving the distance of shifting poles to the prescribed ones and the roots dominancy is utilized. The optimization is made via Self-Organizing Migration Algorithm (SOMA), see e.g. (Zelinka, 2004). Matlab m-file environment is utilized for the algorithm implementation and, consequently, results are tested in Simulink on an attractive example of unstable SISO LTI-TDS.

The chapter is organized as follows. In Section 2 a brief general description of LTI-TDS is introduced together with the coprime factorization for the **R***MS* ring representation. Basic ideas of algebraic controller design in **R***MS* with a simple control feedback are presented in Section 3. The main and original part of the chapter – pole-placement shifting based tuning algorithm – is described in Section 4. Section 5 focuses SOMA and its utilization when solving the tuning problem. An illustrative benchmark example is presented in Section 6.

#### **2. Description of LTI-TDS**

The aim of this section is to present possible models of LTI-TDS; first, that in time domain using functional differential equations, second, the transfer function (matrix) via the Laplace transform. Then, the latter concept is extended so that an algebraic description in a special ring is introduced. Note that for the further purpose of this chapter the state-space functional description is useless.

#### **2.1 State-space model**

A LTI-TDS system with both input-output and internal (state) delays, which can have point (lumped) or distributed form, can be expressed by a set of functional differential equations

$$\begin{aligned} \frac{d\mathbf{x}(t)}{dt} &= \sum\_{i=1}^{N\_{\text{id}}} \mathbf{H}\_{i} \frac{d\mathbf{x}(t-\eta\_{i})}{dt} + \mathbf{A}\_{0}\mathbf{x}(t) + \sum\_{i=1}^{N\_{\text{d}}} \mathbf{A}\_{i}\mathbf{x}(t-\eta\_{i}) + \mathbf{B}\_{0}\mathbf{u}(t) \\ &+ \sum\_{i=1}^{N\_{\text{d}}} \mathbf{B}\_{i}\mathbf{u}\left(t-\eta\_{i}\right) + \int\_{0}^{L} \mathbf{A}\left(\tau\right)\mathbf{x}(t-\tau) \,d\tau + \int\_{0}^{L} \mathbf{B}\left(\tau\right)\mathbf{u}\left(t-\tau\right) \,d\tau \\ \mathbf{y}(t) &= \mathbf{C}\mathbf{x}(t) \end{aligned} \tag{1}$$

where **x** ∈*<sup>n</sup>* is a vector of state variables, **u** ∈*<sup>m</sup>* stands for a vector of inputs, **y** ∈*<sup>l</sup>* represents a vector of outputs, **A***i*, **A**(*τ*), **B***i*, **B**(*τ*), **C**, **H***i* are matrices of appropriate dimensions, 0 ≤ ≤ η*<sup>i</sup> L* are lumped (point) delays and convolution integrals express distributed delays (Hale & Verduyn Lunel, 1993; Richard, 2003; Vyhlídal, 2003). If **H 0** *<sup>i</sup>* ≠ for any *i* = 1,2,...*NH*, model (1) is called neutral; on the other hand, if **H 0** *<sup>i</sup>* = for every *i* = 1,2,...*NH*, so-called retarded model is obtained. It should be noted that the state of model (1) is given not only by a vector of state variables in the current time instant, but also by a segment of the last model history (in functional Banach space) of state and input variables

$$\mathbf{x}(t+\tau), \ \mathbf{u}(t+\tau), \ \tau \in \{-L, 0\} \tag{2}$$

Convolution integrals in (1) can be numerically approximate by summations for digital implementation; however, this can destabilize even a stable system. Alternatively, one can integrate (1) and add a new state variable to obtain derivations on the right-hand side only. In the contrary, the model can also be expressed in more consistent functional form using Riemann-Stieltjes integrals so that both lumped and distributed delays are under one convolution. For further details and other state-space TDS models the reader is referred to (Richard, 2003).

#### **2.2 Input-output model**

4 MATLAB for Engineers – Applications in Control, Electrical Engineering, IT and Robotics

meromorphic functions (**R***MS*) is hence introduced (Zítek & Kučera, 2003; Pekař & Prokop, 2010). Although the ring can be used for a description of even neutral systems (Hale & Verduyn Lunel, 1993), only systems with so-called retarded structure are considered as the admissible class of systems in this contribution. In contrast to many other algebraic approaches, the ring enables to handle systems with non-commensurate delays, i.e. it is not necessary that all system delays can be expressed as integer multiples of the smallest one. Algebraic control philosophy in this ring then exploits the Bézout identity, to obtain stable and proper controllers, along with the Youla-Kučera parameterization for reference

The closed-loop stability is given, as for delayless systems, by the solutions of the characteristic equation which contains a quasipolynomial instead of a polynomial. These infinite many solutions represent closed-loop system poles deciding about the control system stability. Since a controller can have a finite number of coefficients representing selectable parameters, these have to be set to distribute the infinite spectrum so that the

The aim of this chapter is to describe, demonstrate and implement a new quasi-optimal pole placement algorithm for SISO LTI-TDS based on the quasi-continuous pole shifting – the main idea of which was presented in (Michiels et al., 2002) - to the prescribed positions. The desired positions are obtained by overshoot analysis of the step response for a dominant pair of complex conjugate poles. A controller structure is initially calculated by algebraic controller design in **R***MS*. Note that the maximum number of prescribed poles (including their multiplicities) equals the number of unknown parameters. If the prescribed roots locations can not be reached, the optimizing of an objective function involving the distance of shifting poles to the prescribed ones and the roots dominancy is utilized. The optimization is made via Self-Organizing Migration Algorithm (SOMA), see e.g. (Zelinka, 2004). Matlab m-file environment is utilized for the algorithm implementation and, consequently, results are tested in Simulink on an

The chapter is organized as follows. In Section 2 a brief general description of LTI-TDS is introduced together with the coprime factorization for the **R***MS* ring representation. Basic ideas of algebraic controller design in **R***MS* with a simple control feedback are presented in Section 3. The main and original part of the chapter – pole-placement shifting based tuning algorithm – is described in Section 4. Section 5 focuses SOMA and its utilization when solving the tuning problem. An illustrative benchmark example is presented in

The aim of this section is to present possible models of LTI-TDS; first, that in time domain using functional differential equations, second, the transfer function (matrix) via the Laplace transform. Then, the latter concept is extended so that an algebraic description in a special ring is introduced. Note that for the further purpose of this chapter the state-space

A LTI-TDS system with both input-output and internal (state) delays, which can have point (lumped) or distributed form, can be expressed by a set of functional differential equations

closed-loop system is stable and that other control requirements are satisfied.

tracking and disturbance rejection.

attractive example of unstable SISO LTI-TDS.

Section 6.

**2. Description of LTI-TDS** 

functional description is useless.

**2.1 State-space model** 

This contribution is concerned with retarded delayed systems in the input-output formulation governed by the Laplace transfer function matrix (considering zero initial conditions) as in (3). Hence, in the SISO case (we are concerning about here), the transfer function is no longer rational, as for conventional delayless systems, and a meromorphic function as a ratio of retarded quasipolynomials (RQ) is obtained instead.

$$\begin{aligned} \mathbf{Y}(s) &= \mathbf{G}(s)\mathbf{U}(s) = \frac{\Gamma\_{1}\Gamma\_{2}}{\Delta}\mathbf{U}(s) \\ \Delta &= \det\left[s\mathbf{I} - \mathbf{A}\_{0} - \sum\_{i=1}^{N\_{d}+1} \mathbf{A}\_{i} \exp\left(-s\eta\_{i}\right) - \int\_{0}^{L} \mathbf{A}(\tau) \exp\left(-s\tau\right) \mathbf{d}\tau\right] \\ \Gamma\_{1} &= \mathbf{C}\mathbf{a}\mathbf{d}\big[s\mathbf{I} - \mathbf{A}\_{0} - \sum\_{i=1}^{N\_{d}+1} \mathbf{A}\_{i} \exp\left(-s\eta\_{i}\right) - \int\_{0}^{L} \mathbf{A}(\tau) \exp\left(-s\tau\right) \mathbf{d}\tau\Big] \\ \Gamma\_{2} &= \mathbf{B}\_{0} + \sum\_{i=1}^{N\_{d}+1} \mathbf{B}\_{i} \exp\left(-s\eta\_{i}\right) + \int\_{0}^{L} \mathbf{B}(\tau) \exp\left(-s\tau\right) \mathbf{d}\tau \end{aligned} \tag{3}$$

A (retarded or neutral) quasipolynomial of degree *n* has the generic form

$$\log(s) = s^n + \sum\_{i=0}^n \sum\_{j=1}^h \mathbf{x}\_{ij} s^i \exp\left(-\vartheta\_{ij} s\right), \vartheta\_{ij} \ge 0 \tag{4}$$

Implementation of a New Quasi-Optimal Controller Tuning Algorithm for Time-Delay Systems 7

where *As Bs* () () , ∈**R***MS* are coprime, i.e. there does not exist a non-trivial (non-unit) common factor of both elements. Note that a system of neutral type can induce problem since there can exist a coprime pair *As Bs* () () , which is not, however, Bézout coprime – which implies that the system can not be stabilized by any feedback controller admitting the

This section outlines controller design based on the algebraic approach in the **R***MS* ring satisfying the inner Hurwitz (Bounded Input Bounded Output - BIBO) stability of the closed

For algebraic controller design in **R***MS* it is initially supposed that not only the plant is expressed by the transfer function over **R***MS* but a controller and all system signals are over the ring. As a control system, the common negative feedback loop as in Fig. 1 is chosen for the simplicity, where *W s*( ) is the Laplace transform of the reference signal, *D s*( ) stands for that of the load disturbance, *E s*( ) is transformed control error, *U s* <sup>0</sup> ( ) expresses the controller output (control action), *U s*( ) represents the plant input, and *Y s*( ) is the plant output controlled signal in the Laplace transform. The plant transfer function is depicted

loop, controller feasibility, reference tracking and disturbance rejection.

( ) ( )

*W s Ds*

The following basic transfer functions can be derived in the control system in general

,

*Ys BsQs Ys BsPs G s G s*

= = = =

,

*Es AsPs Es BsPs G s G s Ws Ms Ds Ms*

= = = =−

() ()

() ()

( ) ( ) ( ) ( ) , *W D W D H s Hs*

( ) ( ) ( )

*Ws Ms Ds Ms*

( ) ( ) ( )

*F s Fs* = = (11)

() () ( )

> () () ( )

(12)

( )

( )

Laplace transform, see details in (Loiseau et al., 2002).

as *G s*( ) , and *G s <sup>R</sup>* ( ) stands for a controller in the scheme.

**3. Controller design in RMS** 

Fig. 1. Simple control feedback loop

where

Control system external inputs have forms

where *H s <sup>W</sup>* ( ) , *H s <sup>D</sup>* ( ) , *F s <sup>W</sup>* ( ) , *F s <sup>D</sup>* ( ) ∈ **R***MS*.

( ) ( )

( ) ( )

( )

*WY DY*

*WE DE*

( )

where 0 *nj x* ≠ in the neutral case for some *j*, whereas a RQ owns 0 *nj x* = for all *j*.

However, the transfer function representation in the form of a ratio of two quasipolynomials is not suitable in order to satisfy controller feasibility, causality and closed-loop (Hurwitz) stability (Loiseau 2000; Zítek & Kučera, 2003). Rather more general approaches utilize a field of fractions where a transfer function is expressed as a ratio of two coprime elements of a suitable ring. A ring is a set closed for addition and multiplication, with a unit element for addition and multiplication and an inverse element for addition. This implies that division is not generally allowed.

#### **2.3 Plant description in RMS ring**

A powerful algebraic tool ensuring requirements above is a ring of stable and proper RQmeromorphic functions (**R***MS*). Since the original definition of **R***MS* in (Zítek & Kučera, 2003) does not constitute a ring, some minor changes in the definition was made in (Pekař & Prokop, 2009). Namely, although the retarded structure of TDS is considered only, the minimal ring conditions require the use of neutral quasipolynomials at least in the numerator as well.

An element *T s*( )∈**R***MS* is represented by a proper ratio of two quasipolynomials

$$T\left(s\right) = \frac{y\left(s\right)}{x\left(s\right)}\tag{5}$$

where a denominator *x s*( ) is a quasipolynomial of degree *n* and a numerator can be factorized as

$$y(s) = \tilde{y}(s) \exp(-\tau s) \tag{6}$$

where *y*( )*s* is a quasipolynomial of degree *l* and τ ≥ 0. *T s*( ) is stable, which means that there is no pole *s*0 such that Re 0 {*s*0} ≥ ; in other words, all roots of *x s*( ) with Re 0 {*s*0} ≥ are those of *y*( )*s* . Moreover, the ratio is proper, i.e. *l* ≤ *n*.

Thus, *T s*( ) is analytic and bounded in the open right half-plane, i.e.

$$\sup\_{s \in \text{Re}\{s\} \ge 0} \left| T(s) \right| < \infty \tag{7}$$

As mentioned above, in this contribution only retarded systems are considered, i.e. *x s*( ) , *y*( )*s* are RQs. Let the plant be initially described as

$$G(s) = \frac{b(s)}{a(s)}\tag{8}$$

where *a s*( ) , *b s*( ) are RQs. Hence, using a coprime factorization, a plant model has the form

$$G(s) = \frac{B(s)}{A(s)}\tag{10}$$

where *As Bs* () () , ∈**R***MS* are coprime, i.e. there does not exist a non-trivial (non-unit) common factor of both elements. Note that a system of neutral type can induce problem since there can exist a coprime pair *As Bs* () () , which is not, however, Bézout coprime – which implies that the system can not be stabilized by any feedback controller admitting the Laplace transform, see details in (Loiseau et al., 2002).

#### **3. Controller design in RMS**

6 MATLAB for Engineers – Applications in Control, Electrical Engineering, IT and Robotics

However, the transfer function representation in the form of a ratio of two quasipolynomials is not suitable in order to satisfy controller feasibility, causality and closed-loop (Hurwitz) stability (Loiseau 2000; Zítek & Kučera, 2003). Rather more general approaches utilize a field of fractions where a transfer function is expressed as a ratio of two coprime elements of a suitable ring. A ring is a set closed for addition and multiplication, with a unit element for addition and multiplication and an inverse element for addition. This implies that division

A powerful algebraic tool ensuring requirements above is a ring of stable and proper RQmeromorphic functions (**R***MS*). Since the original definition of **R***MS* in (Zítek & Kučera, 2003) does not constitute a ring, some minor changes in the definition was made in (Pekař & Prokop, 2009). Namely, although the retarded structure of TDS is considered only, the minimal ring conditions require the use of neutral quasipolynomials at least in the

> ( ) ( ) ( ) *y s*

where a denominator *x s*( ) is a quasipolynomial of degree *n* and a numerator can be

*y* () () ( ) *s ys s* = − exp

there is no pole *s*0 such that Re 0 {*s*0} ≥ ; in other words, all roots of *x s*( ) with Re 0 {*s*0} ≥ are

( )

*T s* ≥

As mentioned above, in this contribution only retarded systems are considered, i.e. *x s*( ) ,

( ) ( ) ( ) *b s*

where *a s*( ) , *b s*( ) are RQs. Hence, using a coprime factorization, a plant model has the form

( ) ( ) ( ) *B s*

{ }

*G s*

*G s*

Re 0 sup *s*

τ

τ

An element *T s*( )∈**R***MS* is represented by a proper ratio of two quasipolynomials

*T s*

exp , 0

= + − ≥ (4)

*x s* <sup>=</sup> (5)

(6)

≥ 0. *T s*( ) is stable, which means that

< ∞ (7)

*a s* <sup>=</sup> (8)

*A s* <sup>=</sup> (10)

ϑ ϑ

*ij ij ij*

( ) ( ) 0 1

*n h n i*

*i j qs s xs s*

where 0 *nj x* ≠ in the neutral case for some *j*, whereas a RQ owns 0 *nj x* = for all *j*.

is not generally allowed.

numerator as well.

factorized as

**2.3 Plant description in RMS ring** 

where *y*( )*s* is a quasipolynomial of degree *l* and

those of *y*( )*s* . Moreover, the ratio is proper, i.e. *l* ≤ *n*.

*y*( )*s* are RQs. Let the plant be initially described as

Thus, *T s*( ) is analytic and bounded in the open right half-plane, i.e.

= =

This section outlines controller design based on the algebraic approach in the **R***MS* ring satisfying the inner Hurwitz (Bounded Input Bounded Output - BIBO) stability of the closed loop, controller feasibility, reference tracking and disturbance rejection.

For algebraic controller design in **R***MS* it is initially supposed that not only the plant is expressed by the transfer function over **R***MS* but a controller and all system signals are over the ring. As a control system, the common negative feedback loop as in Fig. 1 is chosen for the simplicity, where *W s*( ) is the Laplace transform of the reference signal, *D s*( ) stands for that of the load disturbance, *E s*( ) is transformed control error, *U s* <sup>0</sup> ( ) expresses the controller output (control action), *U s*( ) represents the plant input, and *Y s*( ) is the plant output controlled signal in the Laplace transform. The plant transfer function is depicted as *G s*( ) , and *G s <sup>R</sup>* ( ) stands for a controller in the scheme.

#### Fig. 1. Simple control feedback loop

Control system external inputs have forms

$$\mathcal{W}(s) = \frac{H\_W(s)}{F\_W(s)}, \; D(s) = \frac{H\_D(s)}{F\_D(s)} \tag{11}$$

where *H s <sup>W</sup>* ( ) , *H s <sup>D</sup>* ( ) , *F s <sup>W</sup>* ( ) , *F s <sup>D</sup>* ( ) ∈ **R***MS*.

The following basic transfer functions can be derived in the control system in general

$$\begin{aligned} G\_{\mathbb{W}Y} \left( s \right) &= \frac{Y(s)}{\mathbb{W}(s)} = \frac{B(s)Q(s)}{M(s)}, \; G\_{\mathbb{D}Y} \left( s \right) = \frac{Y(s)}{D(s)} = \frac{B(s)P(s)}{M(s)}\\ G\_{\mathbb{W}E} \left( s \right) &= \frac{E(s)}{\mathbb{W}(s)} = \frac{A(s)P(s)}{M(s)}, \; G\_{\mathbb{D}E} \left( s \right) = \frac{E(s)}{D(s)} = -\frac{B(s)P(s)}{M(s)} \end{aligned} \tag{12}$$

where

$$G\_{\mathcal{R}}\left(s\right) = \frac{Q(s)}{P(s)}\tag{13}$$

Implementation of a New Quasi-Optimal Controller Tuning Algorithm for Time-Delay Systems 9

has any common unstable zero with *F s <sup>W</sup>* ( ) , one has to set all unstable zeros of *F s <sup>D</sup>* ( ) and *F s <sup>W</sup>* ( ) (with corresponding multiplicities) as zeros of *P s*( ) . Note that zeros mean zero points of a whole term in **R***MS* , not only of a quasipolynomial numerator. Unstable zeros

In this crucial section, the idea of a new pole-placement shifting based controller tuning algorithm (PPSA) is presented. Although some steps of PPSA are taken over some existing pole-shifting algorithms, the idea of connection with pole placement and the SOMA

We first give an overview of all steps of PPSA and, consequently, describe each in more details. The procedure starts with controller design in **R***MS* introduced in the previous

2. Choose a simple model of a stable LTI system in the form of the transfer function *G s WY m*, ( ) with a numerator of degree *nnum* and the denominator of degree *nden* . Calculate step response maximum overshoots of the model for a suitable range of its *nnum* zeros and *nden* poles (including their multiplicities). If *n n num num* ≤ and *n n den den* ≤ , respectively, are numbers of all real zeros (poles) and pairs of complex conjugate zeros

4. Shift the rightmost (or the nearest) zeros and poles to the prescribed locations successively. If the number of currently shifted poles and conjugate pairs *n nl den s* ≤ ≤*<sup>p</sup> den* is higher then *nden* , try to move the rest of dominant (rightmost) poles

5. If all prescribed poles and zeros are dominant, the procedure is finished. Otherwise, select a suitable cost function reflecting the distance of dominant poles (zeros) from prescribed positions and distances of spectral abscissas of both, prescribed and

Algebraic controller design in the **R***MS* ring introduced in Section 3 results in a controller owning the transfer function *G s <sup>R</sup>* ( ) containing a finite number of unknown (free, selectable) parameters. The task of PPSA is to set these parameters so that the possibly infinite spectrum of the closed loop has dominant (rightmost) poles located in (or near by) the prescribed positions. If possibly, one can prescribe and place dominant zeros as well. Note

*den l* , respectively, be numbers of unknown (free, selectable) real parameters of the

*num* and

1. Calculate the closed-loop reference-to-output transfer function *G s WY* ( ) . Let *l*

(poles) of the model, it must hold that *n l num num* ≤ and *n l den den* ≤ , respectively. 3. Prescribe all poles and zeros of the model with respect to calculated maximum overshoots (and maximal overshoot times). If the poles and zeros are dominant (i.e. the

rightmost), the procedure is finished. Otherwise do following steps.

to the left. The same rule holds for shifted zeros, analogously.

**4.2 Characteristic quasipolynomial and characteristic entire function** 

numerator and denominator, respectively. Sign *num den ll l* = + .

**4. Pole-placement shifting based controller tuning algorithm** 

agrees with those with Re 0 {*s*} ≥ .

optimization is original.

**4.1 Overview of PSSA** 

section. The next steps are as follows:

dominant poles (zeros).

6. Minimize the cost function, e.g. via SOMA.

Now look at these steps of the algorithm at great length.

$$M(s) = A(s)P(s) + B(s)Q(s) \tag{14}$$

and *Q s*( ) , *P s*( ) are from **R***MS* and the fraction (13) is (Bézout) coprime (or relatively prime). The numerator of *M*( )*s* ∈ **R***MS* agrees to the characteristic quasipolynomial of the closed loop.

Following subsections describes briefly how to provide the basic control requirements.

#### **3.1 Stabilization**

According to e.g. (Kučera, 1993; Zítek & Kučera, 2003), the closed-loop system is stable if and only if there exists a pair *Ps Qs* () () , ∈**R***MS* satisfying the Bézout identity

$$A\left(s\right)P(s) + B\left(s\right)Q(s) = 1\tag{15}$$

a particular stabilizing solution of which, *PsQs* 0 0 () () , , can be then parameterized as

$$\begin{aligned} P(s) &= P\_0(s) \pm B(s) T(s) \\ Q(s) &= Q\_0(s) \mp A(s) T(s), \; T(s) \in \mathbf{R}\_{MS} \end{aligned} \tag{16}$$

Parameterization (16) is used to satisfy remaining control and performance requirements.

#### **3.2 Reference tracking and disturbance rejection**

The question is how to select *T s*( )∈**R***MS* in (16) so that tasks of reference tracking and disturbance rejection are accomplished. The key lies in the form of *G s WE* ( ) and *G s DY* ( ) in (12). Consider the limits

$$\begin{aligned} \lim\_{t \to \infty} y\_D(t) &= \lim\_{s \to 0} s \, Y\_D(s) = \lim\_{s \to 0} s \, \mathrm{G}\_{DY}(s) D(s) \\ &= \lim\_{s \to 0} s \, \mathrm{sB}(s) P(s) \frac{H\_D(s)}{F\_D(s)} \end{aligned} \tag{17}$$

$$\begin{aligned} \lim\_{t \to \!\!\!-} \varepsilon\_{\mathcal{W}} \left( t \right) &= \lim\_{s \to 0} s E\_{\mathcal{W}} \left( s \right) = \lim\_{s \to 0} s G\_{\mathcal{W} \to} \left( s \right) \mathcal{W} \left( s \right) \\ &= \lim\_{s \to 0} s A \left( s \right) P \left( s \right) \frac{H\_{\mathcal{W}} \left( s \right)}{F\_{\mathcal{W}} \left( s \right)} \end{aligned} \tag{18}$$

where ⋅ *<sup>D</sup>* means that the output is influenced only by the disturbance, and symbol ⋅ *W* expresses that the signal is a response to the reference. Limit (17) is zero if lim*s D* <sup>→</sup>0*Y s*( ) < ∞ and *Y s <sup>D</sup>* ( ) is analytic in the open right half-plane. Moreover, for the feasibility of *yD* ( )*t* , *Y s <sup>D</sup>* ( ) must be proper. This implies that the disturbance is asymptotically rejected if *Y s <sup>D</sup>* ( ) ∈ **R***MS*. Similarly, the reference is tracked if *E s <sup>W</sup>* ( ) ∈ **R***MS* .

In other words, *F s <sup>D</sup>* ( ) must divide the product *BsPs* () () in **R***MS* , and *A*() () *sPs* must be divisible by *F s <sup>W</sup>* ( ) in **R***MS* . Details about divisibility in **R***MS* can be found e.g. in (Pekař & Prokop, 2009). Thus, if neither *B s*( ) has any common unstable zero with *F s <sup>D</sup>* ( ) nor *A*( )*s*

has any common unstable zero with *F s <sup>W</sup>* ( ) , one has to set all unstable zeros of *F s <sup>D</sup>* ( ) and *F s <sup>W</sup>* ( ) (with corresponding multiplicities) as zeros of *P s*( ) . Note that zeros mean zero points of a whole term in **R***MS* , not only of a quasipolynomial numerator. Unstable zeros agrees with those with Re 0 {*s*} ≥ .

#### **4. Pole-placement shifting based controller tuning algorithm**

In this crucial section, the idea of a new pole-placement shifting based controller tuning algorithm (PPSA) is presented. Although some steps of PPSA are taken over some existing pole-shifting algorithms, the idea of connection with pole placement and the SOMA optimization is original.

#### **4.1 Overview of PSSA**

8 MATLAB for Engineers – Applications in Control, Electrical Engineering, IT and Robotics

( ) ( ) ( ) *<sup>R</sup> Q s G s*

and *Q s*( ) , *P s*( ) are from **R***MS* and the fraction (13) is (Bézout) coprime (or relatively prime). The numerator of *M*( )*s* ∈ **R***MS* agrees to the characteristic quasipolynomial of the closed

According to e.g. (Kučera, 1993; Zítek & Kučera, 2003), the closed-loop system is stable if

Following subsections describes briefly how to provide the basic control requirements.

a particular stabilizing solution of which, *PsQs* 0 0 () () , , can be then parameterized as

() () () () ()

Parameterization (16) is used to satisfy remaining control and performance requirements.

The question is how to select *T s*( )∈**R***MS* in (16) so that tasks of reference tracking and disturbance rejection are accomplished. The key lies in the form of *G s WE* ( ) and *G s DY* ( ) in

*Qs Q s AsT s T s*

0

0

→∞ → →

*t D s D s DY*

*t W s W s WE*

= =

= =

lim lim lim

lim

lim lim lim

lim

*Y s <sup>D</sup>* ( ) ∈ **R***MS*. Similarly, the reference is tracked if *E s <sup>W</sup>* ( ) ∈ **R***MS* .

*s*

→

*s*

→

→∞ → →

<sup>0</sup> , *MS*

( ) ( ) () () () () ( )

( ) ( ) () () () () ( )

0 0

*e t sE s sG s W s*

*<sup>D</sup>* means that the output is influenced only by the disturbance, and symbol ⋅

0 0

*y t sY s sG s D s*

*sB s P s*

*sA s P s*

expresses that the signal is a response to the reference. Limit (17) is zero if lim*s D* <sup>→</sup>0*Y s*( ) < ∞ and *Y s <sup>D</sup>* ( ) is analytic in the open right half-plane. Moreover, for the feasibility of *yD* ( )*t* , *Y s <sup>D</sup>* ( ) must be proper. This implies that the disturbance is asymptotically rejected if

In other words, *F s <sup>D</sup>* ( ) must divide the product *BsPs* () () in **R***MS* , and *A*() () *sPs* must be divisible by *F s <sup>W</sup>* ( ) in **R***MS* . Details about divisibility in **R***MS* can be found e.g. in (Pekař & Prokop, 2009). Thus, if neither *B s*( ) has any common unstable zero with *F s <sup>D</sup>* ( ) nor *A*( )*s*

( )

( )

*D*

*F s*

*W*

*H s*

*F s*

*W*

*H s*

*D*

() () () ()

*Ps P s BsT s*

0

**3.2 Reference tracking and disturbance rejection** 

= ±

and only if there exists a pair *Ps Qs* () () , ∈**R***MS* satisfying the Bézout identity

loop.

**3.1 Stabilization** 

(12). Consider the limits

where ⋅

*P s* <sup>=</sup> (13)

*M*() () () () () *s AsPs BsQs* = + (14)

*AsPs BsQs* () () () () + = 1 (15)

= ∈ **<sup>R</sup>** (16)

= (17)

= (18)

*W*

We first give an overview of all steps of PPSA and, consequently, describe each in more details. The procedure starts with controller design in **R***MS* introduced in the previous section. The next steps are as follows:


Now look at these steps of the algorithm at great length.

#### **4.2 Characteristic quasipolynomial and characteristic entire function**

Algebraic controller design in the **R***MS* ring introduced in Section 3 results in a controller owning the transfer function *G s <sup>R</sup>* ( ) containing a finite number of unknown (free, selectable) parameters. The task of PPSA is to set these parameters so that the possibly infinite spectrum of the closed loop has dominant (rightmost) poles located in (or near by) the prescribed positions. If possibly, one can prescribe and place dominant zeros as well. Note

Implementation of a New Quasi-Optimal Controller Tuning Algorithm for Time-Delay Systems 11

1 *<sup>O</sup>* arccos

ω

π

, ,max

*WY m*

One can further calculate the step response function *h t WY m*, ( ) as

1

*s*

Define now the maximum relative overshoot as

Using definition (26) one can obtain

, ,max

*WY m* exp

*h t*

α

*t*

< < 0, 0 *z* , the maximum overshoot occurs at time

when considering arccos 0, ( ) *x* ∈[

1

see Fig. 2.

α

( )

α

<sup>−</sup> = ±

( ) () () ( )

<sup>−</sup> = −−

2 1 1 , 1 2 1

αω

*ht h <sup>h</sup>*

Fig. 2. Reference-to-output step response characteristics and the maximum overshoot

ωω

− +− Δ =

( ) ( ) ( ) ( )

1

*z*

cos sin

 α

ω

*z tz s t*

1 1 1

2

 ω

max

(27)

*t t*

=

*WY m* exp cos sin *<sup>k</sup> z s h t tz t t z*

*z* α

− +

1 2 2 1

 ω

] . Obviously, (23) has infinitely many solutions. If

2

α

( ) ( ) ( ) , max ,

− ∞ Δ = ∞ (26)

, : *WY m WY m*

*WY m*

*h*

ω

*t t* max = min( ) *<sup>O</sup>* (24)

 ω

(23)

(25)

*z*

that controller design in **R***MS* using the feedback system as in Fig. 1 results in infinite spectrum of the feedback if the controlled plant is unstable.

If the (quasi)polynomial numerator and denominator of *G s*( ) have no common roots in the open right-half plane, the closed-loop spectrum is given entirely by roots of the numerator *m s*( ) of *M*( )*s* , the so called characteristic quasipolynomial. In the case of distributed delays, *G s*( ) has some common roots with Re 0 {*s*} ≥ in both, the numerator and denominator, and these roots do not affect the system dynamics since they cancel each other. In this case, the spectrum is given by zeros of the entire function *ms m s* () () / *<sup>U</sup>* , i.e. the characteristic entire function, where *m s <sup>U</sup>* ( ) is a (quasi)polynomial the only roots of which are the common unstable roots.

The (quasi)polynomial denominator of *G s WY* ( ) agrees with *m s*( ) . Its role is much more important than the role of the numerator of *G s WY* ( ) since the closed-loop zeros does not influence the stability. In the light of this fact, the setting of closed-loop poles has the priority. Therefore, one has to set *den l* free denominator parameters first. Free (selectable) parameters in the numerator of *G s WY* ( ) are to be set only if there exist those which are not contained in the denominator. The number of such "additional" parameters is *lnum* .

#### **4.3 Closed-loop model and step response overshoots**

The task now is how to prescribe the closed-loop poles appropriately. We choose a simple finite-dimensional model of the reference-to-output transfer function and find its maximum overshoots and overshoot times for a suitable range of the model poles.

Let the prescribed (desired) closed-loop model be of the transfer function

$$G\_{\rm WY,m}(s) = k\_1 \frac{b\_1 s + b\_0}{s^2 + a\_1 s + a\_0} = k\_2 \frac{s - z\_1}{(s - s\_1)(s - \overline{s}\_1)} \tag{19}$$

where 121010 *kkbbaa* ,,,,, ∈ are model parameters 1*z* ∈ - stands for a model zero and <sup>1</sup>*s* ∈ - is a model stable pole where 1*s* expresses its complex conjugate. To obtain the unit static gain of *G s WY m*, ( ) it must hold true

$$k\_1 = \frac{a\_0}{b\_0}, k\_2 = -\frac{\left|\mathbf{s}\_1\right|^2}{z\_1} \tag{20}$$

Sign 1*s* =+ < ≥ α ωα ω j, 0, 0 and calculate the impulse function *g t WY m*, ( ) of *G s WY m*, ( ) using the Matlab function *ilaplace* as

$$\mathcal{G}\_{\rm NY,m}(t) = k\_2 \exp(\alpha t) \left[ \cos(\alpha t) - \frac{z\_1 - \alpha}{\alpha} \sin(\alpha t) \right] \tag{21}$$

Since *i th t WY m WY m* , , () () = ′ , where *h t WY m*, ( ) is the step response function, the necessary condition for the existence of a step response overshoot at time *tO* is

$$\dot{\mathbf{u}}\_{\rm MVY,m} \left( \mathbf{t}\_{\rm O} \right) = \mathbf{0}, \mathbf{t}\_{\rm O} > \mathbf{0} \tag{22}$$

The condition (22) yields these two solutions: either *tO* → −∞ (which is trivial) or

$$t\_O = \frac{1}{\alpha \nu} \arccos\left(\pm \frac{\left|\alpha - z\_1\right|}{\sqrt{\left(\alpha - z\_1\right)^2 + \alpha^2}}\right) \tag{23}$$

when considering arccos 0, ( ) *x* ∈[ π ] . Obviously, (23) has infinitely many solutions. If 1 α< < 0, 0 *z* , the maximum overshoot occurs at time

$$t\_{\text{max}} = \min \left( t\_{\text{O}} \right) \tag{24}$$

One can further calculate the step response function *h t WY m*, ( ) as

$$h\_{\rm PV,m}(t) = \frac{k\_2}{\left|\mathbf{s}\_1\right|^2} \left[ \exp(\alpha t) \left( z\_1 \cos(\alpha t) - \frac{z\_1 \alpha - \left|\mathbf{s}\_1\right|^2}{\alpha} \sin(\alpha t) \right) - z\_1 \right] \tag{25}$$

Define now the maximum relative overshoot as

$$\Delta h\_{\rm{VVY},m,\rm{max}} \coloneqq \frac{h\_{\rm{VVY},m} \left(t\_{\rm{max}}\right) - h\_{\rm{VVY},m} \left(\rightsquigarrow\right)}{h\_{\rm{VVY},m} \left(\rightsquigarrow\right)}\tag{26}$$

see Fig. 2.

10 MATLAB for Engineers – Applications in Control, Electrical Engineering, IT and Robotics

that controller design in **R***MS* using the feedback system as in Fig. 1 results in infinite

If the (quasi)polynomial numerator and denominator of *G s*( ) have no common roots in the open right-half plane, the closed-loop spectrum is given entirely by roots of the numerator *m s*( ) of *M*( )*s* , the so called characteristic quasipolynomial. In the case of distributed delays, *G s*( ) has some common roots with Re 0 {*s*} ≥ in both, the numerator and denominator, and these roots do not affect the system dynamics since they cancel each other. In this case, the spectrum is given by zeros of the entire function *ms m s* () () / *<sup>U</sup>* , i.e. the characteristic entire function, where *m s <sup>U</sup>* ( ) is a (quasi)polynomial the only roots of which

The (quasi)polynomial denominator of *G s WY* ( ) agrees with *m s*( ) . Its role is much more important than the role of the numerator of *G s WY* ( ) since the closed-loop zeros does not influence the stability. In the light of this fact, the setting of closed-loop poles has the priority. Therefore, one has to set *den l* free denominator parameters first. Free (selectable) parameters in the numerator of *G s WY* ( ) are to be set only if there exist those which are not

The task now is how to prescribe the closed-loop poles appropriately. We choose a simple finite-dimensional model of the reference-to-output transfer function and find its maximum

> ( ) ( )( ) 1 0 1

where 121010 *kkbbaa* ,,,,, ∈ are model parameters 1*z* ∈ - stands for a model zero and <sup>1</sup>*s* ∈ - is a model stable pole where 1*s* expresses its complex conjugate. To obtain the unit

0 1

0 1

() ( ) ( ) ( ) <sup>1</sup> , 2 *WY m* exp cos sin *<sup>z</sup> g tk t t <sup>t</sup>*

<sup>−</sup> = −

αω

Since *i th t WY m WY m* , , () () = ′ , where *h t WY m*, ( ) is the step response function, the necessary

The condition (22) yields these two solutions: either *tO* → −∞ (which is trivial) or

condition for the existence of a step response overshoot at time *tO* is

*s as a ss ss*

1 0 1 1

2

j, 0, 0 and calculate the impulse function *g t WY m*, ( ) of *G s WY m*, ( ) using

α

ω

<sup>+</sup> <sup>−</sup> = = + + − − (19)

*b z* = =− (20)

 ω

*it t WY m O O* , ( ) = > 0, 0 (22)

(21)

contained in the denominator. The number of such "additional" parameters is *lnum* .

,1 2 2

*bs b s z G sk <sup>k</sup>*

1 2

, *<sup>a</sup> <sup>s</sup> k k*

spectrum of the feedback if the controlled plant is unstable.

**4.3 Closed-loop model and step response overshoots** 

*WY m*

static gain of *G s WY m*, ( ) it must hold true

 ω

Sign 1*s* =+ < ≥ α ωα

the Matlab function *ilaplace* as

overshoots and overshoot times for a suitable range of the model poles. Let the prescribed (desired) closed-loop model be of the transfer function

are the common unstable roots.

Fig. 2. Reference-to-output step response characteristics and the maximum overshoot Using definition (26) one can obtain

$$\Delta h\_{\rm PV,m,max} = \exp\left(\alpha t\right) \left(\frac{-z\_1 \alpha \cos\left(\alpha t\right) + \left(z\_1 \alpha - \left|s\_1\right|^2\right) \sin\left(\alpha t\right)}{z\_1 \alpha}\right) \tag{27}$$

Obviously, *WY m*, ,max Δ*h* is a function of three parameters, i.e. 1 *n* , , α ω , which is not suitable for a general formulation of the maximal overshoot. Hence, let us introduce new parameters , α *z* ξ ξas

$$
\xi\_{\alpha} = -\frac{\alpha}{\alpha}, \,\xi\_{z} = -\frac{z\_{1}}{\alpha} \tag{28}
$$

Implementation of a New Quasi-Optimal Controller Tuning Algorithm for Time-Delay Systems 13

(a) and normalized maximal overshoot

(a) and normalized maximal overshoot

(a) and normalized maximal overshoot

α

ξ

α

ξ

*<sup>z</sup>* = {0.2,0.4,0.6,0.8,1} .

ξ ξ

Δ

= [2,10],

α

ξ

*<sup>z</sup>* = {2,3,4,5,10} .

ξ ξ

Δ

= [2,10],

*<sup>z</sup>* = {2,3,4,5,10} .

ξ ξ

Δ

= [0.1,2],

Fig. 4. Maximum overshoots *WY m*, ,max ( ) , *<sup>z</sup> h*

Fig. 5. Maximum overshoots *WY m*, ,max ( ) , *<sup>z</sup> h*

Fig. 6. Maximum overshoots *WY m*, ,max ( ) , *<sup>z</sup> h*

(b) for

ξα

(b) for

ξα

(b) for

ξα

times max, ( ) , *norm z t*

times max, ( ) , *norm z t*

times max, ( ) , *norm z t*

α ξ ξ

α ξ ξ

α ξ ξ

which give rise from (23), (24) and (27) to

$$\begin{split} \Delta h\_{\text{VV},m,\text{max}} &= \frac{1}{\tilde{\xi}\_z} \exp\left(-\tilde{\xi}\_\alpha t\_{\text{max},norm}\right) \left(-\tilde{\xi}\_z \cos\left(t\_{\text{max},norm}\right) + \left(\tilde{\xi}\_\alpha^2 + 1 - \tilde{\xi}\_\alpha \tilde{\xi}\_z\right) \sin\left(t\_{\text{max},norm}\right)\right) \\\ t\_{\text{max},norm} &= \alpha t\_{\text{max}} = \min\left(\arccos\left(\pm \frac{\left|\tilde{\xi}\_\alpha - \tilde{\xi}\_\alpha\right|}{\sqrt{\left(\tilde{\xi}\_\alpha - \tilde{\xi}\_\alpha\right)^2 + 1}}\right)\right) \end{split} \tag{29}$$

where *t*max,*norm* represents the normalized maximal overshoot time.

We can successfully use Matlab to display function *WY m*, ,max ( ) , *<sup>z</sup> h* α Δ ξ ξ and max, ( ) , *norm z t* α ξ ξ graphically, for suitable ranges of , α *z* ξ ξ as can be seen from Fig. 3 – Fig. 7. Recall that model (19) gives rise to 1, 2, 1, 1 *n nn n num den num den* == == .

Fig. 3. Maximum overshoots *WY m*, ,max ( ) , *<sup>z</sup> h* α Δ ξ ξ (a) and normalized maximal overshoot times max, ( ) , *norm z t* α ξ ξ (b) for ξα = [0.1,2], ξ*<sup>z</sup>* = {0.2,0.4,0.6,0.8,1} .

for a general formulation of the maximal overshoot. Hence, let us introduce new parameters

 ξ

, ,max max, max, max,

*h tt t*

 ξ

*WY m norm z norm z norm*

exp cos 1 sin

α

ω

( )

α ω

α

ξ

*<sup>z</sup>* = {0.2,0.4,0.6,0.8,1} .

ξ ξ

Δ

= [0.1,2],

ξ ξ

− +

α ω

ξ ξ

<sup>1</sup> , *<sup>z</sup> z*

 ω

1

( )() ( ) ( ) ( )

2

α

ξ

Δ

as can be seen from Fig. 3 – Fig. 7.

α ω

=− =− (28)

 α

 ξξ

α

(a) and normalized maximal overshoot

ξ ξ

, which is not suitable

and max, ( ) , *norm z t*

(29)

α ξ ξ

Obviously, *WY m*, ,max Δ*h* is a function of three parameters, i.e. 1 *n* , ,

which give rise from (23), (24) and (27) to

1

*z*

ξ

ω

graphically, for suitable ranges of ,

 Fig. 3. Maximum overshoots *WY m*, ,max ( ) , *<sup>z</sup> h*

(b) for

ξα

times max, ( ) , *norm z t*

α ξ ξ

*norm*

*t t*

max, max <sup>2</sup>

min arccos

α

ξ

α

ξ

Δ =− − + +−

<sup>−</sup> == ±

where *t*max,*norm* represents the normalized maximal overshoot time. We can successfully use Matlab to display function *WY m*, ,max ( ) , *<sup>z</sup> h*

> α *z* ξ ξ

Recall that model (19) gives rise to 1, 2, 1, 1 *n nn n num den num den* == == .

, α *z* ξ ξas

Fig. 4. Maximum overshoots *WY m*, ,max ( ) , *<sup>z</sup> h* α Δ ξ ξ (a) and normalized maximal overshoot times max, ( ) , *norm z t* α ξ ξ (b) for ξα = [0.1,2], ξ*<sup>z</sup>* = {2,3,4,5,10} .

Fig. 5. Maximum overshoots *WY m*, ,max ( ) , *<sup>z</sup> h* α Δ ξ ξ (a) and normalized maximal overshoot times max, ( ) , *norm z t* α ξ ξ (b) for ξα = [2,10], ξ*<sup>z</sup>* = {0.2,0.4,0.6,0.8,1} .

Fig. 6. Maximum overshoots *WY m*, ,max ( ) , *<sup>z</sup> h* α Δ ξ ξ (a) and normalized maximal overshoot times max, ( ) , *norm z t* α ξ ξ (b) for ξα = [2,10], ξ*<sup>z</sup>* = {2,3,4,5,10} .

Implementation of a New Quasi-Optimal Controller Tuning Algorithm for Time-Delay Systems 15

d d Re ( , ) 0, Im ( , ) 0, 0... 1 d d *i i*

= = <sup>=</sup> == −

Note that if *m s*( ) is nonlinear with respect to **v** , one can solve a set on non-linear algebraic

1

where **v**0 means a point in which the expansion is made or an initial estimation of the

should be solved iteratively, e.g. via the well-known Newton method. Note, furthermore, that the algebraic controller design in **R***MS* for LTI-TDS results in the linear set (30)-(34) with respect to selectable parameters – both, in the numerator and denominator of *G s WY* ( ) . It is clear that a unique solution is obtained only if the set of *n l* = independent equations is given. If *n l* < , equations (30)-(34) can be solved using the Moore-Penrose (pseudo)inverse

*n l* > , it is not possible to place roots exactly and the pseudoinverse provides the

The methodology described in this subsection is utilized on both, the numerator and

Once the poles (zeros) are prescribed, it ought to be checked whether these roots are the rightmost. If yes, the PPSA algorithm stops; if not, one may try to shift poles so that the prescribed ones become dominant. There are two possibilities. First, the dominant roots move to the prescribed ones; second, roots nearest to the prescribed ones are shifted – while the rest of the spectrum (or zeros) is simultaneously pushed to the left. The following

We describe the procedure for the closed-loop denominator and its roots (poles); the numerator is served analogously for all its free parameters which are not included in the denominator. Recall that *den l* is the number of unknown (selectable) parameters, *nden* stands for the number of model (prescribed) poles (including their multiplicities), *nden* represents the number of real poles and conjugate pairs of prescribed poles and *nsp* is the number of

The idea of continuous poles shifting described below was introduced in (Michiels et al., 2002). Similar procedure which, however, enables to shift less number of poles since *n l sp* ≤ *den* includes every single complex pole instead of a conjugate pair, was investigated in (Vyhlídal, 2003). Roughly speaking, the latter is based on solution of (30) - (34) where **v**<sup>0</sup> represents the vector of actual controller parameters, **vv v** = +Δ 0 are new controller

currently shifted real poles and conjugate pairs. Generally, it holds that

 <sup>∂</sup> ≈ +Δ <sup>∂</sup> 

*k*

 σ

> σ

> > 0

**v v v** (34)

*j j s m s*

*<sup>l</sup>* Δ =Δ Δ Δ **v** *vv v* is a vector of parameters increments. Equations (34)

= =

*v*

**<sup>v</sup>** <sup>=</sup> , see (Ben Israel & Greville, 1966). Contrariwise, whenever

**v v** (33)

0

*n nl den s* ≤ ≤*<sup>p</sup> den* (35)

*i*

σ

=

**v v**

*s s m m jp*

0

*ii j*

*mm v*

 σ

(, ) ( ,) ( , )

*j j i i j j*

*s s* σ

σ

σ

equations directly, or to use an expansion

solution and [ ] 1 2 , ,..., *<sup>T</sup>*

minimizing the norm <sup>2</sup>

**4.5 Continuous poles (zeros) shifting** 

describes it in more details.

denominator.

2

1

minimization of squares of the left-hand sides of (30)-(34).

*k i i v* =

Fig. 7. Maximum overshoots *WY m*, ,max ( ) , *<sup>z</sup> h* α Δ ξ ξ (a) and normalized maximal overshoot times max, ( ) , *norm z t* α ξ ξ (b) for ξα = [1,5,4.5] , ξ *<sup>z</sup>* = {2.8,3,3.2,3.4,3.6} - A detailed view on "small" overshoots.

The procedure of searching suitable prescribed poles can be done e.g. as in the following way. A user requires , ,max Δ = *hWY m* 0.03 (i.e. the maximal overshoot equals 3 %), 4 α ξ = (i.e. "the quarter dumping") and max *t* = 5 s. Fig. 7 gives approximately 2.9 *<sup>z</sup>* ξ = which yields max, 1.2 *t norm* ≈ . These two values together with (28) and (29) result in <sup>1</sup>*s* =− + 0.96 0.24j, <sup>1</sup>*z* = −0.7 .

#### **4.4 Direct pole placement**

This subsection extends step 3 of PPSA from Subsection 4.1. The goal is to prescribe poles and zeros of the closed-loop "at once". The drawback here is that the prescribed poles (zeros) might not be dominant (i.e. the rightmost). The procedure was utilized to LTI-TDS e.g. in (Zítek & Hlava, 2001).

Given quasipolynomial *m s*( ) with a vector [ ] 1 2 , ,..., *<sup>T</sup> <sup>l</sup>* **v** = ∈ *vv v <sup>l</sup>* of *l* free parameters, the assignment of *n* prescribed single roots σ *<sup>i</sup>* , *i* = 1...*n*, can be done via the solution of the set of algebraic equations in the form

$$\left[m(\sigma\_i, \mathbf{v})\right]\_{s=\sigma\_i} = 0, \; i = 1...n \tag{30}$$

In the case of complex conjugate poles, one has to take the real and imaginary part separately as

$$\operatorname{Re}\left[\left[m(\sigma\_i, \mathbf{v})\right]\_{s=\sigma\_i}\right] = 0, \operatorname{Im}\left[\left[m(\sigma\_i, \mathbf{v})\right]\_{s=\sigma\_i}\right] = 0\tag{31}$$

for every pair of roots.

If a root σ*<sup>i</sup>* has the multiplicity *p*, it must be calculated

$$\left[\frac{\mathbf{d}^j}{\mathbf{d}s^j}m(\sigma\_i,\mathbf{v})\right]\_{s=\sigma\_i} = 0, \; j = 0 \dots p - 1 \tag{32}$$

$$\operatorname{Re}\left|\frac{\mathbf{d}^j}{\operatorname{ds}^j}m(\sigma\_i,\mathbf{v})\right|\_{s=\sigma\_i} = 0,\\ \operatorname{Im}\left|\frac{\mathbf{d}^j}{\operatorname{ds}^j}m(\sigma\_i,\mathbf{v})\right|\_{s=\sigma\_i} = 0, j = 0...p-1\tag{33}$$

Note that if *m s*( ) is nonlinear with respect to **v** , one can solve a set on non-linear algebraic equations directly, or to use an expansion

$$m(\sigma\_i, \mathbf{v}) = m(\sigma\_i, \mathbf{v}\_0) + \sum\_{j=1}^k \Delta v\_j \left[ \frac{\partial m(\mathbf{s}, \mathbf{v}\_0)}{\partial v\_j} \right]\_{\substack{\mathbf{s} = \sigma\_i \\ \mathbf{v} = \mathbf{v}\_0}} \tag{34}$$

where **v**0 means a point in which the expansion is made or an initial estimation of the solution and [ ] 1 2 , ,..., *<sup>T</sup> <sup>l</sup>* Δ =Δ Δ Δ **v** *vv v* is a vector of parameters increments. Equations (34) should be solved iteratively, e.g. via the well-known Newton method. Note, furthermore, that the algebraic controller design in **R***MS* for LTI-TDS results in the linear set (30)-(34) with respect to selectable parameters – both, in the numerator and denominator of *G s WY* ( ) .

It is clear that a unique solution is obtained only if the set of *n l* = independent equations is given. If *n l* < , equations (30)-(34) can be solved using the Moore-Penrose (pseudo)inverse *k*

minimizing the norm <sup>2</sup> 2 1 *i i v* = **<sup>v</sup>** <sup>=</sup> , see (Ben Israel & Greville, 1966). Contrariwise, whenever

*n l* > , it is not possible to place roots exactly and the pseudoinverse provides the minimization of squares of the left-hand sides of (30)-(34).

The methodology described in this subsection is utilized on both, the numerator and denominator.

#### **4.5 Continuous poles (zeros) shifting**

14 MATLAB for Engineers – Applications in Control, Electrical Engineering, IT and Robotics

ξ

The procedure of searching suitable prescribed poles can be done e.g. as in the following way. A user requires , ,max Δ = *hWY m* 0.03 (i.e. the maximal overshoot equals 3 %), 4

max, 1.2 *t norm* ≈ . These two values together with (28) and (29) result in

This subsection extends step 3 of PPSA from Subsection 4.1. The goal is to prescribe poles and zeros of the closed-loop "at once". The drawback here is that the prescribed poles (zeros) might not be dominant (i.e. the rightmost). The procedure was utilized to LTI-TDS

> [ ( , ) 0, 1... ] *<sup>i</sup> <sup>i</sup> <sup>s</sup> m in* σ

In the case of complex conjugate poles, one has to take the real and imaginary part

Re ( , ) 0,Im ( , ) 0 {[ ] *m m*

*i i* **v v** *s s* = =

<sup>d</sup> ( , ) 0, 0... 1 <sup>d</sup> *<sup>i</sup>*

σ

== −

*s m jp*

=

 σ

*i i*

*<sup>l</sup>* **v** = ∈ *vv v <sup>l</sup>*

(a) and normalized maximal overshoot

ξ

α ξ

= which yields

of *l* free parameters, the

= (i.e.

*<sup>z</sup>* = {2.8,3,3.2,3.4,3.6} - A detailed view on

*<sup>i</sup>* , *i* = 1...*n*, can be done via the solution of the set of

<sup>=</sup> **v** = = (30)

} = = {[ ] } (31)

**v** (32)

 σ

α

ξ ξ

Δ

= [1,5,4.5] ,

"the quarter dumping") and max *t* = 5 s. Fig. 7 gives approximately 2.9 *<sup>z</sup>*

σ

σ

σ

σ

Fig. 7. Maximum overshoots *WY m*, ,max ( ) , *<sup>z</sup> h*

(b) for

ξα

Given quasipolynomial *m s*( ) with a vector [ ] 1 2 , ,..., *<sup>T</sup>*

σ

*<sup>i</sup>* has the multiplicity *p*, it must be calculated

*j i j*

*s*

times max, ( ) , *norm z t*

"small" overshoots.

α ξ ξ

<sup>1</sup>*s* =− + 0.96 0.24j, <sup>1</sup>*z* = −0.7 .

**4.4 Direct pole placement** 

e.g. in (Zítek & Hlava, 2001).

algebraic equations in the form

separately as

If a root

or

for every pair of roots.

σ

assignment of *n* prescribed single roots

Once the poles (zeros) are prescribed, it ought to be checked whether these roots are the rightmost. If yes, the PPSA algorithm stops; if not, one may try to shift poles so that the prescribed ones become dominant. There are two possibilities. First, the dominant roots move to the prescribed ones; second, roots nearest to the prescribed ones are shifted – while the rest of the spectrum (or zeros) is simultaneously pushed to the left. The following describes it in more details.

We describe the procedure for the closed-loop denominator and its roots (poles); the numerator is served analogously for all its free parameters which are not included in the denominator. Recall that *den l* is the number of unknown (selectable) parameters, *nden* stands for the number of model (prescribed) poles (including their multiplicities), *nden* represents the number of real poles and conjugate pairs of prescribed poles and *nsp* is the number of currently shifted real poles and conjugate pairs. Generally, it holds that

$$
\overline{m}\_{den} \le n\_{sp} \le l\_{den} \tag{35}
$$

The idea of continuous poles shifting described below was introduced in (Michiels et al., 2002). Similar procedure which, however, enables to shift less number of poles since *n l sp* ≤ *den* includes every single complex pole instead of a conjugate pair, was investigated in (Vyhlídal, 2003). Roughly speaking, the latter is based on solution of (30) - (34) where **v**<sup>0</sup> represents the vector of actual controller parameters, **vv v** = +Δ 0 are new controller parameters and σ *<sup>i</sup>* means prescribed poles (in the vicinity of the actual ones) here. Now look at the former methodology in more details.

The approach (Michiels et al., 2002) is based on the extrapolation

$$m(\boldsymbol{\sigma}\_{i}, \mathbf{v}) = \underbrace{m(\boldsymbol{\sigma}\_{i}, \mathbf{v}\_{0})}\_{=0} + \Delta \boldsymbol{\sigma}\_{i} \left[\frac{\partial m(\mathbf{s}, \mathbf{v})}{\partial \mathbf{s}}\right]\_{\substack{\mathbf{s} = \boldsymbol{\sigma}\_{i} \\ \mathbf{v} = \mathbf{v}\_{0}}} + \Delta \boldsymbol{\sigma}\_{j} \left[\frac{\partial m(\mathbf{s}, \mathbf{v})}{\partial \boldsymbol{\sigma}\_{j}}\right]\_{\substack{\mathbf{s} = \boldsymbol{\sigma}\_{i} \\ \mathbf{v} = \mathbf{v}\_{0}}} = \mathbf{0}, \ i = 1...n\_{sp'} \text{ } j = 1...l\_{dm} \tag{36}$$

yielding

$$\frac{\Delta\sigma\_{i}}{\Delta\upsilon\_{j}} = -\left[\frac{\partial m(s,\mathbf{v})}{\partial s}\right]\_{\substack{s=\sigma\_{i}\\ \mathbf{v}=\mathbf{v}\_{0}}}^{-1} \left[\frac{\partial m(s,\mathbf{v})}{\partial \upsilon\_{j}}\right]\_{\substack{s=\sigma\_{i}\\ \mathbf{v}=\mathbf{v}\_{0}}}\tag{37}$$

where **v**0 represents the vector of actual controller parameters, σ *<sup>i</sup>* means actual poles and Δσ *<sup>i</sup>* and *<sup>j</sup>* Δ*v* are increments of poles and controller parameters, respectively. In case of a *p*multiple pole, the following term is inserted in (36) and (37) instead of *m s*( )

$$\frac{\text{d}^p}{\text{ds}^p} m(\text{s}) \tag{38}$$

Implementation of a New Quasi-Optimal Controller Tuning Algorithm for Time-Delay Systems 17

The continuous shifting starts with *n n sp* = *den* . Then, one can take the number of *nden* rightmost poles and move them to the prescribed ones. The rightmost closed-loop pole moves to the rightmost prescribed pole etc. Alternatively, the same number of dominant poles (or conjugated pairs) can be considered; however, the nearest poles can be shifted to the prescribed ones. If two or more prescribed poles own the same dominant pole, it is assigned to the rightmost prescribed pole and removed from the list of moved poles. The number *n nl sp* ∈{ *den den* , } is incremented whenever the approaching starts to fail for any pole. If *n n sp* > *den* , the rest of dominant poles is pushed to the left. More precisely, shifting to the

> *p s p s*

 δ

<sup>−</sup> Δ = − (44)

δ= ,

Re

 σ

is, the pole dominancy of is more

 σ

*<sup>p</sup>*,*i* from the nearest ones

 λσ

 σσ

**vv v** = + = −+ − (46)

*R s i p i d i p i*

λ

σ

(45)

*<sup>p</sup>* is a prescribed pole

σ

*s i*, , *dR* ( ) **v**

λ>

σ

σ σ

σ σ

Δ =− σ δ

If *n l sp* = *den* and all prescribed poles become the rightmost (dominant) ones, PPSA is finished.

This step is implemented whenever the exact pole assignment even via shifting fails. In the first part of this subsection we arrange the cost function to be minimized. Then, SOMA algorithm (Zelinka, 2004) belonging to the wide family of evolution algorithms is introduced and briefly described. Again, the procedure is given for the pole-optimization; the zero-

The goal now is to rearrange feedback poles (zeros) so that they are "sufficiently close" to the prescribed ones and, concurrently, they are "as the most dominant as possible". This

> () () () ,, ,, { } 1

 σσ

expresses the sum of distances of dominant poles from the prescribed ones and 0

,1 ,2 , ,1 ,2 , ,1 ,2 , , , *den den den*

 σ

*s s* ≥ ≥≥ ≥ ≥≥ ≥ ≥≥ *sn p p pn d d d n* (47)

*nden*

*i*

=

σ

is a discretization step in the space of poles, e.g. 0.001

Otherwise, do the last step of PPSA introduced in the following subsection.

optimization dealing with the closed-loop numerator is done analogously.

requirement can be satisfied by the minimizing of the following cost function

λ

important in *F*( ) **v** . Recall that (when the dominant poles were moved)

 σσ

Alternatively, one can include both, the zeros and poles, in (46), not separately.

prescribed poles is described by the following formula

*<sup>s</sup>* means a pole moved to the prescribed one.

**5. Minimization of a cost function via SOMA** 

*Fd d* σ

represents a real weighting parameter. The higher

 σ

( ) **v** is the distance of prescribed poles

and pushing to the left agrees with

where δ

**5.1 Cost function** 

where *d*

σ

σσ

and σ

However, (38) can be used only if the pole including all multiplicities is moved. If, on the other hand, the intention is to shift a part of poles within the multiplicity to the one location and the rest of the multiplicity to another (or other) location(s), it is better to consider a multiple pole as a "nest" of close single poles. Then a matrix

$$\mathbf{S} = \left[\frac{\Delta \sigma\_i}{\Delta v\_j}\right] \in \mathbb{R} \mid \mathbf{n}\_{sp} \mathbf{x} l\_{den} \tag{39}$$

is called the sensitivity matrix satisfying

$$
\Delta \mathbf{v} = \mathbf{S}^+ \Delta \mathbf{o} \tag{40}
$$

where 1 2 , ,..., *sp T* σσ σ *<sup>n</sup>* Δ =Δ Δ Δ **<sup>σ</sup>** and <sup>+</sup> **<sup>S</sup>** means the pseudoinverse. It holds that

$$\frac{\Delta \text{Re}\{\sigma\_i\}}{\Delta v\_j} = \text{Re}\left\{\frac{\Delta \sigma\_i}{\Delta v\_j}\right\} \tag{41}$$

thus, if poles are shifted in a real axis only, it can be calculated

$$
\Delta \mathbf{v} = \text{Re}\{\mathbf{S}\}^{+} \text{Re}\{\Delta \mathbf{o}\} \tag{42}
$$

Otherwise, the following approximation ought to be used

$$
\Delta \mathbf{v} = \text{Re}\left[\mathbf{S}^+ \Delta \mathbf{o}\right] \tag{43}
$$

The continuous shifting starts with *n n sp* = *den* . Then, one can take the number of *nden* rightmost poles and move them to the prescribed ones. The rightmost closed-loop pole moves to the rightmost prescribed pole etc. Alternatively, the same number of dominant poles (or conjugated pairs) can be considered; however, the nearest poles can be shifted to the prescribed ones. If two or more prescribed poles own the same dominant pole, it is assigned to the rightmost prescribed pole and removed from the list of moved poles. The number *n nl sp* ∈{ *den den* , } is incremented whenever the approaching starts to fail for any pole. If *n n sp* > *den* , the rest of dominant poles is pushed to the left. More precisely, shifting to the prescribed poles is described by the following formula

$$
\Delta \sigma = \frac{\sigma\_p - \sigma\_s}{\left| \sigma\_p - \sigma\_s \right|} \delta \tag{44}
$$

and pushing to the left agrees with

16 MATLAB for Engineers – Applications in Control, Electrical Engineering, IT and Robotics

(, ) (, ) ( ,) ( , ) 0, 1... , 1...

*<sup>s</sup> j j <sup>s</sup> ms ms*

*<sup>i</sup>* and *<sup>j</sup>* Δ*v* are increments of poles and controller parameters, respectively. In case of a *p*-

( ) <sup>d</sup> d *p p m s s*

However, (38) can be used only if the pole including all multiplicities is moved. If, on the other hand, the intention is to shift a part of poles within the multiplicity to the one location and the rest of the multiplicity to another (or other) location(s), it is better to consider a

> *i j v* Δσ = ∈ <sup>Δ</sup>

> > Re{ } Re *<sup>i</sup> <sup>i</sup> j j v v*

Δ

<sup>=</sup> Δ Δ

σ

σ

<sup>Δ</sup> ∂ ∂ ≈ − Δ∂ ∂ **<sup>0</sup> <sup>0</sup>**

*vs v*

 ∂ ∂ ≈ +Δ + Δ == = ∂ ∂ **<sup>0</sup> <sup>0</sup> v v v v**

**v v**

*m s m s m m v i n j l s v* σ

<sup>=</sup> <sup>=</sup> = = <sup>=</sup>

<sup>−</sup>

multiple pole, the following term is inserted in (36) and (37) instead of *m s*( )

*<sup>i</sup>* means prescribed poles (in the vicinity of the actual ones) here. Now

*<sup>i</sup> <sup>i</sup> iii <sup>j</sup> sp den <sup>s</sup> <sup>j</sup> <sup>s</sup>*

*<sup>i</sup> <sup>i</sup>*

<sup>=</sup> <sup>=</sup> <sup>=</sup> <sup>=</sup>

**v v v v**

<sup>1</sup> (, ) (, )

σ

**v v** (36)

σ

σ

**v v** (37)

(38)

*<sup>i</sup>* means actual poles and

σ

**S** *sp den n xl* (39)

<sup>+</sup> Δ= Δ **v S σ** (40)

Re Re {} { } <sup>+</sup> Δ= Δ **v S σ** (42)

Re{ } <sup>+</sup> Δ≈ Δ **v S σ** (43)

(41)

parameters and

yielding

Then a matrix

It holds that

Δσ σ

σσσ

look at the former methodology in more details.

0 0

multiple pole as a "nest" of close single poles.

is called the sensitivity matrix satisfying

where 1 2 , ,..., *sp*

σσ

*<sup>n</sup>* Δ =Δ Δ Δ

The approach (Michiels et al., 2002) is based on the extrapolation

*i*

where **v**0 represents the vector of actual controller parameters,

*T*

thus, if poles are shifted in a real axis only, it can be calculated

Otherwise, the following approximation ought to be used

**<sup>σ</sup>** and <sup>+</sup> **<sup>S</sup>** means the pseudoinverse.

Δ

 σ σ

$$
\Delta \sigma = -\delta \tag{45}
$$

where δ is a discretization step in the space of poles, e.g. 0.001 δ = , σ *<sup>p</sup>* is a prescribed pole and σ*<sup>s</sup>* means a pole moved to the prescribed one.

If *n l sp* = *den* and all prescribed poles become the rightmost (dominant) ones, PPSA is finished. Otherwise, do the last step of PPSA introduced in the following subsection.

#### **5. Minimization of a cost function via SOMA**

This step is implemented whenever the exact pole assignment even via shifting fails. In the first part of this subsection we arrange the cost function to be minimized. Then, SOMA algorithm (Zelinka, 2004) belonging to the wide family of evolution algorithms is introduced and briefly described. Again, the procedure is given for the pole-optimization; the zerooptimization dealing with the closed-loop numerator is done analogously.

#### **5.1 Cost function**

The goal now is to rearrange feedback poles (zeros) so that they are "sufficiently close" to the prescribed ones and, concurrently, they are "as the most dominant as possible". This requirement can be satisfied by the minimizing of the following cost function

$$F(\mathbf{v}) = d\_{\sigma}(\mathbf{v}) + \lambda d\_{R}(\mathbf{v}) = \sum\_{i=1}^{\overline{n}\_{d\mathbf{x}}} \left| \sigma\_{s,i} - \sigma\_{p,i} \right| + \lambda \text{Re} \left\{ \sigma\_{d,i} - \sigma\_{p,i} \right\} \tag{46}$$

where *d*σ ( ) **v** is the distance of prescribed poles σ *<sup>p</sup>*,*i* from the nearest ones σ *s i*, , *dR* ( ) **v** expresses the sum of distances of dominant poles from the prescribed ones and 0 λ > represents a real weighting parameter. The higher λ is, the pole dominancy of is more important in *F*( ) **v** . Recall that (when the dominant poles were moved)

$$
\sigma\_{s,1} \ge \sigma\_{s,2} \ge \dots \ge \sigma\_{s, \overline{\pi}\_{\text{lin}}}, \sigma\_{p,1} \ge \sigma\_{p,2} \ge \dots \ge \sigma\_{p, \overline{\pi}\_{\text{lin}}}, \sigma\_{d,1} \ge \sigma\_{d,2} \ge \dots \ge \sigma\_{d, \overline{\pi}\_{\text{lin}}} \tag{47}
$$

Alternatively, one can include both, the zeros and poles, in (46), not separately.

Poles can be found e.g. by the quasipolynomial mapping root finder (QPMR) implemented in Matlab, see (Vyhlídal & Zítek, 2003). Hence, the aim is to solve the problem

**v v** *opt* = arg min *F*( ) (48)

Implementation of a New Quasi-Optimal Controller Tuning Algorithm for Time-Delay Systems 19

where *rndi* ∈[0,1] is a randomly generated number for each dimension of a specimen. Although authors of SOMA suggest to calculate *PRTVector* only once in migration round for every specimen, we try to do this in every step of the moving to the leader. Hence, the path

, 1 ,0 ,0 ,0 1 diag

where diag( ) *PRTVector* means the diagonal square matrix with elements of *PRTVector* on

For every specimen of the population in a migration round, the cost function (i.e. value of the specimen) is calculated in every single step during the moving towards the leader. If the current position is better then the actual best, it becomes the best now. Hence, the new position of an active specimen for the next migration round is given by the best position of the specimen from all steps of moving towards the leader within the current migration round, i.e.

*<sup>T</sup> PRTVector* = , the active specimen goes to the leader directly without "zig-zag"

( ) <sup>1</sup> , arg min *mr mr <sup>i</sup> i k <sup>k</sup>*

The number of migration round are given by user at the beginning of SOMA by parameter

The final value **v***opt* is equal to **v***L* from the last migration round. We implemented the

In this closing session, we demonstrate the utilization of the PPSA and the methodology

Consider an unstable system describing roller skater on a swaying bow (Zítek et al., 2008)

exp

− + = = − −

see Fig. 8, where *y*( )*t* is the skater's deviation from the desired position, *u t*( ) expresses the

and *b*, *a* are real parameters. Skater controls the servo driving by remote signals into servo

according to the approach described in Section 3. Consider the reference and load

*Y s b s*

*U s ss a s*

τ ϑ

( ) ( ) ( ) ( ) 2 2

ϑ

= s, as in the literature, and design the controller structure

(54)

, mean the skater's and servo latencies

exp

τ ϑ

( ) ( ) ( )

*G s*

max min () () *i i <sup>i</sup> <sup>i</sup>*

*F* <sup>+</sup> **v v** = (52)

*F F MinDiv* **v v** − < (53)

*mr mr mr mr mr mr ik i L i L i i Step PRTVector Step*

<sup>+</sup> = +− − + −

1,2,... ; 0,1,... / 1

= = −

*i PopSize k round PathLength Step*

the main diagonal and *k* is *k*-th step in the path.

These specimens then generate the new population.

*Migration*, or the algorithm is terminated if

where *MinDiv* is the selected minimal diversity.

whole PPSA with SOMA in two Matlab m-files.

described above in Matlab on an attractive example.

slope angle of a bow caused by force *P*, delays

disturbance in the form of a step-wise function.

 = s, 0.1 ϑ

**6. Illustrative example** 

given by the transfer function

electronics.

Let *b* = 0.2, *a* = 1, 0.3

τ

( ) ( ) ( ) ( ) ( )

**v v vv v v** (51)

is given by

moves.

If [1,1,...1]

We use SOMA algorithm based on genetic operations with a population of found solutions and moving of population specimens to each other. A brief description of the algorithm follows.

#### **5.2 SOMA**

SOMA is ranked among evolution algorithms, more precisely genetic algorithms, dealing with populations similarly as differential evolution does. The algorithm is based on vector operations over the space of feasible solutions (parameters) in which the population is defined. Population specimens cooperate when searching the best solution (the minimum of the cost function) and, simultaneously, each of them tries to be a leader. They move to each other and the searching is finished when all specimens are localized on a small area.

In SOMA, every single generation, in which a new population is generated, is called a migration round. The notion of specific control and termination parameters, which have to be set before the algorithm starts, will be explained in every step of a migration round below.

First, population *P* = {**vv v** 1 2 , ,..., *PopSize*} must be generated based on a prototypal specimen. For PPSA, this specimen is a vector of controller free parameters, **v** , of dimension *D l* = *den* . The prototypal specimen equals the best solution from Subsection 4.5. One can choose an initial radius (*Rad*) of the population in which other specimens are generated. The size of population (*PopSize*), i.e. the number of specimens in the population, is chosen by the user. Each specimen is then evaluated by the cost function (46).

The simplest strategy called "All to One" implemented here then selects the best specimen leader, i.e. that with the minimal value of the cost function

$$\mathbf{v}\_{L}^{mr} = \arg\min\_{i} F\left(\mathbf{v}\_{i}^{mr}\right) \tag{49}$$

where *L* denotes the leader, *i* is *i*-th of specimen in the population and *mr* means the current migration round. Then all other specimen are moved towards the leader during the migration round. The moving is given by three control parameters: *PathLength*, *Step*, *PRT*. *PathLength* should be within the interval [1.1,5] and it expresses the length of the path when approaching the leader. *PathLength* = 1 means that the specimen stops its moving exactly at the position of the leader. *Step* represents the sampling of the path and ought to be valued [0.11, ] *PathLength* . E.g. a pair *PathLength* = 1 and *Step* = 0.2 agrees with that the specimen makes 5 steps until it reaches the leader. *PRT* ∈[0,1] enables to calculate the perturbation vector *PRTVector* which indicates whether the active specimen moves to the leader directly or not. *PRTVector* is defined as

$$\begin{aligned} \text{PRT} & \text{PRT} \text{Vector} = \left[ p\_1, p\_2, \dots, p\_{l\_{dm}} \right]^T \in \{0, 1\}^{l\_{dm}} \\ p\_i &= 1 \qquad \text{if } \, md\_i \lhd \text{PRT} \\ p\_i &= 0 \qquad \text{else} \end{aligned} \tag{50}$$

where *rndi* ∈[0,1] is a randomly generated number for each dimension of a specimen. Although authors of SOMA suggest to calculate *PRTVector* only once in migration round for every specimen, we try to do this in every step of the moving to the leader. Hence, the path is given by

$$\begin{aligned} \mathbf{v}\_{i,k+1}^{mr} &= \mathbf{v}\_{i,0}^{mr} + (i - 1)Step \left( \mathbf{v}\_{L}^{mr} - \mathbf{v}\_{i,0}^{mr} \right) + \text{diag}\left( PRTVector \right) Step \left( \mathbf{v}\_{L}^{mr} - \mathbf{v}\_{i,0}^{mr} \right) \\ \mathbf{i} &= 1,2,... \text{PopSize}; k = 0,1,... \text{round}\left( PathLength \mid Step \right) - 1 \end{aligned} \tag{51}$$

where diag( ) *PRTVector* means the diagonal square matrix with elements of *PRTVector* on the main diagonal and *k* is *k*-th step in the path.

If [1,1,...1] *<sup>T</sup> PRTVector* = , the active specimen goes to the leader directly without "zig-zag" moves.

For every specimen of the population in a migration round, the cost function (i.e. value of the specimen) is calculated in every single step during the moving towards the leader. If the current position is better then the actual best, it becomes the best now. Hence, the new position of an active specimen for the next migration round is given by the best position of the specimen from all steps of moving towards the leader within the current migration round, i.e.

$$\mathbf{v}\_{i}^{mr+1} = \arg\min\_{k} F\left(\mathbf{v}\_{i,k}^{mr}\right) \tag{52}$$

These specimens then generate the new population.

The number of migration round are given by user at the beginning of SOMA by parameter *Migration*, or the algorithm is terminated if

$$\max\_{i} F(\mathbf{v}\_{i}) - \min\_{i} F(\mathbf{v}\_{i}) < \text{MinDiv} \tag{53}$$

where *MinDiv* is the selected minimal diversity.

The final value **v***opt* is equal to **v***L* from the last migration round. We implemented the whole PPSA with SOMA in two Matlab m-files.

#### **6. Illustrative example**

18 MATLAB for Engineers – Applications in Control, Electrical Engineering, IT and Robotics

Poles can be found e.g. by the quasipolynomial mapping root finder (QPMR) implemented

We use SOMA algorithm based on genetic operations with a population of found solutions and moving of population specimens to each other. A brief description of the algorithm

SOMA is ranked among evolution algorithms, more precisely genetic algorithms, dealing with populations similarly as differential evolution does. The algorithm is based on vector operations over the space of feasible solutions (parameters) in which the population is defined. Population specimens cooperate when searching the best solution (the minimum of the cost function) and, simultaneously, each of them tries to be a leader. They move to each

In SOMA, every single generation, in which a new population is generated, is called a migration round. The notion of specific control and termination parameters, which have to be set before the algorithm starts, will be explained in every step of a migration

First, population *P* = {**vv v** 1 2 , ,..., *PopSize*} must be generated based on a prototypal specimen. For PPSA, this specimen is a vector of controller free parameters, **v** , of dimension *D l* = *den* . The prototypal specimen equals the best solution from Subsection 4.5. One can choose an initial radius (*Rad*) of the population in which other specimens are generated. The size of population (*PopSize*), i.e. the number of specimens in the population, is chosen by the user.

The simplest strategy called "All to One" implemented here then selects the best specimen -

arg min ( ) *mr mr L i <sup>i</sup>*

where *L* denotes the leader, *i* is *i*-th of specimen in the population and *mr* means the current migration round. Then all other specimen are moved towards the leader during the migration round. The moving is given by three control parameters: *PathLength*, *Step*, *PRT*. *PathLength* should be within the interval [1.1,5] and it expresses the length of the path when approaching the leader. *PathLength* = 1 means that the specimen stops its moving exactly at the position of the leader. *Step* represents the sampling of the path and ought to be valued [0.11, ] *PathLength* . E.g. a pair *PathLength* = 1 and *Step* = 0.2 agrees with that the specimen makes 5 steps until it reaches the leader. *PRT* ∈[0,1] enables to calculate the perturbation vector *PRTVector* which indicates whether the active specimen moves to the leader directly

1 2 , ,..., 0,1 { }

*den*

*l*

= ∈ 

other and the searching is finished when all specimens are localized on a small area.

Each specimen is then evaluated by the cost function (46).

leader, i.e. that with the minimal value of the cost function

1 if 0 else

*i*

=

*p*

*i i*

= <

*PRTVector p p p p rnd PRT*

**v v** *opt* = arg min *F*( ) (48)

**v v** = *F* (49)

*den*

(50)

*T l*

in Matlab, see (Vyhlídal & Zítek, 2003). Hence, the aim is to solve the problem

follows.

**5.2 SOMA** 

round below.

or not. *PRTVector* is defined as

In this closing session, we demonstrate the utilization of the PPSA and the methodology described above in Matlab on an attractive example.

Consider an unstable system describing roller skater on a swaying bow (Zítek et al., 2008) given by the transfer function

$$G(s) = \frac{Y(s)}{U(s)} = \frac{b \exp\left(-(\tau + \vartheta)s\right)}{s^2 \left(s^2 - a \exp\left(-\vartheta s\right)\right)}\tag{54}$$

see Fig. 8, where *y*( )*t* is the skater's deviation from the desired position, *u t*( ) expresses the slope angle of a bow caused by force *P*, delays τ ϑ, mean the skater's and servo latencies and *b*, *a* are real parameters. Skater controls the servo driving by remote signals into servo electronics.

Let *b* = 0.2, *a* = 1, 0.3 τ = s, 0.1 ϑ = s, as in the literature, and design the controller structure according to the approach described in Section 3. Consider the reference and load disturbance in the form of a step-wise function.

Implementation of a New Quasi-Optimal Controller Tuning Algorithm for Time-Delay Systems 21

*b s s a s s ps ps p b s qs qs qs q*

+ ++ + + − − <sup>=</sup> − − + + + + −+ + + +

*s ps ps p s m pm s*

*s s a s s ps ps p b s qs qs qs q*

+ + + + − −+ <sup>=</sup> − − + + + + −+ + + +

3 2 4 42 2 3 2 1 0 0 00 2 2 3 2 3 2

( ( )) ( ) ( ) ( ) ( )

2 10 3 2 10

τ ϑ

exp

exp exp

ϑ

τ ϑ

τ ϑ

τ ϑ exp

ϑ

exp

τ ϑ ϑ

 τϑ

<sup>0</sup> *s m*+ has a quadruple real pole; to cancel

. Hence *lden* = 7. Now, there are two possibilities –

(59)

(61)

(62)

ξ= ,

(65)

(60)

2 10 3 2 10

τ ϑ

exp

( ( )) ( ) ( ) ( ) ( )

( ) ( )( ) ( ) ( )

( )( ) ( ) ( ) ( ) ( )

( ) ( ( )) ( ) ( ) ( ) ( )

( ) ( ( )) ( ) ( ) ( ) ( ) <sup>4</sup> 2 2 3 2 3 2 <sup>0</sup> 2 10 3 2 10 exp exp

*<sup>q</sup> <sup>s</sup> <sup>q</sup> <sup>s</sup> <sup>q</sup> <sup>s</sup> <sup>q</sup>* =+ − − + + + + −+ + + +

α

0 42 2

α ξ

The concrete quasipolynomial which roots are being set, thus, reads

( )( )

3 2 3 2 10

*s qs qs qs q*

*p s p s p b s*

Obviously, the numerator of *G s WY* ( ) does not have any free parameter not included in the

either set zero exactly to obtain constrained controller parameter (then *lden* = 6) or to deal with the numerator and denominator of (61) together in (46) – we decided to utilize the

( ) ( )

01 1 <sup>1</sup> exp *bz m q z q z q z q*

*mz z a z*

 α

( ) ( ) ( ) ( ) ( )

exp 0.1 5.4078 0.18 0.0324 0.005832

1 21 0 1 2 3

*ms ss s s p s p s qq q q*

= − − + ++ − + −

4 3 2 1 0 31 21 11 0

( ) ( )

ϑ

+ + ++ = − − − (63)

= and max *t* = 10 s. From Fig. 3 we have 0.9 *<sup>z</sup>*

= =− =− 0.2, 0.18, 0.1 *z* . Then take e.g. 0 *m* = 5 . Inserting plant

*p qq q q* 0 01 2 3 = −+ − 5.4078 0.18 0.0324 0.005832 ( ) (64)

+ − − + + + + −+ + + +

*b bqs qs qs q s m pms s a s s s m s s a s s ps ps p b s qs qs qs q*

4 2 2 3 2 3 2 0 2 10 3 2 10

3 2 4 42 2 3 2 1 0 0 00 3 2 4 4 2 1 0 0 00

*bqs qs qs q s m pms s a s G s*

( )( ) ( ) ( )

*b s ps ps p s m pm s*

+ ++ + + − − <sup>=</sup> + + + + − −+

( ) ( )( ) ( ) ( )

3 2 4 4 2 1 0 0 00 2 2 3 2 3 2

( ) ( )( ) ( ) ( )

exp exp

3 2 4 42 2 3 2 1 0 0 00

> ϑ

which gives rise to the characteristic quasipolynomial

ϑ

denominator, i.e. *lnum* = 0. Moreover, the factor ( )<sup>4</sup>

*p*

ω

2 2 3 2

+ − + ++

exp exp

+ + + + + − − −+ <sup>=</sup>

ϑ

ϑ

Hence, the controller has the transfer function

and the reference-to-output function reads

*sm ss a s s*

it, it must hold that *m s* 0 1 >> − = − Re{ }

former one. Generally, one can obtain e.g.

Choose , ,max Δ = *hWY m* 0.5 , 0.5

max, 2 *t norm* ≈ which gives 1

0.2exp 0.4

parameters in (63) yields

*R*

*P s*

( )

*G s WY*

( )

from (61).

*m s*

exp exp

*bqs qs qs q s m pms s a s Q s*

Fig. 8. The roller skater on a swaying bow

Hence, coprime factorization over **R***MS* can be done e.g. as

$$\mathcal{G}(s) = \frac{B(s)}{A(s)} = \frac{\frac{b \exp\left(-\left(\tau + \vartheta\right)s\right)}{\left(s + m\_0\right)^4}}{\frac{s^2\left(s^2 - a\exp\left(-\vartheta s\right)\right)}{\left(s + m\_0\right)^4}}, \mathcal{W}(s) = \frac{H\_{\mathcal{W}}(s)}{F\_{\mathcal{W}}(s)} = \frac{\frac{k\_{\mathcal{W}}}{s + m}}{\frac{s}{s + m}}, \ D(s) = \frac{H\_D(s)}{F\_D(s)} = \frac{\frac{k\_D}{s + m}}{\frac{s}{s + m}}\tag{55}$$

where 0 *m* > 0 , *kW*, *kD* ∈ . Stabilization via the Bézout identity (15) results e.g. in the following particular solution

$$Q\_0(s) = \frac{\left(q\_3s^3 + q\_2s^2 + q\_1s + q\_0\right)\left(s + m\_0\right)^4}{s^2\left(s^2 - a\exp\left(-\vartheta s\right)\right)\left(s^3 + p\_2s^2 + p\_1s + p\_0\right) + b\exp\left(-\left(\tau + \vartheta\right)s\right)\left(q\_3s^3 + q\_2s^2 + q\_1s + q\_0\right)}\tag{56}$$

$$P\_0(s) = \frac{\left(s^3 + p\_2s^2 + p\_1s + p\_0\right)\left(s + m\_0\right)^4}{s^2\left(s^2 - a\exp\left(-\vartheta s\right)\right)\left(s^3 + p\_2s^2 + p\_1s + p\_0\right) + b\exp\left(-\left(\tau + \vartheta\right)s\right)\left(q\_3s^3 + q\_2s^2 + q\_1s + q\_0\right)}$$

using the generalized Euclidean algorithm, see (Pekař & Prokop, 2009), where *p*2, *p*1, *p*0, *q*3, *q*2, *q*1, *q*0∈ are free parameters. In order to provide reference tracking and load disturbance rejection, use parameterization (16) while both, *F s <sup>W</sup>* ( ) and *F s <sup>D</sup>* ( ) , divide *P s*( ) ; in other words, the numerator of *P s*( ) must satisfy *P*( ) 0 0 = . If we take

$$T = \frac{t\_0 \left(s + m\_0\right)^4}{s^2 \left(s^2 - a \exp(-\vartheta s)\right) \left(s^3 + p\_2 s^2 + p\_1 s + p\_0\right) + b \exp\left(-\left(\tau + \vartheta\right)s\right) \left(q\_3 s^3 + q\_2 s^2 + q\_1 s + q\_0\right)} \tag{57}$$

*P s*( ) is obtained in a quite simple form with a real parameter *t*0 which must be set as

$$t\_0 = \frac{-p\_0 m\_0^4}{b} \tag{58}$$

Finally, the controller numerator and denominator in **R***MS* , respectively, have forms

$$Q(s) = \frac{b\left(q\_3s^3 + q\_2s^2 + q\_1s + q\_0\right)\left(s + m\_0\right)^4 + p\_0m\_0^4s^2\left(s^2 - a\exp\left(-\theta s\right)\right)}{b\left[s^2\left(s^2 - a\exp\left(-\theta s\right)\right)\left(s^3 + p\_2s^2 + p\_1s + p\_0\right) + b\exp\left(-\left(\tau + \vartheta\right)s\right)\left(q\_3s^3 + q\_2s^2 + q\_1s + q\_0\right)\right]} \tag{59}$$

$$P(s) = \frac{\left(s^3 + p\_2s^2 + p\_1s + p\_0\right)\left(s + m\_0\right)^4 - p\_0m\_0^4\exp\left(-\left(\tau + \vartheta\right)s\right)}{s^2\left(s^2 - a\exp\left(-\theta s\right)\right)\left(s^3 + p\_2s^2 + p\_1s + p\_0\right) + b\exp\left(-\left(\tau + \vartheta\right)s\right)\left(q\_3s^3 + q\_2s^2 + q\_1s + q\_0\right)}$$

Hence, the controller has the transfer function

$$G\_{R}(s) = \frac{b\left(q\_{3}s^{3} + q\_{2}s^{2} + q\_{1}s + q\_{0}\right)\left(s + m\_{0}\right)^{4} + p\_{0}m\_{0}^{4}s^{2}\left(s^{2} - a\exp\left(-\vartheta s\right)\right)}{b\left[\left(s^{3} + p\_{2}s^{2} + p\_{1}s + p\_{0}\right)\left(s + m\_{0}\right)^{4} - p\_{0}m\_{0}^{4}\exp\left(-\left(\tau + \vartheta\right)s\right)\right]}\tag{60}$$

and the reference-to-output function reads

$$\begin{aligned} \mathbf{G}\_{\text{IVY}}(\mathbf{s})\\ \mathbf{s} = \frac{b\left[b\left(q\_{3}\mathbf{s}^{3} + q\_{2}\mathbf{s}^{2} + q\_{1}\mathbf{s} + q\_{0}\right)\left(\mathbf{s} + m\_{0}\right)^{4} + p\_{0}m\_{0}^{4}\mathbf{s}^{2}\left(\mathbf{s}^{2} - a\mathbf{exp}\left(-\vartheta\mathbf{s}\right)\right)\right] \mathrm{exp}\left(-\left(\mathbf{\tau} + \vartheta\right)\mathbf{s}\right)}{\left(\mathbf{s} + m\_{0}\right)^{4}\left[\mathbf{s}^{2}\left(\mathbf{s}^{2} - a\mathbf{exp}\left(-\vartheta\mathbf{s}\right)\right)\left(\mathbf{s}^{3} + p\_{2}\mathbf{s}^{2} + p\_{1}\mathbf{s} + p\_{0}\right) + b\,\mathrm{exp}\left(-\left(\mathbf{\tau} + \vartheta\right)\mathbf{s}\right)\left(q\_{3}\mathbf{s}^{3} + q\_{2}\mathbf{s}^{2} + q\_{1}\mathbf{s} + q\_{0}\right)\right]} \end{aligned} \tag{61}$$

which gives rise to the characteristic quasipolynomial

$$\begin{aligned} &m(s) \\ &= (s+m\_0)^4 \left[ s^2 \left( s^2 - a \exp(-\vartheta s) \right) \Big| \left( s^3 + p\_2 s^2 + p\_1 s + p\_0 \right) + b \exp \Big( - (\tau + \vartheta) s \Big) \Big( q\_3 s^3 + q\_2 s^2 + q\_1 s + q\_0 \Big) \right] \end{aligned} \tag{62}$$

Obviously, the numerator of *G s WY* ( ) does not have any free parameter not included in the denominator, i.e. *lnum* = 0. Moreover, the factor ( )<sup>4</sup> <sup>0</sup> *s m*+ has a quadruple real pole; to cancel it, it must hold that *m s* 0 1 >> − = − Re{ } α . Hence *lden* = 7. Now, there are two possibilities – either set zero exactly to obtain constrained controller parameter (then *lden* = 6) or to deal with the numerator and denominator of (61) together in (46) – we decided to utilize the former one. Generally, one can obtain e.g.

$$p\_0 = -\frac{b\left(z\_1 + m\_0\right)^4 \left(q\_3 z\_1^3 + q\_2 z\_1^2 + q\_1 z\_1 + q\_0\right)}{m\_0^4 z\_1^2 \left(z\_1^2 - a \exp\left(-\vartheta z\_1\right)\right)}\tag{63}$$

from (61).

20 MATLAB for Engineers – Applications in Control, Electrical Engineering, IT and Robotics

( ) ( )

( ( )) ( ) ( ) ( ) ( )

3 2 4 3 2 10 0

( ( )) ( ) ( ) ( ) ( )

*s s a s s ps ps p b s qs qs qs q*

( ) ( ( )) ( ) ( ) ( ) ( )

0 0 2 2 3 2 3 2

*tsm*

<sup>+</sup> <sup>=</sup> − − + + + + −+ + + +

*P s*( ) is obtained in a quite simple form with a real parameter *t*0 which must be set as

0

Finally, the controller numerator and denominator in **R***MS* , respectively, have forms

*t*

4

2 10 3 2 10 exp exp

4 0 0

*p m*

*b*

+ ++ + <sup>=</sup> − − + + + + −+ + + +

using the generalized Euclidean algorithm, see (Pekař & Prokop, 2009), where *p*2, *p*1, *p*0, *q*3, *q*2, *q*1, *q*0∈ are free parameters. In order to provide reference tracking and load disturbance rejection, use parameterization (16) while both, *F s <sup>W</sup>* ( ) and *F s <sup>D</sup>* ( ) , divide *P s*( ) ; in other

3 2 4 2 10 0

*s s a s s ps ps p b s qs qs qs q*

+ ++ + <sup>=</sup> − − + + + + −+ + + +

*b s <sup>k</sup> <sup>k</sup>*

, , exp

where 0 *m* > 0 , *kW*, *kD* ∈ . Stabilization via the Bézout identity (15) results e.g. in the

<sup>+</sup> + + = = = = == − −

*B s s m H s H s s m s m G s W s D s A s ss a s F s s s F s*

( ) ( ) ( )

*W D W D*

2 10 3 2 10

τ ϑ

2 10 3 2 10

τ ϑ

τ ϑ ( )

(55)

(56)

(57)

*W D*

*s m s m*

*s qs qs qs q*

<sup>−</sup> <sup>=</sup> (58)

+ +

Fig. 8. The roller skater on a swaying bow

2 2

exp

( ) ( ) ( )

following particular solution

*T*

Hence, coprime factorization over **R***MS* can be done e.g. as

( ) ( ) ( ) ( )

*s m*

+

ϑ

ϑ

( ) ( )

τ ϑ

− +

4 0

4 0

ϑ

( ) ( )( )

*qs qs qs q s m Q s*

0 2 2 3 2 3 2

exp exp

exp exp

0 2 2 3 2 3 2

( ) ( )( )

*s ps ps p s m P s*

words, the numerator of *P s*( ) must satisfy *P*( ) 0 0 = . If we take

*s s a s s ps ps p b*

ϑ Choose , ,max Δ = *hWY m* 0.5 , 0.5 α ξ = and max *t* = 10 s. From Fig. 3 we have 0.9 *<sup>z</sup>* ξ = , max, 2 *t norm* ≈ which gives 1 ω α = =− =− 0.2, 0.18, 0.1 *z* . Then take e.g. 0 *m* = 5 . Inserting plant parameters in (63) yields

$$p\_0 = 5.4078 \left( q\_0 - 0.18 q\_1 + 0.0324 q\_2 - 0.005832 q\_3 \right) \tag{64}$$

The concrete quasipolynomial which roots are being set, thus, reads

$$\begin{aligned} m\_1(s) &= s^2 \left( s^2 - \exp(-0.1s) \right) \left( s^3 + p\_2 s^2 + p\_1 s + 5.4078 \left( q\_0 - 0.18 q\_1 + 0.0324 q\_2 - 0.005832 q\_3 \right) \right) \\ &+ 0.2 \exp(-0.4s) \left( q\_3 s^3 + q\_2 s^2 + q\_1 s + q\_0 \right) \end{aligned} \tag{65}$$

Implementation of a New Quasi-Optimal Controller Tuning Algorithm for Time-Delay Systems 23

Fig. 11. Spectral abscissa evolution

group of currently moved poles.

and the poles location is pictured in Fig. 13.

Fig. 12. Distance of the rightmost pole from the prescribed one

The final controller parameters from the continuous shifting are

When shifting, it is suggested to continue in doing this even if the desired poles locations are reached since one can obtain a better poles distribution – i.e. non-dominant poles are placed more left in the complex space. Moreover, one can decrease the number of shifted poles during the algorithm whenever the real part of a shifted pole becomes "too different" from a

3 2 1 0 2 10 *q q q q p pp* = = = = = == 4.7587, 2.1164, 2.6252, 0.4482, 0.4636, 0.529, 4.6164 (67)

Initial direct pole placement results in controller parameters as

$$q\_3 = 1.0051, q\_2 = 0.9506, q\_1 = 1.2582, q\_0 = 0.2127, p\_2 = 1.1179, p\_1 = 0.4418, p\_0 = 0.0603 \quad \text{(66)}$$

and poles locations in the vicinity of the origin are displayed in Fig. 9.

Fig. 9. Initial poles locations

The process of continuous roots shifting is described by the evolution of controller parameters, the spectral abscissa (i.e. the real part of the rightmost pole σ *<sup>d</sup>*,1 ) and the distance of the dominant pole from the prescribed one σ σ *d p* ,1 ,1 − , as can be seen in Fig. 10 – Fig. 12, respectively. Note that *p*0 is related to shifted parameters according to (64).

Fig. 10. Shifted parameters evolution

Fig. 11. Spectral abscissa evolution

The process of continuous roots shifting is described by the evolution of controller

σ

 σ σ

*d p* ,1 ,1 − , as can be seen in Fig. 10

*<sup>d</sup>*,1 ) and the

parameters, the spectral abscissa (i.e. the real part of the rightmost pole

– Fig. 12, respectively. Note that *p*0 is related to shifted parameters according to (64).

distance of the dominant pole from the prescribed one

3 2 10 210 *q q qqppp* = = ===== 1.0051, 0.9506, 1.2582, 0.2127, 1.1179, 0.4418, 0.0603 (66)

Initial direct pole placement results in controller parameters as

Fig. 9. Initial poles locations

Fig. 10. Shifted parameters evolution

and poles locations in the vicinity of the origin are displayed in Fig. 9.

Fig. 12. Distance of the rightmost pole from the prescribed one

When shifting, it is suggested to continue in doing this even if the desired poles locations are reached since one can obtain a better poles distribution – i.e. non-dominant poles are placed more left in the complex space. Moreover, one can decrease the number of shifted poles during the algorithm whenever the real part of a shifted pole becomes "too different" from a group of currently moved poles.

The final controller parameters from the continuous shifting are

$$q\_3 = 4.7587, \; q\_2 = 2.1164, \; q\_1 = 2.6252, \; q\_0 = 0.4482, \; p\_2 = 0.4636, \; p\_1 = 0.529, \; p\_0 = 4.6164 \quad \text{(67)}$$

and the poles location is pictured in Fig. 13.

Implementation of a New Quasi-Optimal Controller Tuning Algorithm for Time-Delay Systems 25

poles less then a number of free controller parameters is set exactly and the rest of the spectrum is pushed to the left as much as possible. If it is possible it is necessary to choose other prescribed poles. We initially place the poles exactly; however, they can leave their positions during the shifting. Anyway, our algorithm does not require reset of selection assigned poles. Moreover, we suggest unambiguously how the prescribed poles (and zeros) positions are to be chosen – based on model overshoots. Last but not least, in (Michiels et al., 2010), the gradient sampling algorithm (Burke et al., 2005) on the spectral abscissa was used

The presented approach is limited to retarded SISO LTI-TDS without distributed delays only. Its extension to neutral systems requires some additional conditions on stability and existence of a stabilizing controller. Systems with distributed delays can be served in similar way as it is done here, yet with the characteristic meromorphic function instead of quasipolynomial. Multivariable systems would require deeper theoretic analysis of the controller structure design. The methodology is also time-comsupting and thus useless for

In the future research, one can solve the problems specified above, choose other referenceto-output models and control system structures. There is a space to improve and modify the

The authors kindly appreciate the financial support which was provided by the Ministry of Education, Youth and Sports of the Czech Republic, in the grant No. MSM 708 835 2102 and by the European Regional Development Fund under the project CEBIA-Tech No.

Ben-Israel, A. & Greville, T.N.E (1966). *Generalized Inverses: Theory and Applications*. Wiley,

Burke, J.; Lewis, M & Overton, M. (2005). A Robust Gradient Sampling Algorithm for

El'sgol'ts, L.E. & Norkin, S.B. (1973). *Introduction to the Theory and Application of Differential* 

Górecki, H.; Fuksa, S.; Grabowski, P. & Korytowski, A. (1989). *Analysis and Synthesis of Time Delay Systems*, John Wiley & Sons, ISBN 978-047-1276-22-7, New York Hale, J.K., & Verduyn Lunel, S.M. (1993). Introduction to Functional Differential Equations.

Kolmanovskii, V.B. & Myshkis, A. (1999). *Introduction to the Theory and Applications of* 

Kučera, V. (1993). Diophantine equations in control - a survey. Automatica, Vol. 29, No. 6,

*Equations with Deviated Arguments*. Academic Press, New York

Nonsmooth Nonconvex Optimization. *SIAM Journal of Optimization*, Vol. 15, Issue

*Applied Mathematical Sciences*, Vol. 99, Springer-Verlag, ISBN 978-038-7940-76-2,

*Functional Differential Equations*, Cluwer Academy, ISBN 978-0792355045,

while SOMA together with more complex cost function is considered in this chapter.

online controller design (e.g. for selftuners).

optimization algorithm.

**8. Acknowledgment** 

CZ.1.05/2.1.00/03.0089.

New York

New York

Dordrecht, Netherlands

pp. 1361-1375, ISSN 0005-1098

3, pp. 751-779, ISSN 1052-6234

**9. References** 

Fig. 13. Final poles locations

As can be seen, the desired prescribed pole is reached and it is also the dominant one. Thus, optimization can be omitted. However, try to perform SOMA to find the minimal cost function (16) with this setting: *Rad* = 2, *PopSize* = 10, *D* = 6, *PathLength* = 3, *Step* = 0.21, *PRT* = 0.6, *Migration* = 10, *MinDiv* = 10-6, . Yet, the minimum of the cost function remains in the best solution from continuous shifting, i.e. according to (67), with the value of the cost function as ( ) <sup>4</sup> *F* 2.93 10<sup>−</sup> **v** = ⋅ .

#### **7. Conclusion**

This chapter has introduced a novel controller design approach for SISO LTI-TDS based on algebraic approach followed by pole-placement-like controller tuning and an optimization procedure. The methodology has been implemented in Matlab-Simulink environment to verify the results.

The initial controller structure design has been made over the ring of stable and proper meromorphic functions, **R***MS*, which offers to satisfy properness of the controller, reference tracking and rejection of the load disturbance (of a nominal model). The obtained controller has owned some free (unset) parameters which must have been set properly.

In the crucial part of the work, we have chosen a simple finite-dimension model, calculated its step-response maximum overshoots and times to the overshoots. Then, using a static pole placement followed by continuous pole shifting dominant poles have been attempted to be placed to the desired prescribed positions.

Finally, optimization of distances of dominant (the rightmost) poles from the prescribed ones has been utilized via SOMA algorithm. The whole methodology has been tested on an attractive example of a skater on a swaying bow described by an unstable LTI TDS model.

The procedure is similar to the algorithm introduced in (Michiels et al., 2010); however, there are some substantial differences between them. Firstly, the presented approach is made in input-output space of meromorphic Laplace transfer functions, whereas the one in (Michiels et al., 2010) deals purely with state space. Second, in the cited literature, a number poles less then a number of free controller parameters is set exactly and the rest of the spectrum is pushed to the left as much as possible. If it is possible it is necessary to choose other prescribed poles. We initially place the poles exactly; however, they can leave their positions during the shifting. Anyway, our algorithm does not require reset of selection assigned poles. Moreover, we suggest unambiguously how the prescribed poles (and zeros) positions are to be chosen – based on model overshoots. Last but not least, in (Michiels et al., 2010), the gradient sampling algorithm (Burke et al., 2005) on the spectral abscissa was used while SOMA together with more complex cost function is considered in this chapter.

The presented approach is limited to retarded SISO LTI-TDS without distributed delays only. Its extension to neutral systems requires some additional conditions on stability and existence of a stabilizing controller. Systems with distributed delays can be served in similar way as it is done here, yet with the characteristic meromorphic function instead of quasipolynomial. Multivariable systems would require deeper theoretic analysis of the controller structure design. The methodology is also time-comsupting and thus useless for online controller design (e.g. for selftuners).

In the future research, one can solve the problems specified above, choose other referenceto-output models and control system structures. There is a space to improve and modify the optimization algorithm.

#### **8. Acknowledgment**

24 MATLAB for Engineers – Applications in Control, Electrical Engineering, IT and Robotics

As can be seen, the desired prescribed pole is reached and it is also the dominant one. Thus, optimization can be omitted. However, try to perform SOMA to find the minimal cost function (16) with this setting: *Rad* = 2, *PopSize* = 10, *D* = 6, *PathLength* = 3, *Step* = 0.21, *PRT* = 0.6, *Migration* = 10, *MinDiv* = 10-6, . Yet, the minimum of the cost function remains in the best solution from continuous shifting, i.e. according to (67), with the value of the cost

This chapter has introduced a novel controller design approach for SISO LTI-TDS based on algebraic approach followed by pole-placement-like controller tuning and an optimization procedure. The methodology has been implemented in Matlab-Simulink environment to

The initial controller structure design has been made over the ring of stable and proper meromorphic functions, **R***MS*, which offers to satisfy properness of the controller, reference tracking and rejection of the load disturbance (of a nominal model). The obtained controller

In the crucial part of the work, we have chosen a simple finite-dimension model, calculated its step-response maximum overshoots and times to the overshoots. Then, using a static pole placement followed by continuous pole shifting dominant poles have been attempted to be

Finally, optimization of distances of dominant (the rightmost) poles from the prescribed ones has been utilized via SOMA algorithm. The whole methodology has been tested on an attractive example of a skater on a swaying bow described by an unstable LTI TDS model. The procedure is similar to the algorithm introduced in (Michiels et al., 2010); however, there are some substantial differences between them. Firstly, the presented approach is made in input-output space of meromorphic Laplace transfer functions, whereas the one in (Michiels et al., 2010) deals purely with state space. Second, in the cited literature, a number

has owned some free (unset) parameters which must have been set properly.

Fig. 13. Final poles locations

function as ( ) <sup>4</sup> *F* 2.93 10<sup>−</sup> **v** = ⋅ .

placed to the desired prescribed positions.

**7. Conclusion** 

verify the results.

The authors kindly appreciate the financial support which was provided by the Ministry of Education, Youth and Sports of the Czech Republic, in the grant No. MSM 708 835 2102 and by the European Regional Development Fund under the project CEBIA-Tech No. CZ.1.05/2.1.00/03.0089.

#### **9. References**


**2** 

**Control of Distributed Parameter** 

Gabriel Hulkó, Cyril Belavý, Gergely Takács,

*Institute of Automation, Measurement and Applied Informatics Faculty of Mechanical Engineering Center for Control of Distributed Parameter Systems* 

*Slovak University of Technology Bratislava* 

Pavol Buček and Peter Zajíček

*Slovak Republic* 

**Systems - Engineering Methods and** 

**Software Support in the MATLAB &** 

**Simulink Programming Environment** 

Distributed parameter systems (DPS) are systems with state/output quantities X(**x**,t) /Y(**x**,t) – parameters which are defined as quantity fields or infinite dimensional quantities distributed through geometric space, where **x** – in general is a vector of the three dimensional Euclidean space. Thanks to the development of information technology and numerical methods, engineering practice is lately modelling a wide range of phenomena and processes in virtual software environments for numerical dynamical analysis purposes such as ANSYS - www.ansys.com, FLUENT (ANSYS Polyflow) www.fluent.com , ProCAST www.esi-group.com/products/casting/, COMPUPLAST – www.compuplast.com, SYSWELD – www.esi-group.com/products/welding, COMSOL Multiphysics - www.comsol.com, MODFLOW, MODPATH,... www.modflow.com , STAR-CD - www.cd-adapco.com, MOLDFLOW - www.moldflow.com, ... Based on the numerical solution of the underlying partial differential equations (PDE) these virtual software environments offer colorful, animated results in 3D. Numerical dynamic analysis problems are solved both for technical and non-technical disciplines given by numerical models defined in complex 3D shapes. From the viewpoint of systems and control theory these dynamical models represent DPS. A new challenge emerges for the control engineering practice, which is the objective to formulate control problems for dynamical systems defined as DPS through numerical structures over complex spatial structures

The main emphasis of this chapter is to present a philosophy of the engineering approach for the control of DPS - given by numerical structures, which opens a wide space for novel applications of the toolboxes and blocksets of the MATLAB & Simulink software

**1. Introduction** 

in 3D.

environment presented here.


## **Control of Distributed Parameter Systems - Engineering Methods and Software Support in the MATLAB & Simulink Programming Environment**

Gabriel Hulkó, Cyril Belavý, Gergely Takács, Pavol Buček and Peter Zajíček *Institute of Automation, Measurement and Applied Informatics Faculty of Mechanical Engineering Center for Control of Distributed Parameter Systems Slovak University of Technology Bratislava Slovak Republic* 

#### **1. Introduction**

26 MATLAB for Engineers – Applications in Control, Electrical Engineering, IT and Robotics

Marshall, J.E.; Górecki, H.; Korytowski, A. & Walton, K. (1992). *Time Delay Systems, Stability* 

Michiels, W.; Engelborghs, K; Vansevenant, P. & Roose, D. (2002). Continuous Pole

Michiels, W.; Vyhlídal, T. & Zítek, P. (2010). Control Design for Time-Delay Systems Based

Loiseau, J.-J. (2000). Algebraic Tools for the Control and Stabilization of Time-Delay Systems. *Annual Reviews in Control*, Vol. 24, pp. 135-149, ISSN 1367-5788 Loiseau, J.-J. (2002). Neutral-Type Time-Delay Systems that are not Formally Stable are not

Michiels, W. & Niculescu, S. (2008). Stability and Stabilization of Time Delay Systems: An

Pekař, L. & Prokop, R. (2009). Some observations about the RMS ring for delayed systems,

Pekař, L.; Prokop, R. & Dostálek, P. (2009). Circuit Heating Plant Model with Internal

Pekař, L. & Prokop, R. (2010). Control design for stable systems with both input-output and

Richard, J.P. (2003). Time-delay Systems: an Overview of Some Recent Advances and Open Problems. *Automatica*, Vol. 39, Issue 10, pp. 1667-1694, ISSN 0005-1098 Vyhlídal, T. (2003). *Analysis and Synthesis of Time Delay System Spectrum*, Ph.D. Thesis, Faculty of Mechanical Engineering, Czech Technical University in Prague, Prague Vyhlídal, T. & Zítek, P. (2003). Quasipolynomial mapping based rootfinder for analysis of

Zelinka, I. (2004). SOMA-Self Organizing Migrating Algorithm. In: *New Optimization* 

Zítek, P. & Hlava, J. (2001). Anisochronic Internal Model Control of Time-Delay Systems. *Control Engineering Practice*, Vol. 9, No. 5, pp. 501-516, ISSN 0967-0661 Zítek, P.; Kučera, V. & Vyhlídal, T. (2008). Meromorphic Observer-based Pole Assignment in Time Delay Systems. *Kybernetika*, Vol. 44, No. 5, pp. 633-648, ISSN 0023-5954

ISBN 978-80-227-3081-5, Štrbské Pleso, Slovakia, June 9-12, 2009.

8973, Innsbruck, Austria, February 15-17, 2010

227-232, Rocquencourt, France 2003.

ISBN 3-540-20167X, Berlin

ISSN 0020-7179

York

1098

2777

343, 2010.

1-2, pp. 217-227, ISSN 0265-0754

8716-32-0, Philadelphia

*and Performance Criteria with Applications*. Ellis Horwood, ISBN 0-13-465923-6, New

Placement for Delay Equations. *Automatica*, Vol. 38, No. 6, pp. 747-761, ISSN 0005-

on Quasi-Direct Pole Placement. *Journal of Process Control*, Vol. 20, No. 3, pp. 337-

BIBO Stabilizable. *IMA Journal of Mathematical Control and Information*, Vol. 19, No.

eigenvalue based approach. *Advances in Design and Control*, SIAM, ISBN 978-089-

Proceedings of the 17th International Conference on Process Control '09, pp. 28-36,

Delays. *WSEAS Transaction on Systems*, Vol. 8, Issue 9, pp. 1093-1104, ISSN 1109-

internal delays by algebraic means, *Proceedings of the 29th IASTED International Conference Modelling, Identification and Control (MIC 2010)*, pp. 400-407, ISSN 1025-

time delay systems, *Proceedings IFAC Workshop on Time-Delay systems, TDS'03*, pp.

*Techniques in Engineering*, G. Onwubolu, B.V.Babu (Eds.), 51 p., Springer-Verlag,

Zítek, P. & Kučera, V. (2003). Algebraic Design of Anisochronic Controllers for Time Delay Systems. *International Journal of Control*, Vol. 76, Issue 16, pp. 905-921, Distributed parameter systems (DPS) are systems with state/output quantities X(**x**,t) /Y(**x**,t) – parameters which are defined as quantity fields or infinite dimensional quantities distributed through geometric space, where **x** – in general is a vector of the three dimensional Euclidean space. Thanks to the development of information technology and numerical methods, engineering practice is lately modelling a wide range of phenomena and processes in virtual software environments for numerical dynamical analysis purposes such as ANSYS - www.ansys.com, FLUENT (ANSYS Polyflow) www.fluent.com , ProCAST www.esi-group.com/products/casting/, COMPUPLAST – www.compuplast.com, SYSWELD – www.esi-group.com/products/welding, COMSOL Multiphysics - www.comsol.com, MODFLOW, MODPATH,... www.modflow.com , STAR-CD - www.cd-adapco.com, MOLDFLOW - www.moldflow.com, ... Based on the numerical solution of the underlying partial differential equations (PDE) these virtual software environments offer colorful, animated results in 3D. Numerical dynamic analysis problems are solved both for technical and non-technical disciplines given by numerical models defined in complex 3D shapes. From the viewpoint of systems and control theory these dynamical models represent DPS. A new challenge emerges for the control engineering practice, which is the objective to formulate control problems for dynamical systems defined as DPS through numerical structures over complex spatial structures in 3D.

The main emphasis of this chapter is to present a philosophy of the engineering approach for the control of DPS - given by numerical structures, which opens a wide space for novel applications of the toolboxes and blocksets of the MATLAB & Simulink software environment presented here.

Control of Distributed Parameter Systems - Engineering Methods

Fig. 1. Controlled DPS as LDS - heating of metal body of complex-shape

DDS - distributed-input and distributed-parameter-output system

Fig. 2. Lumped-input and distributed-parameter-output system – LDS

– distributed output quantity

Fig. 3. General structure of lumped-input and distributed-parameter-output systems

Ω /{ <sup>i</sup>}<sup>i</sup> Ω - complex-shape definition domain in 3D / actuation subdomains

{ <sup>i</sup> }<sup>i</sup> SA (s) , { <sup>i</sup> }<sup>i</sup> SG (s) , { <sup>i</sup> }<sup>i</sup> T (x,y,z) - models of actuators

Y( x,y,z,t) – temperature field – distributed output quantity

{ <sup>i</sup>}<sup>i</sup> U - lumped actuating quantities

{ <sup>i</sup>( )}<sup>i</sup> U t – lumped input quantities

Y ,t () ( ) **<sup>x</sup>** <sup>=</sup> Y x, y,z,t

and Software Support in the MATLAB & Simulink Programming Environment 29

The first monographs in the field of DPS control have been published in the second half of the last century, where mathematical foundations of DPS control have been established. This mathematical theory is based on analytical solutions of the underlying PDE (Butkovskij, 1965; Lions, 1971; Wang, 1964). That is the decomposition of dynamics into time and space components based on the eigenfunctions of the PDE. Recently in the field of mathematical control theory of DPS, publications on control of PDE have appeared (Lasiecka & Triggiani, 2000;… ).

An engineering approach for the control of DPS is being developed since the eighties of the last century (Hulkó et al., 1981-2010). In the field of lumped parameters system (LPS) control, where the state/output quantities **x**(t)/**y**(t) – parameters are given as finite dimensional vectors, the actuator together with the controlled plant make up a controlled LPS. In this sense the actuators and the controlled plant as a DPS create a controlled lumped-input and distributed-parameter-output system (LDS). In this chapter the general decomposition of dynamics of controlled LDS into time and space components is introduced, which is based on numerically computed distributed parameter transient and impulse characteristics given on complex shape definition domains in 3D. Based on this decomposition a methodical framework of control synthesis decomposition into space and time tasks will be presented where in space domain approximation problems are solved and in time domain synthesis of control is realized by lumped parameter control loops. For the software support of modelling, control and design of DPS, the **Distributed Parameter Systems Blockset for MATLAB & Simulink (DPS Blockset) -** www.mathworks.com/products/connections/ has been developed within the CONNECTIONS program framework of The MathWorks, as a Third-Party Product of The MathWorks Company (Hulkó et al., 2003-2010). When solving problems in the time domain, toolboxes and blocksets of the MATLAB & Simulink software environment such as for example the Control Systems Toolbox, Simulink Control Design, System Identification Toolbox, etc. are utilized. In the space relation the approximation task is formulated as an optimization problem, where the Optimization Toolbox is made use of. A web portal named **Distributed Parameter Systems Control** www.dpscontrol.sk has been created for those interested in solving problems of DPS control (Hulkó et al., 2003-2010). This web portal features application examples from different areas of engineering practice such as the control of technological and manufacturing processes, mechatronic structures, groundwater remediation etc. Moreover this web portal offers the demo version of the **DPS Blockset** with the **Tutorial, Show, Demos** and **DPS Wizard** for download, along with the **Interactive Control** service for the interactive solution of model control problems via the Internet.

#### **2. DPS – DDS – LDS**

Generally in the control of lumped parameter systems the actuator and the controlled plant create a lumped parameter controlled system. In the field of DPS control the actuators together with the controlled plant - generally being a distributed-input and distributedparameter-output system (DDS) create a controlled lumped-input and distributedparameter-output system (LDS). Fig. 1.-3. and Fig. 6., 11., 14.

The first monographs in the field of DPS control have been published in the second half of the last century, where mathematical foundations of DPS control have been established. This mathematical theory is based on analytical solutions of the underlying PDE (Butkovskij, 1965; Lions, 1971; Wang, 1964). That is the decomposition of dynamics into time and space components based on the eigenfunctions of the PDE. Recently in the field of mathematical control theory of DPS, publications on control of PDE have appeared (Lasiecka & Triggiani,

An engineering approach for the control of DPS is being developed since the eighties of the last century (Hulkó et al., 1981-2010). In the field of lumped parameters system (LPS) control, where the state/output quantities **x**(t)/**y**(t) – parameters are given as finite dimensional vectors, the actuator together with the controlled plant make up a controlled LPS. In this sense the actuators and the controlled plant as a DPS create a controlled lumped-input and distributed-parameter-output system (LDS). In this chapter the general decomposition of dynamics of controlled LDS into time and space components is introduced, which is based on numerically computed distributed parameter transient and impulse characteristics given on complex shape definition domains in 3D. Based on this decomposition a methodical framework of control synthesis decomposition into space and time tasks will be presented where in space domain approximation problems are solved and in time domain synthesis of control is realized by lumped parameter control loops. For the software support of modelling, control and design of DPS, the **Distributed Parameter Systems Blockset for MATLAB & Simulink (DPS Blockset) -** www.mathworks.com/products/connections/ has been developed within the CONNECTIONS program framework of The MathWorks, as a Third-Party Product of The MathWorks Company (Hulkó et al., 2003-2010). When solving problems in the time domain, toolboxes and blocksets of the MATLAB & Simulink software environment such as for example the Control Systems Toolbox, Simulink Control Design, System Identification Toolbox, etc. are utilized. In the space relation the approximation task is formulated as an optimization problem, where the Optimization Toolbox is made use of. A web portal named **Distributed Parameter Systems Control** www.dpscontrol.sk has been created for those interested in solving problems of DPS control (Hulkó et al., 2003-2010). This web portal features application examples from different areas of engineering practice such as the control of technological and manufacturing processes, mechatronic structures, groundwater remediation etc. Moreover this web portal offers the demo version of the **DPS Blockset** with the **Tutorial, Show, Demos** and **DPS Wizard** for download, along with the **Interactive Control** service for the interactive solution of model control problems via the

Generally in the control of lumped parameter systems the actuator and the controlled plant create a lumped parameter controlled system. In the field of DPS control the actuators together with the controlled plant - generally being a distributed-input and distributedparameter-output system (DDS) create a controlled lumped-input and distributed-

parameter-output system (LDS). Fig. 1.-3. and Fig. 6., 11., 14.

2000;… ).

Internet.

**2. DPS – DDS – LDS** 

Fig. 1. Controlled DPS as LDS - heating of metal body of complex-shape

{ <sup>i</sup> }<sup>i</sup> SA (s) , { <sup>i</sup> }<sup>i</sup> SG (s) , { <sup>i</sup> }<sup>i</sup> T (x,y,z) - models of actuators DDS - distributed-input and distributed-parameter-output system { <sup>i</sup>}<sup>i</sup> U - lumped actuating quantities Ω /{ <sup>i</sup>}<sup>i</sup> Ω - complex-shape definition domain in 3D / actuation subdomains Y( x,y,z,t) – temperature field – distributed output quantity

Fig. 2. Lumped-input and distributed-parameter-output system – LDS

{ <sup>i</sup>( )}<sup>i</sup> U t – lumped input quantities

Y ,t () ( ) **<sup>x</sup>** <sup>=</sup> Y x, y,z,t – distributed output quantity

Fig. 3. General structure of lumped-input and distributed-parameter-output systems

Control of Distributed Parameter Systems - Engineering Methods

Fig. 4. i-th discrete distributed parameter impulse response of HLDS

response with maximal amplitude in point x 0,L <sup>i</sup> ∈[ ]

the means of the reduced characteristics as follows

the convolution sum *G*H x ,k U k ii i ( ) () ⊕ =

{ ii i ( )( )}q 0,k H x ,q U k q <sup>=</sup> *<sup>G</sup>* <sup>−</sup> ., see Fig. 5.

x – relation for timesteps { }<sup>k</sup> k

and Software Support in the MATLAB & Simulink Programming Environment 31

*G*H x ,k i i ( ) - partial DT impulse response in time, t - relation to the i-th input considered as

i

H (x,k) HR (x,k) H (x ,k) <sup>=</sup>

for { i i ( ) }i,k *<sup>G</sup>*H x ,k 0 <sup>≠</sup> , then the i-th DT distributed output quantiy in (2) can be rewritten by

At fixed i x the partial DT distributed output quantity in time direction Y x ,k is given as i i ( )

k

q 0

{ i i ( ) }q 0,k HR x ,q 1 <sup>=</sup> *<sup>G</sup>* <sup>=</sup> holds at the fixed point i <sup>x</sup> . At fixed k, the partial discrete distributed output quantity in space direction Y x,k <sup>i</sup> ( ) is given as a linear combination of elements { <sup>i</sup> ( )}q 0,k HR x,q <sup>=</sup> *<sup>G</sup>* , where the reduced discrete partial distributed characteristics

{ <sup>i</sup> ( )}q 0,k HR x,q <sup>=</sup> *<sup>G</sup>* are multiplied by corresponding elements of the set

=

i i i,k

*<sup>G</sup> <sup>G</sup> G* (4)

Y x,k H x ,k HR x,k U k i i ( ) ( ) ( ) () = ⊕ *G G* ii i (5)

ii i

H (x ,q)U (k q)

*<sup>G</sup>* <sup>−</sup> , in case the relation

{ <sup>i</sup> ( )}i,k *G*H x,k - partial DT impulse responses to the i-th input in space - x - relation

{ <sup>i</sup> ( )}i,k *<sup>G</sup>*HR x,k – reduced partial DT impulse responses to the i-th input in space,

If the reduced DT partial distributed parameter impulse responses are defined as

i

LDS - lumped-input and distributed-parameter-output system { <sup>i</sup>}<sup>i</sup> SA - actuating members of lumped input quantities { <sup>i</sup>}<sup>i</sup> GU - generators of distributed input quantities DDS - distributed-input and distributed-parameter-output system { <sup>i</sup> }<sup>i</sup> **<sup>U</sup>**(t) U (t) <sup>=</sup> - vector of lumped input quantities of LDS { <sup>i</sup> }<sup>i</sup> UA (t) - output quantities of lumped parameter actuators { <sup>i</sup> }<sup>i</sup> U ( ,t) **ξ** - distributed output quantities of generators { <sup>i</sup>}<sup>i</sup> GU U( ,t) **ξ** - overall distributed input quantity for DDS Y( ,t) Y(x, **x** = y,z,t) - distributed output quantity

Input-output dynamics of these DPS can be described, from zero initial conditions, by

$$\mathbf{Y}(\mathbf{x},\mathbf{t}) = \sum\_{i=1}^{n} \mathbf{Y}\_{i}(\mathbf{x},\mathbf{t}) = \sum\_{i=1}^{n} \mathcal{G}\_{i}(\mathbf{x},\mathbf{t}) \otimes \mathbf{U}\_{i}(\mathbf{t}) = \sum\_{i=1}^{n} \int\_{0}^{\mathbf{t}} \mathcal{G}\_{i}(\mathbf{x},\mathbf{t}) \mathbf{U}\_{i}(\mathbf{t} - \mathbf{\tau}) \,\mathrm{d}\mathbf{\tau} \tag{1}$$

or in discrete form

$$\mathbf{Y}(\mathbf{x},\mathbf{k}) = \sum\_{i=1}^{n} \mathbf{Y}\_{i}(\mathbf{x},\mathbf{k}) = \sum\_{i=1}^{n} \mathbf{G} \mathbf{H}\_{i}(\mathbf{x},\mathbf{k}) \oplus \mathbf{U}\_{i}(\mathbf{k}) = \sum\_{i=1}^{n} \sum\_{\mathbf{q}=0}^{k} \mathbf{G} \mathbf{H}\_{i}(\mathbf{x},\mathbf{q}) \mathbf{U}\_{i}(\mathbf{k}-\mathbf{q}) \tag{2}$$

where ⊗ marks convolution product and ⊕ marks convolution sum, *G*i(**x**,t) – distributed parameter impulse response of LDS to the i-th input, *G*Hi(**x**,k) – discrete time (DT) distributed parameter impulse response of LDS with zero-order hold units H - HLDS to the i-th input, Yi(**x**,t) - distributed output quantity of LDS to the i-th input, Yi(**x**,k) – DT distributed output quantity of HLDS to the i-th input. For simplicity in this chapter distributed quantities are considered mostly as continuous scalar quantity fields with unit sampling interval in time domain. Whereas DT distributed parameter step responses { <sup>i</sup>( )}i,k *H*H ,k **<sup>x</sup>** of HLDS can be computed by common analytical or numerical methods then DT distributed parameter impulse responses can be obtained as

$$\left\{\mathcal{G}\mathbb{H}\_{i}\left(\mathbf{x},\mathbf{k}\right) = \mathcal{H}\mathbb{H}\_{i}\left(\mathbf{x},\mathbf{k}\right) - \mathcal{H}\mathbb{H}\_{i}\left(\mathbf{x},\mathbf{k}\cdot\mathbf{1}\right)\right\}\_{i,\mathbf{k}}\tag{3}$$

#### **3. Decomposition of dynamics**

The process of dynamics decomposition shall be started from DT distributed parameter step and impulse responses of the analysed LDS. For an illustration, procedure of decomposition of dynamics and control synthesis will be shown on the LDS with zero-order hold units H – HLDS – distributed only on the interval [0,L , with output quantity ]

() () <sup>n</sup> i i 1 Y x,k Y x,k = <sup>=</sup> discretised in time relation and continuous in space relation on this

interval. Nevertheless the following results are valid in general both for continous or discrete distributed quantities in space relation given on compex-shape definition domains over 3D as well.

Input-output dynamics of these DPS can be described, from zero initial conditions, by

i 1 i 1 i 1

n n n k

i 1 i 1 i 1q 0

= = = =

DT distributed parameter impulse responses can be obtained as

**3. Decomposition of dynamics** 

() () <sup>n</sup> i i 1 Y x,k Y x,k =

over 3D as well.

== =

( )( ) nn n <sup>t</sup> i ii i i <sup>0</sup>

i i i ii

Y( ,k) Y ( ,k) H ( ,k) U (k) H ( ,q)U (k q)

where ⊗ marks convolution product and ⊕ marks convolution sum, *G*i(**x**,t) – distributed parameter impulse response of LDS to the i-th input, *G*Hi(**x**,k) – discrete time (DT) distributed parameter impulse response of LDS with zero-order hold units H - HLDS to the i-th input, Yi(**x**,t) - distributed output quantity of LDS to the i-th input, Yi(**x**,k) – DT distributed output quantity of HLDS to the i-th input. For simplicity in this chapter distributed quantities are considered mostly as continuous scalar quantity fields with unit sampling interval in time domain. Whereas DT distributed parameter step responses { <sup>i</sup>( )}i,k *H*H ,k **<sup>x</sup>** of HLDS can be computed by common analytical or numerical methods then

The process of dynamics decomposition shall be started from DT distributed parameter step and impulse responses of the analysed LDS. For an illustration, procedure of decomposition of dynamics and control synthesis will be shown on the LDS with zero-order hold units H – HLDS – distributed only on the interval [0,L , with output quantity ]

interval. Nevertheless the following results are valid in general both for continous or discrete distributed quantities in space relation given on compex-shape definition domains

<sup>=</sup> discretised in time relation and continuous in space relation on this

= = ⊗ = τ −τ τ **xxx x** *G G* (1)

**xx x** = = ⊕= *G G* **<sup>x</sup>** <sup>−</sup> (2)

{ iii () () ( )}i,k *GHH* H ,k H ,k H ,k-1 **xxx** = − (3)

Y( ,t) Y ( ,t) ( ,t) U (t) , U t d

LDS - lumped-input and distributed-parameter-output system { <sup>i</sup>}<sup>i</sup> SA - actuating members of lumped input quantities { <sup>i</sup>}<sup>i</sup> GU - generators of distributed input quantities

DDS - distributed-input and distributed-parameter-output system

{ <sup>i</sup> }<sup>i</sup> **<sup>U</sup>**(t) U (t) <sup>=</sup> - vector of lumped input quantities of LDS { <sup>i</sup> }<sup>i</sup> UA (t) - output quantities of lumped parameter actuators { <sup>i</sup> }<sup>i</sup> U ( ,t) **ξ** - distributed output quantities of generators { <sup>i</sup>}<sup>i</sup> GU

U( ,t) **ξ** - overall distributed input quantity for DDS Y( ,t) Y(x, **x** = y,z,t) - distributed output quantity

or in discrete form

Fig. 4. i-th discrete distributed parameter impulse response of HLDS *G*H x ,k i i ( ) - partial DT impulse response in time, t - relation to the i-th input considered as response with maximal amplitude in point x 0,L <sup>i</sup> ∈[ ] { <sup>i</sup> ( )}i,k *G*H x,k - partial DT impulse responses to the i-th input in space - x - relation { <sup>i</sup> ( )}i,k *<sup>G</sup>*HR x,k – reduced partial DT impulse responses to the i-th input in space, x – relation for timesteps { }<sup>k</sup> k If the reduced DT partial distributed parameter impulse responses are defined as

$$\left\{\mathcal{G}\text{H}\mathbf{R}\_{\text{i}}(\mathbf{x},\mathbf{k})=\frac{\mathcal{G}\mathbf{H}\_{\text{i}}(\mathbf{x},\mathbf{k})}{\mathcal{G}\mathbf{H}\_{\text{i}}(\mathbf{x}\_{\text{i}},\mathbf{k})}\right\}\_{\text{i},\mathbf{k}}\tag{4}$$

for { i i ( ) }i,k *<sup>G</sup>*H x ,k 0 <sup>≠</sup> , then the i-th DT distributed output quantiy in (2) can be rewritten by the means of the reduced characteristics as follows

$$\mathbf{Y}\_{i}(\mathbf{x},\mathbf{k}) = \mathfrak{G}\mathbf{H}\_{i}(\mathbf{x}\_{i},\mathbf{k})\mathfrak{G}\mathbf{H}\mathbf{R}\_{i}(\mathbf{x},\mathbf{k})\oplus\mathbf{U}\_{i}(\mathbf{k})\tag{5}$$

At fixed i x the partial DT distributed output quantity in time direction Y x ,k is given as i i ( ) the convolution sum *G*H x ,k U k ii i ( ) () ⊕ = k ii i q 0 H (x ,q)U (k q) = *<sup>G</sup>* <sup>−</sup> , in case the relation { i i ( ) }q 0,k HR x ,q 1 <sup>=</sup> *<sup>G</sup>* <sup>=</sup> holds at the fixed point i <sup>x</sup> . At fixed k, the partial discrete distributed output quantity in space direction Y x,k <sup>i</sup> ( ) is given as a linear combination of elements { <sup>i</sup> ( )}q 0,k HR x,q <sup>=</sup> *<sup>G</sup>* , where the reduced discrete partial distributed characteristics { <sup>i</sup> ( )}q 0,k HR x,q <sup>=</sup> *<sup>G</sup>* are multiplied by corresponding elements of the set { ii i ( )( )}q 0,k H x ,q U k q <sup>=</sup> *<sup>G</sup>* <sup>−</sup> ., see Fig. 5.

This decomposition is valid for all given lumped input { <sup>i</sup>}<sup>i</sup> U and corresponding output quantities { <sup>i</sup> ( )}i,k Y x,k - thus we obtain time and space components of HLDS dynamics in the following form:

*Time Components of Dynamics* { i i ( )}i,k *<sup>G</sup>*H x ,k – for given i and chosen xi - variable k *Space Components of Dynamics* { <sup>i</sup>( )}i,k *<sup>G</sup>*HR x,k – for given i and chosen k – variable x Also reduced components of single distributed output quantities are

$$\left\{ \mathbf{Y} \mathbf{R}\_{\mathbf{i}} \left( \mathbf{x}, \mathbf{k} \right) \right\}\_{\mathbf{i}} = \left\{ \frac{\mathbf{Y}\_{\mathbf{i}} \left( \mathbf{x}, \mathbf{k} \right)}{\mathbf{Y}\_{\mathbf{i}} \left( \mathbf{x}\_{\mathbf{i}}, \mathbf{k} \right)} \right\}\_{\mathbf{i}, \mathbf{k}} \tag{6}$$

Control of Distributed Parameter Systems - Engineering Methods

**4. Distributed parameter systems of control** 

For the steady-state, when k → ∞

then in the steady-state

space relation as well.

**4.1 Open-loop control** 

E x, ( ) <sup>∞</sup> in the quadratic norm:

lumped parameter systems of control.

and Software Support in the MATLAB & Simulink Programming Environment 33

() ( ) () n n ii i ii i

i 1 i 1

= =

Y(x, ) Y (x , )YR x, Y x , HR x,

When distributed quantities are used in discrete form as finite sequences of quantities, the discretization in space domain is usually considered by the computational nodes of the numerical model of the controlled DPS over the compex-shape definition domain in 3D.

Based on decomposition of HLDS dynamics into time and space components, possibilities for control synthesis are also suggested by an analogous approach. In this section a methodical framework for the decomposition of control synthesis into space and time problems will be presented by select demonstration control problems. In the space domain control synthesis will be solved as a sequence of approximation tasks on the set of space components of controlled system dynamics, where distributed parameter quantities in particular sampling times are considered as continuous functions on the interval [0,L as ] elements of strictly convex normed linear space **X** with quadratic norm. It is necessary to note as above that the following results are valid in general for DPS given on compexshape definition domains in 3D both for continous or discrete distributed quantities, in the

In the time domain, the control synthesis solutions are based on synthesis methods of DT

Assume the open-loop control of a distributed parameter system, where dynamic characteristics give an ideal representation of controlled system dynamics and V x,t 0 ( ) = , that is with zero initial steady-state, in which all variables involved are equal to zero – see see Fig. 6 for reference. Let us consider a step change of distributed reference quantity - W x,k W x, () ( ) = ∞ , see Fig. 7. For simplicity let the goal of the control synthesis is to generate a sequence of control inputs U k( ) in such fashion that in the steady-state, for k → ∞ , the control error E x,k W x, Y x,k () ( )() = ∞− will approach its minimal value

min E x, min W x, Y x, E x, ( ) ∞ = ∞− ∞ = ∞ ()() ( )

() ( ) () <sup>n</sup> ii i

∞− ∞ ∞ *<sup>H</sup>* (10)

First, an approximation problem will be solved in the space synthesis (SS) block:

i 1 min W x, W x , HR x, =

(9)

{ i i () ()}i,k YR x, HR x, ∞→ ∞ *<sup>H</sup>* (7)

∞= ∞ ∞= ∞ ∞ *<sup>H</sup>* (8)

then { i i ( ) }i,k Y x ,k 0 <sup>≠</sup> can be considered as time components and { <sup>i</sup>( )}i,k YR x,k as space components of the output quantities.

When reduced steady-state distributed parameter transient responses are introduced { i ii ( )} { () ( ) <sup>i</sup> } i i *H HH* HR x, H x, / H x , ∞= ∞ ∞ - for { i i ( ) }<sup>i</sup> *<sup>H</sup>*H x, 0 ∞ ≠ - and discrete transfer functions { i i ( )}<sup>i</sup> SH x ,z are assigned to partial distributed parameter transient responses with maximal amplitudes at points { <sup>i</sup>}<sup>i</sup> x on the interval [0,L , we obtain time and space ] components of HLDS dynamics for steady-state as:

*Time Components of Dynamics* { i i ( )}<sup>i</sup> SH x ,z - for given i and chosen xi - variable z *Space Components of Dynamics* { <sup>i</sup> ( )}<sup>i</sup> *<sup>H</sup>*HR x,<sup>∞</sup> - for given i in ∞ – variable x

Fig. 5. Partial distributed output quantities in time and space direction

Ui - i-th DT lumped input quantity

Y x ,k - i-th partial DT distributed output qu i i ( ) antity in time domain at chosen point <sup>i</sup> x

Y x,k <sup>i</sup> ( ) / YR x,k <sup>i</sup> ( ) - i-th partial distributed output/reduced output quantity in space direction

For the steady-state, when k → ∞

$$\left\{ \mathbf{Y} \mathsf{R}\_{\mathrm{i}} (\mathsf{x}\_{\mathsf{'}} \mathsf{s}\_{\mathsf{'}}) \to \mathsf{M} \mathsf{H} \mathsf{R}\_{\mathrm{i}} (\mathsf{x}\_{\mathsf{'}} \mathsf{s}\_{\mathsf{'}}) \right\}\_{\mathsf{i},\mathsf{k}} \tag{7}$$

then in the steady-state

32 MATLAB for Engineers – Applications in Control, Electrical Engineering, IT and Robotics

This decomposition is valid for all given lumped input { <sup>i</sup>}<sup>i</sup> U and corresponding output quantities { <sup>i</sup> ( )}i,k Y x,k - thus we obtain time and space components of HLDS dynamics in

*Time Components of Dynamics* { i i ( )}i,k *<sup>G</sup>*H x ,k – for given i and chosen xi - variable k

*Space Components of Dynamics* { <sup>i</sup>( )}i,k *<sup>G</sup>*HR x,k – for given i and chosen k – variable x

i i

*Time Components of Dynamics* { i i ( )}<sup>i</sup> SH x ,z - for given i and chosen xi - variable z

*Space Components of Dynamics* { <sup>i</sup> ( )}<sup>i</sup> *<sup>H</sup>*HR x,<sup>∞</sup> - for given i in ∞ – variable x

Fig. 5. Partial distributed output quantities in time and space direction

Y x ,k - i-th partial DT distributed output qu i i ( ) antity in time domain at chosen point <sup>i</sup> x

Y x,k <sup>i</sup> ( ) / YR x,k <sup>i</sup> ( ) - i-th partial distributed output/reduced output quantity in space

Ui - i-th DT lumped input quantity

direction

{ } ( ) ( )

Y x,k YR x,k Y x ,k

then { i i ( ) }i,k Y x ,k 0 <sup>≠</sup> can be considered as time components and { <sup>i</sup>( )}i,k YR x,k as space

When reduced steady-state distributed parameter transient responses are introduced { i ii ( )} { () ( ) <sup>i</sup> } i i *H HH* HR x, H x, / H x , ∞= ∞ ∞ - for { i i ( ) }<sup>i</sup> *<sup>H</sup>*H x, 0 ∞ ≠ - and discrete transfer functions { i i ( )}<sup>i</sup> SH x ,z are assigned to partial distributed parameter transient responses with maximal amplitudes at points { <sup>i</sup>}<sup>i</sup> x on the interval [0,L , we obtain time and space ]

( ) i

i i i,k

<sup>=</sup> (6)

Also reduced components of single distributed output quantities are

the following form:

components of the output quantities.

components of HLDS dynamics for steady-state as:

$$\mathbf{Y}(\mathbf{x},\boldsymbol{\omega}\circ) = \sum\_{i=1}^{n} \mathbf{Y}\_{i}(\mathbf{x}\_{i},\boldsymbol{\omega}\circ) \mathbf{Y} \mathbf{R}\_{i}\left(\mathbf{x},\boldsymbol{\omega}\circ\right) = \sum\_{i=1}^{n} \mathbf{Y}\_{i}\left(\mathbf{x}\_{i},\boldsymbol{\omega}\circ\right) \mathcal{H} \mathbf{H} \mathbf{R}\_{i}\left(\mathbf{x},\boldsymbol{\omega}\circ\right) \tag{8}$$

When distributed quantities are used in discrete form as finite sequences of quantities, the discretization in space domain is usually considered by the computational nodes of the numerical model of the controlled DPS over the compex-shape definition domain in 3D.

#### **4. Distributed parameter systems of control**

Based on decomposition of HLDS dynamics into time and space components, possibilities for control synthesis are also suggested by an analogous approach. In this section a methodical framework for the decomposition of control synthesis into space and time problems will be presented by select demonstration control problems. In the space domain control synthesis will be solved as a sequence of approximation tasks on the set of space components of controlled system dynamics, where distributed parameter quantities in particular sampling times are considered as continuous functions on the interval [0,L as ] elements of strictly convex normed linear space **X** with quadratic norm. It is necessary to note as above that the following results are valid in general for DPS given on compexshape definition domains in 3D both for continous or discrete distributed quantities, in the space relation as well.

In the time domain, the control synthesis solutions are based on synthesis methods of DT lumped parameter systems of control.

#### **4.1 Open-loop control**

Assume the open-loop control of a distributed parameter system, where dynamic characteristics give an ideal representation of controlled system dynamics and V x,t 0 ( ) = , that is with zero initial steady-state, in which all variables involved are equal to zero – see see Fig. 6 for reference. Let us consider a step change of distributed reference quantity - W x,k W x, () ( ) = ∞ , see Fig. 7. For simplicity let the goal of the control synthesis is to generate a sequence of control inputs U k( ) in such fashion that in the steady-state, for k → ∞ , the control error E x,k W x, Y x,k () ( )() = ∞− will approach its minimal value E x, ( ) <sup>∞</sup> in the quadratic norm:

$$\min \left\| \mathbb{E} \left( \mathbf{x}\_{\prime \prime \ast} \right) \right\| = \min \left\| \mathbb{W} \left( \mathbf{x}\_{\prime \prime \ast} \right) - \mathbb{Y} \left( \mathbf{x}\_{\prime \prime \ast} \right) \right\| = \left\| \bar{\mathbb{E}} \left( \mathbf{x}\_{\prime \prime \ast} \right) \right\| \tag{9}$$

First, an approximation problem will be solved in the space synthesis (SS) block:

$$\min \left\| \mathbf{W} \left( \mathbf{x}\_{\prime \prime \ast} \right) - \sum\_{i=1}^{n} \mathbf{W}\_{i} \left( \mathbf{x}\_{i \prime \ast} \right) \mathcal{H} \mathbf{H} \mathbf{R}\_{i} \left( \mathbf{x}\_{\prime \prime \ast} \right) \right\| \tag{10}$$

Control of Distributed Parameter Systems - Engineering Methods

n

min W x, W x , HR x,

i 1 n

=

i 1

=

Fig. 7. Step change of distributed reference quantity HLDS - controlled system with zero-order hold units

Fig. 8. Solution of the approximation problem

{ <sup>i</sup>}<sup>i</sup> U - lumped control quantities

HLDS - controlled system with zero-order hold units

{ i ii } { ( )} i i W W x, = ∞ - optimal approximation parameters, lumped references

{ <sup>i</sup> ( )}<sup>i</sup> *<sup>H</sup>*HR x,<sup>∞</sup> - reduced steady-state distributed parameter transient responses

W x,k W () ( ) = ∞ x, - step change of distributed reference quantity

{ <sup>i</sup>}<sup>i</sup> U - lumped control quantities

and Software Support in the MATLAB & Simulink Programming Environment 35

() ( ) () () ()

(11)

W x, W x , HR x, W x, WO x,

= ∞− ∞ ∞ = ∞− ∞

() ( ) ()

ii i

ii i

*H*

∞− ∞ ∞ =

*H*

Fig. 6. Distributed parameter open-loop system of control

LDS - lumped-input and distributed-parameter-output system

H - zero-order hold units

HLDS - controlled system with zero-order hold units

CS - control synthesis

TS - time part of control synthesis

SS - space part of control synthesis

Y x,t /W x,k W x, () ( ) ( ) = ∞ - distributed controlled/reference quantity

V x,t ( ) - distributed disturbance quantity

W <sup>=</sup>{ i i ( )}<sup>i</sup> W x,<sup>∞</sup> - vector of lumped reference quantities

U k( ) - vector of lumped control quantities

{ ii i ( ) ()}<sup>i</sup> SH x ,z / HR x, *<sup>H</sup>* <sup>∞</sup> - time/space components of controlled system dynamics

where { <sup>i</sup> ( )}<sup>i</sup> *<sup>H</sup>*HR x,∞ are steady-state reduced distributed parameter transient responses of the controlled system – HLDS and { i i ( )} W x, <sup>i</sup> <sup>∞</sup> are parameters of approximation. Functions

{ <sup>i</sup> ( )}<sup>i</sup> *<sup>H</sup>*HR x,<sup>∞</sup> form a finite-dimensional subspace of approximation functions *Fn* in the strictly convex normed linear space of distributed parameter quantities **X** on [0,L with ] quadratic norm, where the approximation problem is to be solved, see Fig. 8. for reference. From approximation theory in this relation is known the theorem:

*Let Fn be a finite-dimensional subspace of a strictly convex normed linear space X. Then, for each f*∈ *X, there exists a unique element of best approximation.* 

(Shadrin, 2005). So the solution of the approximation problem (10) is guaranteed as a unique

best approximation () ( ) () <sup>n</sup> ii i i 1 WO x, W x , HR x, = ∞= ∞ ∞ *<sup>H</sup>* , where { i i ( )}<sup>i</sup> W W x, = ∞ is the

vector of optimal approximation parameters. Hence:

Fig. 6. Distributed parameter open-loop system of control

HLDS - controlled system with zero-order hold units

H - zero-order hold units

TS - time part of control synthesis SS - space part of control synthesis

V x,t ( ) - distributed disturbance quantity

U k( ) - vector of lumped control quantities

CS - control synthesis

W 

LDS - lumped-input and distributed-parameter-output system

Y x,t /W x,k W x, () ( ) ( ) = ∞ - distributed controlled/reference quantity

{ ii i ( ) ()}<sup>i</sup> SH x ,z / HR x, *<sup>H</sup>* <sup>∞</sup> - time/space components of controlled system dynamics

where { <sup>i</sup> ( )}<sup>i</sup> *<sup>H</sup>*HR x,∞ are steady-state reduced distributed parameter transient responses of the controlled system – HLDS and { i i ( )} W x, <sup>i</sup> <sup>∞</sup> are parameters of approximation. Functions { <sup>i</sup> ( )}<sup>i</sup> *<sup>H</sup>*HR x,<sup>∞</sup> form a finite-dimensional subspace of approximation functions *Fn* in the strictly convex normed linear space of distributed parameter quantities **X** on [0,L with ] quadratic norm, where the approximation problem is to be solved, see Fig. 8. for reference.

*Let Fn be a finite-dimensional subspace of a strictly convex normed linear space X. Then, for each* 

(Shadrin, 2005). So the solution of the approximation problem (10) is guaranteed as a unique

∞= ∞ ∞ *<sup>H</sup>* , where { i i ( )}<sup>i</sup> W W x, = ∞

is the

ii i

<sup>=</sup>{ i i ( )}<sup>i</sup> W x,<sup>∞</sup> - vector of lumped reference quantities

From approximation theory in this relation is known the theorem:

i 1 WO x, W x , HR x, =

*f*∈ *X, there exists a unique element of best approximation.* 

vector of optimal approximation parameters. Hence:

best approximation () ( ) () <sup>n</sup>

$$\begin{aligned} &\min \left\| \mathbf{W} \left( \mathbf{x}\_{\prime \prime \circ} \right) - \sum\_{i=1}^{n} \mathbf{W}\_{i} \left( \mathbf{x}\_{i} \, \circ \right) \mathcal{H} \mathbf{R}\_{i} \left( \mathbf{x}\_{\prime \prime \circ} \right) \right\| = \\ &= \left\| \mathbf{W} \left( \mathbf{x}\_{\prime \prime \circ} \right) - \sum\_{i=1}^{n} \bar{\mathbf{W}}\_{i} \left( \mathbf{x}\_{i} \, \circ \right) \mathcal{H} \mathbf{R}\_{i} \left( \mathbf{x}\_{\prime \prime \circ} \right) \right\| = \left\| \mathbf{W} \left( \mathbf{x}\_{\prime \prime \circ} \right) - \bar{\mathbf{W}} \mathbf{O} \left( \mathbf{x}\_{\prime \prime \circ} \right) \right\| \end{aligned} \tag{11}$$

Fig. 7. Step change of distributed reference quantity

HLDS - controlled system with zero-order hold units { <sup>i</sup>}<sup>i</sup> U - lumped control quantities

W x,k W () ( ) = ∞ x, - step change of distributed reference quantity

Fig. 8. Solution of the approximation problem

HLDS - controlled system with zero-order hold units { <sup>i</sup>}<sup>i</sup> U - lumped control quantities { i ii } { ( )} i i W W x, = ∞ - optimal approximation parameters, lumped references { <sup>i</sup> ( )}<sup>i</sup> *<sup>H</sup>*HR x,<sup>∞</sup> - reduced steady-state distributed parameter transient responses

Control of Distributed Parameter Systems - Engineering Methods


{ <sup>i</sup> ( )}i,k U k - lumped control quantities

for k → ∞ converging to reference quantities

see Fig. 9. – 10. for reference.

{ i i ( )}i,k E x ,k

W k /U k ( ) ( )

{ i i ( )} { i ii } { ( )} i,k <sup>i</sup> <sup>i</sup> Y x ,k / W W x , = ∞ - controlled/reference quantities


When the individual components of the vector { i i ( )}<sup>i</sup> W W x, = ∞

and Software Support in the MATLAB & Simulink Programming Environment 37

control loops: { ii i ( ) ()}<sup>i</sup> SH x ,z ,R z , the control processes take place. The applied control laws result in the sequences of control inputs: { <sup>i</sup> ( )}i,k U k , and respectively the output quantities,

Values of these lumped controlled quantities in new steady-state will be further denoted as

Fig. 10. Quantities of distributed parameter open-loop control in new steady-state

{ ii i ii () ()}<sup>i</sup> Y x , /W W x , ∞= ∞ - controlled/reference quantities in new steady-state

HLDS - controlled system with zero-order hold units

Y x, ( ) <sup>∞</sup> - controlled distributed quantity in new steady-state

{ <sup>i</sup>}<sup>i</sup> U - lumped control quantities

{ i i ( )}<sup>i</sup> E x,<sup>∞</sup> - lumped control errors

are input in the particular

{ ii ii ii () ( ) ( )}i,k Y x ,k Y x , W x , → ∞= ∞ (13)

{ ii ii () ()}<sup>i</sup> Y x, W x, ∞= ∞ (14)

W x, ( ) ∞ - distributed reference quantity

WO x, ( ) <sup>∞</sup> - unique best approximation of reference quantity

Let us assume vector W enters the block of time synthesis (TS). In this block, there are "n" single-input /single-output (SISO) lumped parameter control loops: { ii i ( ) ()}<sup>i</sup> SH x ,z ,R z , see Fig. 9. for reference. The controlled systems of these loops are lumped parameter systems assigned to HLDS as time components of dynamics: { i i ( )}<sup>i</sup> SH x ,z . Controllers, { <sup>i</sup> ( )}<sup>i</sup> R z , are to be chosen such that for k → ∞ the following relation holds:

$$\mathbb{E}\left[\lim\_{\mathbf{k}\to\boldsymbol{\ast}}\breve{\mathbf{E}}\_{\mathbf{i}}\left(\mathbf{x}\_{\mathbf{i}},\mathbf{k}\right)=\lim\_{\mathbf{k}\to\boldsymbol{\ast}}\bigg[\breve{W}\_{\mathbf{i}}\left(\mathbf{x}\_{\mathbf{i}},\boldsymbol{\ast}\right)-\varUpsilon\_{\mathbf{i}}\left(\mathbf{x}\_{\mathbf{i}},\mathbf{k}\right)\bigg]=0\bigg]\_{\mathbf{i},\mathbf{k}}\tag{12}$$

Fig. 9. SISO lumped parameter control loops in the block TS

TS - time part of control synthesis

{ i i ( )}<sup>i</sup> SH x ,z - time components of HLDS dynamics

{ <sup>i</sup> ( )}<sup>i</sup> R z - lumped parameter controllers

{ i i ( )} { i ii } { ( )} i,k <sup>i</sup> <sup>i</sup> Y x ,k / W W x , = ∞ - controlled/reference quantities { i i ( )}i,k E x ,k - lumped control errors { <sup>i</sup> ( )}i,k U k - lumped control quantities

W k /U k ( ) ( ) - vector of lumped reference/control quantities

When the individual components of the vector { i i ( )}<sup>i</sup> W W x, = ∞ are input in the particular control loops: { ii i ( ) ()}<sup>i</sup> SH x ,z ,R z , the control processes take place. The applied control laws result in the sequences of control inputs: { <sup>i</sup> ( )}i,k U k , and respectively the output quantities, for k → ∞ converging to reference quantities

$$\left\{ \mathbf{Y}\_{\mathrm{i}} \left( \mathbf{x}\_{\mathrm{i}}, \mathbf{k} \right) \to \mathbf{Y}\_{\mathrm{i}} \left( \mathbf{x}\_{\mathrm{i}}, \rightsquigarrow \right) = \bar{\mathbf{W}}\_{\mathrm{i}} \left( \mathbf{x}\_{\mathrm{i}}, \rightsquigarrow \right) \right\}\_{\mathrm{i}, \mathrm{k}} \tag{13}$$

Values of these lumped controlled quantities in new steady-state will be further denoted as

$$\left\{ \bar{\mathbf{Y}}\_{\mathbf{i}} \left( \mathbf{x}\_{\mathbf{i}}, \leadsto \right) = \bar{\mathbf{W}}\_{\mathbf{i}} \left( \mathbf{x}\_{\mathbf{i}}, \leadsto \right) \right\}\_{\mathbf{i}} \tag{14}$$

see Fig. 9. – 10. for reference.

36 MATLAB for Engineers – Applications in Control, Electrical Engineering, IT and Robotics

single-input /single-output (SISO) lumped parameter control loops: { ii i ( ) ()}<sup>i</sup> SH x ,z ,R z , see Fig. 9. for reference. The controlled systems of these loops are lumped parameter systems assigned to HLDS as time components of dynamics: { i i ( )}<sup>i</sup> SH x ,z . Controllers, { <sup>i</sup> ( )}<sup>i</sup> R z , are

> { i i () ( )() ii ii } k k i,k lim E x ,k lim W x , Y x ,k 0

= ∞− = 

enters the block of time synthesis (TS). In this block, there are "n"

(12)

W x, ( ) ∞ - distributed reference quantity

Let us assume vector W

WO x, ( ) <sup>∞</sup> - unique best approximation of reference quantity

to be chosen such that for k → ∞ the following relation holds:

Fig. 9. SISO lumped parameter control loops in the block TS

{ i i ( )}<sup>i</sup> SH x ,z - time components of HLDS dynamics

TS - time part of control synthesis

{ <sup>i</sup> ( )}<sup>i</sup> R z - lumped parameter controllers

→∞ →∞

{ <sup>i</sup>}<sup>i</sup> U - lumped control quantities { ii i ii () ()}<sup>i</sup> Y x , /W W x , ∞= ∞ - controlled/reference quantities in new steady-state { i i ( )}<sup>i</sup> E x,<sup>∞</sup> - lumped control errors Y x, ( ) <sup>∞</sup> - controlled distributed quantity in new steady-state

Control of Distributed Parameter Systems - Engineering Methods

time components of partial output quantities { i i ( )}<sup>i</sup> Y x ,k

{ ii ii ii () ( )()}<sup>i</sup> E x ,k W x , Y x ,k = ∞− . These sequences { i i ( )}<sup>i</sup> E x ,k

and give { <sup>i</sup> ( )}<sup>i</sup> U k , which enter into HLDS with { i i ( )}<sup>i</sup> Y x ,k

parameter control loops { ii i ( ) ()}<sup>i</sup> SH x ,z ,R z , Fig. 9.

subspace of { <sup>i</sup> ( )}i,k YR x,k

U k and { i i ( )}<sup>i</sup> Y x ,k 

components of output quantity

{ <sup>i</sup> ( )}<sup>i</sup>

and Software Support in the MATLAB & Simulink Programming Environment 39

generated. Block TS in Fig. 12., contains the controllers{ <sup>i</sup> ( )}<sup>i</sup> R z designed as the controllers for SISO lumped parameter control loops { ii i ( ) ()}<sup>i</sup> SH x ,z ,R z with respect to the request formulated by equation (12). In the k-th step in block SS2 at approximation of Y x,k ( ) on the

> () ( ) () <sup>n</sup> ii i

<sup>−</sup> (19)

there are relations { i i ( )}<sup>i</sup> SH x ,z . - This analysis of control

are obtained, in block SS1

enter into the TS on{ <sup>i</sup> ( )}<sup>i</sup>

on the SS2 output - among

R z

i 1 min Y x,k Y x ,k YR x,k =

reference quantities { i i ( )}<sup>i</sup> W x,<sup>∞</sup> are computed. Then on the output of the algebraic block is

synthesis process shows that synthesis in time domain is realized on the level of one

Fig. 11. Distributed parameter closed-loop system of control with reduced space

W x, ( ) ∞ - distributed reference quantity

WO x, ( ) <sup>∞</sup> - unique best approximation of reference quantity

E x, ( ) <sup>∞</sup> - distributed control error with minimal norm

Then according to equations (12-14) for the new steady-state it holds: { ii i ii i ( ) () ( ) ()}<sup>i</sup> Y x , HR x, W x , HR x, ∞ ∞= ∞ ∞ *H H* , which implies that the overall distributed output quantity at the time k → ∞ : Y x, ( ) <sup>∞</sup> gives the unique best approximation of the distributed reference variable: W x, ( ) ∞

$$\bar{\mathbf{Y}}(\mathbf{x},\boldsymbol{\omega}\circ\rangle = \sum\_{i=1}^{n} \bar{\mathbf{Y}}\_{i}(\mathbf{x}\_{i},\boldsymbol{\omega}\circ\rangle \mathcal{H}\mathbf{H}\mathbf{R}\_{i}(\mathbf{x},\boldsymbol{\omega}\circ\rangle = \sum\_{i=1}^{n} \bar{\mathbf{W}}\_{i}(\mathbf{x}\_{i},\boldsymbol{\omega}\circ\rangle \mathcal{H}\mathbf{H}\mathbf{R}\_{i}(\mathbf{x},\boldsymbol{\omega}\circ\rangle = \bar{\mathbf{W}}\mathbf{O}\left(\mathbf{x},\boldsymbol{\omega}\circ\right) \tag{15}$$

Therefore the control error has a unique form as well, with minimal quadratic norm

$$\begin{aligned} \left\| \bar{\mathcal{E}} \left( \mathbf{x}, \curvearrowright \right) \right\| &= \left\| \mathcal{W} \left( \mathbf{x}, \curvearrowright \right) - \bar{\mathcal{Y}} \left( \mathbf{x}, \curvearrowright \right) \right\| = \left\| \mathcal{W} \left( \mathbf{x}, \curvearrowright \right) - \sum\_{i=1}^{n} \bar{\mathcal{Y}}\_{i} \left( \mathbf{x}\_{i}, \curvearrowright \right) \mathcal{H} \mathrm{IR}\_{i} \left( \mathbf{x}, \curvearrowright \right) \right\| \\ &= \left\| \mathcal{W} \left( \mathbf{x}, \curvearrowright \right) - \sum\_{i=1}^{n} \bar{\mathcal{W}}\_{i} \left( \mathbf{x}\_{i}, \curvearrowright \right) \mathcal{H} \mathrm{IR}\_{i} \left( \mathbf{x}, \curvearrowright \right) \right\| = \left\| \mathcal{W} \left( \mathbf{x}, \curvearrowright \right) - \bar{\mathcal{W}} \mathcal{O} \left( \mathbf{x}, \curvearrowright \right) \right\| \end{aligned} \tag{16}$$

Thus the control task, defined at equation (9), is accomplished with { i i ( ) }<sup>i</sup> E x, 0 ∞ = - see Fig. 10. for reference. As the conclusion of this section we may state that the control synthesis in open-loop control system is realized as:

*Time Tasks of Control Synthesis* – in lumped parameter control loops

*Space Tasks of Control Synthesis* – as approximation task.

When mathematical models cannot provide an ideal representation of controlled DPS dynamics and disturbances are present with an overall effect on the output in steady-state expressed by EY x, ( ) ∞ then

$$\begin{aligned} \left\|\mathbf{W}(\mathbf{x},\boldsymbol{\omega}\circ)-\bar{\mathbf{Y}}(\mathbf{x},\boldsymbol{\omega}\circ)\pm\mathrm{EY}(\mathbf{x},\boldsymbol{\omega}\circ)\right\| &\leq \left\|\mathbf{W}(\mathbf{x},\boldsymbol{\omega}\circ)-\bar{\mathbf{Y}}(\mathbf{x},\boldsymbol{\omega}\circ)\right\| + \left\|\mathrm{EY}(\mathbf{x},\boldsymbol{\omega}\circ)\right\| = \\ \left\|\mathbf{W}(\mathbf{x},\boldsymbol{\omega}\circ)-\bar{\mathbf{W}}\mathbf{O}(\mathbf{x},\boldsymbol{\omega}\circ)\right\| + \left\|\mathrm{EY}(\mathbf{x},\boldsymbol{\omega}\circ)\right\| &= \left\|\bar{\mathbf{E}}(\mathbf{x},\boldsymbol{\omega}\circ)\right\| + \left\|\mathrm{EY}(\mathbf{x},\boldsymbol{\omega}\circ)\right\| \end{aligned} \tag{17}$$

Finally at the design stage of a control system, for a given desired quality of control δ in space domain, it is necessary to choose appropriate number and layout of actuators for the fulfillment of this requirement

$$\left\|\bar{\mathbf{E}}\left(\mathbf{x}\_{\prime}\approx\right)\right\| + \left\|\mathbf{E}Y(\mathbf{x}\_{\prime}\approx)\right\| \leq \delta \tag{18}$$

#### **4.2 Closed-loop control with block RHLDS**

Let us consider now a distributed parameter feedback control loop with initial conditions identical as the case above, see Fig. 11. In blocks SS1 a SS2 approximation problems are solved while in block RHLDS reduced distributed output quantities { <sup>i</sup>( )}i,k YR x,k are

Then according to equations (12-14) for the new steady-state it holds: { ii i ii i ( ) () ( ) ()}<sup>i</sup> Y x , HR x, W x , HR x, ∞ ∞= ∞ ∞ *H H* , which implies that the overall distributed output quantity at the time k → ∞ : Y x, ( ) <sup>∞</sup> gives the unique best approximation of the

> () ( ) () ( ) () () n n ii i ii i

( ) ()() () ( ) ()

Thus the control task, defined at equation (9), is accomplished with { i i ( ) }<sup>i</sup> E x, 0 ∞ = - see Fig. 10. for reference. As the conclusion of this section we may state that the control synthesis in

When mathematical models cannot provide an ideal representation of controlled DPS dynamics and disturbances are present with an overall effect on the output in steady-state

()() () ()() ( )

Finally at the design stage of a control system, for a given desired quality of control δ in space domain, it is necessary to choose appropriate number and layout of actuators for the

Let us consider now a distributed parameter feedback control loop with initial conditions identical as the case above, see Fig. 11. In blocks SS1 a SS2 approximation problems are solved while in block RHLDS reduced distributed output quantities { <sup>i</sup>( )}i,k YR x,k are

∞− ∞± ∞ ≤ ∞− ∞ + ∞ =

(17)

E x, EY x, ( ) ∞ + ∞ ≤δ ( ) (18)

() () ( ) ( ) ( )

∞− ∞ + ∞ = ∞ + ∞

W x, WO x, EY x, E x, EY x,

W x, Y x, EY x, W x, Y x, EY x,

∞ = ∞− ∞ = ∞− ∞ ∞ =

E x, W x, Y x, W x, Y x , HR x,

∞ ∞ ∞= ∞ ∞= ∞ <sup>=</sup> *H H* (15)

n

i 1

=

ii i

*H*

(16)

Y x, Y x , HR x, W x , HR x, WO x,

Therefore the control error has a unique form as well, with minimal quadratic norm

() ( ) () () ()

∞− ∞ ∞ = ∞− ∞

W x, W x , HR x, W x, WO x,

W x, ( ) ∞ - distributed reference quantity

distributed reference variable: W x, ( ) ∞

n

i 1

=

open-loop control system is realized as:

expressed by EY x, ( ) ∞ then

fulfillment of this requirement

**4.2 Closed-loop control with block RHLDS** 

WO x, ( ) <sup>∞</sup> - unique best approximation of reference quantity

i 1 i 1

= =

ii i

*Time Tasks of Control Synthesis* – in lumped parameter control loops

*Space Tasks of Control Synthesis* – as approximation task.

*H*

E x, ( ) <sup>∞</sup> - distributed control error with minimal norm

generated. Block TS in Fig. 12., contains the controllers{ <sup>i</sup> ( )}<sup>i</sup> R z designed as the controllers for SISO lumped parameter control loops { ii i ( ) ()}<sup>i</sup> SH x ,z ,R z with respect to the request formulated by equation (12). In the k-th step in block SS2 at approximation of Y x,k ( ) on the subspace of { <sup>i</sup> ( )}i,k YR x,k

$$\min \left\| \mathbf{Y}(\mathbf{x}, \mathbf{k}) - \sum\_{i=1}^{n} \mathbf{Y}\_{i}(\mathbf{x}\_{i}, \mathbf{k}) \mathbf{Y} \mathbf{R}\_{i}(\mathbf{x}, \mathbf{k}) \right\| \tag{19}$$

time components of partial output quantities { i i ( )}<sup>i</sup> Y x ,k are obtained, in block SS1 reference quantities { i i ( )}<sup>i</sup> W x,<sup>∞</sup> are computed. Then on the output of the algebraic block is { ii ii ii () ( )()}<sup>i</sup> E x ,k W x , Y x ,k = ∞− . These sequences { i i ( )}<sup>i</sup> E x ,k enter into the TS on{ <sup>i</sup> ( )}<sup>i</sup> R z and give { <sup>i</sup> ( )}<sup>i</sup> U k , which enter into HLDS with { i i ( )}<sup>i</sup> Y x ,k on the SS2 output - among { <sup>i</sup> ( )}<sup>i</sup> U k and { i i ( )}<sup>i</sup> Y x ,k there are relations { i i ( )}<sup>i</sup> SH x ,z . - This analysis of control synthesis process shows that synthesis in time domain is realized on the level of one parameter control loops { ii i ( ) ()}<sup>i</sup> SH x ,z ,R z , Fig. 9.

Fig. 11. Distributed parameter closed-loop system of control with reduced space components of output quantity

Control of Distributed Parameter Systems - Engineering Methods

Fig. 13. Lumped parameter SISO control loops – i-th control loop

SH x ,z - i-th time component of HLDS dynamics i i ( )

Y x ,k /U k ii i ( ) () - i-th controlled/control quantity

W x ,k /E x ,k ii ii ()() - i-th desired quantity/control error

equation (9), is accomplished as given by relation (16).

*Space Tasks of Control Synthesis* – as approximation tasks.

R z - i-th lumped parameter controller i ( )

synthesis is realized as:

in timestep k is obtained

the block SS2 -{ i i ( )}<sup>i</sup> Y x ,k

where E x,k ( )

approximation set { <sup>i</sup> ( )}i,k YR x,k

and Software Support in the MATLAB & Simulink Programming Environment 41

If for k → ∞ { i i () ( )}i,k YR x,k HR x, → ∞ *<sup>H</sup>* ,{ ii ii ()()} { ii ii () ()} i,k <sup>i</sup> Y x ,k Y x ,k Y x , W x , = → ∞= ∞

along with { ii ii () ( ) }i,k E x ,k E x , 0 → ∞= - this actually means that the control task defined in

Finally we may state as a summary, that in closed-loop control with RHLDS the control

At the same time the solution of the approximation problem in block SS1 on the

i 1 min W x, W x ,k YR x,k =

( ) ( ) () <sup>n</sup> ii i

( ) ( ) ()() <sup>n</sup> ii i

is the unique element at the best approximation of W x, ( ) <sup>∞</sup> on the set of

in the timestep k distributed output quantity Y x,k is given as ( )

W x, W x ,k YR x,k E x,k

approximate functions { <sup>i</sup> ( )}<sup>i</sup> YR x,k . Similary by the solution of approximation problem in

() ( ) () <sup>n</sup> ii i

i 1 Y x,k Y x ,k YR x,k

=

∞ − (20)

<sup>=</sup> (22)

∞ = <sup>+</sup> (21)

*Time Tasks of Control Synthesis* – on the level of lumped parameter control loops

i 1

=

HLDS - controlled system with zero-order hold units RHLDS - model for reduced space components: { <sup>i</sup> ( )}i,k YR x,k CS - control synthesis TS/SS1,SS2 - time/space parts of control synthesis K - time/space sampling Y x,t ( ) - distributed output quantity W x, ,V x,t ( )( ) ∞ - reference and disturbance quantities { i i ( )} { i i ( )} i,k i,k Y x ,k Y x ,k <sup>=</sup> – time components of output quantity { i ii ( )}<sup>i</sup> W W x, = ∞ /{ i i ( )}i,k E x ,k - reference quantities/control errors U k( ) - vector of lumped control quantities

Fig. 12. The block of time synthesis

TS - time part of control synthesis

{ <sup>i</sup> ( )}<sup>i</sup> R z - lumped parameter controllers

() ( ) { i i }i,k E k E x ,k <sup>=</sup> - vector of lumped control errors

() () { <sup>i</sup> }i,k Uk U k <sup>=</sup> - vector of lumped control quantities

For k → ∞ { i i () ( )}i,k YR x,k HR x, → ∞ *<sup>H</sup>* , { i i ( )} { ii ii () ()} i,k <sup>i</sup> Y x ,k Y x , W x , → ∞= ∞ along with { ii ii () ( ) }i,k E x ,k E x , 0 → ∞= . Thus the control task, defined by equation (9) is accomplished as given by relation (16). In case of the uncertainty of the control process relations similar to (17-18) are also valid.

Let´s consider now the approximation of W x, ( ) ∞ in the block SS1 in timestep k, on the set of { <sup>i</sup> ( )}i,k YR x,k . Then in the control process sequences of quantities { i i ( )}i,k <sup>W</sup> x ,k are obtained, as desired quantities of SISO control loops { ii i ( ) ()}<sup>i</sup> SH x ,z ,R z which are closed throughout the blocks TS, HLDS and SS2, see Fig. 13.

Fig. 13. Lumped parameter SISO control loops – i-th control loop

SH x ,z - i-th time component of HLDS dynamics i i ( )

R z - i-th lumped parameter controller i ( )

40 MATLAB for Engineers – Applications in Control, Electrical Engineering, IT and Robotics


For k → ∞ { i i () ( )}i,k YR x,k HR x, → ∞ *<sup>H</sup>* , { i i ( )} { ii ii () ()} i,k <sup>i</sup> Y x ,k Y x , W x , → ∞= ∞ along with

{ ii ii () ( ) }i,k E x ,k E x , 0 → ∞= . Thus the control task, defined by equation (9) is accomplished as given by relation (16). In case of the uncertainty of the control process relations similar to

Let´s consider now the approximation of W x, ( ) ∞ in the block SS1 in timestep k, on the set of { <sup>i</sup> ( )}i,k YR x,k . Then in the control process sequences of quantities { i i ( )}i,k

obtained, as desired quantities of SISO control loops { ii i ( ) ()}<sup>i</sup> SH x ,z ,R z which are closed

<sup>W</sup> x ,k are

HLDS - controlled system with zero-order hold units

TS/SS1,SS2 - time/space parts of control synthesis

W x, ,V x,t ( )( ) ∞ - reference and disturbance quantities

{ i i ( )} { i i ( )} i,k i,k Y x ,k Y x ,k <sup>=</sup> – time components of output quantity

CS - control synthesis

K - time/space sampling

Y x,t ( ) - distributed output quantity

U k( ) - vector of lumped control quantities

{ i ii ( )}<sup>i</sup> W W x, = ∞ /{ i i ( )}i,k E x ,k

Fig. 12. The block of time synthesis TS - time part of control synthesis

() ( ) { i i }i,k E k E x ,k <sup>=</sup>

(17-18) are also valid.

{ <sup>i</sup> ( )}<sup>i</sup> R z - lumped parameter controllers


() () { <sup>i</sup> }i,k Uk U k <sup>=</sup> - vector of lumped control quantities

throughout the blocks TS, HLDS and SS2, see Fig. 13.

RHLDS - model for reduced space components: { <sup>i</sup> ( )}i,k YR x,k

Y x ,k /U k ii i ( ) () - i-th controlled/control quantity

W x ,k /E x ,k ii ii ()() - i-th desired quantity/control error

$$\begin{aligned} \text{1\text{\textquotedblleft for}} \quad \mathbf{k} \rightarrow \approx \left[ \mathbf{Y} \mathbf{R}\_{\mathbf{i}} (\mathbf{x}, \mathbf{k}) \rightarrow \mathcal{M} \mathbf{H} \mathbf{R}\_{\mathbf{i}} (\mathbf{x}\_{\circ} \boldsymbol{\approx}) \right]\_{\mathbf{i}, \mathbf{k} \; \prime} \left[ \mathbf{Y}\_{\mathbf{i}} (\mathbf{x}\_{\circ}, \mathbf{k}) = \mathbf{\bar{Y}}\_{\mathbf{i}} (\mathbf{x}\_{\circ}, \mathbf{k}) \right]\_{\mathbf{i}, \mathbf{k}} \rightarrow \left[ \mathbf{\bar{Y}}\_{\mathbf{i}} (\mathbf{x}\_{\circ}, \boldsymbol{\approx}) = \mathbf{\bar{W}}\_{\mathbf{i}} (\mathbf{x}\_{\circ}, \boldsymbol{\approx}) \right]\_{\mathbf{i}, \mathbf{k}} \end{aligned}$$

along with { ii ii () ( ) }i,k E x ,k E x , 0 → ∞= - this actually means that the control task defined in equation (9), is accomplished as given by relation (16).

Finally we may state as a summary, that in closed-loop control with RHLDS the control synthesis is realized as:

*Time Tasks of Control Synthesis* – on the level of lumped parameter control loops *Space Tasks of Control Synthesis* – as approximation tasks.

At the same time the solution of the approximation problem in block SS1 on the approximation set { <sup>i</sup> ( )}i,k YR x,k

$$\min \left\| \mathbf{W} \left( \mathbf{x}, \boldsymbol{\omega} \right) - \sum\_{i=1}^{n} \mathbf{W}\_{i} \left( \mathbf{x}\_{i}, \mathbf{k} \right) \mathbf{Y} \mathbf{R}\_{i} \left( \mathbf{x}, \mathbf{k} \right) \right\|\tag{20}$$

in timestep k is obtained

$$\mathbf{W}(\mathbf{x},\boldsymbol{\omega}\circ\mathbf{s})=\sum\_{i=1}^{n}\bar{\mathbf{W}}\_{i}(\mathbf{x}\_{i},\mathbf{k})\mathbf{Y}\mathbf{R}\_{i}(\mathbf{x},\mathbf{k})+\bar{\mathbf{E}}(\mathbf{x},\mathbf{k})\tag{21}$$

where E x,k ( ) is the unique element at the best approximation of W x, ( ) <sup>∞</sup> on the set of approximate functions { <sup>i</sup> ( )}<sup>i</sup> YR x,k . Similary by the solution of approximation problem in the block SS2 -{ i i ( )}<sup>i</sup> Y x ,k in the timestep k distributed output quantity Y x,k is given as ( )

$$\mathbf{Y}(\mathbf{x}, \mathbf{k}) = \sum\_{i=1}^{n} \bar{\mathbf{Y}}\_{i}(\mathbf{x}\_{i}, \mathbf{k}) \mathbf{Y} \mathbf{R}\_{i}(\mathbf{x}, \mathbf{k}) \tag{22}$$

#### **4.3 Closed-loop control**

Let us now consider a distributed parameter feedback loop as featured in Fig. 14. with initial conditions as above, where in timestep k an approximation problem is solved

$$\min \left\| \mathbb{E} \left( \mathbf{x}, \mathbf{k} \right) - \sum\_{i=1}^{n} \mathbb{E}\_{i} \left( \mathbf{x}\_{i}, \mathbf{k} \right) \mathbf{Y} \mathbf{R}\_{i} \left( \mathbf{x}, \mathbf{k} \right) \right\|\tag{23}$$

Control of Distributed Parameter Systems - Engineering Methods

Y x,t /W x, () ( ) ∞ – distributed controlled/reference quantity

{ <sup>i</sup> ( )}<sup>i</sup> YR x,k /{ <sup>i</sup> ( )}<sup>i</sup> *<sup>H</sup>*HR x,∞ - reduced characteristics in space domain

( ) ()() ( ) ( ) ()() n n

W x ,k YR x,k E x,k Y x ,k E x ,k YR x,k E x,k

{ ii ii ii ()()()}i,k W x ,k Y x ,k E x ,k = + is obtained. Now in vector form this means

ii i ii ii i

( ) () ( ) ( ) () n n ii i ii ii i

= +

W x ,k YR x,k Y x ,k E x ,k YR x,k

+= + <sup>+</sup>

CS – control synthesis

E k( ) 

{ <sup>i</sup> ( )}<sup>i</sup>

K – time/space sampling

TS /SS – time/space control synthesis

E x,k ( ) – distributed control error

– vector of control errors U k( ) – vector of control quantities

i 1 i 1

= =

i 1 i 1

Then sequences { i i ( )}i,k E x ,k

U k and { i i ( )}<sup>i</sup> Y x ,k 

= =

V x,t ( ) – distributed disturbance quantity

and Software Support in the MATLAB & Simulink Programming Environment 43

Comparison of relation (21) and result of the approximation problem (24) gives

and then

, finally

( ) ( ) ( ) ( ) ( ) () ( ) ( ) ( ) { ii ii ii }i,k W k Y k E k E k W k Y k E x ,k W x ,k Y x ,k = + = −= = − (25)

synthesis process shows that synthesis in time domain is realized on the level of one parameter control loops { ii i ( ) ()}<sup>i</sup> SH x ,z ,R z , Fig. 13. - closed throughout the structure of distributed parameter control loop, Fig. 14. If for k → ∞ { i i () ( )}<sup>i</sup> YR x,k HR x, → ∞ *<sup>H</sup>* and

( ) ( ) () ( )( ) ( ) ()

ii i ii i ii i

W x , Y x , HR x, E x, E x , HR x, E x,

= ∞ ∞ ∞+ ∞− ∞ ∞ = ∞


W x , HR x, E x, Y x , HR x, E x , HR x,

*H HH*

= ∞ ∞+ ∞− ∞ ∞− ∞ ∞ =

( ) ()( ) ( ) () ( ) ()

ii i ii i

*H H*

∞− ∞ ∞ = ∞− ∞− ∞ ∞ =

( )( ) ()( ) ( ) () ( )

is valid, so the above given control task (9) is accomplished - whereas in the steady-state { ii ii ii ( )( ) ( ) }<sup>i</sup> W x, Y x, E x, 0 ∞− ∞= ∞= . By concluding the above presented discussion, the

{ i i ( )} { ii ii () ()} i,k <sup>i</sup> Y x ,k Y x , W x , → ∞= ∞ along with { ii ii () ( ) }i,k E x ,k E x , 0 → ∞= then

min E x, E x , HR x, W x, Y x, E x , HR x,

n n

i 1 i 1

= =

ii ii i ii i

n n n

i 1 i 1 i 1

= = =

n n

i 1 i 1

= =

control synthesis in closed-loop control is realized as:

enter into the block TS on { <sup>i</sup> ( )}<sup>i</sup> R z and give { <sup>i</sup> ( )}<sup>i</sup> U k , among

there are relations { i i ( )}<sup>i</sup> SH x ,z . Finally this analysis of control

(26)

{ i i ( )}<sup>i</sup> SH x ,z - transfer functions - dynamic characteristics of HLDS in time domain

and as a result in timestep k a vector () ( ) { i i }<sup>i</sup> E k E x ,k <sup>=</sup> is obtained. By relations (20-22) the further equations are valid

$$\begin{aligned} &\min \left\| \mathbb{E} \left( \mathbf{x}, \mathbf{k} \right) - \sum\_{i=1}^{n} \mathbb{E}\_{i} \left( \mathbf{x}\_{i}, \mathbf{k} \right) \mathbf{Y} \mathbf{R}\_{i} \left( \mathbf{x}, \mathbf{k} \right) \right\| = \\ &\mathbf{x} = \min \left\| \mathbf{W} \left( \mathbf{x}, \boldsymbol{\omega} \right) - \mathbf{Y} \left( \mathbf{x}, \mathbf{k} \right) - \sum\_{i=1}^{n} \mathbb{E}\_{i} \left( \mathbf{x}\_{i}, \mathbf{k} \right) \mathbf{Y} \mathbf{R}\_{i} \left( \mathbf{x}, \mathbf{k} \right) \right\| = \\ &\mathbf{=} \min \left\| \mathbf{W} \left( \mathbf{x}, \boldsymbol{\omega} \right) - \sum\_{i=1}^{n} \left[ \bar{\mathbf{Y}}\_{i} \left( \mathbf{x}\_{i}, \mathbf{k} \right) + \bar{\mathbf{E}\_{i} \left( \mathbf{x}\_{i}, \mathbf{k} \right)} \right] \mathbf{Y} \mathbf{R}\_{i} \left( \mathbf{x}, \mathbf{k} \right) \right\| = \\ &\mathbf{=} \left\| \mathbf{W} \left( \mathbf{x}, \boldsymbol{\omega} \right) - \sum\_{i=1}^{n} \left[ \bar{\mathbf{Y}}\_{i} \left( \mathbf{x}\_{i}, \mathbf{k} \right) + \bar{\mathbf{E}\_{i} \left( \mathbf{x}\_{i}, \mathbf{k} \right)} \right] \mathbf{Y} \mathbf{R}\_{i} \left( \mathbf{x}, \mathbf{k} \right) \right\| \end{aligned} \tag{24}$$

The problem solution ( ) ( ) ( ) ()() <sup>n</sup> ii ii i i 1 W x, Y x ,k E x ,k YR x,k E x,k = ∞ = <sup>+</sup> <sup>+</sup> is obtained by approximation.

Fig. 14. Distributed parameter closed-loop system of control

HLDS - LDS with zero-order hold units

Let us now consider a distributed parameter feedback loop as featured in Fig. 14. with initial

i 1 min E x,k E x ,k YR x,k =

() ( ) ()

n

i 1

=

= ∞− <sup>+</sup>

The problem solution ( ) ( ) ( ) ()() <sup>n</sup>

i 1

=

Fig. 14. Distributed parameter closed-loop system of control

HLDS - LDS with zero-order hold units

ii i

− =

min W x, Y x,k E x ,k YR x,k

= ∞− − =

n

min E x,k E x ,k YR x,k

i 1

=

n

i 1

=

() ( ) () <sup>n</sup> ii i

( )() ( ) ()

n

i 1

=

( ) ( ) ( ) ()

W x, Y x ,k E x ,k YR x,k

min W x, Y x ,k E x ,k YR x,k

= ∞− <sup>+</sup> <sup>=</sup>

( ) ( ) ( ) ()

ii ii i

ii ii i

W x, Y x ,k E x ,k YR x,k E x,k

∞ = <sup>+</sup> <sup>+</sup>

ii ii i

ii i

<sup>−</sup> (23)

(24)

is obtained. By relations (20-22) the

is obtained by

conditions as above, where in timestep k an approximation problem is solved

and as a result in timestep k a vector () ( ) { i i }<sup>i</sup> E k E x ,k <sup>=</sup>

**4.3 Closed-loop control** 

further equations are valid

approximation.

TS /SS – time/space control synthesis

K – time/space sampling

Y x,t /W x, () ( ) ∞ – distributed controlled/reference quantity

{ i i ( )}<sup>i</sup> SH x ,z - transfer functions - dynamic characteristics of HLDS in time domain

{ <sup>i</sup> ( )}<sup>i</sup> YR x,k /{ <sup>i</sup> ( )}<sup>i</sup> *<sup>H</sup>*HR x,∞ - reduced characteristics in space domain

E x,k ( ) – distributed control error

V x,t ( ) – distributed disturbance quantity

E k( ) – vector of control errors

U k( ) – vector of control quantities

Comparison of relation (21) and result of the approximation problem (24) gives ( ) ()() ( ) ( ) ()() n n ii i ii ii i i 1 i 1 W x ,k YR x,k E x,k Y x ,k E x ,k YR x,k E x,k = = += + <sup>+</sup> and then

$$\sum\_{i=1}^{n} \bar{\mathbf{W}}\_{i}(\mathbf{x}\_{i}, \mathbf{k}) \mathbf{Y} \mathbf{R}\_{i}(\mathbf{x}, \mathbf{k}) = \sum\_{i=1}^{n} \left[ \bar{\mathbf{Y}}\_{i}(\mathbf{x}\_{i}, \mathbf{k}) + \bar{\mathbf{E}}\_{i}(\mathbf{x}\_{i}, \mathbf{k}) \right] \mathbf{Y} \mathbf{R}\_{i}(\mathbf{x}, \mathbf{k}) \, , \tag{11.8}$$
 
$$\left\{ \bar{\mathbf{W}}\_{i}(\mathbf{x}\_{i}, \mathbf{k}) = \bar{\mathbf{Y}}\_{i}(\mathbf{x}\_{i}, \mathbf{k}) + \bar{\mathbf{E}}\_{i}(\mathbf{x}\_{i}, \mathbf{k}) \right\}\_{i, \mathbf{k}} \text{ is obtained. Now in vector form this means$$

$$\bar{\tilde{\mathbf{W}}}(\mathbf{k}) = \bar{\tilde{\mathbf{Y}}}(\mathbf{k}) + \bar{\tilde{\mathbf{E}}}(\mathbf{k}) \Rightarrow \bar{\tilde{\mathbf{E}}}(\mathbf{k}) = \bar{\tilde{\mathbf{W}}}(\mathbf{k}) - \bar{\tilde{\mathbf{Y}}}(\mathbf{k}) = \left[ \bar{\mathbf{E}}\_{\mathrm{i}}(\mathbf{x}\_{i}, \mathbf{k}) = \bar{\mathbf{W}}\_{\mathrm{i}}(\mathbf{x}\_{i}, \mathbf{k}) - \bar{\mathbf{Y}}\_{\mathrm{i}}(\mathbf{x}\_{i}, \mathbf{k}) \right]\_{\mathrm{i}, \mathbf{k}} \tag{25}$$

Then sequences { i i ( )}i,k E x ,k enter into the block TS on { <sup>i</sup> ( )}<sup>i</sup> R z and give { <sup>i</sup> ( )}<sup>i</sup> U k , among { <sup>i</sup> ( )}<sup>i</sup> U k and { i i ( )}<sup>i</sup> Y x ,k there are relations { i i ( )}<sup>i</sup> SH x ,z . Finally this analysis of control synthesis process shows that synthesis in time domain is realized on the level of one parameter control loops { ii i ( ) ()}<sup>i</sup> SH x ,z ,R z , Fig. 13. - closed throughout the structure of distributed parameter control loop, Fig. 14. If for k → ∞ { i i () ( )}<sup>i</sup> YR x,k HR x, → ∞ *<sup>H</sup>* and { i i ( )} { ii ii () ()} i,k <sup>i</sup> Y x ,k Y x , W x , → ∞= ∞ along with { ii ii () ( ) }i,k E x ,k E x , 0 → ∞= then

( ) ( ) () ( )( ) ( ) () ( ) ()( ) ( ) () ( ) () ( )( ) ()( ) ( ) () ( ) n n ii i ii i i 1 i 1 n n n ii i ii i ii i i 1 i 1 i 1 n n ii ii i ii i i 1 i 1 min E x, E x , HR x, W x, Y x, E x , HR x, W x , HR x, E x, Y x , HR x, E x , HR x, W x , Y x , HR x, E x, E x , HR x, E x, = = = = = = = ∞− ∞ ∞ = ∞− ∞− ∞ ∞ = = ∞ ∞+ ∞− ∞ ∞− ∞ ∞ = = ∞ ∞ ∞+ ∞− ∞ ∞ = ∞ *H H H HH* - *H H* (26)

is valid, so the above given control task (9) is accomplished - whereas in the steady-state { ii ii ii ( )( ) ( ) }<sup>i</sup> W x, Y x, E x, 0 ∞− ∞= ∞= . By concluding the above presented discussion, the control synthesis in closed-loop control is realized as:

Control of Distributed Parameter Systems - Engineering Methods

operation.

Corporation

and Software Support in the MATLAB & Simulink Programming Environment 45

The block **Tutorial** presents methodological framework for formulation and solution of control problems for DPS. The block **Show** contains motivation examples such as: *Control of temperature field of 3D metal body* (the controlled system was modelled in the virtual software environment COMSOL Multiphysics); *Control of 3D beam of "smart" structure* (the controlled system was modelled in the virtual software environment ANSYS)*; Adaptive control of glass furnace* (the controlled system was modelled by Partial Differential Equations Toolbox of the MATLAB ), and *Groundwater remediation control* (the controlled system was modelled in the virtual software environment MODFLOW)**.** The block **Demos** contains examples oriented at the methodology of modelling and control synthesis. The **DPS Wizard** gives an automatized guide for arrangement and setting distributed parameter control loops in step-by-step

Fig. 15. Distributed Parameter Systems Blockset on the web portal of The MathWorks

*Time Tasks of Control Synthesis* – on the level of lumped parameter control loops *Space Tasks of Control Synthesis* – as approximation tasks.

When mathematical models cannot provide an ideal description of controlled DPS dynamics and disturbances are present with an overall effect on the output in steady-state, expressed by EY x, ( ) ∞ then the realtions similar to (17-18) are also valid here.

In practice mostly only reduced distributed parameter transient responses in steady-state { <sup>i</sup> ( )}<sup>i</sup> *<sup>H</sup>*HR x,<sup>∞</sup> are considered for the solution of the approximation tasks in the block SS of

the scheme in Fig. 14. along with robustification of controllers { <sup>i</sup> ( )}<sup>i</sup> Rz .

For simplicity problems of DPS control have been formulated here for the distributed desired quantity W x, ( ) ∞ . In case of W x,k is assumed, the control synthesis is realized ( ) similarly:



The solution of the presented problems of control synthesis an assumption is used, that in the framework of the chosen control systems the prescribed control quality can be reached both in the in space and time domain. However in the design of actual control systems for the given distributed parameter systems, usually the


is required and necessary.

#### **5. Distributed Parameter Systems Blockset for MATLAB & Simulink**

As a software support for DPS modelling, control and design of problems in MATLAB & Simulink the programming environment **Distributed Parameter Systems Blockset for MATLAB & Simulink** (**DPS Blockset**) - a Third-Party Product of The MathWorks www.mathworks.com/products/connections/ – Fig. 15., has been developed within the program CONNECTIONS of The MathWorks Corporation by the Institute of Automation, Measurement and Applied Informatics of Mechanical Engineering Faculty, Slovak University of Technology in Bratislava (IAMAI-MEF-STU) (Hulkó et al., 2003- 2010). Fig. 16. shows The library of **DPS Blockset**. The **HLDS** and **RHLDS** blocks model controlled DPS dynamics described by numerical structures as LDS with zero-order hold units - H. **DPS Control Synthesis** provides feedback to distributed parameter controlled systems in control loops with blocks for discrete-time **PID, Algebraic, State-Space and Robust Synthesis**. The block **DPS Input** generates distributed quantities, which can be used as distributed reference quantities or distributed disturbances, etc. **DPS Display** presents distributed quantities with many options including export to AVI files. The block **DPS Space Synthesis** performs space synthesis as an approximation problem.

As a demonstration, some results of the discrete-time PID control of complex-shape metal body heating by the **DPS Blockset** are shown in Fig. 17.-19., where the heating process was modelled by finite element method in the COMSOL Multiphysics virtual software environment - www.comsol.com.

When mathematical models cannot provide an ideal description of controlled DPS dynamics and disturbances are present with an overall effect on the output in steady-state, expressed

In practice mostly only reduced distributed parameter transient responses in steady-state { <sup>i</sup> ( )}<sup>i</sup> *<sup>H</sup>*HR x,<sup>∞</sup> are considered for the solution of the approximation tasks in the block SS of

For simplicity problems of DPS control have been formulated here for the distributed desired quantity W x, ( ) ∞ . In case of W x,k is assumed, the control synthesis is realized ( )


The solution of the presented problems of control synthesis an assumption is used, that in the framework of the chosen control systems the prescribed control quality can be reached both in the in space and time domain. However in the design of actual control systems for

• optimization of dynamical characteristics of lumped/distributed parameter actuators

As a software support for DPS modelling, control and design of problems in MATLAB & Simulink the programming environment **Distributed Parameter Systems Blockset for MATLAB & Simulink** (**DPS Blockset**) - a Third-Party Product of The MathWorks www.mathworks.com/products/connections/ – Fig. 15., has been developed within the program CONNECTIONS of The MathWorks Corporation by the Institute of Automation, Measurement and Applied Informatics of Mechanical Engineering Faculty, Slovak University of Technology in Bratislava (IAMAI-MEF-STU) (Hulkó et al., 2003- 2010). Fig. 16. shows The library of **DPS Blockset**. The **HLDS** and **RHLDS** blocks model controlled DPS dynamics described by numerical structures as LDS with zero-order hold units - H. **DPS Control Synthesis** provides feedback to distributed parameter controlled systems in control loops with blocks for discrete-time **PID, Algebraic, State-Space and Robust Synthesis**. The block **DPS Input** generates distributed quantities, which can be used as distributed reference quantities or distributed disturbances, etc. **DPS Display** presents distributed quantities with many options including export to AVI files. The block **DPS Space Synthesis** performs space synthesis as an approximation

As a demonstration, some results of the discrete-time PID control of complex-shape metal body heating by the **DPS Blockset** are shown in Fig. 17.-19., where the heating process was modelled by finite element method in the COMSOL Multiphysics virtual software

• optimization of dynamical characteristics of lumped parameter control loops

**5. Distributed Parameter Systems Blockset for MATLAB & Simulink** 


Rz .

*Time Tasks of Control Synthesis* – on the level of lumped parameter control loops

*Space Tasks of Control Synthesis* – as approximation tasks.

similarly:

problem.

environment - www.comsol.com.

is required and necessary.

by EY x, ( ) ∞ then the realtions similar to (17-18) are also valid here.

the scheme in Fig. 14. along with robustification of controllers { <sup>i</sup> ( )}<sup>i</sup>

throughout structures of the distributed parameter control loop.

the given distributed parameter systems, usually the • optimization of the number and layout of actuators The block **Tutorial** presents methodological framework for formulation and solution of control problems for DPS. The block **Show** contains motivation examples such as: *Control of temperature field of 3D metal body* (the controlled system was modelled in the virtual software environment COMSOL Multiphysics); *Control of 3D beam of "smart" structure* (the controlled system was modelled in the virtual software environment ANSYS)*; Adaptive control of glass furnace* (the controlled system was modelled by Partial Differential Equations Toolbox of the MATLAB ), and *Groundwater remediation control* (the controlled system was modelled in the virtual software environment MODFLOW)**.** The block **Demos** contains examples oriented at the methodology of modelling and control synthesis. The **DPS Wizard** gives an automatized guide for arrangement and setting distributed parameter control loops in step-by-step operation.

Fig. 15. Distributed Parameter Systems Blockset on the web portal of The MathWorks Corporation

Control of Distributed Parameter Systems - Engineering Methods

metal body in DPS Blockset environment

numerical net

environment

and Software Support in the MATLAB & Simulink Programming Environment 47

Fig. 17. Distributed parameter control loop for discrete-time PID control of heating of

Fig. 18. Distributed reference and controlled quantities of metal body heating over the

Fig. 19. Quadratic norm of distributed control error and discrete lumped actuating quantities at discrete-time PID control of heating of metal body in DPS Blockset

Fig. 16. The library of Distributed Parameter Systems Blockset for MATLAB & Simulink – Third-Party Product of The MathWorks

Fig. 16. The library of Distributed Parameter Systems Blockset for MATLAB & Simulink –

Third-Party Product of The MathWorks

Fig. 17. Distributed parameter control loop for discrete-time PID control of heating of metal body in DPS Blockset environment

Fig. 18. Distributed reference and controlled quantities of metal body heating over the numerical net

Fig. 19. Quadratic norm of distributed control error and discrete lumped actuating quantities at discrete-time PID control of heating of metal body in DPS Blockset environment

Control of Distributed Parameter Systems - Engineering Methods

means of the Optimization Toolbox.

DPS via the Internet.

**9. References** 

**8. Acknowledgment** 

*controlled distributed parameter systems".* 

*of 8-th World Congress of IFAC*, Kyoto, 1981

(in Russian)

Munich, 1987

*Systems*, Perpignan, 1989

and Software Support in the MATLAB & Simulink Programming Environment 49

for the analogous decomposition of control synthesis into the space and time subtasks. In space domain approximation problems are solved, while in the time domain control synthesis is realized by lumped parameter SISO control loops (Hulkó et al., 1981-2010). Based on these decomposition a software product named **Distributed Parameter Systems Blockset for MATLAB & Simulink** - a Third-Party software product of The MathWorks www.mathworks.com/products/connections/ has been developed within the program CONNECTIONS of The MathWorks Corporation, (Hulkó et al., 2003-2010), where time domain toolboxes and blocksets of software environment MATLAB & Simulink as Control Systems Toolbox, Simulink Control Design, System Identification Toolbox,... are made use of. In the space domain approximation problems are solved as optimization problems by

For the further support of research in this area a web portal named **Distributed Parameter Systems Control** - www.dpscontrol.sk was realized (Hulkó et al., 2003-2010), see Fig. 20. for an illustration. On the above mentioned web portal, the online version of the monograph titled **Modeling, Control and Design of Distributed Parameter Systems with Demonstrations in MATLAB** - www.mathworks.com/support/books/ (Hulkó et al., 1998), is presented along with application examples from different disciplines such as: control of technological and production processes, control and design of mechatronic structures, groundwater remediation control, etc. This web portal also offers for those interested the download of the demo version of the **Distributed Parameter Systems Blockset for MATLAB & Simulink** with **Tutorial** , **Show** , **Demos** and **DPS Wizard**. This portal also offers the **Interactive Control** service for interactive solution of model control problems of

This work was supported by the Slovak Scientific Grant Agency VEGA under the contract No. 1/0138/11 for project *"Control of dynamical systems given by numerical structures as distributed parameter systems"* and the Slovak Research and Development Agency under the contract No. APVV-0160-07 for project "*Advanced Methods for Modeling, Control and Design of Mechatronical Systems as Lumped-input and Distributed-output Systems"* also the project No*.*  APVV-0131-10 *"High-tech solutions for technological processes and mechatronic components as* 

Butkovskij, A. G. (1965). *Optimal control of distributed parameter systems*. Nauka, Moscow

Hulkó, G. et al. (1981). On Adaptive Control of Distributed Parameter Systems, *Proceedings* 

Hulkó, G. et al. (1987). Control of Distributed Parameter Systems by means of Multi-Input

Hulkó, G. (1989). Identification of Lumped Input and Distributed Output Systems,

and Multi-Distributed-Output Systems*, Proceedings of 10-th World Congress of IFAC*,

*Proceedings of 5-th IFAC / IMACS / IFIP Symposium on Control of Distributed Parameter* 

#### **6. Interactive control via the Internet**

For the interactive formulation and solution of DPS demonstration control problems via the Internet, an **Interactive Control** service has been started on the web portal **Distributed Parameter Systems Control -** www.dpscontrol.sk of the IAMAI-MEF-STU (Hulkó, 2003-2010) – see Fig. 20. for a screenshot of the site. In the framework of the problem formulation, first the computational geometry and mesh are chosen in the complex 3D shape definition domain, then DT distributed transient responses are computed in virtual software environments for numerical dynamical analysis of machines and processes. Finally, the distributed reference quantity is specified in points of the computational mesh - Fig. 18. Representing the solution to those interested animated results of actuating quantities, quadratic norm of control error, distributed reference and controlled quantity are sent in the form of **DPS Blockset** outputs – see Fig. 17-19. for illustration.

Fig. 20. Web portal Distributed Parameter Systems Control with monograph Modeling, Control and Design of Distributed Parameter Systems with Demonstrations in MATLAB and service Interactive Control

#### **7. Conclusion**

The aim of this chapter is to present a philosophy of the engineering approach for the control of DPS – given by numerical structures, which opens a wide space for novel applications of the toolboxes and blocksets of the MATLAB & Simulink software environment. This approach is based on the general decomposition into time and space components of controlled DPS dynamics represented by numerically computed distributed parameter transient and impulse characteristics, given on complex shape definition domains in 3D. Starting out from this dynamics decomposition a methodical framework is presented for the analogous decomposition of control synthesis into the space and time subtasks. In space domain approximation problems are solved, while in the time domain control synthesis is realized by lumped parameter SISO control loops (Hulkó et al., 1981-2010). Based on these decomposition a software product named **Distributed Parameter Systems Blockset for MATLAB & Simulink** - a Third-Party software product of The MathWorks www.mathworks.com/products/connections/ has been developed within the program CONNECTIONS of The MathWorks Corporation, (Hulkó et al., 2003-2010), where time domain toolboxes and blocksets of software environment MATLAB & Simulink as Control Systems Toolbox, Simulink Control Design, System Identification Toolbox,... are made use of. In the space domain approximation problems are solved as optimization problems by means of the Optimization Toolbox.

For the further support of research in this area a web portal named **Distributed Parameter Systems Control** - www.dpscontrol.sk was realized (Hulkó et al., 2003-2010), see Fig. 20. for an illustration. On the above mentioned web portal, the online version of the monograph titled **Modeling, Control and Design of Distributed Parameter Systems with Demonstrations in MATLAB** - www.mathworks.com/support/books/ (Hulkó et al., 1998), is presented along with application examples from different disciplines such as: control of technological and production processes, control and design of mechatronic structures, groundwater remediation control, etc. This web portal also offers for those interested the download of the demo version of the **Distributed Parameter Systems Blockset for MATLAB & Simulink** with **Tutorial** , **Show** , **Demos** and **DPS Wizard**. This portal also offers the **Interactive Control** service for interactive solution of model control problems of DPS via the Internet.

### **8. Acknowledgment**

48 MATLAB for Engineers – Applications in Control, Electrical Engineering, IT and Robotics

For the interactive formulation and solution of DPS demonstration control problems via the Internet, an **Interactive Control** service has been started on the web portal **Distributed Parameter Systems Control -** www.dpscontrol.sk of the IAMAI-MEF-STU (Hulkó, 2003-2010) – see Fig. 20. for a screenshot of the site. In the framework of the problem formulation, first the computational geometry and mesh are chosen in the complex 3D shape definition domain, then DT distributed transient responses are computed in virtual software environments for numerical dynamical analysis of machines and processes. Finally, the distributed reference quantity is specified in points of the computational mesh - Fig. 18. Representing the solution to those interested animated results of actuating quantities, quadratic norm of control error, distributed reference and controlled quantity are

sent in the form of **DPS Blockset** outputs – see Fig. 17-19. for illustration.

Fig. 20. Web portal Distributed Parameter Systems Control with monograph Modeling, Control and Design of Distributed Parameter Systems with Demonstrations in MATLAB

The aim of this chapter is to present a philosophy of the engineering approach for the control of DPS – given by numerical structures, which opens a wide space for novel applications of the toolboxes and blocksets of the MATLAB & Simulink software environment. This approach is based on the general decomposition into time and space components of controlled DPS dynamics represented by numerically computed distributed parameter transient and impulse characteristics, given on complex shape definition domains in 3D. Starting out from this dynamics decomposition a methodical framework is presented

**6. Interactive control via the Internet** 

and service Interactive Control

**7. Conclusion** 

This work was supported by the Slovak Scientific Grant Agency VEGA under the contract No. 1/0138/11 for project *"Control of dynamical systems given by numerical structures as distributed parameter systems"* and the Slovak Research and Development Agency under the contract No. APVV-0160-07 for project "*Advanced Methods for Modeling, Control and Design of Mechatronical Systems as Lumped-input and Distributed-output Systems"* also the project No*.*  APVV-0131-10 *"High-tech solutions for technological processes and mechatronic components as controlled distributed parameter systems".* 

#### **9. References**


**3** 

Lubomír Brančík

*Czech Republic* 

α*tT*),

}, with **c** = (*c*1,...,*cn*) as an

*Brno University of Technology* 

**Numerical Inverse Laplace Transforms for** 

Numerical inverse Laplace transform (NILT) methods are widely used in various scientific areas, especially for a solution of respective differential equations. In field of an electrical engineering many various approaches have been considered so far, but mostly for a single variable (1D NILT), see at least (Brančík, 1999, 2007b; Cohen, 2007; Valsa & Brančík, 1998; Wu at al., 2001) from plenty of papers. Much less attention was paid to multidimensional variable (*n*D NILT) methods, see e.g. (Hwang at al., 1983; Singhal at al., 1975), useful rather for more complicated electromagnetic systems. The 2D NILT methods, see e.g. (Brančík, 2005, 2007a, 2007b; Hwang & Lu, 1999), can be applied for a transmission line analysis, or *n*D NILT methods, *n* ≥ 2, for a nonlinear circuits analysis, if relevant Laplace transforms are developed through a Volterra series expansion, see e.g. (Brančík, 2010a, 2010b, Karmakar, 1980; Schetzen, 2006), to highlight at least a few applications. This paper is focused on the class of NILT methods based on complex Fourier series approximation, their error analysis, their effective algorithms development in a Matlab language, and after all, on their selected applications in field of electrical engineering to show practical usefulness of the algorithms.

An *n*-dimensional Laplace transform of a real function *f*(*t*), with *t* = (*t*1,...,*tn*) as a row vector

0 0 1

abscissa of convergence, and the inequality taken componentwise, the original function is

*<sup>i</sup> n- fold <sup>i</sup> F f dt*

<sup>1</sup> 1

−∞ −∞ = ∏ *<sup>n</sup>*

*<sup>c</sup> <sup>n</sup> <sup>T</sup>*

*<sup>n</sup> <sup>T</sup>*

=

*<sup>s</sup> t st* <sup>−</sup> ∏ , (1)

*<sup>n</sup>*) being a minimal abscissa of convergence, and the *n*D

α

*i*

*i*

*F dt*

*t s st* . (2)

( ) = ( )exp( )

where *s* = (*s*1,...,*sn*) and *T* means a transposition. Under an assumption |*f*(*t*)| < *M*exp(

<sup>1</sup> ( )= ( )exp( ) (2 )

*cj cj*

*n*

+ ∞ + ∞

*j c j*

∞ ∞

1

*n*

**2. Multidimensional numerical inverse Laplace transform** 

of *n* real variables, is defined as (Hwang at al., 1983)

α = (α1,...,α

*f*

Laplace transform *F*(*s*) defined on a region {*s* ∈ *Cn*: Re[*s*] >

π

*j*

with *M* real positive and

given by an *n*-fold Bromwich integral

**1. Introduction** 

**Electrical Engineering Simulation** 


### **Numerical Inverse Laplace Transforms for Electrical Engineering Simulation**

Lubomír Brančík

*Brno University of Technology Czech Republic* 

#### **1. Introduction**

50 MATLAB for Engineers – Applications in Control, Electrical Engineering, IT and Robotics

Hulkó, G. et al. (1990). Computer Aided Design of Distributed Parameter Systems of

Hulkó G. (1991). Lumped Input and Distributed Ouptut Systems at the Control of

Hulkó, G. et al. (1998). *Modeling, Control and Design of Distributed Parameter Systems with* 

Hulkó, G. et al. (2005). Web-based control design environment for distributed parameter

Hulkó, G. et al. (2003-2010). *Distributed Parameter Systems Control*. Web portal, Available

Hulkó, G. et al. (2003-2010). *Distributed Parameter Systems Blockset for MATLAB & Simulink*,

Hulkó, G. et al. (2009). Engineering Methods and Software Support for Modelling and

Hulkó, G. et. al (2010). Control of Technological Processes Modelled in COMSOL

Lasiecka, I., Triggiani, R. (2000). *Control Theory for Partial Differential Equations* (Encyclopedia of Mathematics and Its Applications 74), Cambridge U. Press, Cambridge, UK Lions, J. L. (1971). *Optimal control of systems governed by partial differential equations,* Springer-

Shadrin, A. (2005). *Approximation theory.* DAMTP University of Cambridge, Cambridge UK,

Wang, P. K. C. (1964). *Control of distributed parameter systems* (Advances in Control Systems:

Theory and Applications, 1.), Academic Press, New York

MathWorks, Bratislava-Natick, Available from: www.dpscontrol.sk Hulkó, G. et al. (2009). Engineering Methods and Software Support for Modeling and

*Proceedings of European Control Conference 2009*, Budapest, 2009

Distributed Parameter Systems. *Problems of Control and Information Theory,* Vol. 20,

*Demonstrations in MATLAB*, Publishing House STU, ISBN 80-227-1083-0, Bratislava

systems control education*, Proceedings of 16-th World Congress of IFAC*, Prague, 2005

www.mathworks.com/products/connections/ - Third-Party Product of The

Design of Discrete-time Control of Distributed Parameter Systems, *Mini-tutorial*,

Design of Discrete-time Control of Distributed Parameter Systems*. European Journal of Control,* Vol. 15, No. Iss. 3-4, *Fundamental Issues in Control,* (May-August 2009),

Multiphysics as Distributed Parameter Systems*, Proceedings of Asian COMSOL* 

Control, *Proceedings of 11-th World Congress of IFAC,* Tallin, 1990

No. 2, pp. 113-128, Pergamon Press, Oxford

from: www.dpscontrol.sk

pp. 407-417, ISSN 0947-3580

*Conference,* Bangalore, 2010

Verlag, Berlin - Heidelberg - New York

Available from: www.damtp.cam.ac.uk

Numerical inverse Laplace transform (NILT) methods are widely used in various scientific areas, especially for a solution of respective differential equations. In field of an electrical engineering many various approaches have been considered so far, but mostly for a single variable (1D NILT), see at least (Brančík, 1999, 2007b; Cohen, 2007; Valsa & Brančík, 1998; Wu at al., 2001) from plenty of papers. Much less attention was paid to multidimensional variable (*n*D NILT) methods, see e.g. (Hwang at al., 1983; Singhal at al., 1975), useful rather for more complicated electromagnetic systems. The 2D NILT methods, see e.g. (Brančík, 2005, 2007a, 2007b; Hwang & Lu, 1999), can be applied for a transmission line analysis, or *n*D NILT methods, *n* ≥ 2, for a nonlinear circuits analysis, if relevant Laplace transforms are developed through a Volterra series expansion, see e.g. (Brančík, 2010a, 2010b, Karmakar, 1980; Schetzen, 2006), to highlight at least a few applications. This paper is focused on the class of NILT methods based on complex Fourier series approximation, their error analysis, their effective algorithms development in a Matlab language, and after all, on their selected applications in field of electrical engineering to show practical usefulness of the algorithms.

#### **2. Multidimensional numerical inverse Laplace transform**

An *n*-dimensional Laplace transform of a real function *f*(*t*), with *t* = (*t*1,...,*tn*) as a row vector of *n* real variables, is defined as (Hwang at al., 1983)

$$F(\mathbf{s}) = \bigcap\_{0}^{\infty} \dots \bigcap\_{n-\text{fold}}^{\infty} f(\mathbf{t}) \exp(-\mathbf{s}\mathbf{t}^T) \prod\_{i=1}^{n} dt\_i \,\,\tag{1}$$

where *s* = (*s*1,...,*sn*) and *T* means a transposition. Under an assumption |*f*(*t*)| < *M*exp(α*tT*), with *M* real positive and α = (α1,...,α*<sup>n</sup>*) being a minimal abscissa of convergence, and the *n*D Laplace transform *F*(*s*) defined on a region {*s* ∈ *Cn*: Re[*s*] > α}, with **c** = (*c*1,...,*cn*) as an abscissa of convergence, and the inequality taken componentwise, the original function is given by an *n*-fold Bromwich integral

$$f(t) = \frac{1}{\left(2\pi j\right)^{n}} \int\_{c\_{1} - j^{\infty}}^{c\_{1} + j^{\infty}} \cdots \int\_{c\_{n} - j^{\infty}}^{c\_{n} + j^{\infty}} F(\mathbf{s}) \exp(\mathbf{s}\mathbf{t}^{T}) \prod\_{i=1}^{n} dt\_{i} \,\,. \tag{2}$$

Numerical Inverse Laplace Transforms for Electrical Engineering Simulation 53

*n*

with *si* = *ci* + *jmi*Ω*i*. If we define *Fn* ≡ *F*(*s*1,...,*sn*-1,*sn*) and *F*<sup>0</sup> ≡ *f*(*t*1,...,*tn*-1,*tn*), then *n* consequential

1 1 21 1

−− − −

{ } <sup>1</sup>

1 1 ( )= ( ) *i i*

*c kT*

*i i i i i m <sup>e</sup> <sup>F</sup> F e*

τ

<sup>2</sup> ( )= ( ) = ( )

*i i i ii ii i*

can be used *n* times, *i* = *n*,*n*-1...,1, to evaluate (8), with *pn* = (*s*1,...,*sn*-1,*sn*), *pn*-1 = (*s*1,...,*sn*-1,*tn*),..., *p*1 = (*s*1,...,*tn*-1,*tn*), and *p*0 = (*t*1,...,*tn*-1,*tn*), while *pj* = *sj* for *j* ≤ *i*, and *pj* = *tj* otherwise. A further technique is based on demand to find the solution on a whole region of discrete points. Then, taking into account *tik* = *kTi* in (9), with *Ti* as the sampling periods in the original

∞

=−∞

*i* = 1,...,*n*, a maximum reachable region is Οmax = [0,(*M*1-1)*T*1] ×...× [0,(*Mn*-1)*Tn*]. Thus, to meet

region of the calculation is chosen to be Οcal = [0,*t*1cal] ×...× [0,*tn*cal], with *ti*cal = (*Mi*/2–1)*Ti*,

As is shown in (Brančík, 2007a, 2010c), the discretized formula (10) can be evaluated by the FFT and IFFT algorithms, in conjunction with the quotient-difference (q-d) algorithm for

To explain it in more detail, let us consider an *r*-th cycle in gaining the original function via

*r r m*

<sup>+</sup> . (11)

accelerating convergence of the residual infinite series, see following procedures.

− − *p p* . For its discretized version (10) we have

*c kT*

τ

<sup>2</sup> ( , , , , )= ( , , , , ) *r r*

=−∞

*r rn r r n*

*<sup>e</sup> F s kT t F s c jm t e*

∞

*F F F e ds* π*j*

*nn n n n n n n nn*

*F Fs s t F Fs tt*

11 1 1

*F ft t t*

As is obvious we need to use a procedure able to make the inversion of Laplace transforms dependent on another *n-*1 parameters, complex in general. Let us denote arguments in (8) by

*ee e ft t t Fs s s e e e*

 τ

*c t c t c t jm t jm t jm t*

11 1

− −

= ( , , , ).

1

*n n*

−

*i*

*c j*

+ ∞

− ∞

2

*j mkT*

π τ

*i i*

*<sup>i</sup>* substituted. As follows from the error analysis (Brančík,

1) ×...× [0,

τ

2

*j mkT*

π τ

*r r*

*<sup>n</sup>*). For *k* = 0*,*1*,...,Mi*-1,

*<sup>i</sup>* = *MiTi*, *i* = 1,...,*n*. In practice, a

*p p* , (10)

τ

τ

π

 τ

*i*

*c j*

*i i*

*s t*

*pp p* (9)

= ( , , , ), = ( , , , ),

 

∞∞ ∞ Ω ΩΩ

 

2 22 1 11

(8)

*n nn*

, (7)

1 1 2 2

1 2

ττ

partial inversions are performed as

*pi* = (*p*1,...,*pn*-1,*pn*). Then the ILT of the type

domain, we can write an approximate formula

*i* = *n*,*n*-1...,1, and with Ω*i* = 2

(9), i.e. { } <sup>1</sup> 1 1 ( )= ( ) *F F r r r rr* −

−

*i* = 1,...,*n*, to provide certain margins.

1 2 1 2 1 2

( , , , )= (,, ,) *n n*

*n n mm m n*

> { } { }

1

−

1

−

1 1

− −

π/τ

2011) a relative error is predictable on the region Οerr = [0,

the necessary condition Οmax ⊂ Οerr, we can set up fittingly

**2.2.2 FFT, IFFT, and quotient-difference algorithms utilization** 

1 1 1

The above stated formula can be decomposed and expressed also as

− −

{ }

1

−

−

=−∞ =−∞ =−∞

In the papers (Brančík, 2007a, 2007b, 2010b), it was shown for the 1D, 2D, and 3D cases, the rectangular method of a numerical integration leads to an approximate formula whose a relative error is adjustable, and corresponds to the complex Fourier series approximation of a respective dimension. The method has been generalized for an arbitrary dimension *n* in the recent work (Brančík, 2011).

#### **2.1 Complex Fourier series approximation and limiting relative error**

Substituting *si* = *ci* + *jωi* into (2), and using a rectangular rule of the integration, namely ω*i* = *mi*Ω*i*, and Ω*i* = 2π/τ*i* as generalized frequency steps, with τ*<sup>i</sup>* forming a region of the solution *t* ∈ [0,τ1) ×...× [0,τ*<sup>n</sup>*), an approximate formula is

$$\tilde{f}(\mathbf{t}) = \exp(\mathbf{c}\mathbf{t}^T) \left(\prod\_{i=1}^n \mathbf{r}\_i^{-1}\right) \sum\_{m\_1 = -\infty}^\infty \cdots \sum\_{m\_n = -\infty}^\infty F(\mathbf{s}) \exp\left(j \sum\_{i=1}^n m\_i \Omega\_i t\_i\right) \tag{3}$$

with *si* = *ci* + *jmi*Ω*i*, ∀*i* . As is shown in (Brančík, 2011), a limiting relative error δ*<sup>M</sup>* of (3) can be controlled by setting **c** = (*c*1,...,*cn*), defining paths of the integration in (2), namely

$$c\_i = \alpha\_i - \frac{1}{\pi\_i} \ln \left( 1 - \frac{1}{\sqrt[n]{1 + \delta\_M}} \right) = \alpha\_i - \frac{1}{\pi\_i} \ln \frac{\delta\_M}{n} \,\tag{4}$$

for *i* = 1,…,*n*, and while keeping the equalities τ1(*c*1 – α1) =...= τ*n*(*cn* – α*<sup>n</sup>*). The simplification in (4) is enabled due to small values δ*<sup>M</sup>* considered in practice. The last equation is used for setting up parameters of the *n*D NILT method relating them to a limiting relative error δ*M* required for practical computations.

#### **2.2 Practical computational methods**

It should be highlighted that the formula (4) is valid, and a relative error supposed is really achievable by the *n*D NILT (3), if infinite numbers of terms are used in the series. In practice, it cannot sure be fulfilled, but a suitable technique for accelerating a convergence of infinite series is usable, as is e.g. a quotient-difference (q-d) algorithm (Rutishauser, 1957). Besides, as has been already successfully used for cases of *n* ≤ 3, the formula (3) can be rearranged to enable using FFT & IFFT algorithms for an effective computation.

#### **2.2.1 Partial ILTs evaluation technique**

The technique of practical evaluation of the *n*-fold infinite sum (3) follows the properties of the *n*-fold Bromwich integral (2), namely we can rearrange it into the form

$$f(t\_1, t\_2, \ldots, t\_n) = \frac{1}{2\pi j} \int\_{c\_1 - j\alpha}^{c\_1 + j\alpha} \left| \frac{1}{2\pi j} \int\_{c\_2 - j\alpha}^{c\_2 + j\alpha} \right|^{\alpha} \cdots \frac{1}{2\pi j} \int\_{c\_n - j\alpha}^{c\_n + j\alpha} F(s\_1, s\_2, \ldots, s\_n) e^{s\_n t\_n} ds\_n \cdots \right| e^{s\_1 t\_2} ds\_2 \Big| e^{s\_1 t\_1} ds\_1 \wedge \ldots \wedge e^{s\_n t\_n} ds\_n \wedge \Big|$$

or shortly

$$f(\mathbf{t}\_1, \mathbf{t}\_2, \dots, \mathbf{t}\_n) = \mathbb{L}\_1^{-1} \left[ \mathbb{L}\_2^{-1} \left[ \cdots \mathbb{L}\_n^{-1} [F(\mathbf{s}\_1, \mathbf{s}\_2, \dots, \mathbf{s}\_n)] \cdots \right] \right]. \tag{6}$$

Although the order of the integration may be arbitrary on principle, here the above one will be used for an explanation. Similarly, (3) can be rewritten as

In the papers (Brančík, 2007a, 2007b, 2010b), it was shown for the 1D, 2D, and 3D cases, the rectangular method of a numerical integration leads to an approximate formula whose a relative error is adjustable, and corresponds to the complex Fourier series approximation of a respective dimension. The method has been generalized for an arbitrary dimension *n* in

Substituting *si* = *ci* + *jωi* into (2), and using a rectangular rule of the integration, namely

1 1

*i i*

 α

> τ

*f t ct s j mt* , (3)

 <sup>Ω</sup> 

*n*

*i i=*

*n n*

τ

*M*

δ

*n*

*<sup>M</sup>* considered in practice. The last equation is used for

*n n*

*i i*

*<sup>i</sup>* forming a region of the

δ

, (4)

2 2 1 1

*s t st st*

*<sup>n</sup>*). The simplification

*<sup>M</sup>* of (3) can

δ*M*

*i* as generalized frequency steps, with

*<sup>n</sup>*), an approximate formula is

1

with *si* = *ci* + *jmi*Ω*i*, ∀*i* . As is shown in (Brančík, 2011), a limiting relative error

be controlled by setting **c** = (*c*1,...,*cn*), defining paths of the integration in (2), namely

τ

( ) = exp( ) ( )exp

1

∏

*m m*

11 1 = ln 1 ln 1

δ

τ1(*c*1 – α1) =...= τ*n*(*cn* – α

 − − ≈− +

setting up parameters of the *n*D NILT method relating them to a limiting relative error

It should be highlighted that the formula (4) is valid, and a relative error supposed is really achievable by the *n*D NILT (3), if infinite numbers of terms are used in the series. In practice, it cannot sure be fulfilled, but a suitable technique for accelerating a convergence of infinite series is usable, as is e.g. a quotient-difference (q-d) algorithm (Rutishauser, 1957). Besides, as has been already successfully used for cases of *n* ≤ 3, the formula (3) can be rearranged to

The technique of practical evaluation of the *n*-fold infinite sum (3) follows the properties of

1 2 1 2 2 1

 , (5)

1 2 1 2 1 2 ( , , , )= (, , , ) *n nn ft t t Fs s s* −− − . (6)

[ ] 11 1

*n*

*f tt t F s s s e ds e ds e ds*

*n*

Although the order of the integration may be arbitrary on principle, here the above one will

*n n n*

 π

*i i <sup>i</sup> <sup>n</sup> i i <sup>M</sup>*

 *F* ∞ ∞ <sup>−</sup> = =−∞ =−∞

**2.1 Complex Fourier series approximation and limiting relative error** 

the recent work (Brančík, 2011).

τ

π/τ

τ

*c*

for *i* = 1,…,*n*, and while keeping the equalities

in (4) is enabled due to small values

required for practical computations.

**2.2 Practical computational methods** 

**2.2.1 Partial ILTs evaluation technique** 

or shortly

α

τ

enable using FFT & IFFT algorithms for an effective computation.

1 2

11 1 22 2 ( , , , )= (, , , )

*jj j*

1 2

be used for an explanation. Similarly, (3) can be rewritten as

ππ

the *n*-fold Bromwich integral (2), namely we can rearrange it into the form

+∞ +∞ + ∞

−∞ −∞ − ∞

*cj c j c j*

*cj c j c j*

δ

*T*

1) ×...× [0,

*i* = *mi*Ω*i*, and Ω*i* = 2

solution *t* ∈ [0,

ω

$$\tilde{f}\left(t\_1, t\_2, \ldots, t\_n\right) = \frac{e^{\varepsilon\_1 t\_1}}{\tau\_1} \sum\_{m\_1 = -\alpha}^{\alpha} \left(\frac{e^{\varepsilon\_2 t\_2}}{\tau\_2} \sum\_{m\_2 = -\alpha}^{\alpha} \left(\cdots \frac{e^{\varepsilon\_n t\_n}}{\tau\_n} \sum\_{m\_n = -\alpha}^{\alpha} F(s\_1, s\_2, \ldots, s\_n) e^{jm\_n \Omega\_n t\_n} \cdots \right) e^{im\_2 \Omega\_2 t\_2} \right) e^{im\_1 \Omega\_1 t\_1} \ , \ \{\mathcal{T}\}$$

with *si* = *ci* + *jmi*Ω*i*. If we define *Fn* ≡ *F*(*s*1,...,*sn*-1,*sn*) and *F*<sup>0</sup> ≡ *f*(*t*1,...,*tn*-1,*tn*), then *n* consequential partial inversions are performed as

$$\begin{aligned} \mathbb{L}\_n^{-1} \{ F\_n \} &= F\_{n-1} (\mathbf{s}\_1, \dots, \mathbf{s}\_{n-1}, t\_n) \\ \mathbb{L}\_{n-1}^{-1} \{ F\_{n-1} \} &= F\_{n-2} (\mathbf{s}\_1, \dots, \mathbf{t}\_{n-1}, t\_n) \\ &\vdots \\ \mathbb{L}\_1^{-1} \{ F\_1 \} &= f(t\_1, \dots, t\_{n-1}, t\_n) \end{aligned} \tag{8}$$

As is obvious we need to use a procedure able to make the inversion of Laplace transforms dependent on another *n-*1 parameters, complex in general. Let us denote arguments in (8) by *pi* = (*p*1,...,*pn*-1,*pn*). Then the ILT of the type

$$F\_{i-1}(\mathcal{p}\_{i-1}) = \mathbb{L}\_i^{-1} \left\{ F\_i(\mathcal{p}\_i) \right\} = \frac{1}{2\pi j} \int\_{c\_i - j^{\rm iso}}^{c\_i + j^{\rm iso}} F\_i(\mathcal{p}\_i) e^{s\_i t\_i} \, ds\_i \tag{9}$$

can be used *n* times, *i* = *n*,*n*-1...,1, to evaluate (8), with *pn* = (*s*1,...,*sn*-1,*sn*), *pn*-1 = (*s*1,...,*sn*-1,*tn*),..., *p*1 = (*s*1,...,*tn*-1,*tn*), and *p*0 = (*t*1,...,*tn*-1,*tn*), while *pj* = *sj* for *j* ≤ *i*, and *pj* = *tj* otherwise. A further technique is based on demand to find the solution on a whole region of discrete points. Then, taking into account *tik* = *kTi* in (9), with *Ti* as the sampling periods in the original domain, we can write an approximate formula

$$\tilde{F}\_{i-1}(\mathcal{p}\_{i-1}) = \frac{e^{c\_i kT\_i}}{\pi\_i} \sum\_{m = -\infty}^{\infty} \tilde{F}\_i(\mathcal{p}\_i) e^{j2\pi mkT\_i f \mathbf{r}\_i} \quad , \tag{10}$$

*i* = *n*,*n*-1...,1, and with Ω*i* = 2π/τ*<sup>i</sup>* substituted. As follows from the error analysis (Brančík, 2011) a relative error is predictable on the region Οerr = [0,τ1) ×...× [0,τ*<sup>n</sup>*). For *k* = 0*,*1*,...,Mi*-1, *i* = 1,...,*n*, a maximum reachable region is Οmax = [0,(*M*1-1)*T*1] ×...× [0,(*Mn*-1)*Tn*]. Thus, to meet the necessary condition Οmax ⊂ Οerr, we can set up fittingly τ*<sup>i</sup>* = *MiTi*, *i* = 1,...,*n*. In practice, a region of the calculation is chosen to be Οcal = [0,*t*1cal] ×...× [0,*tn*cal], with *ti*cal = (*Mi*/2–1)*Ti*, *i* = 1,...,*n*, to provide certain margins.

#### **2.2.2 FFT, IFFT, and quotient-difference algorithms utilization**

As is shown in (Brančík, 2007a, 2010c), the discretized formula (10) can be evaluated by the FFT and IFFT algorithms, in conjunction with the quotient-difference (q-d) algorithm for accelerating convergence of the residual infinite series, see following procedures.

To explain it in more detail, let us consider an *r*-th cycle in gaining the original function via (9), i.e. { } <sup>1</sup> 1 1 ( )= ( ) *F F r r r rr* − − − *p p* . For its discretized version (10) we have

$$\tilde{F}\_{r-1}(\mathbf{s}\_1, \dots, k T\_r, \dots, t\_n) = \frac{e^{c\_r k \tilde{T}\_r}}{\pi\_r} \sum\_{m = -\infty}^{\infty} \tilde{F}\_r(\mathbf{s}\_1, \dots, \mathbf{c}\_r + j m \frac{2\pi}{\tau\_r}, \dots, t\_n) e^{j2\pi m k T\_r f \tau\_r} \ . \tag{11}$$

The above stated formula can be decomposed and expressed also as

$$\tilde{F}\_{r-1}(\mathbf{s}\_1, \dots, k\boldsymbol{\Gamma}\_r, \dots, \mathbf{t}\_n) = \frac{e^{c\_r kT\_r}}{\pi\_r} \left[ \sum\_{m=0}^{M\_r - 1} \tilde{F}\_r^{(-m)} \mathbf{z}\_{-k}^m + \sum\_{m=0}^{\alpha} \tilde{\mathbf{G}}\_r^{(-m)} \mathbf{z}\_{-k}^m + \sum\_{m=0}^{M\_r - 1} \tilde{F}\_r^{(m)} \mathbf{z}\_k^m + \sum\_{m=0}^{\alpha} \tilde{\mathbf{G}}\_r^{(m)} \mathbf{z}\_k^m - \tilde{\mathbf{F}}\_r^{(0)} \right],\\\text{(12)}$$

where individual terms are defined as

$$\begin{aligned} M\_r &= \mathbb{Z}^{k\_r}, K\_r \text{ integer }, \\ \tilde{F}\_r^{(\pm m)} &= \tilde{F}\_r(s\_1, \dots, c\_r \pm jm2\pi/\mathfrak{r}\_r, \dots, t\_n) \\ \tilde{G}\_r^{(\pm m)} &= \tilde{F}\_r^{(\pm M\_r \pm m)}, \\ z\_{\pm k} &= \exp(\pm j2\pi kT\_r/\mathfrak{r}\_r) \end{aligned} \tag{13}$$

Numerical Inverse Laplace Transforms for Electrical Engineering Simulation 55

For practical computations, however, the recursive formulae stated below are more effective

for *m =* 1*,...,2P*, ∀*k* , with the initial values *A*-1 = 0, *B*-1 = 1, *A*0 = *d*0, and *B*<sup>0</sup> = 1. Then, instead of

2 2

*G z Az Bz k*

± ±±

( ) ( ) ( ), *<sup>m</sup> <sup>m</sup> r k Pk Pk*

The q-d algorithm is a very efficient tool just for a power series convergence acceleration, here enabling (7) to achieve a relative error near its theoretical value defined by (4), see the

In this part experimental verifications of the *n*D NILT theory above will first be presented, for one to three dimensional cases, i.e. *n* ≤ 3. For such dimensions the Matlab functions have been developed and errors stated on a basis of some sample images with known originals. The Matlab listings of basic versions of the NILT functions are provided, together with examples of their right calling. Another Matlab listings will be discussed in more detail later,

In case of the 1D inverse LT, a well-known Bromwich integral results from (2), namely

<sup>1</sup> ( )= ( ) <sup>2</sup> *c st f t F s e dt* + ∞

− ∞ π

where indexes 1 were omitted. By using the theory above a path of the numerical

1 1 11 1 1 1

= ln = ln ln *<sup>M</sup> M M*

In contrast to most other approaches, the 1D NILT method described here enables to treat complex images resulting in complex originals as no real or imaginary parts are extracted during an evaluation process. It can be useful in some special applications, not only in the

<sup>1</sup> = = ( ) = = cos sin *<sup>s</sup> j t F s j f te t <sup>j</sup> <sup>t</sup>*

+ + <sup>−</sup> + +

ω

> ω

τδ

α

 − − + + ≈− +

1

electrical engineering. We can śhow it on a simple transform pair

ω

( ) 22 22

*s j s s*

ω  δ *j*

1 2 12 *A z A z dz A z B z B z dz B z m k m k m k m k m k m k m km k* ( )= ( ) ( ), ( )= ( ) ( ) ± −± ± − ± ± −± ± − ± + + , (18)

<sup>0</sup> 2 1 <sup>2</sup> <sup>1</sup> ( ) ( ) ( ) = , = , = , =, , *rj j j j dG d* <sup>−</sup> − − *<sup>q</sup> d e <sup>j</sup> <sup>P</sup>* . (17)

≈ ∀ . (19)

*c j <sup>j</sup>* , (20)

 αδ

ω  τ

ω

. (22)

 ω

. (21)

0 0 0

Then, the coefficients *dm*, *m* = 0,...,2*P*, in (14) are given by

to be used (DeHoog et al., 1982). They are of the forms

0

=

**2.3 Matlab listings and experimental errors evaluation** 

<sup>∞</sup> <sup>±</sup>

*m*

the continued fraction (14), we can write

in the chapter with practical applications.

integration is stated according to (4), leading to

τ

*c* α

**2.3.1 One-dimensional NILT** 

following examples.

when <sup>2</sup> = =, 1 *Mr j k <sup>k</sup> ze k* <sup>±</sup> π <sup>±</sup> ∀ , has been considered, and τ*<sup>r</sup>* = *MrTr*. As is evident the first and the third finite sum of (12) can be evaluated via the FFT and IFFT algorithms, respectively, while 2*P*+1 terms from the infinite sums are used as the input data in the quotient-difference algorithm (Macdonald, 1964; McCabe, 1983; Rutishauser, 1957). We can replace the above infinite power series by a continued fraction as

$$\sum\_{m=0}^{\infty} \tilde{G}\_r^{(\pm m)} z\_{\pm k}^m = d\_0 \left\langle 1 + d\_1 z\_{\pm k} \left\langle 1 + \dots + d\_{2^p} z\_{\pm k} \right\rangle \right\rangle \,' \forall k \,\,'\tag{14}$$

which gives much more accurate result than the original sum truncated on 2*P*+1 terms only. The q-d algorithm process can be explained based on a lozenge diagram shown in Fig. 1.

Fig. 1. Quotient-difference algorithm lozenge diagram

The first two columns are formed as

$$\begin{aligned} e\_0^{(i)} &= 0 \\ q\_1^{(i)} &= \tilde{G}\_r^{\pm(i+1)} \Big/ \tilde{G}\_r^{\pm i} \quad \text{i} = 0, \ldots, 2P - 1 \end{aligned} \tag{15}$$

while the successive columns are given by the rules

$$\begin{aligned} e\_j^{(i)} &= q\_j^{(i+1)} - q\_j^{(i)} + e\_{j-1}^{(i+1)}, \quad i = 0, \dots, 2P - 2j \ &\quad \text{for} \quad j = 1, \dots, P \ &\quad \text{(16)}\\ q\_j^{(i)} &= q\_{j-1}^{(i+1)} e\_{j-1}^{(i+1)} \int e\_{j-1}^{(i)} \ &\quad \text{i = 0, \dots, 2P - 2j - 1, \quad \text{for} \quad j = 2, \dots, P \ &\quad \end{aligned} \tag{16}$$

Then, the coefficients *dm*, *m* = 0,...,2*P*, in (14) are given by

54 MATLAB for Engineers – Applications in Control, Electrical Engineering, IT and Robotics

1 1

, (12)

*r m m mm*

( ) ( ) ( ) ( ) () ( , , , , )= *c kT r r M M r r*

*r rn r k r k r k rk r*

*<sup>e</sup> F s kT t F z G z Fz Gz F*

1

= ,

*z j kT*

*r*

2

*k r r*

±

= exp( ) ,

π

= , integer ,

2

*M K*

*r*

*K r r*

( ) ( )

± ± ±

We can replace the above infinite power series by a continued fraction as

0 0

( )

*e*

4 0

( )

*e*

( ) ( )

1

−

Fig. 1. Quotient-difference algorithm lozenge diagram

while the successive columns are given by the rules

1 1 11 1

+ + −− −

() ( ) () ( ) () ( ) ( ) ()

*i i ii j j jj i ii i j jj j*

0

( )

*i*

1

1 1

+ +

The first two columns are formed as

*m M m r r*

τ

where individual terms are defined as

− − −

( )

±

*m*

*G F*

±

<sup>±</sup> ∀ , has been considered, and

0

=

<sup>∞</sup> <sup>±</sup>

*m*

0 0 00

= = ==

2

π τ

τ

= ( , , , , ),

 τ

*r r r rn*

±

As is evident the first and the third finite sum of (12) can be evaluated via the FFT and IFFT algorithms, respectively, while 2*P*+1 terms from the infinite sums are used as the input data in the quotient-difference algorithm (Macdonald, 1964; McCabe, 1983; Rutishauser, 1957).

01 2

1 1 ( ) ( ( )) *<sup>m</sup> <sup>m</sup> r k k P k*

which gives much more accurate result than the original sum truncated on 2*P*+1 terms only. The q-d algorithm process can be explained based on a lozenge diagram shown in Fig. 1.

> 1 0 1 2 210 012 2 1 1 2

*q q e ee q q*

( ) ( ) ( ) ( ) ( ) ( ) ( )

±± ±

*G z d dz d z*

0 1 1 0 0 1

( ) ( ) ( )

*q e e*

3 2 0 1 3 1

() () ( )

*e e q*

1

− + −

*i i i r r*

0 0 2

*e iP qG G i P* <sup>±</sup> ± + <sup>−</sup>

= , =, , ,

= , =, , ,

= , = , , , for = , , , = , = , , , for = , , .

*e q q e i Pj j P q qe e i Pj j P*

0 21

022 1 0 2 21 2

(16)

− −

(15)

*F F s c jm t*

− − ∞ ∞ − −

*m m mm m m mm*

(13)

*<sup>r</sup>* = *MrTr*.

≈ + ++ , <sup>∀</sup>*<sup>k</sup>* , (14)

+ + +−

1 1

when <sup>2</sup>

= =, 1 *Mr j k <sup>k</sup> ze k* <sup>±</sup> π

0

$$d\_0 = \tilde{G}\_r^{(0)} \; , \; d\_{2j-1} = -q\_j^{(0)} \; , \; \; d\_{2j} = -e\_j^{(0)} \; , \; \; j = 1 \; \; \dots \; \; P \; . \tag{17}$$

For practical computations, however, the recursive formulae stated below are more effective to be used (DeHoog et al., 1982). They are of the forms

$$A\_m(z\_{\pm k}) = A\_{m-1}(z\_{\pm k}) + d\_m z\_{\pm k} A\_{m-2}(z\_{\pm k}) \ , \ B\_m(z\_{\pm k}) = B\_{m-1}(z\_{\pm k}) + d\_m z\_{\pm k} B\_{m-2}(z\_{\pm k}) \ , \tag{18}$$

for *m =* 1*,...,2P*, ∀*k* , with the initial values *A*-1 = 0, *B*-1 = 1, *A*0 = *d*0, and *B*<sup>0</sup> = 1. Then, instead of the continued fraction (14), we can write

$$\sum\_{m=0}^{\infty} \tilde{\mathbf{G}}\_r^{(\pm m)} z\_{\pm k}^m = A\_{2P}(z\_{\pm k}) / \mathcal{B}\_{2P}(z\_{\pm k}) \; , \; \forall k \; . \tag{19}$$

The q-d algorithm is a very efficient tool just for a power series convergence acceleration, here enabling (7) to achieve a relative error near its theoretical value defined by (4), see the following examples.

#### **2.3 Matlab listings and experimental errors evaluation**

In this part experimental verifications of the *n*D NILT theory above will first be presented, for one to three dimensional cases, i.e. *n* ≤ 3. For such dimensions the Matlab functions have been developed and errors stated on a basis of some sample images with known originals. The Matlab listings of basic versions of the NILT functions are provided, together with examples of their right calling. Another Matlab listings will be discussed in more detail later, in the chapter with practical applications.

#### **2.3.1 One-dimensional NILT**

In case of the 1D inverse LT, a well-known Bromwich integral results from (2), namely

$$f(t) = \frac{1}{2\pi j} \int\_{c - j^{\rm os}}^{c + j^{\rm iso}} F(s)e^{st} \, dt \,\,\,\,\,\tag{20}$$

where indexes 1 were omitted. By using the theory above a path of the numerical integration is stated according to (4), leading to

$$\alpha = \alpha - \frac{1}{\pi} \ln \left( 1 - \frac{1}{1 + \mathcal{S}\_{\mathcal{M}}} \right) = \alpha + \frac{1}{\pi} \ln \left( 1 + \frac{1}{\mathcal{S}\_{\mathcal{M}}} \right) = \alpha - \frac{1}{\pi} \ln \mathcal{S}\_{\mathcal{M}} \,. \tag{21}$$

In contrast to most other approaches, the 1D NILT method described here enables to treat complex images resulting in complex originals as no real or imaginary parts are extracted during an evaluation process. It can be useful in some special applications, not only in the electrical engineering. We can śhow it on a simple transform pair

$$F(s) = \frac{l}{s - j\alpha} = \frac{s}{s^2 + \alpha^2} + j\frac{\alpha\alpha}{s^2 + \alpha^2} \quad \mapsto \quad f(t) = e^{i\alpha t} = \cos\alpha t + j\sin\alpha t \,\,. \tag{22}$$

Numerical Inverse Laplace Transforms for Electrical Engineering Simulation 57

Graphical results and corresponding errors are shown in Fig. 2. Because the originals are

Im[f(t)]

= 0, we can see the errors satisfy (21) very well (


10-15

10-10

10-5

Error

Another test functions are considered in Tab. 2, with numerical results shown in Fig. 3. As is again obvious from Fig. 3 the relative errors satisfy theoretical expectations, with an

i 1 2 3 4 5 6

π

2

1 *s* +1

*<sup>t</sup>* <sup>0</sup>*J t*( ) <sup>1</sup>

11 2 2

δ

<sup>−</sup> , (23)

*st s t*

+

2 *s* 4 π

+ π

In case of the 2D inverse LT, a two-fold Bromwich integral results from (2), namely

1 2

+∞ +∞

−∞ −∞

and by using the theory above the paths of numerical integrations are stated based on (4) as

1 <sup>4</sup> ( , )= (, ) *c jc j*

π

*i i i*

1 2

*c jc j f t t F s s e ds ds*

*i i M c i*

 − − ≈− +

δ

1 2 2 1 2 1 2

11 1 <sup>1</sup> 1 2 1 2 = ln ln , = , *<sup>M</sup>*

 τ

 α

100

0 1 2 3 4

Imaginary part of the original

t

0 1 2 3 4

t

*<sup>s</sup> e s*

2 erfc

*t*

<sup>−</sup> *<sup>s</sup> e*

1( ) *<sup>t</sup>* <sup>−</sup><sup>1</sup>

*s* −

. (24)

δ

*<sup>M</sup>* = 10-10 was

bounded by values ±1, and


10-15

exception of vicinities of discontinuities.

*s* +1 <sup>2</sup>

Table 2. Test Laplace transforms for errors evaluation

α

τ

1

10-10

10-5

Error

( ) *F s <sup>i</sup>*

( ) *<sup>i</sup> f t <sup>t</sup> e*

**2.3.2 Two-dimensional NILT** 

100

Re[f(t)]

α

0 1 2 3 4

Real part of the original

t

0 1 2 3 4

t

1

<sup>−</sup> *<sup>t</sup> te*<sup>−</sup> sin( ) 2

Fig. 2. Numerical inversion leading to complex original *f*(*t*) = exp(*jωt*)

( ) *s* +1 2 2

considered), excluding only beginning of the interval.

Of course, when preprocessing the transform to arrange it to a Cartesian form, as is shown on the right sides in (22), the result could by get by inverting the real and imaginary parts separately, by using an arbitrary NILT method. Here, however, no symbolic manipulations are needed in advance, and *F*(*s*) enters the NILT function in its basic form as a whole.

A Matlab language listing is shown in Tab. 1, where the relative error needed is marked by Er and is subject to a change if necessary, similarly as the minimal abscissa of convergence (exponential order) α , alfa, numbers of points for the resultant solution, M, and for the q-d algorithm, P. If only real transforms *F*(*s*) are considered the bottom line in the listing can be inactivated. The NILT function is called from a command line as follows: niltc('F',tm); where F is a name of another function in which the *F*(*s*) is defined, and tm marks an upper limit of the original variable *t*. In our case, and for ω = 2π, this function can have a form

```
function f=expc(s) 
f=1./(s-2*pi*j);
```

```
% ------ 1D NILT for complex arguments – basic version -------
% ----------- based on FFT/IFFT/q-d, by L. Brančík -----------
function [ft,t]=niltc(F,tm); 
alfa=0; M=256; P=3; Er=1e-10; % adjustable
N=2*M; qd=2*P+1; 
t=linspace(0,tm,M); NT=2*tm*N/(N-2); omega=2*pi/NT; 
c=alfa+log(1+1/Er)/NT; s=c-i*omega*(0:N+qd-1); 
Fs(1,:)=feval(F,s); Fs(2,:)=feval(F,conj(s)); 
ft(1,:)=fft(Fs(1,1:N)); ft(2,:)=N*ifft(Fs(2,1:N)); 
ft=ft(:,1:M); D=zeros(2,qd); E=D; 
Q=Fs(:,N+2:N+qd)./Fs(:,N+1:N+qd-1); 
D(:,1)=Fs(:,N+1); D(:,2)=-Q(:,1); 
for r=2:2:qd-1 
 w=qd-r; 
 E(:,1:w)=Q(:,2:w+1)-Q(:,1:w)+E(:,2:w+1); D(:,r+1)=-E(:,1); 
 if r>2 
 Q(:,1:w-1)=Q(:,2:w).*E(:,2:w)./E(:,1:w-1); 
       D(:,r)=-Q(:,1); 
 end
end
A2=zeros(2,M); B2=ones(2,M); A1=repmat(D(:,1),[1,M]); B1=B2; 
z1=exp(-i*omega*t); z=[z1;conj(z1)]; 
for n=2:qd 
 Dn=repmat(D(:,n),[1,M]); 
 A=A1+Dn.*z.*A2; B=B1+Dn.*z.*B2; A2=A1; B2=B1; A1=A; B1=B; 
end
ft=ft+A./B; ft=sum(ft)-Fs(2,1); ft=exp(c*t)/NT.*ft; 
ft(1)=2*ft(1); 
figure; plot(t,real(ft)); 
figure; plot(t,imag(ft)); % optional
```
Table 1. Matlab listing of 1D NILT method accepting complex arguments

As is obvious, the Laplace transform must be defined to enable Matlab array processing, i.e. element-by-element array operators have to be used. Thus, the calling our function can look like niltc('expc',4); if the function is saved under the same name, expc, or it is placed inside the M-file with own NILT function (Tab. 1), following always its body. Alternatively, the calling can look like [ft,t]=niltc('F',tm); if respective variables in the brackets are to be saved in the memory after the function finishes.

Of course, when preprocessing the transform to arrange it to a Cartesian form, as is shown on the right sides in (22), the result could by get by inverting the real and imaginary parts separately, by using an arbitrary NILT method. Here, however, no symbolic manipulations

A Matlab language listing is shown in Tab. 1, where the relative error needed is marked by Er and is subject to a change if necessary, similarly as the minimal abscissa of convergence

algorithm, P. If only real transforms *F*(*s*) are considered the bottom line in the listing can be inactivated. The NILT function is called from a command line as follows: niltc('F',tm); where F is a name of another function in which the *F*(*s*) is defined, and tm marks an upper

% ------ 1D NILT for complex arguments – basic version ------- % ----------- based on FFT/IFFT/q-d, by L. Brančík -----------

alfa=0; M=256; P=3; Er=1e-10; % adjustable

E(:,1:w)=Q(:,2:w+1)-Q(:,1:w)+E(:,2:w+1); D(:,r+1)=-E(:,1);

A2=zeros(2,M); B2=ones(2,M); A1=repmat(D(:,1),[1,M]); B1=B2;

A=A1+Dn.\*z.\*A2; B=B1+Dn.\*z.\*B2; A2=A1; B2=B1; A1=A; B1=B;

figure; plot(t,imag(ft)); % optional

t=linspace(0,tm,M); NT=2\*tm\*N/(N-2); omega=2\*pi/NT; c=alfa+log(1+1/Er)/NT; s=c-i\*omega\*(0:N+qd-1); Fs(1,:)=feval(F,s); Fs(2,:)=feval(F,conj(s)); ft(1,:)=fft(Fs(1,1:N)); ft(2,:)=N\*ifft(Fs(2,1:N));

Q(:,1:w-1)=Q(:,2:w).\*E(:,2:w)./E(:,1:w-1);

ft=ft+A./B; ft=sum(ft)-Fs(2,1); ft=exp(c\*t)/NT.\*ft;

ω = 2π

, alfa, numbers of points for the resultant solution, M, and for the q-d

, this function can have a form

are needed in advance, and *F*(*s*) enters the NILT function in its basic form as a whole.

Table 1. Matlab listing of 1D NILT method accepting complex arguments

are to be saved in the memory after the function finishes.

As is obvious, the Laplace transform must be defined to enable Matlab array processing, i.e. element-by-element array operators have to be used. Thus, the calling our function can look like niltc('expc',4); if the function is saved under the same name, expc, or it is placed inside the M-file with own NILT function (Tab. 1), following always its body. Alternatively, the calling can look like [ft,t]=niltc('F',tm); if respective variables in the brackets

(exponential order)

function f=expc(s) f=1./(s-2\*pi\*j);

α

limit of the original variable *t*. In our case, and for

function [ft,t]=niltc(F,tm);

ft=ft(:,1:M); D=zeros(2,qd); E=D; Q=Fs(:,N+2:N+qd)./Fs(:,N+1:N+qd-1); D(:,1)=Fs(:,N+1); D(:,2)=-Q(:,1);

D(:,r)=-Q(:,1);

Dn=repmat(D(:,n),[1,M]);

figure; plot(t,real(ft));

z1=exp(-i\*omega\*t); z=[z1;conj(z1)];

N=2\*M; qd=2\*P+1;

for r=2:2:qd-1 w=qd-r;

if r>2

for n=2:qd

ft(1)=2\*ft(1);

 end end

end

Graphical results and corresponding errors are shown in Fig. 2. Because the originals are bounded by values ±1, and α = 0, we can see the errors satisfy (21) very well (δ*<sup>M</sup>* = 10-10 was considered), excluding only beginning of the interval.

Fig. 2. Numerical inversion leading to complex original *f*(*t*) = exp(*jωt*)

Another test functions are considered in Tab. 2, with numerical results shown in Fig. 3. As is again obvious from Fig. 3 the relative errors satisfy theoretical expectations, with an exception of vicinities of discontinuities.


Table 2. Test Laplace transforms for errors evaluation

#### **2.3.2 Two-dimensional NILT**

In case of the 2D inverse LT, a two-fold Bromwich integral results from (2), namely

$$f(t\_1, t\_2) = -\frac{1}{4\pi^2} \int\_{c\_1 - j\alpha}^{c\_1 + j\alpha} \int\_{-j\alpha}^{j\alpha} F(s\_1, s\_2) e^{s\_1 t\_1 + s\_2 t\_2} ds\_1 ds\_2 \,\tag{23}$$

and by using the theory above the paths of numerical integrations are stated based on (4) as

$$\alpha c\_i = \alpha\_i - \frac{1}{\pi\_i} \ln \left( 1 - \frac{1}{\sqrt{1 + \delta\_M}} \right) = \alpha\_i - \frac{1}{\pi\_i} \ln \frac{\delta\_M}{2}, \quad i = 1, 2 \dots \tag{24}$$

Numerical Inverse Laplace Transforms for Electrical Engineering Simulation 59

% ----- 2D NILT based on partial inversions, by L. Brančík -----

alfax=0; alfay=0; Mx=256; My=256; P=3; Er=1e-8; % adjustable xpl=64; ypl=64; % adjustable

x=linspace(0,xm,Mx); y=linspace(0,ym,My); x=x(rx); y=y(ry); [q,p]=meshgrid(Asigy,Asigx2); Fpq(:,:,1)=feval(F,p,q); [q,p]=meshgrid(conj(Asigy),Asigx2); Fpq(:,:,2)=feval(F,p,q); Fpyp=Pnilt(Fpq,Ny,ry,qd,y,ny,omegay,sigy); % Pnilt to get F(p,y)

fxy=Pnilt(Fpy,Nx,rx,qd,x,nx,omegax,sigx); % Pnilt to get f(x,y)

figure; mesh(x,y,imag(fxy)); % optional % ------ PARTIAL NILT based on FFT/IFFT/Q-D, by L.Brančík ------

fx(:,:,1)=fft(Fq(:,:,1),N,2); fx(:,:,2)=N\*ifft(Fq(:,:,2),N,2);

w=qd-r; e(:,1:w,:)=q(:,2:w+1,:)-q(:,1:w,:)+e(:,2:w+1,:);

q(:,1:w-1,:)=q(:,2:w,:).\*e(:,2:w,:)./e(:,1:w-1,:);

z1(1,:,1)=exp(-i\*omega\*xy); z1(1,:,2)=conj(z1(1,:,1));

fx=fx+A./B; fx=sum(fx,3)-repmat(Fq(:,1),[1,delxy]); fx=repmat(exp(c\*xy)/nxy,[delv,1]).\*fx; fx(:,1)=2\*fx(:,1);

d=zeros(delv,qd,2); e=d; q=Fq(:,N+2:N+qd,:)./Fq(:,N+1:N+qd-1,:);

Nx=2\*Mx; Ny=2\*My; qd=2\*P+1; Ke=log(1-1/sqrt(1+Er));

omegax=2\*pi/nx; omegay=2\*pi/ny; sigx=alfax-Ke/nx; sigy=alfay-Ke/ny; qd1=qd-1; Nxw=Nx+qd1; Nyw=Ny+qd1; Asigx=sigx-i\*omegax\*(0:Nxw); Asigy=sigy-i\*omegay\*(0:Nyw);

function fx=Pnilt(Fq,N,grid,qd,xy,nxy,omega,c);

A2=zeros(delv,delxy,2); B2=ones(delv,delxy,2);

A1=repmat(d(:,1,:),[1,delxy,1]); B1=B2;

Dn=repmat(d(:,n,:),[1,delxy,1]);

d(:,1,:)=Fq(:,N+1,:); d(:,2,:)=-q(:,1,:);

fx=fx(:,grid,:); delv=size(Fq,1); delxy=length(xy);

function fxy=nilt2c(F,xm,ym);

nx=2\*xm\*Nx/(Nx-2); ny=2\*ym\*Ny/(Ny-2);

rx=[1:Mx/xpl:Mx,Mx]; ry=[1:My/ypl:My,My];

Asigx2=cat(2,Asigx,conj(Asigx));

Fpy(:,:,1)=Fpyp(1:Nxw+1,:).'; Fpy(:,:,2)=Fpyp(Nxw+2:2\*Nxw+2,:).';

figure; mesh(x,y,real(fxy));

d(:,r+1,:)=-e(:,1,:);

d(:,r,:)=-q(:,1,:);

z=repmat(z1,[delv,1]);

Table 3. Matlab listing of 2D NILT based on partial inversions

( ) 1 2

absolute error. The respective Matlab function can be of a form

1 2 exp( ) 2

*s s*

corresponding transform pair is

for r=2:2:qd-1

if r>2

for n=2:qd

end

 end end

Another simple example shows a shifted 2D unit step, with different shifts along the axis. A

A=A1+Dn.\*z.\*A2; B=B1+Dn.\*z.\*B2; A2=A1; B2=B1; A1=A; B1=B;

1 2 12 1 2

, = ( , ) = 1( 2, 1) *s s Fs s ft t t t*

In this case, a displaying imaginary part gives a zero plane, and the respective line in the 2D NILT function can be inactivated. The graphical results are depicted in Fig. 5, including an

− − − − . (27)

Fig. 3. Computed originals and errors for test Laplace transforms in Tab. 2

A Matlab language listing is shown in Tab. 3, with all the parameters denoted by similar way as in the previous case.

Nevertheless, the Laplace transform variables and the original variables have changed in this listing as *s*<sup>1</sup> → *p*, *s*<sup>2</sup> → *q*, and *t*<sup>1</sup> → *x*, *t*<sup>2</sup> → *y*, respectively, which simplified a writing. The parameters are then indexed in compliance with these new notations. Besides, numbers of points used to plot three-dimensional graphical results are set by xpl and ypl.

For the same reasons as at the 1D NILT, the 2D NILT method discussed here enables to treat complex images of two variables resulting in complex originals. We will śhow it on a simple transform pair

$$F(s\_1, s\_2) = \frac{1}{(s\_1 - jo\_1)(s\_2 - jo\_2)} \quad \mapsto \quad f(t\_1, t\_2) = e^{j(o\_1t\_1 + o\_2t\_2)}.\tag{25}$$

After rearranging the above equation, we can also write

$$F(s\_1, s\_2) = \frac{s\_1 s\_2 - a \rho\_1 \rho\_2}{\left(s\_1^2 + a \rho\_1^2\right)\left(s\_2^2 + a \rho\_2^2\right)} + j \frac{a \rho\_2 s\_1 + a \rho\_1 s\_2}{\left(s\_1^2 + a \rho\_1^2\right)\left(s\_2^2 + a \rho\_2^2\right)} \quad \leftrightarrow$$

$$f(t\_1, t\_2) = \cos\left(a\rho\_1 t\_1 + a \rho\_2 t\_2\right) + j \sin\left(a\rho\_1 t\_1 + a \rho\_2 t\_2\right)$$

The 2D NILT function is called from a command line as follows: nilt2c('F',xm,ym); where F is a name of another function in which the *F*(*p,q*) is defined, and xm and ym mark upper limits of the original variables *x* and y. In our case, and for ω1 = ω<sup>2</sup> = 2π, this function can have a form

function f=exp2c(p,q) f=1./(p-2\*pi\*j)./(q-2\*pi\*j);

and its calling can look like nilt2c('exp2c',3,3); with graphical results in Fig. 4. As the originals are bounded by values ±1, and α1 = α<sup>2</sup> = 0, we can see the errors satisfy (21) very well (δ*<sup>M</sup>* = 10-8 was considered), excluding beginnings of the 2D region.

0 0.5 1

0 0.5 1

0 0.5 1 1.5

f 4

f 5

f 6

A Matlab language listing is shown in Tab. 3, with all the parameters denoted by similar

Nevertheless, the Laplace transform variables and the original variables have changed in this listing as *s*<sup>1</sup> → *p*, *s*<sup>2</sup> → *q*, and *t*<sup>1</sup> → *x*, *t*<sup>2</sup> → *y*, respectively, which simplified a writing. The parameters are then indexed in compliance with these new notations. Besides, numbers of

For the same reasons as at the 1D NILT, the 2D NILT method discussed here enables to treat complex images of two variables resulting in complex originals. We will śhow it on a simple

, = ( , )= *<sup>j</sup> t t Fs s ft t e sj s j*

( )( ) ( )( )

 ωω

12 1 2 21 12 1 2 2 22 2 2 22 2 1 12 2 1 12 2

− + + ++ ++

ω

( )( )

++ +

The 2D NILT function is called from a command line as follows: nilt2c('F',xm,ym); where F is a name of another function in which the *F*(*p,q*) is defined, and xm and ym mark

and its calling can look like nilt2c('exp2c',3,3); with graphical results in Fig. 4. As

α1 = α

*<sup>M</sup>* = 10-8 was considered), excluding beginnings of the 2D region.

*ss ss*

 ω <sup>0</sup> <sup>10</sup> <sup>20</sup> <sup>30</sup> -0.5

<sup>0</sup> <sup>5</sup> <sup>10</sup> <sup>15</sup> -0.5

<sup>0</sup> <sup>1</sup> <sup>2</sup> <sup>3</sup> -0.5

t

0 10 20 30

0 5 10 15

0 1 2 3

t

<sup>100</sup> ERRORS

10-10

10-10

10-10

( ) 11 2 2

ω1 = ω<sup>2</sup> = 2π

<sup>2</sup> = 0, we can see the errors satisfy (21)

. (26)

, this function

+

ω ω

− − . (25)

 ω

ωω

100

100

ORIGINALS

0 1 2 3 4

0 2 4 6 8

0 1 2 3 4

t

( ) ( )( )

After rearranging the above equation, we can also write

( )

, =

ω

( , ) = cos sin

upper limits of the original variables *x* and y. In our case, and for

ωω

Fig. 3. Computed originals and errors for test Laplace transforms in Tab. 2

points used to plot three-dimensional graphical results are set by xpl and ypl.

1 2 1 2 1 12 2 1

1 2 11 2 2 11 2 2

*ft t t t j t t*

*s s s s Fs s <sup>j</sup>*

ω ω

ωω

<sup>100</sup> ERRORS

10-10

10-10

10-10

100

100

<sup>0</sup> <sup>1</sup> <sup>2</sup> <sup>3</sup> <sup>4</sup> <sup>0</sup>

<sup>0</sup> <sup>2</sup> <sup>4</sup> <sup>6</sup> <sup>8</sup> <sup>0</sup>

<sup>0</sup> <sup>1</sup> <sup>2</sup> <sup>3</sup> <sup>4</sup> -1

t

way as in the previous case.

ORIGINALS

0.5 1

0.2 0.4

> 0 1

transform pair

can have a form

very well (

function f=exp2c(p,q)

δ

f=1./(p-2\*pi\*j)./(q-2\*pi\*j);

the originals are bounded by values ±1, and

f 3

f 2

f 1

```
% ----- 2D NILT based on partial inversions, by L. Brančík -----
function fxy=nilt2c(F,xm,ym); 
alfax=0; alfay=0; Mx=256; My=256; P=3; Er=1e-8; % adjustable
xpl=64; ypl=64; % adjustable
Nx=2*Mx; Ny=2*My; qd=2*P+1; Ke=log(1-1/sqrt(1+Er)); 
nx=2*xm*Nx/(Nx-2); ny=2*ym*Ny/(Ny-2); 
omegax=2*pi/nx; omegay=2*pi/ny; sigx=alfax-Ke/nx; 
sigy=alfay-Ke/ny; qd1=qd-1; Nxw=Nx+qd1; Nyw=Ny+qd1; 
Asigx=sigx-i*omegax*(0:Nxw); Asigy=sigy-i*omegay*(0:Nyw); 
Asigx2=cat(2,Asigx,conj(Asigx)); 
rx=[1:Mx/xpl:Mx,Mx]; ry=[1:My/ypl:My,My]; 
x=linspace(0,xm,Mx); y=linspace(0,ym,My); x=x(rx); y=y(ry); 
[q,p]=meshgrid(Asigy,Asigx2); Fpq(:,:,1)=feval(F,p,q); 
[q,p]=meshgrid(conj(Asigy),Asigx2); Fpq(:,:,2)=feval(F,p,q); 
Fpyp=Pnilt(Fpq,Ny,ry,qd,y,ny,omegay,sigy); % Pnilt to get F(p,y)
Fpy(:,:,1)=Fpyp(1:Nxw+1,:).'; 
Fpy(:,:,2)=Fpyp(Nxw+2:2*Nxw+2,:).'; 
fxy=Pnilt(Fpy,Nx,rx,qd,x,nx,omegax,sigx); % Pnilt to get f(x,y)
figure; mesh(x,y,real(fxy)); 
figure; mesh(x,y,imag(fxy)); % optional
% ------ PARTIAL NILT based on FFT/IFFT/Q-D, by L.Brančík ------
function fx=Pnilt(Fq,N,grid,qd,xy,nxy,omega,c); 
fx(:,:,1)=fft(Fq(:,:,1),N,2); fx(:,:,2)=N*ifft(Fq(:,:,2),N,2); 
fx=fx(:,grid,:); delv=size(Fq,1); delxy=length(xy); 
d=zeros(delv,qd,2); e=d; q=Fq(:,N+2:N+qd,:)./Fq(:,N+1:N+qd-1,:); 
d(:,1,:)=Fq(:,N+1,:); d(:,2,:)=-q(:,1,:); 
for r=2:2:qd-1 
 w=qd-r; e(:,1:w,:)=q(:,2:w+1,:)-q(:,1:w,:)+e(:,2:w+1,:); 
 d(:,r+1,:)=-e(:,1,:); 
 if r>2 
 q(:,1:w-1,:)=q(:,2:w,:).*e(:,2:w,:)./e(:,1:w-1,:); 
 d(:,r,:)=-q(:,1,:); 
 end
end
A2=zeros(delv,delxy,2); B2=ones(delv,delxy,2); 
A1=repmat(d(:,1,:),[1,delxy,1]); B1=B2; 
z1(1,:,1)=exp(-i*omega*xy); z1(1,:,2)=conj(z1(1,:,1)); 
z=repmat(z1,[delv,1]); 
for n=2:qd 
 Dn=repmat(d(:,n,:),[1,delxy,1]); 
 A=A1+Dn.*z.*A2; B=B1+Dn.*z.*B2; A2=A1; B2=B1; A1=A; B1=B; 
end
fx=fx+A./B; fx=sum(fx,3)-repmat(Fq(:,1),[1,delxy]); 
fx=repmat(exp(c*xy)/nxy,[delv,1]).*fx; fx(:,1)=2*fx(:,1);
```
Table 3. Matlab listing of 2D NILT based on partial inversions

Another simple example shows a shifted 2D unit step, with different shifts along the axis. A corresponding transform pair is

$$F(s\_1, s\_2) = \frac{\exp(-2s\_1 - s\_2)}{s\_1 s\_2} \quad \mapsto \quad f(t\_1, t\_2) = \underline{1}(t\_1 - 2, t\_2 - 1) \,. \tag{27}$$

In this case, a displaying imaginary part gives a zero plane, and the respective line in the 2D NILT function can be inactivated. The graphical results are depicted in Fig. 5, including an absolute error. The respective Matlab function can be of a form

Numerical Inverse Laplace Transforms for Electrical Engineering Simulation 61

− − ≈− =

Here only experimental results will be shown to verify an accuracy of the method. A Matlab language listing looks similarly like for the 2D NILT case, but the partial NILT subfunction is called once more, and respective arrays dimensions are enlarged. Original functions corresponding to 3D Laplace transforms cannot be displayed graphically as a whole, of course. However, for one variable chosen as constant, it is posssible to display three respective two-dimensional cuts. It will be demonstrated on the example of 3D shifted unit

2 3 11 2 3 exp( ) (, , ) *sss tt t*

with different values of shifts along respective coordinates so that correctness of results can easily be identified, see Fig. 6. Errors again correspond to theoretically expected ones.

> ,t3 ), t2 = const.

Unit-step cut 1(t1

0

Absolute error <sup>ε</sup>(t1

0

In this chapter some examples of the application of the NILT algorithms developed relating to problems of electrical engineering simulation are presented. First, the 1D NILT method is applied for the solution of transient phenomena in linear electrical circuits with both lumped and distributed parameters. This well-known approach is usable wherever linear ordinary differential equations (ODE) are transformed into algebraic ones so that an inverse Laplace transform can be considered. Then the 2D NILT method is utilized to solve transient phenomena on transmission lines (TL) after relevant telegraphic equations (a type of partial differential equations (PDE)) are transformed into algebraic ones by a 2D Laplace transform. In this way voltage and/or current distributions along the TL wires can be determined in a single calculation step. Finally, the utilization of the 1D to 3D NILTs to weakly nonlinear

0

0

2

t 1

2

t 1

Fig. 6. Numerical inversion leading to shifted 3D unit step *f*(*t*1,*t*2,*t*3) = 1(*t*1−1,*t*2−2,*t*3−3)

**3. Application of NILT algorithms to electrical engineering simulation** 

4 -0.5 0 0.5 1 1.5

4 10-20 10-10 100

Error

f(t1,4,t3)

2

,t3 )

2

t 3

t 3 4

4

0

Absolute error <sup>ε</sup>(t2

0

0

,t3 ), t1 = const.

0

2

t 2

2

t 2

Unit-step cut 1(t2

4 -0.5 0 0.5 1 1.5

4 10-20 10-10 100

Error

f(4,t2,t3)

2

,t3 )

2

t 3

t 3 4

4

11 1 <sup>1</sup> <sup>123</sup> 1 3 = ln ln , , , *<sup>M</sup>*

 τ

 α δ

12 2

−− − −− − , (30)

. (29)

3

+

*i i M c i*

δ

*i i i*

123

123

*ss s*

α

step, with a Laplace transform pair

,t2 ), t3 = const.

0

Absolute error <sup>ε</sup>(t1

0

0

0

2

t 1

2

t 1

Unit-step cut 1(t1

4 -0.5 0 0.5 1 1.5

4 10-20 10-10 100

Error

f(t1,t2,4)

2

,t2 )

2

t 2

t 2 4

4

τ

```
function f=step2(p,q) 
f=exp(-2*p-q)./p./q;
```
and called as nilt2c('step2',4,4);, with the results theoretically expected.

Fig. 4. Numerical inversion leading to complex original *f*(*t*1,*t*2) = exp(*jω*(*t*1+*t*2))

Fig. 5. Numerical inversion leading to shifted 2D unit step *f*(*t*1,*t*2) = 1(*t*1−2,*t*2−1)

#### **2.3.3 Three-dimensional NILT**

In case of the 3D inverse LT, a three-fold Bromwich integral results from (2), namely

$$f(t\_1, t\_2, t\_3) = \frac{j}{8\pi^3} \int\_{c\_1 - j\alpha}^{c\_1 + j\alpha} \int\_{c\_2 - j\alpha}^{c\_2 + j\alpha} \int\_{c\_3 - j\alpha}^{c\_1 + s\_2 - j\alpha} F(s\_1, s\_2, s\_3) e^{s\_1 t\_1 + s\_2 t\_2 + s\_3 t\_3} ds\_1 ds\_2 ds\_3 \,\tag{28}$$

and by using the theory above the paths of numerical integrations are stated based on (4) as

and called as nilt2c('step2',4,4);, with the results theoretically expected.

0 1 2 3

0 1 2 3


10-15 10-10 10-5 10<sup>0</sup>

4 10-20

10-10

Error

10<sup>0</sup>

Error

Im[f(t1,t2)]

<sup>0</sup> <sup>1</sup> <sup>2</sup> <sup>3</sup>

<sup>0</sup> <sup>1</sup> <sup>2</sup> <sup>3</sup>

t 1

Absolute error for the 2D unit step

0

11 2 2 3 3

, (28)

*st s t st*

+ +

2

t 2 t 1

Absolute error for the 2D sine function

Imaginary part of the original

0 1 2 3

0 1 2 3

t 2

t 2

<sup>0</sup> <sup>1</sup> <sup>2</sup> <sup>3</sup> <sup>4</sup>

t 1

t 2

t 2

Fig. 4. Numerical inversion leading to complex original *f*(*t*1,*t*2) = exp(*jω*(*t*1+*t*2))

<sup>0</sup> <sup>1</sup> <sup>2</sup> <sup>3</sup> <sup>4</sup>

Fig. 5. Numerical inversion leading to shifted 2D unit step *f*(*t*1,*t*2) = 1(*t*1−2,*t*2−1)

123

*c jc jc j*

+∞ +∞ +∞

−∞ −∞ −∞

123

*c jc jc j*

In case of the 3D inverse LT, a three-fold Bromwich integral results from (2), namely

<sup>123</sup> <sup>3</sup> <sup>123</sup> <sup>123</sup> <sup>8</sup> ( , , )= (, , )

and by using the theory above the paths of numerical integrations are stated based on (4) as

*<sup>j</sup> <sup>f</sup> tt t F s s s e ds ds ds*

t 1

π

function f=step2(p,q) f=exp(-2\*p-q)./p./q;

> -1 -0.5 0 0.5 1

10-15 10-10 10-5 10<sup>0</sup>

> 4 -0.5 0 0.5 1 1.5

f(t1,t2

)

Error

Re[f(t1,t2)]

<sup>0</sup> <sup>1</sup> <sup>2</sup> <sup>3</sup>

<sup>0</sup> <sup>1</sup> <sup>2</sup> <sup>3</sup>

t 1

Shifted 2D unit step

0

2

t 2

**2.3.3 Three-dimensional NILT** 

t 1

Absolute error for the 2D cosine function

Real part of the original

$$\alpha\_i = \alpha\_i - \frac{1}{\pi\_i} \text{ln} \left( 1 - \frac{1}{\sqrt[3]{1 + \mathcal{S}\_M}} \right) = \alpha\_i - \frac{1}{\pi\_i} \text{ln} \frac{\mathcal{S}\_M}{3}, \quad i = 1, 2, 3 \dots \tag{29}$$

Here only experimental results will be shown to verify an accuracy of the method. A Matlab language listing looks similarly like for the 2D NILT case, but the partial NILT subfunction is called once more, and respective arrays dimensions are enlarged. Original functions corresponding to 3D Laplace transforms cannot be displayed graphically as a whole, of course. However, for one variable chosen as constant, it is posssible to display three respective two-dimensional cuts. It will be demonstrated on the example of 3D shifted unit step, with a Laplace transform pair

$$\frac{\exp(-s\_1 - 2s\_2 - 3s\_3)}{s\_1 s\_2 s\_3} \quad \mapsto \quad \underline{\mathbb{I}}(t\_1 - 1, t\_2 - 2, t\_2 - 3) \; , \tag{30}$$

with different values of shifts along respective coordinates so that correctness of results can easily be identified, see Fig. 6. Errors again correspond to theoretically expected ones.

Fig. 6. Numerical inversion leading to shifted 3D unit step *f*(*t*1,*t*2,*t*3) = 1(*t*1−1,*t*2−2,*t*3−3)

#### **3. Application of NILT algorithms to electrical engineering simulation**

In this chapter some examples of the application of the NILT algorithms developed relating to problems of electrical engineering simulation are presented. First, the 1D NILT method is applied for the solution of transient phenomena in linear electrical circuits with both lumped and distributed parameters. This well-known approach is usable wherever linear ordinary differential equations (ODE) are transformed into algebraic ones so that an inverse Laplace transform can be considered. Then the 2D NILT method is utilized to solve transient phenomena on transmission lines (TL) after relevant telegraphic equations (a type of partial differential equations (PDE)) are transformed into algebraic ones by a 2D Laplace transform. In this way voltage and/or current distributions along the TL wires can be determined in a single calculation step. Finally, the utilization of the 1D to 3D NILTs to weakly nonlinear

Numerical Inverse Laplace Transforms for Electrical Engineering Simulation 63


v [V]

Fig. 8. Numerically computed exciting current and voltage responses waveforms

N=2\*M; qd=2\*P+1; t=linspace(0,tm,M); NT=2\*tm\*N/(N-2);

E(:,1:w,:)=Q(:,2:w+1,:)-Q(:,1:w,:)+E(:,2:w+1,:);

Q(:,1:w-1,:)=Q(:,2:w,:).\*E(:,2:w,:)./E(:,1:w-1,:);

ft=ft+A./B; ft=sum(ft,3)-repmat(Fs(:,1,2),[1,M,1]); ft=repmat(exp(c\*t)/NT,[lv,1]).\*ft; ft(:,1)=2\*ft(:,1);

case 'p1', plott1(t,ft); case 'p2', plott2(t,ft);

c=alfa+log(1+1/Er)/NT; s=c-i\*omega\*(0:N+qd-1);

D(:,1,:)=Fs(:,N+1,:); D(:,2,:)=-Q(:,1,:);

% ------ 1D NILT for complex arguments – vector version ------- % % ----------- based on FFT/IFFT/q-d, by L. Brančík ------------ %

alfa=0; M=256; P=3; Er=1e-10; % adjustable

Fs(:,:,1)=feval(F,s); Fs(:,:,2)=feval(F,conj(s)); lv=size(Fs,1); ft(:,:,1)=fft(Fs(:,:,1),N,2); ft(:,:,2)=N\*ifft(Fs(:,:,2),N,2);

D=zeros(lv,qd,2); E=D; Q=Fs(:,N+2:N+qd,:)./Fs(:,N+1:N+qd-1,:);

A2=zeros(lv,M,2); B2=ones(lv,M,2); A1=repmat(D(:,1,:),[1,M,1]); B1=B2; z1=repmat(exp(-i\*omega\*t),[lv,1]); z=cat(3,z1,conj(z1));

A=A1+Dn.\*z.\*A2; B=B1+Dn.\*z.\*B2; A2=A1; B2=B1; A1=A; B1=B;

case 'p3', plott3(t,ft); otherwise display('Invalid Plot');

0.025

0.05

1

0

<sup>0</sup> 0.2 0.4 0.6 0.8 <sup>1</sup> -0.05

2

4

t [s]

Voltage responses for exciting currents

3

<sup>0</sup> 0.2 0.4 0.6 0.8 <sup>1</sup> -1.5

t [s]

function [ft,t]=niltcv(F,tm,depict);

Table 5. Matlab listing of vector version of 1D NILT method

Here one more parameter depict is used to define a method of plotting individual items from a set of originals. The 1D NILT function is called as niltcv('F',tm,'depict');

where 'depict' is a text string 'p1', 'p2', or 'p3', see Tab. 6 for more details.

Exciting current waveforms

<sup>2</sup> <sup>3</sup>

4

omega=2\*pi/NT;

ft=ft(:,1:M,:);

for r=2:2:qd-1 w=qd-r;

if r>2

for n=2:qd

switch depict

 end end

end

end

D(:,r+1,:)=-E(:,1,:);

D(:,r,:)=-Q(:,1,:);

Dn=repmat(D(:,n,:),[1,M,1]);

1


i [A]

1.5 x 10-3

electrical circuits solution is discussed. In this case the relevant nonlinear ODEs describing the circuit are expanded into Volterra series which respective NILTs are applied on.

#### **3.1 One-dimensional NILT algorithm application**

#### **3.1.1 Preliminary example based on lumped parameter circuit**

A simple example demonstrating the application of the basic 1D NILT algorithm in Tab. 1 is shown in Fig. 7. This really initiatory linear electrical circuit was chosen with an intention to be also considered later, in chapter 3.3.1, as a nonlinear circuit, with *G*2 being a nonlinear element. In this way one will be able to compare results and make some conclusions.

Fig. 7. Linear reactive electrical circuit of the 1st order

Denoting *G* = *G*1 + *G*2, the 1st-order linear ODE has a form

$$\mathbf{C}\frac{d\upsilon(t)}{dt} + \mathbf{G}\upsilon(t) = \dot{\mathbf{r}}(t) \tag{31}$$

with a Laplace-domain solution

$$V(s) = \frac{I(s) + Cv(0)}{G + sC},\tag{32}$$

with an initial condition *v*(0). Even if the above circuit is very simple a finding time-domain solution could be rather work-intensive if the circuit is excited from some non-trivial input current waveform. A few basic examples are given in Tab. 4, specially the first one results in a transient characteristic of the circuit.


Table 4. Exciting current source waveforms and their Laplace transforms

For the above examples, of course, time-domain analytical solutions can be found e.g. based on a Heaviside formula. The 1D NILT function graphical results, under a condition *v*(0) = 0, and considering values *C* = 1mF, *G*1 = *G*2 = 10mS, and *I*0 = 1mA, are shown in Fig. 8.

The above waveforms can be got by either successive application of a basic version of the 1D NILT method according to Tab. 1, or a generalized 1D NILT function, its vector version, can be used to process all the computations in parallel. This function is shown in Tab. 5.

electrical circuits solution is discussed. In this case the relevant nonlinear ODEs describing

A simple example demonstrating the application of the basic 1D NILT algorithm in Tab. 1 is shown in Fig. 7. This really initiatory linear electrical circuit was chosen with an intention to be also considered later, in chapter 3.3.1, as a nonlinear circuit, with *G*2 being a nonlinear

( ) ( )= ( ) *dv t C Gv t i t*

() () <sup>0</sup> ( ) *I s Cv V s G sC*

with an initial condition *v*(0). Even if the above circuit is very simple a finding time-domain solution could be rather work-intensive if the circuit is excited from some non-trivial input current waveform. A few basic examples are given in Tab. 4, specially the first one results in

k 1 2 3 4

For the above examples, of course, time-domain analytical solutions can be found e.g. based on a Heaviside formula. The 1D NILT function graphical results, under a condition *v*(0) = 0,

The above waveforms can be got by either successive application of a basic version of the 1D NILT method according to Tab. 1, or a generalized 1D NILT function, its vector version, can

0 5 *I s* +

and considering values *C* = 1mF, *G*1 = *G*2 = 10mS, and *I*0 = 1mA, are shown in Fig. 8.

be used to process all the computations in parallel. This function is shown in Tab. 5.

Table 4. Exciting current source waveforms and their Laplace transforms

<sup>0</sup> <sup>1</sup>( ) *<sup>t</sup> Ie t* <sup>−</sup> <sup>0</sup>*I tt* sin( ) ( ) 2 1

π

0 2 2 2 4 *I*

*s* π

+ π

+ , (31)

<sup>+</sup> <sup>=</sup> <sup>+</sup> , (32)

<sup>0</sup>*I tt* cos( ) ( ) 2 1

π

0 2 2 4 *sI s* + π

*dt*

the circuit are expanded into Volterra series which respective NILTs are applied on.

element. In this way one will be able to compare results and make some conclusions.

**3.1 One-dimensional NILT algorithm application** 

Fig. 7. Linear reactive electrical circuit of the 1st order

with a Laplace-domain solution

a transient characteristic of the circuit.

( ) *<sup>k</sup> I s* <sup>0</sup>*<sup>I</sup>*

( ) *ki t* <sup>0</sup>*I t* 1( ) <sup>5</sup>

*s*

Denoting *G* = *G*1 + *G*2, the 1st-order linear ODE has a form

**3.1.1 Preliminary example based on lumped parameter circuit** 

Fig. 8. Numerically computed exciting current and voltage responses waveforms

```
% ------ 1D NILT for complex arguments – vector version ------- %
% ----------- based on FFT/IFFT/q-d, by L. Brančík ------------ %
function [ft,t]=niltcv(F,tm,depict); 
alfa=0; M=256; P=3; Er=1e-10; % adjustable
N=2*M; qd=2*P+1; t=linspace(0,tm,M); NT=2*tm*N/(N-2); 
omega=2*pi/NT; 
c=alfa+log(1+1/Er)/NT; s=c-i*omega*(0:N+qd-1); 
Fs(:,:,1)=feval(F,s); Fs(:,:,2)=feval(F,conj(s)); lv=size(Fs,1); 
ft(:,:,1)=fft(Fs(:,:,1),N,2); ft(:,:,2)=N*ifft(Fs(:,:,2),N,2); 
ft=ft(:,1:M,:); 
D=zeros(lv,qd,2); E=D; Q=Fs(:,N+2:N+qd,:)./Fs(:,N+1:N+qd-1,:); 
D(:,1,:)=Fs(:,N+1,:); D(:,2,:)=-Q(:,1,:); 
for r=2:2:qd-1 
 w=qd-r; 
 E(:,1:w,:)=Q(:,2:w+1,:)-Q(:,1:w,:)+E(:,2:w+1,:); 
 D(:,r+1,:)=-E(:,1,:); 
 if r>2 
 Q(:,1:w-1,:)=Q(:,2:w,:).*E(:,2:w,:)./E(:,1:w-1,:); 
 D(:,r,:)=-Q(:,1,:); 
 end
end
A2=zeros(lv,M,2); B2=ones(lv,M,2); A1=repmat(D(:,1,:),[1,M,1]); 
B1=B2; z1=repmat(exp(-i*omega*t),[lv,1]); z=cat(3,z1,conj(z1)); 
for n=2:qd 
 Dn=repmat(D(:,n,:),[1,M,1]); 
 A=A1+Dn.*z.*A2; B=B1+Dn.*z.*B2; A2=A1; B2=B1; A1=A; B1=B; 
end
ft=ft+A./B; ft=sum(ft,3)-repmat(Fs(:,1,2),[1,M,1]); 
ft=repmat(exp(c*t)/NT,[lv,1]).*ft; ft(:,1)=2*ft(:,1); 
switch depict 
 case 'p1', plott1(t,ft); case 'p2', plott2(t,ft); 
 case 'p3', plott3(t,ft); otherwise display('Invalid Plot'); 
end
```
Table 5. Matlab listing of vector version of 1D NILT method

Here one more parameter depict is used to define a method of plotting individual items from a set of originals. The 1D NILT function is called as niltcv('F',tm,'depict'); where 'depict' is a text string 'p1', 'p2', or 'p3', see Tab. 6 for more details.

Numerical Inverse Laplace Transforms for Electrical Engineering Simulation 65

(*s*) are a characteristic impedance and a propagation constant, respectively,

2 () () ( )= () ()

π

*s*

<sup>−</sup>

( )= *s R sL G sC* + + , (36)

<sup>+</sup> . (37)

*t*/2·10-9), 0 ≤ *t* ≤ 2·10-9, and *vi*(*t*) = 0,

. (38)

*c c*

*Zs Zs*

*Zs Zs*

<sup>+</sup> , ( )( ) 0 00 0

2(*s*) are reflection coefficients at the TL beginning and end, respectively,

*s*

+ , <sup>2</sup> 2

In a general case of lossy TLs, the time-domain solutions cannot be found by an analytical

As an example, let us consider the TL of a length *l* = 1m, with p.-u.-l. parameters *R*0 = 1mΩ, *L*0 = 600nH, *G*0 = 2mS, and *C*0 = 80pF, terminated by resistive elements *Zi* = 10Ω, *Z*2 = 1kΩ,

2 9

2 1 2 10 2 10 4 exp( ) ( )= ( ) *<sup>i</sup>*

−

The Fig. 10 shows time dependences at the beginning, the centre, and the end of the TL, while the 1D NILT is called as niltcv('Vs',4e-8,'p1'); where the function Vs is

Similarly, current waveforms can be computed by the above function slightly modified

Finally, it will be shown, how to obtain three-dimensional graphical results representing voltage and current distributions along the TL. Besides a possibitity to use the for cycle, as

*s s*

π

92 2

 − −⋅ ⋅ +

π

−

ρ

γ

Fig. 9. Laplace-domain model of transmission line with linear terminations

0 0 0 0

() () ( )= () () *i c i c Zs Zs*

*Zs Zs*

*G sC* +

*<sup>c</sup>* ( )= *R sL Z s*

1

ρ

*s*

and excited by the voltage source waveform *vi*(*t*) = sin2(

Ro=1e-3; Lo=600e-9; Go=2e-3; Co=80e-12;

ro1=(Zi-Zc)./(Zi+Zc); ro2=(Z2-Zc)./(Z2+Zc); Ks=Vi./(Zi+Zc)./(1-ro1.\*ro2.\*exp(-2\*gam\*l));

according to (35). Both waveforms are depicted in Fig. 10.

otherwise, with the Laplace transform

<sup>−</sup>

method, thus the only way is to use some numerical technique.

*V s*

Vi=2\*pi^2\*(1-exp(-2e-9\*s))./s./((2e-9\*s).^2+4\*pi^2); Z=Ro+s\*Lo; Y=Go+s\*Co; Zc=sqrt(Z./Y); gam=sqrt(Z.\*Y);

f(k,:)=Ks.\*Zc.\*(exp(-gam\*x(k))+ro2.\*exp(-gam\*(2\*l-x(k))));

where *Zc*(*s*) and

and ρ1(*s*) and

defined as

end

function f=Vs(s) l=1; x=[0,l/2,l];

Zi=10; Z2=1e3;

for k=1:length(x)

γ

ρ

```
% --- Plotting functions called by 1D NILT, vector version ---- 
%----------- Multiple plotting into single figure -------------
function plott1(t,ft) 
figure; plot(t,real(ft)); grid on; 
figure; plot(t,imag(ft)); grid on; % optional
% ------------- Plotting into separate figures ----------------
function plott2(t,ft) 
for k=1:size(ft,1) 
 figure; plot(t,real(ft(k,:))); grid on; 
 figure; plot(t,imag(ft(k,:))); grid on; % optional
end
% ------------------ Plotting into 3D graphs ------------------
function plott3(t,ft) 
global x; % x must be global in F 
 m=length(t); tgr=[1:m/64:m,m]; % 65 time points chosen
 figure; mesh(t(tgr),x,real(ft(:,tgr))); 
 figure; mesh(t(tgr),x,imag(ft(:,tgr))); % optional
```
Table 6. Matlab listing of plotting functions for vector version of 1D NILT method

To get e.g. the right part of Fig. 8, that is the voltage responses of the circuit in Fig. 7, the calling the 1D NILT function looks like niltcv('V4',1,'p1'); where V4 denotes a name of the function defining individual responses as follows:

```
function f=V4(s) 
I0=1e-3; C=1e-3; G=2e-2; 
f(1,:)=I0./s./(G+s*C); 
f(2,:)=I0./(s+5)./(G+s*C); 
f(3,:)=2*pi*I0./(s.^2+4*pi^2)./(G+s*C); 
f(4,:)=s.*I0./(s.^2+4*pi^2)./(G+s*C);
```
In this case the lines causing the imaginary parts plotting can be inactivated. The remaining plotting functions will be explained in the next chapter.

#### **3.1.2 Application for transmission line simulation**

Here, the 1D NILT algorithms will be used to simulate voltage and/or current distributions along transmission lines (TL), as shown on a Laplace-domain TL model in Fig. 9. As is well known, this model results from the application of a Laplace transform, with respect to time, on a pair of partial differential equations (telegraphic) of the form

$$-\frac{\partial v(t, \mathbf{x})}{\partial \mathbf{x}} = R\_0 i(t, \mathbf{x}) + L\_0 \frac{\partial i(t, \mathbf{x})}{\partial t} \quad , \quad -\frac{\partial i(t, \mathbf{x})}{\partial \mathbf{x}} = G\_0 v(t, \mathbf{x}) + C\_0 \frac{\partial v(t, \mathbf{x})}{\partial t} \; , \tag{33}$$

with *R*0, *L*0, *G*0, and *C*0 as per-unit-length (p.-u.-l.) parameters, being constant for uniform TLs, and with a length *l*.

When considering zero initial voltage and current distributions, *v*(0,*x*) = 0 and *i*(0,*x*) = 0, and incorporating boundary conditions, we get the Laplace-domain solution in the forms

$$V(\mathbf{s}, \mathbf{x}) = V\_i(\mathbf{s}) \frac{Z\_c(\mathbf{s})}{Z\_i(\mathbf{s}) + Z\_c(\mathbf{s})} \cdot \frac{e^{-\mathcal{I}(\mathbf{s})\mathbf{x}} + \rho\_2(\mathbf{s})e^{-\mathcal{I}(\mathbf{s})[2\mathbb{I}-\mathbf{x}]}}{1 - \rho\_1(\mathbf{s})\rho\_2(\mathbf{s})e^{-2\mathcal{I}(\mathbf{s})\mathbf{I}}},\tag{34}$$

$$I(\mathbf{s}, \mathbf{x}) = V\_i(\mathbf{s}) \frac{1}{Z\_i(\mathbf{s}) + Z\_c(\mathbf{s})} \cdot \frac{e^{-\gamma(\mathbf{s})\mathbf{x}} - \rho\_2(\mathbf{s})e^{-\gamma(\mathbf{s})[2l-\mathbf{x}]}}{1 - \rho\_1(\mathbf{s})\rho\_2(\mathbf{s})e^{-2\gamma(\mathbf{s})l}},\tag{35}$$

% --- Plotting functions called by 1D NILT, vector version ---- %----------- Multiple plotting into single figure -------------

figure; plot(t,imag(ft)); grid on; % optional % ------------- Plotting into separate figures ----------------

figure; plot(t,imag(ft(k,:))); grid on; % optional

% ------------------ Plotting into 3D graphs ------------------

global x; % x must be global in F m=length(t); tgr=[1:m/64:m,m]; % 65 time points chosen

figure; mesh(t(tgr),x,imag(ft(:,tgr))); % optional

Table 6. Matlab listing of plotting functions for vector version of 1D NILT method

name of the function defining individual responses as follows:

f(3,:)=2\*pi\*I0./(s.^2+4\*pi^2)./(G+s\*C); f(4,:)=s.\*I0./(s.^2+4\*pi^2)./(G+s\*C);

function plott1(t,ft)

function plott2(t,ft) for k=1:size(ft,1)

function plott3(t,ft)

figure; plot(t,real(ft)); grid on;

figure; plot(t,real(ft(k,:))); grid on;

figure; mesh(t(tgr),x,real(ft(:,tgr)));

plotting functions will be explained in the next chapter.

on a pair of partial differential equations (telegraphic) of the form

**3.1.2 Application for transmission line simulation** 

function f=V4(s)

end

TLs, and with a length *l*.

I0=1e-3; C=1e-3; G=2e-2; f(1,:)=I0./s./(G+s\*C); f(2,:)=I0./(s+5)./(G+s\*C);

To get e.g. the right part of Fig. 8, that is the voltage responses of the circuit in Fig. 7, the calling the 1D NILT function looks like niltcv('V4',1,'p1'); where V4 denotes a

In this case the lines causing the imaginary parts plotting can be inactivated. The remaining

Here, the 1D NILT algorithms will be used to simulate voltage and/or current distributions along transmission lines (TL), as shown on a Laplace-domain TL model in Fig. 9. As is well known, this model results from the application of a Laplace transform, with respect to time,

> 0 0 0 0 (, ) (, ) (, ) (, ) = (, ) , = (, ) *vtx itx itx vtx Ritx L Gvtx C x tx t* ∂ ∂∂ ∂ − +− +

with *R*0, *L*0, *G*0, and *C*0 as per-unit-length (p.-u.-l.) parameters, being constant for uniform

When considering zero initial voltage and current distributions, *v*(0,*x*) = 0 and *i*(0,*x*) = 0, and

*<sup>c</sup> <sup>i</sup> s l*

1

*i s l*

*Zs Zs s se* γ

<sup>−</sup> <sup>⋅</sup> <sup>+</sup> <sup>−</sup>

*Zs Zs s se* γ

<sup>+</sup> <sup>⋅</sup> <sup>+</sup> <sup>−</sup>

incorporating boundary conditions, we get the Laplace-domain solution in the forms

( ) ( ) ( , )= ( ) () () () ()

( ) ( , )= ( ) () () () ()

*i c Z s e se Vsx V s*

1

*i c e se Isx V s*

∂ ∂∂ ∂ , (33)

2

2

− −−

1 2

ρ

− −−

ρ

( ) ( )[ ]

*s x s lx*

( ) ( )[ ]

*s x s lx*

1 2 1

ρ ρ

ρ ρ 2

( )

2

( )

, (34)

, (35)

2

−

2

−

γ

 γ γ

 γ

Fig. 9. Laplace-domain model of transmission line with linear terminations

where *Zc*(*s*) and γ(*s*) are a characteristic impedance and a propagation constant, respectively,

$$Z\_{c}(s) = \sqrt{\frac{R\_{0} + sL\_{0}}{G\_{0} + sC\_{0}}} \quad , \quad \gamma(s) = \sqrt{(R\_{0} + sL\_{0})(G\_{0} + sC\_{0})} \quad , \tag{36}$$

and ρ1(*s*) and ρ2(*s*) are reflection coefficients at the TL beginning and end, respectively,

$$\rho\_1 \rho\_\mathbf{l}(\mathbf{s}) = \frac{Z\_i(\mathbf{s}) - Z\_c(\mathbf{s})}{Z\_i(\mathbf{s}) + Z\_c(\mathbf{s})} \quad , \quad \rho\_2(\mathbf{s}) = \frac{Z\_2(\mathbf{s}) - Z\_c(\mathbf{s})}{Z\_2(\mathbf{s}) + Z\_c(\mathbf{s})} \,. \tag{37}$$

In a general case of lossy TLs, the time-domain solutions cannot be found by an analytical method, thus the only way is to use some numerical technique.

As an example, let us consider the TL of a length *l* = 1m, with p.-u.-l. parameters *R*0 = 1mΩ, *L*0 = 600nH, *G*0 = 2mS, and *C*0 = 80pF, terminated by resistive elements *Zi* = 10Ω, *Z*2 = 1kΩ, and excited by the voltage source waveform *vi*(*t*) = sin2(π*t*/2·10-9), 0 ≤ *t* ≤ 2·10-9, and *vi*(*t*) = 0, otherwise, with the Laplace transform

$$V\_i(s) = \frac{2\pi^2 \left\lfloor 1 - \exp(-2 \cdot 10^{-9}s) \right\rfloor}{s \left\lceil (2 \cdot 10^{-9}s)^2 + 4\pi^2 \right\rceil} \,. \tag{38}$$

The Fig. 10 shows time dependences at the beginning, the centre, and the end of the TL, while the 1D NILT is called as niltcv('Vs',4e-8,'p1'); where the function Vs is defined as

```
function f=Vs(s) 
l=1; x=[0,l/2,l]; 
Ro=1e-3; Lo=600e-9; Go=2e-3; Co=80e-12; 
Zi=10; Z2=1e3; 
Vi=2*pi^2*(1-exp(-2e-9*s))./s./((2e-9*s).^2+4*pi^2); 
Z=Ro+s*Lo; Y=Go+s*Co; Zc=sqrt(Z./Y); gam=sqrt(Z.*Y); 
ro1=(Zi-Zc)./(Zi+Zc); ro2=(Z2-Zc)./(Z2+Zc); 
Ks=Vi./(Zi+Zc)./(1-ro1.*ro2.*exp(-2*gam*l));
for k=1:length(x) 
 f(k,:)=Ks.*Zc.*(exp(-gam*x(k))+ro2.*exp(-gam*(2*l-x(k)))); 
end
```
Similarly, current waveforms can be computed by the above function slightly modified according to (35). Both waveforms are depicted in Fig. 10.

Finally, it will be shown, how to obtain three-dimensional graphical results representing voltage and current distributions along the TL. Besides a possibitity to use the for cycle, as

Numerical Inverse Laplace Transforms for Electrical Engineering Simulation 67

equations leading to much easier solution in the Laplace domain. A final step in the solution is then the utilization of the 2D NILT algorithm to get results in the original domain. Such a possibility will be shown on the example of telegraphic equations describing transmission

Herein, rather less conventional approach for the simulation of voltage and/or current distributions along the TLs will be discussed. As is obvious from the telegraphic equations (33) they can be transformed not only with respect to the time *t*, which was matter of the previous paragraph, but also with respect to the geometrical coordinate *x* to get completely algebraic equations. After performing such the Laplace transforms, incorporating boundary conditions given by the terminating circuits, and considering again zero initial voltage and

> 1 1 2 2 () () () () ( , )= ( ) *<sup>c</sup> qV s sZ sI s Vsq*

, (39)

, (40)

− −

*Z s Isq*

<sup>=</sup> <sup>−</sup>

where *V*1(*s*) = *V*(*s*,0) and *I*1(*s*) = *I*(*s*,0) are given by (34) and (35), respectively, see also Fig. 9. Thus the 2D NILT function according to Tab. 3 can be called as nilt2c('Vsq',2e-8,1); leading to the same graphical results as are shown in Fig. 11. The function Vsq can be of the form as stated below. The current distribution is obtained via the same function slightly

One can notice an interesting thing, namely getting both voltage and current graphs by a single computation step. It is enabled by putting together the voltage and current transforms forming respectively real and imaginary parts of an artificial complex transform, and letting active the program command for the plotting the imaginary part of the original function, see

then both graphs in Fig. 11 are obtained simultaneously. The same possibility exists for the 1D NILT functions discussed earlier. There is no obvious physical meaning of such articifial complex transfoms, it is only a formal tool for inverting two transforms in parallel instead.

Tab. 3. In our example, if the bottom line in the Vsq function is changed to

f=((q.\*V1-Zc.\*gam.\*I1)+j\*(q.\*I1-gam./Zc.\*V1))./(q.^2-gam.^2);

*q s* γ

1 1 2 2 ( ) () () ( ) (, ) ( ) *c s qIs Vs*

−

γ

*q s*

γ

γ

current distributions, *v*(0,*x*) = 0 and *i*(0,*x*) = 0, we get (Valsa & Brančík, 1998b)

lines, and results will be compared with the 1D NILT approach.

**3.2.1 Application for transmission line simulation** 

modified according to (40).

Ro=1e-3; Lo=600e-9; Go=2e-3; Co=80e-12;

V1=Ks.\*Zc.\*(1+ro2.\*exp(-2\*gam\*l)); I1=Ks.\*(1-ro2.\*exp(-2\*gam\*l));

f=(q.\*V1-Zc.\*gam.\*I1)./(q.^2-gam.^2);

ro1=(Zi-Zc)./(Zi+Zc); ro2=(Z2-Zc)./(Z2+Zc); Ks=Vi./(Zi+Zc)./(1-ro1.\*ro2.\*exp(-2\*gam\*l));

Vi=2\*pi^2\*(1-exp(-2e-9\*s))./s./((2e-9\*s).^2+4\*pi^2); Z=Ro+s\*Lo; Y=Go+s\*Co; Zc=sqrt(Z./Y); gam=sqrt(Z.\*Y);

function f=Vsq(s,q) l=1; Zi=10; Z2=1e3;

shown in the function Vs above, another method based on 3D arrays will be applied, see the function Vsx below:

Fig. 10. Numerically computed TL voltage and current waveforms

```
function f=Vsx(s) 
global x;
l=1; 
Ro=1e-3; Lo=600e-9; Go=2e-3; Co=80e-12; 
Zi=10; Z2=1e3; 
x=linspace(0,l,65); % 65 points along TL chosen
[S,X]=meshgrid(s,x); 
Vi=2*pi^2*(1-exp(-2e-9*S))./S./((2e-9*S).^2+4*pi^2); 
Z=Ro+S*Lo; Y=Go+S*Co; Zc=sqrt(Z./Y); gam=sqrt(Z.*Y); 
ro1=(Zi-Zc)./(Zi+Zc); ro2=(Z2-Zc)./(Z2+Zc); 
Ks=Vi./(Zi+Zc)./(1-ro1.*ro2.*exp(-2*gam*l));
f=Ks.*Zc.*(exp(-gam.*X)+ro2.*exp(-gam.*(2*l-X)));
```
In this case, the 1D NILT algorithm in Tab. 5 is called as niltcv('Vsx',2e-8,'p3'); that is the plott3 function is used for the plotting, see Tab. 6, and a time limit is half of that in Fig. 10 to get well-observable results. Again, the current distributions can be gained via the above function slightly modified according to (35). Both 3D graphs are depicted in Fig. 11.

Fig. 11. Numerically computed TL voltage and current distributions

#### **3.2 Two-dimensional NILT algorithm application**

A two-dimensional Laplace transform can generally be used for the solution of linear partial differencial equations with two variables. The advantage is that we get completely algebraic equations leading to much easier solution in the Laplace domain. A final step in the solution is then the utilization of the 2D NILT algorithm to get results in the original domain. Such a possibility will be shown on the example of telegraphic equations describing transmission lines, and results will be compared with the 1D NILT approach.

#### **3.2.1 Application for transmission line simulation**

66 MATLAB for Engineers – Applications in Control, Electrical Engineering, IT and Robotics

shown in the function Vs above, another method based on 3D arrays will be applied, see the

i [A]

In this case, the 1D NILT algorithm in Tab. 5 is called as niltcv('Vsx',2e-8,'p3'); that is the plott3 function is used for the plotting, see Tab. 6, and a time limit is half of that in Fig. 10 to get well-observable results. Again, the current distributions can be gained via the above

function slightly modified according to (35). Both 3D graphs are depicted in Fig. 11.

x 10-8


x 10-8

Fig. 10. Numerically computed TL voltage and current waveforms

x=linspace(0,l,65); % 65 points along TL chosen

Vi=2\*pi^2\*(1-exp(-2e-9\*S))./S./((2e-9\*S).^2+4\*pi^2); Z=Ro+S\*Lo; Y=Go+S\*Co; Zc=sqrt(Z./Y); gam=sqrt(Z.\*Y);

<sup>0</sup> 0.5 <sup>1</sup> 1.5 <sup>2</sup>

Fig. 11. Numerically computed TL voltage and current distributions

t [s]

0

**3.2 Two-dimensional NILT algorithm application** 

0.5

x [m]

1 -0.5 0 0.5 1 1.5

v(t,x) [V]

0 1 2 3 4

Current waveforms on TL

t [s]

<sup>0</sup> 0.5 <sup>1</sup> 1.5 <sup>2</sup>

t [s]

0

Current distribution along the TL wire

0.5

x [m]

<sup>1</sup> -0.015

i(t,x) [A]

A two-dimensional Laplace transform can generally be used for the solution of linear partial differencial equations with two variables. The advantage is that we get completely algebraic

0

0.015

x 10-8

x 10-8

x = 0 x = l/2 x = l

x = 0 x = l/2 x = l

function Vsx below:


global x; l=1;

function f=Vsx(s)

[S,X]=meshgrid(s,x);

Zi=10; Z2=1e3;

v [V]

0 1 2 3 4

Voltage waveforms on TL

t [s]

Ro=1e-3; Lo=600e-9; Go=2e-3; Co=80e-12;

ro1=(Zi-Zc)./(Zi+Zc); ro2=(Z2-Zc)./(Z2+Zc); Ks=Vi./(Zi+Zc)./(1-ro1.\*ro2.\*exp(-2\*gam\*l)); f=Ks.\*Zc.\*(exp(-gam.\*X)+ro2.\*exp(-gam.\*(2\*l-X)));

Voltage distribution along the TL wire

Herein, rather less conventional approach for the simulation of voltage and/or current distributions along the TLs will be discussed. As is obvious from the telegraphic equations (33) they can be transformed not only with respect to the time *t*, which was matter of the previous paragraph, but also with respect to the geometrical coordinate *x* to get completely algebraic equations. After performing such the Laplace transforms, incorporating boundary conditions given by the terminating circuits, and considering again zero initial voltage and current distributions, *v*(0,*x*) = 0 and *i*(0,*x*) = 0, we get (Valsa & Brančík, 1998b)

$$V(s,q) = \frac{qV\_1(s) - \chi(s)Z\_c(s)I\_1(s)}{q^2 - \chi^2(s)},\tag{39}$$

$$I(s,q) = \frac{qI\_1(s) - \frac{\mathcal{Y}(s)}{Z\_c(s)}V\_1(s)}{q^2 - \mathcal{Y}^2(s)},\tag{40}$$

where *V*1(*s*) = *V*(*s*,0) and *I*1(*s*) = *I*(*s*,0) are given by (34) and (35), respectively, see also Fig. 9. Thus the 2D NILT function according to Tab. 3 can be called as nilt2c('Vsq',2e-8,1); leading to the same graphical results as are shown in Fig. 11. The function Vsq can be of the form as stated below. The current distribution is obtained via the same function slightly modified according to (40).

```
function f=Vsq(s,q) 
l=1; Zi=10; Z2=1e3; 
Ro=1e-3; Lo=600e-9; Go=2e-3; Co=80e-12; 
Vi=2*pi^2*(1-exp(-2e-9*s))./s./((2e-9*s).^2+4*pi^2); 
Z=Ro+s*Lo; Y=Go+s*Co; Zc=sqrt(Z./Y); gam=sqrt(Z.*Y); 
ro1=(Zi-Zc)./(Zi+Zc); ro2=(Z2-Zc)./(Z2+Zc); 
Ks=Vi./(Zi+Zc)./(1-ro1.*ro2.*exp(-2*gam*l));
V1=Ks.*Zc.*(1+ro2.*exp(-2*gam*l)); 
I1=Ks.*(1-ro2.*exp(-2*gam*l));
f=(q.*V1-Zc.*gam.*I1)./(q.^2-gam.^2);
```
One can notice an interesting thing, namely getting both voltage and current graphs by a single computation step. It is enabled by putting together the voltage and current transforms forming respectively real and imaginary parts of an artificial complex transform, and letting active the program command for the plotting the imaginary part of the original function, see Tab. 3. In our example, if the bottom line in the Vsq function is changed to

```
f=((q.*V1-Zc.*gam.*I1)+j*(q.*I1-gam./Zc.*V1))./(q.^2-gam.^2);
```
then both graphs in Fig. 11 are obtained simultaneously. The same possibility exists for the 1D NILT functions discussed earlier. There is no obvious physical meaning of such articifial complex transfoms, it is only a formal tool for inverting two transforms in parallel instead.

#### **3.3 Multidimensional LT in nonlinear electrical circuits simulation**

As is known some classes of nonlinear systems can be described through a Volterra series expansion, accurately enough from the practical point of view, when a response *v*(*t*) to a stimulus *i*(*t*) has a form (Schetzen, 2006)

$$v(t) = \sum\_{n=1}^{\infty} v\_n(t) \, \tag{41}$$

Numerical Inverse Laplace Transforms for Electrical Engineering Simulation 69

The utilization of the NILT methods developed, up to three-dimensional case, will be shown on the solution of a nearly nonlinear circuit in Fig. 13. As can be observed this is just Fig. 7

2

+ + . (44)

11 1 1 *H s sC G* ( )= <sup>−</sup> <sup>+</sup> , (45)

, (48)

, (49)

21 2 2 11 12 11 2 *H s s GH s H s H s s* ( , )= ( ) ( ) ( ) − + , (46)

0

*s a*

1 1 2 123

*t t tt t tt tt*

= = = ===

+

1 2 ( ) ( ) ( )= ( ) *dv t C Gvt G v t it*

By using the harmonic input method, and limiting the solution on the first three terms only,

( ) <sup>1</sup>

[ ] <sup>2</sup> 312 3 11 2 2 3 12 21 3 13 21 2 11 2 3 <sup>3</sup> ( , , )= ( ) ( , ) ( ) ( , ) ( ) ( , ) ( ) *<sup>G</sup> Hss s HsH s s Hs H ss HsH ss Hs s s* <sup>−</sup> <sup>+</sup> <sup>+</sup> + + . (47)

<sup>0</sup> ( )= ( ) ( )= <sup>1</sup>*at <sup>I</sup> it Ie t Is*

which will undergo the 1D, 2D and 3D NILT algorithms, respectively. We can write

[ ] [ ] [ ]

*Vs V ss Vss s*

1 11 2 21 2 3 312 3

= () (, ) (, , )

relative errors, where also dependences on Volterra series orders are presented.

*vt v t v t v t v t v t t v t t t*

++ + +

1 2 3 11 21 2 312 3

*a* ≥ 0. The substitution (45) – (48) into (43) gives us respective Laplace-domain responses

( )= ( ) ( ) ( )= ( ) ( , ) ( , , ) =

be omitted, e.g. (Wambacq & Sansen, 2010). Individual terms *vk*(*t*) are depicted in Fig. 14, for values agreeing with the linear circuit version in Fig. 7. The current *i*(*t*) is defined by *a* = 0 (a unit step), and *a* = 5 (an exponential impuls), compare the first two columns in Tab. 4. The resultant voltage responses computed according to (49) are shown in Fig. 15, including

The relative errors above were computed via a Matlab ODE45 Runge-Kutta function applied directly to the nonlinear ODE (44). As expected, more Volterra terms lead to more accurate results, see also (Brančík, 2009) where up to 2nd-order terms were considered, and respective

1 1 2 123

<sup>−</sup> as a *k*-dimensional ILT. Thereby, a time-consuming association of variables can

*t t tt t tt tt*

= = = ===

−

11 1

−− −

+ +

**3.3.1 Utilization of 1D to 3D NILTs for nearly nonlinear circuits** 

modified to introduce a nonlinearity via *G*2 conductance.

Fig. 13. Electrical circuit with nonlinear resistive element *G*<sup>2</sup>

Let us use an exciting current and its Laplace transform as

with [ ] <sup>1</sup> . *<sup>k</sup>*

Matlab listings are presented.

*dt*

Assuming a square nonlinearity, a circuit equation is

we get the nonlinear transfer functions for (43) as

where the terms of the infinite sum are

$$w\_n(t) = \bigcap\_{\ldots \sim f \text{id}}^{\infty} \cdots \bigcap\_{\ldots \sim}^{\infty} h\_n(\pi\_1, \pi\_2, \ldots, \pi\_n) \prod\_{k=1}^n i(t - \pi\_k) d\pi\_k \tag{42}$$

with *hn*(τ1,τ 2,…,τ*<sup>n</sup>*) as an *n*-th order Volterra kernel, called as a nonlinear impulse response as well. The Fig. 12 shows these equations in their graphical form.

By introducing new variables, *t*1 = *t*2 =…= *tn* = *t*, and by using the *n*-dimensional Laplace transform (1), the *n*-fold convolution integral (42) leads to a Laplace domain response

$$W\_n(\mathbf{s}\_1, \mathbf{s}\_2, \dots, \mathbf{s}\_n) = H\_n(\mathbf{s}\_1, \mathbf{s}\_2, \dots, \mathbf{s}\_n) \prod\_{k=1}^n I(\mathbf{s}\_k) \tag{43}$$

with *Hn*(*s*1,*s*2,…,*sn*) as a nonlinear transfer function.

Fig. 12. Nonlinear system response via Volterra series expansion

A few methods are at disposal to find the transfer function for a given nonlinear system, like a harmonic input method, e.g. (Bussgang at al., 1974; Karmakar, 1980). Further procedure is usually based on the association of variables, (J. Debnath & N.C. Debnath, 1991; Reddy & Jagan, 1971), transforming *Vn*(*s*1,*s*2,…,*sn*) into the function of a single variable *Vn*(*s*), and enabling to use a one-dimensional ILT to get the required terms *vn*(*t*) in (41). In contrast to this procedure, it is also possible to determine the terms *vn*(*t*1,*t*2,…,*tn*) by the use of the *n*dimensional ILT, considering *t*1 = *t*2 = …= *tn* = *t* in the result as a final step. That is why the above NILT procedures can be adapted in this respect being able to serve as a tool for the nonlinear circuits transient simulation.

As is known some classes of nonlinear systems can be described through a Volterra series expansion, accurately enough from the practical point of view, when a response *v*(*t*) to a

> 1 () () *<sup>n</sup> n vt v t* ∞

<sup>=</sup> , (41)

=

1 2

*<sup>n</sup> n n kk n fold <sup>k</sup>*

By introducing new variables, *t*1 = *t*2 =…= *tn* = *t*, and by using the *n*-dimensional Laplace transform (1), the *n*-fold convolution integral (42) leads to a Laplace domain response

( , , , )= ( , , , ) ( )

*n nn n k*

A few methods are at disposal to find the transfer function for a given nonlinear system, like a harmonic input method, e.g. (Bussgang at al., 1974; Karmakar, 1980). Further procedure is usually based on the association of variables, (J. Debnath & N.C. Debnath, 1991; Reddy & Jagan, 1971), transforming *Vn*(*s*1,*s*2,…,*sn*) into the function of a single variable *Vn*(*s*), and enabling to use a one-dimensional ILT to get the required terms *vn*(*t*) in (41). In contrast to this procedure, it is also possible to determine the terms *vn*(*t*1,*t*2,…,*tn*) by the use of the *n*dimensional ILT, considering *t*1 = *t*2 = …= *tn* = *t* in the result as a final step. That is why the above NILT procedures can be adapted in this respect being able to serve as a tool for the

*V s s s H s s s Is*

( )= (, , , ) ( )

ττ

<sup>−</sup> −∞ −∞ <sup>=</sup>

1 2 1 2

1

*<sup>n</sup>*) as an *n*-th order Volterra kernel, called as a nonlinear impulse response

 τ τ*it d*

1

∏ , (43)

=

*k*

*n*

∏ <sup>−</sup> , (42)

*n*

 τ

**3.3 Multidimensional LT in nonlinear electrical circuits simulation** 

*v t h*

as well. The Fig. 12 shows these equations in their graphical form.

Fig. 12. Nonlinear system response via Volterra series expansion

nonlinear circuits transient simulation.

with *Hn*(*s*1,*s*2,…,*sn*) as a nonlinear transfer function.

∞ ∞

stimulus *i*(*t*) has a form (Schetzen, 2006)

where the terms of the infinite sum are

with *hn*(τ1,τ 2,…,τ

#### **3.3.1 Utilization of 1D to 3D NILTs for nearly nonlinear circuits**

The utilization of the NILT methods developed, up to three-dimensional case, will be shown on the solution of a nearly nonlinear circuit in Fig. 13. As can be observed this is just Fig. 7 modified to introduce a nonlinearity via *G*2 conductance.

$$\mathsf{id}(t) \uparrow \left[ \bigoplus\_{c(t)} \stackrel{i\_c(t)}{\downarrow} \stackrel{i\_c(t)}{\downarrow} \stackrel{i\_c(t)}{\downarrow} \right] \downarrow$$

Fig. 13. Electrical circuit with nonlinear resistive element *G*<sup>2</sup>

Assuming a square nonlinearity, a circuit equation is

$$C\frac{dv(t)}{dt} + G\_1 v(t) + G\_2 v^2(t) = i(t) \,\text{s}\tag{44}$$

By using the harmonic input method, and limiting the solution on the first three terms only, we get the nonlinear transfer functions for (43) as

$$H\_1(\mathbf{s}\_1) = \left(\mathbf{s}\_1 \mathbf{C} + \mathbf{G}\_1\right)^{-1} \mathbf{y} \tag{45}$$

$$-H\_2(\mathbf{s}\_1, \mathbf{s}\_2) = -G\_2 H\_1(\mathbf{s}\_1) H\_1(\mathbf{s}\_2) H\_1(\mathbf{s}\_1 + \mathbf{s}\_2) \, \, \, \, \tag{46}$$

$$H\_3(\mathbf{s}\_1, \mathbf{s}\_2, \mathbf{s}\_3) = -\frac{G\_2}{3} \left[ H\_1(\mathbf{s}\_1) H\_2(\mathbf{s}\_2, \mathbf{s}\_3) + H\_1(\mathbf{s}\_2) H\_2(\mathbf{s}\_1, \mathbf{s}\_3) + H\_1(\mathbf{s}\_3) H\_2(\mathbf{s}\_1, \mathbf{s}\_2) \right] H\_1(\mathbf{s}\_1 + \mathbf{s}\_2 + \mathbf{s}\_3) . \tag{47}$$

Let us use an exciting current and its Laplace transform as

$$i(t) = I\_0 e^{-at} \underline{l}(t) \quad \mapsto \quad I(s) = \frac{I\_0}{s+a} \, \, \, \, \, \tag{48}$$

*a* ≥ 0. The substitution (45) – (48) into (43) gives us respective Laplace-domain responses which will undergo the 1D, 2D and 3D NILT algorithms, respectively. We can write

$$\begin{aligned} \boldsymbol{\upsilon}(t) &= \boldsymbol{\upsilon}\_{1}(t) + \boldsymbol{\upsilon}\_{2}(t) + \boldsymbol{\upsilon}\_{3}(t) = \boldsymbol{\upsilon}\_{1}(t\_{1})\big|\_{t\_{1}=t} + \boldsymbol{\upsilon}\_{2}(t\_{1}, t\_{2})\big|\_{t\_{1}=t\_{2}=t} + \boldsymbol{\upsilon}\_{3}(t\_{1}, t\_{2}, t\_{3})\big|\_{t\_{1}=t\_{2}=t\_{3}=t} = \\ &= \mathbb{L}\_{1}^{-1} \left[\boldsymbol{V}\_{1}(\boldsymbol{s}\_{1})\right]\big|\_{t\_{1}=t} + \mathbb{L}\_{2}^{-1} \left[\boldsymbol{V}\_{2}(\boldsymbol{s}\_{1}, \boldsymbol{s}\_{2})\right]\big|\_{t\_{1}=t\_{2}=t} + \mathbb{L}\_{3}^{-1} \left[\boldsymbol{V}\_{3}(\boldsymbol{s}\_{1}, \boldsymbol{s}\_{2}, \boldsymbol{s}\_{3})\right]\big|\_{t\_{1}=t\_{2}=t\_{3}=t} \end{aligned} \tag{49}$$

with [ ] <sup>1</sup> . *<sup>k</sup>* <sup>−</sup> as a *k*-dimensional ILT. Thereby, a time-consuming association of variables can be omitted, e.g. (Wambacq & Sansen, 2010). Individual terms *vk*(*t*) are depicted in Fig. 14, for values agreeing with the linear circuit version in Fig. 7. The current *i*(*t*) is defined by *a* = 0 (a unit step), and *a* = 5 (an exponential impuls), compare the first two columns in Tab. 4.

The resultant voltage responses computed according to (49) are shown in Fig. 15, including relative errors, where also dependences on Volterra series orders are presented.

The relative errors above were computed via a Matlab ODE45 Runge-Kutta function applied directly to the nonlinear ODE (44). As expected, more Volterra terms lead to more accurate results, see also (Brančík, 2009) where up to 2nd-order terms were considered, and respective Matlab listings are presented.

Numerical Inverse Laplace Transforms for Electrical Engineering Simulation 71

0.01 0.02 0.03 0.04 0.05

10-6

10-4

Relative error [-]

The paper dealt with a specific class of techniques for the numerical inversion of Laplace transforms, namely based on a complex Fourier series approximation, and connected with a quotient-difference algorithm to accelerate the convergence of infinite series arising in the approximate formulae. The 1D to 3D NILT techniques have been programmed in the Matlab language (R2007b), and most important ones provided as the Matlab function listings. To guide readers all the algorithms were explained on selected examples from field of electrical engineering, including right callings of the functions. In contrast to most others the NILT methods here developed are utilizable to numerically invert complex Laplace transforms, leading to complex originals, which can be useful for some special purposes. As has resulted from error analyses the accuracies range relative errors from 10-8 to 10-10 without difficulties which is acceptable for most of practical needs. Based on Matlab functions presented, one could further generalize a vector version of the 1D NILT function towards a matrix one, enabling e.g. to simulate multiconductor transmission line systems, as is shown in (Brančík, 1999), where, however, an alternative technique, so-

algorithm, has been applied to accelerate the convergence of infinite series.

According to the author's knowledge, the paper presented ranks among few summary works describing multidimensional NILT techniques, covering Matlab listings beyond, based just on a complex Fourier series approximation, and in conjunction with the quotient-difference algorithm, which seems to be more numerically stable compared to

10-2

100

v = v1+ v2+ v3 [V]

<sup>0</sup> 0.2 0.4 0.6 0.8 <sup>1</sup> <sup>0</sup>

Resultant voltage response

*a = 5*

t [s]

<sup>0</sup> 0.2 0.4 0.6 0.8 <sup>1</sup> 10-8

+ v3 *a = 5*

t [s]

v1 v1 + v2 v1 + v2

<sup>0</sup> 0.2 0.4 0.6 0.8 <sup>1</sup> <sup>0</sup>

*a = 0*

v1 v1 + v2 v1 + v2

Resultant voltage response

t [s]

<sup>0</sup> 0.2 0.4 0.6 0.8 <sup>1</sup> 10-8

algorithm mentioned above.

+ v3 *a = 0*

t [s]

Fig. 15. Resultant voltage responses and relative errors

0.02 0.04 0.06 0.08 0.1

10-6

**4. Conclusion** 

called ε

the ε

10-4

Relative error [-]

10-2

100

v = v1+ v2+ v3 [V]

Fig. 14. Numerical inversions leading to voltage response Volterra series terms

Fig. 15. Resultant voltage responses and relative errors

#### **4. Conclusion**

70 MATLAB for Engineers – Applications in Control, Electrical Engineering, IT and Robotics

0.01


0

2

v3 [V]

4

6

8x 10-5


v2 [V]


0

<sup>5</sup> x 10-4

0.02

0.03

v1 [V]

0.04

0.05

<sup>0</sup> 0.2 0.4 0.6 0.8 <sup>1</sup> <sup>0</sup>

*a = 5*

*a = 5*

*a = 5*

t [s]

<sup>0</sup> 0.2 0.4 0.6 0.8 <sup>1</sup> -20

t [s]

<sup>0</sup> 0.2 0.4 0.6 0.8 <sup>1</sup> -2

t [s]

<sup>0</sup> 0.2 0.4 0.6 0.8 <sup>1</sup> <sup>0</sup>

*a = 0*

*a = 0*

*a = 0*

Fig. 14. Numerical inversions leading to voltage response Volterra series terms

t [s]

<sup>0</sup> 0.2 0.4 0.6 0.8 <sup>1</sup> -10

t [s]

<sup>0</sup> 0.2 0.4 0.6 0.8 <sup>1</sup> -2

t [s]

0.02

<sup>2</sup> x 10-3


<sup>10</sup> x 10-4

v3 [V]

v2 [V]

0.04

v1 [V]

0.06

0.08

0.1

The paper dealt with a specific class of techniques for the numerical inversion of Laplace transforms, namely based on a complex Fourier series approximation, and connected with a quotient-difference algorithm to accelerate the convergence of infinite series arising in the approximate formulae. The 1D to 3D NILT techniques have been programmed in the Matlab language (R2007b), and most important ones provided as the Matlab function listings. To guide readers all the algorithms were explained on selected examples from field of electrical engineering, including right callings of the functions. In contrast to most others the NILT methods here developed are utilizable to numerically invert complex Laplace transforms, leading to complex originals, which can be useful for some special purposes. As has resulted from error analyses the accuracies range relative errors from 10-8 to 10-10 without difficulties which is acceptable for most of practical needs. Based on Matlab functions presented, one could further generalize a vector version of the 1D NILT function towards a matrix one, enabling e.g. to simulate multiconductor transmission line systems, as is shown in (Brančík, 1999), where, however, an alternative technique, socalled ε algorithm, has been applied to accelerate the convergence of infinite series. According to the author's knowledge, the paper presented ranks among few summary works describing multidimensional NILT techniques, covering Matlab listings beyond, based just on a complex Fourier series approximation, and in conjunction with the quotient-difference algorithm, which seems to be more numerically stable compared to the εalgorithm mentioned above.

Numerical Inverse Laplace Transforms for Electrical Engineering Simulation 73

Cohen, A.M. (2007). *Numerical methods for Laplace transform inversion.* Springer Science,

Debnath, J. & Debnath, N.C. (1991). Associated transforms for solution of nonlinear

DeHoog, F.R.; Knight, J.H. & Stokes, A.N. (1982). An improved method for numerical

*Computing,* Vol. 3, No. 3, (September 1982), pp. 357-366, ISSN 0196-5204 Hwang, C.; Guo, T.-Y. & Shih, Y.-P. (1983). Numerical inversion of multidimensional

Hwang, C. & Lu, M.-J. (1999). Numerical inversion of 2-D Laplace transforms by fast

Karmakar, S.B. (1980). Laplace transform solution of nonlinear differential equations.

Macdonald, J.R. (1964). Accelerated convergence, divergence, iteration, extrapolation, and

McCabe, J.H. (1983). The quotient-difference algorithm and the Padé table: An alternative

Reddy, D.C. & Jagan, N.C. (1971). Multidimensional transforms: new technique for the

Rutishauser, H. (1957). *Der quotienten-differenzen-algorithmus.* Birkhäuser Verlag, Basel,

Schetzen, M. (2006). *The Volterra and Wiener theories of nonlinear systems.* Krieger

Singhal, K.; Vlach, J. & Vlach, M. (1975). Numerical inversion of multidimensional Laplace

Valsa, J. & Brančík, L. (1998a). Approximate formulae for numerical inversion of

Valsa, J. & Brančík, L. (1998b). Time-domain simulation of lossy transmission lines with

Wambacq, P. & Sansen, W.M.C. (2010). *Distortion analysis of analog integrated circuits*. Kluwer Academic Publishers, ISBN 978-1-4419-5044-4, Boston, U.S.A

Publishing, ISBN 978-1-575-24283-5, Melbourne, Florida, U.S.A

equations. *International Journal of Mathematics and Mathematical Sciences,* Vol. 14,

inversion of Laplace transforms. *SIAM Journal on Scientific and Statistical* 

Laplace transforms via block-pulse functions. *IEE Proceedings D - Control Theory & Applications*, Vol. 130, No. 5, (September 1983), pp. 250-254, ISSN 0143-

Hartley transform computations. *Journal of the Franklin Institute,* Vol. 336, No. 6,

*Indian Journal of Pure & Applied Mathematics,* Vol. 11, No. 4, (April 1980), pp. 407-

curve fitting, *Journal of Applied Physics*, Vol. 35, No. 10, (February 1964), pp. 3034-

form and a general continued fraction. *Mathematics of Computation*, Vol. 41, No.

association of variebles. *Electronics Letters*, Vol. 7, No. 10, (May 1971), pp. 278 –

transform. *Proceedings of the IEEE*, Vol. 63, No. 11, (November 1975), pp. 1627-

Laplace transforms. *International Journal of Numerical Modelling: Electronic Networks, Devices and Fields,* Vol. 11, No. 3, (May-June 1998), pp. 153-166, ISSN

arbitrary initial conditions. *Proceedings of Advances in Systems, Signals, Control and Computers*, Vol. III, pp. 305-307, ISBN 0-620-23136-X, Durban, South Africa,

ISBN 978-0-387-28261-9, New York, U.S.A

(August 1999), pp. 955-972, ISSN 0016-0032

163, (July 1983), pp. 183-197, ISSN 0025-5718

7054

412, ISSN 0019-5588

3041, ISSN 0021-8979

279, ISSN 0013-5194

1628, ISSN 0018-9219

September 22-24, 1998

Schweiz

0894-3370

No. 1, (January 1991), pp. 177-190, ISSN 0161-1712

#### **5. Acknowledgment**

Research described in this paper was supported by the Czech Ministry of Education under the MSM 0021630503 research project MIKROSYN, the European Community's Seventh Framework Programme under grant agreement no. 230126, and the project CZ.1.07/2.3.00/20.0007 WICOMT of the operational program Education for competitiveness.

#### **6. References**


Research described in this paper was supported by the Czech Ministry of Education under the MSM 0021630503 research project MIKROSYN, the European Community's Seventh Framework Programme under grant agreement no. 230126, and the project CZ.1.07/2.3.00/20.0007 WICOMT of the operational program Education for

Brančík, L. (1999). Programs for fast numerical inversion of Laplace transforms in Matlab

Brančík, L. (2005). Elaboration of FFT-based 2D-NILT methods in terms of accuracy and

Brančík, L. (2007a). Numerical Inversion of two-dimensional Laplace transforms based on

pp. 451-454, ISBN 1-4244-0821-0, Brno, Czech Republic, April 24-25, 2007 Brančík, L. (2007b). Modified technique of FFT-based numerical inversion of Laplace

Brančík, L. (2009). Numerical ILTs applied to weakly nonlinear systems described

Brančík, L. (2010a). Utilization of NILTs in simulation of nonlinear systems described by

Brančík, L. (2010b). Numerical inversion of 3D Laplace transforms for weakly

Brančík, L. (2010c). Technique of 3D NILT based on complex Fourier series and quotient-

Brančík, L. (2011). Error analysis at numerical inversion of multidimensional Laplace

Bussgang, J.J.; Ehrman, L. & Graham, J.W. (1974). Analysis of nonlinear systems with

80-7080-354-1, Prague, Czech Republic, November 3, 1999

(November 2007), pp. 53-56, ISSN 0033-2097

Athens, Greece, December 12-15, 2010

3, (March 2011), p. 999-1001, ISSN 0916- 8508

language environment. *Proceedings of 7th Conference MATLAB'99,* pp. 27-39, ISBN

numerical stability. *Przeglad Elektrotechniczny,* Vol. 81, No. 2, (February 2005), pp.

partial inversions. *Proceedings of 17th International Conference Radioelektronika 2007,*

transforms with applications. *Przegląd Elektrotechniczny,* Vol. 83, No. 11,

by second-order Volterra series. *ElectroScope*, [online], Special Issue on Conference EDS 2009, 4 pages, Available from http://electroscope.zcu.cz, ISSN

Volterra series. *Przeglad Elektrotechniczny,* Vol. 86, No. 1, (January 2010), pp. 68-70,

nonlinear systems solution. *Proceedings of 20th International Conference Radioelektronika 2010*, pp. 221-224, ISBN 978-1-4244-6319-0, Brno, Czech Republic,

difference algorithm. *Proceedings of 2010 IEEE International Conference on Electronics, Circuits, and Systems ICECS2010,* pp. 207-210, ISBN 978-1-4244-8156-9,

transforms based on complex Fourier series approximation. *IEICE Transactions on Fundamentals of Electronics, Communications and Computer Sciences,* Vol. E94-A, No.

multiple inputs. *Proceedings of the IEEE*, Vol. 62, No. 8, (August 1974), pp. 1088-

**5. Acknowledgment** 

competitiveness.

**6. References** 

84-89, ISSN 0033-2097

1802-4564

ISSN 0033-2097

April 19-21, 2010

1119, ISSN 0018-9219


**4** 

 *Jordan* 

**Linear Variable Differential Transformer Design** 

Lutfi Al-Sharif, Mohammad Kilani, Sinan Taifour, Abdullah Jamal Issa,

The linear variable differential transformer is one of the most widely used transducers for measuring linear displacement. It offers many advantages over potentio-metric linear transducers such as frictionless measurement, infinite mechanical life, excellent resolution and good repeatability (Herceg, 1972). Its main disadvantages are its dynamic response and the effects of the exciting frequency. General guidelines regarding the selection of an LVDT

The LVDT is also used as a secondary transducer in various measurement systems. A primary transducer is used to convert the measurand into a displacement. The LVDT is

1. Pressure measurement whereby the displacement of a diaphragm or Bourdon tube is detected by the LVDT (e.g., diaphragm type pressure transducer, (Daly *et al.,* 1984)). 2. Acceleration measurement whereby the displacement of a mass is measured by the

3. Force measurement whereby the displacement of an elastic element subjected to the

The classical method of LVDT analysis and design is based on the use of approximate equations as shown in (Herceg, 1972) and (Popovic *et al.,* 1999). These equations suffer from inaccuracy especially from end effects. More novel methods for design employ finite element methods (Syulski *et al.,* 1992), artificial neural networks (Mishra *et al.,* 2006) and (Mishra *et al.,* 2005). The dynamic response of the LVDT is discussed in (Doebelin, 2003).

A diagram showing the dimensional parameters of the LVDT is shown in Figure 1 below. The important parameters that are taken into consideration in the design of the LVDT are

2. The length of the secondary coil, *ls*. It is assumed that both secondaries have the same

force is measured by the LVDT (e.g., ring type load cell, (Daly *et al.,* 1984)).

for a certain application can be found in (Herceg, 2006).

then used to measure that displacement. Examples are:

LVDT (e.g., LVDT used within an accelerometer, (Morris, 2001).

The LVDT has also been integrated into linear actuators (Wu *et al.,* 2008).

**1. Introduction** 

**2. General overview** 

1. The length of the primary coil, *lp*.

listed below.

length.

**and Verification Using MATLAB and** 

Eyas Al-Qaisi, Fadi Awni Eleiwi and Omar Nabil Kamal *Mechatronics Engineering Department, University of Jordan* 

**Finite Element Analysis** 

Wu, J.L.; Chen, C.H. & Chen, C.F. (2001). Numerical inversion of Laplace transform using Haar wavelet operational matrices. *IEEE Transactions on Circuits and Systems—I: Fundamental Theory and Applications,* Vol. 48, No. 1, (January 2001), pp. 120-122, ISSN 1057-7122

## **Linear Variable Differential Transformer Design and Verification Using MATLAB and Finite Element Analysis**

Lutfi Al-Sharif, Mohammad Kilani, Sinan Taifour, Abdullah Jamal Issa, Eyas Al-Qaisi, Fadi Awni Eleiwi and Omar Nabil Kamal *Mechatronics Engineering Department, University of Jordan Jordan* 

#### **1. Introduction**

74 MATLAB for Engineers – Applications in Control, Electrical Engineering, IT and Robotics

Wu, J.L.; Chen, C.H. & Chen, C.F. (2001). Numerical inversion of Laplace transform using

ISSN 1057-7122

Haar wavelet operational matrices. *IEEE Transactions on Circuits and Systems—I: Fundamental Theory and Applications,* Vol. 48, No. 1, (January 2001), pp. 120-122,

> The linear variable differential transformer is one of the most widely used transducers for measuring linear displacement. It offers many advantages over potentio-metric linear transducers such as frictionless measurement, infinite mechanical life, excellent resolution and good repeatability (Herceg, 1972). Its main disadvantages are its dynamic response and the effects of the exciting frequency. General guidelines regarding the selection of an LVDT for a certain application can be found in (Herceg, 2006).

> The LVDT is also used as a secondary transducer in various measurement systems. A primary transducer is used to convert the measurand into a displacement. The LVDT is then used to measure that displacement. Examples are:


The classical method of LVDT analysis and design is based on the use of approximate equations as shown in (Herceg, 1972) and (Popovic *et al.,* 1999). These equations suffer from inaccuracy especially from end effects. More novel methods for design employ finite element methods (Syulski *et al.,* 1992), artificial neural networks (Mishra *et al.,* 2006) and (Mishra *et al.,* 2005). The dynamic response of the LVDT is discussed in (Doebelin, 2003). The LVDT has also been integrated into linear actuators (Wu *et al.,* 2008).

#### **2. General overview**

A diagram showing the dimensional parameters of the LVDT is shown in Figure 1 below. The important parameters that are taken into consideration in the design of the LVDT are listed below.


Linear Variable Differential Transformer Design and

derive the output voltage characteristics.

position of the core.

**4. FEMM based model** 

Fig. 2. Use of FEMM for LVDT modelling.

Verification Using MATLAB and Finite Element Analysis 77

1. The capturing and coding of a number of rules of thumb that are used to find initial suitable values for the primary, secondaries and core length in relationship to the

3. The use of MATLAB as a control tool to call the finite element modeling tool in order to find the output voltage of the two seconardies at each core position. MATLAB is then

4. A MATLAB based graphical user interface (GUI) has also been developed to act as a user friendly platform allowing the user to enter the required specification and to

5. Theoretical verification has been carried out, whereby the equation for the total flux linkage between two loops has been developed and then checked against the output of

6. In order to provide practical verification, an LVDT has then been built and the output

The aim of the modeling methodology is to derive the transfer characteristic of an LVDT with certain dimensions and parameters. The transfer characteristic (or output characteristic) is a relationship between the displacement of the core and the output resultant dc voltage. It is assumed that the two ac signals from the two secondaries are processed by full wave rectifying them, smoothing the signals and then subtracting them.

the finite element model to ensure that it is producing correct results.

measured and compared with the theoretical finite element outputs.

used to repeat this process until the full curve is produced.

required stroke. These rules of thumb have been based on industrial experience. 2. The use of a finite element model (finite element magnetic tool) that is used to find the total flux linkage between the primary and the two secondaries based on a certain


Fig. 1. Diagram showing the critical dimensions of the LVDT model

#### **3. Objectives and methodology**

The main objective of this piece of work is to develop a methodology for the design and verification of the linear variable differential transformer, using MATLAB to control and communicate with a magnetic finite element analysis tool. The methodology involves the following elements:


### **4. FEMM based model**

76 MATLAB for Engineers – Applications in Control, Electrical Engineering, IT and Robotics

5. The inner diameter of the coils, *ri*. It is assumed that the primary and both secondaries

6. The outer diameter of the coils, *ro*. It is assumed that the primary and both secondaries

7. The separation of the wires (centre to centre), *ws*. It is important to note that the diameter of the wire itself is not taken into consideration and is assumed to be less than the separation (centre to centre). This is the best arrangement as it makes an allowance for the insulation of the wire. The diameter of the wire affects the effective overall resistance of the coil. As shown in Figure 1, it can be seen that the wires are assumed to

9. The primary current peak value, *I*. A sinusoidal waveform is applied to the primary in

10. The separation between the coils, *cs*. This parameter is important, as the former (spindle) on which the three coils are wound must have some thickness to retain its

11. The material of the rod has been assumed to be pure iron with a relative permeability *μ<sup>r</sup>*

Secondary Primary Secondary

*l p*

The main objective of this piece of work is to develop a methodology for the design and verification of the linear variable differential transformer, using MATLAB to control and communicate with a magnetic finite element analysis tool. The methodology involves the

Length of primary coil Length of secondary coil

Separation between coils

*c s*

*s* Outer

*l s* *2 r i*

Inner diameter of the coils

> diameter of the coils 2 *r o*

3. The length of the core, *lc*. 4. The diameter of the core *rc*.

have the same inner radius.

have the same outer diameter.

be arranged in rows and columns.

order to achieve a peak value of current *I*.

Length of secondary coil

*l*

Separation between coils

Fig. 1. Diagram showing the critical dimensions of the LVDT model

*c s*

wire separation (centre to centre)

**3. Objectives and methodology** 

8. The excitation frequency, *f*.

structural integrity.

of 14 000.

*w S*

following elements:

*2 rc*

Diameter of the core

> *w S*

The aim of the modeling methodology is to derive the transfer characteristic of an LVDT with certain dimensions and parameters. The transfer characteristic (or output characteristic) is a relationship between the displacement of the core and the output resultant dc voltage. It is assumed that the two ac signals from the two secondaries are processed by full wave rectifying them, smoothing the signals and then subtracting them.

Fig. 2. Use of FEMM for LVDT modelling.

Linear Variable Differential Transformer Design and

Verification Using MATLAB and Finite Element Analysis 79

Each variable is changed 9 times within the range, while keeping all other parameters fixed. Figure 3, Figure 4, Figure 5, Figure 6, Figure 7, Figure 8 and Figure 9 show the effect on the transfer characteristic of changing the primary length, secondary length, core length, core

radius, coil inner radius, coil outer radius and wire separation respectively.

Fig. 3. Effect of the length of the primary coil on the transfer characteristic.

Fig. 4. Effect of the length of the secondary coil on the transfer characteristic.

The FEMM (Finite Element Method, Magnetic) software is used to model the LVDT and find the total coupling flux from the primary to each of the secondaries at each position of the core. The total coupled flux is then divided by the primary core current to find the mutual inductance at this specific core position. By knowing the mutual inductance between the primary and each of the secondaries at a certain core position, the two output ac voltages can be found and hence the dc output voltage could be found. This process is then repeated for many other positions of the core, and the total transfer characteristic is then plotted.

The MATLAB software controls the whole process. It acts as the main controller to call the finite element magnetic tool and generate a point by point plot of the secondary output voltage at each point that corresponds to the position of the rod. Figure 2 shows the model of an LVDT within FEMM. It only shows half of the LVDT assuming symmetry between the two halves (left and right).

Using the FEMM software a large number of runs is carried out. These runs are automated using MATLAB. Starting values for all the parameters are used and these are referred to as the default parameters. Then one of the variable parameters is varied while all of the other parameters are kept constant.


Table 1. Parameters of the LVDT modelling.

#### **4.1 Generation of a set of curves**

In order to generate a set of curves that show the change of the output characteristic with the change of certain design parameters, a number of curves have been generated as follows.

The FEMM (Finite Element Method, Magnetic) software is used to model the LVDT and find the total coupling flux from the primary to each of the secondaries at each position of the core. The total coupled flux is then divided by the primary core current to find the mutual inductance at this specific core position. By knowing the mutual inductance between the primary and each of the secondaries at a certain core position, the two output ac voltages can be found and hence the dc output voltage could be found. This process is then repeated for many other positions of the core, and the total transfer characteristic is then plotted. The MATLAB software controls the whole process. It acts as the main controller to call the finite element magnetic tool and generate a point by point plot of the secondary output voltage at each point that corresponds to the position of the rod. Figure 2 shows the model of an LVDT within FEMM. It only shows half of the LVDT assuming symmetry between the

Using the FEMM software a large number of runs is carried out. These runs are automated using MATLAB. Starting values for all the parameters are used and these are referred to as the default parameters. Then one of the variable parameters is varied while all of the other

*lc* The length of the core 130 mm variable 62 to 216 mm

*rc* The radius of the core 4.5 mm variable 2.1 to 7.5 mm

**value variable/fixed Range** 

(10 values)

(9 values)

(9 values)

(9 values)

(9 values)

(9 values)

(9 values)

coil 80 mm variable 26 to 133 mm

coil 75 mm variable 36 to 125 mm

coils 10 mm variable 4.8 to 16.7 mm

coils 35 mm variable 16.8 to 58.3 mm

frequency 50 Hz fixed Not applicable

peak value 50 mA fixed Not applicable

of the core 14 000 fixed Not applicable

between the coils 5 mm fixed Not applicable

In order to generate a set of curves that show the change of the output characteristic with the change of certain design parameters, a number of curves have been generated as follows.

wires (centre to centre) 0.3 mm variable 0.14 to 0.50 mm

two halves (left and right).

parameters are kept constant.

*lp*

*ls*

*ri*

*ro*

*ws*

*cs*

*μr*

**Symbol Description Default** 

length of the primary

length of the secondary

The inner radius of the

The outer radius of the

The separation of the

The separation

Relative permeability

*<sup>f</sup>* The excitation

*<sup>I</sup>* The primary current

Table 1. Parameters of the LVDT modelling.

**4.1 Generation of a set of curves** 

Each variable is changed 9 times within the range, while keeping all other parameters fixed. Figure 3, Figure 4, Figure 5, Figure 6, Figure 7, Figure 8 and Figure 9 show the effect on the transfer characteristic of changing the primary length, secondary length, core length, core radius, coil inner radius, coil outer radius and wire separation respectively.

Fig. 3. Effect of the length of the primary coil on the transfer characteristic.

Fig. 4. Effect of the length of the secondary coil on the transfer characteristic.

Linear Variable Differential Transformer Design and

Verification Using MATLAB and Finite Element Analysis 81

Fig. 7. Effect of the inner radius of the coils on the transfer characteristic.

Fig. 8. Effect of the outer radius of the coils on the transfer characteristic.

Fig. 5. Effect of the length of the core on the transfer characteristic.

Fig. 6. Effect of the radius of the core on the transfer characteristic.

Fig. 5. Effect of the length of the core on the transfer characteristic.

Fig. 6. Effect of the radius of the core on the transfer characteristic.

Fig. 7. Effect of the inner radius of the coils on the transfer characteristic.

Fig. 8. Effect of the outer radius of the coils on the transfer characteristic.

Linear Variable Differential Transformer Design and

Fig. 10. Effect of the length of the primary coil on the stroke.

Fig. 11. Effect of the length of the secondary coil on the stroke.

Verification Using MATLAB and Finite Element Analysis 83

Fig. 9. Effect of the wire separation on the transfer characteristic.

MATLAB code has been used to automate the process of varying the parameters and to call the finite element modeling magnetic software. A parameter that is specific to the finite element software used is the so-called coarseness factor (*cf*). Larger values of this variable result in finer graining. This is set to 18.

The two main characteristics of the LVDT that can be drawn from the graphs above are the sensitivity (mV/mm/V) and the stroke (mm). These are discussed in the next section.

#### **4.2 Effect of parameters on stroke and sensitivity**

The information gathered in the graphs generated in the last sub-section can be used to draw some general conclusions regarding the stroke and the sensitivity. The stroke is expressed in mm and the sensitivity is expressed in units of mV/mm/V (i.e., mV output volts dc for every mm core displacement for every voltage of excitation on the primary).

The effects of the primary length, secondary length, core length and outer coil radius on the stroke are shown in Figure 10, Figure 11, Figure 12 and Figure 13 respectively. It can be seen that the stroke increases with the length of the all of the four parameters, although it does flatten off in case of the secondary length.

The effects of the primary length, secondary length, core length and outer coil radius on the sensitivity have been shown in Figure 14, Figure 15, Figure 16 and Figure 17 respectively. The sensitivity is measured as the slope of the transfer characteristic at the null point.

It can seen that the sensitivity increases with the secondary length and the core length and decreases with the primary length and the outer radius of the coils.

MATLAB code has been used to automate the process of varying the parameters and to call the finite element modeling magnetic software. A parameter that is specific to the finite element software used is the so-called coarseness factor (*cf*). Larger values of this variable

The two main characteristics of the LVDT that can be drawn from the graphs above are the sensitivity (mV/mm/V) and the stroke (mm). These are discussed in the next section.

The information gathered in the graphs generated in the last sub-section can be used to draw some general conclusions regarding the stroke and the sensitivity. The stroke is expressed in mm and the sensitivity is expressed in units of mV/mm/V (i.e., mV output volts dc for every mm core displacement for every voltage of excitation on the

The effects of the primary length, secondary length, core length and outer coil radius on the stroke are shown in Figure 10, Figure 11, Figure 12 and Figure 13 respectively. It can be seen that the stroke increases with the length of the all of the four parameters, although it does

The effects of the primary length, secondary length, core length and outer coil radius on the sensitivity have been shown in Figure 14, Figure 15, Figure 16 and Figure 17 respectively. The sensitivity is measured as the slope of the transfer characteristic at the

It can seen that the sensitivity increases with the secondary length and the core length and

decreases with the primary length and the outer radius of the coils.

Fig. 9. Effect of the wire separation on the transfer characteristic.

result in finer graining. This is set to 18.

flatten off in case of the secondary length.

primary).

null point.

**4.2 Effect of parameters on stroke and sensitivity** 

Fig. 10. Effect of the length of the primary coil on the stroke.

Fig. 11. Effect of the length of the secondary coil on the stroke.

Linear Variable Differential Transformer Design and

Fig. 14. Effect of the length of the primary coil on the sensitivity.

Fig. 15. Effect of the length of the secondary coil on the sensitivity.

Verification Using MATLAB and Finite Element Analysis 85

Fig. 12. Effect of the length of the core on the stroke.

Fig. 13. Effect of the outer radius of the coils on the stroke.

Fig. 12. Effect of the length of the core on the stroke.

Fig. 13. Effect of the outer radius of the coils on the stroke.

Fig. 14. Effect of the length of the primary coil on the sensitivity.

Fig. 15. Effect of the length of the secondary coil on the sensitivity.

Linear Variable Differential Transformer Design and

**5. Matlab GUI as a LVDT design tool** 

screen is shown below.

Fig. 18. Graphical User Interface.

1. The radius of the first loop is *A* 2. The radius of the second loop is *B* 3. The current in the first loop is i

Let it be assumed that:

**6. Formulae for the flux linkage between two loops** 

4. The two loops are concentric and separated by a distance *h* 5. The permittivity of the medium separating them is *μ*

In order to carry out a partial verification of the MATLAB/FEA model, an analytical method has been developed in order to find the expected output of each secondary based on the dimensions of the LVDT and the current in the primary. The basic model uses two concentric loops as shown Figure 19. One loop carries a certain current, and the flux linking the other

loop is required. The aim is to find the total flux linked from one loop to another loop.

The two loops lie in two parallel planes and are concentric as shown in Figure 19 below.

Verification Using MATLAB and Finite Element Analysis 87

In order to automate the design process, a MATLAB graphical user interface (GUI) has been developed in order to provide a user friendly platform that allows the user to enter all the required parameters and run the LVDT. The software behind the GUI includes the rules of thumb, as well as suggested default values to the user. The output generated by the GUI is the output voltage curve plotted against the position of the rod. An example of a GUI

Fig. 16. Effect of the length of the core on the sensitivity.

Fig. 17. Effect of the outer radius of the coils on the sensitivity.

### **5. Matlab GUI as a LVDT design tool**

86 MATLAB for Engineers – Applications in Control, Electrical Engineering, IT and Robotics

Fig. 16. Effect of the length of the core on the sensitivity.

Fig. 17. Effect of the outer radius of the coils on the sensitivity.

In order to automate the design process, a MATLAB graphical user interface (GUI) has been developed in order to provide a user friendly platform that allows the user to enter all the required parameters and run the LVDT. The software behind the GUI includes the rules of thumb, as well as suggested default values to the user. The output generated by the GUI is the output voltage curve plotted against the position of the rod. An example of a GUI screen is shown below.

Fig. 18. Graphical User Interface.

#### **6. Formulae for the flux linkage between two loops**

In order to carry out a partial verification of the MATLAB/FEA model, an analytical method has been developed in order to find the expected output of each secondary based on the dimensions of the LVDT and the current in the primary. The basic model uses two concentric loops as shown Figure 19. One loop carries a certain current, and the flux linking the other loop is required. The aim is to find the total flux linked from one loop to another loop. Let it be assumed that:


The two loops lie in two parallel planes and are concentric as shown in Figure 19 below.

Linear Variable Differential Transformer Design and

Fig. 22. General layout for the Biot-Savart Law.

We shall take a small section of the large loop, denoted as *dl* (vector) that carries a current *i*. The first step is to find the resultant magnetic flux density caused by a small section of the large loop dl (located at point *x*) at a point inside the smaller loop, denoted as point *y* (Figure 20). The point y has been taken inside the smaller loop on the y axis (without any

Fig. 21. Loop A.

Verification Using MATLAB and Finite Element Analysis 89

*θ*

*dl*

*Point x* 

*Radius A* 

Fig. 19. General layout for the two loops.

Let us assume that loop A carries a current *i*. We will take a small length of current carrying conductor on loop A that has a length *dl* (Figure 21).

Fig. 20. Loop B

Fig. 21. Loop A.

*x* 

Let us assume that loop A carries a current *i*. We will take a small length of current carrying

*Point y* 

*Radius B* 

*b* 

*y* 

*z* 

*Radius B* 

Fig. 19. General layout for the two loops.

Fig. 20. Loop B

conductor on loop A that has a length *dl* (Figure 21).

*Radius A* 

Fig. 22. General layout for the Biot-Savart Law.

We shall take a small section of the large loop, denoted as *dl* (vector) that carries a current *i*. The first step is to find the resultant magnetic flux density caused by a small section of the large loop dl (located at point *x*) at a point inside the smaller loop, denoted as point *y* (Figure 20). The point y has been taken inside the smaller loop on the y axis (without any loss of generality) at a distance b from the centre of the loop. The vector connecting points *x* and *y* represents the direction of the resultant magnetic flux density (Figure 22). We shall denote the vector that connects points x to y as *R*. Using Biot-savart law gives:

$$
\overline{dB} = \frac{\mu \cdot i \cdot \overline{dl} \times \overline{R}}{4 \cdot \pi \cdot R^3} \tag{1}
$$

Linear Variable Differential Transformer Design and

the width of this annulus as *db* and its radius as *b*.

Fig. 23. Annulus in loop B.

flux density by the area of the annulus:

*annulus*

2

of b equal to 0 up to the radius of the smaller loop B.

2

Simplifying gives the final result:

Verification Using MATLAB and Finite Element Analysis 91

loop is constant everywhere on the annulus (Figure 23). We can now calculate the total flux that is passing through this annulus caused by the current *i* in the large loop. We shall set

*Radius B* 

*b* 

So the total flux through the annulus can be found by multiplying the value of the magnetic

*d b d db*

So the total flux in the smaller loop can now be found by integrating over b from the value

0 0 2 22 2

0 0 2 22 2

4 2 cos

*h A b Ab*

2 cos

<sup>π</sup> ⋅π⋅μ⋅ ⋅ ⋅ − ⋅ ⋅ θ Φ = θ

Φ = ⋅π⋅ θ

Φ = ⋅π⋅ ⋅ θ

2 2

2 2

*<sup>B</sup> i A Ab*

2 2

*<sup>B</sup> ib A Ab*

( )

*Point y* 

<sup>π</sup> μ⋅ ⋅ − ⋅ ⋅ θ

cos

(10)

3

*d db*

3

(12)

3

( )

⋅π⋅ + + − ⋅ ⋅ ⋅ θ

0 2 22 2

*h A b Ab*

( )

*b d db h A b Ab*

⋅π⋅ + + − ⋅ ⋅ ⋅ θ

<sup>π</sup> μ⋅ ⋅ − ⋅ ⋅ θ

cos

(11)

( )

( )

4 2 cos

( )

⋅π⋅ + + − ⋅ ⋅ ⋅ θ

4 2 cos

*i A Ab*

The coordinates of point *x* are:

$$\begin{pmatrix} 0\_\prime A \cdot \cos \Theta\_\prime A \cdot \sin \Theta \end{pmatrix} \tag{2}$$

The coordinates of point *y* are:

( ) *h b*, ,0 (3)

The magnitude of R can be calculated as follows:

$$\left|\mathbf{R}\right| = \sqrt{\mathbf{h}^2 + \left(A \cdot \cos\theta - b\right)^2 + \left(A \cdot \sin\theta\right)^2} \tag{4}$$

$$\begin{aligned} \left| R \right| &= \sqrt{h^2 + A^2 \cdot \cos^2 \theta - 2bA \cdot \cos \theta + b^2 + A^2 \cdot \sin^2 \theta} \\ &= \sqrt{h^2 + A^2 + b^2 - 2bA \cdot \cos \theta} \end{aligned} \tag{5}$$

This gives us the magnitude of R. We next find the components of the two vectors, *R* and *dl*:

$$
\overrightarrow{R} = \begin{bmatrix} h & b - A \cdot \cos \Theta & -A \cdot \sin \Theta \end{bmatrix} \tag{6}
$$

$$
\overrightarrow{dl} = \begin{bmatrix} 0 & -A \cdot \sin \theta \cdot d\theta & A \cdot \cos \theta \cdot d\theta \end{bmatrix} \tag{7}
$$

We now turn to find the cross product of these two elements (note that we will only evaluate the x component as this is the component that is of interest to us).

$$\overrightarrow{dB\_i} = \frac{\mu \cdot i \cdot d\Theta \cdot \left(A^2 - A \cdot b \cdot \cos\Theta\right)\overleftarrow{i}}{4 \cdot \pi \cdot \left(h^2 + A^2 + b^2 - 2 \cdot A \cdot b \cdot \cos\Theta\right)^{\frac{3}{2}}}\tag{8}$$

We have taken the *x* direction only as this is the direction that is perpendicular to the area of the smaller loop.

This effect is only caused by a small strip dl of the larger loop. In order to find the effect of the whole larger loop on the point *y*, we need to integrate around the larger loop. This is done as follows:

$$\overrightarrow{dB}\_{\text{libop}} = \int\_0^{2\pi} \frac{\mu \cdot i \cdot \left(A^2 - A \cdot b \cdot \cos\Theta\right)}{4 \cdot \pi \cdot \left(h^2 + A^2 + b^2 - 2 \cdot A \cdot b \cdot \cos\Theta\right)^{\frac{3}{2}}} d\theta \ \overrightarrow{i} \tag{9}$$

If we now take an annulus of radius b inside the smaller loop, we can see that by symmetry, the value of the magnetic flux density component that is perpendicular to the area of the

loss of generality) at a distance b from the centre of the loop. The vector connecting points *x*

<sup>3</sup> 4 *i dl R dB*

22 2 22 2

= + ⋅ θ− ⋅ θ+ + ⋅ θ

2 cos

This gives us the magnitude of R. We next find the components of the two vectors, *R* and *dl*:

We now turn to find the cross product of these two elements (note that we will only

2

μ⋅ ⋅ θ⋅ − ⋅ ⋅ θ <sup>=</sup>

4 2 cos

We have taken the *x* direction only as this is the direction that is perpendicular to the area of

This effect is only caused by a small strip dl of the larger loop. In order to find the effect of the whole larger loop on the point *y*, we need to integrate around the larger loop. This is

*h A b Ab*

⋅π⋅ + + − ⋅ ⋅ ⋅ θ

*R h A bA b A*

cos 2 cos sin

( )

cos

(8)

2 22 2

( )

( )

cos

( )

0 2 22 2

4 2 cos

If we now take an annulus of radius b inside the smaller loop, we can see that by symmetry, the value of the magnetic flux density component that is perpendicular to the area of the

*i A Ab dB d i h A b Ab*

<sup>π</sup> μ⋅ ⋅ − ⋅ ⋅ θ = θ ⋅π⋅ + + − ⋅ ⋅ ⋅ θ

*id A Ab i*

*R* <sup>μ</sup> ⋅⋅ × <sup>=</sup> ⋅π⋅

(1)

( ) 0, cos , sin *A A* ⋅ θ⋅ θ (2)

( )( ) <sup>2</sup> 2 2 *RhA b A* = + ⋅ θ− + ⋅ θ cos sin (4)

*R hbA A* = − ⋅ θ−⋅ θ [ cos sin ] (6)

*dl A d A d* = − ⋅ θ⋅ θ ⋅ θ⋅ θ [0 sin cos ] (7)

3

3

( ) *h b*, ,0 (3)

(5)

(9)

We shall denote the vector that connects points x to y as *R*. Using Biot-savart law gives:

and *y* represents the direction of the resultant magnetic flux density (Figure 22).

The coordinates of point *x* are:

The coordinates of point *y* are:

The magnitude of R can be calculated as follows:

2 22

*h A b bA*

= + +− ⋅ θ

evaluate the x component as this is the component that is of interest to us).

2 2

*i*

*dB*

*iloop*

the smaller loop.

done as follows:

loop is constant everywhere on the annulus (Figure 23). We can now calculate the total flux that is passing through this annulus caused by the current *i* in the large loop. We shall set the width of this annulus as *db* and its radius as *b*.

Fig. 23. Annulus in loop B.

So the total flux through the annulus can be found by multiplying the value of the magnetic flux density by the area of the annulus:

$$d\Phi\_{\text{annulus}} = 2 \cdot \pi \cdot b \cdot \left| \int\_0^{2\pi} \frac{\mu \cdot i \cdot \left( A^2 - A \cdot b \cdot \cos\Theta \right)}{4 \cdot \pi \cdot \left( h^2 + A^2 + b^2 - 2 \cdot A \cdot b \cdot \cos\Theta \right)^{\frac{3}{2}}} d\Theta \right| db \tag{10}$$

So the total flux in the smaller loop can now be found by integrating over b from the value of b equal to 0 up to the radius of the smaller loop B.

$$\Phi = \int\_0^B 2 \cdot \pi \cdot b \left| \int\_0^{2\pi} \frac{\mu \cdot i \cdot \left( A^2 - A \cdot b \cdot \cos\theta \right)}{4 \cdot \pi \cdot \left( h^2 + A^2 + b^2 - 2 \cdot A \cdot b \cdot \cos\theta \right)^{\frac{3}{2}}} d\theta \right| db \tag{11}$$

$$\Phi = \int\_0^B \left| \int\_0^2 \frac{2 \cdot \pi \cdot \mu \cdot i \cdot b \cdot \left(A^2 - A \cdot b \cdot \cos \Theta\right)}{4 \cdot \pi \cdot \left(h^2 + A^2 + b^2 - 2 \cdot A \cdot b \cdot \cos \Theta\right)^{\frac{3}{2}}} d\Theta \right| db \tag{12}$$

Simplifying gives the final result:

$$\Phi = \int\_0^B \left| \int\_0^2 \frac{\mu \cdot i \cdot b \cdot \left(A^2 - A \cdot b \cdot \cos\Theta\right)}{2 \cdot \left(h^2 + A^2 + b^2 - 2 \cdot A \cdot b \cdot \cos\Theta\right)^{\frac{3}{2}}} d\Theta \right| db \tag{13}$$

Linear Variable Differential Transformer Design and

Fig. 24. Output voltage from one secondary as the core is displaced.

Further work is still needed in the following areas:

the overall effect on the transfer characteristic.

effect of the frequency on the design (Herceg, 2006).

outside the range used in order to draw more general conclusions.

be more important than the absolute values of the two variables.

students at the University of Jordan. The members of the group are:

LVDT

**9. Further work** 

**Output Voltage of one secondary (mV)**

**10. Acknowledgement** 

Verification Using MATLAB and Finite Element Analysis 93

**Output Voltage from one secondary as a function of the displacement of the Rod at a frequency of 100 Hz**

> Modelled Voltage Measured Voltage

length, core length and outer radius of the coils on both the stroke and the sensitivity of the

0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100 105

**Displacement of the Rod (mm)**

1. The seven variables that are varied are varied one at a time, keeping all the other parameters fixed. It is now the intention to vary all parameters at the same time to see

2. Four of the parameters are kept constant. Further work is needed to understand the effect of varying them on the transfer characteristic. Of particular importance is the

3. The range of variation of the variables was restricted. More readings are needed

4. Variation of the variables is needed in pairs to see the relative importance of these variables. For example, the length of the core in relation to the primary as a ratio could

5. Further experimental verification is required. Moreover, modeling of the Eddy current losses is required in order to quantify the effect of the excitation frequency on the discrepancy between the expected output voltage and the measured output voltage. 6. Further investigation is required into the possibility of combining a linear electromagnetic actuator with an LVDT in the same hardware as discussed in (Wu *et al.,*

The practical verification and the analytical numerical example shown in this piece of work have been based on the graduation project work by a group of Mechatronics Enginering

1999). This offers a very compact closed loop linear electromagnetic actuator.

The formula shown above cannot be solved analytically. MATLAB is used to evaluate the double integral.

Verification was carried out between the formula above implemented in MATLAB for a primary and a secondary without an inserted core and the output of FEMM. A numerical example is shown below. It shows excellent agreement between the analytical formula used in (13) and the output of the FEMM.

The parameters and results of the numerical example are as follows:


#### **7. Practical verification**

A practical verification of the results from the MATLAB/FEA model and the analytical equation within MATLAB was then carried out. A model of the LVDT is built and tested. The results are compared and verified with outputs from the models.

Figure 24 shows the output voltage as a function of the displacement of the core. This has been carried out at an excitation frequency of 100 Hz. As the frequency is increased it is noted that a larger discrepancy between the expected and actual outputs exists. The explanation for this discrepancy is the eddy current losses with the core (which is a conducting material as well as being ferromagnetic). Eddy current losses are not currently modeled and this will be necessary in order to fully quantify the expected eddy current losses.

#### **8. Conclusions**

A methodology has been developed that allows the user to design and verify the output of an LVDT. A finite element magnetic model in conjunction with MATLAB has been developed that allows the user to design an LVDT and produce the expected output characteristics. A graphical user interface has been added to the software to facilitate data entry and design visualization.

Analytical and practical verification has been carried out. Good agreement has been achieved via the analytical verification. However, a discrepancy has been noted in the practical verification caused by the Eddy current losses (as it seems to increase with the frequency). This requires further investigation and modeling.

Sensitivity analysis has been carried out on some of the design parameters. General conclusions have been drawn showing the effect of the primary coil length, secondary coil

Fig. 24. Output voltage from one secondary as the core is displaced.

length, core length and outer radius of the coils on both the stroke and the sensitivity of the LVDT

#### **9. Further work**

92 MATLAB for Engineers – Applications in Control, Electrical Engineering, IT and Robotics

2 2

The parameters and results of the numerical example are as follows:

The results are compared and verified with outputs from the models.

frequency). This requires further investigation and modeling.

Primary excitation current 30 mA Radius of primary loop 25 mm Radius of secondary loop 15 mm Distance between loops 80 mm

double integral.

in (13) and the output of the FEMM.

Flux linkage

**7. Practical verification** 

losses.

**8. Conclusions** 

entry and design visualization.

*<sup>B</sup> ib A Ab*

( )

⋅ + + −⋅ ⋅⋅ θ

The formula shown above cannot be solved analytically. MATLAB is used to evaluate the

Verification was carried out between the formula above implemented in MATLAB for a primary and a secondary without an inserted core and the output of FEMM. A numerical example is shown below. It shows excellent agreement between the analytical formula used

> FEMM 1.37551e-11 Wb MATLAB (double integration equation) 1.3558e-11 Wb

A practical verification of the results from the MATLAB/FEA model and the analytical equation within MATLAB was then carried out. A model of the LVDT is built and tested.

Figure 24 shows the output voltage as a function of the displacement of the core. This has been carried out at an excitation frequency of 100 Hz. As the frequency is increased it is noted that a larger discrepancy between the expected and actual outputs exists. The explanation for this discrepancy is the eddy current losses with the core (which is a conducting material as well as being ferromagnetic). Eddy current losses are not currently modeled and this will be necessary in order to fully quantify the expected eddy current

A methodology has been developed that allows the user to design and verify the output of an LVDT. A finite element magnetic model in conjunction with MATLAB has been developed that allows the user to design an LVDT and produce the expected output characteristics. A graphical user interface has been added to the software to facilitate data

Analytical and practical verification has been carried out. Good agreement has been achieved via the analytical verification. However, a discrepancy has been noted in the practical verification caused by the Eddy current losses (as it seems to increase with the

Sensitivity analysis has been carried out on some of the design parameters. General conclusions have been drawn showing the effect of the primary coil length, secondary coil

<sup>π</sup> μ⋅ ⋅ ⋅ − ⋅ ⋅ θ Φ = θ

0 0 2 22 2

*h A b Ab*

2 2 cos

( )

cos

3

(13)

*d db*

Further work is still needed in the following areas:


#### **10. Acknowledgement**

The practical verification and the analytical numerical example shown in this piece of work have been based on the graduation project work by a group of Mechatronics Enginering students at the University of Jordan. The members of the group are:

**Part 2** 

**Hardware and Photonics Applications** 


#### **11. References**

Beckwith, Buck & Marangoni, (1982), Mechanical Measurements, Third Edition, 1982.

