**Implementation of Control Design Methods into Matlab Environment**

Radek Matušů and Roman Prokop

*Department of Automation and Control Engineering Faculty of Applied Informatics, Tomas Bata University in Zlín Czech Republic* 

#### **1. Introduction**

172 Cutting Edge Research in New Technologies

Zhu, Y., Backx, T., 1993. *Identification of Multivariable Industrial Processes for Simulation,* 

19835-0.

*Diagnosis and Control*. Springer-Verlag Ltd., London, United Kingdom, ISBN 3-540-

Computer-aided tools for analysis and synthesis of control systems are widely employed by many users from a range of researchers, control engineers or students. The reason is obvious. Such toolboxes represent comfortable and effective way of dealing with an array of complex control problems, sometimes even without deeper knowledge of the specific method. For example, Control System Toolbox, Robust Control Toolbox or Polynomial Toolbox (PolyX, 2011) for Matlab belong among the most popular ones in the control field.

The main aim of this chapter is to present two simple and freely downloadable Matlab programs which allow user-friendly work for two selected specific control design issues by means of Graphical User Interface (GUI).

First of the packages (Matušů, 2010; Matušů & Prokop, 2011a) is focused on algebraic design of continuous-time controllers under assumption of interval plants. The program takes advantage of Matlab + Simulink + Polynomial Toolbox (PolyX, 2011) environment and it represents an easy but effective and user-friendly way to control synthesis, robust stability analysis and simulation.

The second of the presented programs (Matušů & Prokop, 2010, 2011b, 2011c) deals with control of time-delay systems using three various modifications of Smith predictor. The software implementation includes the modification for unstable and integrating processes, PI-PD modification for systems with long dead time, and modification applying control design by Coefficient Diagram Method (CDM).

The described software products, which can be used both for research and educational purposes, are freely available on the Internet (Matušů & Prokop, 2011a, 2011b). Their application potential is going to be illustrated on several control examples.

The chapter is organized as follows. The Section 2 focuses on algebraic design of controllers for interval plants. It is divided into three partial subsections dealing with brief outline of basic theoretical background, description of the developed program itself and demonstration of its capabilities by means of an illustrative example, respectively. Analogically, the Section 3 has the very same structure but it presents the control of time-delay systems using three modifications of Smith predictor. Finally, Section 4 offers some conclusion remarks.

The partial versions of this work have been already presented in (Matušů & Prokop, 2010, 2011c; Matušů 2010).

Implementation of Control Design Methods into Matlab Environment 175

subsequently test the regulation by means of simulation. Even an inexperienced user is

Much more details about the synthesis method and specific controller design and tuning can

Once the nominally stabilizing controller is designed, one need to verify the stability of the closed control loop with this fixed controller and an interval plant. The robust stability can be investigated, for example, using the theory of polytopes (closed-loop characteristic polynomial has an affine linear uncertainty structure) or via the overbounding method in combination with the classical Kharitonov theorem. An excellent overview of this field

This section introduces a simple user-friendly program (Matušů, 2010; Matušů & Prokop, 2011a) for synthesis and simulation of control systems under assumption that controlled plants are affected by interval uncertainty. It incorporates selected controller design algorithms and tools for robust stability analysis as they have been adumbrated hereinbefore. The developed software tool takes advantage of functions and GUI of MATLAB (tested on various versions from 6.5.1 – R13SP1 to 7.9 – R2009b) and also benefits of simulation environment SIMULINK and support of the Polynomial Toolbox 2.5 (PolyX, 2011). The program can be downloaded from web page (Matušů & Prokop, 2011a). It must be decompressed and launched in the Matlab via "start.m" file. Then, it is very intuitive and easy to use. The main menu window of the product is shown in Fig. 1 which is accompanied by the following concise description of program possibilities according to numbered items: 1. The definition of nominal system (with fixed parameters) which is used for controller

2. The definition of perturbed system (with interval parameters) which is used for

4. The choice of strategy for controller tuning. The first eventuality allows to define an arbitrary value of tuning parameter *m* 0 while the second one minimizes the sensitivity

5. The selection of one from two basic closed control loop configurations – 1DOF or 2DOF

6. The option of desired properties of the controller – either asymptotic tracking of

7. Adjustments of basic simulation parameters such as simulation time, reference signal,

10. The selection of simulation results which should be displayed. The important item is "Number of partial intervals for simulation" defining how many intervals is each uncertain parameter in controlled system divided into. In other words, this number increased by one expresses the quantity of "sampled" values in individual uncertain coefficients. The aim is to create some "representative set of systems" (RSS) used for simulation process. However, be careful, the higher numbers noticeably increase

function and searches for the "most robust" regulator to given nominal plant.

8. Possibility of harmonic disturbance setting (in the output of the controlled plant). 9. Possibility of ramp disturbance setting (in the output of the controlled plant).

reference signal or simultaneous tracking and disturbance rejection.

11. The buttons for start of simulation and exit from the program.

be found e.g. in (Prokop & Corriou, 1997; (Matušů & Prokop, 2008, 2011d).

provides e.g. books (Barmish, 1994; Bhattacharyya et al., 1995).

simulation of control and robust stability tests. 3. Size of perturbations (expressed in percentage).

load disturbance and controller saturation.

usually able to find a suitable *m* after several steps.

**2.2 Description of the program** 

design.

control system.

computational time.

#### **2. Algebraic design of controllers for interval systems**

#### **2.1 Theoretical background**

Problems of analysis and synthesis of control systems under uncertainty have attracted the attention of researchers and engineers for decades. The origin of uncertainty in constructed mathematical model of an industrial process can be seen in the effort to consider the process as an linear time invariant system, in spite of the fact, that the real behaviour is oftentimes different, much more complicated, and moreover because, strictly speaking, the physical parameters are never exactly known, possibly they can vary according to operating conditions. A possible and very popular approach to uncertain description supposes the known structure but uncertain knowledge of actual physical parameters of the controlled system. Their possible values are usually bounded by intervals and many of such plants can be assumed as so-called interval systems. The simple example of the interval system is represented by transfer function (1).

The common problem is to design a cheap controller with simple structure and fixed parameters which guarantees stability and often also required control behaviour for all possible values of the uncertain parameters. A potential solution to this task relies on the application of continuous-time robust linear controllers designed via the general solutions of Diophantine equations in the ring of proper and (Hurwitz-)stable rational functions (RPS). This technique is based on the ideas of Vidyasagar (1985) and Kučera (1993) and it is proposed and analyzed e.g. in (Prokop & Corriou, 1997). The algebraic method brings a single scalar parameter *m* 0 which influences the dynamics and robustness of the closed control loop. The controllers are designed for nominal systems while the robust stability can be tested through some standard instruments, for example the value set concept in combination with the zero exclusion condition and the overbounding method together with the Kharitonov theorem (Barmish, 1994).

The well known closed-loop control configurations with one degree of freedom (1DOF) or two degrees of freedom (2DOF) are supposed. In both cases, the loop is assumed to contain an interval controlled plant and a fixed controller. The regulator is designed for a nominal plant and consequently it is applied to plant under uncertainty while the robust stability is tested using some standard tools.

A fractional approach to continuous-time control design (Vidyasagar, 1985; Kučera, 1993) is based on general solutions of Diophantine equations in RPS. The set of stabilizing controllers is given by known Youla-Kučera parameterization and the choice of the appropriate controller according to user requirements (asymptotic tracking, disturbance rejection and attenuation) consists in utilization of divisibility conditions in the specified ring.

One of advantages of this algebraic synthesis lies in the existence of single scalar tuning parameter *m* 0 which can serve for additional influencing the final closed-loop control behaviour. The very topical question is how to choose *m* to gain the appropriate controller. The papers (Matušů & Prokop, 2008, 2011d) outline a possible technique for selection of *m* based on user-defined nominal control behaviour in the form of the first under/overshoot size. An alternative method consists in minimization of sensitivity function (Vidyasagar, 1985; Kučera, 1993) using *H* norm. In this instance, such *m* which tunes the "most robust" controller towards changes in controlled system (or in closed loop transfer function) is found. The simplest nevertheless in practice often sufficient solution is to select this parameter more or less "randomly" or on the basis of "engineering feeling" and subsequently test the regulation by means of simulation. Even an inexperienced user is usually able to find a suitable *m* after several steps.

Much more details about the synthesis method and specific controller design and tuning can be found e.g. in (Prokop & Corriou, 1997; (Matušů & Prokop, 2008, 2011d).

Once the nominally stabilizing controller is designed, one need to verify the stability of the closed control loop with this fixed controller and an interval plant. The robust stability can be investigated, for example, using the theory of polytopes (closed-loop characteristic polynomial has an affine linear uncertainty structure) or via the overbounding method in combination with the classical Kharitonov theorem. An excellent overview of this field provides e.g. books (Barmish, 1994; Bhattacharyya et al., 1995).

#### **2.2 Description of the program**

174 Cutting Edge Research in New Technologies

Problems of analysis and synthesis of control systems under uncertainty have attracted the attention of researchers and engineers for decades. The origin of uncertainty in constructed mathematical model of an industrial process can be seen in the effort to consider the process as an linear time invariant system, in spite of the fact, that the real behaviour is oftentimes different, much more complicated, and moreover because, strictly speaking, the physical parameters are never exactly known, possibly they can vary according to operating conditions. A possible and very popular approach to uncertain description supposes the known structure but uncertain knowledge of actual physical parameters of the controlled system. Their possible values are usually bounded by intervals and many of such plants can be assumed as so-called interval systems. The simple example of the interval system is

The common problem is to design a cheap controller with simple structure and fixed parameters which guarantees stability and often also required control behaviour for all possible values of the uncertain parameters. A potential solution to this task relies on the application of continuous-time robust linear controllers designed via the general solutions of Diophantine equations in the ring of proper and (Hurwitz-)stable rational functions (RPS). This technique is based on the ideas of Vidyasagar (1985) and Kučera (1993) and it is proposed and analyzed e.g. in (Prokop & Corriou, 1997). The algebraic method brings a single scalar parameter *m* 0 which influences the dynamics and robustness of the closed control loop. The controllers are designed for nominal systems while the robust stability can be tested through some standard instruments, for example the value set concept in combination with the zero exclusion condition and the overbounding method together with

The well known closed-loop control configurations with one degree of freedom (1DOF) or two degrees of freedom (2DOF) are supposed. In both cases, the loop is assumed to contain an interval controlled plant and a fixed controller. The regulator is designed for a nominal plant and consequently it is applied to plant under uncertainty while the robust stability is

A fractional approach to continuous-time control design (Vidyasagar, 1985; Kučera, 1993) is based on general solutions of Diophantine equations in RPS. The set of stabilizing controllers is given by known Youla-Kučera parameterization and the choice of the appropriate controller according to user requirements (asymptotic tracking, disturbance rejection and

One of advantages of this algebraic synthesis lies in the existence of single scalar tuning parameter *m* 0 which can serve for additional influencing the final closed-loop control behaviour. The very topical question is how to choose *m* to gain the appropriate controller. The papers (Matušů & Prokop, 2008, 2011d) outline a possible technique for selection of *m* based on user-defined nominal control behaviour in the form of the first under/overshoot size. An alternative method consists in minimization of sensitivity function (Vidyasagar, 1985; Kučera, 1993) using *H* norm. In this instance, such *m* which tunes the "most robust" controller towards changes in controlled system (or in closed loop transfer function) is found. The simplest nevertheless in practice often sufficient solution is to select this parameter more or less "randomly" or on the basis of "engineering feeling" and

attenuation) consists in utilization of divisibility conditions in the specified ring.

**2. Algebraic design of controllers for interval systems** 

**2.1 Theoretical background** 

represented by transfer function (1).

the Kharitonov theorem (Barmish, 1994).

tested using some standard tools.

This section introduces a simple user-friendly program (Matušů, 2010; Matušů & Prokop, 2011a) for synthesis and simulation of control systems under assumption that controlled plants are affected by interval uncertainty. It incorporates selected controller design algorithms and tools for robust stability analysis as they have been adumbrated hereinbefore. The developed software tool takes advantage of functions and GUI of MATLAB (tested on various versions from 6.5.1 – R13SP1 to 7.9 – R2009b) and also benefits of simulation environment SIMULINK and support of the Polynomial Toolbox 2.5 (PolyX, 2011). The program can be downloaded from web page (Matušů & Prokop, 2011a). It must be decompressed and launched in the Matlab via "start.m" file. Then, it is very intuitive and easy to use. The main menu window of the product is shown in Fig. 1 which is accompanied by the following concise description of program possibilities according to numbered items:


Implementation of Control Design Methods into Matlab Environment 177

0 5 10 15

t [s]

The aim is to design the controller which assures the asymptotic tracking of the reference signal and robust stability of the closed control loop, i.e. stability of control system for all members of interval family (1). The selection of *m* 1 , 1DOF structure and reference

> 2 2 2 21 ( ) *<sup>b</sup> s s C s*

As can be effortlessly verified, the nominal system will be stabilized by this controller in closed loop. The question is if the control circuit is robustly stable. The closed-loop

 4 3 <sup>2</sup> 1 12 1 0 11 11 02 01 10 01 00 , , *CL i i p sb a s a bq p s a ap bq bq s ap bq bq s bq* (3)

43 2

First, the robust stability of (4) is verified via the overbounding method. It means that more complicated uncertainty structure (affine linear in this case) can be "overbounded" by the interval one and this new family is sequentially tested. Unfortunately, this method brings certain degree of conservatism into the analysis due to ignoring the mutual dependencies among coefficients in the original family. As a result, robust stability is investigated only with sufficient (i.e. stronger) and not necessary and sufficient condition. Apart from other things, the overbounding interval polynomial and four related Kharitonov polynomials can be seen in Fig. 3 which represents final result of robust stability analysis from the program.

1 1 01 1 0 01 0 0 , , 2 1 2 2 2 *CL i i p sb a s a b s a a b b s a b b s b* (4)

*s s* 

(2)


tracking lead to PID controller:

After substitution:

0

Fig. 2. Step responses of 2402 systems from interval family (1)

characteristic polynomial has affine linear uncertainty structure:

1

2

0.5

1.5

h(t)

2.5 3

3.5

4.5

4

Fig. 1. The window of main menu for the first program

The capability of developed tool is demonstrated on the following example.

#### **2.3 An example of application**

The goal of this part is neither to prove the quality of utilized control design method nor to provide the comprehensive survey of all possibilities. It is just to show the basic idea of usage by means of a simple example.

The controlled plant is given as the second order interval system described by uncertain transfer function:

$$G(s, b\_i, a\_i) = \frac{b\_1 s + b\_0}{s^2 + a\_1 s + a\_0}; \quad b\_1, b\_0, a\_1, a\_0 \in \{0.5; 1.5\} \tag{1}$$

Potentially expressible time constants are assumed to be in seconds. This system with fixed parameters *bbaa* <sup>1010</sup> 1 is supposed as the nominal one. The simulation conditions were used as follows: All uncertain parameters of the system (1) are divided into 6 partial intervals (sampled into 7 certain values), i.e. the curves corresponding to responses of <sup>4</sup> 7 2401 members of RSS from the family (1) appear in graphs; in control simulations, the reference signal with step change from 1 to 2 is assumed in one third of simulation time and the step load disturbance of the size -1 is injected to the input of the controlled plant during the last third of simulation.

The step responses *h*(*t*) of 2402 members of the interval family (2401 systems from RSS + 1 nominal system) are shown in Fig. 2.

Fig. 2. Step responses of 2402 systems from interval family (1)

The aim is to design the controller which assures the asymptotic tracking of the reference signal and robust stability of the closed control loop, i.e. stability of control system for all members of interval family (1). The selection of *m* 1 , 1DOF structure and reference tracking lead to PID controller:

$$C\_b(s) = \frac{2s^2 + 2s + 1}{s^2 + s} \tag{2}$$

As can be effortlessly verified, the nominal system will be stabilized by this controller in closed loop. The question is if the control circuit is robustly stable. The closed-loop characteristic polynomial has affine linear uncertainty structure:

$$p\_{C\mathcal{L}}\left(s,b\_i,a\_i\right) = s^4 + \left(a\_1 + b\_1\tilde{q}\_2 + \tilde{p}\_1\right)s^3 + \left(a\_0 + a\_1\tilde{p}\_1 + b\_1\tilde{q}\_1 + b\_0\tilde{q}\_2\right)s^2 + \left(a\_0\tilde{p}\_1 + b\_1\tilde{q}\_0 + b\_0\tilde{q}\_1\right)s + b\_0\tilde{q}\_0 \tag{3}$$

After substitution:

176 Cutting Edge Research in New Technologies

Fig. 1. The window of main menu for the first program

**2.3 An example of application** 

transfer function:

the last third of simulation.

nominal system) are shown in Fig. 2.

usage by means of a simple example.

The capability of developed tool is demonstrated on the following example.

1 0

*bs b Gsb a bbaa s as a*

1 0

The goal of this part is neither to prove the quality of utilized control design method nor to provide the comprehensive survey of all possibilities. It is just to show the basic idea of

The controlled plant is given as the second order interval system described by uncertain

2 1010

(1)

(, , ) ; , , , 0.5; 1.5 *i i*

Potentially expressible time constants are assumed to be in seconds. This system with fixed parameters *bbaa* <sup>1010</sup> 1 is supposed as the nominal one. The simulation conditions were used as follows: All uncertain parameters of the system (1) are divided into 6 partial intervals (sampled into 7 certain values), i.e. the curves corresponding to responses of <sup>4</sup> 7 2401 members of RSS from the family (1) appear in graphs; in control simulations, the reference signal with step change from 1 to 2 is assumed in one third of simulation time and the step load disturbance of the size -1 is injected to the input of the controlled plant during

The step responses *h*(*t*) of 2402 members of the interval family (2401 systems from RSS + 1

$$p\_{C\perp}(s, b\_i, a\_i) = s^4 + (a\_1 + \mathcal{D}b\_1 + 1)s^3 + (a\_0 + a\_1 + \mathcal{D}b\_1 + \mathcal{D}b\_0)s^2 + (a\_0 + b\_1 + \mathcal{D}b\_0)s + b\_0 \tag{4}$$

First, the robust stability of (4) is verified via the overbounding method. It means that more complicated uncertainty structure (affine linear in this case) can be "overbounded" by the interval one and this new family is sequentially tested. Unfortunately, this method brings certain degree of conservatism into the analysis due to ignoring the mutual dependencies among coefficients in the original family. As a result, robust stability is investigated only with sufficient (i.e. stronger) and not necessary and sufficient condition. Apart from other things, the overbounding interval polynomial and four related Kharitonov polynomials can be seen in Fig. 3 which represents final result of robust stability analysis from the program.

Implementation of Control Design Methods into Matlab Environment 179


Real Axis

0 20 40 60 80 100

Real Axis

Fig. 5. The Kharitonov rectangles of overbounding interval polynomial – detailed view

because the complex plane origin is excluded from the value sets.

Fig. 6. The value sets of polytope of polynomials (4) – full view

Nevertheless, the "true" value sets of the original polytope of polynomials (4) in Fig. 6 with closed look to zero point in Fig. 7 reveal the closed-loop system is robustly stable in fact,





Imag Axis


0




0

Imag Axis

1

2

3

4

Fig. 3. Results of robust stability investigation from the program

Only two of four Kharitonov polynomials are stable which means that the overbounding polynomial is not robustly stable. Moreover, the Kharitonov rectangles from Fig. 4 (depicted actually only for illustration under frequencies from 0 to 3.5 with step 0.04) with detailed view in Fig. 5 also distinctly indicate robust instability of the overbounding polynomial because they cover the origin of the complex plane. This quite general principle is known as the zero exclusion condition (Barmish, 1994). However, generally it does not point to any conclusion about robust stability of original structure (4) because the mutual dependence among polynomial coefficients has been ignored.

Fig. 4. The Kharitonov rectangles of overbounding interval polynomial – full view

Only two of four Kharitonov polynomials are stable which means that the overbounding polynomial is not robustly stable. Moreover, the Kharitonov rectangles from Fig. 4 (depicted actually only for illustration under frequencies from 0 to 3.5 with step 0.04) with detailed view in Fig. 5 also distinctly indicate robust instability of the overbounding polynomial because they cover the origin of the complex plane. This quite general principle is known as the zero exclusion condition (Barmish, 1994). However, generally it does not point to any conclusion about robust stability of original structure (4) because the mutual dependence


Real Axis

Fig. 4. The Kharitonov rectangles of overbounding interval polynomial – full view

Fig. 3. Results of robust stability investigation from the program

among polynomial coefficients has been ignored.





Imag Axis


0

Fig. 5. The Kharitonov rectangles of overbounding interval polynomial – detailed view

Nevertheless, the "true" value sets of the original polytope of polynomials (4) in Fig. 6 with closed look to zero point in Fig. 7 reveal the closed-loop system is robustly stable in fact, because the complex plane origin is excluded from the value sets.

Fig. 6. The value sets of polytope of polynomials (4) – full view

Implementation of Control Design Methods into Matlab Environment 181

0 10 20 30 40 50 60 70 80 90

t [s]

0 10 20 30 40 50 60 70 80 90

t [s]

Fig. 10. Control of RSS of interval family (1) and nominal system by controller (7) – 1DOF

Fig. 9. Control of RSS of interval family (1) and nominal system by controller (2)

0

0

0.5

1

1.5

w(t), y(t)

2

2.5

0.5

1

1.5

w(t), y(t)

2

2.5

Fig. 7. The value sets of polytope of polynomials (4) – detailed view

Besides, this fact is confirmed by RSS control behaviour itself gained as an output from 1DOF control structure constructed in the Simulink environment. The simple simulation scheme is shown in Fig. 8 while the control responses *y*(*t*) can be seen in Fig. 9.

Fig. 8. Simulink scheme of 1DOF control system


Real Axis

Harmonic Disturbance

bsim(s) asim(s) Controlled System

w, y, v

u

Besides, this fact is confirmed by RSS control behaviour itself gained as an output from 1DOF control structure constructed in the Simulink environment. The simple simulation

Fig. 7. The value sets of polytope of polynomials (4) – detailed view

scheme is shown in Fig. 8 while the control responses *y*(*t*) can be seen in Fig. 9.

Ramp Disturbance Load Disturbance


Reference Saturation

q(s) p(s) Controller

Fig. 8. Simulink scheme of 1DOF control system

Signal






Imag Axis

0

1

2

3

Fig. 9. Control of RSS of interval family (1) and nominal system by controller (2)

Fig. 10. Control of RSS of interval family (1) and nominal system by controller (7) – 1DOF

Implementation of Control Design Methods into Matlab Environment 183

Some drawbacks of the Smith predictor have been eliminated by improving the idea and creating many modifications of this connection (Watanabe & Ito, 1981; Åström et al., 1994; Mataušek & Micić, 1996; Majhi & Atherton, 1998; Kaya & Atherton, 1999; Hamamci et al.,

All three implemented techniques (Majhi & Atherton, 1998; Kaya & Atherton, 1999; Hamamci et al., 2001) have improved the classical Smith predictor loop using more sophisticated and complicated structure with additional controllers. Naturally, all the methods also use mathematical model of really controlled plant including time-delay term in the inner loop. Moreover, this model is assumed during design of controllers as a nominal system. In practice, however, the really controlled can differ from the ideal assumptions.

Plant

Model

( ) *G s <sup>m</sup>* ( ) *<sup>m</sup> s*


( ) *G s <sup>r</sup>*

The example of modified Smith predictor structure is shown in Fig. 12.

<sup>3</sup> ( ) *G s <sup>c</sup>*

Fig. 12. Example of modified Smith predictor structure (Hamamci et al., 2001)

The controller synthesis itself is based on various approaches and techniques according to the applied modification. For example the standard forms for obtaining the optimal closedloop transfer function parameters in the meaning of integral squared time error (ISTE) criterion, Nyquist stability criterion, a simple algebraic approach to control system design, coefficient diagram, modification of Kessler standard form, or Lipatov stability analysis have been utilized – see e.g. (Mataušek & Micić, 1996; Majhi & Atherton, 1998; Manabe, 1998; Kaya & Atherton, 1999; Hamamci et al., 2001; Hamamci & Ucar, 2002). The final relations for controller design have been usually pre-derived for first and second order time-

Analogically to the Subsection 2.2, this part briefly presents a simple user-friendly Matlab program (Matušů & Prokop, 2010, 2011b, 2011c), in this case for control of time-delay systems using three various modifications of Smith predictor. The software implementation includes the modification for unstable and integrating processes (Majhi & Atherton, 1998), PI-PD modification for systems with long dead time (Kaya & Atherton, 1999), and

 ( ) *<sup>r</sup> s* <sup>1</sup> ( ) *G s <sup>c</sup> w y*

*n*


2001).

delay plants.

**3.2 Description of the program** 

Fig. 11. Control of RSS of interval family (1) and nominal system by controller (7), (8) – 2DOF

The shorter settling time can be obtained by further tuning of controllers by parameter *m*. Assuming the 1DOF configuration of control system, the selection *m* 1.5 gives the feedback controller:

$$C\_b(s) = \frac{4.0625s^2 + 7.5s + 5.0625}{s^2 + 0.9375s} \tag{5}$$

and the computation for 2DOF structure adds the feedforward part:

$$C\_f(s) = \frac{2.25s^2 + 6.75s + 5.0625}{s^2 + 0.9375s} \tag{6}$$

Now, only the final simulations of control behaviour are shown without deeper insight both for 1DOF and 2DOF configurations – see Figs. 10 and 11, respectively. However, the costs for "faster" regulation are more aggressive control signals.

#### **3. Control of time-delay systems using modified Smith predictors**

#### **3.1 Theoretical background**

The time-delay has been intensively investigated phenomenon during the last decades, because it is very common in many process control applications and its presence in a control loop always brings serious complications. The relatively effective tool for compensation of time-delay term represents the classical Smith predictor which has been known to automation community since 1959 (Smith). However, this control structure has also its disadvantages and limitations.

0 10 20 30 40 50 60 70 80 90

t [s]

Fig. 11. Control of RSS of interval family (1) and nominal system by controller (7), (8) – 2DOF The shorter settling time can be obtained by further tuning of controllers by parameter *m*. Assuming the 1DOF configuration of control system, the selection *m* 1.5 gives the

> 2 2 4.0625 7.5 5.0625 ( ) 0.9375 *<sup>b</sup>*

2 2 2.25 6.75 5.0625 ( ) 0.9375 *<sup>f</sup>*

Now, only the final simulations of control behaviour are shown without deeper insight both for 1DOF and 2DOF configurations – see Figs. 10 and 11, respectively. However, the costs

The time-delay has been intensively investigated phenomenon during the last decades, because it is very common in many process control applications and its presence in a control loop always brings serious complications. The relatively effective tool for compensation of time-delay term represents the classical Smith predictor which has been known to automation community since 1959 (Smith). However, this control structure has also its

*s s* 

*s s* 

(5)

(6)

*s s C s*

*s s C s*

**3. Control of time-delay systems using modified Smith predictors** 

and the computation for 2DOF structure adds the feedforward part:

for "faster" regulation are more aggressive control signals.

0

0.5

1

1.5

w(t), y(t)

feedback controller:

**3.1 Theoretical background** 

disadvantages and limitations.

2

2.5

Some drawbacks of the Smith predictor have been eliminated by improving the idea and creating many modifications of this connection (Watanabe & Ito, 1981; Åström et al., 1994; Mataušek & Micić, 1996; Majhi & Atherton, 1998; Kaya & Atherton, 1999; Hamamci et al., 2001).

All three implemented techniques (Majhi & Atherton, 1998; Kaya & Atherton, 1999; Hamamci et al., 2001) have improved the classical Smith predictor loop using more sophisticated and complicated structure with additional controllers. Naturally, all the methods also use mathematical model of really controlled plant including time-delay term in the inner loop. Moreover, this model is assumed during design of controllers as a nominal system. In practice, however, the really controlled can differ from the ideal assumptions. The example of modified Smith predictor structure is shown in Fig. 12.

Fig. 12. Example of modified Smith predictor structure (Hamamci et al., 2001)

The controller synthesis itself is based on various approaches and techniques according to the applied modification. For example the standard forms for obtaining the optimal closedloop transfer function parameters in the meaning of integral squared time error (ISTE) criterion, Nyquist stability criterion, a simple algebraic approach to control system design, coefficient diagram, modification of Kessler standard form, or Lipatov stability analysis have been utilized – see e.g. (Mataušek & Micić, 1996; Majhi & Atherton, 1998; Manabe, 1998; Kaya & Atherton, 1999; Hamamci et al., 2001; Hamamci & Ucar, 2002). The final relations for controller design have been usually pre-derived for first and second order timedelay plants.

#### **3.2 Description of the program**

Analogically to the Subsection 2.2, this part briefly presents a simple user-friendly Matlab program (Matušů & Prokop, 2010, 2011b, 2011c), in this case for control of time-delay systems using three various modifications of Smith predictor. The software implementation includes the modification for unstable and integrating processes (Majhi & Atherton, 1998), PI-PD modification for systems with long dead time (Kaya & Atherton, 1999), and

Implementation of Control Design Methods into Matlab Environment 185

Fig. 14. Basic properties of control experiment

Fig. 15. Definition of parameters for nominal and perturbed system

modification applying control design by CDM (Hamamci et al., 2001). It can be freely downloaded from the web page (Matušů & Prokop, 2011b). The program is a translated version of the one created under the scope of the Master's Theses (Matušů, 2002). After decompression it can be launched using "go.m" file. The software has been coded in Matlab 6.5.1 – R13SP1 but tested also under several newer versions. The main window of the program GUI (Fig. 13) allows selecting the modification which should be used for a whole control experiment.

Fig. 13. Initial window of the second program

Subsequently, sort of controlled system (e.g. first order, second order or integrating plant as a special type) can be chosen together with fundamental properties of the experiment (simulation time, reference signal, disturbances) – see Fig. 14.

In the next step, coefficients of the controlled system of specific type and possibly some other additional parameters depending on the used method can be set as illustrated in Fig. 15. However, the program permits not only adjustment of nominal system (considered as a model for control design and in control loops as shown e.g. in Fig. 12), but also of the perturbed system (used as a really controlled plant) with potentially different coefficients.

modification applying control design by CDM (Hamamci et al., 2001). It can be freely downloaded from the web page (Matušů & Prokop, 2011b). The program is a translated version of the one created under the scope of the Master's Theses (Matušů, 2002). After decompression it can be launched using "go.m" file. The software has been coded in Matlab 6.5.1 – R13SP1 but tested also under several newer versions. The main window of the program GUI (Fig. 13) allows selecting the modification which should be used for a whole

Subsequently, sort of controlled system (e.g. first order, second order or integrating plant as a special type) can be chosen together with fundamental properties of the experiment

In the next step, coefficients of the controlled system of specific type and possibly some other additional parameters depending on the used method can be set as illustrated in Fig. 15. However, the program permits not only adjustment of nominal system (considered as a model for control design and in control loops as shown e.g. in Fig. 12), but also of the perturbed system (used as a really controlled plant) with potentially

control experiment.

Fig. 13. Initial window of the second program

different coefficients.

(simulation time, reference signal, disturbances) – see Fig. 14.


Fig. 14. Basic properties of control experiment


Fig. 15. Definition of parameters for nominal and perturbed system

Implementation of Control Design Methods into Matlab Environment 187

0 50 100 150 200 250 300

Time [s]

This chapter has presented two freely downloadable Matlab programs which allow userfriendly work with selected control design methods via GUI. The first package is focused on algebraic design of continuous-time controllers under assumption of interval plants while the second one deals with control of time-delay systems using three various modifications of Smith predictor. The described software products can be used both for research and

The work was supported by the Ministry of Education, Youth and Sports of the Czech Republic under the Research Plan No. MSM 7088352102 and by the European Regional

Åström, K. J.; Hang, C. C. & Lim, B. C. (1994). A new Smith predictor for controlling a

Barmish, B. R. (1994). *New Tools for Robustness of Linear Systems*. Macmillan, ISBN 0-02-

Bhattacharyya, S. P.; Chapellat, H. & Keel, L. H. (1995). *Robust Control: The Parametric* 

process with an integrator and long dead-time. *IEEE Transactions on Automatic* 

*Approach*, Prentice Hall, ISBN 978-0137815760, Englewood Cliffs, New Jersey, USA.

Development Fund under the project CEBIA-Tech No. CZ.1.05/2.1.00/03.0089.

*Control*, Vol. 39, No. 2, pp. 343-345.

306055-7, New York, USA.

The control result obtained from the program is visualized in Fig. 17.

0

Fig. 17. Control results for system (7)

**4. Conclusion** 

educational purposes.

**6. References** 

**5. Acknowledgements** 

0.5

1

1.5

Reference, Output Signal

2

2.5

Finally, the program computes the controllers and opens the Simulink scheme where control behaviour with the preset values can be simulated. An example is shown in Fig. 16.

Fig. 16. Display of final controllers and simulation environment

#### **3.3 An example of application**

In order to demonstrate the capability of the program, a simple example has been performed. There were assumed the step change of reference signal from 1 to 2 in a third of a simulation time and then the disturbance *n* 0.3 injected to the input of the controlled plant during the last third of the simulation time. A second order time-delay transfer function with complex poles was considered as a controlled plant. The same transfer function was assumed as a nominal system as well:

$$\text{G(s)} = \frac{1}{s^2 + 0.2s + 1} e^{-15s} \tag{7}$$

As in the previous case, the respective time constants are supposed to be in seconds. The modified Smith predictor design by CDM was selected. The consideration of the version with disturbance rejection capability leads to the trio of controllers:

$$\begin{aligned} \mathbf{G}\_{c1}(\mathbf{s}) &= 1\\ \mathbf{G}\_{c2}(\mathbf{s}) &= \frac{1}{0.05579 \mathbf{s}^2 + 0.3322 \mathbf{s}}\\ \mathbf{G}\_{c3}(\mathbf{s}) &= 0.9341 \mathbf{s}^2 + 1.2929 \mathbf{s} + 1 \end{aligned} \tag{8}$$

with prescribed settling time 3.5 *T s <sup>s</sup>* .

The control result obtained from the program is visualized in Fig. 17.

Fig. 17. Control results for system (7)

#### **4. Conclusion**

186 Cutting Edge Research in New Technologies

Finally, the program computes the controllers and opens the Simulink scheme where control

In order to demonstrate the capability of the program, a simple example has been performed. There were assumed the step change of reference signal from 1 to 2 in a third of a simulation time and then the disturbance *n* 0.3 injected to the input of the controlled plant during the last third of the simulation time. A second order time-delay transfer function with complex poles was considered as a controlled plant. The same transfer

> 2 <sup>1</sup> ( ) 0,2 1 *<sup>s</sup> G s e s s*

2 2

As in the previous case, the respective time constants are supposed to be in seconds. The modified Smith predictor design by CDM was selected. The consideration of the version

2

*s s*

<sup>1</sup> ( ) 0.05579 0.3322

G ( ) 0.9341 1.2929 1

*ss s*

15

(7)

(8)

behaviour with the preset values can be simulated. An example is shown in Fig. 16.

Fig. 16. Display of final controllers and simulation environment

with disturbance rejection capability leads to the trio of controllers:

1

*G s*

*c*

*c*

*G s*

() 1

c3

function was assumed as a nominal system as well:

with prescribed settling time 3.5 *T s <sup>s</sup>* .

**3.3 An example of application** 

This chapter has presented two freely downloadable Matlab programs which allow userfriendly work with selected control design methods via GUI. The first package is focused on algebraic design of continuous-time controllers under assumption of interval plants while the second one deals with control of time-delay systems using three various modifications of Smith predictor. The described software products can be used both for research and educational purposes.

#### **5. Acknowledgements**

The work was supported by the Ministry of Education, Youth and Sports of the Czech Republic under the Research Plan No. MSM 7088352102 and by the European Regional Development Fund under the project CEBIA-Tech No. CZ.1.05/2.1.00/03.0089.

#### **6. References**


**Part 3** 

**Multimedia** 

