-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathclasses_PWA.qmd
105 lines (91 loc) · 3.34 KB
/
classes_PWA.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
---
title: "Piecewise affine (PWA) systems"
bibliography:
- ref_PWA.bib
- ref_PWA_approx.bib
csl: ieee-control-systems.csl
format:
html:
html-math-method: katex
code-fold: true
code-summary: "Show the code"
crossref:
fig-prefix: Fig.
eq-prefix: Eq.
#engine: julia
---
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 reformulate such systems as switched systems with state-driven switching.
First, we consider the autonomous case, that is, systems without inputs:
$$
\dot{\bm x}
=
\begin{cases}
\bm A_1 \bm x + \bm b_1, & \mathrm{if}\, \bm H_1 \bm x + \bm g_1 \leq 0,\\
\vdots\\
\bm A_m \bm x + \bm b_m, & \mathrm{if}\, \bm H_m \bm x + \bm g_m \leq 0.
\end{cases}
$$
The nonautonomous case of systems with inputs is then:
$$
\dot{\bm x}
=
\begin{cases}
\bm A_1 \bm x + \bm B_1 u + \bm c_1, & \mathrm{if}\, \bm H_1 \bm x + \bm g_1 \leq 0,\\
\vdots\\
\bm A_m \bm x + \bm B_m + \bm c_m, & \mathrm{if}\, \bm H_m \bm x + \bm g_m \leq 0.
\end{cases}
$$
::: {#exm-saturated-state-feedback}
## Linear system with saturated linear state feedback
In this example we consider a linear system with a saturated linear state feedback as in @fig-saturated-state-feedback.
![Linear system with a saturated linear state feedback](classes_figures/saturated_state_feedback.png){width=50% #fig-saturated-state-feedback}
The state equations for the close-loop system are
$$
\dot{\bm x} = \bm A\bm x + \bm b \,\mathrm{sat}(v), \quad v = \bm k^T \bm x,
$$
which can be reformulated as a piecewise affine system
$$
\dot{\bm x} =
\begin{cases}
\bm A \bm x - \bm b, & \mathrm{if}\, \bm x \in \mathcal{X}_1,\\
(\bm A + \bm b \bm k^\top )\bm x, & \mathrm{if}\, \bm x \in \mathcal{X}_2,\\
\bm A \bm x + \bm b, & \mathrm{if}\, \bm x \in \mathcal{X}_3,\\
\end{cases}
$$
where the partitioning of the space of control inputs is shown in @fig-saturated-state-feedback-partitioning.
![Partitioning the control input space](classes_figures/saturated_state_feedback_partitioning.png){width=50% #fig-saturated-state-feedback-partitioning}
Expressed in the state space, the partitioning is
$$
\begin{aligned}
\mathcal{X}_1 &= \{\bm x \mid \bm H_1\bm x + g_1 \leq 0\},\\
\mathcal{X}_2 &= \{\bm x \mid \bm H_2\bm x + \bm g_2 \leq 0\},\\
\mathcal{X}_3 &= \{\bm x \mid \bm H_3\bm x + g_3 \leq 0\},
\end{aligned}
$$
where
$$
\begin{aligned}
\bm H_1 &= \bm k^\top, \quad g_1 = 1,\\
\bm H_2 &= \begin{bmatrix}-\bm k^\top\\\bm k^\top\end{bmatrix}, \quad \bm g_2 = \begin{bmatrix}-1\\-1\end{bmatrix},\\
\bm H_3 &= -\bm k^\top, \quad g_3 = 1.
\end{aligned}
$$
:::
## 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.
::: {#exm-nonlinear-approximation}
## Nonlinear system approximated by a PWA system
Consider the following nonlinear system
$$
\begin{bmatrix}
\dot x_1\\\dot x_2
\end{bmatrix}
=
\begin{bmatrix}
x_2\\
-x_2 |x_2| - x_1 (1+x_1^2)
\end{bmatrix}
$$
Our task is to approximate this system by a PWA system. Equivalently, we need to find a PWA approximation for the right-hand side function.
:::