**7. Application to an experimental magnetic levitation system**

In this section the tuning methods presented above will be applied to the experimental magnetic levitation system shown in Figure 5. This experimental system is a popular gravity-biased one degree of freedom magnetic levitation system in which an electromagnet exerts attractive force to levitate a steel ball. The dynamics of the MagLev system can be described by the following simplified state space model (Yang & Tateishi, 2001)

$$\text{d}x \mid \text{dt} = \text{v} \quad , \text{ d}\mathbf{v} \nmid \text{dt} = \text{g} - \left(\text{c} \nmid M\right) \left\lfloor \text{i}^2 \nmid \left(\text{x}\_{\text{v}} + \text{x}\right)^2 \right\rfloor \tag{31}$$

where *x*, *v* and *M* are the air gap (vertical position), the velocity and the mass of the steel ball respectively, *g* is the gravity acceleration, *i* is the coil current, *c* and *x∞* are constants that are determined by the magnetic properties of the electromagnet and the steel ball. Moreover the coil of the electromagnet has an inductance *L* and a total resistance *R*.

PID-Like Controller Tuning for Second-Order Unstable Dead-Time Processes 69

The model parameters *c* and *x∞* are obtained from measurements of the steady state value of

(3mm<*x0*<11mm), using a stabilizing PID controller. Since the model parameters *Km*, *τUm* and *τSm* can be obtained from (33), to identify the time delay *dm* of the system, a single closed loop relay-feedback experiment can be used. The control diagram for this experiment is shown in Figure 5b. Using a PD stabilizing controller with derivative time *τDs=τUm*, one can

<sup>1</sup> 2 2 *d as K K m C*

where *ωC* is the ultimate frequency of the closed loop system, which is measured by the relay experiment. The values of the model parameters for the linearized system given by (33), about the operating point *x0*=7mm, are listed in Table 8 together with the parameters of the PI-current controller and the time constant of the two measurement filters used. It is noted here that the selection of the filter time constant *τF* and the gains of the PI current controller are performed intentionally in order to produce a significant time delay to the MagLev system. Finally, it is mentioned that the sampling intervals for all experiments is

**Physical parameters**  *M*=0.068 Kg , *g*=9.81 m/sec2 , *c*=8.068·10-5Hm, *x∞*=0.00215m , *L*=0.4125 , *R*=11Ω **Linearized Model parameters** (around *x0*=0.007m) *Km*=0.008474 m/A , *τUm= τSm* =0.0216 sec, *dm*=0.01037 sec , *i0*=1.08 A **Current controller and measurement filter parameters** *KCi*=200 , *τIi*=1 , *τF*=0.005 **Parameters of the designed PID controller** 

 

chosen as *τst=*0.5ms, which is fast enough to assume a continuous-time system.

OPOS *KCm*=196.7 , *τIm* =0.1273 , *τDm* =0.0216 ISE-Sp *KCm*=197.9 , *τIm*=0.0936 , *τDm* =0.0216 DPC *KCm*=196.1 , *τIm*=0.1565 , *τDm*=0.0216 FST *KCm*=196.5 , *τIm*=0.1346 , *τDm*=0.0216 GM *KCm*=118.5 , *τIm*= 0.428 , *τDm* =0.0216 PM *KCm*= 147.5 , *τIm*=0.1162 , *τDm*=0.0216

Table 8. System and controller parameters for the experiments in the MagLev system.

A series of experiments have been performed by applying all four methods reported in Sections 4 and 5 to the MagLev system. In Fig. 6, the set-point and load step responses around the operating point *x0*=7mm are presented. In particular, in Figs 6a and 6b, the response of the MagLev to a pulse waveform with amplitude 1 mm and period 5 sec is shown in the case where the PID controller is tuned using the OPOS and ISE-Sp methods, respectively. Fig. 6c shows the tracking response in the case where the DPC method is used. In this case the amplitude of the pulse waveform used as reference input is 7mm (from 3.5mm to 10.5mm). Finally, Fig. 6d shows the regulatory control response, in the case where

*K ds H s* 

exp( ) ( ) ( 1)( 1) *M m m*

*Um Sm*

 *s s*

 in *Um C m Cs Um C* /( 1) (35)

(34)

0 0 *i gM c x x* ( / )( ) ), for several values of *x0*

1

the coil current (which is given by <sup>2</sup>

easily verify that *dm* is given by

Fig. 5. MagLev system diagrams: (a) Schematic diagram, (b) Control diagram and (c) Block diagram.

Linearizing (31) about an operating point *x0*, the following second order transfer function for the MagLev system is obtained

$$H\_1^M(\mathbf{s}) = \frac{K\_m}{(\tau\_{lIm}\mathbf{s} - \mathbf{1})(\tau\_{Sm}\mathbf{s} + \mathbf{1})} \tag{32}$$

where, *Km*, *τUm*, and *τSm* are the gain, the unstable and the stable time constants of the system given by

$$K\_m = \sqrt{\varepsilon / \left(M \text{g}\right)} \quad ; \quad \tau\_{\text{l}lm} = \tau\_{\text{Sm}} = \sqrt{0.5 \left(\mathbf{x}\_{\text{e}} + \mathbf{x}\_{0}\right) / \left. g} \tag{33}$$

For the MagLev system used in the following experiments the current *i* is controlled by a PI controller (see Figure 5c). Moreover, to reduce measurement noise additional first order filters with time constants *τF* are used for the measurement of *x* and *i* (Figure 5c). The unmodelled dynamics of the current control loop, the measurement filters and the dynamics of the electrical circuitry (amplifiers, drivers etc.) is modelled here as a time delay *dm*. Therefore, the complete transfer function of the linearized MagLev system is given by

**PID-Like Controller** 

**+**\_ +

**+**\_ <sup>2</sup>

R 1 i iu L L **u(t) i(t)**

**Coil-Dynamics** 

**-** <sup>+</sup> KCs

**DRIVE**

**isp(t) <sup>+</sup>**\_ **r(t)**

**AD/DA** 

sτDs

**<sup>+</sup> x(t) e(t)**

**<sup>u</sup> Coil**

**i**

**x**

**Steel Ball**

**Position Sensor**

x v

  <sup>i</sup> v g (c / M) (x x)

**MagLev Dynamics** 

**iL(s)**

**MagLev System**

2

F F <sup>1</sup> <sup>H</sup> s 1

**MagLev System** 

**x(t)**

Fig. 5. MagLev system diagrams: (a) Schematic diagram, (b) Control diagram and (c) Block

Linearizing (31) about an operating point *x0*, the following second order transfer function for

<sup>1</sup> ( ) ( 1)( 1) *M m*

where, *Km*, *τUm*, and *τSm* are the gain, the unstable and the stable time constants of the system

 

For the MagLev system used in the following experiments the current *i* is controlled by a PI controller (see Figure 5c). Moreover, to reduce measurement noise additional first order filters with time constants *τF* are used for the measurement of *x* and *i* (Figure 5c). The unmodelled dynamics of the current control loop, the measurement filters and the dynamics of the electrical circuitry (amplifiers, drivers etc.) is modelled here as a time delay *dm*. Therefore, the complete transfer function of the linearized MagLev system is given by

*K c Mg <sup>m</sup>* /( ) , <sup>0</sup> 

*<sup>K</sup> H s* 

*Um Sm*

 

*s s* (32)

*Um Sm* 0.5 / *xx g* (33)

diagram.

**isp(t)**

**(c)**

**r(t)**

**(b)**

**(a)**

Pre-Filter

**CONTROLLER**

given by

the MagLev system is obtained

**Current PI Controller ei(t)**

Ii Ci Ii ( s 1)K s 

> F F <sup>1</sup> <sup>H</sup> s 1

$$H\_1^M(\mathbf{s}) = \frac{K\_m \exp(-d\_m \mathbf{s})}{(\tau\_{lmr}\mathbf{s} - \mathbf{1})(\tau\_{Sm}\mathbf{s} + \mathbf{1})} \tag{34}$$

The model parameters *c* and *x∞* are obtained from measurements of the steady state value of the coil current (which is given by <sup>2</sup> 0 0 *i gM c x x* ( / )( ) ), for several values of *x0* (3mm<*x0*<11mm), using a stabilizing PID controller. Since the model parameters *Km*, *τUm* and *τSm* can be obtained from (33), to identify the time delay *dm* of the system, a single closed loop relay-feedback experiment can be used. The control diagram for this experiment is shown in Figure 5b. Using a PD stabilizing controller with derivative time *τDs=τUm*, one can easily verify that *dm* is given by

$$d\_m = a o\_\mathbb{C}^{-1} a \sin \left[ \left( \tau\_{\ell lm} a o\_\mathbb{C} K\_m K\_{\mathbb{C}s} \right) / \left( \tau\_{\ell lm}^2 a o\_\mathbb{C}^2 + 1 \right) \right] \tag{35}$$

where *ωC* is the ultimate frequency of the closed loop system, which is measured by the relay experiment. The values of the model parameters for the linearized system given by (33), about the operating point *x0*=7mm, are listed in Table 8 together with the parameters of the PI-current controller and the time constant of the two measurement filters used. It is noted here that the selection of the filter time constant *τF* and the gains of the PI current controller are performed intentionally in order to produce a significant time delay to the MagLev system. Finally, it is mentioned that the sampling intervals for all experiments is chosen as *τst=*0.5ms, which is fast enough to assume a continuous-time system.


Table 8. System and controller parameters for the experiments in the MagLev system.

A series of experiments have been performed by applying all four methods reported in Sections 4 and 5 to the MagLev system. In Fig. 6, the set-point and load step responses around the operating point *x0*=7mm are presented. In particular, in Figs 6a and 6b, the response of the MagLev to a pulse waveform with amplitude 1 mm and period 5 sec is shown in the case where the PID controller is tuned using the OPOS and ISE-Sp methods, respectively. Fig. 6c shows the tracking response in the case where the DPC method is used. In this case the amplitude of the pulse waveform used as reference input is 7mm (from 3.5mm to 10.5mm). Finally, Fig. 6d shows the regulatory control response, in the case where

PID-Like Controller Tuning for Second-Order Unstable Dead-Time Processes 71

5% and 15%, respectively. (c) The magnitude of the loop transfer function is affected by all parameters, as well as the operating point. The two extreme worst cases are obtained when *d* and *c* are maximized and *x0*, *x∞* are minimized (scenario A) and when *d*, *x0*, *x∞* are maximized and *c* is minimized (scenario B). From scenario A, we obtain the smallest maximum ultimate gain *min(KC,max)*, while from scenario B, we obtain the largest minimum ultimate gain *max(KC,min)*. Obviously, for the closed loop system to be stable under the assumed uncertainty and for the whole desired operating region, there must be *min(KC,max)> max(KC,min)*. Based on the above observation one can easily verify that for *τΙ>5τΙ,min*, the inequalities *min(KC,max)>0.53KC,max,0* and *max(KC,min)<1.2KC,min,0*, must hold, where *KC,max,0* and *KC,min,0* are the nominal values of *KC,max* and *KC,min* at the operating point *x0*=0.007m, i.e. the case where there is no uncertainty. To guarantee stability, the increasing and decreasing

Based on the above results and observations, in order to tune the PID controller, the GM tuning method is next applied with specifications *GMinc*=2 and *GMdec*=1.25. The obtained controller gains are listed in Table 8. The Nyquist plots for the two extreme scenarios A and B and for the nominal system, using the obtained robust controller, are shown in Fig. 7,

Fig. 7. Nyquist plots of the MagLev system using the robust controller designed with the

Case A

Real Axis

For the experimental application, a pre-filter with transfer function *GF,PID(s)=1/(sτI+1)* is used in order to cancel the zero introduced by the PID controller. With this filter excessive overshoots in the set-point step response of the system are avoided. The experimental results obtained are presented in Figure 8. The set-point step response from 3.5mm to 10.5mm is shown in Figure 8a. This response is rather slow due to the small value of *KCm* and the very large value of *τIm* (*τIm/τUm*=19.81=9.728*τI,min*). This is more evident in the regulatory control case, around the operating point *x0*=7mm, shown in Figure 8b. This response is obtained from a change in the system input (current set-point) produced by a


Case B

Nominal Case

A faster controller can be designed if the desired operating region is smaller under the assumption of the same parameter uncertainties as in the previous application. In this

gain margins must be selected grater than 1/0.53 and 1.2, respectively.

which verifies that the closed loop system is always stable.




Imaginary Axis



0.05

0

pulse waveform with amplitude 0.2A (or 20% change in i).

GM method.

the FST method is used with a change in the system input (current set-point) produced by a pulse waveform with amplitude 0.2A (i.e. 20% change in the steady state value of the coil current). Fig. 6 verifies the efficiency and good performance of the proposed methods. As expected, the ISE-Sp method provides the fastest response, but with an overshoot of about 20%. The FST and OPOS methods produce very smooth and fast regulatory and set-point tracking responses. Finally, the DPC method provides a very robust controller that can control the MagLev system in a large operating region. However, this controller provides a rather sluggish response.

As a second application of the proposed tuning methods, a robust PID controller is designed in order to guarantee a stable closed loop system in a wide operating region (3.5mm< *x*<10.5mm) and in the case of ±20% uncertainty in the parameters *c*, *x∞* and 10% uncertainty in the time delay *dm*. The problem of converting the parametric uncertainties into gain and phase margin specifications is a very complicated problem that remains unsolved, in the general case. Here, in order to select appropriate specifications for the design of the controller, the following observations are made: (a) From (8), it is clear that the uncertainty in the model parameters *τUm* and *τSm* (which depend on *x∞* and *x0*) does not affect the argument of the loop transfer function. The only term which influences the phase uncertainty is the uncertainty in the identification of the time delay. (b) Assuming that *τΙ>5τΙ,min*, (this assumption is in accordance with our desire to design a very robust controller as suggested in the work (Paraskevopoulos et al, 2006)) one can easily verify from ,min ˆ ( ) *<sup>I</sup> d* (given in Table 6), that a ±10% change in *dm* produces a change in *ωmin* and *ωmax* smaller than

Fig. 6. Experimental MagLev position responses. Set-point tracking response: (a) using OPOS method, (b) using ISE-Sp method, (c) using DPC method. (d) Regulatory control step response using FST method (current load disturbance amplitude 20% or 0.2 A).

the FST method is used with a change in the system input (current set-point) produced by a pulse waveform with amplitude 0.2A (i.e. 20% change in the steady state value of the coil current). Fig. 6 verifies the efficiency and good performance of the proposed methods. As expected, the ISE-Sp method provides the fastest response, but with an overshoot of about 20%. The FST and OPOS methods produce very smooth and fast regulatory and set-point tracking responses. Finally, the DPC method provides a very robust controller that can control the MagLev system in a large operating region. However, this controller provides a

As a second application of the proposed tuning methods, a robust PID controller is designed in order to guarantee a stable closed loop system in a wide operating region (3.5mm< *x*<10.5mm) and in the case of ±20% uncertainty in the parameters *c*, *x∞* and 10% uncertainty in the time delay *dm*. The problem of converting the parametric uncertainties into gain and phase margin specifications is a very complicated problem that remains unsolved, in the general case. Here, in order to select appropriate specifications for the design of the controller, the following observations are made: (a) From (8), it is clear that the uncertainty in the model parameters *τUm* and *τSm* (which depend on *x∞* and *x0*) does not affect the argument of the loop transfer function. The only term which influences the phase uncertainty is the uncertainty in the identification of the time delay. (b) Assuming that *τΙ>5τΙ,min*, (this assumption is in accordance with our desire to design a very robust controller as suggested in the work (Paraskevopoulos et al, 2006)) one can easily verify from ,min ˆ ( ) *<sup>I</sup>*

(given in Table 6), that a ±10% change in *dm* produces a change in *ωmin* and *ωmax* smaller than

Fig. 6. Experimental MagLev position responses. Set-point tracking response: (a) using OPOS method, (b) using ISE-Sp method, (c) using DPC method. (d) Regulatory control step

0 2 4 6 8 10 12

Time in sec.

response using FST method (current load disturbance amplitude 20% or 0.2 A).

*d*

rather sluggish response.

6.5

a

b c

7.5

6.5

Position in mm

8

6

d

7

7

7

7.5

5% and 15%, respectively. (c) The magnitude of the loop transfer function is affected by all parameters, as well as the operating point. The two extreme worst cases are obtained when *d* and *c* are maximized and *x0*, *x∞* are minimized (scenario A) and when *d*, *x0*, *x∞* are maximized and *c* is minimized (scenario B). From scenario A, we obtain the smallest maximum ultimate gain *min(KC,max)*, while from scenario B, we obtain the largest minimum ultimate gain *max(KC,min)*. Obviously, for the closed loop system to be stable under the assumed uncertainty and for the whole desired operating region, there must be *min(KC,max)> max(KC,min)*. Based on the above observation one can easily verify that for *τΙ>5τΙ,min*, the inequalities *min(KC,max)>0.53KC,max,0* and *max(KC,min)<1.2KC,min,0*, must hold, where *KC,max,0* and *KC,min,0* are the nominal values of *KC,max* and *KC,min* at the operating point *x0*=0.007m, i.e. the case where there is no uncertainty. To guarantee stability, the increasing and decreasing gain margins must be selected grater than 1/0.53 and 1.2, respectively.

Based on the above results and observations, in order to tune the PID controller, the GM tuning method is next applied with specifications *GMinc*=2 and *GMdec*=1.25. The obtained controller gains are listed in Table 8. The Nyquist plots for the two extreme scenarios A and B and for the nominal system, using the obtained robust controller, are shown in Fig. 7, which verifies that the closed loop system is always stable.

Fig. 7. Nyquist plots of the MagLev system using the robust controller designed with the GM method.

For the experimental application, a pre-filter with transfer function *GF,PID(s)=1/(sτI+1)* is used in order to cancel the zero introduced by the PID controller. With this filter excessive overshoots in the set-point step response of the system are avoided. The experimental results obtained are presented in Figure 8. The set-point step response from 3.5mm to 10.5mm is shown in Figure 8a. This response is rather slow due to the small value of *KCm* and the very large value of *τIm* (*τIm/τUm*=19.81=9.728*τI,min*). This is more evident in the regulatory control case, around the operating point *x0*=7mm, shown in Figure 8b. This response is obtained from a change in the system input (current set-point) produced by a pulse waveform with amplitude 0.2A (or 20% change in i).

A faster controller can be designed if the desired operating region is smaller under the assumption of the same parameter uncertainties as in the previous application. In this

PID-Like Controller Tuning for Second-Order Unstable Dead-Time Processes 73

New methods for tuning PID-like controllers for USOPDT systems have been developed in this work. These methods are based on various criteria, such as the appropriate assignment of the dominant poles of the closed-loop system, the attainment of various time-domain closed-loop characteristics, as well as the satisfaction of gain and phase margins specifications of the closed-loop system. In the general case, where the derivative action of the controller is selected arbitrarily, the tuning methods require the use of iterative algorithms for the solution of nonlinear systems of equations. In the special case where the controller derivative time constant is selected equal to the stable time constant of the system, the solutions of the nonlinear system of equations involved in the tuning methods are given in the form of quite accurate analytic approximations and, thus, the iterative algorithms can be avoided. In this case the tuning methods can readily be used for on-line applications. The proposed tuning methods have successfully been applied to the control of an experimental magnetic levitation system that is modelled as an USOPDT process. The obtained experimental results verify the efficiency of the proposed tuning methods that provide a

Clement, C.V. & Chidambaram, M. (1997). PID Controller for Unstable Time Delay Systems.

De Paor, A. M. & O'Malley, M. (1989). Controllers of Ziegler-Nichols Type for Unstable

Fung, H.-W.; Wang, Q.-G. & Lee, T.-H. (1998). PI Tuning in Terms of Gain and Phase

Ho, E.K. & Xu, W. (1998). PID Tuning for Unstable Processes based on Gain and Phase

Huang, H.P. & Chen, C.C. (1997). Control-System Synthesis for Open-Loop Unstable Process

Jacob, E.F. & Chidambaram, M. (1996). Design of Controllers for Unstable First-Order plus

Jhunjhunwala, M.K. & Chidambaram, M. (2001). PID Controller Tuning for Unstable

Jung, C.S.; Song, H.K. & Hyun, J.C. (1999). A Direct Synthesis Tuning Method of Unstable

Lee, C.H. & Teng, C.C. (2002). Tuning of PID Controllers for Stable and Unstable Processes

Lee, Y.; Lee, J. & Park, S. (2000). PID Controller Tuning for Integrating and Unstable

*International Journal of Fuzzy Systems*, Vol.128, No.1, pp. 95–106.

Process with Time Delay. *International Journal of Control.*, Vol.49, No.4, pp. 1273–

Margin Specifications. *Proceedings of the Institute of Electrical Engineers-Part D:* 

with Time Delay. *Proceedings of the Institute of Electrical Engineers – Part D: Control* 

Time Delay Systems. *Computers and Chemical Engineering*, Vol.20, No.5, pp. 579–584.

Systems by Optimization Method. *Chemical Engineering Communications,* Vol. 185,

First-Order-plus-Time-Delay-Processes. *Journal of Process Control*, Vol.9, No.3, pp.

based on Gain and Phase Margin Specifications: A Fuzzy Neural Approach.

Processes with Time Delay. *Chemical Engineering Science*, Vol.55, No.17, pp. 3481–

*Chemical Engineering Communications,* Vol.162, pp. 63-74.

*Control Theory and Applications*, Vol.145, No.5, pp. 392–396.

Margins. *Automatica*, Vol.34, No.9, pp. 1145–1149.

*Theory and Applications,* Vol.144, pp. 334–346.

very satisfactory performance of the closed-loop system.

**8. Conclusions** 

**9. References** 

1284.

pp. 91-113.

265–269.

3493.

case, the PM tuning method is used with a specification *PMdes*=0.15 rad. The obtained controller is presented in Table 6. Figures 9a and 9b, show the set-point step response from 6.5mm to 7.5mm and the regulatory control around the operating point *x0*=7mm using the new controller. Clearly, the obtained responses are significantly faster, as it was expected from the design of the PID controller (smaller *τIm*, larger *KCm*). Moreover, in the case of regulatory control the maximum error produced in the present case is significantly smaller (at least three times smaller) than the maximum error produced when the robust controller is used.

Fig. 8. Position response of MagLev system using the robust controller designed with the GM-method: (a) Set-point response and (b) Load step response (current load disturbance amplitude 20% or 0.2 A).

Fig. 9. Position response of MagLev system using a fast controller designed with the PMmethod. Other legend as in Fig. 8.
