From d9e4a6377b609b0895b157e0685397bd043a392c Mon Sep 17 00:00:00 2001 From: Zdenek Hurak Date: Wed, 30 Oct 2024 10:59:55 +0100 Subject: [PATCH] Built site for gh-pages --- .nojekyll | 2 +- classes_PWA.html | 12 +- .../switched_system_state_driven.png | Bin 0 -> 23254 bytes .../switched_system_time_driven.png | Bin 0 -> 22151 bytes classes_references 6.html | 1164 + classes_reset 6.html | 1502 + classes_reset.html | 136 +- classes_software 9.html | 1110 + classes_switched 6.html | 1511 + classes_switched.html | 266 +- .../figure-html/cell-2-output-1.svg | 18990 ++++++++ .../figure-html/cell-4-output-1.svg | 19110 ++++++++ .../figure-html/cell-5-output-1.svg | 19330 ++++++++ .../figure-html/cell-6-output-1.svg | 38566 ++++++++++++++++ complementarity_constraints 6.html | 1266 + complementarity_references 9.html | 1108 + complementarity_simulations.html | 552 +- complementarity_systems 6.html | 1355 + des_automata 9.html | 3339 ++ des_automata.html | 16 +- hybrid_automata 10.html | 1627 + hybrid_automata_software 9.html | 1090 + hybrid_equations 8.html | 1811 + hybrid_equations.html | 154 +- hybrid_equations_references 8.html | 1096 + hybrid_equations_software 6.html | 1067 + index 6.html | 1051 + intro 6.html | 1178 + intro_outline 9.html | 1100 + intro_references 6.html | 1144 + max_plus_algebra.html | 13008 +++--- max_plus_systems 6.html | 1400 + mld_DHA 9.html | 1190 + mld_intro 9.html | 1451 + mld_references 6.html | 1117 + mld_why 8.html | 1118 + mpc_mld_explicit 9.html | 1202 + mpc_mld_online 6.html | 1134 + mpc_mld_references 9.html | 1088 + mpc_mld_software 9.html | 1062 + petri_nets_references 9.html | 1134 + petri_nets_software 6.html | 1096 + petri_nets_timed 9.html | 1319 + search.json | 29 +- sitemap.xml | 6 +- solution_concepts 6.html | 1216 + solution_references 6.html | 1100 + stability_concepts 6.html | 1224 + stability_recap 9.html | 1251 + stability_software 6.html | 1099 + ...lity_via_multiple_lyapunov_function 9.html | 1417 + verification_barrier 6.html | 2699 ++ verification_barrier.html | 2772 +- verification_intro 8.html | 1062 + verification_reachability 6.html | 1062 + verification_references 9.html | 1129 + 56 files changed, 155585 insertions(+), 8453 deletions(-) create mode 100644 classes_figures/switched_system_state_driven.png create mode 100644 classes_figures/switched_system_time_driven.png create mode 100644 classes_references 6.html create mode 100644 classes_reset 6.html create mode 100644 classes_software 9.html create mode 100644 classes_switched 6.html create mode 100644 classes_switched_files 7/figure-html/cell-2-output-1.svg create mode 100644 classes_switched_files 7/figure-html/cell-4-output-1.svg create mode 100644 classes_switched_files 7/figure-html/cell-5-output-1.svg create mode 100644 classes_switched_files 7/figure-html/cell-6-output-1.svg create mode 100644 complementarity_constraints 6.html create mode 100644 complementarity_references 9.html create mode 100644 complementarity_systems 6.html create mode 100644 des_automata 9.html create mode 100644 hybrid_automata 10.html create mode 100644 hybrid_automata_software 9.html create mode 100644 hybrid_equations 8.html create mode 100644 hybrid_equations_references 8.html create mode 100644 hybrid_equations_software 6.html create mode 100644 index 6.html create mode 100644 intro 6.html create mode 100644 intro_outline 9.html create mode 100644 intro_references 6.html create mode 100644 max_plus_systems 6.html create mode 100644 mld_DHA 9.html create mode 100644 mld_intro 9.html create mode 100644 mld_references 6.html create mode 100644 mld_why 8.html create mode 100644 mpc_mld_explicit 9.html create mode 100644 mpc_mld_online 6.html create mode 100644 mpc_mld_references 9.html create mode 100644 mpc_mld_software 9.html create mode 100644 petri_nets_references 9.html create mode 100644 petri_nets_software 6.html create mode 100644 petri_nets_timed 9.html create mode 100644 solution_concepts 6.html create mode 100644 solution_references 6.html create mode 100644 stability_concepts 6.html create mode 100644 stability_recap 9.html create mode 100644 stability_software 6.html create mode 100644 stability_via_multiple_lyapunov_function 9.html create mode 100644 verification_barrier 6.html create mode 100644 verification_intro 8.html create mode 100644 verification_reachability 6.html create mode 100644 verification_references 9.html diff --git a/.nojekyll b/.nojekyll index e8a2b5e..61576b9 100644 --- a/.nojekyll +++ b/.nojekyll @@ -1 +1 @@ -15793d7e \ No newline at end of file +33288c25 \ No newline at end of file diff --git a/classes_PWA.html b/classes_PWA.html index d67fec1..d68188d 100644 --- a/classes_PWA.html +++ b/classes_PWA.html @@ -627,7 +627,7 @@

On this page

@@ -654,7 +654,7 @@

Piecewise affine (PWA) systems

This is a subclass of switched systems where the functions on the right-hand side of the differential equations are affine functions of the state. For some (historical) reason these systems are also called piecewise linear (PWL).

-

We are going to restrict ourselves to state-driven switching.

+

We are going to reformulate such systems as switched systems with state-driven switching.

First, we consider the autonomous case, that is, systems without inputs: \dot{\bm x} = @@ -719,11 +719,11 @@

Piecewise affine (PWA) systems

\end{aligned}

-
-

Approximation of smooth systems

+
+

Approximation of nonlinear systems

While the example with the saturated linear state feedback can be modelled as a PWA system exactly, there are many practical cases, in which the system is not exactly PWA affine but we want to approximate it as such.

-
-

Example 2 (Smooth system approximated by a PWA system) Consider the following nonlinear system +

+

Example 2 (Nonlinear system approximated by a PWA system) Consider the following nonlinear system \begin{bmatrix} \dot x_1\\\dot x_2 \end{bmatrix} diff --git a/classes_figures/switched_system_state_driven.png b/classes_figures/switched_system_state_driven.png new file mode 100644 index 0000000000000000000000000000000000000000..ca84ab48e2242d5c4f00e09bf88ec01359f87739 GIT binary patch literal 23254 zcmXtgcOcaNAHOYoQ_d*av$A(t8KGpHy*FoX4j;1atc)Z2G)_F-m%1nxbgF~UAuA+y7gO`tkgX?sU2)M#v^PB|u zL1d%#QU&Ms?%(Im(hMA&hd3H4FZ2WR_Lc%VSPU)(kHQ7?(tF6YT`WlyDUo( zr&ml8NBUJy^{DhSFNZcE!y9_S;wWBi`uEErhxybpoCNpY7hGMf&smRs+z$yj|8Wqy zQajt_eYmvrk*D3!VJz>2g_;KVIKxtY;>N`lfA2w(BE4G&!B$VL2%g-(fA24DFz%_( z;Ya*eBl6$y-bNVtq&h~WvwEtn@hbw_9DHIpZ@%|RC%VvBTM5Pa2=T+QHyJeYi@6$ z$QsCZ9{3=TJrJ}jQ%LfINMW!IMQklpq#SA8IylifSl9Zp_SsbkT?={3eODR=K=d@m zI>sZ()y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ey_rwlF z8oO(Vd-|cg1Cb=D8!RH$?Ijz?U!7+_YRFWgDm|HSt_NP9V@%!R5@NmT4&uH(O|+o0 z=uVQPF*=4QtVkv>-@-ko$EyM0cceeB`+!683`&wDsS!sKO}mqc%pJhwJcCk&LEtZ> zKc^pHXA?=1)Inwd50g%4euh)FdzCqN=cF=b(QxLdsHVApVidg=UQVkAJ|O#zCRAk&M_uQlBBkJ3$d;vw@#bnOtoLE+Q)6Cz2z8?+~qzlK0~!;0r*1exXT{ zBz3+a;7?R0pWA@T=>Ft$2C;5)HnI26Tp((B9kOZ>T*W|w-W0+vx(S0fEB>Z+@foZw*lV=hN-@^;Bw$Kc?Bm) zk~EPV1N@N6^^K+ely?H}rgOH{oC;h5JVNEar$98&{}k?-E=iJiHv-oZqmAvT0PiDq1-c0M9??g0q<9Lz ze}Ef+UXmn9UB@YLNs=ThVc!U;gqyPW_07*qoM6N<$f+Wq%qW}N^ literal 0 HcmV?d00001 diff --git a/classes_figures/switched_system_time_driven.png b/classes_figures/switched_system_time_driven.png new file mode 100644 index 0000000000000000000000000000000000000000..28a06d36d79191ffba90cf8566614171b80a3f80 GIT binary patch literal 22151 zcmXtgbzD^66E=;2bV=(NGOP zbm}b6a->;^S_D5O%Ocez?TPMs#P^vU zUUHBfhg6E|pGDqWi0fXaTG04h@ti=+m{xE6#RUA%G>iw;TS zLLF`$kT0-R);O2r3ty1rQYIRLfh)QbY4pLnv6Eve_2-rRUpo??hpUwG)|4LH;)+0z zY1~^V3JMiN-$f5qA7Z!-d?WO$AiFJ_5@jI6MEbm1T?$aMp|uQ(5wdi94s zI+#3P>y;Lda`|y^E-5be?b-=r_Tm%o9+>|ZN;0KrXLaYK-$^Rx9U(vb2DjGg%j4_U zm!>{0q4tiV_Z?$B|9QPy;7p`hX(C=G?GpeV2IP=&t6$ZjJScab%8s6vJdRorPoyzv zB65FABi8WMK0;}Je@kTn8T|mToHlK!eeo9zxj{G6`$@+qmB?f6tUTqR3*uZ7N>WVs zC{x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`yN;T^yD_W#+U;<4{WFU)`IJS-SQfoBuUb6G8K4{%KeRLeae@ClW3o|nqz@$ zfK^ofc?v`U{hP?YXSyUw(y%lIc!J7I_w?8V+zT9$)A;%`3OFBl75JO#x$r|F`L*mn2D2$8kwqk|arzq*n7E9EGuMYEdXz00000NkvXXu0mjfo9LZ9 literal 0 HcmV?d00001 diff --git a/classes_references 6.html b/classes_references 6.html new file mode 100644 index 0000000..d0e99aa --- /dev/null +++ b/classes_references 6.html @@ -0,0 +1,1164 @@ + + + + + + + + + +Literature – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Literature

+
+ + + +
+ + + + +
+ + + +
+ + +

There is no single recommended literature for this lecture. Instead, a bunch of papers and monographs is listed here to get you started should need to delve deeper.

+
+

Reset control systems

+

The origing of the reset control can be traced to the paper [1]. While it may be of historical curiosity to have a look at that paper containing also some schematics with opamps, it is perhaps easier to learn the basics of reset control in some more recent texts such as the monograph [2]. Alternatively, papers such as [3], [4], [5], or [6] can provide another concise introduction to the topic.

+
+
+

Switched systems

+

Readable introduction to switched systems is in the slim book [7]. The book is not freely available online, but a useful excerpt can be found in the lecture notes [8].

+

Switched systems can also be viewed as systems described by differential equations with discontinuous right-hand side. The theory of such systems is described in the classical book [9]. The main concepts and results can also be found in the tutorial [10], perhaps even in a more accessible form. Additionally, accessible discussion in the online available beautiful (I really mean it) textbook [11], chapters 3 and 11. What is particularly nice about the latter book is that every concepts, even the most theoretical one, is illustrated by a simple Matlab code invoking the epic Chebfun toolbox.

+
+
+

Piecewise affine (PWA) systems

+

In our course we based our treatment of PWA systems on the monograph [12]. It is not freely available online, but it is based on the author’s PhD thesis [13], which is available online. While these resources are a bit outdated (in particular, when it comes to stability analysis, back then they were not aware of the possibility to extend the S-procedure to higher-degree polynomials), they still a good starting point. From about the same time, the paper [14] reads well (as usual in the case of the second author). A bit more up-to-date book dedicated purely to PWA control [15], but again, no free online version. The book refers to the Matlab toolbox documented in [16]. While the toolbox is rather dated and will hardly run on the current versions of Matlab (perhaps an opportunity for nice student project), the tutorial paper gives some insight into how the whole concept of a PWA approximation can be used in control design.

+
+
+

Piecewise affine (linear) approximation

+

There is quite a lot of relevant know-how available even outside the domain of (control) systems, in particular, search for piecewise affine (-linear) approximation or fitting (using optimization): [17] (although it is only restricted to convex functions), [18], …

+ + + +
+ + Back to top

References

+
+
[1]
J. C. Clegg, “A nonlinear integrator for servomechanisms,” American Institute of Electrical Engineers, Part II: Applications and Industry, Transactions of the, vol. 77, no. 1, pp. 41–42, 1958, doi: 10.1109/TAI.1958.6367399.
+
+
+
[2]
A. Baños and A. Barreiro, Reset Control Systems. in Advances in Industrial Control. London; New York: Springer, 2012. Available: https://doi.org/10.1007/978-1-4471-2250-0
+
+
+
[3]
O. Beker, C. V. Hollot, and Y. Chait, “Plant with integrator: An example of reset control overcoming limitations of linear feedback,” IEEE Transactions on Automatic Control, vol. 46, no. 11, pp. 1797–1799, 2001, doi: 10.1109/9.964694.
+
+
+
[4]
O. Beker, C. V. Hollot, Y. Chait, and H. Han, “Fundamental properties of reset control systems,” Automatica, vol. 40, no. 6, pp. 905–915, Jun. 2004, doi: 10.1016/j.automatica.2004.01.004.
+
+
+
[5]
Y. Guo, Y. Wang, L. Xie, and J. Zheng, “Stability analysis and design of reset systems: Theory and an application,” Automatica, vol. 45, no. 2, pp. 492–497, Feb. 2009, doi: 10.1016/j.automatica.2008.08.016.
+
+
+
[6]
L. Zaccarian, D. Nesic, and A. R. Teel, “First order reset elements and the Clegg integrator revisited,” in Proceedings of the 2005, American Control Conference, 2005., Jun. 2005, pp. 563–568 vol. 1. doi: 10.1109/ACC.2005.1470016.
+
+
+
[7]
D. Liberzon, Switching in Systems and Control. in Systems & Control: Foundations & Applications. Boston, MA: Birkhäuser, 2003. Available: https://doi.org/10.1007/978-1-4612-0017-8
+
+
+
[8]
D. Liberzon, “Switched Systems: Stability Analysis and Control Synthesis,” Lecture {{Notes}}, 2007. Available: http://liberzon.csl.illinois.edu/teaching/Liberzon-LectureNotes.pdf
+
+
+
[9]
A. F. Filippov, Differential Equations with Discontinuous Righthand Sides. in Mathematics and its Applications. Dordrecht: Springer, 1988. Accessed: Jun. 08, 2022. [Online]. Available: https://link.springer.com/book/10.1007/978-94-015-7793-9
+
+
+
[10]
J. Cortes, “Discontinuous dynamical systems: A tutorial on solutions, nonsmooth analysis, and stability,” IEEE Control Systems Magazine, vol. 28, no. 3, pp. 36–73, Jun. 2008, doi: 10.1109/MCS.2008.919306.
+
+
+
[11]
L. N. Trefethen, Á. Birkisson, and T. A. Driscoll, Exploring ODEs. Philadelphia: SIAM-Society for Industrial and Applied Mathematics, 2017. Available: http://people.maths.ox.ac.uk/trefethen/ExplODE/
+
+
+
[12]
M. K.-J. Johansson, Piecewise Linear Control Systems: A Computational Approach. in Lecture Notes in Control and Information Sciences. Berlin, Heidelberg: Springer, 2003. Available: https://doi.org/10.1007/3-540-36801-9
+
+
+
[13]
M. Johansson, “Piecewise Linear Control Systems,” PhD thesis, Department of Automatic Control, Lund Institute of Technology, Lund, Sweden, 1999. Accessed: Aug. 01, 2011. [Online]. Available: http://lup.lub.lu.se/record/19355
+
+
+
[14]
A. Hassibi and S. Boyd, “Quadratic stabilization and control of piecewise-linear systems,” in Proceedings of the 1998 American Control Conference. ACC (IEEE Cat. No.98CH36207), Jun. 1998, pp. 3659–3664 vol.6. doi: 10.1109/ACC.1998.703296.
+
+
+
[15]
L. Rodrigues, B. Samadi, and M. Moarref, Piecewise Affine Control: Continuous-Time, Sampled-Data, and Networked Systems. in Advances in Design and Control. Philadelphia: Society for Industrial and Applied Mathematics, 2019. Available: https://doi.org/10.1137/1.9781611975901
+
+
+
[16]
M. Z. Fekri, B. Samadi, and L. Rodrigues, PWATOOLS: A MATLAB toolbox for piecewise-affine controller synthesis,” in 2012 American Control Conference (ACC), Jun. 2012, pp. 4484–4489. doi: 10.1109/ACC.2012.6315609.
+
+
+
[17]
A. Magnani and S. P. Boyd, “Convex piecewise-linear fitting,” Optimization and Engineering, vol. 10, no. 1, pp. 1–17, Mar. 2008, doi: 10.1007/s11081-008-9045-3.
+
+
+
[18]
J. Huchette and J. P. Vielma, “Nonconvex Piecewise Linear Functions: Advanced Formulations and Simple Modeling Tools,” Operations Research, May 2022, doi: 10.1287/opre.2019.1973.
+
+
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/classes_reset 6.html b/classes_reset 6.html new file mode 100644 index 0000000..696249f --- /dev/null +++ b/classes_reset 6.html @@ -0,0 +1,1502 @@ + + + + + + + + + +Reset systems – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Reset systems

+
+ + + +
+ + + + +
+ + + +
+ + +

We have introduced two major modeling frameworks for hybrid systems – hybrid automata and hybrid equations. Now we are ready to model any hybrid system. It turns out useful, however, to define a few special classes of hybrid systems. Their special features are reflected in the structure of their models (hybrid automata or hybrid equations). The special classes of hybrid systems that we are going to discuss are

+
    +
  • reset systems,
  • +
  • switched systems,
  • +
  • piecewise affine (PWA) systems.
  • +
+
+

Reset systems

+

They are also called impulsive systems (the reason is going to be clear soon). They are conveniently defined within the hybrid automata framework. In a hybrid automaton modelling a reset system we can only identify a single discrete state (mode), not more. In the digraph representation, we can only observe a single node.

+
+
+
+ +
+
+Figure 1: Reset system +
+
+
+

Within the hybrid equations framework, in a reset system some variables reset (jump) and flow, others only flow, but there are no variables that only reset… Well, this definition is not perfect, because as we have discussed earlier, even when staying constant between two jumps, the state variable is, technically speaking, also flowing. What we want to express is that there are not discrete variables in such model, but the hybrid equations framework intentionally does not distinguish between continuous and discrete variables.

+

We can recognize the bouncing ball as a prominent example of a reset system. Another example follows.

+
+

Example 1 (Reset oscillator) We consider a hybrid system state-space modelled by the following hybrid equations: +\begin{aligned} +\begin{bmatrix} +\dot x_1\\ \dot x_2 +\end{bmatrix} +&= +\begin{bmatrix} +0 & 1\\ -1 & 2\delta +\end{bmatrix} +\begin{bmatrix} +x_1\\x_2 +\end{bmatrix} ++ +\begin{bmatrix} +0\\1 +\end{bmatrix}, +\quad \bm x \in \mathcal C,\\ +x_1^+ &= -x_1, \quad \bm x \in \mathcal D, +\end{aligned} + where +\begin{aligned} +\mathcal D &= \{\bm x \in \mathbb R^2 \mid x_1<0, x_2=0\},\\ +\mathcal C &= \mathbb R^2\setminus\mathcal D. +\end{aligned} +

+

Simulation outcomes for some concrete value of the small positive parameter \delta are shown in the following figure.

+
+
+Show the code +
using OrdinaryDiffEq
+
+δ = 0.1
+A = [0.0 1.0;
+    -1.0 2δ]
+b = [0.0; 1.0]
+
+x0 = [0.2, 0.0]
+tspan = (0.0, 100)
+f(x, p, t) = A*x + b
+cond_fcn(x, t, integrator) = x[1]<0 ? x[2] : 1.0
+affect!(integrator) = integrator.u[1] = -integrator.u[1]
+cb = ContinuousCallback(cond_fcn, affect!)
+prob = ODEProblem(f, x0, tspan)
+
+sol = solve(prob, Tsit5(),callback=cb, reltol = 1e-6, abstol = 1e-6, saveat = 0.1)
+
+using Plots
+plot(sol[1,:],sol[2,:],lw=2,legend=false, tickfontsize=12, xtickfontsize=12, ytickfontsize=12)
+xlabel!("x₁")
+ylabel!("x₂")
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Isn’t it fascinating that a linear system augmented with resetting can exhibit such a complex behavior?

+
+
+
+

Clegg’s integrator (CI)

+

Clegg’s integrator is a reset element that can be used in control systems.

+

Its function is as follows. As soon as the sign of the input changes, the integrator resets to zero. As a consequence, the integrator keeps the sign of its input and output identical.

+

Unlike the traditional (linear) integrator, the CI exhibits much smaller phase lag (some 38 vs 90 deg).

+
+

Example 2 (Response of Clegg’s integrator to a sinusoidal input) Here is a response of the Clegg’s integrator to a sinusoidal input.

+
+
+Show the code +
using OrdinaryDiffEq
+f(x, u, t) = u(t)                               # We adhere to the control systems notation that x is the state variable and u is the input.
+x0 = 0.0                                        # The initial state.
+tspan = (0.0, 10)                               # The time span.
+u = t -> 1.0*sin(t)                             # The (control) input.
+cond_fcn(x, t, integrator) = integrator.p(t)    # The condition function. If zero, the event is triggered.
+affect!(integrator) = integrator.u = 0.0        # Beware that internally, u is the state variable. Here, the state variable is reset to zero.
+cb = ContinuousCallback(cond_fcn, affect!)
+prob = ODEProblem(f, x0, tspan, u)
+sol = solve(prob, Tsit5(),callback=cb, reltol = 1e-6, abstol = 1e-6, saveat = 0.1)
+
+using Plots
+t = sol.t
+plot(sol.t,u.(t),label="u",lw=2)
+plot!(sol,lw=2,label="x", tickfontsize=12, xtickfontsize=12, ytickfontsize=12)
+xlabel!("t")
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+

It may be of historical curiosity that originally the concept was presented in the form of an analog circuit (opamps, diodes, resistors, capacitors). See the references if you are interested.

+
+
+

First-order reset element (FORE)

+

Another simple reset element that can be used in control systems is known as FORE (first-order reset element) described by +\begin{array}{lr} +\dot u = a u + k e, & \mathrm{when}\; e\neq 0,\\ +u^+ = 0, & \mathrm{when}\; e = 0. +\end{array} +

+
+

Example 3 (FORE) Consider a plant modelled by G(s) = \frac{s+1}{s(s+0.2)} and a first-order controller C=\frac{1}{s+1} in the feedback loop as in Fig 2.

+
+
+
+ +
+
+Figure 2: First-order controller in a feedback loop +
+
+
+

The response of the closed-loop system to a step reference input is shown using the following code.

+
+
+Show the code +
using ModelingToolkit, Plots, OrdinaryDiffEq
+using ModelingToolkit: t_nounits as t
+using ModelingToolkit: D_nounits as D
+
+function plant(; name)
+    @variables x₁(t)=0 x₂(t) = 0 u(t) y(t)
+    eqs = [D(x₁) ~ x₂
+           D(x₂) ~ -0.2x₂ + u
+           y ~ x₁ + x₂]
+    ODESystem(eqs, t; name = name)
+end
+
+function controller(; name) 
+    @variables x(t)=0 u(t) y(t)
+    eqs = [D(x) ~ -x + u
+           y ~ x]
+    ODESystem(eqs, t, name = name)
+end
+
+@named C = controller()
+@named P = plant()
+
+t_of_step = 1.0
+r(t) = t >= t_of_step ? 1.0 : 0.0
+@register_symbolic r(t)
+
+connections = [C.u ~ r(t) - P.y
+               C.y ~ P.u]
+
+@named T = ODESystem(connections, t, systems = [C, P])
+
+T = structural_simplify(T)
+equations(T)
+observed(T)
+
+using DifferentialEquations: solve
+prob = ODEProblem(complete(T), [], (0.0, 30.0), [])
+sol = solve(prob, Tsit5(), saveat = 0.1)
+
+using Plots
+plot(sol.t, sol[P.y], label = "", xlabel = "t", ylabel = "y", lw = 2)
+
+
+

Now we turn the first-order controller into a FORE controller by augumenting it with the above described resetting functionality. The feedback loop is in Fig 3.

+
+
+
+ +
+
+Figure 3: First-order reset element (FORE) in a feedback loop +
+
+
+

The response of the closed-loop system to a step reference input is shown using the following code.

+
+
+Show the code +
using ModelingToolkit, Plots, OrdinaryDiffEq
+using ModelingToolkit: t_nounits as t
+using ModelingToolkit: D_nounits as D
+
+function plant(; name)
+    @variables x₁(t)=0 x₂(t) = 0 u(t) y(t)
+    eqs = [D(x₁) ~ x₂
+           D(x₂) ~ -0.2x₂ + u
+           y ~ x₁ + x₂]
+    ODESystem(eqs, t; name = name)
+end
+
+function controller(; name) 
+    @variables x(t)=0 u(t) y(t)
+    eqs = [D(x) ~ -x + u
+           y ~ x]
+    ODESystem(eqs, t, name = name)
+end
+
+@named C = controller()
+@named P = plant()
+
+t_of_step = 1.0
+r(t) = t >= t_of_step ? 1.0 : 0.0
+@register_symbolic r(t)
+
+connections = [C.u ~ r(t) - P.y
+               C.y ~ P.u]
+
+zero_crossed = [C.u ~ 0]
+reset = [C.x ~ 0]               
+
+@named T = ODESystem(connections, t, systems = [C, P], continuous_events = zero_crossed => reset)
+
+T = structural_simplify(T)
+equations(T)
+observed(T)
+
+using DifferentialEquations: solve
+prob = ODEProblem(complete(T), [], (0.0, 30.0), [])
+sol = solve(prob, Tsit5(), saveat = 0.1)
+
+using Plots
+plot(sol.t, sol[P.y], label = "", xlabel = "t", ylabel = "y", lw = 2)
+
+
+

Obviously the introduction of the resetting functionality into the first order controller had a positive effect on the transient response of the closed-loop system.

+
+
+
+

When (not) to use reset control?

+

However conceptually simple, reset control is not a panacea. Analysis and design of reset control systems is not straightforward compared to the traditional linear control systems. In particular, guaranteeing closed-loop stability upon introduction of resetting into a linear controller is not easy and may require advanced concepts (some of them we are going to introduce later in the course). Therefore we should use reset control with care. We should always do our best to find (another) linear controller that has a performance comparable or even better than reset control system.

+

But reset control can be helfpul if the plant is subject to fundamental limitations of achievable control performance such as

+
    +
  • integrators and unstable poles,
  • +
  • zeros in the right half-plane (non-minimum phase),
  • +
  • delays,
  • +
  • +
+

In these situations reset control can be a way to beat the so-called waterbed effect.

+ + +
+ + Back to top
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/classes_reset.html b/classes_reset.html index 3dc5012..d35786e 100644 --- a/classes_reset.html +++ b/classes_reset.html @@ -770,49 +770,49 @@

Reset systems

- + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + +
@@ -850,53 +850,53 @@

Clegg’s integrator - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/classes_software 9.html b/classes_software 9.html new file mode 100644 index 0000000..23a5c56 --- /dev/null +++ b/classes_software 9.html @@ -0,0 +1,1110 @@ + + + + + + + + + +Software – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Software

+
+ + + +
+ + + + +
+ + + +
+ + +

Reset systems, switched systems, and piecewise affine (PWA) systems can all be viewed as special classes of hybrid systems, and as such can be modelled and simulated using software for hybrid systems (or even general purpose modelling and simulation software).

+

However, there are also some dedicated software tools/packages/libraries for PWA systems:

+ +

Although some more free and open-source software packages for PWA systems can be found on the internet, none of them (at as far as we know) is actively developed or at least maintained anymore:

+
    +
  • PWATOOLS toolbox for Matlab, which accompanies the recently published book Rodrigues, Samadi, and Moarref (2019). Unfortunately, this ten-year old toolbox is no longer working with the recent releases of Matlab and the author is no longer maintaining it.
  • +
  • PWLTool toolbox for Matlab: some traces of this toolbox can be found on the internet, but this one seems even older, obviously back then accompanying the book Johansson (2003).
  • +
+

Overall, besides the MPT toolbox that is still being actively developed (by our colleagues at STU Bratislava), not much is currently available within the open-source software domain… :-(

+ + + + + Back to top

References

+
+Johansson, Mikael K.-J. 2003. Piecewise Linear Control Systems: A Computational Approach. Lecture Notes in Control and Information Sciences. Berlin, Heidelberg: Springer. https://doi.org/10.1007/3-540-36801-9. +
+
+Rodrigues, Luis, Behzad Samadi, and Miad Moarref. 2019. Piecewise Affine Control: Continuous-Time, Sampled-Data, and Networked Systems. Advances in Design and Control. Philadelphia: Society for Industrial and Applied Mathematics. https://doi.org/10.1137/1.9781611975901. +
+
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/classes_switched 6.html b/classes_switched 6.html new file mode 100644 index 0000000..5fe7607 --- /dev/null +++ b/classes_switched 6.html @@ -0,0 +1,1511 @@ + + + + + + + + + +Switched systems – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Switched systems

+
+ + + +
+ + + + +
+ + + +
+ + +

In switched systems, some variables reset (jump) and stay constant between resets (they model discrete states), and some variables only flow and do not reset (jump).

+
+
+
+ +
+
+Figure 1: An automaton for a switched system +
+
+
+

It is a common notational convention to type the discrete state as a lower index as in +\dot{\bm x} = \bm f_q(\bm x), \qquad q \in \{1,2, \ldots, m\}. +

+

The variable q determines, which right-hand side function is “active” at a given moment. The question now is, what dictates the evolution of the variable q? In other words, drives the switching, the transition between the modes? It turns out that the switching can be time-driven or state-driven:

+
    +
  • Time-driven: \dot{\bm x} = \bm f_{q(t)}(\bm x), where q(t) is some function of time.
  • +
  • State-driven: +\dot{\bm x} += +\begin{cases} +\bm f_1(\bm x), & \mathrm{if}\, \bm x \in \mathcal{X}_1,\\ +\vdots\\ +\bm f_m(\bm x), & \mathrm{if}\, \bm x \in \mathcal{X}_m. +\end{cases} +
  • +
+

While there is not much to add to the former case, the latter might need some more explanation.

+
+

State-dependent switching

+

Let’s consider just two domains \mathcal X_1 and \mathcal X_2. The transition to the other mode is triggered by the continuous state of the system crossing the boundary between the two domains. The boundary is defined by the function s(\bm x) (called switching function), which is zero on the boundary, see the Fig 2.

+
+
+
+ +
+
+Figure 2: State-dependent switching +
+
+
+

Through examples we now illustrate the possible behaviors of the system when the flow transverses the boundary, when it pulls away from the boundary, and when it pushes towards the boundary.

+
+

Example 1 (The flow transverses the boundary) We consider the two right-hand sides of the state equation +\bm f_1(\bm x) = \begin{bmatrix}1\\ x_1^2 + 2x_2^2\end{bmatrix} + and +\bm f_2(\bm x) = \begin{bmatrix}1\\ 2x_1^2+3x_2^2-2\end{bmatrix} + and the switching function +s(x_1,x_2) = (x_1+0.05)^2 + (x_2+0.15)^2 - 1. +

+

The state portrait that also shows the switching function is generated using the following code.

+
+
+Show the code +
s(x₁,x₂) = (x₁+0.05)^2 + (x₂+0.15)^2 - 1.0
+
+f₁(x₁,x₂) = x₁^2 + 2x₂^2
+f₂(x₁,x₂) = 2x₁^2+3x₂^2-2.0
+
+f(x₁,x₂) = s(x₁,x₂) <= 0.0 ? [1,f₁(x₁,x₂)] : [1,f₂(x₁,x₂)] 
+
+N = 100
+x₁ = range(0, stop = 0.94, length = N)
+
+using CairoMakie
+fig = Figure(size = (600, 600),fontsize=20)
+ax = Axis(fig[1, 1], xlabel = "x₁", ylabel = "x₂")
+streamplot!(ax,(x₁,x₂)->Point2f(f(x₁,x₂)), 0..1.5, 0..1.5, colormap = :magma)
+lines!(ax,x₁,sqrt.(1 .- (x₁ .+ 0.05).^2) .- 0.15, color = :red, linewidth=5)
+x10 = 0.5
+x20 = sqrt(1 - (x10 + 0.05)^2) - 0.15
+Makie.scatter!(ax,[x10],[x20],color=:blue,markersize=30)
+fig
+
+
+
+
+

+
+
+
+
+

The state portrait also shows a particular initial state \bm x_0 using a blue dot. Note that the projection of both vector fields \mathbf f_1 and \mathbf f_2 evaluated at \bm x_0 onto the normal (the gradient) of the switching function at \bm x_0 is positive, that is +\left.\left(\nabla s\right)^\top \bm f_1\right|_{\bm x_0} \geq 0, \quad \left.\left(\nabla s\right)^\top \bm f_2\right|_{\bm x_0} \geq 0. +

+

This is consistent with the observation that the flow goes through the boundary.

+

We can also plot a particular solution of the ODE using the following code.

+
+
+Show the code +
using DifferentialEquations
+F(u, p, t) = f(u[1],u[2])
+u0 = [0.0,0.4]
+tspan = (0.0, 1.0)
+prob = ODEProblem(F, u0, tspan)
+sol = solve(prob, Tsit5(), reltol = 1e-8, abstol = 1e-8)
+
+using Plots
+Plots.plot(sol,lw=3,xaxis="Time",yaxis="x",label=false)
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Strictly speaking, this solution does not satisfy the differential equation on the boundary of the two domains (the derivative of x_2 does not exist there). This is visually recognized in the above plot as the sharp corner in the solution. But other than that, the solution is perfectly “reasonable” – for a while the system evolves according to one state equations, then at one particular moment the system starts evolving according to another state equation. That is it. Not much more to see here.

+
+
+

Example 2 (The flow pulls away from the boundary) We now consider another pair of the right-hand sides. +\bm f_1(\bm x) = \begin{bmatrix}-1\\ x_1^2 + 2x_2^2\end{bmatrix} + and +\bm f_2(\bm x) = \begin{bmatrix}1\\ 2x_1^2+3x_2^2-2\end{bmatrix}. +

+

The switching function is the same as in the previous example.

+

The state portrait is below.

+
+
+Show the code +
f(x₁,x₂) = s(x₁,x₂) <= 0.0 ? [-1, f₁(x₁,x₂)] : [1, f₂(x₁,x₂)] 
+
+fig = Figure(size = (600, 600),fontsize=20)
+ax = Axis(fig[1, 1], xlabel = "x₁", ylabel = "x₂")
+streamplot!(ax,(x₁,x₂)->Point2f(f(x₁,x₂)), 0..1.5, 0..1.5, colormap = :magma)
+lines!(ax,x₁,sqrt.(1 .- (x₁ .+ 0.05).^2) .- 0.15, color = :red, linewidth=5)
+x10 = 0.8
+x20 = sqrt(1 - (x10 + 0.05)^2) - 0.15
+Makie.scatter!(ax,[x10],[x20],color=:blue,markersize=30)
+fig
+
+
+
+
+

+
+
+
+
+

We focus on the blue dot again. The projections of the two vector fields onto the normal of the switching function satisfy +\left.\left(\nabla s\right)^\top \bm f_1\right|_{\bm x_0} \leq 0, \quad \left.\left(\nabla s\right)^\top \bm f_2\right|_{\bm x_0} \geq 0. +

+

The only interpretation of this situation is that a unique solution does not start at \bm x_0. Again, not much more to see here.

+
+
+

Example 3 (The flow pushes towards the boundary) And one last pair of the right-hand sides: +\bm f_1(\bm x) = \begin{bmatrix}1\\ x_1^2 + 2x_2^2\end{bmatrix} + and +\bm f_2(\bm x) = \begin{bmatrix}-1\\ 2x_1^2+3x_2^2-2\end{bmatrix}. +

+

The state-portrait is below.

+
+
+Show the code +
f(x₁,x₂) = s(x₁,x₂) <= 0.0 ? [1, f₁(x₁,x₂)] : [-1, f₂(x₁,x₂)] 
+
+fig = Figure(size = (600, 600),fontsize=20)
+ax = Axis(fig[1, 1], xlabel = "x₁", ylabel = "x₂")
+streamplot!(ax,(x₁,x₂)->Point2f(f(x₁,x₂)), 0..1.5, 0..1.5, colormap = :magma)
+lines!(ax,x₁,sqrt.(1 .- (x₁ .+ 0.05).^2) .- 0.15, color = :red, linewidth=5)
+x10 = 0.5
+x20 = sqrt(1 - (x10 + 0.05)^2) - 0.15
+Makie.scatter!(ax,[x10],[x20],color=:blue,markersize=30)
+fig
+
+
+
+
+

+
+
+
+
+

The projections of the two vector fields onto the normal of the switching function satisfy +\left.\left(\nabla s\right)^\top \bm f_1\right|_{\bm x_0} \geq 0, \quad \left.\left(\nabla s\right)^\top \bm f_2\right|_{\bm x_0} \leq 0. +

+

But this is interesting! Once the trajectory hits the switching curve and tries to penetrate it futher, it is pushed back to the switching curve. It it tries to penetrate it further, it is pushed back to the switching curve again. And so on. But then, how does the state evolve from \bm x_0?

+

Hint: solve the ODE numerically with some finite step size. The solution will exhibit zig-zagging or chattering along the switching curve, away from the blue point. Now, keep shrinking the step size. The solution will ultimately “slide” smoothly along the switching curve. Perhaps this was your guess. One thing should worry you, hoever: such “sliding” solution satisfies neither of the two state equations!

+

We will make this more rigorous in a moment, but right now we just wanted to tease the intuition.

+
+
+
+

Conditions for existence and uniqueness of solutions of ODE

+

In order to analyze the situations such as the previous example, we need to recapitulate some elementary facts about the existence and uniqueness of solutions of ordinary differential equations (ODEs). And then we are going to add some new stuff.

+

Consider the ODE

+

\dot x(t) = f(x(t),t).

+

We ask the following two questions:

+
    +
  • Under which conditions does a solution exists?
  • +
  • Under which conditions is the solution unique?
  • +
+

To answer both, the function f() must be analyzed.

+

But before we answer the two questions, we must ask another one that is even more fundamental:

+
    +
  • What does it mean that a function x(t) is a solution of the the ODE?
  • +
+

However trivial this question may seem, an answer can escalate rather quickly – there are actually several concepts of a solution of an ordinary differential equation.

+
+

Classical solution (Peano, also Cauchy-Peano)

+
    +
  • f(x(t),t) is continuous with respect to both x and t .
  • +
  • Existence of a solution is guaranteed locally (on some finite interval), but uniqueness is not. +
      +
    • But it does not exclude uniqueness in all cases, it is just that it is not guaranteed.
    • +
  • +
  • A solution is guaranteed to be continuously differentiable ( x\in\mathrm C^1 ). Such function x(t) satisfies the ODE \dot x(t) = f(x(t),t) \; \forall t , that is why such solution is called classical.
  • +
  • Example of a solution that exists only on a finite interval is +\dot x(t) = x^2(t),\; x(0) = 1, +
    +for which the solution is x(t) = \frac{1}{1-t} . The solution blows up at t=1 .
    +
  • +
  • Example of nonuniqueness is provided by \dot x(t) = \sqrt{x(t)}, \; x(0) = 0.
    +
  • +
  • One possible solution is x(t) = \frac{1}{4}t^2 . Another is x(t) = 0 . Yet another example is x(t) = \frac{1}{4}(t-t_0)^2 . It is related to the Leaky bucket example.
  • +
+
+
+

Strenghtening the requirement of continuity (Pickard-Lindelöf)

+
    +
  • f(x(t),t) is continuous with respect to t but a stricter condition is imposed with respect to x – Lipschitz continuity.
  • +
  • Not only existence but also uniqueness of a solution is guaranteed. +
      +
    • But similarly as with Peano conditions, here too the condition is not necessary, it is just sufficient – even if the function f is not Lipschitz continuous, there may exist a unique solution.
    • +
    • Since the condition is stricter than mere continuity, whatever goodies hold here too. In particular, the solution is guaranteed to be continuously differentiable.
    • +
    • If the function is only locally Lipschitz, the solution is guaranteed on some finite interval. If the function is (globally) Lipschitz, the solution is guaranteed on an unbounded interval.
    • +
  • +
+
+
+

Extending the set of solutions (Carathéodory)

+
    +
  • In contrast with the classical solution, here the x(t) can fail to satisfy the ODE at some isolated points in time.

  • +
  • This Carathéodory (or extended) solution x(t) is more than just continuous (even more than uniformly continuos) but less than contiuously differentiable (aka \mathcal C^1) – it is absolutely continuous.

  • +
  • It is a solution of the integral equation (indeed, an equation) x(t) = x(t_0) + \int_{t_0}^t f(x(\tau),\tau)\mathrm{d}\tau,
    +where we use Lebesque integral (instead of Riemann).

  • +
  • For a continuous f, solutions x are just classical (smooth).

  • +
  • f can be, however, “some kind of discontinuous” with respect to t. In particular, it must be measurable wrt t. It includes the case when f(x,t) is piecewise continuous with respect to t (sampled data control with ZOH).

  • +
  • If the function f is discontinuous with respect to x, some more concepts of a solution need to be invoked so that existence and uniqueness can be analyzed.

  • +
+
+

Example 4 (Nonexistence and nonuniqueness of solutions) The system with discontinuous RHS +\begin{aligned} +\dot x_1 &= -2x_1 - 2x_2\operatorname*{sgn(x_1)},\\ +\dot x_2 &= x_2 + 4x_1\operatorname*{sgn(x_1)} +\end{aligned} +

+

can be reformulated as a switched system +\begin{aligned} +\dot{\bm x} &= \begin{bmatrix}-2 & 2\\-4 & 1\end{bmatrix}\begin{bmatrix}x_1\\ x_2\end{bmatrix}, \; \bm x\leq 0\\ +\dot{\bm x} &= \begin{bmatrix}-2 & -2\\4 & 1\end{bmatrix}\begin{bmatrix}x_1\\ x_2\end{bmatrix}, \; \bm x> 0 +\end{aligned} +

+
+
+Show the code +
s(x) = x[1]
+
+f₁(x) = [-2x[1] + 2x[2], x[2] - 4x[1]]
+f₂(x) = [-2x[1] - 2x[2], x[2] + 4x[1]]
+
+f(x) = s(x) <= 0.0 ? f₁(x) : f₂(x) 
+
+using CairoMakie
+fig = Figure(size = (600, 600),fontsize=20)
+ax = Axis(fig[1, 1], xlabel = "x₁", ylabel = "x₂")
+streamplot!(ax,x->Point2f(f(x)), -1.5..1.5, -1.5..1.5, colormap = :magma)
+vlines!(ax,0; ymin = -1.1, ymax = 1.1, color = :red)
+fig
+
+
+
+
+

+
+
+
+
+
+
+
+

Sliding mode dynamics (on simple boundaries)

+
    +
  • Attractive sliding mode at \bm x_\mathrm{s}, if there is a trajectory that ends at \bm x_\mathrm{s}, but no trajectory that starts at \bm x_\mathrm{s}.
  • +
+
+
+

Generalized solutions (Filippov)

+
    +
  • x() is a Filippov solution on [t_0,t_1] if for almost all t +\dot x(t) \in \overline{\operatorname*{co}}\{f(x(t),t)\}, +

  • +
  • (Previous) example: \mathcal{S}^+ = \{\bm x \mid x_1=0 \land x_2\geq 0\} +\begin{aligned} +\dot{\bm x} &\in \overline{\operatorname*{co}}\{\bm A_1\bm x_1, \bm A_2\bm x_2\}\\ +&= \alpha_1(t) \bm A_1\bm x_1 + \alpha_2(t) \bm A_2\bm x_2, +\end{aligned} + where \alpha_1(t), \alpha_2(t) \geq 0, \alpha_1(t) + \alpha_2(t) = 1.

  • +
  • Not all weights keep the solution on \mathcal S^+.

    +
      +
    • We must have \dot x_1 = 0 for \bm x(t) \in \mathcal S^+: + \alpha_1(t) [-2x_1 + 2x_2] + \alpha_2(t) [-2x_1 - 2x_2] = 0 +
    • +
  • +
  • Combining with \alpha_1(t) + \alpha_2(t) = 1: +\alpha_1(t) = \alpha_2(t) = 1/2. +

  • +
  • The dynamics on the sliding mode is +\dot x_1 = 0, \quad \dot x_2 = x_2, \quad \bm x \in \mathcal{S}^+. +

  • +
+
+
+

Possible nonuniqueness on intersection of boundaries

+ + +
+
+ + Back to top
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/classes_switched.html b/classes_switched.html index df9c312..7be6c5d 100644 --- a/classes_switched.html +++ b/classes_switched.html @@ -664,7 +664,8 @@

On this page

@@ -699,24 +699,33 @@

Switched systems

-

In switched systems, some variables reset (jump) and stay constant between resets (they model discrete states), and some variables only flow and do not reset (jump).

-
+

Switched systems are modelled by first-order differential (state) equations with multiple right-hand sides, that is,

+

+\dot{\bm x} = \bm f_q(\bm x), \qquad q \in \{1,2, \ldots, m\}, +\tag{1} where m right-hand sides are possible and the lower index q determines which right-hand side function is “active” at a given moment.

+

The question is, what dictates the evolution of the integer variable q? In other words, what drives the switching? It turns out that the switching can be time-driven or state-driven.

+

In both cases, the right-hand sides can also depend the control input \bm u.

+

Major results for switched systems have been achieved without the need to refer to the framework of hybrid systems. But now that we have built such general framework, it turns out useful to view switched systems as a special class of hybrid systems. The aspects in which they are special will be discussed in the following, but here let us state that in contrast to full hybrid systems, switched systems are a bit less rich on the discrete side.

+
+

Time-driven

+

The evolution of the state variable complies with the following model \dot{\bm x} = \bm f_{q(t)}(\bm x), where q(t) is some function of time. The values of q(t) can be under our control or beyond our control, deterministic or stochastic.

+

A hybrid automaton for a time-driven switched system is shown in Fig 1.

+
-
- +
+
-
-Figure 1: An automaton for a switched system +
+Figure 1: An automaton for a switched system with time-driven switching
-

It is a common notational convention to type the discrete state as a lower index as in -\dot{\bm x} = \bm f_q(\bm x), \qquad q \in \{1,2, \ldots, m\}. -

-

The variable q determines, which right-hand side function is “active” at a given moment. The question now is, what dictates the evolution of the variable q? In other words, drives the switching, the transition between the modes? It turns out that the switching can be time-driven or state-driven:

-
    -
  • Time-driven: \dot{\bm x} = \bm f_{q(t)}(\bm x), where q(t) is some function of time.
  • -
  • State-driven: +

    The transition from one mode to another is triggered by the integer variable q(t) attaining the appropriate value.

    +

    Since the switching signal is unrelated to the (continuous) state of the system, the invariant of the two modes are usually covering the whole state space \mathcal X.

    +
+
+

State-dependent switching

+

The model is \dot{\bm x} = \begin{cases} @@ -724,19 +733,26 @@

Switched systems

\vdots\\ \bm f_m(\bm x), & \mathrm{if}\, \bm x \in \mathcal{X}_m. \end{cases} - - -

While there is not much to add to the former case, the latter might need some more explanation.

-
-

State-dependent switching

-

Let’s consider just two domains \mathcal X_1 and \mathcal X_2. The transition to the other mode is triggered by the continuous state of the system crossing the boundary between the two domains. The boundary is defined by the function s(\bm x) (called switching function), which is zero on the boundary, see the Fig 2.

+

+

Let’s consider just two domains \mathcal X_1 and \mathcal X_2. A hybrid automaton for a state-driven switched system is shown in Fig 2.

+
+
+
+ +
+
+Figure 2: An automaton for a switched system with state-driven switching +
+
+
+

The transition to the other mode is triggered by the continuous state of the system crossing the boundary between the two domains. The boundary is defined by the function s(\bm x) (called switching function), which is zero on the boundary, see the Fig 3.

-Figure 2: State-dependent switching +Figure 3: State-dependent switching
@@ -803,46 +819,46 @@

State-dependent - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + +

@@ -915,8 +931,8 @@

State-dependent

The projections of the two vector fields onto the normal of the switching function satisfy \left.\left(\nabla s\right)^\top \bm f_1\right|_{\bm x_0} \geq 0, \quad \left.\left(\nabla s\right)^\top \bm f_2\right|_{\bm x_0} \leq 0.

-

But this is interesting! Once the trajectory hits the switching curve and tries to penetrate it futher, it is pushed back to the switching curve. It it tries to penetrate it further, it is pushed back to the switching curve again. And so on. But then, how does the state evolve from \bm x_0?

-

Hint: solve the ODE numerically with some finite step size. The solution will exhibit zig-zagging or chattering along the switching curve, away from the blue point. Now, keep shrinking the step size. The solution will ultimately “slide” smoothly along the switching curve. Perhaps this was your guess. One thing should worry you, hoever: such “sliding” solution satisfies neither of the two state equations!

+

But this is interesting! Once the trajectory hits the switching curve and tries to penetrate it futher, it is pushed back to the switching curve. As it tries to penetrate it further, it is pushed back to the switching curve again. And so on. But then, how does the state evolve from \bm x_0?

+

Hint: solve the ODE numerically with some finite step size. The solution will exhibit zig-zagging or chattering along the switching curve, away from the blue point. Now, keep shrinking the step size. The solution will ultimately “slide” smoothly along the switching curve. Perhaps this was your guess. One thing should worry you, however: such “sliding” solution satisfies neither of the two state equations!

We will make this more rigorous in a moment, but right now we just wanted to tease the intuition.

@@ -938,59 +954,72 @@

Classical solution (Peano, also Cauchy-Peano)

-
    -
  • f(x(t),t) is continuous with respect to both x and t .
  • -
  • Existence of a solution is guaranteed locally (on some finite interval), but uniqueness is not. -
      -
    • But it does not exclude uniqueness in all cases, it is just that it is not guaranteed.
    • -
  • -
  • A solution is guaranteed to be continuously differentiable ( x\in\mathrm C^1 ). Such function x(t) satisfies the ODE \dot x(t) = f(x(t),t) \; \forall t , that is why such solution is called classical.
  • -
  • Example of a solution that exists only on a finite interval is -\dot x(t) = x^2(t),\; x(0) = 1, +

    We assume that f(x(t),t) is continuous with respect to both x and t. Then existence of a solution is guaranteed locally (on some finite interval), but uniqueness is not.

    +
    +
    +
    + +
    +
    +Not guaranteed does not mean impossible +
    +
    +
    +

    Uniqueness is not not excluded in all cases, it is just that it is not guaranteed.

    +
    +
    +

    A solution is guaranteed to be continuously differentiable ( x\in\mathrm C^1 ). Such function x(t) satisfies the ODE \dot x(t) = f(x(t),t) \; \forall t, that is why such solution is called classical.

    +
    +

    Example 4 An example of a solution that exists only on a finite interval is + \dot x(t) = x^2(t),\; x(0) = 1,
    -for which the solution is x(t) = \frac{1}{1-t} . The solution blows up at t=1 .
    -

  • -
  • Example of nonuniqueness is provided by \dot x(t) = \sqrt{x(t)}, \; x(0) = 0.
    -
  • -
  • One possible solution is x(t) = \frac{1}{4}t^2 . Another is x(t) = 0 . Yet another example is x(t) = \frac{1}{4}(t-t_0)^2 . It is related to the Leaky bucket example.
  • -
+for which the solution is x(t) = \frac{1}{1-t} . The solution blows up at t=1 .

+ +
+

Example 5 An example of nonuniqueness is provided by \dot x(t) = \sqrt{x(t)}, \; x(0) = 0.

+

One possible solution is x(t) = \frac{1}{4}t^2. Another is x(t) = 0. Yet another example is x(t) = \frac{1}{4}(t-t_0)^2. It is related to the Leaky bucket example.

+

Strenghtening the requirement of continuity (Pickard-Lindelöf)

-
    -
  • f(x(t),t) is continuous with respect to t but a stricter condition is imposed with respect to x – Lipschitz continuity.
  • -
  • Not only existence but also uniqueness of a solution is guaranteed. -
      -
    • But similarly as with Peano conditions, here too the condition is not necessary, it is just sufficient – even if the function f is not Lipschitz continuous, there may exist a unique solution.
    • -
    • Since the condition is stricter than mere continuity, whatever goodies hold here too. In particular, the solution is guaranteed to be continuously differentiable.
    • -
    • If the function is only locally Lipschitz, the solution is guaranteed on some finite interval. If the function is (globally) Lipschitz, the solution is guaranteed on an unbounded interval.
    • -
  • -
+

Since continuity of f(x(t),t) was not enough to guarantee uniqueness, we need to impose a stricter condition on f(). Namely, we impose a stricter condition on f() with respect to x – Lipschitz continuity, while we still require that the function be continuous with respect to t.

+

Now it is not only existence but also uniqueness of a solution that is guaranteed.

+
+
+
+ +
+
+Uniqueness not guaranteed does not mean it is impossible +
+
+
+

Similarly as with Peano conditions, here too the condition is not necessary, it is just sufficient – even if the function f is not Lipschitz continuous, there may exist a unique solution.

+
+
+

Since the condition is stricter than mere continuity, whatever goodies hold here too. In particular, the solution is guaranteed to be continuously differentiable.

+

If the function is only locally Lipschitz, the solution is guaranteed on some finite interval. If the function is (globally) Lipschitz, the solution is guaranteed on an unbounded interval.

Extending the set of solutions (Carathéodory)

-
    -
  • In contrast with the classical solution, here the x(t) can fail to satisfy the ODE at some isolated points in time.

  • -
  • This Carathéodory (or extended) solution x(t) is more than just continuous (even more than uniformly continuos) but less than contiuously differentiable (aka \mathcal C^1) – it is absolutely continuous.

  • -
  • It is a solution of the integral equation (indeed, an equation) x(t) = x(t_0) + \int_{t_0}^t f(x(\tau),\tau)\mathrm{d}\tau,
    -where we use Lebesque integral (instead of Riemann).

  • -
  • For a continuous f, solutions x are just classical (smooth).

  • -
  • f can be, however, “some kind of discontinuous” with respect to t. In particular, it must be measurable wrt t. It includes the case when f(x,t) is piecewise continuous with respect to t (sampled data control with ZOH).

  • -
  • If the function f is discontinuous with respect to x, some more concepts of a solution need to be invoked so that existence and uniqueness can be analyzed.

  • -
+

In contrast with the classical solution, we can allow the solution x(t) to fail to satisfy the ODE at some isolated points in time. This is called Carathéodory (or extended) solution.

+

Carathéodory solution x(t) is more than just continuous (even more than uniformly continuous) but less than contiuously differentiable (aka \mathcal C^1) – it is absolutely continuous. Absolutely continuous function is a solution of the integral equation (indeed, an equation) x(t) = x(t_0) + \int_{t_0}^t f(x(\tau),\tau)\mathrm{d}\tau,
+where we use Lebesgue integral (instead of Riemann).

+

Having referred to absolute continuity and Lebesgue integral, the discussion could quickly become rather technical. But all we want to say is that f can be “some kind of discontinuous” with respect to t. In particular, it must be measurable wrt t, which again seems to start escalating… But it suffices to say that it includes the case when f(x,t) is piecewise continuous with respect to t (sampled data control with ZOH).

+

Needles to say that for a continuous f, solutions x are just classical (smooth).

+

If the function f is discontinuous with respect to x, some more concepts of a solution need to be invoked so that existence and uniqueness can be analyzed.

-

Example 4 (Nonexistence and nonuniqueness of solutions) The system with discontinuous RHS +

Example 6 (Some more examples of nonexistence and nonuniqueness of solutions) The system with a discontinuous RHS \begin{aligned} \dot x_1 &= -2x_1 - 2x_2\operatorname*{sgn(x_1)},\\ \dot x_2 &= x_2 + 4x_1\operatorname*{sgn(x_1)} \end{aligned} -

-

can be reformulated as a switched system + can be reformulated as a switched system \begin{aligned} -\dot{\bm x} &= \begin{bmatrix}-2 & 2\\-4 & 1\end{bmatrix}\begin{bmatrix}x_1\\ x_2\end{bmatrix}, \; \bm x\leq 0\\ -\dot{\bm x} &= \begin{bmatrix}-2 & -2\\4 & 1\end{bmatrix}\begin{bmatrix}x_1\\ x_2\end{bmatrix}, \; \bm x> 0 +\dot{\bm x} &= \begin{bmatrix}-2 & 2\\-4 & 1\end{bmatrix}\begin{bmatrix}x_1\\ x_2\end{bmatrix}, \quad s(\bm x)\leq 0\\ +\dot{\bm x} &= \begin{bmatrix}-2 & -2\\4 & 1\end{bmatrix}\begin{bmatrix}x_1\\ x_2\end{bmatrix}, \quad s(\bm x)> 0, \end{aligned} -

+ where the switching function is s(\bm x) = x_1.

Show the code @@ -1020,38 +1049,45 @@

Sliding mode dynamics (on simple boundaries)

-
    -
  • Attractive sliding mode at \bm x_\mathrm{s}, if there is a trajectory that ends at \bm x_\mathrm{s}, but no trajectory that starts at \bm x_\mathrm{s}.
  • -
+

The previous example provided yet another illustration of a phenomenon of sliding, or a sliding mode. We say that there is an attractive sliding mode at \bm x_\mathrm{s}, if there is a trajectory that ends at \bm x_\mathrm{s}, but no trajectory that starts at \bm x_\mathrm{s}.

Generalized solutions (Filippov)

-
    -
  • x() is a Filippov solution on [t_0,t_1] if for almost all t +

    It is now high time to introduce yet another concept of a solution. A concept that will make it possible to model the sliding mode dynamics in a more rigorous way. Remember that when the state \bm x(t) slides along the boundary, it qualifies as a solution to neither of the two state equations in any sense we have discussed so far. But now comes the concept of Fillipov solution.

    +

    x() is a Filippov solution on [t_0,t_1] if for almost all t \dot x(t) \in \overline{\operatorname*{co}}\{f(x(t),t)\}, -

  • -
  • (Previous) example: \mathcal{S}^+ = \{\bm x \mid x_1=0 \land x_2\geq 0\} + where \overline{\operatorname*{co}} denotes the (closed) convex hull.

    +
    +

    Example 7 Consider the model in the previous example. The switching surfece, along which the solution slides, is given by \mathcal{S}^+ = \{\bm x \mid x_1=0 \land x_2\geq 0\}.

    +

    Now, Filippov solution must satisfy the following differential inclusion \begin{aligned} \dot{\bm x} &\in \overline{\operatorname*{co}}\{\bm A_1\bm x_1, \bm A_2\bm x_2\}\\ &= \alpha_1(t) \bm A_1\bm x_1 + \alpha_2(t) \bm A_2\bm x_2, \end{aligned} - where \alpha_1(t), \alpha_2(t) \geq 0, \alpha_1(t) + \alpha_2(t) = 1.

  • -
  • Not all weights keep the solution on \mathcal S^+.

    -
      -
    • We must have \dot x_1 = 0 for \bm x(t) \in \mathcal S^+: - \alpha_1(t) [-2x_1 + 2x_2] + \alpha_2(t) [-2x_1 - 2x_2] = 0 -
    • -
  • -
  • Combining with \alpha_1(t) + \alpha_2(t) = 1: -\alpha_1(t) = \alpha_2(t) = 1/2. -

  • -
  • The dynamics on the sliding mode is + where \alpha_1(t), \alpha_2(t) \geq 0, \alpha_1(t) + \alpha_2(t) = 1.

    +

    Note, however, that not all the weights keep the solution on \mathcal S^+. We must impose some restriction, namely that \dot x_1 = 0 for \bm x(t) \in \mathcal S^+. This leads to +\alpha_1(t) [-2x_1 + 2x_2] + \alpha_2(t) [-2x_1 - 2x_2] = 0 +

    +

    Combining this with \alpha_1(t) + \alpha_2(t) = 1 gives +\alpha_1(t) = \alpha_2(t) = 1/2, + which in this simple case perhaps agrees with our intuition (the average of the two vector fields).

    +

    The dynamics on the sliding mode is modelled by \dot x_1 = 0, \quad \dot x_2 = x_2, \quad \bm x \in \mathcal{S}^+. -

  • -
-
-
-

Possible nonuniqueness on intersection of boundaries

+

+ +
+
+
+ +
+
+Possible nonuniqueness on intersection of boundaries +
+
+
+

+
+
diff --git a/classes_switched_files 7/figure-html/cell-2-output-1.svg b/classes_switched_files 7/figure-html/cell-2-output-1.svg new file mode 100644 index 0000000..472be4e --- /dev/null +++ b/classes_switched_files 7/figure-html/cell-2-output-1.svg @@ -0,0 +1,18990 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/classes_switched_files 7/figure-html/cell-4-output-1.svg b/classes_switched_files 7/figure-html/cell-4-output-1.svg new file mode 100644 index 0000000..9544b72 --- /dev/null +++ b/classes_switched_files 7/figure-html/cell-4-output-1.svg @@ -0,0 +1,19110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/classes_switched_files 7/figure-html/cell-5-output-1.svg b/classes_switched_files 7/figure-html/cell-5-output-1.svg new file mode 100644 index 0000000..3791942 --- /dev/null +++ b/classes_switched_files 7/figure-html/cell-5-output-1.svg @@ -0,0 +1,19330 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/classes_switched_files 7/figure-html/cell-6-output-1.svg b/classes_switched_files 7/figure-html/cell-6-output-1.svg new file mode 100644 index 0000000..739f2e3 --- /dev/null +++ b/classes_switched_files 7/figure-html/cell-6-output-1.svg @@ -0,0 +1,38566 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/complementarity_constraints 6.html b/complementarity_constraints 6.html new file mode 100644 index 0000000..64796c9 --- /dev/null +++ b/complementarity_constraints 6.html @@ -0,0 +1,1266 @@ + + + + + + + + + +Complementarity constraints – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Complementarity constraints

+
+ + + +
+ + + + +
+ + + +
+ + +
+

Why complementarity constraints?

+

In this chapter we are going to present yet another framework for modelling hybrid systems, which comes with a rich theory and efficient algorithms. It is based on complementarity constraints. Before we introduce the modelling framework in the next section, we first explain the very concept of complementarity constraints and the related optimization problems.

+
+
+

Definition of complementarity constraints

+

Two variables x\in\mathbb R and y\in\mathbb R satisfy the complementarity constraint if x or y is equal to zero and both are nonnegative

+

xy=0, \; x\geq 0,\; y\geq 0,

+

or, using a dedicated compact notation
+\boxed{0\leq x \perp y \geq 0.}

+
+
+
+ +
+
+Both variables can be zero +
+
+
+

The or in the above definition is not exclusive, therefore it is possible that both x and y are zero.

+
+
+

The concept and notation extends to vectors x\in\mathbb R^n and y\in\mathbb R^n, in which case the constraint is interpreted componentwise \boxed{\bm 0\leq \bm x \perp \bm y \geq \bm 0.}

+
+
+

Geometric interpretation of complementarity constraints

+

The set of admissible pairs (x,y) in the \mathbb R^2 plane is constrained to the L-shaped subset given by the nonnegative x and y semi-axes (including the origin).

+
+
+

+
The set of solutions satisfying a complementarity constraint
+
+
+

Optimization over these constraints is difficult, and not only because the feasible set is nonconvex, but also because constraint qualification conditions are not satisfied. Still, some results and tools are available for some classes of optimization problems with these constraints.

+
+
+

Linear complementarity problem (LCP)

+

For a given square matrix \mathbf M and a vector \mathbf q , the linear complementarity problem (LCP) asks for finding two vectors \bm w and \bm z satisfying + \begin{aligned} + \bm w-\mathbf M\bm z &= \mathbf q \\ + \bm 0 \leq \bm w &\perp \bm z \geq \bm 0. + \end{aligned} +

+

Just by moving all the provided data to the right hand side we get + \begin{aligned} + \bm w &= \underbrace{\mathbf M\bm z + \mathbf q}_{\mathbf f(\bm z)} \\ + \mathbf 0 \leq \mathbf f(\bm z) &\perp \bm z \geq \mathbf 0, + \end{aligned} +
+from which we can immediately guess how the linear problem needs to be modified so that we get a nonlinear complementarity problem (NLCP).

+
+
+

Existence of a unique solution

+

A unique solution exists for every vector \mathbf q if and only if the matrix \mathbf M is a P-matrix (something like positive definite, but not exactly, look it up yourself).

+
+ +
+

Nonlinear complementarity problem

+

Given a vector function \mathbf f: \mathbb R^n\rightarrow \mathbb R^n, find a vector \bm x\in\mathbb R^n satisfying +\bm 0\leq \bm x \perp \mathbf f(\bm x) \geq \bm 0. +

+
+
+

Mixed complementarity problem (MCP)

+

An extension of complementarity constraint to the situation in which the variable x is lower- and upper-bounded. In particular, it can be stated as + l \leq x \leq u \perp f(x). +

+

The convention for interpretation is

+
    +
  • If x is strictly within the interval, that is, l < x < u , then f(x)=0,
  • +
  • If x=l , then f(x)\geq 0 ,
  • +
  • if x=u , then f(x)\leq 0 .
  • +
+
+
+

Extended linear complementarity problem (ELCP)

+

Given some matrices \mathbf A and \mathbf B , vectors \mathbf c and \mathbf d , and m subsets \phi_j \sub \{1,2,\ldots,p\} , find a vector \bm x such that + \begin{aligned} + \sum_{j=1}^m\prod_{i\in\phi_j}(\mathbf A\bm x - \mathbf c)_i &= 0,\\ + \mathbf A\bm x &\geq \mathbf c,\\ + \mathbf B\bm x &= \mathbf d, + \end{aligned} +
+or show that no such \bm x exists.

+

The first equation is equivalent to +\forall j \in \{1, \ldots, m\} \; \exist i \in \phi_j \;\text{such that} \; (\mathbf A\bm x − \mathbf c)_i = 0. +

+

Geometric interpretation: union of some faces of a polyhedron.

+
+
+

Mathematical program with complementarity constraints (MPCC)

+

The mathematical program with complementarity constraints (MPCC) is + \begin{aligned} + \operatorname*{minimize}_{\bm x\in\mathbb R^n} & \;f(\bm x)\\ + \text{subject to} & \;0\leq h(\bm x) \perp g(\bm x) \geq 0. + \end{aligned} +

+

Special case of Mathematical program with equilibrium constraints (MPEC).

+
+
+

Mathematical program with equilibrium constraints (MPEC)

+

Optimization problem in which some variable should satisfy equilibrium constraints: + \begin{aligned} + \min_{x_1,x_2} &\; f(x_1,x_2)\\ + \text{subject to}&\; \nabla_{x_2} \phi(x_1,x_2) = 0 + \end{aligned} +

+

For convex \phi() it can be reformulated into a Bilevel optimization problem.

+
+
+

Bilevel optimization

+

Optimization problem in which some variables are constrained to be results of some inner optimization. In the simplest form +\begin{aligned} + \min_{x_1,x_2} &\; f(x_1,x_2)\\ + \text{s. t.}\ &\; x_2 = \text{arg}\,\min_{x_2} \;\phi(x_1,x_2) +\end{aligned} +

+
+
+

Disjunctive constraints

+

A number of affine constraints combined with \lor and \land logical operators.

+

+T_1 \lor T_2 \lor \ldots \lor T_m, + where +T_i = T_{i1} \land T_{i1} \land \ldots \land T_{in_{i}}, + where +T_{ij} = c_{ij}x + d_{ij} \in \mathcal D_{ij}. +

+ + +
+ + Back to top
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/complementarity_references 9.html b/complementarity_references 9.html new file mode 100644 index 0000000..134a94e --- /dev/null +++ b/complementarity_references 9.html @@ -0,0 +1,1108 @@ + + + + + + + + + +Literature – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Literature

+
+ + + +
+ + + + +
+ + + +
+ + +

Concise (short and yet sufficient for our purposes) introduction to (linear) complementarity problems and systems is in [1]. Besides describing the idea of complementarity in dynamical systems, it also shows how it is related to other modeling frameworks for hybrid dynamical systems. More detailed and yet very accessible introduction is in the thesis [2]. Condensed treatment is in the papers [3] and [4].

+

A readable introduction to the Extended Linear Complementarity Problem is in [5] (it is also freely available as a technical report).

+

The topics of complementarity constraints in dynamical systems and optimization is still being actively researched. A recent publication on QP optimization with complementarity constraints (LCQP) is [6].

+

Numerical methods for nonsmooth dynamical systems that are based on complementary constraints (and implemented in SICONOS software) are comprehensively presented in [7].

+ + + + + Back to top

References

+
+
[1]
W. P. M. H. Heemels, B. De Schutter, and A. Bemporad, “Equivalence of hybrid dynamical models,” Automatica, vol. 37, no. 7, pp. 1085–1091, Jul. 2001, doi: 10.1016/S0005-1098(01)00059-0.
+
+
+
[2]
M. Heemels, Linear complementarity systems: a study in hybrid dynamics,” PhD thesis, Technische Universiteit Eindhoven, Eindhoven, NL, 1999. Available: https://heemels.tue.nl/content/papers/Hee_TUE99a.pdf
+
+
+
[3]
W. P. M. H. Heemels, J. M. Schumacher, and S. Weiland, “Linear Complementarity Systems,” SIAM Journal on Applied Mathematics, vol. 60, no. 4, pp. 1234–1269, Jan. 2000, doi: 10.1137/S0036139997325199.
+
+
+
[4]
A. J. van der Schaft and J. M. Schumacher, “Complementarity modeling of hybrid systems,” IEEE Transactions on Automatic Control, vol. 43, no. 4, pp. 483–490, Apr. 1998, doi: 10.1109/9.664151.
+
+
+
[5]
B. De Schutter and B. De Moor, “The Extended Linear Complementarity Problem and the Modeling and Analysis of Hybrid Systems,” in Hybrid Systems V, P. Antsaklis, M. Lemmon, W. Kohn, A. Nerode, and S. Sastry, Eds., in Lecture Notes in Computer Science. Berlin, Heidelberg: Springer, 1999, pp. 70–85. doi: 10.1007/3-540-49163-5_4.
+
+
+
[6]
J. Hall, A. Nurkanovic, F. Messerer, and M. Diehl, LCQPowA Solver for Linear Complementarity Quadratic Programs.” arXiv, Nov. 2022. Accessed: Dec. 03, 2022. [Online]. Available: http://arxiv.org/abs/2211.16341
+
+
+
[7]
V. Acary and B. Brogliato, Numerical Methods for Nonsmooth Dynamical Systems: Applications in Mechanics and Electronics. in Lecture Notes in Applied and Computational Mechanics, no. 35. Berlin Heidelberg: Springer, 2008. Available: https://doi.org/10.1007/978-3-540-75392-6
+
+
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/complementarity_simulations.html b/complementarity_simulations.html index b794729..fac6848 100644 --- a/complementarity_simulations.html +++ b/complementarity_simulations.html @@ -754,46 +754,46 @@

Simulation - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + @@ -806,49 +806,49 @@

Simulation - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -911,48 +911,48 @@

- + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1117,54 +1117,54 @@

9 possibl - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1250,56 +1250,56 @@

Another

- + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1346,62 +1346,62 @@

All nine regio - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1448,80 +1448,80 @@

So - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/complementarity_systems 6.html b/complementarity_systems 6.html new file mode 100644 index 0000000..69ab99f --- /dev/null +++ b/complementarity_systems 6.html @@ -0,0 +1,1355 @@ + + + + + + + + + +Complementarity systems – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Complementarity systems

+
+ + + +
+ + + + +
+ + + +
+ + +
+

Linear complementarity system (LCS)

+

Having introduced the complementarity constraints and optimization problems with these constraints, we can now show how these constraints can be used to model a certain class of dynamical systems – complementarity dynamical systems. We start with linear ones, namely, linear complementarity systems (LCS). These are also called in the literature as Linear dynamical complementarity problems (LDCP).

+

Linear complementarity system is modelled by \boxed{ +\begin{aligned} +\dot x(t) &= A x(t) + Bu(t)\\ +y(t) &= C x(t) + Du(t)\\ +0&\leq u(t) \perp y(t) \geq 0. +\end{aligned}} +\tag{1}

+
+

Example 1 (Electrical circuit with a diode as an LCS)  

+
+
+

+
Electrical circuit to be modelled as an LCS
+
+
+

Note the upside-down orientation of the voltage and the current for the capacitor – we wanted the diode current identical to the capacitor current.

+

Following the charge formalism within Lagrangian modelling, we can choose the generalized coordinates as + q = \begin{bmatrix} + q_L \\ q_C + \end{bmatrix}. +

+

That this is indeed a sufficient number is obvious, but we can also check the classical formula B-N+1 = 4-3+1 = 2. But we can also choose the state variables as + x = \begin{bmatrix} + i_L\\ q_c + \end{bmatrix}. +

+

The resulting state equations are +\begin{aligned} +i_L' &= -\frac{1}{LC}q_C - \frac{1}{L}u_D\\ +q_C' &= i_L - \frac{1}{RC} q_C - \frac{1}{R} u_D. +\end{aligned} +

+

The idealized volt-ampere characteristics of the diode is

+
+
+

+
Ideal volt-ampere characteristic of a diode
+
+
+

Flipping the axes to get the current as the horizontal axis, we get

+
+
+

+
Flipped volt-ampere characteristic of a diode
+
+
+

Finally, after introducing an auxiliary variable (the reverse voltage of the diode) \bar u_D = -u_D , we get the desired dependence

+
+
+

+
Yet another reformatted VA characteristic of a diode
+
+
+

which can be modelled as a complementarity constraint
+ +0\leq i_D \perp \bar u_D \geq 0. +

+

Now, upon replacing the diode voltage with its reverse \bar u_D while using i_D=i_C, we get +\begin{aligned} +i_L' &= -\frac{1}{LC}q_C + \frac{1}{L} \bar u_D\\ +q_C' &= i_L - \frac{1}{RC} q_C + \frac{1}{R} \bar u_D\\ +0&\leq q_C' \perp \bar u_D \geq 0. +\end{aligned} +

+

We are not there yet – there is a derivative in the complementarity constraint. But just substitute for it: +\begin{aligned} +i_L' &= -\frac{1}{LC}q_C + \frac{1}{L} \bar u_D\\ +q_C' &= i_L - \frac{1}{RC} q_C + \frac{1}{R} \bar u_D\\ +0&\leq i_L - \frac{1}{RC} q_C + \frac{1}{R} \bar u_D \perp \bar u_D \geq 0, +\end{aligned} +
+and voila, we finally got the LCS description. We can also reformat it into the vector format +\begin{aligned} +\begin{bmatrix} +i_L' \\ q_C' +\end{bmatrix} &= +\begin{bmatrix} +0 &-\frac{1}{LC}\\ +1 & - \frac{1}{RC} +\end{bmatrix} +\begin{bmatrix} +i_L \\ q_C +\end{bmatrix} + +\begin{bmatrix} +\frac{1}{L}\\ +\frac{1}{R} +\end{bmatrix} +\bar u_D\\ +0 &\leq \left(\begin{bmatrix} +1 & - \frac{1}{RC} +\end{bmatrix} +\begin{bmatrix} +i_L \\ q_C +\end{bmatrix} + +\begin{bmatrix} +\frac{1}{L}\\ +\frac{1}{R} +\end{bmatrix} +\bar u_D\right ) \bot \bar u_D \geq 0. +\end{aligned} +

+
+
+

Example 2 (Mass-spring system with a hard stop as a linear complementarity system) Two carts moving horitontally (left or right) are interconnected through a spring. The left cart is also interconnected with the wall through a another spring. Furthemore, the motion of the left cart is constrained in that there is a hard stop that prevents the cart from moving further to the left. The setup is shown in Fig. 1.

+
+
+
+ +
+
+Figure 1: Mass-spring system with a hard stop to be modelled as a LCS +
+
+
+

The variables x_1 and x_2 give deviations of the two carts from their equilibrium positions.

+

The hard stop is located at the equilibrium position of the left cart.

+

Besides the two positions, their derivatives are also introduced as state vectors. The input u corresponds to the reaction force of the hard stop.

+

As the output, only the position of the left cart is (arbitrarily) chosen.

+

The state equations and the output equation are + \begin{aligned} + \dot x_1(t) &= x_3\\ + \dot x_2(t) &= x_4\\ + \dot x_3(t) &= -\frac{k_1+k_2}{m_1}x_1(t) + \frac{k_2}{m_1}x_2(t) + \frac{1}{m_1}u(t)\\ + \dot x_4(t) &= \frac{k_2}{m_2}x_1(t) - \frac{k_2}{m_2} x_2(t)\\ + y(t) &= x_1(t). + \end{aligned} +

+

The presence of the hard stop can be modelled as an inequality constraint on the state (or the output in this case) x_1(t) = y(t) \geq 0.

+

Strictly speaking, similar constraint should also be imposed on the right cart. That one can not overcome the hard stop either. Furthermore, the left cart would stand in the way too. But we ignore it here for the sake of simplicity of our explanation.

+

The reaction force u can only be nonnegative + u(t) \geq 0. +

+

Furthermore, the reaction force is acting if and only if the left cart hits the hard stop, that is,
+ + y(t) u(t) = 0. +

+

All the above three constraints can be written compactly as a complementarity constraing + 0\leq y(t) \perp u(t) \geq 0. +

+
+
+
+

Complementarity system as a feedback interconnection

+

A complementarity system Eq. 1 can be seen as a feedback interconnection of a linear system and a complementarity constraint.

+
+
+

+
Complementarity system as a feedback interconnection
+
+
+
+
+

Complementarity systems vs PWA and max-plus linear systems

+

Consider the feedback interconnection of a dynamical system and the max(y,u) function in the feedback loop as in Fig. 2.

+
+
+
+ +
+
+Figure 2: Feedback interconnection of a dynamical system and a nonlinearity +
+
+
+

We now express the original y as a difference of two nonnegative variable satisfying the complementarity constraint +y = y^+ - y^-,\quad 0 \leq y^+ \bot y^- \geq 0. +

+

The motivation for this was that with the new variables y^+ and y^-, the max function can be expressed as +\max(y,0) = \max(y^+ - y^-, 0) = y^+. +

+

Now, set y^+ = u and then +y = u - y^-, + from which +y^- = u - y + and therefore the original feedback interconnection can be rewritten as

+
+
+

+
Feedback interconnection equivalent to the one with max(y,0)
+
+
+
+
+

More complicated PWA functions in feedback

+

The function \max(y,0) that we have just considered is a very simple piecewise affine (PWA) function. But we can consider more complicated PWA functions. Only a little bit complicated PWA function is in Fig. 3.

+
+
+
+ +
+
+Figure 3: A simple piecewise affine function +
+
+
+

The function is defined by shifting and scaling the original \max(y,0) function: +u(y) = k_1 \max(y-y_1,0) = \max(k_1(y-y_1),0). +

+

We can now enforce complementarity based on this function in the feedback loop, see Fig. 4.

+
+
+
+ +
+
+Figure 4: Feedback system with a shifted PWA function modelled as complementarity constraint +
+
+
+

This procedure can be extended towards PWA functions composed of several segments, see Fig. 5.

+
+
+
+ +
+
+Figure 5: PWA function with multiple segments +
+
+
+

The function is defined as +\begin{aligned} +u(y) &= k_0 y + u_0 + (k_1-k_0) \max(y-y_1,0) \\ +&\qquad + (k_2-k_1) \max(y-y_2,0)\\ +&= k_0 y + u_0 + \underbrace{\max((k_1-k_0)(y-y_1),0)}_{u_1}\\ +&\qquad + \underbrace{\max((k_2-k_1)(y-y_2),0)}_{u_2} +\end{aligned} + and the feedback interconnection now contain several parallel paths with complementarity constraints as in Fig. 6

+
+
+
+ +
+
+Figure 6: Feedback system with multiple-segment PWA modelled as complementarity constraints +
+
+
+ + +
+ + Back to top
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/des_automata 9.html b/des_automata 9.html new file mode 100644 index 0000000..e04a64f --- /dev/null +++ b/des_automata 9.html @@ -0,0 +1,3339 @@ + + + + + + + + + +State automata – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

State automata

+
+ + + +
+ + + + +
+ + + +
+ + +

Having just discussed the concept of a discrete-event system, we now introduce the most popular modeling framework for such systems: a state automaton, or just an automaton (plural automata). It is also known as a state machine or a (discrete) transition system.

+
+

Definition 1 (Automaton) Automaton is a tuple \boxed{ +G = \{\mathcal X,\mathcal X_0,\mathcal E,\mathcal F\},} +
+where

+
    +
  • \mathcal X is the set of states (also called modes or locations).
  • +
  • \mathcal X_0 \subseteq \mathcal X is the set of initial states.
  • +
  • \mathcal E is the set of events (also actions, transition labels, symbols). It is also called alphabet.
  • +
  • \mathcal F\subseteq \mathcal X \times \mathcal E \times \mathcal X is the set of transitions. In the deterministic case it can also be narrowed down to a transition function f:\mathcal X \times \mathcal E \rightarrow \mathcal X. Note that f is then is a partial function, it is not necessarily defined for all combinations of states and events. Sometimes f is used even for multivalued functions: f:\mathcal X \times \mathcal E \rightarrow 2^\mathcal{X}, where 2^\mathcal{X} is a power set (a set of all subsets of X).
  • +
+
+
+
+
+ +
+
+Some comments on the notation +
+
+
+
    +
  • The set of states is often denoted by \mathcal Q to spare the letter \mathcal X for the continuous valued state space of hybrid systems.
  • +
  • The set of events is often denoted by \mathcal A to spare the letter \mathcal E for the set of transitions (edges in the corresponding graph), because F and f may also need to be spared for the continuous-valued transitions. But then the letter \mathcal A actually fits this purpose nicely because the event set is also called the alphabet.
  • +
+
+
+
+

Marked states

+

In some literature, the definition of the automaton also includes a set \mathcal X_\mathrm{m} \subseteq \mathcal X of marked or accepting states, in which case the definition of an automaton now includes three (sub)sets of states: \mathcal X, \mathcal X_0 and \mathcal X_\mathrm{m}. \boxed{ +G = \{\mathcal X,\mathcal X_0,\mathcal E,\mathcal F, \mathcal X_\mathrm{m}\}.} +

+

The marked states are just some states with special roles in the system. Namely, these are the states into which the system should be controlled. I do not particularly like this idea of mixing the model of the system with the requirements, but some part of the community likes it this way.

+
+
+

Automaton as a (di)graph (also a state transition diagram)

+

So far the definition of an automaton was not particularly visual. This can be changes by viewing the automaton as a directed graph (digraph) with. These are the basic rules

+
    +
  • State is represented as a node of the graph.
  • +
  • Transition from a given state to another state is represented as an edge connecting the two nodes.
  • +
  • Events (actions) are the labels attached to the edges. It is not necessary that each edge has its unique label.
  • +
+
+

Example 1 (Automaton as a digraph) Consider an automaton defined by these sets: \mathcal X = \{x_1,x_2,x_3\}, \mathcal X_0 = \{x_1\}, \mathcal E = \{e_1,e_2,e_3\}, \mathcal F = \{(x_1,e_1,x_2),(x_2,e_2,x_1),(x_1,e_3,x_3),(x_2,e_2,x_3)\}.

+

The corresponding digraph is in Fig 1.

+
+
+
+
+
+
+ + +G + + +init +init + + + +x₁ + +x₁ + + + +init->x₁ + + + + + +x₂ + +x₂ + + + +x₁->x₂ + + +e₁ + + + +x₃ + +x₃ + + + +x₁->x₃ + + +e₂ + + + +x₂->x₁ + + +e₂ + + + +x₂->x₃ + + +e₃ + + + +
+
+
+Figure 1: An example automaton as a digraph +
+
+
+
+
+
+

We may also encounter the following term.

+
+

Definition 2 (Active event function and set) Active event function (actually a multivalued function) \Gamma: \mathcal X \rightarrow 2^\mathcal{E} assigns to each state a set of active events. Active event set \Gamma(x) is the set of active events in a particular state x.

+
+
+
+

Finite state automaton (FSA)

+

This may be regarded as a rather superfluous definition – a finite state automaton (FSA) is a state automaton with a finite set \mathcal X of states. It is also known as a finite state machine (FSM).

+
+
+

Execution of an automaton

+
    +
  • x_1\xrightarrow{e_1} x_2\xrightarrow{e_2} x_1 \xrightarrow{e_1} x_2 \xrightarrow{e_4} x_3\ldots
  • +
  • Sometimes also written as x_1,e_1,x_2,e_2,\ldots
  • +
+
+
+
+
+ +
+
+Notational confusion +
+
+
+

Here x_k for some k is the name of a particular state. It is not the name of a (yet to be introduced) state variable; In fact, it can be viewed as its value (also valuation).

+
+
+
    +
  • Some authors strictly distinguish between the state variable and the state (variable valuation), +
      +
    • similarly as in probability theory random variable X vs its value x, as in F(x) = P(X\leq x);
    • +
  • +
  • some do not, but then it may lead to confusion;
  • +
  • yet some others avoid the problem by not introducing state variables and only working with enumerated states.
  • +
+
+
+
+
+ +
+
+Notational confusion 2 +
+
+
+

Even worse, it is also tempting to interpret the lower index k as (discrete) time, but nope, in the previous k is not the time index.

+

Again, some authors do not distinguish…

+
+
+
+
+

Path of an automaton

+

Corresponding to the execution

+

x_1\xrightarrow{e_1} x_2\xrightarrow{e_2} x_1 \xrightarrow{e_1} x_2 \xrightarrow{e_4} x_3\ldots

+

the path is just the sequence of visited states:

+

x_1,x_2,x_1,x_2,x_3,\ldots

+
+

In continuous-valued dynamical systems, we have a state trajectory, but then time stamps are attached to each visited state.

+
+
+

Example 2 (Beverage vending machine)  

+
+
+
+
+
+
+ + +G + + +init +init + + + +waiting + +waiting + + + +init->waiting + + + + + +swiped + +swiped + + + +waiting->swiped + + +swipe card + + + +swiped->waiting + + +reject payment + + + +paid + +paid + + + +swiped->paid + + +accept payment + + + +coke_dispensed + +coke_dispensed + + + +paid->coke_dispensed + + +choose coke + + + +fanta_dispensed + +fanta_dispensed + + + +paid->fanta_dispensed + + +choose fanta + + + +coke_dispensed->waiting + + +take coke + + + +fanta_dispensed->waiting + + +take fanta + + + +
+
+
+Figure 2: Example of a digraph representation of the automaton for a beverage vending machine +
+
+
+
+
+
    +
  • State sequence (path): waiting, swiped, paid, coke_dispensed, waiting

  • +
  • Events sequence: swipe card, accept payment, choose coke, take coke

  • +
  • Indeed, the two states coke_dispensed and fanta_dispensed can be merged into just beverage_dispensed.

  • +
  • How about other paths? Longer? Shorter?

  • +
+
+
+
+
+
+
+ + +G + + +init +init + + + +waiting + + +waiting + + + +init->waiting + + + + + +swiped + +swiped + + + +waiting->swiped + + +swipe card + + + +swiped->waiting + + +reject payment + + + +paid + +paid + + + +swiped->paid + + +accept payment + + + +coke_dispensed + +coke_dispensed + + + +paid->coke_dispensed + + +choose coke + + + +fanta_dispensed + +fanta_dispensed + + + +paid->fanta_dispensed + + +choose fanta + + + +coke_dispensed->waiting + + +take coke + + + +fanta_dispensed->waiting + + +take fanta + + + +
+
+
+Figure 3: Example of a digraph representation of the automaton for a beverage vending machine with a marked state +
+
+
+
+
+

The waiting state can be marked (is accepting).

+
+
+

Example 3 (Longitudinal control of a ground vehicle)  

+
+
+
+
+
+
+ + +G + + +init +init + + + +still + +still + + + +init->still + + + + + +accelerating + +accelerating + + + +still->accelerating + + +push acc + + + +cruising + +cruising + + + +accelerating->cruising + + +cruise ON + + + +coasting + +coasting + + + +accelerating->coasting + + +rel acc + + + +cruising->accelerating + + +push acc + + + +cruising->coasting + + +rel acc + + + +braking + +braking + + + +cruising->braking + + +push brake + + + +coasting->braking + + +push brake + + + +braking->still + + +zero vel + + + +braking->cruising + + +cruise ON + + + +braking->coasting + + +rel brake + + + +
+
+
+Figure 4: Example of a digraph representation of the automaton for a longitudinal control of a ground vehicle +
+
+
+
+
+
+
+
    +
  • By cruise on I mean switching on some kind of a cruise control system, which keeps the velocity constant.
  • +
  • It turns out the optimal control strategy for trains (under some circumstances).
  • +
  • Note that some of the events are indeed actions started by the driver, but some are just coming from the physics of the vehicle (transition from braking to zero velocity).
  • +
+
+
+

Example 4 (Corridor switch)  

+
+
+
+
+
+
+ + +G + + +init +init + + + +OFF + +OFF + + + +init->OFF + + + + + +ON + +ON + + + +OFF->ON + + +switch₁,switch₂ + + + +ON->OFF + + +switch₁,switch₂ + + + +
+
+
+Figure 5: Example of a digraph representation of the automaton for a corridor switch +
+
+
+
+
+

Two events associated with one transitions can be seen as two transitions, each with a single event, both sharing the starting and ending states.

+
+
+

Example 5 (JK flip-flop) We now consider the classical JK flip-flop logical circuit. It symbol is in Fig 7 and the truth table follows. Our goal is to represent its functionality using a state automaton.

+
+
+
+ +
+
+Figure 6: Symbol for a JK flip-flop logical circuit +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
JKQ_kQ_{k+1}Description
0000No change
0011No change
0100Reset
0110Reset
1001Set
1011Set
1101Toggle
1110Toggle
+
+
+
+
+
+
+ + +G + + +init +init + + + +Low + +Low + + + +init->Low + + + + + +Low->Low + + +¬J ∧ ¬K ∧ clk + + + +High + +High + + + +Low->High + + +J ∧ clk + + + +High->Low + + +K ∧ clk + + + +High->High + + +¬J ∧ ¬K ∧ clk + + + +
+
+
+Figure 7: JK flip-flop as an automaton +
+
+
+
+
+
+
+

Example 6 (Double intensity switching)  

+
+
+
+
+
+
+ + +G + + +init +init + + + +OFF + +OFF + + + +init->OFF + + + + + +ON + +ON + + + +OFF->ON + + +push + + + +ON->OFF + + +push + + + +ON2 + +ON2 + + + +ON->ON2 + + +push + + + +ON2->OFF + + +push + + + +
+
+
+Figure 8: Example of a digraph representation of the automaton for double intensity switching +
+
+
+
+
+

Obviously we need to introduce time into the automaton…

+
+
+
+

State as the value of a state variable

+

Definition of the state space by enumeration (such as \mathcal X = \{0,1,2,3,4,5\}) doesn’t scale well. As an alternative, a state can be characterized by the value (sometimes also valuation) of a state variable. A state variable is then given by

+
    +
  • the name (for example, x),
  • +
  • the “type” (boolean, integer, vector, …).
  • +
+
+

Example 7 (Examples of state variables)  

+
    +
  • Corridor switch: x \in \{\mathrm{false},\mathrm{true}\} (possibly also \{0,1\}).
  • +
  • Double intensity switching: +
      +
    • x \in \{0,1,2\} \subset \mathbb Z,
    • +
    • or \bm x = \begin{bmatrix}x_1\\ x_2 \end{bmatrix}, where x_1,x_2 \in \{0,1\}.
    • +
  • +
+
+
+
+

State (transition) equation

+

Denoting a new state after a transition as x^+, the state equation reads \boxed{x^+ = f(x,e)}

+

Upon introduction of discrete-time (index) k, it can also be rewritten as x_{k+1} = f(x_k,e_k) or also x[k+1] = f(x[k],e[k]).

+
+
+
+ +
+
+Note +
+
+
+
    +
  • The function f can be defined by a computer code rather than a clean mathematical formula.
  • +
  • The discrete-time index of the event is sometimes considered shifted, that is x_{k+1} = f(x_k,e_{k+1}). You should be aware of this.
  • +
+
+
+
+
+

Extensions

+

The concept of an automaton can be extended in several ways. In particular, the following two extensions introduce the concept of an output to an automaton.

+
+

Moore machine

+

One extension of an automaton with outputs is Moore machine. The outputs assigned to the states by the output function y = g(x).

+

The output is produced (emitted) when the (new) state is entered.

+

Note, in particular, that the output does not depend on the input. This has a major advantage when a feedback loop is closed around this system, since no algebraic loop is created.

+

Graphically, we make a conventions that outputs are the labels of the states.

+
+

Example 8 (Moore machine) The following automaton has just three states, but just two outputs (FLOW and NO FLOW).

+
+
+
+
+
+
+ + +G + + +init +init + + + +closed + +NO FLOW +Valve +closed + + + +init->closed + + + + + +partial + +FLOW +Valve +partially +open + + + +closed->partial + + +open valve one turn + + + +partial->closed + + +close valve one turn + + + +full + +FLOW +Valve +fully open + + + +partial->full + + +open valve one turn + + + +full->closed + + +emergency shut off + + + +full->partial + + +close valve one turn + + + +
+
+
+Figure 9: Example of a digraph representation of the Moore machine for a valve control +
+
+
+
+
+
+
+
+

Mealy machine

+

Mealy machine is another extension of an automaton. Here the outputs are associated with the transitions rather than the states.

+

Since the events already associated with the states can be viewed as the inputs, we now have input/output transition labels. The transition label e_\mathrm{i}/e_\mathrm{o} on the transion from x_1 to x_2 reads as “the input event e_\mathrm{i} at state x_1 activates the transition to x_2, which outputs the event e_\mathrm{o}” and can be written as x_1\xrightarrow{e_\mathrm{i}/e_\mathrm{o}} x_2.

+

It can be viewed as if the output function also considers the input and not only the state y = e_\mathrm{o} = g(x,e_\mathrm{i}).

+

In contrast with the Moore machine, here the output is produced (emitted) during the transition (before the new state is entered).

+
+

Example 9 (Mealy machine) Coffee machine: coffee for 30 CZK, machine accepting 10 and 20 CZK coins, no change.

+
+
+
+
+
+
+ + +G + + +init +init + + + +0 + +No coin + + + +init->0 + + + + + +10 + +10 CZK + + + +0->10 + + +insert 10 CZK / no coffee + + + +20 + +20 CZK + + + +0->20 + + +insert 20 CZK / no coffee + + + +10->0 + + +insert 20 CZK / coffee + + + +10->20 + + +insert 10 CZK / no coffee + + + +20->0 + + +insert 10 CZK / coffee + + + +20->10 + + +insert 20 CZK / coffee + + + +
+
+
+Figure 10: Example of a digraph representation of the Mealy machine for a coffee machine +
+
+
+
+
+
+
+

Example 10 (Reformulate the previous example as a Moore machine) Two more states wrt Mealy

+
+
+
+
+
+
+ + +G + + +init +init + + + +0 + +NO COFFEE +No +coin + + + +init->0 + + + + + +10 + +NO COFFEE +10 +CZK + + + +0->10 + + +insert 10 CZK + + + +20 + +NO COFFEE +20 +CZK + + + +0->20 + + +insert 20 CZK + + + +10->20 + + +insert 10 CZK + + + +30 + +COFFEE +10+20 +CZK + + + +10->30 + + +insert 20 CZK + + + +20->30 + + +insert 10 CZK + + + +40 + +COFFEE +20+20 +CZK + + + +20->40 + + +insert 20 CZK + + + +30->0 + + + + + +30->10 + + +insert 10 CZK + + + +30->20 + + +insert 20 CZK + + + +40->10 + + + + + +40->20 + + +insert 10 CZK + + + +40->30 + + +insert 20 CZK + + + +
+
+
+Figure 11: Example of a digraph representation of the Moore machine for a coffee machine +
+
+
+
+
+
+
+
+
+ +
+
+Note +
+
+
+

There are transitions from 30 and 40 back to 0 that are not labelled by any event. This does not seem to follow the general rule that transitions are always triggered by events. Not what? It can be resolved upon introducing time as the timeout transitions.

+
+
+
+

Example 11 (Dijkstra’s token passing) The motivation for this example is to show that it is perhaps not always productive to insist on visual description of the automaton using a graph. The four components of our formal definition of an automaton are just enough, and they translate directly to a code.

+

The example comes from the field of distributed computing systems. It considers several computers that are connected in ring topology, and the communication is just one-directional as Fig 12 shows. The task is to use the communication to determine in – a distributed way – which of the computers carries a (single) token at a given time. And to realize passing of the token to a neighbour. We assume a synchronous case, in which all the computers are sending simultaneously, say, with some fixed sending period.

+
+
+
+
+
+
+ + +G + + +0 + +0 + + + +1 + +1 + + + +0->1 + + + + + +2 + +2 + + + +1->2 + + + + + +3 + +3 + + + +2->3 + + + + + +3->0 + + + + + +
+
+
+Figure 12: Example of a ring topology for Dijkstra’s token passing in a distributed system +
+
+
+
+
+

One popular method for this is called Dijkstra’s token passing. Each computer keeps a single integer value as its state variable. And it forwards this integer value to the neighbour (in the clockwise direction in our setting). Upon receiving the value from the other neighbour (in the counter-clockwise direction), it updates its own value according to the rule displayed in the code below. At every clock tick, the state vector (composed of the individual state variables) is updated according to the function update!() in the code. Based on the value of the state vector, an output is computed, which decodes the informovation about the location of the token from the state vector. Again, the details are in the output() function.

+
+
+Show the code +
struct DijkstraTokenRing
+    number_of_nodes::Int64
+    max_value_of_state_variable::Int64
+    state_vector::Vector{Int64}
+end
+
+function update!(dtr::DijkstraTokenRing)                        
+    n = dtr.number_of_nodes
+    k = dtr.max_value_of_state_variable
+    x = dtr.state_vector
+    xnext = copy(x)
+    for i in eachindex(x)   # Mind the +1 shift. x[2] corresponds to x₁ in the literature.
+        if i == 1                                              
+            xnext[i] = (x[i] == x[n]) ? mod(x[i] + 1,k) : x[i]  # Increment if the left neighbour is identical.
+        else                                                    
+            xnext[i] = (x[i] != x[i-1]) ? x[i-1] : x[i]         # Update by the differing left neighbour.
+        end
+    end
+    dtr.state_vector .= xnext                                              
+end
+
+function output(dtr::DijkstraTokenRing)     # Token = 1, no token = 0 at the given position. 
+    x = dtr.state_vector
+    y = similar(x)
+    y[1] = iszero(x[1]-x[end])
+    y[2:end] .= .!iszero.(diff(x))
+    return y
+end
+
+
+
output (generic function with 1 method)
+
+
+

We now rund the code for a given number of computers and some initial state vector that does not necessarily comply with the requirement that there is only one token in the ring.

+
+
+Show the code +
n = 4                           # Concrete number of nodes.
+k = n                           # Concrete max value of a state variable (>= n).
+@show x_initial = rand(0:k,n)   # Initial state vector, not necessarily acceptable (>1 token in the ring).
+dtr = DijkstraTokenRing(n,k,x_initial)
+@show output(dtr)               # Show where the token is (are).
+
+@show update!(dtr), output(dtr) # Perform the update, show the state vector and show where the token is.
+@show update!(dtr), output(dtr) # Repeat a few times to see the stabilization.    
+@show update!(dtr), output(dtr)
+@show update!(dtr), output(dtr)
+@show update!(dtr), output(dtr)
+
+
+
x_initial = rand(0:k, n) = [3, 2, 4, 0]
+output(dtr) = [0, 1, 1, 1]
+(update!(dtr), output(dtr)) = ([3, 3, 2, 4], [0, 0, 1, 1])
+(update!(dtr), output(dtr)) = ([3, 3, 3, 2], [0, 0, 0, 1])
+(update!(dtr), output(dtr)) = ([3, 3, 3, 3], [1, 0, 0, 0])
+(update!(dtr), output(dtr)) = ([0, 3, 3, 3], [0, 1, 0, 0])
+(update!(dtr), output(dtr)) = ([0, 0, 3, 3], [0, 0, 1, 0])
+
+
+
([0, 0, 3, 3], [0, 0, 1, 0])
+
+
+

We can see that although initially the there can be more tokens, after a few iterations the algorithm achieves the goal of having just one token in the ring.

+
+
+
+

Extended-state automaton

+

Yet another extension of an automaton is the extended-state automaton. And indeed, the hyphen is there on purpose as we extend the state space.

+

In particular, we augment the state variable(s) that define the states/modes/locations (the nodes in the graph) by additional (typed) state variables: Int, Enum, Bool, …

+

Transitions from one mode to another are then guarded by conditions on theses new extra state variables.

+

Besides being guarded by a guard condition, a given transition can also be labelled by a reset function that resets the extended-state variables.

+
+

Example 12 (Counting up to 10) In this example, there are two modes (on and off), which can be captured by a single binary state variable, say x. But then there is an additional integer variable k, and the two variables together characterize the extended state.

+
+
+
+
+
+
+ + +G + + +init +init + + + +OFF + +OFF + + + +init->OFF + + +int k=0 + + + +ON + +ON + + + +OFF->ON + + +press + + + +ON->OFF + + +(press ⋁ k ≥ 10); k=0 + + + +ON->ON + + +(press ∧ k < 10); k=k+1 + + + +
+
+
+Figure 13: Example of a digraph representation of the extended-state automaton for counting up to ten +
+
+
+
+
+
+
+
+
+

Composing automata

+

Any practically useful modelling framework should support decomposition of a large system into smaller subsystems. These should then be able to communicate/synchronize with each other. In automata such synchronization can be realized by sending (or generating) and receiving (or accepting) events. A common choice of symbols for the two is !,?, as illustrated in the following example. But these symbols are just one possible convention, and any other symbols can be used.

+
+

Example 13 (Composing automata)  

+
+
+
+
+
+
+ + +G + + +init +init + + + +1 + +1 + + + +init->1 + + + + + +2 + +2 + + + +1->2 + + +press? + + + +3 + +3 + + + +3->3 + + +press! + + + +
+
+
+Figure 14: Example illustrating how two automata can be synchronized by sending and receiving events +
+
+
+
+
+
+
+
+

Languages and automata

+

When studying automata, we often encounter the concept of a language. Indeed, the concept of an automaton is heavily used in the formal laguage theory. Although in our course we are not going to refer to these results, some resources we recommend for our courses do, and so it is useful to understand how automata and languages are related.

+

First, we extend the definition of a transition function in that it accepts the current state and not just a single event but a sequence of events, that is

+

+f: \mathcal X \times \mathcal E^\ast \rightarrow \mathcal X, + where \mathcal E^\ast stands for the set of all possible sequences of events.

+

Language generated by the automaton is +\mathcal L(\mathcal G) = \{s\in\mathcal E^\ast \mid f(x_0,s) \;\text{is defined}\} +

+

Language marked by the automaton (the automaton is accepting or recognizing that language) +\mathcal L_\mathrm{m}(\mathcal G) = \{s\in\mathcal L(\mathcal G) \mid f(x_0,s) \in \mathcal{X}_\mathrm{m}\} +

+
+

Example 14 (Language accepted by automaton) +\mathcal{E} = \{a,b\}, \mathcal{L} = \{a,aa,ba,aaa,aba,baa,bba,\ldots\} +

+
+
+
+
+
+
+ + +G + + +init +init + + + +0 + +0 + + + +init->0 + + + + + +1 + + +1 + + + +1->1 + + +a + + + +1->0 + + +b + + + +0->1 + + +a + + + +0->0 + + +b + + + +
+
+
+Figure 15: Example of an automaton generating the language \mathcal{L} = \{a,aa,ba,aaa,aba,baa,bba,\ldots\} +
+
+
+
+
+

What if we remove the self loop at state 0? The automaton then accepts languages starting with a and with b being the last event or immediately followed by a.

+
+
+

What is the language view of automata good for?

+
    +
  • Definitions, analysis, synthesis.
  • +
  • We then need language concepts such as +
      +
    • concatenation of strings: \quad c = ab
    • +
    • empty string \varepsilon: \quad\varepsilon a = a \varepsilon = a
    • +
    • prefix, suffix
    • +
    • prefix closure \bar{\mathcal{L}} (of the language \mathcal L)
    • +
    • +
  • +
+
+
+
+

Blocking

+

An important concept in automata is blocking. A state is blocking if there is no transition out of it. An example follows.

+
+

Example 15 (Blocking states) In the automaton in Fig 16, state 2 is blocking. It is a deadlock state. States 3 and 4 are livelock states.

+
+
+
+
+
+
+ + +G + + +init +init + + + +0 + +0 + + + +init->0 + + + + + +2 + + +2 + + + +2->0 + + +g + + + +1 + +1 + + + +0->1 + + +a + + + +1->2 + + +b + + + +5 + +5 + + + +1->5 + + +g + + + +3 + +3 + + + +1->3 + + +a + + + +4 + +4 + + + +3->4 + + +b + + + +4->3 + + +a + + + +4->4 + + +g + + + +
+
+
+Figure 16: Example of an automaton with blocking states +
+
+
+
+
+

Language characterization: \bar{\mathcal{L}}_\mathrm{m}(\mathcal G) \sub \mathcal L(\mathcal G).

+
+
+
+

Queueing systems

+

Queueing systems are a particular and very useful class of discrete-event systems. They consist of these three components:

+
    +
  • entities (also customers, jobs, tasks, requests, etc.)
  • +
  • resources (also servers, processors, etc.): customers are waiting for them
  • +
  • queues (also buffers): where waiting is done
  • +
+

A common graphical representation that contains all these three compoments is in Fig 17.

+
+
+
+ +
+
+Figure 17: Queueing system +
+
+
+
+

Examples of queueing systems

+
    +
  • entities: people waiting for service in a bank or at a bust stop
  • +
  • resources: people (again) in a bank at the counter
  • +
  • queues: bank lobbies, bus stops, warehouses, …
  • +
+
+
+
+ +
+
+Note +
+
+
+

What are other examples?

+
    +
  • entities: packets, …
  • +
  • resources: processor, computer periphery, router, …
  • +
  • queues: …
  • +
+
+
+
+
+

Why shall we study queueing systems?

+
    +
  • Resources are not unlimited
  • +
  • Tradeoff needed between customer satisfaction and fair resources allocation
  • +
+
+
+

Networks of queueing systems

+

Queueing systems can be interconnected into networks.

+
+
+
+ +
+
+Figure 18: Example of a network of queueing systems +
+
+
+
+
+

Queueing systems as automata

+

The reason why we mentioned queueing systems in this part of our course is that they can be modelled as automata. And we already know that in order to define and automaton, we must characterize the key components defining the automaton – three in this case:

+
    +
  • events: \mathcal E = \{\text{arrival},\text{departure}\};

  • +
  • states: number of customers in the queue +\mathcal X = \{0,1,2,3,\ldots\}, \quad \mathcal X_0 = \{0\}, +

  • +
+
+
+
+ +
+
+Note +
+
+
+

Obviously this is not a finite state automation – unless the queue is bounded – and whether the queue’s length is bounded is a modelling assumption.

+
+
+
    +
  • state transition: +f(x,e) = +\begin{cases} +x+1, & \text{if}\; x\leq 0 \land e = \mathrm{arrival}\\ +x-1, & \text{if}\; x > 0 \land e = \mathrm{departure}. +\end{cases} +
  • +
+
+
+

Queueing system as an automaton

+
+
+
+ +
+
+Figure 19: Queueing system as an automaton +
+
+
+
+
+
+ +
+
+Note +
+
+
+

Note how the states correspond to the value of the state variable.

+
+
+
+

Example 16 (Example of a queueing system: jobs processing by a CPU)

+
+
+
+

Stochastic queueing systems

+

An important extension of the basic concept of a queueing system is the introduction of randomness. In particular, the arrivals can be modelled using random processes. Similarly, the departures given by the delays (the processing time) of the server can be modelled as random.

+

Obviously, the time needs to be included in the automaton, and so far we do not have it there. It is then high time to introduce it.

+
+
+
+

Timed automaton

+

So far, even if the automaton corresponded to a physical system (and did not just represent a generator of a language), the time was not included. The transitions were triggered by the events, but we did not specify the time at which the event occurred.

+

There are, however, many situations when it is useful or even crucial to incorporate time. We can then answer questions such as

+
    +
  • How many events of a certain type in a given interval?
  • +
  • Is the time interval between two events above a given threshold?
  • +
  • How long does the system spend in a given state?
  • +
  • +
+

There are several ways how to incorporate time into the automaton. We will follow the concept of a timed automaton with guards (introduced by Alur and Dill). Within their framework we have

+
    +
  • one or several resettable clocks: c_i,\, i=1,\ldots, k, driven by the ODE + \frac{\mathrm{d} c_i(t)}{\mathrm d t} = 1, \quad c_i(0) = 0; +
  • +
  • each transition labelled by the tripple {guard; event; reset}.
  • +
+
+
+
+ +
+
+Note +
+
+
+

Both satisfaction of the guard and arrival of the event constitute enabling conditions for the transition. They could be wrapped into a single compound condition.

+
+
+
+

Example 17 (Timed automaton with guards)  

+
+
+
+
+
+
+ + +G + + +init +init + + + +0 + +0 + + + +init->0 + + + + + +1 + +1 + + + +0->1 + + +-; msg; c₁ + + + +1->1 + + +c₁≥1; msg; c₁ + + + +2 + +2 + + + +1->2 + + +0<c₁<1; msg; c₁ + + + +3 + +3 + + + +2->3 + + +c₁<1; alarm; - + + + +
+
+
+Figure 20: Example of a timed automaton with guards +
+
+
+
+
+
+
+

Example 18 (Timed automaton with guards and invariant)  

+
+
+
+
+
+
+ + +G + + +init +init + + + +0 + +0 + + + +init->0 + + + + + +2 + +2 +c₁<1 + + + +3 + +3 + + + +2->3 + + +-; alarm; - + + + +1 + +1 + + + +0->1 + + +-; msg; c₁ + + + +1->2 + + +0<c₁<1; msg; c₁ + + + +1->1 + + +c₁≥1; msg; c₁ + + + +
+
+
+Figure 21: Example of a timed automaton with guards and invariant +
+
+
+
+
+
+
+

Invariant vs guard

+
    +
  • Invariant (of a location) gives an upper bound on the time the system can stay at the given location. It can leave earlier but not later.
  • +
  • Guard (of a given transition) gives an enabling condition on leaving the location through the given transition.
  • +
+
+

Example 19 (Several trains approaching a bridge) The example is taken from [1] and is included in the demos coming with the Uppaal tool.

+
+ + + +
+
+ + Back to top

References

+
+
[1]
G. Behrmann, A. David, and K. G. Larsen, “A Tutorial on Uppaal,” in Formal Methods for the Design of Real-Time Systems, M. Bernardo and F. Corradini, Eds., in Lecture Notes in Computer Science, no. 3185., Berlin, Heidelberg: Springer, 2004, pp. 200–236. doi: 10.1007/978-3-540-30080-9_7.
+
+
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/des_automata.html b/des_automata.html index b95a8f9..4b18986 100644 --- a/des_automata.html +++ b/des_automata.html @@ -2131,16 +2131,16 @@

Mealy machine

@show update!(dtr), output(dtr)
-
x_initial = rand(0:k, n) = [0, 2, 0, 0]
-output(dtr) = [1, 1, 1, 0]
-(update!(dtr), output(dtr)) = ([1, 0, 2, 0], [0, 1, 1, 1])
-(update!(dtr), output(dtr)) = ([1, 1, 0, 2], [0, 0, 1, 1])
-(update!(dtr), output(dtr)) = ([1, 1, 1, 0], [0, 0, 0, 1])
-(update!(dtr), output(dtr)) = ([1, 1, 1, 1], [1, 0, 0, 0])
-(update!(dtr), output(dtr)) = ([2, 1, 1, 1], [0, 1, 0, 0])
+
x_initial = rand(0:k, n) = [2, 2, 4, 1]
+output(dtr) = [0, 0, 1, 1]
+(update!(dtr), output(dtr)) = ([2, 2, 2, 4], [0, 0, 0, 1])
+(update!(dtr), output(dtr)) = ([2, 2, 2, 2], [1, 0, 0, 0])
+(update!(dtr), output(dtr)) = ([3, 2, 2, 2], [0, 1, 0, 0])
+(update!(dtr), output(dtr)) = ([3, 3, 2, 2], [0, 0, 1, 0])
+(update!(dtr), output(dtr)) = ([3, 3, 3, 2], [0, 0, 0, 1])
-
([2, 1, 1, 1], [0, 1, 0, 0])
+
([3, 3, 3, 2], [0, 0, 0, 1])

We can see that although initially the there can be more tokens, after a few iterations the algorithm achieves the goal of having just one token in the ring.

diff --git a/hybrid_automata 10.html b/hybrid_automata 10.html new file mode 100644 index 0000000..29f36a0 --- /dev/null +++ b/hybrid_automata 10.html @@ -0,0 +1,1627 @@ + + + + + + + + + +Hybrid automata – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Hybrid automata

+
+ + + +
+ + + + +
+ + + +
+ + +

Well, here we are at last. After these three introductory topics on discrete-event systems, we’ll finally get into hybrid systems.

+

There are two frameworks for modelling hybrid systems:

+
    +
  • hybrid automaton, and
  • +
  • hybrid (state) equations.
  • +
+

Here we start with the former and save the latter for the next chapter/week.

+

First we consider an autonomous (=no external/control inputs) hybrid automaton – it is a tuple of sets and (set) mappings +\boxed{ +\mathcal{H} = \{\mathcal Q, \mathcal Q_0, \mathcal X, \mathcal X_0, f, \mathcal I, \mathcal E, \mathcal G, \mathcal R\},} + where

+
    +
  • \mathcal Q is a set of discrete states (also called modes or operating modes or locations).

    +
      +
    • Examples: +
        +
      • \mathcal Q = \{\text{on}, \text{off}\},
      • +
      • \mathcal Q = \{\text{working}, \text{broken},\text{in repair}\},
      • +
      • \mathcal Q = \{\text{gear}\,1, \ldots, \text{gear}\,5\} .
      • +
    • +
    • It can be characterized either by +
        +
      • by enumeration like above, or
      • +
      • using a state variable q(t) attaining discrete values. The variable can also be a vector one, possibly a binary vector state variable encoding an integer scalar state variable.
      • +
    • +
  • +
  • \mathcal Q_0\subseteq \mathcal Q is a set of initial discrete states.

    +
      +
    • It can contain only a single element. +
        +
      • Example: \mathcal Q_0 = \{\text{off}\}.
      • +
    • +
    • But if it contains more than one element, it can be used to represent uncertainty in the initial state.
    • +
  • +
  • \mathcal X\subseteq \mathbb R^n is a set of continuous states.

    +
      +
    • Rather than by enumeration as in the case of discrete state, it is characterized by real-valued state variables x, oftentimes vector ones \bm x. Often they are denoted \bm x(t) to emphasize the evolution in time.
    • +
  • +
  • \mathcal X_0\subseteq \mathcal X is a set of initial continuous states.

    +
      +
    • A set of values of the (vector) state variable at the initial time.
    • +
    • Often just a single initial state \mathcal X_0=\{x_0\}, but it can be useful to set ranges of the values of individual state variables to account for uncertainty.
    • +
  • +
  • f:\mathcal{Q}\times \mathcal X \rightarrow \mathbb R^n is a vector field parameterized by the location

    +
      +
    • Often the dependence on the location q expressed as f_q(x) rather than the more symmetric f(q,x).

    • +
    • This defines a state equation parameterized by the location: \dot{x}(t) = f_q(x(t)).

    • +
    • It is also possible to consider a set-valued map, replacing f with \mathcal F: \mathcal{Q}\times \mathcal X \rightarrow 2^{\mathbb R^n}, which leads to the differential inclusion \dot x \in \mathcal F_q(x).

    • +
  • +
  • \mathcal I: \mathcal Q \rightarrow 2^\mathcal{X} gives a (location) invariant. It is also called a domain (of the location). The latter term is perhaps more appropriate becaue the term invariant is already too much overloaded in the context of dynamical systems.

    +
      +
    • It is parameterized by the location.
    • +
    • It is a subset of the continuous-valued state space \mathcal I(q) \subseteq \mathbb R^n.
    • +
    • It is a set of values that the state variables are allowed to attain while staying in the given location; if the state of the systems evolves towards the boundary of this set with a tendency to leave it, the system must be ready to leave that location by transitioning to another location.
    • +
  • +
+
+
+
+ +
+
+Caution +
+
+
+

Strictly speaking, \mathcal{I} is a mapping and not a set. Only the mapping evaluated at a given location q, that is, \mathcal{I}(q), is a set.

+
+
+
    +
  • \mathcal E\subseteq \mathcal Q \times \mathcal Q is a set of transitions.

    +
      +
    • It is a set of the edges of the graph.
    • +
    • Example: \mathcal E = \{(\text{off},\text{on}),(\text{on},\text{off})\}, that is, a two-component set.
    • +
  • +
  • \mathcal G: \mathcal E \rightarrow 2^\mathcal{X} gives a guard set.

    +
      +
    • It is associated with a given transition. In particular, \mathcal G(q_i,q_j) is the guard set for the transition (q_i,q_j)\in\mathcal E.
      +
    • +
    • The guard condition for the given transition is satisfied if x\in \mathcal G(q_i,q_j).
    • +
    • If the guard condition is satisfied, the transition is enabled – it may be executed. But it does not have to.
    • +
    • The enabled transition must be executed when the state x leaves the invariant set of the original location.
    • +
  • +
  • \mathcal R: \mathcal E \times \mathcal X\rightarrow 2^{\mathcal X} is a reset map.

    +
      +
    • For a given transition from one location to another, it resets the continuous-valued state x to a new value within some subset.
    • +
    • Often the map is single-valued, r: \mathcal E \times \mathcal X\rightarrow \mathcal X (multivalued-ness can be used to model uncertainty).
    • +
    • We also say that the state experiences a jump.
      +
    • +
    • The state after the jump (associated with the given transition) is reset according to x^+ = r(q_i,q_j, x), or x^+ \in \mathcal R(q_i,q_j, x) in the multivalued case.
      +
    • +
    • If no resetting of the continuous-valued state takes place, the reset map is defined just as the identity operator with respect to x , that is, r(q_i,q_j, x) = x.
    • +
  • +
+
+

Example 1 (Thermostat – the hello world example of a hybrid automaton) The thermostat is a device that turns some heater on or off (or sets some valve open or closed) based on the sensed temperature. The goal is to keep the temperature around, say, 18^\circ C.

+

Naturally, the discrete states (modes, locations) are on and off. Initially, the heater is off. We can identify the first two components of the hybrid automaton: \mathcal Q = \{\text{on}, \text{off}\}, \quad \mathcal Q_0 = \{\text{off}\}

+

The only continuous state variable is the temperature. The initial temperature not not quite certain, say it is known to be in the interval [5,10]. Two more components of the hybrid automaton follow: \mathcal X = \mathbb R, \quad \mathcal X_0 = \{x:x\in \mathcal X, 5\leq x\leq 10\}

+

In the two modes on and off, the evolution of the temperature can be modelled by two different ODEs. Either from first-principles modelling or from system identification (or preferrably from the combination of the two) we get the two differential equations, say: +f_\text{off}(x) = -0.1x,\quad f_\text{on}(x) = -0.1x + 5, + which gives another component for the hybrid automaton.

+

The control logic of the thermostat is captured by the \mathcal I and \mathcal G components of the hybrid automaton. Let’s determine them now. Obviously, if we just set 18 as the threshold, the heater would be switching on and off all the time. We need to introduce some hysteresis. Say, keeping the temperature within the interval (18 \pm 2)^\circ is acceptable. +\mathcal I(\text{off}) = \{x\mid x> 16\},\quad \mathcal I(\text{on}) = \{x\mid x< 20\}, +

+

+\mathcal G(\text{off},\text{on}) = \{x\mid x\leq 17\},\; \mathcal G(\text{on},\text{off}) = \{x\mid x\geq 19\}. +

+

Finally, \mathcal R (or r) is not specified as the x variable (the temperature) doesn’t jump. Well, it is specified implicitly as an identity mapping r(x)=x.

+

The graphical representation of the thermostat hybrid automaton is shown in Fig 1.

+
+
+
+ +
+
+Figure 1: Hybrid automaton for a thermostat +
+
+
+

Is this model deterministic? There are actually two reasons why it is not:

+
    +
  1. If we regard the characterization of the initial state (the temperature in this case) as a part of the model, which is the convention that we adhere to in our course, the model is nondeterministic.
  2. +
  3. Since the invariant for a given mode and the guard set for the only transition to the other model overlap, the response of the system is not uniquely determined. Consider the case when the system is in the off mode and the temperature is 16.5. The system can either stay in the off mode or switch to the on mode.
  4. +
+
+
+

Hybrid automaton with external events and control inputs

+

We now extend the hybrid automaton with two new components:

+
    +
  • a set \mathcal{A} of (external) events (also actions or symbols),
  • +
  • a set \mathcal{U} external continuous-valued inputs (control inputs or disturbances).
  • +
+

\boxed{ + \mathcal{H} = \{\mathcal Q, \mathcal Q_0, \mathcal X, \mathcal X_0, \mathcal I, \mathcal A, \mathcal U, f, \mathcal E, \mathcal G, \mathcal R\} ,} + where

+
    +
  • \mathcal A = \{a_1,a_2,\ldots, a_s\} is a set of events

    +
      +
    • The role identical as in a (finite) state automaton: an external event triggers an (enabled) transition from the current discrete state (mode, location) to another.
    • +
    • Unlike in pure discrete-event systems, here they are considered within a model that does recognize passing of time – each action must be “time-stamped”.
    • +
    • In simulations such timed event can be represented by an edge in the signal. In this regard, it might be tempting not to introduce it as a seperate entity, but it is useful to do so.
    • +
  • +
  • \mathcal U\in\mathbb R^m is a set of continuous-valued inputs

    +
      +
    • Real-valued functions of time.
    • +
    • Control inputs, disturbances, references, noises. In applications it will certainly be useful to distinghuish these roles, but here we keep just a single type of such an external variable, we do not have to distinguish.
    • +
  • +
+
+

Some modifications needed

+

Upon introduction of these two types of external inputs we must modify the components of the definition we provided earlier:

+
    +
  • f: \mathcal Q \times \mathcal X \times \mathcal U \rightarrow \mathbb R^n is a vector field that now depends not only on the location but also on the external (control) input, that is, at a given location we consider the state equation \dot x = f_q(x,u).

  • +
  • \mathcal E\subseteq \mathcal Q \times (\mathcal A) \times \mathcal Q is a set of transitions now possibly parameterized by the actions (as in classical automata).

  • +
  • \mathcal I : \mathcal Q \rightarrow 2^{\mathcal{X}\times \mathcal U} is a location invariant now augmented with a subset of the control input set. The necessary condition for staying in the given mode can be thus imposed not only on x but also on u.

  • +
  • \mathcal G: \mathcal E \rightarrow 2^{\mathcal{X}\times U} is a guard set now augmented with a subset of the control input set. The necessary condition for a given transition can be thus imposed not only on x but also on u.

  • +
  • \mathcal R: \mathcal E \times \mathcal X\times \mathcal U\rightarrow 2^{\mathcal X} is a (state) reset map that is now additionally parameterized by the control input.

  • +
+

If enabled, the transition can happen if one of the two things is satisfied:

+
    +
  • the continous state leaves the invariant set of the given location,
    +
  • +
  • an external event occurs.
  • +
+
+

Example 2 (Button-controlled LED)  

+
+
+
+ +
+
+Figure 2: Automaton for a button controlled LED +
+
+
+

+\mathcal{Q} = \{\mathrm{off}, \mathrm{dim}, \mathrm{bright}\},\quad \mathcal{Q}_0 = \{\mathrm{off}\} +

+

+\mathcal{X} = \mathbb{R}, \quad \mathcal{X}_0 = \{0\} +

+

+\mathcal{I(\mathrm{off})} = \mathcal{I(\mathrm{bright})} = \mathcal{I(\mathrm{dim})} = \{x\in\mathbb R \mid x \geq 0\} +

+

+f(x) = 1 +

+

+\mathcal{A} = \{\mathrm{press}\} +

+

+\begin{aligned} +\mathcal{E} &= \{(\mathrm{off},\mathrm{press},\mathrm{dim}),(\mathrm{dim},\mathrm{press},\mathrm{off}),\\ +&\qquad (\mathrm{dim},\mathrm{press},\mathrm{bright}),(\mathrm{bright},\mathrm{press},\mathrm{off})\} +\end{aligned} +

+

+\begin{aligned} +\mathcal{G}((\mathrm{off},\mathrm{press},\mathrm{dim})) &= \mathcal X \\ +\mathcal{G}((\mathrm{dim},\mathrm{press},\mathrm{off})) &= \{x \in \mathcal X \mid x>2\}\\ +\mathcal{G}((\mathrm{dim},\mathrm{press},\mathrm{bright})) &= \{x \in \mathcal X \mid x\leq 2\}\\ +\mathcal{G}((\mathrm{bright},\mathrm{press},\mathrm{off})) &= \mathcal X. +\end{aligned} +

+

+r((\mathrm{off},\mathrm{press},\mathrm{dim}),x) = 0, +

+
    +
  • that is, x^+ = r((\mathrm{off},\mathrm{press},\mathrm{dim}),x) = 0.
  • +
  • For all other transitions r((\cdot, \cdot, \cdot),x)=x, +
      +
    • that is, x^+ = x.
    • +
  • +
+
+
+

Example 3 (Water tank) We consider a water tank with one inflow and two outflows – one at the bottom, the other at some nonzero height h_\mathrm{m}. The water level h is the continuous state variable.

+
+
+
+ +
+
+Figure 3: Water tank example +
+
+
+

The model essentially expresses that the change in the volume is given by the difference between the inflow and the outflows. The outflows are proportional to the square root of the water level (Torricelli’s law) +\dot V = +\begin{cases} +Q_\mathrm{in} - Q_\mathrm{out,middle} - Q_\mathrm{out,bottom}, & h>h_\mathrm{m}\\ +Q_\mathrm{in} - Q_\mathrm{out,bottom}, & h\leq h_\mathrm{m} +\end{cases} +

+

Apparently things change when the water level crosses (in any direction) the height h_\mathrm{m}. This can be modelled using a hybrid automaton.

+
+
+
+ +
+
+Figure 4: Automaton for a water tank example +
+
+
+

One lesson to learn from this example is that the transition from one mode to another is not necessarily due to some computer-controlled switch. Instead, it is our modelling choice. It is an approximation that assumes negligible diameter of the middle pipe. But taking into the consideration the volume of the tank, it is probably a justifiable approximation.

+
+
+

Example 4 (Bouncing ball) We assume that a ball is falling from some initial nonzero height above the table. After hitting the table, it bounces back, loosing a portion of the energy (the deformation is not perfectly elastic).

+
+
+
+ +
+
+Figure 5: Bouncing ball example +
+
+
+

The state equation during the free fall is +\dot{\bm x} = \begin{bmatrix} x_2\\ -g\end{bmatrix}, \quad \bm x = \begin{bmatrix}10\\0\end{bmatrix}. +

+

But how can we model what happens during and after the collision? High-fidelity model would be complicated, involving partial differential equations to model the deformation of the ball and the table. These complexities can be avoided with a simpler model assuming that immediately after the collision the sign of the velocity abruptly (discontinuously) changes, and at the same time the ball also looses a portion of the energy.

+

When modelling this using a hybrid automaton, it turns out that we only need a single discrete state. The crucial feature of the model is then the nontrivial (non-identity) reset map. This is depicted in Fig 6.

+
+
+
+ +
+
+Figure 6: Hybrid automaton for a bouncing ball eaxample +
+
+
+

For completeness, here are the individual components of the hybrid automaton: +\mathcal{Q} = \{q\}, \; \mathcal{Q}_0 = \{q\} +

+

+\mathcal{X} = \mathbb R^2, \; \mathcal{X}_0 = \left\{\begin{bmatrix}10\\0\end{bmatrix}\right\} +

+

+\mathcal{I} = \{\mathbb R^2 \mid x_1 > 0 \lor (x_1 = 0 \land x_2 \geq 0)\} +

+

+f(\bm x) = \begin{bmatrix} x_2\\ -g\end{bmatrix} +

+

+\mathcal{E} = \{(q,q)\} +

+

+\mathcal{G} = \{\bm x\in\mathbb R^2 \mid x_1=0 \land x_2 < 0\} +

+

+r((q,q),\bm x) = \begin{bmatrix}x_1\\ -\gamma x_2 \end{bmatrix}, + where \gamma is the coefficient of restitution (e.g., \gamma = 0.9).

+
+
+
+ +
+
+Comment on the invariant set for the bouncing ball +
+
+
+

Some authors characterize the invariant set as x_1\geq 0. But this means that as the ball touches the ground, nothing forces it to leave the location and do the transition. Instead, the ball must penetrate the ground, however tiny distance, in order to trigger the transition. The current definition avoids this.

+
+
+
+
+
+ +
+
+Another comment on the invariant set for the bouncing ball +
+
+
+

While the previous remark certainly holds, when solving the model numerically, the use of inequalities to define sets is inevitable. And some numerical solvers, in particular optimization solvers, cannot handle strict inequalities. That is perhaps why some authors are quite relaxed about this issue. We will encounter it later on.

+
+
+
+
+

Example 5 (Stick-slip friction model (Karnopp)) Consider a block of mass m placed freely on a surface. External horizontal force F_\mathrm{a} is applied to the block, setting it to a horizontaly sliding motion, against which the friction force F_\mathrm{f} is acting: +m\dot v = F_\mathrm{a} - F_\mathrm{f}(v). +

+

Common choice for a model of friction between two surfaces is Coulomb friction +F_\mathrm{f}(v) = F_\mathrm{c}\operatorname*{sgn}(v). +

+

The model is perfectly intuitive, isn’t it? Well, what if v=0 and F_\mathrm{a}<F_\mathrm{c}? Can you see the trouble?

+

One of the remedies is the Karnopp model of friction +m\dot v = 0, \qquad v=0, \; |F_\mathrm{a}| < F_\mathrm{c} + +F_\mathrm{f} = \begin{cases}\operatorname*{sat}(F_\mathrm{a},F_\mathrm{c}), & v=0\\F_\mathrm{c}\operatorname*{sgn}(v), & \mathrm{else}\end{cases} +

+

The model can be formulated as a hybrid automaton with two discrete states (modes, locations) as in Fig 7.

+
+
+
+ +
+
+Figure 7: Hybrid automaton for the Karnopp model of friction +
+
+
+
+
+

Example 6 (Rimless wheel) A simple mechanical model that is occasionally used in the walking robot community is the rimless wheel rolling down a declined plane as depicted in Fig 8.

+
+
+
+ +
+
+Figure 8: Rimless wheel +
+
+
+

A hybrid automaton for the rimless wheel is below.

+
+
+
+ +
+
+Figure 9: Hybrid automaton for a rimless wheel +
+
+
+

Alternatively, we do not represent the discrete state graphically as a node in the graph but rather as another – extending – state variable s \in \{0, 1, \ldots, 5\} within a single location.

+
+
+
+ +
+
+Figure 10: Alternative hybrid automaton for a rimless wheel +
+
+
+
+
+

Example 7 (DC-DC boost converter) The enabling mechanism for a DC-DC converter is switching. Although the switching is realized with a semiconductor switch, for simplicity of the exposition we consider a manual switch in Fig 11 below.

+
+
+
+ +
+
+Figure 11: DC-DC boost converter +
+
+
+

The switch introduces two modes of operation. But the (ideal) diode introduces a mode transition too.

+
+

The switch closed

+
+
+
+ +
+
+Figure 12: DC-DC boost converter: the switch closed +
+
+
+

+\begin{bmatrix} +\frac{\mathrm{d}i_\mathrm{L}}{\mathrm{d}t}\\ +\frac{\mathrm{d}v_\mathrm{C}}{\mathrm{d}t} +\end{bmatrix} += +\begin{bmatrix} +-\frac{R_\mathrm{L}}{L}i_\mathrm{L} & 0\\ +0 & -\frac{1}{C(R+R_\mathrm{C})} +\end{bmatrix} +\begin{bmatrix} +i_\mathrm{L}\\ +v_\mathrm{C} +\end{bmatrix} ++ +\begin{bmatrix} +\frac{1}{L}\\ +0 +\end{bmatrix} +v_0 +

+
+
+

Continuous conduction mode (CCM)

+
+
+
+ +
+
+Figure 13: DC-DC boost converter: continuous conduction mode (CCM) +
+
+
+

+\begin{bmatrix} +\frac{\mathrm{d}i_\mathrm{L}}{\mathrm{d}t}\\ +\frac{\mathrm{d}v_\mathrm{C}}{\mathrm{d}t} +\end{bmatrix} += +\begin{bmatrix} +-\frac{R_\mathrm{L}+ \frac{RR_\mathrm{C}}{R+R_\mathrm{C}}}{L} & -\frac{R}{L(R+R_\mathrm{C})}\\ +\frac{R}{C(R+R_\mathrm{C})} & -\frac{1}{C(R+R_\mathrm{C})} +\end{bmatrix} +\begin{bmatrix} +i_\mathrm{L}\\ +v_\mathrm{C} +\end{bmatrix} ++ +\begin{bmatrix} +\frac{1}{L}\\ +0 +\end{bmatrix} +v_0 +

+
+
+

Discontinuous cond. mode (DCM)

+
+
+
+ +
+
+Figure 14: DC-DC boost converter: discontinuous conduction model (DCM) +
+
+
+

+\begin{bmatrix} +\frac{\mathrm{d}i_\mathrm{L}}{\mathrm{d}t}\\ +\frac{\mathrm{d}v_\mathrm{C}}{\mathrm{d}t} +\end{bmatrix} += +\begin{bmatrix} +0 & 0\\ +0 & -\frac{1}{C(R+R_\mathrm{C})} +\end{bmatrix} +\begin{bmatrix} +i_\mathrm{L}\\ +v_\mathrm{C} +\end{bmatrix} ++ +\begin{bmatrix} +0\\ +0 +\end{bmatrix} +v_0 +

+
+

Possibly the events of opening and closing the switch can be driven by time: opening the switch is derived from the value of an input signal, closing the switch is periodic.

+
+
+
+
+ +
+
+Figure 15: Hybrid automaton for a DC-DC boost converter +
+
+
+
+
+ + +
+
+ + Back to top
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/hybrid_automata_software 9.html b/hybrid_automata_software 9.html new file mode 100644 index 0000000..7d1bea3 --- /dev/null +++ b/hybrid_automata_software 9.html @@ -0,0 +1,1090 @@ + + + + + + + + + +Software – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Software

+
+ + + +
+ + + + +
+ + + +
+ + +
+

Matlab

+ +
+
+

Julia

+ +
+
+

Python

+
    +
  • +
+ + +
+ + Back to top
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/hybrid_equations 8.html b/hybrid_equations 8.html new file mode 100644 index 0000000..2bed90d --- /dev/null +++ b/hybrid_equations 8.html @@ -0,0 +1,1811 @@ + + + + + + + + + +Hybrid equations – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Hybrid equations

+
+ + + +
+ + + + +
+ + + +
+ + +

Here we introduce a major alternative framework to hybrid automata for modelling hybrid systems. It is called hybrid equations, sometimes also hybrid state equations to emphasize that what we are after is some kind of analogy with state equations \dot{x}(t) = f(x(t), u(t)) and x_{k+1} = g(x_k, u_k) that we are familiar with from (continuous-valued) dynamical systems. Sometimes it also called event-flow equations or jump-flow equations.

+

These are the key ideas:

+
    +
  • The (state) variables can change values discontinuously upon occurence of events – they jump.
  • +
  • Between the jumps they evolve continuously – they flow.
  • +
  • Some variables may only flow, they never jump.
  • +
  • The variables staying constant between the jumps can be viewed as flowing too.
  • +
+

The major advantage of this modeling framework is that we do not have to distinguish between the two types of state variables. This is in contrast with hybrid automata, where we have to start by classifying the state variables as either continuous or discrete before moving on. In the current framework we treat all the variables identically – they mostly flow and occasionally (perhaps never, which is OK) jump.

+
+

Hybrid equations

+

It is high time to introduce hybrid (state) equations – here they come +\begin{aligned} +\dot{x} &= f(x), \quad x \in \mathcal{C},\\ +x^+ &= g(x), \quad x \in \mathcal{D}, +\end{aligned} + where

+
    +
  • f: \mathcal{C} \rightarrow \mathbb R^n is the flow map,
  • +
  • \mathcal{C}\subset \mathbb R^n is the flow set,
  • +
  • g: \mathcal{D} \rightarrow \mathbb R^n is the jump map,
  • +
  • \mathcal{D}\subset \mathbb R^n is the jump set.
  • +
+

This model of a hybrid system is thus parameterized by the quadruple \{f, \mathcal C, g, \mathcal D\}.

+
+
+

Hybrid inclusions

+

We now extend the presented framework of hybrid equations a bit. Namely, the functions on the right-hand sides in both the differential and the difference equations are no longer assigning just a single value (as well-behaved functions do), but they assign sets! +\begin{aligned} +\dot{x} &\in \mathcal F(x), \quad x \in \mathcal{C},\\ +x^+ &\in \mathcal G(x), \quad x \in \mathcal{D}. +\end{aligned} + where

+
    +
  • \mathcal{F} is the set-valued flow map,
  • +
  • \mathcal{C} is the flow set,
  • +
  • \mathcal{G} is the set-valued jump map,
  • +
  • \mathcal{D} is the jump set.
  • +
+
+
+

Output equations

+

Typically a full model is only formed upon defining some output variables (oftentimes just a subset of possibly scaled state variables or their linear combinations). These output variables then obey some output equation +y(t) = h(x(t)), +

+

or +y(t) = h(x(t),u(t)). +

+
+

Example 1 (Bouncing ball) This is the “hello world example” for hybrid systems with state jumps (pun intended). The state variables are the height and the vertical speed of the ball. +\bm x \in \mathbb{R}^2, \qquad \bm x = \begin{bmatrix}x_1 \\ x_2\end{bmatrix}. +

+

The quadruple defining the hybrid equations is +\mathcal{C} = \{\bm x \in \mathbb{R}^2 \mid x_1>0 \lor (x_1 = 0, x_2\geq 0)\}, + +f(\bm x) = \begin{bmatrix}x_2 \\ -g\end{bmatrix}, \qquad g = 9.81, + +\mathcal{D} = \{\bm x \in \mathbb{R}^2 \mid x_1 = 0, x_2 < 0\}, + +g(\bm x) = \begin{bmatrix}x_1 \\ -\alpha x_2\end{bmatrix}, \qquad \alpha = 0.8. +

+

The two sets and two maps are illustrated below.

+
+
+
+ +
+
+Figure 1: Maps and sets for the bouncing ball example +
+
+
+
+
+

Example 2 (Bouncing ball on a controlled piston) We now extend the simple bouncing ball example by adding a vertically moving piston. The piston is controlled by a force.

+
+
+

+
Example of a ball bouncing on a vertically moving piston
+
+
+

In our analysis we neglect the sizes (for simplicity).

+

The collision happens when x_\mathrm{b} = x_\mathrm{p}, and v_\mathrm{b} < v_\mathrm{p}.

+

The conservation of momentum after a collision reads +m_\mathrm{b}v_\mathrm{b}^+ + m_\mathrm{p}v_\mathrm{p}^+ = m_\mathrm{b}v_\mathrm{b} + m_\mathrm{p}v_\mathrm{p}. +\tag{1}

+

The collision is modelled using a restitution coefficient +v_\mathrm{p}^+ - v_\mathrm{b}^+ = -\gamma (v_\mathrm{p} - v_\mathrm{b}). +\tag{2}

+

From the momentum conservation Equation 1 +v_\mathrm{p}^+ = \frac{m_\mathrm{b}}{m_\mathrm{p}}v_\mathrm{b} + v_\mathrm{p} - \frac{m_\mathrm{b}}{m_\mathrm{p}}v_\mathrm{b}^+ +

+

we substitute to Equation 2 to get +\frac{m_\mathrm{b}}{m_\mathrm{p}}v_\mathrm{b} + v_\mathrm{p} - \frac{m_\mathrm{b}}{m_\mathrm{p}}v_\mathrm{b}^+ - v_\mathrm{b}^+ = -\gamma (v_\mathrm{p} - v_\mathrm{b}), + from which we express v_\mathbb{b}^+ +\begin{aligned} +v_\mathrm{b}^+ &= \frac{1}{1+\frac{m_\mathrm{b}}{m_\mathrm{p}}}\left(\frac{m_\mathrm{b}}{m_\mathrm{p}}v_\mathrm{b} + v_\mathrm{p} + \gamma (v_\mathrm{p} - v_\mathrm{b})\right)\\ +&= \frac{m_\mathrm{p}}{m_\mathrm{p}+m_\mathrm{b}}\left(\frac{m_\mathrm{b}-\gamma m_\mathrm{p}}{m_\mathrm{p}}v_\mathrm{b} + (1+\gamma)v_\mathrm{p}\right)\\ +&= \frac{m_\mathrm{b}-\gamma m_\mathrm{p}}{m_\mathrm{b}+m_\mathrm{p}}v_\mathrm{b} + \frac{(1+\gamma)m_\mathrm{p}}{m_\mathrm{p}+m_\mathrm{b}}v_\mathrm{p} +\end{aligned}. +

+

Substitute to the expression for v_\mathbb{p}^+ to get +\begin{aligned} +v_\mathrm{p}^+ &= \frac{m_\mathrm{b}}{m_\mathrm{p}}v_\mathrm{b} + v_\mathrm{p} - \frac{m_\mathrm{b}}{m_\mathrm{p}}\left(\frac{m_\mathrm{b}-\gamma m_\mathrm{p}}{m_\mathrm{b}+m_\mathrm{p}}v_\mathrm{b} + \frac{(1+\gamma)m_\mathrm{p}}{m_\mathrm{p}+m_\mathrm{b}}v_\mathrm{p}\right)\\ +&= \frac{m_\mathrm{b}}{m_\mathrm{p}}\left(1-\frac{m_\mathrm{b}-\gamma m_\mathrm{p}}{m_\mathrm{b}+m_\mathrm{p}}\right) v_\mathrm{b} \\ +&\qquad\qquad + \left(1-\frac{m_\mathrm{b}}{m_\mathrm{p}}\frac{(1+\gamma)m_\mathrm{p}}{m_\mathrm{p}+m_\mathrm{b}}\right) v_\mathrm{p}\\ +&= \frac{m_\mathrm{b}}{m_\mathrm{b}+m_\mathrm{p}}(1+\gamma) v_\mathrm{b} + \frac{m_\mathrm{p}-\gamma m_\mathrm{b}}{m_\mathrm{p}+m_\mathrm{b}} v_\mathrm{p}. +\end{aligned} +

+

Finally we can simplify the expressions a bit by introducing m=\frac{m_\mathrm{b}}{m_\mathrm{b}+m_\mathrm{p}}. The jump equation is then +\begin{bmatrix} +v_\mathrm{b}^+\\ +v_\mathrm{p}^+ +\end{bmatrix} += +\begin{bmatrix} +m - \gamma (1-m) & (1+\gamma)(1-m)\\ +m(1+\gamma) & 1-m-\gamma m +\end{bmatrix} +\begin{bmatrix} +v_\mathrm{b}\\ +v_\mathrm{p} +\end{bmatrix}. +

+
+
+

Example 3 (Synchronization of fireflies) This is a famous example in synchronization. We consider n fireflies, x_i is the i-th firefly’s clock, normalized to [0,1]. The clock resets (to zero) when it reaches 1. Each firefly can see the flashing of all other fireflies. As soon as it observes a flash, it increases its clock by \varepsilon \%.

+

Here is how we model the problem using the four-tuple \{f, \mathcal C, g, \mathcal D\}: +\mathcal{C} = [0,1)^n = \{\bm x \in \mathbb R^n\mid x_i \in [0,1),\; i=1,\ldots,n \}, + +\bm f = [f_1, f_2, \ldots, f_n]^\top,\quad f_i = 1, \quad i=1,\ldots,n, + +\mathcal{D} = \{\bm x \in [0,1]^n \mid \max_i x_i = 1 \}, +

+

+\begin{aligned} +\bm g &= [g_1, \ldots, g_n]^\top,\\ +& \qquad g_i(x_i) = +\begin{cases} +(1 + \varepsilon)x_i, & \text{if } (1+\varepsilon)x_i < 1, \\ +0, & \text{otherwise}. +\end{cases} +\end{aligned} +

+
+
+

Example 4 (Thyristor control) Consider the circuit below.

+
+
+
+ +
+
+Figure 2: Example of a thyristor control +
+
+
+

We consider a harmonic input voltage, that is, +\begin{aligned} +\dot v_0 &= \omega v_1\\ +\dot v_1 &= -\omega v_0. +\end{aligned} +

+

The thyristor can be on (discrete state q=1) or off (q=0). The firing time \tau is given by the firing angle \alpha \in (0,\pi).

+

The state vector is +\bm x = +\begin{bmatrix} +v_0\\ v_1 \\ i_\mathrm{L} \\ v_\mathrm{C} \\ q \\ \tau +\end{bmatrix}. +

+

The flow map is +\bm f(\bm x) += +\begin{bmatrix} +\omega v_1\\ +-\omega v_0\\ +q \frac{v_\mathrm{C}-Ri_\mathrm{L}}{L}\\ +-\frac{1}{CR}v_\mathrm{C} + \frac{1}{CR}v_\mathrm{0} - \frac{1}{C}i_\mathrm{L}\\ +0\\ +1 +\end{bmatrix}. +

+

The flow set is +\begin{aligned} +\mathcal{C} &= \{\bm x \mid q=0,\, \tau<\frac{\alpha}{\omega},\, i_\mathrm{L}=0\}\\ &\qquad \cup \{\bm x \mid q=1,\, i_\mathrm{L}>0\} +\end{aligned}. +

+

The jump set is +\begin{aligned} +\mathcal{D} &= \{\bm x \mid q=0,\, \tau\geq \frac{\alpha}{\omega},\, i_\mathrm{L}=0,\, v_\mathrm{C}>0\}\\ &\qquad \cup \{\bm x \mid q=1,\, i_\mathrm{L}=0,\, v_\mathrm{C}<0\} +\end{aligned}. +

+

The jump map is +\bm g(\bm x) = +\begin{bmatrix} +u_0\\ u_1 \\ i_\mathrm{L} \\ v_\mathrm{C} \\ {\color{red} 1-q} \\ {\color{red} 0} +\end{bmatrix}. +

+

The last condition in the jump set comes from the requirement that not only must the current through the inductor be zero, but also it must be decreasing. And from the state equation it follows that the voltage on the capacitor must be negative.

+
+
+

Example 5 (Sampled-data feedback control) Another example of a dynamical system that fits nicely into the hybrid equations framework is sampled-data feedback control system. Within the feedback loop in Figure 3, we recognize a continuous-time plant and a discrete-time controller.

+
+
+
+ +
+
+Figure 3: Sampled data feedback control +
+
+
+

The plant is modelled by \dot x_\mathrm{p} = f_\mathrm{p}(x_\mathrm{p},u), \; y = h(x_\mathrm{p}). The controller samples the output T-periodically and computes its own output as a nonlinear function u = \kappa(r-y).

+

The closed-loop model is then +\dot x_\mathrm{p} = f_\mathrm{p}(x_\mathrm{p},\kappa(r-h(x_\mathrm{p}))), \; y = h(x_\mathrm{p}). +

+

The closed-loop state vector is +\bm x = +\begin{bmatrix} +x_\mathrm{p}\\ u \\ \tau +\end{bmatrix} +\in +\mathbb R^n \times \mathbb R^m \times \mathbb R. +

+

The flow set is +\begin{aligned} +\mathcal{C} &= \{\bm x \mid \tau \in [0,T)\} +\end{aligned} +

+

The flow map is +\bm f(\bm x) += +\begin{bmatrix} +f_\mathrm{p}(x_\mathrm{p},u)\\ +0\\ +1 +\end{bmatrix} +

+

The jump set is +\begin{aligned} +\mathcal{D} &= \{\bm x \mid \tau = T\} +\end{aligned} + or rather +\begin{aligned} +\mathcal{D} &= \{\bm x \mid \tau \geq T\} +\end{aligned} +

+

The jump map is +\bm g(\bm x) = +\begin{bmatrix} +x_\mathrm{p}\\ +\kappa(r-y)\\ +0 +\end{bmatrix} +

+

You may wonder why we bother with modelling this system as a hybrid system at all. When it comes to analysis of the closed-loop system, implementation of the model in Simulink allows for seemless mixing of continuous-time and dicrete-time blocks. And when it comes to control design, we can either discretize the plant and design a discrete-time controller, or design a continuous-time controller and then discretize it. No need for new theoris. True, but still, it is nice to have a rigorous framework for analysis of such systems. The more so that the sampling time T may not be constant – it can either vary randomly or perhaps the samling can be event-triggered. All these scenarios are easily handled within the hybrid equations framework.

+
+
+
+

Hybridness after closing the loop

+

We have defined hybrid systems, but what exactly is hybrid when we close a feedback loop? There are three possibilities:

+
    +
  • Hybrid plant + continuous controller.
  • +
  • Hybrid plant + hybrid controller.
  • +
  • Continuous plant + hybrid controller.
  • +
+

The first case is encountered when we use a standard controller such as a PID controller to control a system whose dynamics can be characterized/modelled as hybrid. The second scenario considers a controller that mimicks the behavior of a hybrid system. The third case is perhaps the least intuitive: although the plant to be controller is continuous(-valued), it may still make sense to design and implement a hybrid controller, see the next paragraph.

+
+
+

Impossibility to stabilize without a hybrid controller

+
+

Example 6 (Unicycle stabilization) We consider a unicycle model of a vehicle in a plane, characterized by the position and orientation, with the controlled forward speed v and the yaw (turning) angular rate \omega.

+
+
+
+ +
+
+Figure 4: Unicycle vehicle +
+
+
+

The vehicle is modelled by +\begin{aligned} +\dot x &= v \cos \theta,\\ +\dot y &= v \sin \theta,\\ +\dot \theta &= \omega, +\end{aligned} +

+

+\bm x = \begin{bmatrix} +x\\ y\\ \theta +\end{bmatrix}, +\quad +\bm u = \begin{bmatrix} +v\\ \omega +\end{bmatrix}. +

+

It is known that this system cannot be stabilized by a continuous feedback controller. The general result that applies here was published in [1]. The condition of stabilizability by a time-invariant continuous state feedback is that the image of every neighborhood of the origin under (\bm x,\bm u) \mapsto \bm f(\bm x, \bm u) contains some neighborhood of the origin. This is not the case here. The map from the state-control space to the velocity space is

+

+\begin{bmatrix} +x\\ y\\ \theta\\ v\\ \omega +\end{bmatrix} +\mapsto +\begin{bmatrix} +v \cos \theta\\ +v \sin \theta \\ +\omega +\end{bmatrix}. +

+

Now consider a neighborhood of the origin such that |\theta|<\frac{\pi}{2}. It is impossible to get \bm f(\bm x, \bm u) = \begin{bmatrix} +0\\ f_2 \\ 0\end{bmatrix}, \; f_2\neq 0. Hence, stabilization by a continuous feedback \bm u = \kappa (\bm x) is impossible.

+

But it is possible to stabilize the vehicle using a discontinuous feedback. And discontinuous feedback controllr can be viewed as switching control, which in turn can be seen as instance of a hybrid controller.

+
+
+

Example 7 (Global asymptotic stabilization on a circle) We now give a demonstration of a general phenomenon of stabilization on a manifold. We will see that even if asymptotic stabilization by a continuous feedback is possible, it may not be possible to guarantee it globally.

+
+
+
+ +
+
+Why control on manifolds? +
+
+
+

First, recall that a manifold is a solution set for a system of nonlinear equations. A prominent example is a unit circle \mathbb S_1 = \{\bm x \in \mathbb R^2 \mid x_1^2 + x_2^2 - 1 = 0\}. An extension to two variables is then \mathbb S_2 = \{\bm x \in \mathbb R^4 \mid x_1^2 + x_2^2 - 1 = 0, \, x_3^2 + x_4^2 - 1 = 0\}. Now, why shall we bother to study control within this type of a state space? It turns out that such models of state space are most appropriate in mechatronic/robotic systems wherein angular variables range more than 360^\circ. We worked on this kind of a system some time ago when designing a control system for inertially stabilized gimballed camera platforms.

+
+
+
+

In this example we restrict the motion of of a particle to sliding around a unit circle \mathbb S_1 is modelled by
+ +\dot{\bm x} = u\begin{bmatrix}0 & -1\\ 1 & 0\end{bmatrix}\bm x, + where \bm x \in \mathbb S^1,\quad u\in \mathbb R.

+

The point to be stabilized is \bm x^* = \begin{bmatrix}1\\ 0\end{bmatrix}.

+
+
+
+ +
+
+Figure 5: Asymptotic stabilization on a circle +
+
+
+

What is required from a globally asymptotically stabilizing controller?

+
    +
  • Solutions stay in \mathbb S^1,
  • +
  • Solutions converge to \bm x^*,
  • +
  • If a solution starts near \bm x^*, it stays near.
  • +
+

One candidate is \kappa(\bm x) = -x_2.

+

Define the (Lyapunov) function V(\bm x) = 1-x_1.

+

Indeed, it does qualify as a Lyapunov function because it is zero at \bm x^* and positive elsewhere. Furthermore, its time derivative along the solution trajectory is +\begin{aligned} +\dot V &= \left(\nabla_{\bm{x}}V\right)^\top \dot{\bm x}\\ +&= \begin{bmatrix}-1 & 0\end{bmatrix}\left(-x_2\begin{bmatrix}0 & -1\\ 1 & 0\end{bmatrix}\begin{bmatrix} x_1 \\ x_2 \end{bmatrix}\right)\\ +&= -x_2^2\\ +&= -(1-x_1^2), +\end{aligned} + from which it follows that +\dot V < 0 \quad \forall \bm x \in \mathbb S^1 \setminus \{-1,1\}. +

+

With u=-x_2 the point \bm x^* is stable but not globally atractive, hence it is not globally asymptotically stable.

+

Can we do better?

+

Yes, we can. But we need to incorporate some switching into the controller. Loosely speaking anywhere except for the state (-1,0), we can apply the previously designed controller, and at the troublesome state (-1,0), or actually in some region around it, we need to switch to another controller that would drive the system away from the problematic region.

+

But we will take this example as an opportunity to go one step further and instead of just a switching controller we design a hybrid controller. The difference is that within a hybrid controller we can incorporate some hysteresis, which is a robustifying feature. In order to do that, we need to introduce a new state variable q\in\{0,1\}. Determination of the flow and jump sets is sketched in Figure 6.

+
+
+
+ +
+
+Figure 6: Definition of the sets defining a hybrid controller +
+
+
+

Note that there is no hysteresis if c_0=c_1, in which case the hybrid controller reduces to a switching controller (but more on switching controllers in the next chapter).

+

The two feedback controllers are given by +\begin{aligned} +\kappa(\bm x,0) &= \kappa_0(\bm x) = -x_2,\\ +\kappa(\bm x,1) &= \kappa_1(\bm x) = -x_1. +\end{aligned} +

+

The flow map is (DIY) +f(\bm x, q) = \ldots +

+

The flow set is +\mathcal{C} = (\mathcal C_0 \times \{0\}) \cup (\mathcal C_1 \times \{1\}). +

+

The jump set is +\mathcal{D} = (\mathcal D_0 \times \{0\}) \cup (\mathcal D_1 \times \{1\}). +

+

The jump map is +g(\bm x, q) = 1-q \quad \forall [\bm x, q]^\top \in \mathcal D. +

+

Simulation using Julia is provided below.

+
+
+Show the code +
using OrdinaryDiffEq
+
+# Defining the sets and functions for the hybrid equations
+
+c₀, c₁ = -2/3, -1/3
+
+C(x,q) = (x[1] >= c₀ && q == 0) || (x[1] <= c₁ && q == 1) # Actually not really needed, just a complement of D.
+D(x,q) = (x[1] < c₀ && q == 0) || (x[1] > c₁ && q == 1) 
+
+g(x,q) = 1-q
+
+κ(x,q) = q==0 ? -x[2] : -x[1] 
+
+function f!(dx,x,q,t)               # Already in the format for the ODE solver.
+    A = [0.0 -1.0; 1.0 0.0] 
+    dx .= A*x*κ(x,q)
+end
+
+# Defining the initial conditions for the simulation
+
+cᵢ = (c₀+c₁)/2
+x₀ = [cᵢ,sqrt(1-cᵢ^2)]
+q₀ = 1
+
+# Setting up the simulation problem
+
+tspan = (0.0,10.0)
+prob = ODEProblem(f!,x₀,tspan,q₀)
+
+function condition(x,t,integrator)
+    q = integrator.p 
+    return D(x,q)
+end
+
+function affect!(integrator)
+    q = integrator.p
+    x = integrator.u 
+    integrator.p = g(x,q)
+end
+
+cb = DiscreteCallback(condition,affect!)
+
+# Solving the simulation problem
+
+sol = solve(prob,Tsit5(),callback=cb,dtmax=0.1) # ContinuousCallback more suitable here
+
+# Plotting the results of the simulation
+
+using Plots
+gr(tickfontsize=12,legend_font_pointsize=12,guidefontsize=12)
+
+plot(sol,label=["x₁" "x₂"],xaxis="t",yaxis="x",lw=2)
+hline!([c₀], label="c₀")
+hline!([c₁], label="c₁")
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+Figure 7: Simulation of stabilization on a circle using a hybrid controller +
+
+
+
+

The solution can also be visualized in the state space.

+
+
+Show the code +
plot(sol,idxs=(1,2),label="",xaxis="x₁",yaxis="x₂",lw=2,aspect_ratio=1)
+vline!([c₀], label="c₀")
+vline!([c₁], label="c₁")
+scatter!([x₀[1]],[x₀[2]],label="x init")
+scatter!([1],[0],label="x ref")
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+Figure 8: Simulation of stabilization on a circle using a hybrid controller +
+
+
+
+
+
+
+

Supervisory control

+

Yet another problem that can benefit from being formulated as a hybrid system is supervisory control.

+
+
+
+ +
+
+Figure 9: Supervisory control +
+
+
+
+
+

Combining local and global controllers \subset supervisory control

+

As a subset of supervisory control we can view a controller that switches between a global and a local controller.

+
+
+
+ +
+
+Figure 10: Combining global and local controllers +
+
+
+

Local controllers have good transient response but only work well in a small region around the equilibrium state. Global controllers have poor transient response but work well in a larger region around the equilibrium state.

+

A useful example is that of swinging up and stabilization of a pendulum: the local controller can be designer for a linear model obtained by linearization about the upright orientation of the pendulum. But such controller can only be expected to perform well in some small region around the upright orientation. The global controller is designed to bring the pendulum into that small region.

+

The flow and jump sets for the local and global controllers are in Figure 11. Can you tell, which is which? Remember that by introducing the discrete variable q, some hysteresis is in the game here.

+
+
+
+ +
+
+Figure 11: Flow and jump sets for a local and a global controller +
+
+
+ + + +
+ + Back to top

References

+
+
[1]
R. Brockett, “Asymptotic stability and feedback stabilization,” in Differential Geometric Control Theory, R. Brockett, R. Millman, and H. Sussmann, Eds., Boston: Birkhäuser, 1983.
+
+
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/hybrid_equations.html b/hybrid_equations.html index 140ec24..9c3eb67 100644 --- a/hybrid_equations.html +++ b/hybrid_equations.html @@ -1177,57 +1177,57 @@

- + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Figure 7: Simulation of stabilization on a circle using a hybrid controller @@ -1251,54 +1251,54 @@

- + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Figure 8: Simulation of stabilization on a circle using a hybrid controller diff --git a/hybrid_equations_references 8.html b/hybrid_equations_references 8.html new file mode 100644 index 0000000..918ccae --- /dev/null +++ b/hybrid_equations_references 8.html @@ -0,0 +1,1096 @@ + + + + + + + + + +Literature – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Literature

+
+ + + +
+ + + + +
+ + + +
+ + +

The theoretical and computational framework of hybrid equations has been mostly developed by a relatively small circle of researchers (Sanfelice, Goebel, Teel, …). The primary monograph is [1]. It is also supported by a freely available Matlab toolbox, see the section on software.

+

+

The book [2] can be regarded as a predecessor and/or complement of the just mentioned [1]. Although the book is not available online, a short version appears as an article [3] in the popular IEEE Control Systems magazine (the one with color figures :-).

+

+ + + + + Back to top

References

+
+
[1]
R. G. Sanfelice, Hybrid Feedback Control. Princeton University Press, 2021. Accessed: Sep. 23, 2020. [Online]. Available: https://press.princeton.edu/books/hardcover/9780691180229/hybrid-feedback-control
+
+
+
[2]
R. Goebel, R. G. Sanfelice, and A. R. Teel, Hybrid Dynamical Systems: Modeling, Stability, and Robustness. Princeton University Press, 2012. Available: https://press.princeton.edu/books/hardcover/9780691153896/hybrid-dynamical-systems
+
+
+
[3]
R. Goebel, R. G. Sanfelice, and A. R. Teel, “Hybrid dynamical systems,” IEEE Control Systems Magazine, vol. 29, no. 2, pp. 28–93, Apr. 2009, doi: 10.1109/MCS.2008.931718.
+
+
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/hybrid_equations_software 6.html b/hybrid_equations_software 6.html new file mode 100644 index 0000000..57714b8 --- /dev/null +++ b/hybrid_equations_software 6.html @@ -0,0 +1,1067 @@ + + + + + + + + + +Software – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Software

+
+ + + +
+ + + + +
+ + + +
+ + +

There is a well-developed and actively maintained Matlab toolbox

+ +

The toolbox can also be installed directly from Matlab through their Add-Ons Explorer. As the stable version is already two years old and they also offer a beta version 3.1.0.04, which was last updated on April 28, 2024, the beta version seems the way to go for our purposes. The authors will certainly appreciate any feedback.

+

Other programming languages seem to be missing a similar toolbox/package. How about developing one in Julia?

+ + + + Back to top
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/index 6.html b/index 6.html new file mode 100644 index 0000000..ca331b3 --- /dev/null +++ b/index 6.html @@ -0,0 +1,1051 @@ + + + + + + + + + +B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

B(E)3M35HYS – Hybrid systems

+
+ + + +
+ + + + +
+ + + +
+ + +

This website constitutes the online lecture notes for the graduate course Hybrid Systems (B3M35HYS, BE3M35HYS) taught within Cybernetics and Robotics graduate program at Faculty of Electrical Engineering, Czech Technical University in Prague.

+

Organizational instructions, description of grading policy, assignments of homework problems and other course related material relevant for officially enrolled students are located elsewhere (the course page within the FEL Moodle).

+ + + + Back to top
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/intro 6.html b/intro 6.html new file mode 100644 index 0000000..2932f7b --- /dev/null +++ b/intro 6.html @@ -0,0 +1,1178 @@ + + + + + + + + + +What is a hybrid system? – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

What is a hybrid system?

+
+ + + +
+ + + + +
+ + + +
+ + +
+

Definition of a hybrid system

+

The adjective “hybrid” is used in a common language to express that the subject under consideration has a bit of this and a bit of that… When talking about hybridness of systems, we modify this vague “definition” into a more descriptive one: a hybrid system has a bit of this and an atom of that… By this bon mot we mean that hybrid systems contain some physical subsystems and components combined with if-then-else and/or timing rules that are mostly (but not always) implemented in software. This definition is certainly not the most precise one, but it is a good starting point.

+

Even better a definition is that hybrid systems are composed of subsystems whose evolution is driven by time (discrete or continuous) and some other subsystems that evolve as dictated by (discrete) events. The former are modelled by ordinary differential equations (ODE) or differential-algebraic equations (DAE) in continuous time cases and by difference equations in the discrete time cases. The are latter are modelled by state automata or Petri nets, and they implement some propositonal (aka sentential or statement), predicate and/or temporal logics. Let’s stick to this definition of hybrid systems. As we will progress with modelling frameworks, the definition will become a bit more operational.

+
+
+
+ +
+
+Hybrid systems vs sampled-data systems +
+
+
+

It may be a bit confusing that we are introducing a new framework for the situation that we can already handle – a physical plant evolving in continuous time (and modelled by an ODE) controlled in discrete-time by a digital controller/computer. Indeed, this situation does qualify as a hybrid system. In introductory course we have learnt to design such controllers (by discretizing the system and then designing a controller for a discrete-time model, relying on ) and there was no need to introduce whatever new framework. However, this standard scenario assumes that the sampling period is constant. Only then can the standard techniques based on z-transform be applied. As soon as the sampling period is not constant, we need some more general framework – the framework of hybrid systems.

+
+
+
+
+
+ +
+
+Hybrid systems vs cyberphysical systems +
+
+
+

Recently systems containing both the computer/software/algorithmic parts and physical parts are also studied under the fancy name cyberphysical systems. The two concepts can hardly be distinguished, to be honest. I also confess I am unhappy with the narrowing of the concept of cybernetics to just computers. Cybernetics, as introduced by Norbert Wiener, already encompasses physical and biological systems among others. Anyway, that is how it is and the take-away leeson is that these days a great deal of material relevant for our course on hybrid systems can also be found in resources adopting the name cyberphysical systems.

+
+
+
+
+

Example of a hybrid system

+
+
+

+
Example of a hybrid system (from [1])
+
+
+
+
+

Hybrid system is an open and unbounded concept

+

Partly because hybrid systems are investigated by many

+
    +
  • Computer science
  • +
  • Modeling & simulation
  • +
  • Control systems
  • +
+
+

Hybrid systems in computer science

+
    +
  • They start with discrete-event systems, typically modelled by finite state automata and/or timed automata, and add some (typically simple) continuous-time dynamics.
  • +
  • Mainly motivated by analysis (verification, model checking, …): safety, liveness, fairness, …
  • +
+
+
+

Hybrid systems in modeling and simulation

+
    +
  • Even when modeling purely physical systems, it can be beneficial to approximate some fast dynamics with discontinuous transitions – jumps (diodes and other semiconductor switches, computer networks, mechanical impacts, …).
  • +
+
+
+
+ +
+
+Systems vs models +
+
+
+

Strictly speaking, we should speak about hybrid models, because modeling a given system as hybrid is already a modeller’s decision. But the terminology is already settled. After all, we also speak about “second-order systems” when we actually mean “second-order models”, or “LTI systems” when we actually mean “LTI models”.

+
+
+
+
+

Hybrid systems in control systems

+
    +
  • Typically focused on continuous-time dynamical systems to be controlled but introducing some logic through a controller (switching control, relay control, PLC, …)
  • +
  • Besides synthesis (aka control design), properties such as stability, controllability, robustness.
  • +
  • There is yet another motivation for explicitly dealing with hybridness in control systems: some systems can only be stabilized by switching and switching can be formulated within the hybrid system framework.
  • +
+ + + +
+
+ + Back to top

References

+
+
[1]
C. G. Cassandras and S. Lafortune, Introduction to Discrete Event Systems, 3rd ed. Cham: Springer, 2021. Available: https://doi.org/10.1007/978-3-030-72274-6
+
+
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/intro_outline 9.html b/intro_outline 9.html new file mode 100644 index 0000000..60fd76f --- /dev/null +++ b/intro_outline 9.html @@ -0,0 +1,1100 @@ + + + + + + + + + +Course outline – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Course outline

+
+ + + +
+ + + + +
+ + + +
+ + +

The course is structured into 14 topics, each of them corresponding to one lecture. The topics are as follows:

+
    +
  • Discrete-event systems +
      +
    1. (State) automata (state machines) (incl. timed variants)
    2. +
    3. Petri nets (and timed Petri nets),
    4. +
    5. Max-Plus algebra and Max-Plus Linear (MPL) systems
    6. +
  • +
  • Hybrid systems +
      +
    1. Hybrid automata
    2. +
    3. Hybrid equations
    4. +
  • +
  • Special classes of hybrid systems +
      +
    1. Reset (control) systems, Switched/switching systems, Piecewise affine systems (PWA)
    2. +
    3. Complementarity dynamical systems (and complementarity optimization constraints)
      +
    4. +
  • +
+
    +
  1. Solutions of hybrid systems
  2. +
+
    +
  • Stability of hybrid systems +
      +
    1. Common Lyapunov function +
        +
      • Quadratic Lyapunov function via linear matrix inequality (LMI) and semidefinite programming (SDP)
      • +
      • Polynomial Lyapunov function via sum-of-squares (SOS) programming
      • +
    2. +
    3. Piecewise quadratic/polynomial Lyapunov function via S-procedure
    4. +
  • +
+
    +
  1. Mixed-logical dynamical (MLD) description of hybrid systems
  2. +
  3. Model predictive control (MPC) for MLD systems
  4. +
  5. (Formal) verification of hybrid systems
  6. +
+ + + + Back to top
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/intro_references 6.html b/intro_references 6.html new file mode 100644 index 0000000..3d7b4ef --- /dev/null +++ b/intro_references 6.html @@ -0,0 +1,1144 @@ + + + + + + + + + +Literature – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Literature

+
+ + + +
+ + + + +
+ + + +
+ + +

The discipline of hybrid system is huge and spans several areas of science and engineering. As a result, finding a single comprehensive reference is difficult if not impossible. The more so that our selection of topics is inevitably biased. Admittedly, our selections of both topics and references will mostly be biased towards control engineering, and yet even within that discipline we have our own preferences. Therefore, we will always provide a list of references when studying particular topics.

+
+

Introductory/overview texts freely available online

+

Among the texts that provide motivation for studying hybrid systems as well as some introduction into theoretical and computational frameworks, we recommend Heemels et al. (2009), which is also available on the author’s webpage. Yet another overview, which is also available online, is Johansson (2004). And yet another is De Schutter et al. (2009), which is available on the author’s web page. The quartet of recommended online resources is concluded by Lygeros (2004).

+
+
+

Books not freely available online (at least not that we know of)

+

Among the high-quality printed books, for which we are not aware of legally available online versions, the slim book van der Schaft and Schumacher (2000) can be regarded as the classic.

+

+

The handbook Lunze and Lamnabhi-Lagarrigue (2009) contains a wealth of contributions from several authors (in fact two of the online resources linked above are chapters from this book).

+

+

The latest textbook on the topic of hybrid systems is Lin and Antsaklis (2022). The book was probably the prime candidate for the book for this course, however we wanted a slightly different emphasis on each topic.

+

+

Another relatively recent book is Sanfelice (2021). Although it is very well written and is certainly recommendable, it follows a particular framework that is not the most common one in the literature on hybrid systems – the framework of hybrid equations. But we are certainly going to introduce their approach in our course. The more so that it is supported by a freely available Matlab toolbox.

+

+

The book Goebel, Sanfelice, and Teel (2012) can be regarded as a predecessor and/or complement of the just mentioned Sanfelice (2021). Although the book is not available online, a short version appears as an article Goebel, Sanfelice, and Teel (2009) in the popular IEEE Control Systems magazine (the one with color figures :-).

+

+

Last but not least, MPC methodology is specialized to hybrid systems in Borrelli, Bemporad, and Morari (2017). Unline the other books in this list, this one is freely available on the authors’ webpage.

+

+

This list of study resources on hybrid systems is by no means exhaustive. We will provide more references in the respective chapters.

+ + + +
+ + Back to top

References

+
+Borrelli, Francesco, Alberto Bemporad, and Manfred Morari. 2017. Predictive Control for Linear and Hybrid Systems. Cambridge, New York: Cambridge University Press. http://cse.lab.imtlucca.it/~bemporad/publications/papers/BBMbook.pdf. +
+
+De Schutter, B., W. P. M. H. Heemels, J. Lunze, and C. Prieur. 2009. “Survey of Modeling, Analysis, and Control of Hybrid Systems.” In Handbook of Hybrid Systems Control: Theory, Tools, Applications, edited by Françoise Lamnabhi-Lagarrigue and Jan Lunze, 31–56. Cambridge: Cambridge University Press. https://doi.org/10.1017/CBO9780511807930.003. +
+
+Goebel, Rafal, Ricardo G. Sanfelice, and Andrew R. Teel. 2009. “Hybrid Dynamical Systems.” IEEE Control Systems Magazine 29 (2): 28–93. https://doi.org/10.1109/MCS.2008.931718. +
+
+———. 2012. Hybrid Dynamical Systems: Modeling, Stability, and Robustness. Princeton University Press. https://press.princeton.edu/books/hardcover/9780691153896/hybrid-dynamical-systems. +
+
+Heemels, W. P. M. H., D. Lehmann, J. Lunze, and B. De Schutter. 2009. “Introduction to Hybrid Systems.” In Handbook of Hybrid Systems Control: Theory, Tools, Applications, edited by Jan Lunze and Françoise Lamnabhi-Lagarrigue, 3–30. Cambridge University Press. https://doi.org/10.1017/CBO9780511807930.002. +
+
+Johansson, Karl Henrik. 2004. “Hybrid Control Systems.” In UNESCO Encyclopedia of Life Support Systems (EOLSS). UNESCO. http://urn.kb.se/resolve?urn=urn:nbn:se:kth:diva-90411. +
+
+Lin, Hai, and Panos J. Antsaklis. 2022. Hybrid Dynamical Systems: Fundamentals and Methods. Advanced Textbooks in Control and Signal Processing. Cham: Springer. https://doi.org/10.1007/978-3-030-78731-8. +
+
+Lunze, Jan, and Françoise Lamnabhi-Lagarrigue, eds. 2009. Handbook of Hybrid Systems Control: Theory, Tools, Applications. 1 edition. Cambridge, UK ; New York: Cambridge University Press. +
+
+Lygeros, John. 2004. Lecture Notes on Hybrid Systems. https://people.eecs.berkeley.edu/~sastry/ee291e/lygeros.pdf. +
+
+Sanfelice, Ricardo G. 2021. Hybrid Feedback Control. Princeton University Press. https://press.princeton.edu/books/hardcover/9780691180229/hybrid-feedback-control. +
+
+van der Schaft, Arjan J., and Hans Schumacher. 2000. An Introduction to Hybrid Dynamical Systems. Lecture Notes in Control and Information Sciences 251. London: Springer-Verlag. https://doi.org/10.1007/BFb0109998. +
+
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/max_plus_algebra.html b/max_plus_algebra.html index 6c6c597..9c2a8ba 100644 --- a/max_plus_algebra.html +++ b/max_plus_algebra.html @@ -890,43 +890,43 @@

( - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -952,3255 +952,3255 @@

( - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4226,3257 +4226,3257 @@

( - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/max_plus_systems 6.html b/max_plus_systems 6.html new file mode 100644 index 0000000..2321259 --- /dev/null +++ b/max_plus_systems 6.html @@ -0,0 +1,1400 @@ + + + + + + + + + +Max-plus linear (MPL) systems – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Max-plus linear (MPL) systems

+
+ + + +
+ + + + +
+ + + +
+ + +

We start with an example of a discrete-event systems modelled using (max,+) algebra.

+
+

Example 1 (Production system)  

+
    +
  • There are 3 production units: \(P_1, P_2, P_3\).
  • +
  • The unit \(P_3\) waits for the outputs from the units \(P_1\) and \(P_2\).
  • +
  • Each unit introduces a processing delay: \(v_1 = 12, v_2 = 11, v_3 = 7\), respectively.
  • +
  • There are also transportation delays: \(d_2 = 2\) from the entry to \(P_2\), and \(d_4 = 1\) from \(P_2\) to \(P_3\). All the other transportation delays are negligible.
  • +
+

Timed Petri net (event graph) for the example is in Figure 1 below.

+
+
+
+ +
+
+Figure 1: Example of a production system modelled by a timed Petri net (only the transitions are timed) +
+
+
+

The Petri net can be made more compact by associating the delays also with the places, as in Figure 2 below.

+
+
+
+ +
+
+Figure 2: Example of a production system modelled by a timed Petri net (both places and transitions are timed) +
+
+
+

With the outputs from the three transitions (the rectangles) after the kth event labelled by \(x_{1,k}\), \(x_{2,k}\), and \(x_{3,k}\), the state equations are \[ +\begin{aligned} +x_{1,k} &= \max\{x_{1,k-1} + 12, u_k + 0\}\\ +x_{2,k} &= \max\{x_{2,k-1} + 11, u_k + 2\}\\ +x_{3,k} &= \max\{x_{3,k-1} + 7, x_{1,k} +12 + 0, x_{2,k} + 11 + 1\}\\ +&= \max\{x_{3,k-1} + 7, \max\{x_{1,k-1} + 12, u_k\} +12, \\ +&\qquad \max\{x_{2,k-1} + 11, u_k+2\} + 12\}\\ +&= \max\{x_{3,k-1} + 7, x_{1,k-1} + 24, x_{2,k-1} + 23, \\ +&\qquad\qquad u_k+14\}\\ +y_k &= x_{3,k} + 7 +\end{aligned} +\]

+

The state equations can be rewritten in the (max,+) algebra \[ +\begin{aligned} +\begin{bmatrix} +x_{1,k} \\ x_{2,k} \\ x_{3,k} +\end{bmatrix} +&= +\begin{bmatrix} +12 & \varepsilon & \varepsilon\\ +\varepsilon & 11 & \varepsilon\\ +24 & 23 & 7 +\end{bmatrix} +\otimes +\begin{bmatrix} +x_{1,k-1} \\ x_{2,k-1} \\ x_{3,k-1} +\end{bmatrix} +\oplus +\begin{bmatrix} +0 \\ 2 \\ 14 +\end{bmatrix} +\otimes +u_k\\ +y_k &= +\begin{bmatrix} +\varepsilon & \varepsilon & 7 +\end{bmatrix} +\otimes +x_k +\end{aligned} +\]

+
+
+

Model of an event graph as a Max-plus linear (MPL) state-space system

+

Generalizing what we have seen in the previous example, we can write the MPL state-space system (actually a model) as \[\boxed{ + \begin{aligned} + x(k) &= A\otimes x(k-1) \oplus B\otimes u(k),\\ + y(k) &= C\otimes x(k), + \end{aligned}} +\tag{1}\]

+

where \(A\), \(B\), and \(C\) are matrices of appropriate dimensions. or, equivalently (after relabelling) \[ + \begin{aligned} + x(k+1) &= A\otimes x(k) \oplus B\otimes u(k),\\ + y(k) &= C\otimes x(k), + \end{aligned} +\]
+which mimics the conventional state-space system \[ + \begin{aligned} + x(k+1) &= A x(k) + Bu(k),\\ + y(k) &= Cx(k). + \end{aligned} +\]

+

We already know this from the example, but we need to emphasize it here again: the role of the variables \(u(k), x(k), y(k)\) is that they are event times. Namely the times of

+
    +
  • arrivals of inputs,
  • +
  • beginning of processing
  • +
  • finishing of processing,
  • +
+

respectively.

+

The independent variable \(k\) is now a counter of the events.

+
+
+

State response of an MPL system

+

In order to simulate an MPL system, we can now find use of the definitions of the basic operations in (max,+) algebra that we studied previously. Note that \[ +\begin{aligned} +x_1 &= A\otimes x_0 \oplus B\otimes u_1\\ +x_2 &= A\otimes x_1 \oplus B\otimes u_2\\ + &= A\otimes (A\otimes x_0 \oplus B\otimes u_1) \oplus B\otimes u_2\\ + &= A^{\otimes^2}\otimes x_0 \oplus A\otimes B\otimes u_1 \oplus B\otimes u_2\\ + &\vdots +\end{aligned} +\] which can be generalized to \[\boxed{ +x_k = A^{\otimes^k}\otimes x_0 \oplus \bigoplus_{i=1}^k A^{\otimes^{k-i}} \otimes B\otimes u_i.} +\tag{2}\]

+
+
+
+ +
+
+Response of an LTI state-space system +
+
+
+

The response of a linear time-invariant (LTI) system described by a (vector) state equation \(x(k+1) = Ax(k) + Bu(k)\) is \[ +x_{k} = A^k x_0 + \sum_{i=0}^{k-1} A^{k-1-i}Bu_i. +\]

+
+
+
+
+
+ +
+
+Lower and upper bounds for the summation shifted by 1 +
+
+
+

Note how the lower and upper bounds for the summation are shifted by 1 compared to the traditional convolution.

+
+
+
+
+

(max,+) linearity

+

We should emphasize that the linearity exhibited by the state equation Equation 1 and the convolution Equation 2 must only be understood in the (max,+) sense.

+

Indeed, if we consider two input sequences \(u_1= \{u_{1,1},u_{1,2},\ldots\}\) and \(u_2= \{u_{2,1},u_{2,2},\ldots\}\), a (max,+)-linear combination \(\alpha \otimes u_1 \oplus \beta \otimes u_2\) of the two inputs yields the same (max,+)-linear combination of the outputs \(y_1\) and \(y_2\).

+
+
+

Input-output response of an MPL system

+

We can also eliminate the state variables from the model and aim at finding the relation between the input and output sequences \[ +U = \begin{bmatrix}u_1 \\ u_2 \\ \vdots \\ u_p\end{bmatrix}, \qquad Y = \begin{bmatrix}y_1 \\ y_2 \\ \vdots \\ y_p\end{bmatrix} +\] in the form of \[\boxed +{Y = G\otimes x_0 \oplus H\otimes U,} +\] where \[ +H = +\begin{bmatrix} +C\otimes B & \varepsilon & \varepsilon & \ldots & \varepsilon\\ +C\otimes A\otimes B & C\otimes B & \varepsilon & \ldots & \varepsilon\\ +C\otimes A^{\otimes^2}\otimes B & C\otimes A\otimes B & C\otimes B & \ldots & \varepsilon\\ +\vdots & \vdots & \vdots & \ddots & \vdots\\ +C\otimes A^{\otimes^{p-1}}\otimes B & C\otimes A^{\otimes^{p-2}}\otimes B & C\otimes A^{\otimes^{p-3}}\otimes B & \ldots & C\otimes B +\end{bmatrix} +\] and \[ +G = +\begin{bmatrix} +C \\ C\otimes A \\ C\otimes A^{\otimes^2} \\ \vdots \\ C\otimes A^{\otimes^{p-1}} +\end{bmatrix}. +\]

+
+

Example 2 (Production system) We consider again the production system in Example 1. On the time horizon of 4, and assuming zero initial state, the input-output model is paramaterized by \[ +Y = \begin{bmatrix}y_1 & y_2 & y_3 & y_4\end{bmatrix}^\top, \quad U = \begin{bmatrix}u_1 & u_2 & u_3 & u_4\end{bmatrix}^\top, +\]

+

\[ +x_0 = \begin{bmatrix}\varepsilon & \varepsilon & \varepsilon\end{bmatrix}^\top, +\]

+

\[ +H = +\begin{bmatrix} +21 & \varepsilon & \varepsilon & \varepsilon\\ +32 & 21 & \varepsilon & \varepsilon\\ +43 & 32 & 21 & \varepsilon\\ +55 & 43 & 32 & 21 +\end{bmatrix}. +\]

+
+
+
+

Analysis of an irreducible MPL system

+

We now consider an autonomous MPL system \[ +x_{k+c} = A^{\otimes^{k+c}}\otimes x_0, +\] for which we assume irreducibility of the matrix \(A\).

+

We have learnt previously, that for large enough \(k\) and \(c\), \[ +x_{k+c} = \lambda^{\otimes^c}\otimes A^{\otimes^{k}}\otimes x_0 = \lambda^{\otimes^c}\otimes x_k. +\]

+

This can be interpreted in the standard algabra as \[ +x_{k+c} = c\lambda + x_k, +\] from which it follows that \[ +x_{k+c}-x_k = c\lambda. +\]

+

This is an insightful result. When the system under consideration is a production system, then once it reaches a cyclic behaviour, the average cycle is \(\lambda\). The average production rate is then \(1/\lambda\).

+
+
+

Model Predictive Control (MPC) for MPL systems

+

Now we are finally ready to consider control problems form MPL systems. We will consider the MPC approach.

+
+

Cosf function for MPC

+

We consider the const function composed of two parts \[ +J = J_\mathrm{output} + \lambda J_\mathrm{input}. +\]

+

At “time” \(k\), with the prediction horizon \(N_\mathrm{p}\), and with the number of outputs \(n_\mathrm{y}\): \[ +J_\mathrm{output} = \sum_{j=0}^{N_\mathrm{p}-1}\sum_{i=1}^{n_\mathrm{y}} \max \{y_{i,k+j} - r_{i,k+j},0\} +\]

+

This cost function penalizes tardiness (late delivery).

+
+
+
+ +
+
+Caution +
+
+
+

Is the lower value for j correct?

+
+
+

Alternative choice of the cost function is \[ +J_\mathrm{output} = \sum_{j=0}^{N_\mathrm{p}-1}\sum_{i=1}^{n_\mathrm{y}} \left|y_{i,k+j} - r_{i,k+j} \right |, +\] which penalizes difference between the due and actual dates, or \[ +J_\mathrm{output} = \sum_{j=1}^{N_\mathrm{p}-1}\sum_{i=1}^{n_\mathrm{y}} \left |\Delta^2 y_{i,k+j}\right |, +\] which balances the output rates.

+

The input cost can be set to \[ +J_\mathrm{input} = -\sum_{j=0}^{N_\mathrm{p}-1}\sum_{l=1}^{n_\mathrm{u}} u_{l,k+j}, +\] which penalizes early feeding (favours just-in-time feeding). Note the minus sign.

+
+
+

Control horizon vs. prediction horizon

+

Assume constant feeding rate after the control horizon \(N_\mathrm{c}\) \[ +\Delta u_{k+j} = \Delta u_{k+N_\mathrm{c}-1},\qquad j=N_\mathrm{c},\ldots, N_\mathrm{p}-1 +\] where \(\Delta u_k = u_k - u_{k-1}\).

+

Alternatively, \[ +\Delta^2 u_{k+j} = 0,\qquad j=N_\mathrm{c},\ldots, N_\mathrm{p}-1 +\] where \(\Delta^2 u_k = \Delta u_k - \Delta u_{k-1} = u_k - 2u_{k-1} + u_{k-2}\).

+
+
+

Inequality constraints for MPC

+

There are several possibilities for the constraints in the MPC for MPL systems. For example, we can constrain the minimum and maximum separation of input and output events \[ +a_{k+j} \leq \Delta u_{k+j} \leq b_{k+j},\qquad j=0,1,\ldots,N_\mathrm{c}-1, +\] \[ +c_{k+j} \leq \Delta y_{k+j} \leq d_{k+j},\qquad j=0,1,\ldots,N_\mathrm{p}-1. +\]

+

We can also impose constraint on the maximum due dates for the output events \[ +y_{k+j} \leq r_{k+j},\qquad j=0,1,\ldots,N_\mathrm{p}-1. +\]

+

We can also enforce the condition that the input and output events are consecutive \[ +\Delta u_{k+j} \geq 0, \qquad j=0,1,\ldots,N_\mathrm{c}-1. +\]

+
+
+

MPC for MPL system leads to a nonlinear optimization problem

+

Our motivation for formulating the problems within the (max,+) algebra was to fake the reality a bit and pretend that the problem is linear. This allowed us to invoke many concepts that we are familiar with from linear systems theory. However, at the end of the day, when it comes to actually solving the problem, we must reveal the nonlinear nature of the problem.

+

When we consider the MPC for MPL systems, we are faced with a nonlinear optimization problem. We can use some general nonlinear solvers (fmincon, ipopt, …).

+

Alternatively, there is a dedicated framework for solving these problem. It is called Extended Linear Complementarity Problem (ELCP) and was developed by [1]. We will introduce the complementarity problem(s) later in a chapter dedicated to complementarity.

+

Yet another approach is through Mixed Integer (Linear) Programming (MILP).

+ + + +
+
+ + Back to top

References

+
+
[1]
B. De Schutter and B. De Moor, “The extended linear complementarity problem,” Mathematical Programming, vol. 71, no. 3, pp. 289–325, Dec. 1995, doi: 10.1007/BF01590958.
+
+
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/mld_DHA 9.html b/mld_DHA 9.html new file mode 100644 index 0000000..a1a9087 --- /dev/null +++ b/mld_DHA 9.html @@ -0,0 +1,1190 @@ + + + + + + + + + +Discrete hybrid automata – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Discrete hybrid automata

+
+ + + +
+ + + + +
+ + + +
+ + +

Since the new modelling framework is expected to be useful for prediction of a system response within model predictive control, it must model a hybrid system in discrete time. This is a major difference from what we did in our course so far.

+

In particular, we are going to model a hybrid system as a discrete(-time) hybrid automaton (DHA), which means that

+
    +
  • the continuous-value dynamics (often corresponding to the physical part of the system) evolves in discrete time,
  • +
  • the events and their processing by the logical part of the system are synchronized to the same periodic clock.
  • +
+
+

Four components of a discrete(-time) hybrid automaton

+

We are already well familiar with the concept of a hybrid automaton, and the restriction to discrete time does not seem to warrant reopening the definition (modes/locations, guards, invariants/domains, reset maps, …). However, it turns out that reformulating/restructuring the hybrid automaton will be useful for our ultimate goal of developing an MPC-friendly modelling framework. In particular, we consider four components of a DHA:

+
    +
  • switched affine system (SAS),
  • +
  • mode selector (MS),
  • +
  • event generator (EG),
  • +
  • finite state machine (FSM).
  • +
+

Their interconnection is shown in the following figure.

+
+

Draw the block diagram from Bemporad’s materials (book, toolbox documentation).

+
+

Let’s discuss the individual components (and while doing that, you can think about the equivalent concept in the classical definition of a hybrid automaton such as mode, invariant, guard, …).

+
+

Switched affine systems (SAS)

+

This is a model of the continuous-value dynamics parameterized by the index i that evolves in (discrete) time +\begin{aligned} +x_c(k+1) &= A_{i(k)} x_c(k) + B_{i(k)} u_c(k) + f_{i(k)}\\ +y_c(k) &= C_{i(k)} x_c(k) + D_{i(k)} u_c(k) + g_{i(k)} +\end{aligned} +

+

In principle there is no need to restrict the right hand sides to affine functions as we did, but the fact is that the methods and tools are currently only available for this restricted class of systems.

+
+
+

Event generator (EG)

+

We consider partitioning of the state space or possibly state-control space into polyhedral regions. The system is then in the ith region of the state-input space, if the continuous-value state x_c(k) and the continuous-value control input u_c satisfy +H_i x_c(k) + J_i u_c(k) + K_i \leq 0 +

+

The event indicated by the (vector) binary variable +\delta_e(k) = h(x_c(k), u_c(k)) \in \{0,1\}^m, +

+

where +h_i(x_c(k), u_c(k)) = \begin{cases}1 & H_i x_c(k) + J_i u_c(k) + K_i \leq 0\\ 0 & \text{otherwise}. \end{cases} +

+
+
+

Finite state machine (FSM)

+

+x_d(k+1) = f_d(x_d(k),u_d(k),\delta_e(k)) +

+
+
+

Mode selector (MS)

+

i(k) \in \{1, 2, \ldots, s\}

+

+i(k) = \mu(x_d(k), u_d(k), \delta_e(k)) +

+
+
+
+

Trajectory of a DHA

+

+\begin{aligned} +\delta_e(k) &= h(x_c(k), u_c(k))\\ +i(k) &= \mu(x_d(k), u_d(k), \delta_e(k))\\ +y_c(k) &= C_{i(k)} x_c(k) + D_{i(k)} u_c(k) + g_{i(k)}\\ +y_d(k) &= g_d(x_d(k), u_d(k), \delta_e(k))\\ +x_c(k+1) &= A_{i(k)} x_c(k) + B_{i(k)} u_c(k) + f_{i(k)}\\ +x_d(k+1) &= f_d(x_d(k),u_d(k),\delta_e(k)) +\end{aligned} +

+
+
+

How to get rid of the IF-THEN conditions in the model?

+ + +
+ + Back to top
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/mld_intro 9.html b/mld_intro 9.html new file mode 100644 index 0000000..b6c3d48 --- /dev/null +++ b/mld_intro 9.html @@ -0,0 +1,1451 @@ + + + + + + + + + +Logic vs inequalities – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Logic vs inequalities

+
+ + + +
+ + + + +
+ + + +
+ + +

Our goal now is to turn the IF-THEN conditions in the model into linear inequalities. This will allow us to formulate the model as a mathematical program, actually a mixed-integer program (MIP).

+
+

Propositional logic and connectives

+

Propositions that are either true or false are composed of elementary propositions (Boolean variables) and connectives.

+
+

Boolean variable (or elementary proposition)

+

\(X\) evaluates to true or false. Oftentimes values 0 and 1 are used, but it should be clear that these are not numbers but logical values.

+
+
+

Connectives

+
    +
  • Conjunction (logical and): \(X_1 \land X_2\)
  • +
  • Disjunction (logical or): \(X_1 \lor X_2\)
  • +
  • Negation: \(\neg X_2\) (or \(\overline{X_2}\) or \(\sim X_2\))
  • +
  • Implication: \(X_1 \implies X_2\)
  • +
  • Equivalence: \(X_1 \iff X_2\)
  • +
  • Logical XOR: \(X_1 \oplus X_2\)
  • +
+
+
+
+

Equivalences of logic propositions

+

We will heavily used the following equivalences: \[ +\begin{aligned} +X_1 \implies X_2 \qquad &\equiv \qquad \neg X_2 \implies \neg X_1,\\ +X_1 \iff X_2 \qquad &\equiv \qquad (X_1 \implies X_2) \land (X_2 \implies X_1),\\ +X_1 \land X_2 \qquad &\equiv \qquad \neg (\neg X_1 \lor \neg X_2),\\ +X_1 \implies X_2 \qquad &\equiv \qquad \neg X_1 \lor X_2. +\end{aligned} +\]

+

The last one can be seen as follows: it cannot happen that \(X1 \land \neg X2\), that is, it holds that \(\neg(X1 \land \neg X2)\). De Morgan gives \(\neg X1 \lor X2\).

+
+ + +
+

General transformation of Boolean expressions to integer inequalities

+

From Conjunctive Normal Form (CNF) \[ +\bigwedge_{j=1}^m \left[\left(\lor_{i\in \mathcal{P}_j} X_i\right) \lor \left(\lor_{i\in \mathcal{N}_j} \neg X_i\right)\right] +\] to 0-1 integer inequalities defining a polyhedron \[ +\begin{aligned} +\sum_{i\in \mathcal{P}_1} \delta_i + \sum_{i\in \mathcal{N}_1} (1-\delta_i) &\geq 1,\\ +&\vdots\\ +\sum_{i\in \mathcal{P}_m} \delta_i + \sum_{i\in \mathcal{N}_m} (1-\delta_i) &\geq 1. +\end{aligned} +\]

+
+
+

Finite state machine (FSM) using binary variables

+

Encode the discrete state variables in binary \[ +x_b \in \{0,1\}^{n_b} +\]

+

Similarly the discrete inputs \[ +u_b \in \{0,1\}^{m_b} +\]

+

The logical state equation then \[ +x_b(k+1) = f_b(x_b(k),u_b(k),\delta_e(k)) +\]

+
+

Example 1 (Example)  

+
+
+
+ +
+
+Figure 1: Example of a FSM +
+
+
+

The state update/transition equation is \[ +\begin{aligned} +x_d(k+1) = +\begin{cases} +\text{Red} & \text{if}\; ([x_d = \text{green}] \land \neg [\delta_3=1]) \lor ([x_d = \text{red}] \land \neg [\delta_3=1])\\ +\text{Green} & \text{if} \; \ldots\\ +\text{Blue} & \text{if} \; \ldots +\end{cases} +\end{aligned} +\]

+

Binary encoding of the discrete states \[ +\text{Red}: x_b = \begin{bmatrix}0\\0 \end{bmatrix}, \; \text{Green}: x_b = \begin{bmatrix}0\\1 \end{bmatrix}, \; \text{Blue}: x_b = \begin{bmatrix}1\\0 \end{bmatrix} +\]

+

Reformulating the state update equations for binary variables \[ +\begin{aligned} +x_{b1} &= (\neg [x_{b1} = 1] \land \neg [x_{b2} = 1] \land \neg [\delta_1=1]) \\ +&\quad (\neg [x_{b1} = 1] \land \neg [x_{b2} = 1] \land [\delta_1=1]) \land [u_{b2}=1]\\ +&\quad (\neg [x_{b1} = 1] \land [x_{b2} = 1] \land \neg [u_{b1}=1] \land [\delta_3=1])\\ +&\quad \lor ([x_{b1} = 1]\land \neg [\delta_2=1])\\ +x_{b2} &= \ldots +\end{aligned} +\]

+

Finally, simplify, convert to CNF.

+
+
+
+

Mixing logical and continuous

+
    +
  • see Indicator variables.
  • +
+
+

Logical implies continuous

+

\[X \implies [f(x)\leq 0]\]

+

\[[\delta = 1] \implies [f(x)\leq 0]\]

+
    +
  • introduce \(M\) \[ +f(x) \leq (1-\delta) M +\]

  • +
  • that is large enough so that when \(\delta=0\), there is no practical restriction on \(f\).

    +
      +
    • Big-M technique.
    • +
  • +
+
+
+

Continuous implies logical

+

\[[f(x)\leq 0] \implies X\]

+

\[[f(x)\leq 0] \implies [\delta = 1]\]

+
    +
  • Equivalently \[\neg [\delta = 1] \implies \neg [f(x)\leq 0],\]

  • +
  • that is, \[[\delta = 0] \implies [f(x) > 0]\]

  • +
  • Introduce \(m\) such that \(f(x)>0\) is enforced when \(\delta=0\) \[ +f(x) > m\delta +\]

  • +
  • but small enough that there is no restriction on \(f\) when \(\delta=1\).

  • +
  • For numerical reasons, modify to nonstrict inequality \[ +f(x) \geq \epsilon + (m-\epsilon)\delta, +\] where \(\epsilon\approx 0\) (for example, machine epsilon).

  • +
+
+
+

Equivalence between logical and continuous

+
    +
  • Combining the previous two implications.
  • +
+

\[ +\begin{aligned} +f(x) &\leq (1-\delta) M,\\ +f(x) &\geq \epsilon + (m-\epsilon)\delta. +\end{aligned} +\]

+
+
+
+

IF-THEN-ELSE rule as an inequality

+
    +
  • If \(X\) +
      +
    • then \(z = a^\top x + b^\top u + f\),
    • +
    • else \(z = 0\).
    • +
  • +
  • It can be expressed as a product \[ +z = \delta\,(a^\top x + b^\top u + f) +\]
  • +
+

\[ +\begin{aligned} +z &\leq M\delta,\\ +- z &\leq -m\delta,\\ +z &\leq a^\top x + b^\top u + f - m(1-\delta),\\ +-z &\leq -(a^\top x + b^\top u + f) + M(1-\delta). +\end{aligned} +\]

+
+

The reasoning is that if \(\delta=0\), then \(z\) is restricted, while \(a^\top x + b^\top u + f\) is not. And the other way around.

+
+
+
+

Another IF-THEN-ELSE rule

+
    +
  • If \(X\) +
      +
    • then \(z = a_1^\top x + b_1^\top u + f_1\),
    • +
    • else \(z = a_2^\top x + b_2^\top u + f_2\).
    • +
  • +
  • It can be expressed as \[ +\begin{aligned} +z &= \delta\,(a_1^\top x + b_1^\top u + f_1) \\ +&\quad + (1-\delta)(a_2^\top x + b_2^\top u + f_2) +\end{aligned} +\]
  • +
+

\[ +\begin{aligned} +(m_2-M_1)\delta + z &\leq a_2^\top x + b_2^\top u + f_2,\\ +(m_1-M_2)\delta - z &\leq -a_2^\top x - b_2^\top u - f_2,\\ +(m_1-M_2)(1-\delta) + z &\leq a_1^\top x + b_1^\top u + f_1,\\ +(m_2-M_1)(1-\delta) - z &\leq -a_1^\top x - b_1^\top u - f_1. +\end{aligned} +\]

+
+
+

Generation of events by mixing logical and continuous variables in inequalities

+

\[ +\begin{aligned} +h_i(x_c(k), u_c(k)) &\leq M_i (1-\delta_{e,i})\\ +h_i(x_c(k), u_c(k)) &\geq \epsilon + (m_i-\epsilon) \delta_{e,i} +\end{aligned} +\]

+
+
+

Switched affine system

+
    +
  • We want to get rid of the IF-THEN and formulate the switching mechanism into the format of inequalities too.
  • +
+

\[ +x_c(k+1) = \sum_{i=1}^s z_i(k), +\]

+
    +
  • where \[ +z_1(k) = +\begin{cases} +A_1 x_c(k) + B_1 u_c(k) + f_1 & \text{if}\;i(k)=1\\ +0 & \text{otherwise} +\end{cases} +\]
  • +
+

\[\quad \vdots\]

+

\[ +z_s(k) = +\begin{cases} +A_s x_c(k) + B_s u_c(k) + f_s & \text{if}\;i(k)=s\\ +0 & \text{otherwise} +\end{cases} +\]

+
    +
  • For each \(i\in \{1, 2, \ldots, s\}\)
  • +
+

\[ +\begin{aligned} +z_i &\leq M_i\delta_i,\\ +- z_i &\leq -m_i\delta_i,\\ +z_i &\leq a_i^\top x + b_i^\top u + f_i - m_i(1-\delta_i),\\ +-z_i &\leq -(a_i^\top x + b_i^\top u + f_i) + M_i(1-\delta_i). +\end{aligned} +\]

+
+
+

Mixed logical dynamical (MLD) system

+

\[ +\begin{aligned} +x(k+1) &= Ax(k) + B_u u(k) + B_\delta\delta + B_zz(k) + B_0\\ +y(k) &= Cx(k) + D_u u(k) + D_\delta \delta + D_z z + D_0\\ +E_\delta \delta &+ E_z z(k) \leq E_u u(k) + E_x x(k) + E_0 +\end{aligned} +\]

+
+
+

Simple example

+
+
+

HYSDEL language

+
+
+

Piecewise affine systems

+

\[ +\begin{aligned} +x(k+1) &= A_{i(k)}x(k) + B_{i(k)} u(k) + f_{i(k)}\\ +y(k) &= C_{i(k)}x(k) + D_{i(k)} u(k) + g_{i(k)}\\ +& \; H_{i(k)} x(k) + J_{i(k)} u(k) \leq K_{i(k)} +\end{aligned} +\]

+
    +
  • DHA, MLD, PWA are equivalent.
  • +
+ + +
+ + Back to top
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/mld_references 6.html b/mld_references 6.html new file mode 100644 index 0000000..2a2f30f --- /dev/null +++ b/mld_references 6.html @@ -0,0 +1,1117 @@ + + + + + + + + + +Literature – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Literature

+
+ + + +
+ + + + +
+ + + +
+ + +

The MLD description of discrete-time hybrid systems was originally introduced in [1], but perhaps even more accessible introduction is in Chapter 16 of the freely downloadable book [2]. In our text here we followed their expositions.

+

Just in case some issues are still unclear, in particular those related to the connection between the constraints (inequalities) imposed on continuous (aka real) variables and logical conditions imposed on binary variable, you may like the little bit more formal discussion in Section 2.2 of the thesis [3]. Strictly speaking, this use of binary (0-1 integer) variables to encode some constraints on real variables is standard in optimization and is described elsewhere – search for indicator variables or indicator constraints. A recommendable general resource is the book (unfortunately not available online) [4], in particular its section 9.1.3 on Indicator variables.

+

All the theoretical concepts and procedures introduced in this lecture (and in those corresponding papers and books) are straightforward but rather tedious to actually implement. There is a HYSDEL language for modelling hybrid systems (discrete hybrid automata as considered in this lecture) that automates these procedures. The HYSDEL language is described not only in the documentation but also in the dedicated paper [5], which can also serve as a learning resource for the topic.

+
+

Case studies

+

Batch evaporator [6] and [7].

+ + + +
+ + Back to top

References

+
+
[1]
A. Bemporad and M. Morari, “Control of systems integrating logic, dynamics, and constraints,” Automatica, vol. 35, no. 3, pp. 407–427, Mar. 1999, doi: 10.1016/S0005-1098(98)00178-2.
+
+
+
[2]
F. Borrelli, A. Bemporad, and M. Morari, Predictive Control for Linear and Hybrid Systems. Cambridge, New York: Cambridge University Press, 2017. Available: http://cse.lab.imtlucca.it/~bemporad/publications/papers/BBMbook.pdf
+
+
+
[3]
D. Mignone, “Control and estimation of hybrid systems with mathematical optimization,” Doctoral {{Thesis}}, ETH Zurich, 2002. doi: 10.3929/ethz-a-004279802.
+
+
+
[4]
H. P. Williams, Model Building in Mathematical Programming, 5th ed. Hoboken, N.J: Wiley, 2013.
+
+
+
[5]
F. D. Torrisi and A. Bemporad, HYSDEL—a tool for generating computational hybrid models for analysis and synthesis problems,” IEEE Transactions on Control Systems Technology, vol. 12, no. 2, pp. 235–249, Mar. 2004, doi: 10.1109/TCST.2004.824309.
+
+
+
[6]
A. Bemporad, F. D. Torrisi, and M. Morari, “Discrete-time Hybrid Modeling and Verification of the Batch Evaporator Process Benchmark,” European Journal of Control, vol. 7, no. 4, pp. 382–399, Jan. 2001, doi: 10.3166/ejc.7.382-399.
+
+
+
[7]
S. Kowalewski and O. Stursberg, “The Batch Evaporator: A Benchmark Example for Safety Analysis of Processing Systems under Logic Control,” in Proceedings 4th Int. Workshop on Discrete Event Systems (WODES’98), Cagliari, Italy: IEE, London, Aug. 1998, pp. 302–307.
+
+
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/mld_why 8.html b/mld_why 8.html new file mode 100644 index 0000000..555f5d3 --- /dev/null +++ b/mld_why 8.html @@ -0,0 +1,1118 @@ + + + + + + + + + +Why another framework? – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Why another framework?

+
+ + + +
+ + + + +
+ + + +
+ + +

We are going to introduce yet another framework for modeling hybrid systems – mixed logical dynamical (MLD) description. A question must inevitably pop up: “why yet another framework?”

+

The answer is, that we would like to have a model of a hybrid system that is suitable for model predictive control (MPC). Recall that the role of the model in MPC is that the model is used to define some constraints (equations and inequalities) in the numerical optimization problem. The frameworks that we considered so far did not offer it.

+

In particular, with the state variable and control input vectors composed of continuous and discrete variables +\bm x = \begin{bmatrix}\bm x_c\\\bm x_d\end{bmatrix}, \quad \bm u = \begin{bmatrix}\bm u_c\\\bm u_d\end{bmatrix}, + where \bm x_c\in\mathbb R^{n_c},\;\bm x_d\in\mathbb N^{n_d},\; \bm u_c\in\mathbb R^{m_c} and \bm u_d\in\mathbb N^{m_d}, we would like to formulate the model in the form of state equations, say +\begin{aligned} +\begin{bmatrix}\bm x_c(k+1) \\ \bm x_d(k+1)\end{bmatrix} +&= +\begin{bmatrix} \mathbf f_c(\bm x(k), \bm u(k)) \\ \mathbf f_d(\bm x(k), \bm u(k)) \end{bmatrix} +\end{aligned} +

+

Is it possible?

+

Unfortunately no. At least not exactly in this form. But something close to it is achievable instead.

+

But first we need to set the terminology and notation used to define a discrete(-time) hybrid automaton.

+ + + + Back to top
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/mpc_mld_explicit 9.html b/mpc_mld_explicit 9.html new file mode 100644 index 0000000..c95401f --- /dev/null +++ b/mpc_mld_explicit 9.html @@ -0,0 +1,1202 @@ + + + + + + + + + +Explicit MPC for hybrid systems – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Explicit MPC for hybrid systems

+
+ + + +
+ + + + +
+ + + +
+ + +

Model predictive control (MPC) is not computationally cheap (compared to, say, PID or LQG control) as it requires solving optimization problem – typically a quadratic program (QP) - online. The optimization solver needs to be a part of the controller.

+

There is an alternative, though, at least in same cases. It is called explicit MPC. The computationally heavy optimization is only perfomed only during the design process and the MPC controller is then implemented just as an affine state feedback

+

+\bm u_k(\bm x(k)) = \mathbf F_k^i \bm x(k) + \mathbf g_k^i,\; \text{if}\; \bm x(k) \in \mathcal R_k^i, +

+

with the coefficients picked from some kind of a lookup table in real time Although retreiving the coefficients of the feedback controller is not computationally trivial, still it is cheaper than full optimization.

+
+

Multiparametric programming

+

The key technique for explicit MPC is multi-parametric programming. In order to explain it, consider the following problem

+

+J^\ast(x) = \inf_z J(z;x). +

+

The z variable is an optimization variable, while x is a parameter. For a given parameter x, the cost function J is minimized. We study how the optimal cost J^\ast depends on the parameter, hence the name parametric programming. If x is a vector, the name of the problem changes to multiparametric programming.

+
+

Example: scalar variable, single parameter

+

Consider the following cost function J(z;x) in z parameterized by x. The optimization variable z is constrained and this constraint is also parameterized by x. +\begin{aligned} +J(z;x) &= \frac{1}{2} z^2 + 2zx + 2x^2 \\ +\text{subject to} &\quad z \leq 1 + x. +\end{aligned} +

+

In this simple case we can aim at analytical solution. We proceed in the standard way – we introduce a Lagrange multiplicator \lambda and form the augmented cost function +L(z,\lambda; x) = \frac{1}{2} z^2 + 2zx + 2x^2 + \lambda (z-1-x). +

+

The necessary conditions of optimality for the inequality-constrained problem come in the form of KKT conditions +\begin{aligned} +z + 2x + \lambda &= 0,\\ +z - 1 - x &\leq 0,\\ +\lambda & \geq 0,\\ +\lambda (z - 1 - x) &= 0. +\end{aligned} +

+

The last condition – the complementarity condition – gives rise to two scenarios: one corresponding to \lambda = 0, and the other corresponding to z - 1 - x = 0. We consider them separately below.

+

After substituting \lambda = 0 into the KKT conditions, we get +\begin{aligned} +z + 2x &= 0,\\ +z - 1 - x & \leq 0. +\end{aligned} +

+

From the first equation we get how z depends on x, and from the second we obtain a bound on x. Finally, we can also substitute the expression for z into the cost function J to get the optimal cost J^\ast as a function of x. All these are summarized here +\begin{aligned} +z &= -2x,\\ +x & \geq -\frac{1}{3},\\ +J^\ast(x) &= 0. +\end{aligned} +

+

Now, the other scenario. Upon substitutin z - 1 - x = 0 into the KKT conditions we get

+

+\begin{aligned} +z + 2x + \lambda &= 0,\\ +z - 1 - x &= 0,\\ +\lambda & \geq 0. +\end{aligned} +

+

From the second equation we get the expression for z in terms of x, substituting into the first equation and invoking the condition on nonnegativity of \lambda we get the bound on x (not suprisingly it complements the one obtained in the previous scenario). Finally, substituting for z in the cost function J we get a formula for the cost J^\ast as a function of x.

+

+\begin{aligned} +z &= 1 + x,\\ +\lambda &= -z - 2x \geq 0 \quad \implies \quad x \leq -\frac{1}{3},\\ +J^\ast(x) &= \frac{9}{2}x^2 + 3x + \frac{1}{2}. +\end{aligned} +

+

The two scenarios can now be combined into a single piecewise affine function z(x) +z(x) = \begin{cases} +1+x & \text{if } x \leq -\frac{1}{3},\\ +-2x & \text{if } x > -\frac{1}{3}. +\end{cases} +

+
x = range(-1, 1, length=100)
+z(x) = x <= -1/3 ? 1 + x : -2x
+Jstar(x) = x <= -1/3 ? 9/2*x^2 + 3x + 1/2 : 0
+
+using Plots
+plot(x, z.(x), label="z(x)")
+vline!([-1/3],line=:dash)
+xlabel!("x")
+ylabel!("z(x)")
+

and a piecewise quadratic cost function J^\ast(x) +J^\ast(x) = \begin{cases} +\frac{9}{2}x^2 + 3x + \frac{1}{2} & \text{if } x \leq -\frac{1}{3},\\ +0 & \text{if } x > -\frac{1}{3}. +\end{cases} +

+
plot(x, Jstar.(x), label="J*(x)")
+vline!([-1/3],line=:dash)
+xlabel!("x")
+ylabel!("J*(x)")
+ + +
+
+ + Back to top
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/mpc_mld_online 6.html b/mpc_mld_online 6.html new file mode 100644 index 0000000..7b47b31 --- /dev/null +++ b/mpc_mld_online 6.html @@ -0,0 +1,1134 @@ + + + + + + + + + +Online MPC for hybrid systems – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Online MPC for hybrid systems

+
+ + + +
+ + + + +
+ + + +
+ + +
+

Optimal control on a finite horizon

+
+

Cost function

+

First, we need to set the cost function for the optimal control problem. As usual in optimal control, we want to impose different weights on invididual state and control variables. The most popular is the quadratic cost function well known from the LQ-optimal control

+

\[ +J_0(x(0),U_0) = x_N^T S_N x_N + \sum_{k=0}^{N-1} \left( x_k^T Q x_k + u_k^T R u_k \right) +\]

+

But other (weighted) norms can also be used, in particular 1-norm and infinity-norm

+

\[ +J_0(x(0),U_0) = \|S_N x_N\|_1 + \sum_{k=0}^{N-1} \left( \|Q x_k\|_1 + \|R u_k\|_1 \right), +\]

+

\[ +J_0(x(0),U_0) = \|S_N x_N\|_{\infty} + \sum_{k=0}^{N-1} \left( \|Q x_k\|_{\infty} + \|R u_k\|_{\infty} \right). +\]

+
+
+
+

Optimization problem

+

Combining the cost function with the MLD model, and perhaps we some extra constraints imposed on the control inputs as well as state variables, we get \[ +\operatorname*{minimize}_{u_0, u_1, \ldots, u_{N-1}} J_0(x(0),(u_0, u_1, \ldots, u_{N-1})) +\]

+

subject to \[ +\begin{aligned} +x_{k+1} &= Ax_k + B_u u_k + B_\delta\delta_k + B_z z_k + B_0\\ +y_k &= Cx_k + D_u u_k + D_\delta \delta_k + D_z z_k + D_0\\ +E_\delta \delta_k &+ E_z z_k \leq E_u u_k + E_x x_k + E_0 \\ +u_{\min} &\leq u_k \leq u_{\max} \\ +x_{\min} &\leq x_k \leq x_{\max} \\ +P x_N &\leq r \\ +x_0 &= x(0) +\end{aligned} +\]

+ + +
+ + Back to top
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/mpc_mld_references 9.html b/mpc_mld_references 9.html new file mode 100644 index 0000000..2ad44fe --- /dev/null +++ b/mpc_mld_references 9.html @@ -0,0 +1,1088 @@ + + + + + + + + + +Literature – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Literature

+
+ + + +
+ + + + +
+ + + +
+ + +

The main resource for us is the Chapter 17 of the freely available book [1] that we already referred to in the previous chapter.

+

Those who have not been exposed to fundamentals of MPC can check the Chapter 12 in the same book. Alternatively, our own introduction to the topic in the third chapter/week of the Optimal and robust control course can be found useful.

+ + + + + Back to top

References

+
+
[1]
F. Borrelli, A. Bemporad, and M. Morari, Predictive Control for Linear and Hybrid Systems. Cambridge, New York: Cambridge University Press, 2017. Available: http://cse.lab.imtlucca.it/~bemporad/publications/papers/BBMbook.pdf
+
+
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/mpc_mld_software 9.html b/mpc_mld_software 9.html new file mode 100644 index 0000000..b8f98d8 --- /dev/null +++ b/mpc_mld_software 9.html @@ -0,0 +1,1062 @@ + + + + + + + + + +Software – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Software

+
+ + + +
+ + + + +
+ + + +
+ + +

Essentially the same as in the previous chapter.

+ + + + Back to top
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/petri_nets_references 9.html b/petri_nets_references 9.html new file mode 100644 index 0000000..1595873 --- /dev/null +++ b/petri_nets_references 9.html @@ -0,0 +1,1134 @@ + + + + + + + + + +Literature – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Literature

+
+ + + +
+ + + + +
+ + + +
+ + +

Literature for Petri nets is vast, but a decent (and perfectly satisfactory) introduction can be found in Chapter 4 and 5.3 (for the timed PN) of the classical (and award-winning) reference [1]. Note that electronic version (in fact, PDF) is accessible through the NTK library (upon CTU login, for example to usermap first).

+

A nice introduction is also in Chapter 2 of the freely online available book [2].

+

The survey paper that is particularly focused on Petri nets from the control systems perspective is [3] and it gives a wealth of other references.

+

A few more monographs, mostly inclined towards control systems, are [4], [5], [6].

+
+

Petri nets and their derivatives such as Grafcet in international standards

+

We mention at the beginning of this chapter that Petri nets have made it to international standards. Here they are: [7], [8], and [9].

+

Based on Petri nets, another framework has been derived and standardized, namely GRAFCET, see [10] and [11], upon which, in turn, the popular Sequential Function Chart (SFC) language for PLC programming [12] is based.

+ + + +
+ + Back to top

References

+
+
[1]
C. G. Cassandras and S. Lafortune, Introduction to Discrete Event Systems, 3rd ed. Cham: Springer, 2021. Available: https://doi.org/10.1007/978-3-030-72274-6
+
+
+
[2]
F. Baccelli, G. Cohen, G. J. Olsder, and J.-P. Quadrat, Synchronization and linearity: An algebra for discrete event systems, Web edition. Chichester: Wiley, 2001. Available: https://www.rocq.inria.fr/metalau/cohen/documents/BCOQ-book.pdf
+
+
+
[3]
A. Giua and M. Silva, “Petri nets and Automatic Control: A historical perspective,” Annual Reviews in Control, vol. 45, pp. 223–239, Jan. 2018, doi: 10.1016/j.arcontrol.2018.04.006.
+
+
+
[4]
J. O. Moody, Supervisory Control of Discrete Event Systems Using Petri Nets. in The International Series on Discrete Event Dynamic Systems. New York, NY: Springer, 31 {\v c}ervence 1998. Available: https://doi.org/10.1007/978-1-4615-5711-1
+
+
+
[5]
B. Hrúz and M. Zhou, Modeling and Control of Discrete-event Dynamic Systems: With Petri Nets and Other Tools. in Advanced Textbooks in Control and Signal Processing (C&SP). London: Springer, 2007. Available: https://doi.org/10.1007/978-1-84628-877-7
+
+
+
[6]
W. Reisig, Understanding Petri Nets: Modeling Techniques, Analysis Methods, Case Studies. Berlin; Heidelberg: Springer, 2013. Available: https://doi.org/10.1007/978-3-642-33278-4
+
+
+
[7]
ISO/IEC 15909-1:2019 Systems and software engineering — High-level Petri nets — Part 1: Concepts, definitions and graphical notation.” ISO/IEC, Aug. 2019. Accessed: Sep. 27, 2023. [Online]. Available: https://www.iso.org/standard/67235.html
+
+
+
[8]
ISO/IEC 15909-2:2011 Systems and software engineering — High-level Petri nets — Part 2: Transfer format.” ISO/IEC, Feb. 2011. Accessed: Sep. 27, 2023. [Online]. Available: https://www.iso.org/standard/43538.html
+
+
+
[9]
ISO/IEC 15909-3:2021: Systems and software engineering — High-level Petri nets — Part 3: Extensions and structuring mechanisms.” ISO/IEC, 2021. Accessed: Sep. 29, 2023. [Online]. Available: https://www.iso.org/standard/81504.html
+
+
+
[10]
IEC 60848:2013 GRAFCET specification language for sequential function charts.” IEC, Feb. 2013. Available: https://webstore.iec.ch/publication/3684
+
+
+
[11]
C. Johnsson and K.-E. Årzén, “Grafchart and its Relations to Grafcet and Petri Nets,” IFAC Proceedings Volumes, vol. 31, no. 15, pp. 95–100, Jun. 1998, doi: 10.1016/S1474-6670(17)40535-0.
+
+
+
[12]
IEC 61131-3 Programmable controllers - Part 3: Programming languages.” IEC, Feb. 2013. Accessed: Jan. 08, 2023. [Online]. Available: https://webstore.iec.ch/publication/4552
+
+
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/petri_nets_software 6.html b/petri_nets_software 6.html new file mode 100644 index 0000000..94f9251 --- /dev/null +++ b/petri_nets_software 6.html @@ -0,0 +1,1096 @@ + + + + + + + + + +Software – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Software

+
+ + + +
+ + + + +
+ + + +
+ + +

Petri nets constitute a powerful and flexible framework for modelling discrete-event systems, and yet the selection of mature and well-maintained software tools is not particularly wide. How come? Petri nets have already inspired a few other frameworks such as Grafcet and SFC for PLC programming, as we discuss in the overview of the literature. The “vanilla version” of Petri nets then serves mainly for academic research.

+
+

Matlab

+ +
+
+

Python

+

SNAKES (github)

+
+
+

Julia

+ +
+
+

Standalone

+ + + +
+ + Back to top
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/petri_nets_timed 9.html b/petri_nets_timed 9.html new file mode 100644 index 0000000..15c42df --- /dev/null +++ b/petri_nets_timed 9.html @@ -0,0 +1,1319 @@ + + + + + + + + + +Timed Petri nets – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Timed Petri nets

+
+ + + +
+ + + + +
+ + + +
+ + +

Recall that when introducing enabled transitions, we emphasized that these can but do not have to fire immediately after having been enabled \boxed{\mathrm{ENABLING} \neq \text{FIRING}.}

+
+

Delays associated with transitions

+

Well then, the enabled transitions do not have to fire immediately, but they can possibly fire with some delay after enabling. This is for the first time that we are introducing the concept of time into the Petri nets, isn’t it?

+

For the jth transition, the delay of the kth firing is v_{j,k}, and we collect the sequence of delayes into v_j = \{v_{j,1}, v_{j,2}, \ldots \}.

+

But not all transitions have to be timed. Denote the timed transitions \mathcal{T}_\mathrm{D}\subseteq \mathcal{T}. We define the clock structure for a PN as \mathcal{V} = \{v_j\mid t_j\in\mathcal{T}_\mathrm{D}\}.

+

The definition of a timed Petri net (TPN) is then obtained by augmenting the definition of a Petri net with the clock structure

+

\boxed{TPN = \{\mathcal{P}, \mathcal{T}, \mathcal{A}, w, x, \mathcal{V}\}}.

+
+

Example 1 (Timed Petri net) Model of processing multiple tasks: task 1 and task 2 are processed sequentially, and task 3 is processed in parallel with them; task 4 can only be processed after both tasks 2 and 3 have been finished. Finishing individual tasks corresponds to the individual transitions. The transition 4 is untimed, it only expresses the logical requirement.

+
+
+

+
Example of a timed Petri net
+
+
+
+
+
+
+ +
+
+Rectangles instead of bars +
+
+
+

Sometimes instead of a bar, the untimed transitions are modelled using similarly thin rectangles as the timed transitions, but filled.

+
+
+
+

Places can also be delayed

+

With delays associated with just one type of a node in a Petri net, the situation is rather nonsymmetric. In some literature, delays can also associated with places. And yet in some other literature delays are only associated with places. Such delays associated with places are called holding time for a place It is the minimum duration the token must rest in the place. But the token can stay longer if the output transition is waiting for other places.

+
+
+
+ +
+
+Delays associated with transitions and places +
+
+
+

There is a major difference in delays associated with places compared to the delays associated with transitions. While the former tells the minimum duration the token has to dwell in the place, the latter tell the exact delay with which the transition fires after having been enabled.

+
+
+
+
+
+

Timed Petri net dynamics

+

With the introduction of time into the Petri nets, we can now study the dynamics of the system. For general Petri nets, alhough perfectly doable, it may quicly become too complex, and therefore here we only consider event graphs.

+

Some notation:

+
    +
  • \{\tau_{j,1}, \tau_{j,2}, \ldots\} are the firing times of the jth transition,
  • +
  • \{\pi_{i,1},\pi_{i,2},\ldots\} are the times when the ith place receives a token,
  • +
  • x_i = x(p_i) is the number of tokens at the ith place,
  • +
  • x_{i,k} = \left.x(p_i)\right|_k, is the number of tokens at the ith place after the kth firing.
  • +
+

Now, assume first that x_{i,0} = 0. We can then relate the time of the arrival of the token to the place with the firing of the transition from which the token arrives \pi_{i,k} = \tau_{j,k},\quad p_i\in \mathcal{O}(t_j).

+

But generally x_{i,0} \neq 0 and the above relation needs to be modified to \pi_{i,k+x_{i,0}} = \tau_{j,k},\quad p_i\in \mathcal{O}(t_j), or, equivalently \boxed{\pi_{i,k} = \tau_{j,k-x_{i,0}},\quad p_i\in \mathcal{O}(t_j).} \tag{1}

+

This can be read in the following way. If there are initially, say, 3 tokens in the place, the time of the arrival of the 4th token is the time of the first firing of the transition from which the 4th token arrives.

+

Good. Keep this result in mind. Now we go for another.

+

For an untimed transition with a single input place, the firing time is the same as the time of the arrival of the token to the place +\tau_{j,k} = \pi_{i,k}. +

+

Modifying this result for a timed transition with a single input place we get +\tau_{j,k} = \pi_{i,k} + v_{j,k}. +

+

In words, the firing time is given by the time of the arrival of the token to the place, which enables the transition, and the delay associated with the transition.

+

Finally, we extend this result to the case of a timed transition with multiple input places \boxed{ +\tau_{j,k} = \max_{p_i\in\mathcal{I}(t_j)}\{\pi_{i,k}\} + v_{j,k}.} +\tag{2}

+

This is the other promised important result. Keep both boxed formulas Equation 1 and Equation 2 handy, they will be needed in what is coming.

+
+

Example 2 (Timed Petri net dynamics) Consider the Petri net with three places and two transitions, one of which is timed, as in Fig 1.

+
+
+
+ +
+
+Figure 1: Example of a Petri net for which the dynamics is analyzed +
+
+
+

We first use Equation 2 to write down the firing times of the two transitions +\begin{aligned} +\tau_{1,k} &= \max\{\pi_{1,k},\pi_{3,k}\}\\ +\tau_{2,k} &= \pi_{2,k}+v_{2,k}. +\end{aligned} +

+

Now we apply Equation 1 to write down the times of the arrival of the tokens to the places +\begin{aligned} +\pi_{1,k} &= \tau_{1,k-1}, \qquad k=2,\ldots, \qquad \pi_{1,0} = 0\\ +\pi_{2,k} &= \tau_{1,k-1}, \qquad k=2,\ldots, \qquad \pi_{2,0} = 0\\ +\pi_{3,k} &= \tau_{2,k}, \qquad k=1,\ldots +\end{aligned} +

+

Substituting from the latter into the former we get +\begin{aligned} +\tau_{1,k} &= \max\{\tau_{1,k-1},\tau_{1,k-1}+v_{2,k}\}\\ +&= \tau_{1,k-1}+v_{2,k}, \quad \tau_{1,k} = 0\\ +\tau_{2,k} &= \tau_{1,k-1}+v_{2,k}. +\end{aligned} +

+

This is the ultimate model for the dynamics of the Petri net. Should we need it, we can also get similar expressions for the times of the arrival of the tokens to the places.

+
+
+
+
+ +
+
+Update equations for times and not states +
+
+
+

While with state equations we compute a sequences of values of the state vector (\bm x_0, \bm x_1, \bm x_2, \ldots), in other words, we compute the evolution of the state in time, here we compute the sequences of times when transitions fire (or token arrive to places). This update scheme for times resembles the state equations, but the interpretation is different.

+
+
+
+
+

Queueing system using TPN

+

We can also model a queueing system using a TPN. The Petri net is shown in Fig 2.

+
+
+
+ +
+
+Figure 2: Timed Petri net modelling a queueing system +
+
+
+

Of the three transitions \mathcal{T} = \{a,s,c\}, which we have already identified previously, we assume that only are times, namely \mathcal{T}_\mathrm{D} = \{a,c\}. The associated firing delays are \bm v = \begin{bmatrix}v_a \\ v_c\end{bmatrix}.

+

For convenience we relabel the firing times of the transitions. Instead of t_{a,k} we will use a_k, and similarly s_k, and c_k. Application of Equation 2 and Equation 1 gives +\begin{aligned} +a_k &= a_{k-1} + v_{a,k},\quad k=1,2,\ldots,\quad a_0 = 0\\ +s_k &= \max\{\pi_{Q,k},\pi_{I,k}\}\\ +c_k &= \pi_{B,k} + v_{c,k}\\ +\pi_{Q,k} &= a_{k},\quad k=1,2,\ldots\\ +\pi_{I,k} &= c_{k-1},\quad k= 2, \ldots, \quad \pi_{I,0}=1\\ +\pi_{B,k} &= s_{k},\quad k=1,2,\ldots\\ +\end{aligned} +

+

Combining gives the desired update equations +\begin{aligned} +a_k &= a_{k-1} + v_{a,k},\quad k=1,2,\ldots,\quad a_0 = 0\\ +s_k &= \max\{a_{k},c_{k-1}\}\\ +c_k &= s_{k} + v_{c,k}\\ +&= \max\{a_{k},c_{k-1}\} + v_{c,k},\quad k=1,\ldots, \quad c_0=0 +\end{aligned} +

+

The time of completing the kth task is given by the time at which the previous task was completed and the time needed to complete the kth task itself, unless there is a gap in the queue after finishing the previous task, in which case the server must wait for the next task to arrive.

+
+

Example 3 (Timed Petri net for synchronization of train lines) We consider three closed rail tracks and two stations as in Fig 3.

+
+
+
+ +
+
+Figure 3: Example with three train lines +
+
+
+

Departure of a train at a station must be synchronized with arrival of the other train so that passengers can change train. The timed Petri net for this system is shown in Fig 4.

+
+
+
+ +
+
+Figure 4: Timed Petri net for the example of synchronization of three train lines +
+
+
+

If time is associated with the places, the Petri net simplifies significantly to Fig 5.

+
+
+
+ +
+
+Figure 5: Timed Petri net for the example of synchronization of three train lines +
+
+
+
+
+

Example 4 (Manufacturing) tbd

+
+
+
+

Extensions

+
+

Stochastic Petri nets (SPN)

+

Numerous extensions are possible, some of which we have already mentioned when discussing untimed Petri nets. But upon introducing time, stochastic Petr nets can be concived, in which delays are random variables.

+ + +
+
+ + Back to top
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/search.json b/search.json index 44c6442..789d15c 100644 --- a/search.json +++ b/search.json @@ -587,7 +587,7 @@ "href": "des_automata.html#extensions", "title": "State automata", "section": "Extensions", - "text": "Extensions\nThe concept of an automaton can be extended in several ways. In particular, the following two extensions introduce the concept of an output to an automaton.\n\nMoore machine\nOne extension of an automaton with outputs is Moore machine. The outputs assigned to the states by the output function y = g(x).\nThe output is produced (emitted) when the (new) state is entered.\nNote, in particular, that the output does not depend on the input. This has a major advantage when a feedback loop is closed around this system, since no algebraic loop is created.\nGraphically, we make a conventions that outputs are the labels of the states.\n\nExample 8 (Moore machine) The following automaton has just three states, but just two outputs (FLOW and NO FLOW).\n\n\n\n\n\n\n\n\nG\n\n\ninit\ninit\n\n\n\nclosed\n\nNO FLOW\nValve\nclosed\n\n\n\ninit->closed\n\n\n\n\n\npartial\n\nFLOW\nValve\npartially\nopen\n\n\n\nclosed->partial\n\n\nopen valve one turn\n\n\n\npartial->closed\n\n\nclose valve one turn\n\n\n\nfull\n\nFLOW\nValve\nfully open\n\n\n\npartial->full\n\n\nopen valve one turn\n\n\n\nfull->closed\n\n\nemergency shut off\n\n\n\nfull->partial\n\n\nclose valve one turn\n\n\n\n\n\n\nFigure 9: Example of a digraph representation of the Moore machine for a valve control\n\n\n\n\n\n\n\n\nMealy machine\nMealy machine is another extension of an automaton. Here the outputs are associated with the transitions rather than the states.\nSince the events already associated with the states can be viewed as the inputs, we now have input/output transition labels. The transition label e_\\mathrm{i}/e_\\mathrm{o} on the transion from x_1 to x_2 reads as “the input event e_\\mathrm{i} at state x_1 activates the transition to x_2, which outputs the event e_\\mathrm{o}” and can be written as x_1\\xrightarrow{e_\\mathrm{i}/e_\\mathrm{o}} x_2.\nIt can be viewed as if the output function also considers the input and not only the state y = e_\\mathrm{o} = g(x,e_\\mathrm{i}).\nIn contrast with the Moore machine, here the output is produced (emitted) during the transition (before the new state is entered).\n\nExample 9 (Mealy machine) Coffee machine: coffee for 30 CZK, machine accepting 10 and 20 CZK coins, no change.\n\n\n\n\n\n\n\n\nG\n\n\ninit\ninit\n\n\n\n0\n\nNo coin\n\n\n\ninit->0\n\n\n\n\n\n10\n\n10 CZK\n\n\n\n0->10\n\n\ninsert 10 CZK / no coffee\n\n\n\n20\n\n20 CZK\n\n\n\n0->20\n\n\ninsert 20 CZK / no coffee\n\n\n\n10->0\n\n\ninsert 20 CZK / coffee\n\n\n\n10->20\n\n\ninsert 10 CZK / no coffee\n\n\n\n20->0\n\n\ninsert 10 CZK / coffee\n\n\n\n20->10\n\n\ninsert 20 CZK / coffee\n\n\n\n\n\n\nFigure 10: Example of a digraph representation of the Mealy machine for a coffee machine\n\n\n\n\n\n\n\nExample 10 (Reformulate the previous example as a Moore machine) Two more states wrt Mealy\n\n\n\n\n\n\n\n\nG\n\n\ninit\ninit\n\n\n\n0\n\nNO COFFEE\nNo\ncoin\n\n\n\ninit->0\n\n\n\n\n\n10\n\nNO COFFEE\n10\nCZK\n\n\n\n0->10\n\n\ninsert 10 CZK\n\n\n\n20\n\nNO COFFEE\n20\nCZK\n\n\n\n0->20\n\n\ninsert 20 CZK\n\n\n\n10->20\n\n\ninsert 10 CZK\n\n\n\n30\n\nCOFFEE\n10+20\nCZK\n\n\n\n10->30\n\n\ninsert 20 CZK\n\n\n\n20->30\n\n\ninsert 10 CZK\n\n\n\n40\n\nCOFFEE\n20+20\nCZK\n\n\n\n20->40\n\n\ninsert 20 CZK\n\n\n\n30->0\n\n\n\n\n\n30->10\n\n\ninsert 10 CZK\n\n\n\n30->20\n\n\ninsert 20 CZK\n\n\n\n40->10\n\n\n\n\n\n40->20\n\n\ninsert 10 CZK\n\n\n\n40->30\n\n\ninsert 20 CZK\n\n\n\n\n\n\nFigure 11: Example of a digraph representation of the Moore machine for a coffee machine\n\n\n\n\n\n\n\n\n\n\n\n\nNote\n\n\n\nThere are transitions from 30 and 40 back to 0 that are not labelled by any event. This does not seem to follow the general rule that transitions are always triggered by events. Not what? It can be resolved upon introducing time as the timeout transitions.\n\n\n\nExample 11 (Dijkstra’s token passing) The motivation for this example is to show that it is perhaps not always productive to insist on visual description of the automaton using a graph. The four components of our formal definition of an automaton are just enough, and they translate directly to a code.\nThe example comes from the field of distributed computing systems. It considers several computers that are connected in ring topology, and the communication is just one-directional as Fig 12 shows. The task is to use the communication to determine in – a distributed way – which of the computers carries a (single) token at a given time. And to realize passing of the token to a neighbour. We assume a synchronous case, in which all the computers are sending simultaneously, say, with some fixed sending period.\n\n\n\n\n\n\n\n\nG\n\n\n0\n\n0\n\n\n\n1\n\n1\n\n\n\n0->1\n\n\n\n\n\n2\n\n2\n\n\n\n1->2\n\n\n\n\n\n3\n\n3\n\n\n\n2->3\n\n\n\n\n\n3->0\n\n\n\n\n\n\n\n\nFigure 12: Example of a ring topology for Dijkstra’s token passing in a distributed system\n\n\n\n\n\nOne popular method for this is called Dijkstra’s token passing. Each computer keeps a single integer value as its state variable. And it forwards this integer value to the neighbour (in the clockwise direction in our setting). Upon receiving the value from the other neighbour (in the counter-clockwise direction), it updates its own value according to the rule displayed in the code below. At every clock tick, the state vector (composed of the individual state variables) is updated according to the function update!() in the code. Based on the value of the state vector, an output is computed, which decodes the informovation about the location of the token from the state vector. Again, the details are in the output() function.\n\n\nShow the code\nstruct DijkstraTokenRing\n number_of_nodes::Int64\n max_value_of_state_variable::Int64\n state_vector::Vector{Int64}\nend\n\nfunction update!(dtr::DijkstraTokenRing) \n n = dtr.number_of_nodes\n k = dtr.max_value_of_state_variable\n x = dtr.state_vector\n xnext = copy(x)\n for i in eachindex(x) # Mind the +1 shift. x[2] corresponds to x₁ in the literature.\n if i == 1 \n xnext[i] = (x[i] == x[n]) ? mod(x[i] + 1,k) : x[i] # Increment if the left neighbour is identical.\n else \n xnext[i] = (x[i] != x[i-1]) ? x[i-1] : x[i] # Update by the differing left neighbour.\n end\n end\n dtr.state_vector .= xnext \nend\n\nfunction output(dtr::DijkstraTokenRing) # Token = 1, no token = 0 at the given position. \n x = dtr.state_vector\n y = similar(x)\n y[1] = iszero(x[1]-x[end])\n y[2:end] .= .!iszero.(diff(x))\n return y\nend\n\n\noutput (generic function with 1 method)\n\n\nWe now rund the code for a given number of computers and some initial state vector that does not necessarily comply with the requirement that there is only one token in the ring.\n\n\nShow the code\nn = 4 # Concrete number of nodes.\nk = n # Concrete max value of a state variable (>= n).\n@show x_initial = rand(0:k,n) # Initial state vector, not necessarily acceptable (>1 token in the ring).\ndtr = DijkstraTokenRing(n,k,x_initial)\n@show output(dtr) # Show where the token is (are).\n\n@show update!(dtr), output(dtr) # Perform the update, show the state vector and show where the token is.\n@show update!(dtr), output(dtr) # Repeat a few times to see the stabilization. \n@show update!(dtr), output(dtr)\n@show update!(dtr), output(dtr)\n@show update!(dtr), output(dtr)\n\n\nx_initial = rand(0:k, n) = [0, 2, 0, 0]\noutput(dtr) = [1, 1, 1, 0]\n(update!(dtr), output(dtr)) = ([1, 0, 2, 0], [0, 1, 1, 1])\n(update!(dtr), output(dtr)) = ([1, 1, 0, 2], [0, 0, 1, 1])\n(update!(dtr), output(dtr)) = ([1, 1, 1, 0], [0, 0, 0, 1])\n(update!(dtr), output(dtr)) = ([1, 1, 1, 1], [1, 0, 0, 0])\n(update!(dtr), output(dtr)) = ([2, 1, 1, 1], [0, 1, 0, 0])\n\n\n([2, 1, 1, 1], [0, 1, 0, 0])\n\n\nWe can see that although initially the there can be more tokens, after a few iterations the algorithm achieves the goal of having just one token in the ring.\n\n\n\nExtended-state automaton\nYet another extension of an automaton is the extended-state automaton. And indeed, the hyphen is there on purpose as we extend the state space.\nIn particular, we augment the state variable(s) that define the states/modes/locations (the nodes in the graph) by additional (typed) state variables: Int, Enum, Bool, …\nTransitions from one mode to another are then guarded by conditions on theses new extra state variables.\nBesides being guarded by a guard condition, a given transition can also be labelled by a reset function that resets the extended-state variables.\n\nExample 12 (Counting up to 10) In this example, there are two modes (on and off), which can be captured by a single binary state variable, say x. But then there is an additional integer variable k, and the two variables together characterize the extended state.\n\n\n\n\n\n\n\n\nG\n\n\ninit\ninit\n\n\n\nOFF\n\nOFF\n\n\n\ninit->OFF\n\n\nint k=0\n\n\n\nON\n\nON\n\n\n\nOFF->ON\n\n\npress\n\n\n\nON->OFF\n\n\n(press ⋁ k ≥ 10); k=0\n\n\n\nON->ON\n\n\n(press ∧ k < 10); k=k+1\n\n\n\n\n\n\nFigure 13: Example of a digraph representation of the extended-state automaton for counting up to ten", + "text": "Extensions\nThe concept of an automaton can be extended in several ways. In particular, the following two extensions introduce the concept of an output to an automaton.\n\nMoore machine\nOne extension of an automaton with outputs is Moore machine. The outputs assigned to the states by the output function y = g(x).\nThe output is produced (emitted) when the (new) state is entered.\nNote, in particular, that the output does not depend on the input. This has a major advantage when a feedback loop is closed around this system, since no algebraic loop is created.\nGraphically, we make a conventions that outputs are the labels of the states.\n\nExample 8 (Moore machine) The following automaton has just three states, but just two outputs (FLOW and NO FLOW).\n\n\n\n\n\n\n\n\nG\n\n\ninit\ninit\n\n\n\nclosed\n\nNO FLOW\nValve\nclosed\n\n\n\ninit->closed\n\n\n\n\n\npartial\n\nFLOW\nValve\npartially\nopen\n\n\n\nclosed->partial\n\n\nopen valve one turn\n\n\n\npartial->closed\n\n\nclose valve one turn\n\n\n\nfull\n\nFLOW\nValve\nfully open\n\n\n\npartial->full\n\n\nopen valve one turn\n\n\n\nfull->closed\n\n\nemergency shut off\n\n\n\nfull->partial\n\n\nclose valve one turn\n\n\n\n\n\n\nFigure 9: Example of a digraph representation of the Moore machine for a valve control\n\n\n\n\n\n\n\n\nMealy machine\nMealy machine is another extension of an automaton. Here the outputs are associated with the transitions rather than the states.\nSince the events already associated with the states can be viewed as the inputs, we now have input/output transition labels. The transition label e_\\mathrm{i}/e_\\mathrm{o} on the transion from x_1 to x_2 reads as “the input event e_\\mathrm{i} at state x_1 activates the transition to x_2, which outputs the event e_\\mathrm{o}” and can be written as x_1\\xrightarrow{e_\\mathrm{i}/e_\\mathrm{o}} x_2.\nIt can be viewed as if the output function also considers the input and not only the state y = e_\\mathrm{o} = g(x,e_\\mathrm{i}).\nIn contrast with the Moore machine, here the output is produced (emitted) during the transition (before the new state is entered).\n\nExample 9 (Mealy machine) Coffee machine: coffee for 30 CZK, machine accepting 10 and 20 CZK coins, no change.\n\n\n\n\n\n\n\n\nG\n\n\ninit\ninit\n\n\n\n0\n\nNo coin\n\n\n\ninit->0\n\n\n\n\n\n10\n\n10 CZK\n\n\n\n0->10\n\n\ninsert 10 CZK / no coffee\n\n\n\n20\n\n20 CZK\n\n\n\n0->20\n\n\ninsert 20 CZK / no coffee\n\n\n\n10->0\n\n\ninsert 20 CZK / coffee\n\n\n\n10->20\n\n\ninsert 10 CZK / no coffee\n\n\n\n20->0\n\n\ninsert 10 CZK / coffee\n\n\n\n20->10\n\n\ninsert 20 CZK / coffee\n\n\n\n\n\n\nFigure 10: Example of a digraph representation of the Mealy machine for a coffee machine\n\n\n\n\n\n\n\nExample 10 (Reformulate the previous example as a Moore machine) Two more states wrt Mealy\n\n\n\n\n\n\n\n\nG\n\n\ninit\ninit\n\n\n\n0\n\nNO COFFEE\nNo\ncoin\n\n\n\ninit->0\n\n\n\n\n\n10\n\nNO COFFEE\n10\nCZK\n\n\n\n0->10\n\n\ninsert 10 CZK\n\n\n\n20\n\nNO COFFEE\n20\nCZK\n\n\n\n0->20\n\n\ninsert 20 CZK\n\n\n\n10->20\n\n\ninsert 10 CZK\n\n\n\n30\n\nCOFFEE\n10+20\nCZK\n\n\n\n10->30\n\n\ninsert 20 CZK\n\n\n\n20->30\n\n\ninsert 10 CZK\n\n\n\n40\n\nCOFFEE\n20+20\nCZK\n\n\n\n20->40\n\n\ninsert 20 CZK\n\n\n\n30->0\n\n\n\n\n\n30->10\n\n\ninsert 10 CZK\n\n\n\n30->20\n\n\ninsert 20 CZK\n\n\n\n40->10\n\n\n\n\n\n40->20\n\n\ninsert 10 CZK\n\n\n\n40->30\n\n\ninsert 20 CZK\n\n\n\n\n\n\nFigure 11: Example of a digraph representation of the Moore machine for a coffee machine\n\n\n\n\n\n\n\n\n\n\n\n\nNote\n\n\n\nThere are transitions from 30 and 40 back to 0 that are not labelled by any event. This does not seem to follow the general rule that transitions are always triggered by events. Not what? It can be resolved upon introducing time as the timeout transitions.\n\n\n\nExample 11 (Dijkstra’s token passing) The motivation for this example is to show that it is perhaps not always productive to insist on visual description of the automaton using a graph. The four components of our formal definition of an automaton are just enough, and they translate directly to a code.\nThe example comes from the field of distributed computing systems. It considers several computers that are connected in ring topology, and the communication is just one-directional as Fig 12 shows. The task is to use the communication to determine in – a distributed way – which of the computers carries a (single) token at a given time. And to realize passing of the token to a neighbour. We assume a synchronous case, in which all the computers are sending simultaneously, say, with some fixed sending period.\n\n\n\n\n\n\n\n\nG\n\n\n0\n\n0\n\n\n\n1\n\n1\n\n\n\n0->1\n\n\n\n\n\n2\n\n2\n\n\n\n1->2\n\n\n\n\n\n3\n\n3\n\n\n\n2->3\n\n\n\n\n\n3->0\n\n\n\n\n\n\n\n\nFigure 12: Example of a ring topology for Dijkstra’s token passing in a distributed system\n\n\n\n\n\nOne popular method for this is called Dijkstra’s token passing. Each computer keeps a single integer value as its state variable. And it forwards this integer value to the neighbour (in the clockwise direction in our setting). Upon receiving the value from the other neighbour (in the counter-clockwise direction), it updates its own value according to the rule displayed in the code below. At every clock tick, the state vector (composed of the individual state variables) is updated according to the function update!() in the code. Based on the value of the state vector, an output is computed, which decodes the informovation about the location of the token from the state vector. Again, the details are in the output() function.\n\n\nShow the code\nstruct DijkstraTokenRing\n number_of_nodes::Int64\n max_value_of_state_variable::Int64\n state_vector::Vector{Int64}\nend\n\nfunction update!(dtr::DijkstraTokenRing) \n n = dtr.number_of_nodes\n k = dtr.max_value_of_state_variable\n x = dtr.state_vector\n xnext = copy(x)\n for i in eachindex(x) # Mind the +1 shift. x[2] corresponds to x₁ in the literature.\n if i == 1 \n xnext[i] = (x[i] == x[n]) ? mod(x[i] + 1,k) : x[i] # Increment if the left neighbour is identical.\n else \n xnext[i] = (x[i] != x[i-1]) ? x[i-1] : x[i] # Update by the differing left neighbour.\n end\n end\n dtr.state_vector .= xnext \nend\n\nfunction output(dtr::DijkstraTokenRing) # Token = 1, no token = 0 at the given position. \n x = dtr.state_vector\n y = similar(x)\n y[1] = iszero(x[1]-x[end])\n y[2:end] .= .!iszero.(diff(x))\n return y\nend\n\n\noutput (generic function with 1 method)\n\n\nWe now rund the code for a given number of computers and some initial state vector that does not necessarily comply with the requirement that there is only one token in the ring.\n\n\nShow the code\nn = 4 # Concrete number of nodes.\nk = n # Concrete max value of a state variable (>= n).\n@show x_initial = rand(0:k,n) # Initial state vector, not necessarily acceptable (>1 token in the ring).\ndtr = DijkstraTokenRing(n,k,x_initial)\n@show output(dtr) # Show where the token is (are).\n\n@show update!(dtr), output(dtr) # Perform the update, show the state vector and show where the token is.\n@show update!(dtr), output(dtr) # Repeat a few times to see the stabilization. \n@show update!(dtr), output(dtr)\n@show update!(dtr), output(dtr)\n@show update!(dtr), output(dtr)\n\n\nx_initial = rand(0:k, n) = [2, 2, 4, 1]\noutput(dtr) = [0, 0, 1, 1]\n(update!(dtr), output(dtr)) = ([2, 2, 2, 4], [0, 0, 0, 1])\n(update!(dtr), output(dtr)) = ([2, 2, 2, 2], [1, 0, 0, 0])\n(update!(dtr), output(dtr)) = ([3, 2, 2, 2], [0, 1, 0, 0])\n(update!(dtr), output(dtr)) = ([3, 3, 2, 2], [0, 0, 1, 0])\n(update!(dtr), output(dtr)) = ([3, 3, 3, 2], [0, 0, 0, 1])\n\n\n([3, 3, 3, 2], [0, 0, 0, 1])\n\n\nWe can see that although initially the there can be more tokens, after a few iterations the algorithm achieves the goal of having just one token in the ring.\n\n\n\nExtended-state automaton\nYet another extension of an automaton is the extended-state automaton. And indeed, the hyphen is there on purpose as we extend the state space.\nIn particular, we augment the state variable(s) that define the states/modes/locations (the nodes in the graph) by additional (typed) state variables: Int, Enum, Bool, …\nTransitions from one mode to another are then guarded by conditions on theses new extra state variables.\nBesides being guarded by a guard condition, a given transition can also be labelled by a reset function that resets the extended-state variables.\n\nExample 12 (Counting up to 10) In this example, there are two modes (on and off), which can be captured by a single binary state variable, say x. But then there is an additional integer variable k, and the two variables together characterize the extended state.\n\n\n\n\n\n\n\n\nG\n\n\ninit\ninit\n\n\n\nOFF\n\nOFF\n\n\n\ninit->OFF\n\n\nint k=0\n\n\n\nON\n\nON\n\n\n\nOFF->ON\n\n\npress\n\n\n\nON->OFF\n\n\n(press ⋁ k ≥ 10); k=0\n\n\n\nON->ON\n\n\n(press ∧ k < 10); k=k+1\n\n\n\n\n\n\nFigure 13: Example of a digraph representation of the extended-state automaton for counting up to ten", "crumbs": [ "1. Discrete-event systems: Automata", "State automata" @@ -983,7 +983,18 @@ "href": "classes_switched.html", "title": "Switched systems", "section": "", - "text": "In switched systems, some variables reset (jump) and stay constant between resets (they model discrete states), and some variables only flow and do not reset (jump).\nIt is a common notational convention to type the discrete state as a lower index as in \n\\dot{\\bm x} = \\bm f_q(\\bm x), \\qquad q \\in \\{1,2, \\ldots, m\\}.\nThe variable q determines, which right-hand side function is “active” at a given moment. The question now is, what dictates the evolution of the variable q? In other words, drives the switching, the transition between the modes? It turns out that the switching can be time-driven or state-driven:\nWhile there is not much to add to the former case, the latter might need some more explanation.", + "text": "Switched systems are modelled by first-order differential (state) equations with multiple right-hand sides, that is,\n\\dot{\\bm x} = \\bm f_q(\\bm x), \\qquad q \\in \\{1,2, \\ldots, m\\},\n\\tag{1} where m right-hand sides are possible and the lower index q determines which right-hand side function is “active” at a given moment.\nThe question is, what dictates the evolution of the integer variable q? In other words, what drives the switching? It turns out that the switching can be time-driven or state-driven.\nIn both cases, the right-hand sides can also depend the control input \\bm u.\nMajor results for switched systems have been achieved without the need to refer to the framework of hybrid systems. But now that we have built such general framework, it turns out useful to view switched systems as a special class of hybrid systems. The aspects in which they are special will be discussed in the following, but here let us state that in contrast to full hybrid systems, switched systems are a bit less rich on the discrete side.", + "crumbs": [ + "6. Some classes of hybrid systems", + "Switched systems" + ] + }, + { + "objectID": "classes_switched.html#time-driven", + "href": "classes_switched.html#time-driven", + "title": "Switched systems", + "section": "Time-driven", + "text": "Time-driven\nThe evolution of the state variable complies with the following model \\dot{\\bm x} = \\bm f_{q(t)}(\\bm x), where q(t) is some function of time. The values of q(t) can be under our control or beyond our control, deterministic or stochastic.\nA hybrid automaton for a time-driven switched system is shown in Fig 1.\n\n\n\n\n\n\nFigure 1: An automaton for a switched system with time-driven switching\n\n\n\nThe transition from one mode to another is triggered by the integer variable q(t) attaining the appropriate value.\nSince the switching signal is unrelated to the (continuous) state of the system, the invariant of the two modes are usually covering the whole state space \\mathcal X.", "crumbs": [ "6. Some classes of hybrid systems", "Switched systems" @@ -994,7 +1005,7 @@ "href": "classes_switched.html#state-dependent-switching", "title": "Switched systems", "section": "State-dependent switching", - "text": "State-dependent switching\nLet’s consider just two domains \\mathcal X_1 and \\mathcal X_2. The transition to the other mode is triggered by the continuous state of the system crossing the boundary between the two domains. The boundary is defined by the function s(\\bm x) (called switching function), which is zero on the boundary, see the Fig 2.\n\n\n\n\n\n\nFigure 2: State-dependent switching\n\n\n\nThrough examples we now illustrate the possible behaviors of the system when the flow transverses the boundary, when it pulls away from the boundary, and when it pushes towards the boundary.\n\nExample 1 (The flow transverses the boundary) We consider the two right-hand sides of the state equation \n\\bm f_1(\\bm x) = \\begin{bmatrix}1\\\\ x_1^2 + 2x_2^2\\end{bmatrix}\n and \n\\bm f_2(\\bm x) = \\begin{bmatrix}1\\\\ 2x_1^2+3x_2^2-2\\end{bmatrix}\n and the switching function \ns(x_1,x_2) = (x_1+0.05)^2 + (x_2+0.15)^2 - 1.\n\nThe state portrait that also shows the switching function is generated using the following code.\n\n\nShow the code\ns(x₁,x₂) = (x₁+0.05)^2 + (x₂+0.15)^2 - 1.0\n\nf₁(x₁,x₂) = x₁^2 + 2x₂^2\nf₂(x₁,x₂) = 2x₁^2+3x₂^2-2.0\n\nf(x₁,x₂) = s(x₁,x₂) <= 0.0 ? [1,f₁(x₁,x₂)] : [1,f₂(x₁,x₂)] \n\nN = 100\nx₁ = range(0, stop = 0.94, length = N)\n\nusing CairoMakie\nfig = Figure(size = (600, 600),fontsize=20)\nax = Axis(fig[1, 1], xlabel = \"x₁\", ylabel = \"x₂\")\nstreamplot!(ax,(x₁,x₂)->Point2f(f(x₁,x₂)), 0..1.5, 0..1.5, colormap = :magma)\nlines!(ax,x₁,sqrt.(1 .- (x₁ .+ 0.05).^2) .- 0.15, color = :red, linewidth=5)\nx10 = 0.5\nx20 = sqrt(1 - (x10 + 0.05)^2) - 0.15\nMakie.scatter!(ax,[x10],[x20],color=:blue,markersize=30)\nfig\n\n\n\n\n\n\n\n\n\nThe state portrait also shows a particular initial state \\bm x_0 using a blue dot. Note that the projection of both vector fields \\mathbf f_1 and \\mathbf f_2 evaluated at \\bm x_0 onto the normal (the gradient) of the switching function at \\bm x_0 is positive, that is \n\\left.\\left(\\nabla s\\right)^\\top \\bm f_1\\right|_{\\bm x_0} \\geq 0, \\quad \\left.\\left(\\nabla s\\right)^\\top \\bm f_2\\right|_{\\bm x_0} \\geq 0.\n\nThis is consistent with the observation that the flow goes through the boundary.\nWe can also plot a particular solution of the ODE using the following code.\n\n\nShow the code\nusing DifferentialEquations\nF(u, p, t) = f(u[1],u[2])\nu0 = [0.0,0.4]\ntspan = (0.0, 1.0)\nprob = ODEProblem(F, u0, tspan)\nsol = solve(prob, Tsit5(), reltol = 1e-8, abstol = 1e-8)\n\nusing Plots\nPlots.plot(sol,lw=3,xaxis=\"Time\",yaxis=\"x\",label=false)\n\n\n\n\n\n \n \n \n\n\n\n \n \n \n\n\n\n \n \n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nStrictly speaking, this solution does not satisfy the differential equation on the boundary of the two domains (the derivative of x_2 does not exist there). This is visually recognized in the above plot as the sharp corner in the solution. But other than that, the solution is perfectly “reasonable” – for a while the system evolves according to one state equations, then at one particular moment the system starts evolving according to another state equation. That is it. Not much more to see here.\n\n\nExample 2 (The flow pulls away from the boundary) We now consider another pair of the right-hand sides. \n\\bm f_1(\\bm x) = \\begin{bmatrix}-1\\\\ x_1^2 + 2x_2^2\\end{bmatrix}\n and \n\\bm f_2(\\bm x) = \\begin{bmatrix}1\\\\ 2x_1^2+3x_2^2-2\\end{bmatrix}.\n\nThe switching function is the same as in the previous example.\nThe state portrait is below.\n\n\nShow the code\nf(x₁,x₂) = s(x₁,x₂) <= 0.0 ? [-1, f₁(x₁,x₂)] : [1, f₂(x₁,x₂)] \n\nfig = Figure(size = (600, 600),fontsize=20)\nax = Axis(fig[1, 1], xlabel = \"x₁\", ylabel = \"x₂\")\nstreamplot!(ax,(x₁,x₂)->Point2f(f(x₁,x₂)), 0..1.5, 0..1.5, colormap = :magma)\nlines!(ax,x₁,sqrt.(1 .- (x₁ .+ 0.05).^2) .- 0.15, color = :red, linewidth=5)\nx10 = 0.8\nx20 = sqrt(1 - (x10 + 0.05)^2) - 0.15\nMakie.scatter!(ax,[x10],[x20],color=:blue,markersize=30)\nfig\n\n\n\n\n\n\n\n\n\nWe focus on the blue dot again. The projections of the two vector fields onto the normal of the switching function satisfy \n\\left.\\left(\\nabla s\\right)^\\top \\bm f_1\\right|_{\\bm x_0} \\leq 0, \\quad \\left.\\left(\\nabla s\\right)^\\top \\bm f_2\\right|_{\\bm x_0} \\geq 0.\n\nThe only interpretation of this situation is that a unique solution does not start at \\bm x_0. Again, not much more to see here.\n\n\nExample 3 (The flow pushes towards the boundary) And one last pair of the right-hand sides: \n\\bm f_1(\\bm x) = \\begin{bmatrix}1\\\\ x_1^2 + 2x_2^2\\end{bmatrix}\n and \n\\bm f_2(\\bm x) = \\begin{bmatrix}-1\\\\ 2x_1^2+3x_2^2-2\\end{bmatrix}.\n\nThe state-portrait is below.\n\n\nShow the code\nf(x₁,x₂) = s(x₁,x₂) <= 0.0 ? [1, f₁(x₁,x₂)] : [-1, f₂(x₁,x₂)] \n\nfig = Figure(size = (600, 600),fontsize=20)\nax = Axis(fig[1, 1], xlabel = \"x₁\", ylabel = \"x₂\")\nstreamplot!(ax,(x₁,x₂)->Point2f(f(x₁,x₂)), 0..1.5, 0..1.5, colormap = :magma)\nlines!(ax,x₁,sqrt.(1 .- (x₁ .+ 0.05).^2) .- 0.15, color = :red, linewidth=5)\nx10 = 0.5\nx20 = sqrt(1 - (x10 + 0.05)^2) - 0.15\nMakie.scatter!(ax,[x10],[x20],color=:blue,markersize=30)\nfig\n\n\n\n\n\n\n\n\n\nThe projections of the two vector fields onto the normal of the switching function satisfy \n\\left.\\left(\\nabla s\\right)^\\top \\bm f_1\\right|_{\\bm x_0} \\geq 0, \\quad \\left.\\left(\\nabla s\\right)^\\top \\bm f_2\\right|_{\\bm x_0} \\leq 0.\n\nBut this is interesting! Once the trajectory hits the switching curve and tries to penetrate it futher, it is pushed back to the switching curve. It it tries to penetrate it further, it is pushed back to the switching curve again. And so on. But then, how does the state evolve from \\bm x_0?\nHint: solve the ODE numerically with some finite step size. The solution will exhibit zig-zagging or chattering along the switching curve, away from the blue point. Now, keep shrinking the step size. The solution will ultimately “slide” smoothly along the switching curve. Perhaps this was your guess. One thing should worry you, hoever: such “sliding” solution satisfies neither of the two state equations!\nWe will make this more rigorous in a moment, but right now we just wanted to tease the intuition.", + "text": "State-dependent switching\nThe model is \n\\dot{\\bm x}\n=\n\\begin{cases}\n\\bm f_1(\\bm x), & \\mathrm{if}\\, \\bm x \\in \\mathcal{X}_1,\\\\\n\\vdots\\\\\n\\bm f_m(\\bm x), & \\mathrm{if}\\, \\bm x \\in \\mathcal{X}_m.\n\\end{cases}\n\nLet’s consider just two domains \\mathcal X_1 and \\mathcal X_2. A hybrid automaton for a state-driven switched system is shown in Fig 2.\n\n\n\n\n\n\nFigure 2: An automaton for a switched system with state-driven switching\n\n\n\nThe transition to the other mode is triggered by the continuous state of the system crossing the boundary between the two domains. The boundary is defined by the function s(\\bm x) (called switching function), which is zero on the boundary, see the Fig 3.\n\n\n\n\n\n\nFigure 3: State-dependent switching\n\n\n\nThrough examples we now illustrate the possible behaviors of the system when the flow transverses the boundary, when it pulls away from the boundary, and when it pushes towards the boundary.\n\nExample 1 (The flow transverses the boundary) We consider the two right-hand sides of the state equation \n\\bm f_1(\\bm x) = \\begin{bmatrix}1\\\\ x_1^2 + 2x_2^2\\end{bmatrix}\n and \n\\bm f_2(\\bm x) = \\begin{bmatrix}1\\\\ 2x_1^2+3x_2^2-2\\end{bmatrix}\n and the switching function \ns(x_1,x_2) = (x_1+0.05)^2 + (x_2+0.15)^2 - 1.\n\nThe state portrait that also shows the switching function is generated using the following code.\n\n\nShow the code\ns(x₁,x₂) = (x₁+0.05)^2 + (x₂+0.15)^2 - 1.0\n\nf₁(x₁,x₂) = x₁^2 + 2x₂^2\nf₂(x₁,x₂) = 2x₁^2+3x₂^2-2.0\n\nf(x₁,x₂) = s(x₁,x₂) <= 0.0 ? [1,f₁(x₁,x₂)] : [1,f₂(x₁,x₂)] \n\nN = 100\nx₁ = range(0, stop = 0.94, length = N)\n\nusing CairoMakie\nfig = Figure(size = (600, 600),fontsize=20)\nax = Axis(fig[1, 1], xlabel = \"x₁\", ylabel = \"x₂\")\nstreamplot!(ax,(x₁,x₂)->Point2f(f(x₁,x₂)), 0..1.5, 0..1.5, colormap = :magma)\nlines!(ax,x₁,sqrt.(1 .- (x₁ .+ 0.05).^2) .- 0.15, color = :red, linewidth=5)\nx10 = 0.5\nx20 = sqrt(1 - (x10 + 0.05)^2) - 0.15\nMakie.scatter!(ax,[x10],[x20],color=:blue,markersize=30)\nfig\n\n\n\n\n\n\n\n\n\nThe state portrait also shows a particular initial state \\bm x_0 using a blue dot. Note that the projection of both vector fields \\mathbf f_1 and \\mathbf f_2 evaluated at \\bm x_0 onto the normal (the gradient) of the switching function at \\bm x_0 is positive, that is \n\\left.\\left(\\nabla s\\right)^\\top \\bm f_1\\right|_{\\bm x_0} \\geq 0, \\quad \\left.\\left(\\nabla s\\right)^\\top \\bm f_2\\right|_{\\bm x_0} \\geq 0.\n\nThis is consistent with the observation that the flow goes through the boundary.\nWe can also plot a particular solution of the ODE using the following code.\n\n\nShow the code\nusing DifferentialEquations\nF(u, p, t) = f(u[1],u[2])\nu0 = [0.0,0.4]\ntspan = (0.0, 1.0)\nprob = ODEProblem(F, u0, tspan)\nsol = solve(prob, Tsit5(), reltol = 1e-8, abstol = 1e-8)\n\nusing Plots\nPlots.plot(sol,lw=3,xaxis=\"Time\",yaxis=\"x\",label=false)\n\n\n\n\n\n \n \n \n\n\n\n \n \n \n\n\n\n \n \n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nStrictly speaking, this solution does not satisfy the differential equation on the boundary of the two domains (the derivative of x_2 does not exist there). This is visually recognized in the above plot as the sharp corner in the solution. But other than that, the solution is perfectly “reasonable” – for a while the system evolves according to one state equations, then at one particular moment the system starts evolving according to another state equation. That is it. Not much more to see here.\n\n\nExample 2 (The flow pulls away from the boundary) We now consider another pair of the right-hand sides. \n\\bm f_1(\\bm x) = \\begin{bmatrix}-1\\\\ x_1^2 + 2x_2^2\\end{bmatrix}\n and \n\\bm f_2(\\bm x) = \\begin{bmatrix}1\\\\ 2x_1^2+3x_2^2-2\\end{bmatrix}.\n\nThe switching function is the same as in the previous example.\nThe state portrait is below.\n\n\nShow the code\nf(x₁,x₂) = s(x₁,x₂) <= 0.0 ? [-1, f₁(x₁,x₂)] : [1, f₂(x₁,x₂)] \n\nfig = Figure(size = (600, 600),fontsize=20)\nax = Axis(fig[1, 1], xlabel = \"x₁\", ylabel = \"x₂\")\nstreamplot!(ax,(x₁,x₂)->Point2f(f(x₁,x₂)), 0..1.5, 0..1.5, colormap = :magma)\nlines!(ax,x₁,sqrt.(1 .- (x₁ .+ 0.05).^2) .- 0.15, color = :red, linewidth=5)\nx10 = 0.8\nx20 = sqrt(1 - (x10 + 0.05)^2) - 0.15\nMakie.scatter!(ax,[x10],[x20],color=:blue,markersize=30)\nfig\n\n\n\n\n\n\n\n\n\nWe focus on the blue dot again. The projections of the two vector fields onto the normal of the switching function satisfy \n\\left.\\left(\\nabla s\\right)^\\top \\bm f_1\\right|_{\\bm x_0} \\leq 0, \\quad \\left.\\left(\\nabla s\\right)^\\top \\bm f_2\\right|_{\\bm x_0} \\geq 0.\n\nThe only interpretation of this situation is that a unique solution does not start at \\bm x_0. Again, not much more to see here.\n\n\nExample 3 (The flow pushes towards the boundary) And one last pair of the right-hand sides: \n\\bm f_1(\\bm x) = \\begin{bmatrix}1\\\\ x_1^2 + 2x_2^2\\end{bmatrix}\n and \n\\bm f_2(\\bm x) = \\begin{bmatrix}-1\\\\ 2x_1^2+3x_2^2-2\\end{bmatrix}.\n\nThe state-portrait is below.\n\n\nShow the code\nf(x₁,x₂) = s(x₁,x₂) <= 0.0 ? [1, f₁(x₁,x₂)] : [-1, f₂(x₁,x₂)] \n\nfig = Figure(size = (600, 600),fontsize=20)\nax = Axis(fig[1, 1], xlabel = \"x₁\", ylabel = \"x₂\")\nstreamplot!(ax,(x₁,x₂)->Point2f(f(x₁,x₂)), 0..1.5, 0..1.5, colormap = :magma)\nlines!(ax,x₁,sqrt.(1 .- (x₁ .+ 0.05).^2) .- 0.15, color = :red, linewidth=5)\nx10 = 0.5\nx20 = sqrt(1 - (x10 + 0.05)^2) - 0.15\nMakie.scatter!(ax,[x10],[x20],color=:blue,markersize=30)\nfig\n\n\n\n\n\n\n\n\n\nThe projections of the two vector fields onto the normal of the switching function satisfy \n\\left.\\left(\\nabla s\\right)^\\top \\bm f_1\\right|_{\\bm x_0} \\geq 0, \\quad \\left.\\left(\\nabla s\\right)^\\top \\bm f_2\\right|_{\\bm x_0} \\leq 0.\n\nBut this is interesting! Once the trajectory hits the switching curve and tries to penetrate it futher, it is pushed back to the switching curve. As it tries to penetrate it further, it is pushed back to the switching curve again. And so on. But then, how does the state evolve from \\bm x_0?\nHint: solve the ODE numerically with some finite step size. The solution will exhibit zig-zagging or chattering along the switching curve, away from the blue point. Now, keep shrinking the step size. The solution will ultimately “slide” smoothly along the switching curve. Perhaps this was your guess. One thing should worry you, however: such “sliding” solution satisfies neither of the two state equations!\nWe will make this more rigorous in a moment, but right now we just wanted to tease the intuition.", "crumbs": [ "6. Some classes of hybrid systems", "Switched systems" @@ -1005,7 +1016,7 @@ "href": "classes_switched.html#conditions-for-existence-and-uniqueness-of-solutions-of-ode", "title": "Switched systems", "section": "Conditions for existence and uniqueness of solutions of ODE", - "text": "Conditions for existence and uniqueness of solutions of ODE\nIn order to analyze the situations such as the previous example, we need to recapitulate some elementary facts about the existence and uniqueness of solutions of ordinary differential equations (ODEs). And then we are going to add some new stuff.\nConsider the ODE\n\\dot x(t) = f(x(t),t).\nWe ask the following two questions:\n\nUnder which conditions does a solution exists?\nUnder which conditions is the solution unique?\n\nTo answer both, the function f() must be analyzed.\nBut before we answer the two questions, we must ask another one that is even more fundamental:\n\nWhat does it mean that a function x(t) is a solution of the the ODE?\n\nHowever trivial this question may seem, an answer can escalate rather quickly – there are actually several concepts of a solution of an ordinary differential equation.\n\nClassical solution (Peano, also Cauchy-Peano)\n\nf(x(t),t) is continuous with respect to both x and t .\nExistence of a solution is guaranteed locally (on some finite interval), but uniqueness is not.\n\nBut it does not exclude uniqueness in all cases, it is just that it is not guaranteed.\n\nA solution is guaranteed to be continuously differentiable ( x\\in\\mathrm C^1 ). Such function x(t) satisfies the ODE \\dot x(t) = f(x(t),t) \\; \\forall t , that is why such solution is called classical.\nExample of a solution that exists only on a finite interval is \n\\dot x(t) = x^2(t),\\; x(0) = 1,\n\nfor which the solution is x(t) = \\frac{1}{1-t} . The solution blows up at t=1 .\n\nExample of nonuniqueness is provided by \\dot x(t) = \\sqrt{x(t)}, \\; x(0) = 0.\n\nOne possible solution is x(t) = \\frac{1}{4}t^2 . Another is x(t) = 0 . Yet another example is x(t) = \\frac{1}{4}(t-t_0)^2 . It is related to the Leaky bucket example.\n\n\n\nStrenghtening the requirement of continuity (Pickard-Lindelöf)\n\nf(x(t),t) is continuous with respect to t but a stricter condition is imposed with respect to x – Lipschitz continuity.\nNot only existence but also uniqueness of a solution is guaranteed.\n\nBut similarly as with Peano conditions, here too the condition is not necessary, it is just sufficient – even if the function f is not Lipschitz continuous, there may exist a unique solution.\nSince the condition is stricter than mere continuity, whatever goodies hold here too. In particular, the solution is guaranteed to be continuously differentiable.\nIf the function is only locally Lipschitz, the solution is guaranteed on some finite interval. If the function is (globally) Lipschitz, the solution is guaranteed on an unbounded interval.\n\n\n\n\nExtending the set of solutions (Carathéodory)\n\nIn contrast with the classical solution, here the x(t) can fail to satisfy the ODE at some isolated points in time.\nThis Carathéodory (or extended) solution x(t) is more than just continuous (even more than uniformly continuos) but less than contiuously differentiable (aka \\mathcal C^1) – it is absolutely continuous.\nIt is a solution of the integral equation (indeed, an equation) x(t) = x(t_0) + \\int_{t_0}^t f(x(\\tau),\\tau)\\mathrm{d}\\tau,\nwhere we use Lebesque integral (instead of Riemann).\nFor a continuous f, solutions x are just classical (smooth).\nf can be, however, “some kind of discontinuous” with respect to t. In particular, it must be measurable wrt t. It includes the case when f(x,t) is piecewise continuous with respect to t (sampled data control with ZOH).\nIf the function f is discontinuous with respect to x, some more concepts of a solution need to be invoked so that existence and uniqueness can be analyzed.\n\n\nExample 4 (Nonexistence and nonuniqueness of solutions) The system with discontinuous RHS \n\\begin{aligned}\n\\dot x_1 &= -2x_1 - 2x_2\\operatorname*{sgn(x_1)},\\\\\n\\dot x_2 &= x_2 + 4x_1\\operatorname*{sgn(x_1)}\n\\end{aligned}\n\ncan be reformulated as a switched system \n\\begin{aligned}\n\\dot{\\bm x} &= \\begin{bmatrix}-2 & 2\\\\-4 & 1\\end{bmatrix}\\begin{bmatrix}x_1\\\\ x_2\\end{bmatrix}, \\; \\bm x\\leq 0\\\\\n\\dot{\\bm x} &= \\begin{bmatrix}-2 & -2\\\\4 & 1\\end{bmatrix}\\begin{bmatrix}x_1\\\\ x_2\\end{bmatrix}, \\; \\bm x> 0\n\\end{aligned}\n\n\n\nShow the code\ns(x) = x[1]\n\nf₁(x) = [-2x[1] + 2x[2], x[2] - 4x[1]]\nf₂(x) = [-2x[1] - 2x[2], x[2] + 4x[1]]\n\nf(x) = s(x) <= 0.0 ? f₁(x) : f₂(x) \n\nusing CairoMakie\nfig = Figure(size = (600, 600),fontsize=20)\nax = Axis(fig[1, 1], xlabel = \"x₁\", ylabel = \"x₂\")\nstreamplot!(ax,x->Point2f(f(x)), -1.5..1.5, -1.5..1.5, colormap = :magma)\nvlines!(ax,0; ymin = -1.1, ymax = 1.1, color = :red)\nfig\n\n\n\n\n\n\n\n\n\n\n\n\nSliding mode dynamics (on simple boundaries)\n\nAttractive sliding mode at \\bm x_\\mathrm{s}, if there is a trajectory that ends at \\bm x_\\mathrm{s}, but no trajectory that starts at \\bm x_\\mathrm{s}.\n\n\n\nGeneralized solutions (Filippov)\n\nx() is a Filippov solution on [t_0,t_1] if for almost all t \n\\dot x(t) \\in \\overline{\\operatorname*{co}}\\{f(x(t),t)\\},\n\n(Previous) example: \\mathcal{S}^+ = \\{\\bm x \\mid x_1=0 \\land x_2\\geq 0\\} \n\\begin{aligned}\n\\dot{\\bm x} &\\in \\overline{\\operatorname*{co}}\\{\\bm A_1\\bm x_1, \\bm A_2\\bm x_2\\}\\\\\n&= \\alpha_1(t) \\bm A_1\\bm x_1 + \\alpha_2(t) \\bm A_2\\bm x_2,\n\\end{aligned}\n where \\alpha_1(t), \\alpha_2(t) \\geq 0, \\alpha_1(t) + \\alpha_2(t) = 1.\nNot all weights keep the solution on \\mathcal S^+.\n\nWe must have \\dot x_1 = 0 for \\bm x(t) \\in \\mathcal S^+: \n \\alpha_1(t) [-2x_1 + 2x_2] + \\alpha_2(t) [-2x_1 - 2x_2] = 0\n \n\nCombining with \\alpha_1(t) + \\alpha_2(t) = 1: \n\\alpha_1(t) = \\alpha_2(t) = 1/2.\n\nThe dynamics on the sliding mode is \n\\dot x_1 = 0, \\quad \\dot x_2 = x_2, \\quad \\bm x \\in \\mathcal{S}^+.\n\n\n\n\nPossible nonuniqueness on intersection of boundaries", + "text": "Conditions for existence and uniqueness of solutions of ODE\nIn order to analyze the situations such as the previous example, we need to recapitulate some elementary facts about the existence and uniqueness of solutions of ordinary differential equations (ODEs). And then we are going to add some new stuff.\nConsider the ODE\n\\dot x(t) = f(x(t),t).\nWe ask the following two questions:\n\nUnder which conditions does a solution exists?\nUnder which conditions is the solution unique?\n\nTo answer both, the function f() must be analyzed.\nBut before we answer the two questions, we must ask another one that is even more fundamental:\n\nWhat does it mean that a function x(t) is a solution of the the ODE?\n\nHowever trivial this question may seem, an answer can escalate rather quickly – there are actually several concepts of a solution of an ordinary differential equation.\n\nClassical solution (Peano, also Cauchy-Peano)\nWe assume that f(x(t),t) is continuous with respect to both x and t. Then existence of a solution is guaranteed locally (on some finite interval), but uniqueness is not.\n\n\n\n\n\n\nNot guaranteed does not mean impossible\n\n\n\nUniqueness is not not excluded in all cases, it is just that it is not guaranteed.\n\n\nA solution is guaranteed to be continuously differentiable ( x\\in\\mathrm C^1 ). Such function x(t) satisfies the ODE \\dot x(t) = f(x(t),t) \\; \\forall t, that is why such solution is called classical.\n\nExample 4 An example of a solution that exists only on a finite interval is \n \\dot x(t) = x^2(t),\\; x(0) = 1,\n\nfor which the solution is x(t) = \\frac{1}{1-t} . The solution blows up at t=1 .\n\n\nExample 5 An example of nonuniqueness is provided by \\dot x(t) = \\sqrt{x(t)}, \\; x(0) = 0.\nOne possible solution is x(t) = \\frac{1}{4}t^2. Another is x(t) = 0. Yet another example is x(t) = \\frac{1}{4}(t-t_0)^2. It is related to the Leaky bucket example.\n\n\n\nStrenghtening the requirement of continuity (Pickard-Lindelöf)\nSince continuity of f(x(t),t) was not enough to guarantee uniqueness, we need to impose a stricter condition on f(). Namely, we impose a stricter condition on f() with respect to x – Lipschitz continuity, while we still require that the function be continuous with respect to t.\nNow it is not only existence but also uniqueness of a solution that is guaranteed.\n\n\n\n\n\n\nUniqueness not guaranteed does not mean it is impossible\n\n\n\nSimilarly as with Peano conditions, here too the condition is not necessary, it is just sufficient – even if the function f is not Lipschitz continuous, there may exist a unique solution.\n\n\nSince the condition is stricter than mere continuity, whatever goodies hold here too. In particular, the solution is guaranteed to be continuously differentiable.\nIf the function is only locally Lipschitz, the solution is guaranteed on some finite interval. If the function is (globally) Lipschitz, the solution is guaranteed on an unbounded interval.\n\n\nExtending the set of solutions (Carathéodory)\nIn contrast with the classical solution, we can allow the solution x(t) to fail to satisfy the ODE at some isolated points in time. This is called Carathéodory (or extended) solution.\nCarathéodory solution x(t) is more than just continuous (even more than uniformly continuous) but less than contiuously differentiable (aka \\mathcal C^1) – it is absolutely continuous. Absolutely continuous function is a solution of the integral equation (indeed, an equation) x(t) = x(t_0) + \\int_{t_0}^t f(x(\\tau),\\tau)\\mathrm{d}\\tau,\nwhere we use Lebesgue integral (instead of Riemann).\nHaving referred to absolute continuity and Lebesgue integral, the discussion could quickly become rather technical. But all we want to say is that f can be “some kind of discontinuous” with respect to t. In particular, it must be measurable wrt t, which again seems to start escalating… But it suffices to say that it includes the case when f(x,t) is piecewise continuous with respect to t (sampled data control with ZOH).\nNeedles to say that for a continuous f, solutions x are just classical (smooth).\nIf the function f is discontinuous with respect to x, some more concepts of a solution need to be invoked so that existence and uniqueness can be analyzed.\n\nExample 6 (Some more examples of nonexistence and nonuniqueness of solutions) The system with a discontinuous RHS \n\\begin{aligned}\n\\dot x_1 &= -2x_1 - 2x_2\\operatorname*{sgn(x_1)},\\\\\n\\dot x_2 &= x_2 + 4x_1\\operatorname*{sgn(x_1)}\n\\end{aligned}\n can be reformulated as a switched system \n\\begin{aligned}\n\\dot{\\bm x} &= \\begin{bmatrix}-2 & 2\\\\-4 & 1\\end{bmatrix}\\begin{bmatrix}x_1\\\\ x_2\\end{bmatrix}, \\quad s(\\bm x)\\leq 0\\\\\n\\dot{\\bm x} &= \\begin{bmatrix}-2 & -2\\\\4 & 1\\end{bmatrix}\\begin{bmatrix}x_1\\\\ x_2\\end{bmatrix}, \\quad s(\\bm x)> 0,\n\\end{aligned}\n where the switching function is s(\\bm x) = x_1.\n\n\nShow the code\ns(x) = x[1]\n\nf₁(x) = [-2x[1] + 2x[2], x[2] - 4x[1]]\nf₂(x) = [-2x[1] - 2x[2], x[2] + 4x[1]]\n\nf(x) = s(x) <= 0.0 ? f₁(x) : f₂(x) \n\nusing CairoMakie\nfig = Figure(size = (600, 600),fontsize=20)\nax = Axis(fig[1, 1], xlabel = \"x₁\", ylabel = \"x₂\")\nstreamplot!(ax,x->Point2f(f(x)), -1.5..1.5, -1.5..1.5, colormap = :magma)\nvlines!(ax,0; ymin = -1.1, ymax = 1.1, color = :red)\nfig\n\n\n\n\n\n\n\n\n\n\n\n\nSliding mode dynamics (on simple boundaries)\nThe previous example provided yet another illustration of a phenomenon of sliding, or a sliding mode. We say that there is an attractive sliding mode at \\bm x_\\mathrm{s}, if there is a trajectory that ends at \\bm x_\\mathrm{s}, but no trajectory that starts at \\bm x_\\mathrm{s}.\n\n\nGeneralized solutions (Filippov)\nIt is now high time to introduce yet another concept of a solution. A concept that will make it possible to model the sliding mode dynamics in a more rigorous way. Remember that when the state \\bm x(t) slides along the boundary, it qualifies as a solution to neither of the two state equations in any sense we have discussed so far. But now comes the concept of Fillipov solution.\nx() is a Filippov solution on [t_0,t_1] if for almost all t \n\\dot x(t) \\in \\overline{\\operatorname*{co}}\\{f(x(t),t)\\},\n where \\overline{\\operatorname*{co}} denotes the (closed) convex hull.\n\nExample 7 Consider the model in the previous example. The switching surfece, along which the solution slides, is given by \\mathcal{S}^+ = \\{\\bm x \\mid x_1=0 \\land x_2\\geq 0\\}.\nNow, Filippov solution must satisfy the following differential inclusion \n\\begin{aligned}\n\\dot{\\bm x} &\\in \\overline{\\operatorname*{co}}\\{\\bm A_1\\bm x_1, \\bm A_2\\bm x_2\\}\\\\\n&= \\alpha_1(t) \\bm A_1\\bm x_1 + \\alpha_2(t) \\bm A_2\\bm x_2,\n\\end{aligned}\n where \\alpha_1(t), \\alpha_2(t) \\geq 0, \\alpha_1(t) + \\alpha_2(t) = 1.\nNote, however, that not all the weights keep the solution on \\mathcal S^+. We must impose some restriction, namely that \\dot x_1 = 0 for \\bm x(t) \\in \\mathcal S^+. This leads to \n\\alpha_1(t) [-2x_1 + 2x_2] + \\alpha_2(t) [-2x_1 - 2x_2] = 0\n\nCombining this with \\alpha_1(t) + \\alpha_2(t) = 1 gives \n\\alpha_1(t) = \\alpha_2(t) = 1/2,\n which in this simple case perhaps agrees with our intuition (the average of the two vector fields).\nThe dynamics on the sliding mode is modelled by \n\\dot x_1 = 0, \\quad \\dot x_2 = x_2, \\quad \\bm x \\in \\mathcal{S}^+.\n\n\n\n\n\n\n\n\nPossible nonuniqueness on intersection of boundaries\n\n\n\n…", "crumbs": [ "6. Some classes of hybrid systems", "Switched systems" @@ -1907,18 +1918,18 @@ "href": "classes_PWA.html", "title": "Piecewise affine (PWA) systems", "section": "", - "text": "This is a subclass of switched systems where the functions on the right-hand side of the differential equations are affine functions of the state. For some (historical) reason these systems are also called piecewise linear (PWL).\nWe are going to restrict ourselves to state-driven switching.\nFirst, we consider the autonomous case, that is, systems without inputs: \n\\dot{\\bm x}\n=\n\\begin{cases}\n\\bm A_1 \\bm x + \\bm b_1, & \\mathrm{if}\\, \\bm H_1 \\bm x + \\bm g_1 \\leq 0,\\\\\n\\vdots\\\\\n\\bm A_m \\bm x + \\bm b_m, & \\mathrm{if}\\, \\bm H_m \\bm x + \\bm g_m \\leq 0.\n\\end{cases}\nThe nonautonomous case of systems with inputs is then: \n\\dot{\\bm x}\n=\n\\begin{cases}\n\\bm A_1 \\bm x + \\bm B_1 u + \\bm c_1, & \\mathrm{if}\\, \\bm H_1 \\bm x + \\bm g_1 \\leq 0,\\\\\n\\vdots\\\\\n\\bm A_m \\bm x + \\bm B_m + \\bm c_m, & \\mathrm{if}\\, \\bm H_m \\bm x + \\bm g_m \\leq 0.\n\\end{cases}", + "text": "This is a subclass of switched systems where the functions on the right-hand side of the differential equations are affine functions of the state. For some (historical) reason these systems are also called piecewise linear (PWL).\nWe are going to reformulate such systems as switched systems with state-driven switching.\nFirst, we consider the autonomous case, that is, systems without inputs: \n\\dot{\\bm x}\n=\n\\begin{cases}\n\\bm A_1 \\bm x + \\bm b_1, & \\mathrm{if}\\, \\bm H_1 \\bm x + \\bm g_1 \\leq 0,\\\\\n\\vdots\\\\\n\\bm A_m \\bm x + \\bm b_m, & \\mathrm{if}\\, \\bm H_m \\bm x + \\bm g_m \\leq 0.\n\\end{cases}\nThe nonautonomous case of systems with inputs is then: \n\\dot{\\bm x}\n=\n\\begin{cases}\n\\bm A_1 \\bm x + \\bm B_1 u + \\bm c_1, & \\mathrm{if}\\, \\bm H_1 \\bm x + \\bm g_1 \\leq 0,\\\\\n\\vdots\\\\\n\\bm A_m \\bm x + \\bm B_m + \\bm c_m, & \\mathrm{if}\\, \\bm H_m \\bm x + \\bm g_m \\leq 0.\n\\end{cases}", "crumbs": [ "6. Some classes of hybrid systems", "Piecewise affine (PWA) systems" ] }, { - "objectID": "classes_PWA.html#approximation-of-smooth-systems", - "href": "classes_PWA.html#approximation-of-smooth-systems", + "objectID": "classes_PWA.html#approximation-of-nonlinear-systems", + "href": "classes_PWA.html#approximation-of-nonlinear-systems", "title": "Piecewise affine (PWA) systems", - "section": "Approximation of smooth systems", - "text": "Approximation of smooth systems\nWhile the example with the saturated linear state feedback can be modelled as a PWA system exactly, there are many practical cases, in which the system is not exactly PWA affine but we want to approximate it as such.\n\nExample 2 (Smooth system approximated by a PWA system) Consider the following nonlinear system \n\\begin{bmatrix}\n\\dot x_1\\\\\\dot x_2\n\\end{bmatrix}\n=\n\\begin{bmatrix}\nx_2\\\\\n-x_2 |x_2| - x_1 (1+x_1^2)\n\\end{bmatrix}\n\nOur task is to approximate this system by a PWA system. Equivalently, we need to find a PWA approximation for the right-hand side function.", + "section": "Approximation of nonlinear systems", + "text": "Approximation of nonlinear systems\nWhile the example with the saturated linear state feedback can be modelled as a PWA system exactly, there are many practical cases, in which the system is not exactly PWA affine but we want to approximate it as such.\n\nExample 2 (Nonlinear system approximated by a PWA system) Consider the following nonlinear system \n\\begin{bmatrix}\n\\dot x_1\\\\\\dot x_2\n\\end{bmatrix}\n=\n\\begin{bmatrix}\nx_2\\\\\n-x_2 |x_2| - x_1 (1+x_1^2)\n\\end{bmatrix}\n\nOur task is to approximate this system by a PWA system. Equivalently, we need to find a PWA approximation for the right-hand side function.", "crumbs": [ "6. Some classes of hybrid systems", "Piecewise affine (PWA) systems" diff --git a/sitemap.xml b/sitemap.xml index 2121423..346965a 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -74,7 +74,7 @@ https://hurak.github.io/hys/classes_switched.html - 2024-10-28T19:28:56.571Z + 2024-10-30T08:48:35.180Z https://hurak.github.io/hys/solution_references.html @@ -130,7 +130,7 @@ https://hurak.github.io/hys/classes_PWA.html - 2024-09-12T15:00:31.285Z + 2024-10-30T09:09:16.042Z https://hurak.github.io/hys/hybrid_equations.html @@ -158,7 +158,7 @@ https://hurak.github.io/hys/classes_reset.html - 2024-10-28T18:53:09.041Z + 2024-10-28T19:47:13.270Z https://hurak.github.io/hys/complementarity_systems.html diff --git a/solution_concepts 6.html b/solution_concepts 6.html new file mode 100644 index 0000000..538aec3 --- /dev/null +++ b/solution_concepts 6.html @@ -0,0 +1,1216 @@ + + + + + + + + + +Solution concepts – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Solution concepts

+
+ + + +
+ + + + +
+ + + +
+ + +

Now that we know how to model hybrid systems, we need to define what we mean by a solution to a hybrid system. The definitions are not as straightforward as in the continuous-time or discrete-time case and mastering them is not only of theoretical value.

+
+

Hybrid time and hybrid time domain

+

Even before we start discussing the concepts of a solution, we need to discuss the concept of time in hybrid systems. Of course, hybrid systems live in the same world as we do, and therefore they evolve in the same physical time, but it turns out that we can come up with an artificial concept of hybrid time that makes modelling and analysis of hybrid systems convenient.

+

Recall that in continuous-time systems, the continuous time t\in\mathbb R_{\geq 0}, and in discrete-time systems, the discrete “time” k\in\mathbb N. We put the latter in quotation marks since k is not really the time but rather it should be read as the kth transition of the system. Now, the idea is to combine these two concepts of time into one, and we call it the hybrid time (t,j), \; t\in \mathbb R_{\geq 0},\, j\in \mathbb N.

+

If you think that it is redundant, note that since hybrid systems can exhibit discrete-event system behaviour, a transition from one discrete state to another can happen instantaneously. In fact, several such transitions can take no time at all. It sounds weird, but that is what the mathematical model allows. That is why determining t need not be enought and we also need to specify j.

+

The set of all hybrid times for a given hybrid system is called hybrid time domain +E \subset [0,T] \times \{0,1,2,\ldots, J\}, + where T and J can be finite or \infty.

+

In particular, +E = \bigcup_{j=0}^J \left([t_j,t_{j+1}] \times \{j\}\right) +\tag{1}

+

where 0=t_0 < t_1 < \ldots < t_J = T.

+

The meaning of Eq. 1 can be best explained using Fig. 1 below.

+
+
+
+ +
+
+Figure 1: Example of a hybrid time domain +
+
+
+

Note that if two hybrid times are from the same hybrid domain, we can decide if (t,j) \leq (t',j'). In other words, the set of hybrid times is totally ordered.

+
+
+

Hybrid arc

+

Hybrid arc is just a terminology used in the literature for hybrid state trajectory. It is a function that assigns a state vector x to a given hybrid time (t,j) +x: E \rightarrow \mathbb R^n. +

+

For each j the function t \mapsto x(t,j) is absolutely continuous on the interval I^j = \{t \mid (t,j) \in E\}.

+
+
+
+ +
+
+Inconsitent notation +
+
+
+

We admit here that we are not going to be 100% consistent in the usage of the notation x(t,j) in the rest of our course. Oftentimes use x(t) even within hybrid systems when we do not need to index the jumps.

+
+
+

It is perhaps clear now, that hybrid time domain can only be determined once the solution (the arc, the trajectory) is known. This is in sharp contrast with the continuous-time or discrete-time system – we can formulate the problem of finding solution to \dot x(t) = 3x(t), \, x(0) = 1 on the interval [0,2], where the interval was set even before we know how the solution looks like.

+
+
+

Solutions of autonomous (no-input) systems

+

Finally we can formalize the concept of a solution. A hybrid arc x(\cdot,\cdot) is a solution to the hybrid equations given by the common quadruple \{\mathcal{C},\mathcal{D},f,g\} (or \{\mathcal{C},\mathcal{D},\mathcal{F},\mathcal{G}\} for inclusions), if

+
    +
  • the initial state x(0,0) \in \overline{\mathcal{C}} \cup \mathcal{D}, and
  • +
  • for all j such that I^j = \{t\mid (t,j)\in E\} has a nonempty interior \operatorname{int}I^j +
      +
    • x(t,j) \in \mathcal C \; \forall t\in \operatorname{int}I^j,
    • +
    • \dot x(t,j) = f(x(t,j)) \; \text{for almost all}\; t\in I^j, and
    • +
  • +
  • for all (t,j)\in E such a (t,j+1)\in E +
      +
    • x(t,j) \in \mathcal{D}, and
    • +
    • x(t,j+1) = g(x(t,j)).
    • +
  • +
+

Make the modifications for the \{\mathcal{C},\mathcal{D},\mathcal{F},\mathcal{G}\} version by yourself.

+
+

Example 1 (Solution) En example of a solution is in Fig. 2. Follow the solution with your finger and make sure you understand what and why is happing. In particular, in the overlapping region, the solution is not unique. While it can continue flowing, it can also jump.

+
+
+
+ +
+
+Figure 2: Example of a solution +
+
+
+
+
+
+

Hybrid input

+

Similarly as we considered the state as a function of the hybrid time, we can consider the input as a function of the hybrid time. With its own hybrid domain E_\mathrm{u}, the input is +u: E_\mathrm{u} \rightarrow \mathbb R^m. +

+

For each j the function t \mapsto u(t,j) must be… well-behaved… For example, piecewise continuous on the interval I^j = \{t \mid (t,j) \in E_\mathrm{u}\}.

+
+
+

Solutions of systems with inputs

+

We assume that hybrid time domains for the arcs and inputs are the same. A solution must satisfy the same conditions as in the case of autonomous systems, but with the input taken into account. For completeness we state the conditions here:

+
    +
  • The initial state-control pair (x(0,0),u(0,0)) \in \overline{\mathcal{C}} \cup \mathcal{D}, and
  • +
  • for all j such that I^j = \{t\mid (t,j)\in E\} has a nonempty interior \operatorname{int}I^j +
      +
    • (x(t,j),u(t,j)) \in \mathcal C \; \forall t\in \operatorname{int}I^j,
    • +
    • \dot x(t,j) = f(x(t,j),u(t,j)) \; \text{for almost all}\; t\in I^j, and
    • +
  • +
  • for all (t,j)\in E such a (t,j+1)\in E +
      +
    • (x(t,j),u(t,j)) \in \mathcal{D}, and
    • +
    • x(t,j+1) = g(x(t,j),u(t,j)).
    • +
  • +
+ + +
+ + Back to top
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/solution_references 6.html b/solution_references 6.html new file mode 100644 index 0000000..0c59f40 --- /dev/null +++ b/solution_references 6.html @@ -0,0 +1,1100 @@ + + + + + + + + + +Literature – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Literature

+
+ + + +
+ + + + +
+ + + +
+ + +

Any discussion of the concept(s) of solution of a hybrid system must start with the concept of a hybrid time and hybrid time domain. Within the hybrid automata framework this is discussed in the references that we have already made. A particularly popular and recommendable are the (online available) lecture notes [1]. Its updated and extended version [2] is no longer available online – we can only guess that the authors are turning it into a printed textbook. Another hybrid automata textbook that discusses these concepts is [3] (section 2.2.3), but it is not available online either. Anyway, the same concept is also discussed within the hybrid equations framework as introduced, for example, in [4], which can be downloaded (within institutional subscription). In fact, we find their version of hybrid time and hybrid time domain even more (visually) appealing.

+

A transition from one discrete state to another, even if not accompanied by a jump (or reset) of the continuous state variable can be modeled as a discontinuity of the functions on right hand side of the differential equation. Depending on circumstances, more or less peculiar phenomena can occur due to these discontinuities.These issues are discussed in quite some detail in the (fairly readable) paper [5]. Very much recommendable.

+ + + + + Back to top

References

+
+
[1]
J. Lygeros, Lecture Notes on Hybrid Systems. 2004. Available: https://people.eecs.berkeley.edu/~sastry/ee291e/lygeros.pdf
+
+
+
[2]
J. Lygeros, S. Sastry, and C. Tomlin, “Hybrid Systems: Foundations, advanced topics and applications,” Jan. 2020. Available: https://www-inst.eecs.berkeley.edu/~ee291e/sp21/handouts/hybridSystems_monograph.pdf
+
+
+
[3]
H. Lin and P. J. Antsaklis, Hybrid Dynamical Systems: Fundamentals and Methods. in Advanced Textbooks in Control and Signal Processing. Cham: Springer, 2022. Accessed: Jul. 09, 2022. [Online]. Available: https://doi.org/10.1007/978-3-030-78731-8
+
+
+
[4]
R. Goebel, R. G. Sanfelice, and A. R. Teel, “Hybrid dynamical systems,” IEEE Control Systems Magazine, vol. 29, no. 2, pp. 28–93, Apr. 2009, doi: 10.1109/MCS.2008.931718.
+
+
+
[5]
J. Cortes, “Discontinuous dynamical systems: A tutorial on solutions, nonsmooth analysis, and stability,” IEEE Control Systems Magazine, vol. 28, no. 3, pp. 36–73, Jun. 2008, doi: 10.1109/MCS.2008.919306.
+
+
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/stability_concepts 6.html b/stability_concepts 6.html new file mode 100644 index 0000000..9e5be71 --- /dev/null +++ b/stability_concepts 6.html @@ -0,0 +1,1224 @@ + + + + + + + + + +Stability of hybrid systems – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Stability of hybrid systems

+
+ + + +
+ + + + +
+ + + +
+ + +

We will restrict ourselves to the stability of hybrid automata. The framework of hybrid equations offers alternative ways to analyze stability.

+
+

Equilibrium of a hybrid automaton

+

With no loss of generality the equilibrium is often assumed at the origin, that is, \bm x_\mathrm{eq} = \mathbf 0, but in the immediately following definitions we do not have to invoke this assumption.

+

For a hybrid system with \dot{\bm x} = \underbrace{\mathbf f(q,\bm x)}_{\mathbf f_q(\bm x)}, the equilibrium \bm x_\mathrm{eq} satisfies

+
    +
  • \mathbf 0 = \mathbf f_q(\bm x_\mathrm{eq}) for all q\in \mathcal Q,
  • +
  • the reset map r(q,q',\bm x_\mathrm{eq}) = \bm x_\mathrm{eq}.
  • +
+
+
+
+ +
+
+Warning +
+
+
+

The first condition above appears in several resources. For example, in the definition 4.9 in the section 4.2 in [1] or the definition 8.2 in the section 8.2 in (no longer available online) [2]. But it appears unnecessarily restrictive.

+
+
+

The second condition states that the system can be regarded as resting at the equlibrium even if it jumps from one discrete state (mode) to another (while staying in the equilibrium continuous state).

+
+
+

Stability of a hybrid automaton

+

The equilibrium x_\mathrm{eq}(=0) is stable if for a given \varepsilon > 0 there exists \delta > 0 such that for all hybrid systems executions/trajectories starting at (q_0,x_0), +\|x_0\| < \delta \Rightarrow \|x(\tau)\| < \varepsilon, \; \forall \tau \in \mathcal{T}, + where \tau is a hybrid time and \mathcal{T} is the hybrid time domain.

+
+
+

Asymptotic stability

+

The equilibrium is stable and furthermore we can choose some \delta such that +\|x_0\| < \delta \quad \Rightarrow \quad \lim_{\tau\rightarrow \tau_\infty} \|x(\tau)\| = 0, + where \tau_\infty<\infty if the execution is Zeno and \tau_\infty=\infty otherwise.

+
+
+

Is stability of the individual dynamics enough?

+
+
+

+
Hybrid automaton that is unstable due to switching even though the two modes are stable
+
+
+

+A_1 = +\begin{bmatrix} +-1 & -100\\ 10 & -1 +\end{bmatrix}, \quad +A_2 = +\begin{bmatrix} +-1 & 10\\ -100 & -1 +\end{bmatrix} +

+
    +
  • Both are stable.
  • +
  • Switching can be destabilizing.
  • +
+
+
+

Can the individual dynamics be unstable?

+
+
+

+
Hybrid automaton that is stable thanks to switching even though the two modes are unstable
+
+
+

+A_1 = +\begin{bmatrix} +1 & -100\\ 10 & 1 +\end{bmatrix}, \quad +A_2 = +\begin{bmatrix} +1 & 10\\ -100 & 1 +\end{bmatrix} +

+
    +
  • Both are unstable.
  • +
  • Switching can be stabilizing.
  • +
+ + + +
+ + Back to top

References

+
+
[1]
H. Lin and P. J. Antsaklis, Hybrid Dynamical Systems: Fundamentals and Methods. in Advanced Textbooks in Control and Signal Processing. Cham: Springer, 2022. Accessed: Jul. 09, 2022. [Online]. Available: https://doi.org/10.1007/978-3-030-78731-8
+
+
+
[2]
J. Lygeros, S. Sastry, and C. Tomlin, “Hybrid Systems: Foundations, advanced topics and applications,” Jan. 2020. Available: https://www-inst.eecs.berkeley.edu/~ee291e/sp21/handouts/hybridSystems_monograph.pdf
+
+
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/stability_recap 9.html b/stability_recap 9.html new file mode 100644 index 0000000..b554124 --- /dev/null +++ b/stability_recap 9.html @@ -0,0 +1,1251 @@ + + + + + + + + + +Recap of stability analysis for continuous dynamical systems – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Recap of stability analysis for continuous dynamical systems

+
+ + + +
+ + + + +
+ + + +
+ + +

Before we start discussing stability of hybrid dynamical systems, it will not hurt to recapitulate the stability analysis for continuous (both in value and in time) dynamical systems modelled by the standard state equation

+

\dot{\bm{x}} = \mathbf f(\bm x).

+
+

Equilibrium

+

Although every now and then we may hear the term stability attributed to a system, strictly speaking it is an equilibrium that is stable or unstable.

+

Equilibrium is a point in the state space, that is, a vector x_\mathrm{eq}\in \mathbb R^n, such that

+

\dot{\bm x} = \mathbf f(\bm x_\mathrm{eq}) = \mathbf 0.

+

Without loss of generality \bm x_\mathrm{eq} = \mathbf 0. If it is nonzero, we can introduce a new shifted state vector.

+
+
+

Lyapunov stability

+

One of the most common types of stability is Lyapunov stability. Loosely speaking, it means that if the system starts close to the equilibrium, it stays close to it. More formally, for a given \varepsilon>0, there is a \delta>0 such that …

+
+
+

Attractivity

+

This is another property of an equilibrium. If it is (locally) attractive, it means that if the systems starts close to the equilibrium, it will converge to it. The global version of attractivity means that the system asymptotically converges to the equilibrium from anywhere.

+

Perhaps it is not immediately clear that attractivity is distinct from (Lyapunov) stability. The following example shows an attractive but Lyapunov unstable equilibrium.

+
+
+Show the code +
f(x) = [(x[1]^2*(x[2]-x[1])+x[2]^5)/((x[1]^2+x[2]^2)*(1+(x[1]^2+x[2]^2)^2)); 
+        (x[2]^2*(x[2]-2x[1]))/((x[1]^2+x[2]^2)*(1+(x[1]^2+x[2]^2)^2))]
+
+using CairoMakie
+fig = Figure(; size = (800, 800),fontsize=20)
+ax = Axis(fig[1, 1], xlabel = "x₁", ylabel = "x₂")
+streamplot!(ax,x->Point2f(f(x)), -1.5..1.5, -1.5..1.5, colormap = :magma)
+fig
+
+
+
+
+

+
+
+
+
+
+
+

Asymptotic stability

+

Combination of Lyapunov stability and attractivity is called assymptotic stability.

+

If the attractivity is global, the assymptotic stability is called global too.

+
+
+

Exponential stability

+

Exponential convergence.

+
+
+

Stability of time-varying systems

+

Stability (Lyapunov, asymptotic, …) is called uniform, if it is independent of the inititial time.

+
+
+

Stability analysis via Lyapunov function

+

Now that we recapitulated the key stability concepts, it is time to recapitulate the methods of checking if this or that type of stability is achieved. The classical method is based on the searching for a Lyapunov function.

+

Lyapunov function is a scalar function V(\cdot)\in\mathcal{C}_1 defined on open \mathcal{D}\subset \mathbb{R}^n containing the origin (the equilibrium) that satisfies the following conditions V(0) = 0, \; V(x) > 0\, \text{for all}\, x\in \mathcal{D}\setminus \{0\},

+

\underbrace{\left(\nabla V(x)\right)^\top f(x)}_{\frac{\mathrm d}{\mathrm d t}V(x)} \leq 0.

+

In words, Lyapunov function for a given system and the equilibrium is a function that is positive everywhere except at the origin, where it is zero, we call such function positive definite, and its derivative along the trajectories of the system is nonpositive (aka positive semidefinite), which is a way to guarantee that the function does not increase along the trajectories. If such function exists, the equilibrium is Lyapunov stable.

+

If the latter condition is made strict, that is, if \left(\nabla V(x)\right)^\top f(x) < 0, which is a way to guarantee that the function decreases along the trajectories, the equilibrium is asymptotically stable.

+

The interpretation is quite intuitive:

+
+
+

LaSalle’s invariance principle

+

A delicate question is if the derivative of the Lyapunov function ocassionally vanishes, it it automatically means that the equilibrium is not assymptotically stable. The aswer is: not necessarily. LaSalle’s invariance principle states that even if the derivative of the Lyapunov function occasionally vanishes, the equilibrium can still be asymptotically stable, provided some condition is satisfied. We will not elaborate on it here. Look it up in your favourite nonlinear (control) system textbook.

+
+
+

Formulated using comparison functions

+

The above properties of the Lyapunov function be also be formulated using comparison functions. For Lyapunov stability, the following holds \kappa_1(\|x\|) \leq V(x) {\color{gray}\leq \kappa_2(\|x\|)}, where

+
    +
  • \kappa_1(\cdot), \kappa_2(\cdot) are class \mathcal{K} comparison functions, that is, they are continuous, zero at zero and (strictly) increasing.
  • +
  • If \kappa_1 increases to infinity (\kappa_1(\cdot)\in\mathcal{K}_\infty), the stability is global.
  • +
+

For asymptotic stability

+

\left(\nabla V(x)\right)^\top f(x) \leq -\rho(\|x\|), where \rho(\cdot) is a positive definite continuous function, zero at the origin.

+
+

The upper bound \kappa_2(\cdot) does not have to be there, it is automatically satisfied for time-invariant systems. It does have to be imposed for time-varying systems though.

+
+
+
+

Exponential stability

+

k_1 \|x\|^p \leq V(x) \leq k_2 \|x\|^p,

+

\left(\nabla V(x)\right)^\top f(x) \leq -k_3 \|x\|^p.

+
+
+

Exponential stability with quadratic Lyapunov function

+

+V(x) = x^\top P x +

+

\lambda_{\min} (P) \|x\|^2 \leq V(x) \leq \lambda_{\max} (P) \|x\|^2

+
+
+

Converse theorems

+
    +
  • for (G)UAS,
  • +
  • for Lyapunov stability only time-varying Lyapunov function guaranteed.
  • +
+ + +
+ + Back to top
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/stability_software 6.html b/stability_software 6.html new file mode 100644 index 0000000..813445b --- /dev/null +++ b/stability_software 6.html @@ -0,0 +1,1099 @@ + + + + + + + + + +Software – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Software

+
+ + + +
+ + + + +
+ + + +
+ + +

In our course we formulated the problem of checking stability that that of constructing a Lyapunov function, which in turn was formulated as a problem of solving an optimization problem of semidefinite programming (with linear matrix inequalities, LMI) or positive (nonnegative) polynomial programming (via sum-of-squares (SOS) programming). Hence, we need to be able to formulate and solve those optimization problems.

+
+

Matlab

+ +
+
+

Julia

+ +
+
+

Python

+ + + +
+ + Back to top
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/stability_via_multiple_lyapunov_function 9.html b/stability_via_multiple_lyapunov_function 9.html new file mode 100644 index 0000000..7c84f1e --- /dev/null +++ b/stability_via_multiple_lyapunov_function 9.html @@ -0,0 +1,1417 @@ + + + + + + + + + +Stability via multiple Lyapunov functions – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Stability via multiple Lyapunov functions

+
+ + + +
+ + + + +
+ + + +
+ + +
+

Example: CQLF cannot be found

+
+

Example 4.11 from Lin & Antsaklis (2022)

+
+
+
+

Multiple Lyapunov Function (MLF) approach to analysis of stability

+
    +
  • Not just a single common Lyapunov function V(\bm x).
  • +
  • Instead, several Lyapunov-like functions V_i(\bm x),\; i=1,\ldots,r, that are Lyapunov on some subsets of the state space \Omega_i.
  • +
  • Stitch them together to form +V(x) = +\begin{cases} +V_1(x) & \text{if } x\in \Omega_1, \\ +\vdots\\ +V_r(x) & \text{if } x\in \Omega_r, \\ +\end{cases} +
  • +
+
+
+

S-procedure

+
    +
  • A result about solvability of two or more quadratic inequalities, not necessarily convex ones.

    +
      +
    • For convex problems we have nonlinear Farkas’ lemma.
    • +
  • +
  • Origin in the control theory (analysis of stability of nonlinear systems, hence the S letter) with the first rigorous result provided by Yakubovich in 1970s.

  • +
  • It gives conditions under which (satisfaction of) one quadratic inequality follows from (satisfaction of) another one (or more), that is, it gives a condition under which the following implication holds:

  • +
  • Quadratic inequality #1 satisfied by some x \Rightarrow Quadratic inequality #0 satisfied by the same x.

  • +
  • In other words, it gives a condition under which the solution set of the inequality #1 denoted as \mathcal X_1 is included in the solution set \mathcal X_0 of the inequality #0.

  • +
+
+
+

S-procedure with nonstrict inequalities

+
    +
  • Consider the general quadratic functions F_i(x) = x^\top A_i x + 2b_i^\top x + c_i, \; i=0,\ldots, p.

  • +
  • Question: under which conditions F_0(x) \geq 0 for all x satisfying F_i(x)\geq 0,\; i=1,\ldots,p ?

  • +
  • In other words, we are looking for conditions under which the implication +F_i(x) \geq 0,\; i=1,\ldots,p \quad \Rightarrow \quad F_0(x) \geq 0 +
    +holds.

  • +
  • In the simplest (yet relevant) case n=1 we search for conditions under which F_0(x) \geq 0 for all x satisfying F_1(x)\geq 0,

  • +
  • that is, conditions under which the implication +F_1(x) \geq 0 \quad \Rightarrow \quad F_0(x) \geq 0 +
    +holds.

  • +
+
+
+

Sufficient conditions

+

The existence of \alpha_i\geq 0,\; i=1,\ldots,p such that +F_0(x)-\sum_{i=1}^p \alpha_i F_i(x) \geq 0. +

+
    +
  • Generally not necessary, the condition is conservative.
    +
  • +
  • It can be formulated as an LMI +\begin{bmatrix} +A_0 & b_0 \\ +b_0^\top & c_0 +\end{bmatrix} - +\sum_{i=1}^p +\alpha_i +\begin{bmatrix} +A_i & b_i \\ +b_i^\top & c_i +\end{bmatrix} +\succeq 0 +
    +where \alpha_i \geq 0,\; i=1,\ldots,p.
  • +
+
+
+

Sufficient and also necessary

+
    +
  • It is nontrivial that for p=1 it is also necessary, provided that there is some x_0 such that F_1(x_0)>0 .

  • +
  • Then we have the following equivalence between the two constraints: +\begin{aligned} +F_0(x) &\geq 0 \; \forall x \;\mathrm{satisfying}\; F_1(x)\geq 0 \\ +&\Longleftrightarrow \\ +F_0(x)-\alpha F_1(x) &\geq 0,\;\text{for some}\; \alpha\in\mathbb{R}, \; \alpha\geq 0, +\end{aligned} +

  • +
  • which again can be formulated as an LMI, namely
    + +\begin{bmatrix} +A_0 & b_0 \\ +b_0^\top & c_0 +\end{bmatrix} - \alpha +\begin{bmatrix} +A_1 & b_1 \\ +b_1^\top & c_1 +\end{bmatrix} +\succeq 0,\quad \alpha\geq 0. +

  • +
+
+
+

More on S-procedure

+
    +
  • There are several variants +
      +
    • strict, nonstrict or mixed inequalities,
    • +
    • just two or more,
    • +
    • some of the constraints can be equations.
    • +
  • +
  • Literature (freely available online) +
      +
    • Boyd, S., El Ghaoui, L., Feron, E., Balakrishnan, V., 1994. Linear Matrix Inequalities in System and Control Theory. SIAM. Pages 23 and 24.
    • +
    • Boyd, S., Vandenberghe, L., 2004. Convex Optimization. Cambridge University Press. Page 655.
    • +
  • +
+
+
+

Piecewise quadratic Lyapunov function

+
    +
  • Quadratic Lyapunov-like functions, that is, quadratic functions V_i(\bm x) = \bm x^\top \mathbf P_i \bm x that qualify as Lyapunov functions only on respective subsets \Omega_i\sub \mathbb R^n:
  • +
+

. . .

+

+V_i(\bm x) = \bm x^\top \mathbf P_i \bm x > 0\quad \forall \;\bm x\in \Omega_i +

+

. . .

+

+\dot V_i(\bm x) = \bm x^\top \left( \mathbf A_i^\top \mathbf P_i + \mathbf P_i \mathbf A_i \right) \bm x < 0\quad \forall \;\bm x\in \Omega_i +

+
+
+

Using comparison functions and nonstrict inequalities

+

. . .

+

+\alpha_1 \bm x^\top \mathbf I \bm x \leq \bm x^\top \mathbf P_i \bm x \leq \alpha_2 \bm x^\top \mathbf I \bm x \quad \forall \;\bm x\in \Omega_i +

+

. . .

+

+\bm x^\top \left( \mathbf A_i^\top \mathbf P_i + \mathbf P_i \mathbf A_i \right) \bm x \leq -\alpha_3 \bm x^\top \mathbf I \bm x\quad \forall \;\bm x\in \Omega_i +

+
+
+

Characterization of subsets of state space using LMI

+
    +
  • Some subsets \Omega_i\sub \mathbb R^n characterized using linear and quadratic inequalities can be formulated as within the LMI framework as + \bm x^\top \mathbf Q_i \bm x \geq 0. +

  • +
  • In particular, centered ellipsoids and cones.

  • +
  • For example,
    + +\begin{aligned} +\Omega_i &= \{\bm x \in \mathbb R^n \mid (\mathbf c^\top \bm x \geq 0 \land \mathbf d^\top \bm x \geq 0) \\ +& \qquad \qquad \qquad \lor (\mathbf c^\top \bm x \leq 0 \land \mathbf d^\top \bm x \leq 0)\}. +\end{aligned} +

  • +
  • This constraint can be reformulated as +(\mathbf c^\top \bm x) (\mathbf d^\top \bm x) \geq 0, +

  • +
  • which can be reformatted to +\bm x^\top \mathbf c \mathbf d^\top \bm x \geq 0, +

  • +
  • which can further be symmetrized to +\bm x^\top \left(\frac{\mathbf c \mathbf d^\top + \mathbf d \mathbf c^\top}{2}\right) \bm x \geq 0. +

  • +
  • More general sets (general polyhedra, noncentered ellipsoids) can also be modelled using LMI too…

  • +
+
+
+

Combining the subset characterization and Lyapunov-ness using the S-procedure

+

. . .

+

+\alpha_i \bm x^\top \mathbf I \bm x \leq \bm x^\top \mathbf P_i \bm x, +

+

. . .

+

+\bm x^\top \left( \mathbf A_i^\top \mathbf P_i + \mathbf P_i \mathbf A_i \right) \bm x \leq -\gamma_i \bm x^\top \mathbf I \bm x, +

+

. . .

+

both for all \bm x\in \Omega_i, that is, all \bm x such that \bm x^\top \mathbf Q_i \bm x \geq 0.

+

. . .

+

+\mathbf P_i - \alpha_i \mathbf I - \mu_i \mathbf Q_i \succeq 0,\quad \mu_i \geq 0,\; \alpha_i > 0, +

+

. . .

+

+\mathbf A_i^\top \mathbf P_i + \mathbf P_i \mathbf A_i + \gamma_i \mathbf I + \xi_i \mathbf Q \preceq 0,\quad \mu_i \geq 0,\; \gamma_i > 0. +

+
+
+

More general sets

+

. . .

+

+\bm x^\top \mathbf Q \bm x + 2\mathbf r^\top \bm x + s \geq 0 +

+

. . .

+

+\begin{bmatrix} +\bm x^\top & 1 +\end{bmatrix} +\underbrace{ +\begin{bmatrix} +\mathbf Q & \mathbf r \\ \mathbf r^\top & s +\end{bmatrix}}_{\bar{\mathbf{Q}}} +\underbrace{ +\begin{bmatrix} +\bm x \\ 1 +\end{bmatrix}}_{\bar{\bm x}} +\geq 0 +

+

. . .

+

+\begin{bmatrix} +\mathbf Q & \mathbf r \\ \mathbf r^\top & s +\end{bmatrix} +\succeq 0 +

+
+
+

Example: affine subspace

+

. . .

+

+\mathbf c^\top \bm x + d \geq 0 +

+

. . .

+

+\begin{bmatrix} +\bm x^\top & 1 +\end{bmatrix} +\begin{bmatrix} +\mathbf 0 & \mathbf c \\ \mathbf c^\top & 2d +\end{bmatrix} +\begin{bmatrix} +\bm x \\ 1 +\end{bmatrix} +\geq 0 +

+

. . .

+

+\begin{bmatrix} +\mathbf 0 & \mathbf c \\ \mathbf c^\top & 2d +\end{bmatrix} +\succeq 0 +

+
+
+

But then the Lyapunov-like functions and system matrices must also be extended

+

. . .

+

+V(\bm x) = +\begin{bmatrix} +\bm x^\top & 1 +\end{bmatrix} +\underbrace{ +\begin{bmatrix} +\mathbf P & \mathbf P_{12} \\ \mathbf P_{12} & P_{22} +\end{bmatrix}}_{\bar{\mathbf P}} +\begin{bmatrix} +\bm x \\ 1 +\end{bmatrix} +

+

. . .

+

+\bar{\mathbf{A}} = +\begin{bmatrix} +\mathbf A & \mathbf 0 \\ \mathbf 0 & 0 +\end{bmatrix} +

+
+
+

Continuity conditions

+
    +
  • The boundary between the regions \Omega_i and \Omega_j described by +\Omega_{ij} = \{\bm x \in \mathbb R^n \mid \mathbf F_{ij} \bm z + \mathbf{l}_{ij}\}, + where \bm z\in \mathbb R^p, \mathbf F_{ij}\in \mathbb R^{n\times p}, and \mathbf l_{ij}\in \mathbb R^{n}.

  • +
  • The continuity conditions are +V_i(\bm x) = V_j(\bm x) \quad \forall \bm x \in \Omega_{ij}, +

  • +
  • which can be reformulated as +\begin{aligned} +&\left(\mathbf F_{ij} \bm z + \mathbf{l}_{ij}\right)^\top \mathbf P_i \left(\mathbf F_{ij} \bm z + \mathbf{l}_{ij}\right) \\ +& \qquad + 2\left(\mathbf F_{ij} \bm z + \mathbf{l}_{ij}\right)^\top \bm q_i + r_i \\ +&= \left(\mathbf F_{ij} \bm z + \mathbf{l}_{ij}\right)^\top \mathbf P_j \left(\mathbf F_{ij} \bm z + \mathbf{l}_{ij}\right) \\ +& \qquad + 2\left(\mathbf F_{ij} \bm z + \mathbf{l}_{ij}\right)^\top \bm q_j + r_j +\end{aligned}. +

  • +
  • Collecting the terms with equal powers of \bm z. +\begin{aligned} +\mathbf F_{ij}^\top (\mathbf P_1 - \mathbf P_2) \mathbf F_{ij} &= 0, \\ +\mathbf F_{ij}^\top (\mathbf P_1 - \mathbf P_2) \mathbf l_{ij} + (\mathbf q_1-\mathbf q_2) &= 0, \\ +\mathbf l_{ij}^\top (\mathbf P_1 - \mathbf P_2)\mathbf l_{ij} + 2\mathbf l_{ij}^\top (\mathbf q_1-\mathbf q_2) + r_1-r_2 &= 0. +\end{aligned} +

  • +
+ + +
+ + Back to top
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/verification_barrier 6.html b/verification_barrier 6.html new file mode 100644 index 0000000..a383f9a --- /dev/null +++ b/verification_barrier 6.html @@ -0,0 +1,2699 @@ + + + + + + + + + +Barrier certificates – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Barrier certificates

+
+ + + +
+ + + + +
+ + + +
+ + +

This is another technique for verification of safety of hybrid system. Unlike the optimal-control based and set-propagation based techniques, it is not based on explicit computational characterization of the evolution of states in time. Instead, it is based on searching for a function of a state that satisfies certain properties. The function is called a barrier function and it serves as a certificate of safety.

+

For notational and conceptual convenience we start with an explanation of the method for continuous systems, and only then we extend it to hybrid systems.

+
+

Barrier certificate for continuous systems

+

We consider a continuous-time dynamical system modelled by +\dot{\bm x}(t) = \mathbf f(\bm x, \bm d), + where \bm d represents an uncertainy in the system description – it can be an uncertain parameter or an external disturbance acting on the system.

+

We now define two regions of the state space:

+
    +
  • the set of initial states \mathcal X_0,
  • +
  • and the set of unsafe states \mathcal X_\mathrm{u}.
  • +
+

Our goal is to prove (certify) that the system does not reach the unsafe states for an arbitrary initial state \bm x(0)\in \mathcal X_0 and for an arbitrary d\in \mathcal D.

+

We define a barrier function B(\bm x) with the following three properties

+

B(\bm x) > 0,\quad \forall \bm x \in \mathcal X_\mathrm{u},

+

B(\bm x) \leq 0,\quad \forall \bm x \in \mathcal X_0,

+

\nabla B(\bm x)^\top \mathbf f(\bm x, \bm d) \leq 0,\quad \forall \bm x, \bm d \, \text{such that} \, B(\bm x) = 0.

+

Now, upon finding a function B(\bm x) with such properties, we will prove (certify) safety of the system – the function serves as a certificate of safety.

+
+
+
+ +
+
+Note +
+
+
+

It cannot go unnoticed that the properties of a barrier function B(\bm x) and the motivation for its finding resemble those of a Lyapunov function. Indeed, the two concepts are related. But they are not the same.

+
+
+

How do we find such function? We will reuse the computational technique based on sum-of-squares (SOS) polynomials that we already used for Lyapunov functions. But first we need to handle one unpleasant aspect of the third condition above – nonconvexity of the set given by B(\bm x) = 0.

+
+
+

Convex relaxation of the barrier certificate problem

+

We relax the third condition so that it holds not only at B(\bm x) = 0 but everywhere. The three conditions are then B(\bm x) > 0,\quad \forall \bm x \in \mathcal X_\mathrm{u},

+

B(\bm x) \leq 0,\quad \forall \bm x \in \mathcal X_0,

+

\nabla B(\bm x)^\top \mathbf f(\bm x, \bm d) \leq 0,\quad \forall \bm x\in \mathcal X, \bm d \in \mathcal D.

+

Let’s now demonstrate this by means of an example.

+
+

Example 1 Consider the system modelled by +\begin{aligned} +\dot x_1 &= x_2\\ +\dot x_2 &= -x_1 + \frac{p}{3}x_1^3 - x_2, +\end{aligned} + where the parameter p\in [0.9,1.1].

+

The initial set is given by +\mathcal X_0 = \{ \bm x \in \mathbb R^2 \mid (x_1-1.5)^2 + x_2^2 \leq 0.25 \} + and the unsafe set is given by +\mathcal X_\mathrm{u} = \{ \bm x \in \mathbb R^2 \mid (x_1+1)^2 + (x_2+1)^2 \leq 0.16 \}. +

+

The vector field \mathbf f and the initial and unsafe sets are shown in the figure below.

+
+
+Show the code +
using SumOfSquares
+using DynamicPolynomials
+using MosekTools    
+
+optimizer = optimizer_with_attributes(Mosek.Optimizer, MOI.Silent() => true)
+model = SOSModel(optimizer)
+@polyvar x[1:2] 
+
+p = 1;
+
+f = [ x[2],
+     -x[1] + (p/3)*x[1]^3 - x[2]]
+
+g₁ = -(x[1]+1)^2 - (x[2]+1)^2 + 0.16  # 𝒳ᵤ = {x ∈ R²: g₁(x) ≥ 0}
+h₁ = -(x[1]-1.5)^2 - x[2]^2 + 0.25    # 𝒳₀ = {x ∈ R²: h₁(x) ≥ 0}
+
+X = monomials(x, 0:4)
+@variable(model, B, Poly(X))
+
+ε = 0.001
+@constraint(model, B >= ε, domain = @set(g₁ >= 0))
+
+@constraint(model, B <= 0, domain = @set(h₁ >= 0))
+
+using LinearAlgebra # Needed for `dot`
+dBdt = dot(differentiate(B, x), f)
+@constraint(model, -dBdt >= 0)
+
+JuMP.optimize!(model)
+
+JuMP.primal_status(model)
+
+import DifferentialEquations, Plots, ImplicitPlots
+function phase_plot(f, B, g₁, h₁, quiver_scaling, Δt, X0, solver = DifferentialEquations.Tsit5())
+    X₀plot = ImplicitPlots.implicit_plot(h₁; xlims=(-2, 3), ylims=(-2.5, 2.5), resolution = 1000, label="X₀", linecolor=:blue)
+    Xᵤplot = ImplicitPlots.implicit_plot!(g₁; xlims=(-2, 3), ylims=(-2.5, 2.5), resolution = 1000, label="Xᵤ", linecolor=:teal)
+    Bplot  = ImplicitPlots.implicit_plot!(B; xlims=(-2, 3), ylims=(-2.5, 2.5), resolution = 1000, label="B = 0", linecolor=:red)
+    Plots.plot(X₀plot)
+    Plots.plot!(Xᵤplot)
+    Plots.plot!(Bplot)
+    (vx, vy) = [fi(x[1] => vx, x[2] => vy) for fi in f]
+    ∇pt(v, p, t) = (v[1], v[2])
+    function traj(v0)
+        tspan = (0.0, Δt)
+        prob = DifferentialEquations.ODEProblem(∇pt, v0, tspan)
+        return DifferentialEquations.solve(prob, solver, reltol=1e-8, abstol=1e-8)
+    end
+    ticks = -5:0.5:5
+    X = repeat(ticks, 1, length(ticks))
+    Y = X'
+    Plots.quiver!(X, Y, quiver = (x, y) -> (x, y) / quiver_scaling, linewidth=0.5)
+    for x0 in X0
+        Plots.plot!(traj(x0), vars=(1, 2), label = nothing)
+    end
+    Plots.plot!(xlims = (-2, 3), ylims = (-2.5, 2.5))
+end
+
+phase_plot(f, value(B), g₁, h₁, 10, 30.0, [[x1, x2] for x1 in 1.2:0.2:1.7, x2 in -0.35:0.1:0.35])
+
+
+
┌ Warning: To maintain consistency with solution indexing, keyword argument vars will be removed in a future version. Please use keyword argument idxs instead.
+│   caller = ip:0x0
+└ @ Core :-1
+┌ Warning: At t=4.423118290940107, dt was forced below floating point epsilon 8.881784197001252e-16, and step error estimate = 1.139033855908175. Aborting. There is either an error in your model specification or the true solution is unstable (or the true solution can not be represented in the precision of Float64).
+└ @ SciMLBase ~/.julia/packages/SciMLBase/tey0W/src/integrator_interface.jl:620
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+

Barrier certificate for hybrid systems

+

For a hybrid automaton with l locations \{q_1,q_2,\ldots,q_l\}, not just one but l barrier functions/certificates are needed:

+

B_i(\bm x) > 0,\quad \forall \bm x \in \mathcal X_\mathrm{u}(q_i),

+

B_i(\bm x) \leq 0,\quad \forall \bm x \in \mathcal X_0(q_i),

+

\nabla B_i(\bm x)^\top \mathbf f_i(\bm x, \bm u) \leq 0,\quad \forall \bm x, \bm u \, \text{such that} \, B_i(\bm x) = 0,

+

+\begin{aligned} +B_i(\bm x) \leq 0,\quad &\forall \bm x \in \mathcal R(q_j,q_i,\bm x^-)\,\text{for some}\, q_j\,\\ +&\text{and}\, \bm x^-\in\mathcal G(q_j,q_i)\,\text{with}\, B_j(\bm x^-)\leq 0. +\end{aligned} +

+
+
+

Convex relaxation of barrier certificates for hybrid systems

+

\nabla B_i(\bm x)^\top \mathbf f_i(\bm x, \bm u) \leq 0,\quad \forall \bm x\in X_0(q_i), \bm u\in\mathcal U(q_i),

+

+\begin{aligned} +B_i(\bm x) \leq 0,\quad &\forall (\bm x, \bm x^-)\,\text{such that}\, \bm x \in \mathcal R(q_j,q_i,\bm x^-), \\ +&\text{and}\, \bm x^-\in\mathcal G(q_i,q_j). +\end{aligned} +

+ + +
+ + Back to top
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/verification_barrier.html b/verification_barrier.html index 75db411..daeca3d 100644 --- a/verification_barrier.html +++ b/verification_barrier.html @@ -818,1403 +818,1403 @@

- + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/verification_intro 8.html b/verification_intro 8.html new file mode 100644 index 0000000..8773c73 --- /dev/null +++ b/verification_intro 8.html @@ -0,0 +1,1062 @@ + + + + + + + + + +What is verification? – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

What is verification?

+
+ + + +
+ + + + +
+ + + +
+ + +

About…

+ + + + Back to top
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/verification_reachability 6.html b/verification_reachability 6.html new file mode 100644 index 0000000..3a649fb --- /dev/null +++ b/verification_reachability 6.html @@ -0,0 +1,1062 @@ + + + + + + + + + +Reachability – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Reachability

+
+ + + +
+ + + + +
+ + + +
+ + +

About this site

+ + + + Back to top
+ + +
+
+ +
+ + + + + \ No newline at end of file diff --git a/verification_references 9.html b/verification_references 9.html new file mode 100644 index 0000000..b517c59 --- /dev/null +++ b/verification_references 9.html @@ -0,0 +1,1129 @@ + + + + + + + + + +Literature – B(E)3M35HYS – Hybrid systems + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + +
+ +
+
+

Literature

+
+ + + +
+ + + + +
+ + + +
+ + +

The topic of verification of hybrid systems is vast. While we only reserved a single week/chapter/block for it, it would easily fill a dedicated course, supported by a couple of books. Having a smaller time budget, we have still found some encouragement that modest introduction is feasible in the Chapter 3 of [1]. Although we are not following the book closely, we are covering some of their topics.

+

Among general references for hybrid system verification, we can recommend [2]. Although the book is not freely available for download, its web page contains quite some additional material such as slides and codes.

+
+

Reachability analysis

+

[3] [4]

+
+
+

Barier certificates

+

[5]

+
+
+

Temporal logics

+

[6], [7]

+

[8], [9].

+ + + +
+ + Back to top

References

+
+
[1]
H. Lin and P. J. Antsaklis, Hybrid Dynamical Systems: Fundamentals and Methods. in Advanced Textbooks in Control and Signal Processing. Cham: Springer, 2022. Accessed: Jul. 09, 2022. [Online]. Available: https://doi.org/10.1007/978-3-030-78731-8
+
+
+
[2]
S. Mitra, Verifying Cyber-Physical Systems: A Path to Safe Autonomy. in Cyber Physical Systems Series. Cambridge, MA, USA: MIT Press, 2021. Available: https://sayanmitracode.github.io/cpsbooksite/about.html
+
+
+
[3]
M. Althoff, G. Frehse, and A. Girard, “Set Propagation Techniques for Reachability Analysis,” Annual Review of Control, Robotics, and Autonomous Systems, vol. 4, no. 1, pp. 369–395, 2021, doi: 10.1146/annurev-control-071420-081941.
+
+
+
[4]
M. Althoff, N. Kochdumper, M. Wetzlinger, and T. Ladner, CORA 2024 Manual.” 2023. Accessed: Jan. 10, 2023. [Online]. Available: https://tumcps.github.io/CORA/data/archive/manual/Cora2024Manual.pdf
+
+
+
[5]
S. Prajna and A. Jadbabaie, “Safety Verification of Hybrid Systems Using Barrier Certificates,” in Hybrid Systems: Computation and Control, R. Alur and G. J. Pappas, Eds., in Lecture Notes in Computer Science. Berlin, Heidelberg: Springer, 2004, pp. 477–492. doi: 10.1007/978-3-540-24743-2_32.
+
+
+
[6]
C. Baier and J.-P. Katoen, Principles of Model Checking. Cambridge, MA, USA: MIT Press, 2008. Available: https://mitpress.mit.edu/books/principles-model-checking
+
+
+
[7]
E. M. Clarke, Jr, O. Grumberg, D. Kroening, D. Peled, and H. Veith, Model Checking, 2nd ed. in Cyber Physical Systems Series. Cambridge, MA, USA: MIT Press, 2018. Available: https://mitpress.mit.edu/9780262038836/model-checking/
+
+
+
[8]
R. M. Murray, U. Topcu, and N. Wongpiromsarn, “Lecture 3 Linear Temporal Logic (LTL).” Belgrade (Serbia), Mar. 2020. Available: http://www.cds.caltech.edu/~murray/courses/eeci-sp2020/L3_ltl-09Mar2020.pdf
+
+
+
[9]
N. Wongpiromsarn, R. M. Murray, and U. Topcu, “Lecture 4 Model Checking and Logic Synthesis.” Belgrade (Serbia), Mar. 2020. Available: http://www.cds.caltech.edu/~murray/courses/eeci-sp2020//L4_model_checking-09Mar2020.pdf
+
+
+ + +
+ + + + + + \ No newline at end of file