ANÁLISIS Y RESULTADOS
CAPÍTULO 3. LA PARTIDA Y LA INSTALACIÓN: INFLUENCIA DE LOS ITINERARIOS DE VIDA DURANTE LOS PROCESOS DE
3.1. La formación de la decisión de partir
3.1.1. Características e itinerario de vida previo al desplazamiento
We first study the limit behavior of system (3.6) under periodic scheduling and show that it converges to a limit cycle ast→ ∞. Consider some periodic schedule u(·) with time period
δ >0(i.e.,u(·)satisfiesu(t) =u(t+δ)for allt≥0). Letη∈[0,1]m be the utilization vector corresponding to u(·), that isηi:= 1δR0δui(t)dt∈[0,1]. Recall that theaverage system of
(3.6) with respect toη is defined as the autonomous, time-invariant affine dynamical system
˙
x(t) =Ax(t) + (B0+Bη) (3.7)
with state variablex and starting from the same initial state: x(0) =x(0).
The state error ξ(t) :=x(t)−x(t) between system (3.6) and its average system (3.7) is given in Equation (2.14) on page 38 and can be rewritten as
ξ(t) = eA(t−σδ) σ−1 X i=0 eiAδ ! ξδ+ξ(t−σδ). (3.8)
SinceA is Hurwitz,eAδ is Schur and therefore lim
σ→∞Pσi=0−1eiAδ = I−eAδ
−1
=P. The matrix inverse exists because the eigenvalues of I−eAδ
are (1−λj), where λj are the eigenvalues ofeAδ, and hence are non-zero. It follows that as t→ ∞, thusσ =bt/δc → ∞, ξ(t) converges to the trajectory ξˆ(t) given by
ˆ
ξ(t) = eA(t−σδ)P ξδ+ξ(t−σδ). (3.9)
This trajectory is a cycle with periodδ because for anyt≥0, ˆ
ξ(t+δ) = eA(t+δ−σδ)P ξδ+ξ(t+δ−σδ)
and expanding ξ(t+δ−σδ) by Equation (3.8) yields
= eA(t−σδ)eAδP ξδ+ eA(t−σδ)ξδ+ξ(t−σδ)
= eA(t−σδ)eAδP+ Iξδ+ξ(t−σδ)
then using the equality eAδP + I =P gives
Furthermore, because the state x(t) of the average system converges exponentially to the equilibrium x? =−A−1(B0+Bη), x(t) =x(t) +ξ(t) converges to the limit cycle defined by
ˆ
x(t) =x?+ ˆξ(t) ast→ ∞. Similarly, the outputy(t) converges to the limit cycle given by ˆ
y(t) =y?+Cξˆ(t) wherey? =Cx?.
To compute the limit cycles xˆ(t) and yˆ(t) for a given δ-periodic schedule u(·), we observe thatξˆ(t) in Equation (3.9) is the solution of the ordinary differential equation (ODE)
˙ˆ
ξ(t) =Aξˆ(t) +B(u(t)−η), ξˆ(0) =P ξδ. (3.10)
Therefore, it can be computed numerically using any available ODE solver, in two steps: 1. Computeξδ =ξ(δ) by solving the ODE in Equation (2.11) on page 37 for one period; 2. Initializeξˆ(0) =P ξδand solve the ODE (3.10) for one period to obtainξˆ(t)fort∈[0, δ]. Then the limit cycles can be computed easily.
3.3.2. Periodic Green Scheduling Synthesis
In synthesizing periodic schedules for the system, it is necessary to ensure that the entire limit cycle yˆ(t) is inside the safe set Safe, so that the system’s output is driven to and
maintained inside Safe. It is usually desirable to minimize the switching frequency of the
inputu, thus we wish to construct a periodic scheduleu(·) with the largest possible time period δ. Once a feasible peak constraint k ≥kmin has been chosen (cf. Section 2.4.3 on
page 40), the periodic scheduling synthesis can be achieved by solving the optimization: maximize η,δ,u(·) δ subject to η∈[0,1]m, m X i=1 ηi ≤k, δ >0
m X i=1 ui(t)≤k, ∀0≤t≤δ (3.11b) ˆ y(t)∈Safe, ∀0≤t≤δ (3.11c)
However, this optimization is difficult becauseu(·) is infinite dimensional and the limit cycle ˆ
y(t) (constraint (3.11c)) cannot be solved analytically but only numerically. Therefore, we restrict u(·) to the specific form defined in Equation (3.1) and use the same construction method as in Section 3.2.2, so that constraints (3.11a) and (3.11b) can be removed. We then use a search algorithm to maximize δ subject to the remaining constraints. Following are the steps to synthesize a periodic schedule with a given feasible peak constraintk≥kmin. Step 1: Compute utilization
Recall thatyˆ(t) =y?+Cξˆ(t) where y? is the output at the equilibrium x? of the average system. Intuitively, it is desirable to have y? not only insideSafe but also as far as possible
from the boundary ofSafe. Letycbe the Chebyshev center4ofSafe. From the schedulability condition in Theorem 2.6,η can be computed by solving the following optimization problem
minimize η ky ? −yck= −CA−1(B0+Bη)−yc (3.12) subject to η ∈[0,1]m m X i=1 ηi≤k −CA−1(B0+Bη)∈int(Safe)
in which k·k is a vector norm, e.g., Euclidean norm k·k2 or `1-norm k·k1. If Safe is a
hyper-rectangle or a polytope, the last constraint becomes linear (cf. Section 2.4.3), hence the optimization (3.12) is convex and can be solved efficiently (Boyd and Vandenberghe, 2006).
4The Chebyshev center of a bounded setCwith nonempty interior is a point insideC that is farthest
from the exterior ofC and is also the center of the largest inscribed ball ofC. For convex setsC, computing
Step 2: Construct a periodic schedule
Onceη has been computed, a periodic scheduleu(·) of the form in Equation (3.1) can be constructed using the same method in Step 2 in Section 3.2.2 (e.g., Algorithm 3.2). The outcome of this step are the initial delays ri fori= 1, . . . , m. Notice that when the time period δ varies, the constructed scheduleu(·) keeps the same pattern (i.e.,ri andηi for all i) and is only scaled byδ in time.
Step 3: Compute time period δ
This step completes the periodic scheduling synthesis by maximizing the time period δ subject to the constraint (3.11c). Because yˆ(t) can only be computed numerically, there is no analytical solution to this optimization. Instead, we approximate δ using a standard bisection search algorithm presented in Algorithm 3.3 on the next page. In each iteration, the functionSafeLimitCycle(Line 19) is called to compute the limit cycle yˆ(t)for one time period and check whether it is insideSafe. The search function MaxPeriodBisection returns an optimal time periodδ? with specified tolerance >0.
Putting everything together, the scheduling synthesis method is summarized in Algorithm 3.4 on the following page.
Example 3.2 Consider the mass-spring-damper system in Section 1.2.2 on page 8. Suppose that there are no disturbance forces, i.e.,di= 0fori= 1,2. Because the system’s model is in the form of Equation (3.6), we can apply the periodic scheduling synthesis in Algorithm 3.4 to this system. The desirable positions of the masses are0.75≤y1≤0.85and1.15≤y2 ≤1.25,
hence the safe set isSafe= [0.75,0.85]×[1.15,1.25]. Note thatSafeis defined for the output
variablesy (the positions) but not for the state variables x(which include the velocities of the masses). Furthermore,Safe does not contain the equilibriumy?= [23,43]T of the system. By solving the optimization in Equation (3.12), we obtained the utilization vector η = [0.24,0.24]T, which confirms that the system is schedulable becausekηk1= 0.48<1. The
Algorithm 3.3 Maximize Time Periodδ by Bisection Search
Input: parameters (r1, η1), . . . ,(rm, ηm); initial guess δ0 > 0; tolerance > 0; maximal
number of iterationsN.
Output: maximal time periodδ?
1: functionMaxPeriodBisection
2: δ ←0 .lower end point
3: δ ←δ0 . upper end point
4: whileSafeLimitCycle(δ) do 5: δ ←2δ 6: end while 7: i←1 . current iteration 8: whilei < N and δ−δ≥do 9: δ ←(δ+δ)/2 10: if SafeLimitCycle(δ) then 11: δ←δ 12: else 13: δ←δ 14: end if 15: i←i+ 1 16: end while 17: returnδ? ←δ 18: end function 19: functionSafeLimitCycle(δ)
20: Compute limit cycle yˆ(t)for t∈[0, δ]
21: if yˆ(t)∈Safe∀t∈[0, δ]then 22: return true 23: else 24: return false 25: end if 26: end function
Algorithm 3.4 Periodic Scheduling Synthesis for General Affine Dynamics
Input: parameters(A, B0, B, C) of the dynamics; safe setSafe; feasible peak constraint k.
Output: time period δ; parameters(ηi, ri) for eachi= 1, . . . , n. 1: Compute Chebyshev centeryc of Safe
2: Solve optimization problem Equation (3.12) to compute η 3: (r1, . . . , rn)←SequenceTasks(k, η1, . . . , ηn)
0 5 10 15 20 0.6 0.8 1 1.2 1.4 Time (s) P osition (m) y1 y2
(a) Position trajectories of the two masses: the system is safe because the masses are driven to and maintained inside the ranges of desired positions (gray-filled regions). 0 2 4 6 8 10 12 14 16 18 20 0 0.5 1 Time (s) Binary con trol u1 u2
(b) Periodic schedulesu1(·)and u2(·): at any time,
at most 1 of the control forces are activated.
Figure 3.4: Simulation results of the mass-spring-damper system with periodic scheduling in Example 3.2. using Algorithm 3.3 and obtainedδ?= 1.8525s. The computation took154.3ms to complete. A time period δ = 1.5s was chosen and the system was simulated for 20s from the initial statex(0) = [23,0,43,0]T. Its results are reported in Figure 3.4 on this page. The positions of the masses, plotted in Figure 3.4a, were driven to the desired ranges (gray-filled regions in the figure) after about4s. As can be seen in Figure 3.4b which draws the periodic schedules
u1(·) and u2(·), at any time, at most1 of the control forces are activated. 2 Example 3.3 We continue the room-heater running example in Example 3.1 on page 68 but consider the thermal interactions between adjacent rooms. Again, the ambient air temperature Tais constant at 5◦C and there are no internal heat gains for the rooms, i.e.,Qg,i = 0for all i= 1, . . . , n. Applying the periodic scheduling synthesis in Algorithm 3.4 with peak constraint k= 4yielded the utilization vectorη= [0.5597,0.5790,0.5525,0.5395,0.5128,0.5111]T and the maximal time period δ? = 95.15min. The computation took 188.6ms to finish. We chose a time period δ = 60min and simulated the synthesized periodic schedule for 10 hours, starting from the initial temperature 18◦C for all rooms. For comparison, we also simulated the uncoordinated two-position control rule (see Section 1.2.1 on page 5). Their results are reported in Figure 3.5 on the next page. For periodic green scheduling, the room temperatures converged more slowly to the desired temperature range than for uncoordinated scheduling. It is also obvious that the switching frequency induced by periodic scheduling is
0 1 2 3 4 5 6 7 8 9 10 18 20 22 24 Time (h) T emp erature of ro om 1 ( ◦C) Periodic Uncoordinated
(a) Temperature of room 1
0 1 2 3 4 5 6 7 8 9 10 0 10 20 30 40 Time (h) P ow er demand (k W) Periodic Uncoordinated
(b) Aggregated power demand of 6 heaters Figure 3.5: Simulation results of periodic scheduling for the room-heater system with inter-room thermal interactions in Example 3.3. Compared to uncoordinated scheduling, periodic green scheduling reduced the peak demand from39kWto27kW. However, the room temperatures converged more slowly to the desired temperature range and the switching frequency was higher.
higher than that induced by uncoordinated scheduling. However, green scheduling reduced the peak demand, as it is evident in Figure 3.5b, from39kW to27kW – a30.77%saving, and reduced the total energy consumption from 223.62kW h to208.71kW h – a6.67% saving. To demonstrate the scalability of the synthesis method, we scaled the room-heater system to 1000 rooms and 1000 heaters. The computation took 20.93s on MATLAB™ to synthesize
periodic schedules for the heaters. 2