Skip to content

HW4

Problem 1

1772513435409

A) simulate 100 sample path of system for different values of p, and \(\phi(x) = x^TQx\) where Q is a positive definite matrix

Given the \(\phi(x) = x^TQx\), we have \(\nabla \phi(x_1) = \nabla x_1^T Q x_1 = x_1^T' Q x_1 + x_1^T Q x_1' = 2x_1^T Q x_1\) (since \(x_1^T x_1\) is a scaler, the transpose of \(x_1^T Q x_1\) is equal to itself),

Therefore \(\dot(V(x_1)) = -\nabla \phi(x_1) = -2Qx_1\)

the \(x_2\) is a timer with constant 1 unit/s, therefore, the period of the system is \(T = 1s\)

therefore, we have

\[\frac{dx_1 (t)}{dt} = -2Qx_1(t) \\ \frac{dx_1}{x_1} = -2Q dt \\ \int \frac{dx_1}{x_1} = \int -2Q dt \\ \ln(x_1) = -2Qt + C \\ x_1(t) = e^{-2Qt}x_1(0)\]
\[x_1(1^-) = e^{-2Q}x_1(0)\]

and for the jump, we have

\[x_1(1^+) = vx_1(1^-)\]

The following is simulation result of the matrix Q = [[0.3, 0.3], [0.3, 0.4]], and the initial condition \(x_1(0) = [1, 0]^T\):

1772670701581

B) use a lyapunov function to compute an upper bound on p such that the system renders UGASp the set \(\mathcal{A} \times [0, 1]\)

Let the Lyapunove function be \(V(x) = \phi(x) = x^Tx\), we want to show it is UGAS:

to show the Lyapunov function is UGAS at flow:

\[V(x_1) = ||x_1||^2 = x_1^Tx_1 \\ \dot{V}(x_1) = \dot{x_1^T} x_1 + x_1^T \dot{x_1}\]

since \(||x_1||\) is scaler, the transpose of \(x_1 \dot{x_1}\) is equal to the transpose of \(\dot{x_1} x_1\), therefore we have:

\[\dot{V(x_1)} = \dot{x_1^T} x_1 + x_1^T \dot{x_1}= 2 x_1^T \dot{x_1}= 2 x_1^T (-2Qx_1) = -4x_1^TQx_1\]
  1. positive definite: \(V(x) = x^Tx = ||x||^2 > 0\) for all \(x \neq 0\), and \(V(0) = 0\)
  2. radially unbounded: \(V(x) \to \infty\) as \(||x|| \to \infty\)
  3. negative definite: \(\dot{V}(x) = -4x^TQx < 0\) for all \(x \neq 0\), and \(\dot{V}(0) = 0\)

Therefore, we have shown that \(V(x)\) is a Lyapunov function and UGAS at flow

the system is contracting during flow. Therefore, after one flow phase: \(V(x_1(1^-)) = ||x_1||^2 \leq e^{-4\lambda_\text{min}} ||x_1(0)||^2\) where \(\lambda_\text{min}\) is the minimum eigenvalue of Q.

definition of \(\lambda_\text{min}\)

suppose the matrix Q is given by:

\[Q = \begin{bmatrix} q_{11} & q_{12} \\ q_{21} & q_{22} \end{bmatrix}\]

since it is positive definite, we have \(q_{11} > 0\), \(q_{22} > 0\), and \(q_{11}q_{22} - q_{12}^2 > 0\), and \(q_{12} = q_{21}\)

then the eigenvalues of Q are given by:

\[(q_{11} -\lambda)(q_{22} - \lambda) - q_{12}q_{21} = 0 \\ \lambda^2 - (q_{11} + q_{22})\lambda + (q_{11}q_{22} - q_{12}^2) = 0 \\ \lambda = \frac{(q_{11} + q_{22}) \pm \sqrt{(q_{11} + q_{22})^2 - 4(q_{11}q_{22} - q_{12}^2)}}{2}\]

since all values are positive, the \(\lambda_\text{min}\) is

\[\lambda_\text{min} = \frac{(q_{11} + q_{22}) - \sqrt{(q_{11} + q_{22})^2 - 4(q_{11}q_{22} - q_{12}^2)}}{2}\]

show it is UGAS at jump:

since the jump is random. when v = 1.5, then \(V(x_1^+) = ||vx_1^-||^2 = 1.5^2 V(x_1^-) = 2.25 V(x_1^-) > V(x_1^-)\), therefore the system does not contract and is not UGAS. when v = 0.5, then \(V(x_1^+) = ||vx_1^-||^2 = 0.5^2 V(x_1^-) = 0.25 V(x_1^-) < V(x_1^-)\), therefore the system contracts and is UGAS.

so we need to compute the average value of V after the jump, which is given by:

\[E[V(x_1^+)] = pV(1.5x_1^-) + (1-p)V(0.5x_1^-) = p(2.25V(x_1^-)) + (1-p)(0.25V(x_1^-)) \\ = (2.25p + 0.25 - 0.25p)V(x_1^-) = (2p + 0.25)V(x_1^-)\]

to ensure the system is strict UGASp, needs to have \(E[V(x_1^+)] < V(x_1^-)\), which is equivalent to \(2p + 0.25 < 1\), which is equivalent to \(p < 0.375\)

if we want the system to be UGASp, we want the entire cycle to be contracting

\[E[V(x_1^+)] = (2p + 0.25)V(x_1^-) = (2p + 0.25) e^{-4\lambda_{min}}V(x_1(0)) < V(x_1(0))\]

This inequality is satisfied if and only if:

\[p < \frac{\frac{1}{e^{-4\lambda_\text{min}}} - 0.25}{2} = \frac{e^{4\lambda_\text{min}} - 0.25}{2}\]

in part 1, we have the matrix Q = [[0.3, 0.3], [0.3, 0.4]], it yields the minimum eigenvalue \(\lambda_\text{min} \approx 0.046\). Therefore, we have \(p < \frac{e^{4*0.046} - 0.25}{2} \approx 0.476\)

therefore, if the p is less than 0.476, the system contracts during the entire cycle and therefore UGASp. if the p is greater than 0.476, we cannot conclude stability of the system.

Therefore, a sufficient condition for the system to render 𝒜 × [0,1] UGASp is p < 0.476.

1772672271745

Problem 2

1772656571289

Let the Lyapunov function be \(V(x) = \frac{1}{\frac{\sigma x_2}{T} + 1}x_1^T P_q x_1\)

This function is

  1. positive definite: since the matrix \(P_q\) is positive definite, \(x_1^T x_1\) is positive or zero. since the range of \(x_2\) is [0, T], and \(\sigma > 0\), all the terms on the right handside are positive. when \(x_1 = 0\), \(V(x) = 0\), and when \(x_1 \neq 0\), \(V(x) > 0\). therefore, \(V(x)\) is positive definite.
  2. radially unbounded: similarly to problem 1, define \(\lambda_\text{min}\) as the minimum eigenvalue of \(P_q\), we have \(x_1^T P_q x_1 \geq \lambda_\text{min} ||x_1||^2\). As \(||x_1|| \to \infty\), \(||x_1||^2 \to \infty\), therefore \(x_1^T P_q x_1 \to \infty\). since \(\frac{1}{\frac{\sigma x_2}{T} + 1}\) is positive and bounded, we have \(V(x) \to \infty\) as \(||x_1|| \to \infty\). therefore, \(V(x)\) is radially unbounded.
  3. negative semi-definite:

prove for flow:

define \(f(x_2)\) and \(g(x_1)\) as the two terms in the product:

\[V(x) = \underbrace{\frac{1}{\frac{\sigma x_2}{T} + 1}}_{f(x_2)} \cdot \underbrace{x_1^\top P_q x_1}_{g(x_1)}\]
\[\dot{V} = \dot{f}(x_2) \cdot g(x_1) + f(x_2) \cdot \dot{g}(x_1)\]

Differentiate \(f(x_2)\)

Write \(f(x_2) = \left(\frac{\sigma x_2}{T} + 1\right)^{-1}\), then apply the chain rule:

\[\dot{f} = -1 \cdot \left(\frac{\sigma x_2}{T} + 1\right)^{-2} \cdot \frac{d}{dt}\left(\frac{\sigma x_2}{T} + 1\right)\]
\[\frac{d}{dt}\left(\frac{\sigma x_2}{T} + 1\right) = \frac{\sigma}{T} \dot{x}_2\]

So:

\[\dot{f} = \frac{-\sigma \dot{x}_2}{T\left(\frac{\sigma x_2}{T} + 1\right)^2}\]

Differentiate \(g(x_1)\)

\[\dot{g} = \dot{x}_1^\top P_q x_1 + x_1^\top P_q \dot{x}_1\]

Since \(\dot{x}_1 = A_q x_1\), we have:

\[\dot{g} = (A_q x_1)^\top P_q x_1 + x_1^\top P_q (A_q x_1) \\ = x_1^\top A_q^\top P_q x_1 + x_1^\top P_q A_q x_1 \\ = x_1^\top \left(A_q^\top P_q + P_q A_q\right) x_1\]

Combine:

\[\dot{V} = \frac{-\sigma \dot{x}_2}{T\left(\frac{\sigma x_2}{T}+1\right)^2} \cdot x_1^\top P_q x_1 \;+\; \frac{1}{\frac{\sigma x_2}{T}+1} \cdot x_1^\top(A_q^\top P_q + P_q A_q) x_1 \\ = \frac{1}{\frac{\sigma x_2}{T}+1} x_1^\top (\frac{-\sigma \dot{x_2}}{T\left(\frac{\sigma x_2}{T}+1\right)} P_q + (A_q^\top P_q + P_q A_q)) x_1\]

since \(x_2 \in [0, T]\), the part \(\frac{1}{\frac{\sigma x_2}{T}+1}\) is positive and bounded.

since \(\dot{x_2} \in [-\eta, 0]\), to prove the flow is stable, we want to show that the change in V is negative, this is dependent on the term \((\frac{-\sigma \dot{x_2}}{T\left(\frac{\sigma x_2}{T}+1\right)} + (A_q^\top P_q + P_q A_q))\). In the worst case, \(\dot{x_2} = -\eta\), and this term will reach maximum value of \(\frac{\sigma \eta}{T\left(\frac{\sigma x_2}{T}+1\right)} + (A_q^\top P_q + P_q A_q)\).

since \(x_2 \in [0, T]\), in the worst case when the term is maximized, the term \(x_2\) is 0, therefore the term will be \(\frac{\sigma \eta}{T} + (A_q^\top P_q + P_q A_q)\)

by conditions 3a, this term is negative definite. therefore, \(\dot{V}\) is negative definite, and the system is stable during flow.


prove for jump:

we want to show that the \(V(x^+) < V(x^-)\)

From the definition of V(x), \(x^-\) is when \(x_2 = 0\). therefore, we have:

\[V(x^-) = \frac{1}{\frac{\sigma x_2}{T} + 1}x_1^T P_q x_1 = x_1^T P_q x_1\]

after the jump, we have \(x^+ = (x_1, v_1, v_2)\), therefore we have:

\[V(x^+) = \frac{1}{\frac{\sigma v_1}{T} + 1}x_1^T P_{v_2} x_1\]

The expectation of the V is given by:

\[E[V(x^+)] = E [\frac{1}{\frac{\sigma v_1}{T} + 1}] \cdot E[x_1^T P_{v_2} x_1]\]

first term

since \(v_1\) is a random variable with uniform distribution over [0, T], we have:

\[E [\frac{1}{\frac{\sigma v_1}{T} + 1}] = \int_0^T \frac{1}{\frac{\sigma v_1}{T} + 1} \cdot \frac{1}{T} dv_1 = \int_0^T \frac{1}{\sigma v_1 + T} dv_1 \\= \frac{1}{\sigma} \ln(\sigma v_1 + T) \Big|_0^T \\= \frac{1}{\sigma} (\ln(T(\sigma + 1)) - \ln(T)) \\ = \frac{1}{\sigma} \ln(\sigma + 1)\]

second term

the term \(P_{v_2}\) means the probability of the matrix when \(q = v_2\). since \(v_2\) is a random variable, the expectation of \(P_{v_2}\) is given by:

\[E[P_{v_2}] = \sum_{q \in \mathcal{Q}} P(v_2 = q) P_q \\ = \sum_{q \in \mathcal{Q}} \lambda_q P_q = P\]

therefore, we have:

\[E[x_1^T P_{v_2} x_1] = x_1^T E[P_{v_2}] x_1 = x_1^T P x_1\]

combine:

\[E[V(x^+)] = E [\frac{1}{\frac{\sigma v_1}{T} + 1}] \cdot E[x_1^T P_{v_2} x_1] = \frac{1}{\sigma} \ln(\sigma + 1) \cdot x_1^T P x_1\]

from 3b, we have:

\[\frac{1}{\sigma} \ln(\sigma + 1) P - P_q \prec 0 \\ \frac{1}{\sigma} \ln(\sigma + 1) P \prec P_q\]

therefore, we have:

\[E[V(x^+)] = \frac{1}{\sigma} \ln(\sigma + 1) \cdot x_1^T P x_1 \prec x_1^T P_q x_1 = V(x^-)\]

therefore, the system is contracting during jump.

since Lyapunov function is positive definite, radially unbounded, and the negative definite during the flow, and \(E[V(x^+)] < V(x^-)\) during jump, we have shown that the system is UGASp at the set \(\mathcal{A} \times [0, T] \times \mathcal{Q}\).

change \(A_q\):

1772694487171

change \(T\):

1772694759270

change \(\eta\):

1772694847931