Randomized Algorithms and their application to renewable energy systems

Randomized Algorithms and their application to renewable energy systems

Randomized Algorithms and their application to renewable energy systems A.Luque ∗ T. Alamo ∗ ∗ Departamento de Ingenieria de Sistemas y Automatica. Es...

788KB Sizes 2 Downloads 125 Views

Randomized Algorithms and their application to renewable energy systems A.Luque ∗ T. Alamo ∗ ∗ Departamento de Ingenieria de Sistemas y Automatica. Escuela Superior de Ingenieros de Sevilla. Camino de los Descubrimientos, s.n. 41092 Sevilla. ([email protected])

Abstract: In this paper we show how randomized algorithms can be applied to the design of a robust controller. The design objective consists on the problem of finding a controller such that guarantees a proper behavior in front of uncertainties, taking into account the worst possible situation (robust solution). A randomized algorithm that provides a probabilistic solution is proposed. The proposed strategy is applied to the control of the hot water production system installed at the University Hospital ”Virgen del Rocio” (Seville, Spain). Keywords: Randomized algorithms, uncertain system, sample size 1. INTRODUCTION The presence of uncertainty in systems description has always been recognized as a key issue in control theory and its applications. From the beginning of the 80’s, different approaches to the problem based on the direct characterization of the plants uncertainties have been proposed (Alamo 2007, Alamo 2009). The design objective consists, then, on the problem of finding a controller such that it guarantees a proper behavior in front of uncertainties, taking into account the worst possible situation (robust solution). Usually, the design parameters, in addition to other auxiliary variables, are parameterized through the use of a vector containing the decision variables θ, called ”design parameter”, restricted to a design set. On the other hand, uncertainty is characterized in terms of a bounded set W . Anyway, the problems related to the design of robust controllers are in many situation intractable from a computational point of view. For this reason some relaxation methods have recently been proposed. In any case, an approach like this one often results in a quite conservative design (Alamo 2009). To solve these problems, an alternative approach is assuming that the plant uncertainties have a probabilistic nature. In this way, it is possible to fomulate design problems in which the main objective is to satisfy the control specifications with high probability. In this way it could be possible the use of a randomized algorithm to obtain, usually in a polynomial time, a solution that satisfies the required properties. The techniques based in randomized algorithms are now fully accepted as an useful tool, effective in approaching control problems computationally complex (Vidyasagar 1998, Tempo 2005). Specifically, this

Fig. 1. Approaches to controllers design approach is useful in the design of controllers satisfying the problem constraints with high probability. We address to semi-infinity problems (not necessarily convex) that deal with the design of uncertain systems. These problems are called semi-infinity because they are subject to an infinity number of constraints, but the number of decision variables is finite. In particular, we consider a binary measurable function g : Θ × W → {0, 1} useful to formulate the specific design problem under consideration (see Alamo 2009 for more details). Semi-infinity feasibility problem: Find θ, if it exists, in the feasible set {θ ∈ Θ : g(θ, w) = 0, for every w ∈ W }. Semi-infinity optimization problem: If the feasible set is not empty, find the optimal solution to the problem min J(θ) subject to g(θ, w) = 0, for every w ∈ W. θ∈Θ

where J : Θ → {−∞, ∞} is a measurable function.

Some robust design problems are very difficult to solve because in many situations the equality g(θ, w) = 0 is not a convex constraint in the decision variable θ. Moreover, the W set has infinite cardinality. A way of dealing with this issue is the use of randomization. In this work a randomized strategy will be presented. An algorithmic procedure to follow for the design of robust controllers in problems with uncertainty will be proposed. In what follows a real application of controller design with this technique will be shown, we will present some results and will compare with other techniques of robust design. 2. RANDOM STRATEGY We assume that we have a probability measure P r(W ) on the sample space W . Given W , it is said that an independent sample set identically distributed (iid) w = {w(1) , ..., w(N ) } from W belongs to the Cartesian product W N = W × W (N times.) Moreover, if all w of N iid samples w = {w(1) , ..., w(N ) } is generated from W under the probability measure P rW , then the multisample W is extracted according to the probability P rWN .

Given θ ∈ Θ, it is often hard to get the exact value of the probability of violation Eg (θ) since it requires solving a multiple integral. In any case, its value can be approximated using the concept of empirical mean. For a given θ ∈ Θ, the empirical mean of g(θ, w) with respect to the multisample w = {w(1) , ..., w(N ) } is defined as N X ˆg (θ, w) := 1 E g(θ, w(i) ). N i=1

ˆg (θ, w) is a random variable. Clearly, the empirical mean E ˆg (θ, w) is always in the Since g(., .) is a binary function, E closed interval [0, 1]. As discussed above, the empirical mean can be used to make a random approach to solving the considered semi-infinite general problems (Vidyasagar 1998, Tempo 2005). B. Random Feasibility and Optimization Problems Given a probability measure P rW on the sample space W and a level ρ ∈ [0, 1), consider the following random strategy (1) Get N i.i.d. samples w = {w(1) , ..., w(N ) } according to the probability P rW . (2) Find (if possible) a feasible solution θ ∈ Θ for the constraint ˆg (θ, w) ≤ ρ E (3) If a feasible solution exists, solve the optimization problem: ˆg (θ, w) ≤ ρ, min J(θ) subject to E θ∈Θ

Fig. 2. Random sampling Accuracy, confidence and level of restriction (or level) are denoted by ε ∈ (0, 1), δ ∈ (0, 1) and ρ ∈ (0, 1) respectively. For x ∈ <, x > 0, bxc denotes the largest integer less than or equal than x, ln(.) is the natural logarithm and e is the constant of Euler. A. Probability of violation and empirical mean

Problems (2) and (3) are denoted ”Random feasibility” and ”Random optimization,” respectively. Note that considering a level ρ greater than zero extends the types of problems that can be addressed with the proposed methodology. Moreover, taking ρ > 0 allows dealing with ˆg (θ, w) ≤ ρ, while probabilistic constraints (soft) type E deterministic constraints (hard) can be incorporated into the definition of the set Θ of the decision variables. It is noted that the random optimization problem is computationally difficult and its solution requires the development of specific techniques and algorithms. The approach presented in this paper are applicable to any suboptimal solution to the problem (3). C. Probability of failure of the algorithms

Definition 1: [probability of violation] Consider a probability measure P rW on the sample space W and let θ ∈ Θ be given. The probability of violation of θ for the function g : Θ × W −→ {0, 1} is defined as

Denote by A the particular algorithm used to address the problems (2) and (3) of ”Random feasibility” and ”Random optimization”. The probabilistic properties of the resulting solution obtained through a random approach will be largely determined by the specific characteristics of A. Given a set of independent samples N identically distributed (iid) w = {w(1) , ..., w(N ) } taken according to the probability P rW , and the level parameter ρ, the algorithm A provides a subset of Θ, denoted A(w, ρ), which ˆg (θ, w) ≤ ρ. That is satisfies the constraint E

Eg (θ) := P rW {w ∈ W : g(θ, w) = 1}

ˆg (θ, w) ≤ ρ}. A(w, ρ) ⊆ {θ ∈ Θ : E

Given θ ∈ Θ, there may be a fraction of elements of W for which the restriction g(θ, w) = 0 is not satisfied. This concept is rigorously formalized through the notion of ”probability of violation”, which is introduced below (see, for example, Alamo 2009).

The set A(w, ρ) will be empty when the algorithm fails to obtain an element of Θ that satisfies the constraint on the empirical mean. In some cases, A(w, ρ) has an unique element corresponding to the optimal solution of the random optimization problem. In other situations, A(w, ρ) is a set of feasible solutions, perhaps sub-optimal for the problem. The probabilistic properties of the solutions obtained by the random strategy depending on the sample size N and assuming that the algorithm that uses only a finite number of possible controllers will be analyzed. This is what in the literature is called a finite family approach (Alamo 2010). In the presented random strategy, it is interesting to addres the following question: after taking N samples iid w = {w(1) , ..., w(N ) } according to the probability P rW and given ρ ∈ [0, 1) and ε ∈ (0, 1), suppose that the algorithm A gives a not empty set A(w, ρ). Then, what is the probability that an element of this set A(w, ρ) has a probability of failure greater than ρ + ²?. To answer this question the formal definition of algorithmic probability of failure is introduced. Definition 2: [algorithmic probability of failure] Given N, ρ ∈ [0, 1), ε ∈ (0, 1), g : Θ × W −→ {0, 1} and the algorithm A, the algorithmic probability of failure, denoted as pA (N, ρ, ε) is defined as: pA (N, ρ, ε) := P rWN {w ∈ W N : There is θ ∈ A(w, ρ) such that Eg (θ) ≥ ρ + ε}. 3. ALGORITHMIC PROBABILITY OF FAILURE FOR FINITE FAMILIES The design objective consists on the problem of finding a controller such that guarantees a proper probabilistic behavior in front of uncertainties. A randomized algorithm that provides a probabilistic solution will be proposed. Definition 3: It is said that A is a finite family algorithm nA if there exists a subset ΘA ⊆ Θ of cardinality not greater than nA such that for each ρ ∈ [0, 1) and each multisample w, A(w, ρ) ⊆ ΘA . Property 1: Suppose that A is a finite family algorithm with cardinality nA . Then, given ρ ∈ [0, 1), ε ∈ (0, 1), bρN c µ

pA (N, ρ, ε) ≤ nA

X i=0

N i

¶ (ρ + ε)i (1 − ρ − ε)N −i

Moreover, pA (N, ρ, ε) ≤ δ if N≥

ln( nδA )

ρ 1−ρ ) + ρ ln( ρ+ε ) (1 − ρ) ln( 1−ρ−ε

.

The proof is not shown in this article due to space limitations. In case you are interested, please contact the authors, or see Alamo 2010 for a similar result. This expression gives the number N of iid samples to be taken in the context of an algorithm with cardinality nA ,

so that the level of constraint is ρ ∈ [0, 1), the accuracy is ε ∈ (0, 1) and confidence is δ ∈ (0, 1).

Fig. 3. Random sampling Therefore, in problems with uncertainties, the procedure to follow for designing a controller could be: (1) Consider a finite family of possible controllers Θ in which each possible controller θ (θ ∈ Θ) have r parameters to be adjusted. Each of these parameters r take s possible values within a finite family. Therefore, the cardinality of the problem is determined as nA = sr . (2) Choose a desired constraint level ρ ∈ [0, 1). (3) Choose a desired accuracy ε ∈ (0, 1). (4) Choose a desired confidence δ ∈ (0, 1) (5) Draw, according to P rWN the multisample w = {w(1) , ..., w(N ) }, where ln( nδA ) . N≥ ρ 1−ρ ) + ρ ln( ρ+ε ) (1 − ρ) ln( 1−ρ−ε (6) Select the controller with the best performance on these N samples, using the following strategy. (a) Find (if possible) a feasible solution θ ∈ Θ for the constraint ˆg (θ, w) ≤ ρ. E That is, being Θ the set of possible controllers, determine if there is a controller θ ∈ Θ that meets the control specifications for no less than (1 − ρ) · 100% of the N samples. (b) If there is a feasible solution, solve the optimization problem ˆg (θ, w) ≤ ρ. min J(θ) subject to E θ∈Θ

That is, determine (probably suboptimally) the

controller θb such that minimizes the criterion J(θ). (7) The proposed method states that the probability that b satisfies Eg (θ) ˆ ≤ ρ + ε is the chosen controller θ, greater or equal than 1 − δ. 4. APLICATION This technique has been applied to the hot water production system (Berenguel 1997) installed at the University Hospital ”Virgen del Rocio”. These facilities include those in the covers of Women’s Hospital, the cells on the outside near the northern wing of the sub-basement of the building, and the engine room at basement of Women’s Hospital, and it attends the Women’s Hospital and the Children’s Hospital consumption. The general outline of the plant consists of two separate circuits, the so-called ”primary circuit or charging” and the so-called ”secondary or discharge circuit”. There is a distributed solar collector field on campus, which has 330,000 square meters construction. A simplified scheme of the plant is shown in the picture below.

cardinality of the problem is determined as nA = 102 = 100. (2) Choose a desired constraint level ρ = 0.1 ∈ [0, 1). (3) Choose a desired accuracy ε = 0.05 ∈ (0, 1). (4) Choose a desired confidence δ = 10−4 ∈ (0, 1) (5) Draw, according to P rWN the multisample w = {w(1) , ..., w(N ) }, where N≥

ln( nδA )

ρ 1−ρ ) + ρ ln( ρ+ε ) (1 − ρ) ln( 1−ρ−ε

.

For these parameters, N ≥ 1692, 94 samples are required. (6) Select the controller with the best performance on these N samples, using the following strategy. (a) Find (if possible) a feasible solution θ ∈ Θ for the constraint ˆg (θ, w) ≤ ρ. E That is, being Θ the set of possible controllers, determine if it exists a controller θ ∈ Θ that meets the control specifications for no less than (1 − ρ) · 100% of N samples.We seek a bound for the integral of the error so that only the ρ = 10% of the plants exceed it. (b) If there is a feasible solution, solve the optimization problem ˆg (θ, w) ≤ ρ, min J(θ) subject to E θ∈Θ

that is, determine (probably suboptimally) the controller θb such that minimizes the criterion J(θ). Since there is a feasible solution, find the controller that minimizes this bound. Fig. 4. Simplified scheme of the plant The energy interchange between the subsystems is done through water flows that carry heat energy (Incropera 2000). The plant receives solar radiation and a certain water flow as inputs. The goal, as stated above, is to maintain the flow of water consumption in a given temperature setpoint (about 60 ◦ C). A controller for this application of 2 parameters (a PI) has been designed, following the procedure shown in the preceding paragraph for the adjustment of robust controllers. (1) Consider a finite family of possible controllers Θ in which each possible controller θ ∈ Θ has 2 parameters to be adjusted. Each of these parameters take 10 possible values within a finite family. Therefore, the

(7) Choose the controller with the best performance in the imposed constraint (in this case (Kc = 450, Ki = 60). The proposed method states that the probability b satisfies Eg (θ) ˆ ≤ ρ+ε that the chosen controller θ, is greater or equal than 1 − δ. A PI controller has been tuned for our plant according to the criterion of minimizing the integral of error for a number of plants N = 1700 which guarantees that the integral is kept within a certain bounds, as demonstrated in the preceding paragraph. The PI is obtained with parameters Kc = 450 and Ki = 60. The driver has been tested for a non-nominal plant with uncertainties and disturbances generated at random, and the obtained behavior is shown in Figure 5.

This design proposes a continuous controller, which is then converted into a discrete one for implementation. The sampling time for conversion is chosen so that it is an order of magnitude smaller than the time constant in our system. To compare this controller with the PI controller, 100 plants were chosen at random, and the integral of error was computed for both controllers. The obtained result is shown in figure 8.

Fig. 5. Bound of the integral error 5. COMPARISON OF THE PROPOSED CONTROLLER WITH AN H INFINITY CONTROLLER An H infinity controller has been designed by the method S / KS / T (Rodrguez 1996). The first step is to properly scale the plant. From here a sensitivity function is designed and taken as upper bound of the multiplicative uncertainty (see figures 6 and 7 for more details).

Fig. 8. Comparison of the proposed controller with an H infinity controller (see PI in red and H infinity in blue). This comparison illustrates similarities in terms of the integral error in the performance of both controllers. There exist also differences in their performance (specially in presence of quick changes). ACKNOWLEDGEMENTS The authors thanks the MCYT-Spain and the European Commission which funded this work under Projects DPI2007-66718-C04-01 and FP7-223866, respectively. The authors are very grateful to Roberto Tempo, not only for having introduced them to this exciting and promising field of research, but also for the enriching discussions.

Fig. 6. Upper bound of the uncertainty

Fig. 7. Complementary sensitivity function

REFERENCES T. Alamo, R. Tempo, D. Rodr´ıguez, and E.F. Camacho. A sequentially optimal randomized algorithm for robust LMI feasibility problems. In Proceedings of the European Control Conference, 2007 , Kos, Greece, July 2007. T. Alamo, R. Tempo, and E.F. Camacho. Randomized strategies for probabilistic solutions of uncertain feasibility and optimization problems IEEE Transactions on Automatic Control, accepted for publication, 2009. T. Alamo, R. Tempo, and A.Luque. On the Sample Complexity of Probabilistic Analysis and Design Methods S. Hara et al. Perspec. in Math. Sys. Theory, Ctrl. and Signal Process. LNCIS 398, pp. 3950. Springer-Verlag Berlin Heidelberg 2010. Manuel Berenguel Soria, Eduardo Fern´andez Camacho, Francisco Rodr´ıguez Rubio. Advanced Control in Solar Plants. Londres. Springer-Verlag. 1997. H. Chernoff. A measure of asymptotic efficiency for tests of a hypothesis based on the sum of observations. Annals of mathematical statistics, 23:493–507, 1952.

Incropera, Frank P. DeWitt, David P. Fundamentos de transferencia de calor Prentice-Hall. 2000. B.T. Polyak and R. Tempo. Probabilistic robust design with linear quadratic regulators. Systems & Control Letters, 43:343–353, 2001. F.R. Rubio y M.J. L´øpez. Control adaptativo y robusto. Secretariado de Publicaciones de la Universidad de Sevilla, 1996. M. R. Arahal, M. Berenguel y F. Rodr´ıquez T´ecnicas de predicci´on con aplicaciones en ingenier´ıa. 2006. R. Tempo, E.-W. Bai, and F. Dabbene. Probabilistic robustness analysis: explicit bounds for the minimum number of samples. Systems & Control Letters, 30:237– 242, 1997. R. Tempo, G. Calafiore, and F. Dabbene. Randomized Algorithms for Analysis and Control of Uncertain Systems. Communications and Control Engineering Series. Springer-Verlag, London, 2005. V.N. Vapnik. Statistical Learning Theory. John Wiley & Sons, New York, 1998. M. Vidyasagar. Statistical learning theory and randomized algorithms for control. Control Systems Magazine, 18(6):69–85, 1998. M. Vidyasagar. Randomized algorithms for robust controller synthesis using statistical learning theory. Automatica, 37:1515–1528, 2001. Ronald Walpole - Raymond H. Myers - Sharon Myers Probabilidad y estadstica para ingenieros. Prentice Hall