A Randomized Algorithm for Optimal PID Controllers

A randomized algorithm is suggested for the syntheses of optimal PID controllers for MIMO coupled systems, where the optimality is with respect to the H∞-norm, the H2-norm and the LQR functional, with possible system-performance specifications defined by regional pole-placement. Other notions of optimality (e.g., mixed H2/H∞ design, controller norm or controller sparsity) can be handled similarly with the suggested algorithm. The suggested method is direct and thus can be applied to continuous-time systems as well as to discrete-time systems with the obvious minor changes. The presented algorithm is a randomized algorithm, which has a proof of convergence (in probability) to a global optimum.


Introduction
Proportional Integral Derivative (PID) controllers are the most widely-used controllers in industry despite of many new results in control theory that have been achieved in recent years.This is because in many cases PID controllers achieve close to optimal performance, because it is hard to compete with their investment-to-profit ratio and because of their well-understood influence on the closed-loop system behavior, as well as the availability of many tuning procedures for various performance objectives, at least for SISO systems or MIMO systems that can be well decoupled.Often, the performance achieved by PID controllers can be significantly improved by using more effective design techniques.Therefore the field of PID controllers is an on-going active field of research.A review of most recent techniques for tuning and designing PID-based control structures, together with methods for assessing their performance is presented in [1].In [2] optimal decentralized MIMO PID controller design for a benchmark MIMO distillation column models is carried out using a Modified Firefly Algorithm (MFA), where the optimality is with respect to an objective function which is a weighted combination of the L 1 -norm and the L 2 -norm of the tracking error, with respect to a reference signal.
Tuning of MIMO coupled systems PID controllers is much more challenging than tuning PID controllers for SISO system or decoupled MIMO systems, because of the number of parameters and because they should be tuned all at once, since otherwise, tuning each channel separately might end up in a very poor performance of the whole system or even destabilize the whole system.In [3] the need for effective methods for the design of PID optimal controllers for MIMO coupled systems that cannot be well approximated by second-order systems, was raised.In [4] the parametrization of all the solutions of the standard H ∞ control problem is used to obtain Bilinear Matrix Inequalities (BMI's) constraints on the PID gains for each frequency.Next, for each frequency, Linear Matrix Inequalities (LMI's) restricted constraints for a stabilizing PID gain are derived from the BMI constraints.Finally, the set of LMI's for a chosen finite set of frequencies are solved by the Iterated Linear Matrix Inequalities (ILMI) method.The sequence is shown to converge to a local optimum.In [5] a method for MIMO coupled systems PID controller design for stable plants (given by transfer function at an appropriate set of frequencies) is represented.The method relies on solving a sequence of SDP's, but it cannot guarantee finding a globally optimal design.
In this article, we suggest a randomized algorithm for PID optimal controllers.The algorithm is based on the known reduction of [3] to the Stabilizing Static-Output-Feedback (SOF) problem, which is then solved by the Ray-Shooting Method, where the method is used both for the search for feasible starting SOF and for the optimal SOF (see [6][7][8] for some applications of the method).
A closely related approach to ours is given in [9] where the problem is first reduced to the SOF problem, by the reduction of [3] and by using a descriptor system representation of the augmented system (in order to bypass the feasibility condition that I − K3 C 2 B 2 should be invertible-see the following).Next, the search problem of a starting stabilizing SOF controller is solved via the ILMI approach.Finally, a Bounded-Real Lemma version for descriptor systems is used in order to get a set of Quadratic Matrix Inequalities (QMI's) that their solution guaranties a γ suboptimal H ∞ gain.The last can be solved by the ILMI method (without a proof of convergence).The method of ILMI was discussed in many articles (see [3,[10][11][12]).Unfortunately, the ILMI method needs a good starting point and has no proof of convergence in general.
Another closely related approach is given in [13] where the 2-Degree of Freedom PID (2-DOF-PID) problem is reduced to the SOF problem, which in order to incorporate the optimization problem of γ suboptimal H ∞ gain, is reformulated as a set of BMI's, where the last is solved via standard BMI solvers.
Many problems can be reduced to the SOF problem, imposing structural or other constraints on the controllers.These include the reduction of the minimal-degree dynamic-feedback problem and robust or decentralized stability via static-feedback (see [14,15], resp.).The design problem of remote digital PID controllers formulated as robust SOF problem for discrete-time Networked Control Systems (NCS), subject to time-delays and randomly missing-data is considered in [16].A formulation of the reduced-order H ∞ filter problem as constrained SOF problem, is considered in [17].Unfortunately, the SOF problem with bounded entries or other structural constraints is known to be NP-hard (see [14,18]).Therefore, minimal-gain SOF with bounded entries is obviously NP-hard problem.Exact Pole-placement and simultaneous and robust stabilization via SOF are also NP-hard (see [14,19], resp.).Thus, practically, one should expect that only approximation or randomized algorithms will be able to cope with these problems.
The article is organized as follows: In Section 2 we define the feasibility problem of PID controllers and the specific reduction to the SOF problem that will be used.In Section 3 we define the PID controller optimization problems where the optimality is with respect to the H ∞ -norm, the H 2 -norm and the LQR functional, with possible regional pole-placement.In Section 4 we describe the suggested randomized algorithm and finally, in Section 5 we give a real-life example for each one of the above-mentioned optimization problems.
The notions are standard.By (z) and (z) we denote the real and imaginary parts of z ∈ C, resp., where by C − we denote the left half-plane.For a matrix Z we denote by Z T its transpose and by Z we denote the conjugate matrix.By Z * we denote conjugate-transpose of Z.By Z + we denote the Moore-Penrose pseudo-inverse of Z, where by L Z and R Z we denote the left and right orthogonal projections I − Z + Z and I − ZZ + , resp..For a square matrix Z, we denote by σ (Z) the spectrum of Z and by trace (Z) we denote the trace of Z.For matrices Z, W we denote by Z ⊗ W the Kronecker product.By Z we denote the spectral norm of Z, i.e., the largest singular value of Z, where by Z F we denote its Frobenious norm, i.e., (trace (Z * Z)) 1 2 .For matrices Z, W with the same size, we denote by Z, W F = trace (W * Z) the Frobenious inner product.For a vector v we denote by v its Euclidean norm ∑ j v j 2 1 2 .By vec (Z) we denote the vector obtained from the matrix Z by chaining all its columns to a single column.By mat we denote the inverse function of vec.For a transfer function T (s) analytic in the open right half-plane, we denote by T H ∞ its H ∞ norm where T H ∞ = ess − sup ω∈R T (jω) and by T H 2 we denote its H 2 norm where For a set X in a topological space, we denote by X its closure and by int (X) its interior.For two sets X, Y we denote by CH (X, Y) the convex-hull of X and Y, i.e., the minimal closed convex set that contains X ∪ Y.

The Problem of Stabilization via PID Controllers
Let a system be given by: where x is the state, z is the regulated output, y is the measurement, u is the control input and w is the noise.Assume that D 2,1 = 0 and let where r (t) is the new reference input.Let x (t) = x (t) t 0 y (τ) dτ be the augmented state, then: implying that: where: Let ẑ (t) = z (t) then, the augmented system is given by: Once that a stabilizing SOF matrix K = K1 K2 K3 for the augmented system (1) has been found, we have K D = M K3 .Thus, M = I + M K3 C 2 B 2 from which we conclude that: Finally, we have: We conclude that the stabilization problem via PID controller is reducible to the stabilization via SOF problem, with the constraint that I − K3 C 2 B 2 is invertible.In the following we will assume that the couples Â, B2 and ÂT , ĈT 2 are controllable, in order to make the task of finding a feasible starting SOF K easier.
Remark 1. Please note that although the method relies on a specific known state-space model of the plant, it does not require an exact model, since the modeling errors can be included in the dynamic uncertainty and they can be taken into account by selecting a nominal model with a suitable weighting function (see [20]).In any case, after designing a PID controller for the nominal model, its performance should be checked on the non-linear plant model.Note also that the requirement that I − K3 C 2 B 2 should be invertible is not a problem since that if a stabilizing SOF K exists, there exist an open neighborhood of it where all the members are stabilizing SOF's, where on the other hand, the set of all matrices that does not satisfy the invertibility condition has measure 0. Remark 2. Since the problem of SOF is (polynomial-time) reducible to the PID controller problem (by restriction to K I = 0, K D = 0), therefore the PID controller problem is as hard as the SOF problem.Since the SOF problem with structural constraints (on K P ), or the problem of exact pole-placement via SOF are NP-hard, it follows that these problems with PID controllers are NP-hard.We therefore conclude that unless P = NP, no deterministic polynomial-time algorithm can solve these problems and we therefore are led to use randomization with the hope that randomized algorithms will be able to cope more efficiently with these problems.

Statement of the Problem
The H ∞ and H 2 norm minimization relates to the transfer function T ŵ, ẑ (s) from the noise ŵ to the output ẑ (when the reference signal r is zero and the system is derived only by the noise).The transfer function is given by: In order that the H 2 -norm of T ŵ, ẑ (s) would be finite, we need that D1,1 = 0. We therefore have the following lemma (given without a proof): Lemma 1.We have: if and only if: In this case, the set of all matrices K3 satisfying ( 4) is given by: where Z is arbitrary matrix with the same size as K3 .
For the LQR minimization, we assume that ŵ (t) = 0 and r (t) = 0, i.e., the system is derived by the initial state x0 := x (0) (initial step input).Assume that a SOF K was found, such that Âc K := Â − B2 K Ĉ2 is stable.Let the LQR functional be defined by: where Q > 0 and R ≥ 0. Let Ĉ K := Ĉ1 − D1,2 K Ĉ2 .Then, ẑ (t) = Ĉ K x (t) and substitution of the last into (7) yields where P K > 0 is the unique solution to the Lyapunov equation given explicitly by Thus, we look for SOF K that minimizes the functional J x 0 , K = xT 0 P K x0 .When x0 is unknown, we seek a SOF K for which is minimal.In this case, we get a robust LQR via SOF, in the sense that it minimizes J x0 , K for the worst possible (unknown) x0 .Please note that and that there exists x0 = 0 for which equality holds.Therefore 2 ≤ σ max K , with equality in the worst case.
Let Ω denote a subset of C − , which is symmetric with respect to the x-axis, containing a positive length segment of the real axis, with some neighborhood of it, and such that Ω = int (Ω) (i.e., Ω is the closure of its interior).Let S q×r denote the set of all matrices K ∈ R q×r , such that Âc K is stable, i.e., σ Âc K ⊂ C − .By S q×r Ω , we denote the set of all matrices K ∈ R q×r , such that σ Âc K ⊂ Ω.In this case, we say that Âc K is Ω-stable (or, the augmented system (1) is Ω-stable).In the sequel, we will occasionally write S Ω instead of S q×r Ω , when it is clear what the size of the related matrices is.Please note that S Ω is a closed set, since Ω is closed and that S Ω has nonempty interior (if it is nonempty) since Ω has nonempty interior.
Under the assumptions that D 2,1 = 0 and that Â, B2 , ÂT , ĈT 2 are controllable (and the additional assumption (5) when dealing with the H 2 -norm minimization), for the PID controller problem with minimal H ∞ -norm, we need to solve: where T ŵ, ẑ is given by (3).For the PID controller problem with minimal H 2 -norm, we need to solve: K3 has the structure (6) where T ŵ, ẑ is given by (3) and, for the PID controller problem with minimal LQR functional-value, we need to solve: where σ max K is given by (11).

The Suggested Algorithm
Assume that K(0) ∈ int (S Ω ) q×r was found by the Ray-Shooting algorithm ( [6]) or by any other method (see [21][22][23]).We assume that I − K(0) 3 C 2 B 2 is invertible (and in addition, we assume that K(0) 3 has the form (6) for some initial matrix Z (0) , when dealing with the H 2 -norm minimization).Let h > 0 and let U (0) be a unit vector w.r.t. the Frobenius norm, i.e., U (0) and let L be the hyperplane defined by L (0) + V, where V, U (0) where B (0, ) denotes the closed ball centered at 0 with radius (0 < ≤ 1  2 ), with respect to the Frobenius norm on R q×r .Let D (0) = CH K (0) , R ∞ ( ) denote the convex-hull of the vertex K(0) with the basis R ∞ ( ).Let S (0) Ω = S Ω ∩ D (0) and please note that S (0) Ω is compact (but generally not convex).We wish to minimize a continuous function f K over the compact set S Ω ∩ B K(0) , h .Let K * denote a point in S Ω ∩ B K(0) , h where a global minimum of f K is accepted.Obviously, K * ∈ D (0) , for some direction U (0) , as above.When dealing with the H 2 -norm minimization, and if then, the directions will be constrained to have the form , in order that L (0) would have the form (6). We will also restrict V as we have restricted U (0) , in order that any element of L would have the structure (6).
The suggested Algorithm 1 goes as follows: We start with a point K(0) ∈ int (S Ω ), found by the Ray-Shooting algorithm [6].Assuming that K * ∈ D (0) , the inner-loop (j = 1, . . ., n) uses the Ray-Shooting Method in order to find an approximation of the global minimum of the function f K over S (0) Ω -the portion of S Ω bounded in the cone D (0) .The proof of convergence in probability of the inner-loop and its complexity can be found in [6] (see also [7]).In the inner-loop, we choose a search direction by choosing a point F in R ∞ ( ) -the base of the cone D (0) .Next, in the most inner-loop (k = 1, . . ., s) we scan the ray K (t) := (1 − t) K(0) + tF and record the best controller on it.Repeating this sufficiently many times, we reach K * (or an -neighborhood of it) with high probability, under the assumption that K * ∈ D (0) .In [8] it was shown that by taking h = r ∞ and m = e • √ 2π iterations in the outer-loop (where := qr), we have K * ∈ D (0) almost surely.Specifically, when ≥ 12, it was suggested to take m = 2 and × orthogonal matrix U = u 1 u 2 • • • u , and to take the directions U (0) j = ±mat u j , j = 1, . . ., in the outer-loop.The outer-loop (i = 1, . . ., m) is used instead of executing the Ray-Shooting algorithm again and again, by taking K(best) as the new vertex of the search cone instead of K(0) .The replacement of K(0) can be avoided if r ∞ is chosen sufficiently large.The replacement of K(0) by K(best) can be considered as a heuristic step, which is made instead of running the Ray-Shooting algorithm many times in order to generate "the best starting point", which is relevant only if we actually evaluate f K on each such point and take the point with the best value as the best starting point.Since in any case, we evaluate f K in the main algorithm, we could avoid the repeated execution of the Ray-Shooting algorithm.The outer-loop is similar to what is done in the Hide-And-Seek algorithm (see [24,25]).The convergence in probability of the Hide-And-Seek algorithm can be found in [26].

Algorithm 1 Optimal PID controller randomized algorithm
Require: An algorithm for deciding Ω-stability and an algorithm for computing f K .
Input: K(0) such that Âc K(0) is Ω-stable and I − K(0) 3 C 2 B 2 is invertible (with the needed structure ( 6) if H 2 -norm minimization is sought), > 0, r ∞ > 0, h > 0 and integers m, n, s.Output: K * that globally minimize f K (or within distance from a global minimum of f K ) in h-radius closed-ball centered at K(0) . 9.
for j = 1 to n do 10.choose F ∈ R ∞ ( ) uniformly at random 11.
for k = 1 to s do C 2 B 2 would be invertible.Indeed, one can execute the algorithm without this condition, i.e., execute the algorithm from an infeasible point.Note also that during the optimization in the main loop of Algorithm 1, we do not check this feasibility condition and we may pass to a better point which might not be feasible, because such points might lead to a better feasible points.This is made because the set of non-feasible points has measure 0 and thus, we should not be disturbed by the possibility of temporarily stepping on infeasible points, during the search.The feasibility condition is checked at the end of Algorithm 1 and experience with the algorithm shows that almost always we end up with a feasible point, when we start from a feasible point (which is almost always the case, if K(0) was found).

Experimental Section
To synthesize LQR or H ∞ optimal PID controller, we execute the Ray-Shooting algorithm ( [6]) in order to get a starting SOF K(0) such that the augmented system (1) is Ω-stable and I − K(0) 3 C 2 B 2 is invertible.Next, we apply Algorithm 1 in order to get K(best) from which the PID controller is derived, using (2).For the H 2 optimal PID controller, we execute the Ray-Shooting algorithm, in order to get a starting SOF K(0) , as above.Next, we execute the algorithm from [7], in order to get a SOF K(1) with the structure ( 6).This step is the most demanding step as can be seen from the following example.Finally, we execute Algorithm 1 in order to get K(best) from which the PID controller is derived, using (2).
Example 1.For the AC1 system (taken from COMPl e ib-see [27][28][29]) with the following state-space model: , let the objective be to find a PID LQR-optimal controller, where the closed-loop eigenvalues should be in the rectangular region defined by: With the following parameters for the algorithm: m = 100, n = 100, s = 100, h = r ∞ = 100, = 10 −16 , Q = I 8 , R = I 2 we had the following feasible SOF Example 2. For the same system as in Example 1 with the objective to find a PID H ∞ -norm optimal controller, where the closed-loop eigenvalues should be in the same rectangular region Ω, starting from the same K(0) with f H ∞ K(0) = 0.095033139822324, we had Example 3.For the system from Example 1, with the same Ω and the same K(0) , the algorithm from [7] failed to find structured SOF K(1) .Indeed, from another starting SOF, the above-mentioned algorithm succeeded to find a structured SOF.For found by the Ray-Shooting algorithm from [6], in CPU − time = 0.0001[sec], applying the algorithm from [7] we have found the structured SOF where 3 obtained from the structural constraints).Finally, executing Algorithm 1 with K(1) as a starting SOF, we have found

Concluding Remarks
In this article, a randomized method for synthesizing PID optimal controllers (for the standard LQR, H ∞ and H 2 optimization problems) for coupled MIMO systems was introduced.The method is based on a (direct) reduction of the problem to the problem of SOF (occasionally with some structure).The randomization circumvents the need to solve any SDP or BMI programs.Therefore, the method can be applied to more involved PID controller design that can be formulated as structured SOF problems, e.g., the design of 2-DOF-PID controllers and robust and gain-scheduled PID controllers for Linear Parameter Varying (LPV) systems (see [13]), without the need to solve any BMI programs and thus can be applied to larger systems.Moreover, the method has a proof of convergence (in probability) to a global optimum of the objective function.