\subsection{Due: 02/29}

\subsubsection{Problem 1}

Show that if all eigenvalues of a matrix \(A\) have real parts
\emph{strictly less} than some \(-\mu<0\), then for every \(Q=Q^T>0\)
the equation \[
PA+A^TP+2\mu P=-Q
\] has a unique solution \(P=P^T>0\). Show that in this case we have
\[|x(t)|\le ce^{-\mu t}|x(0)|\] for some \(c>0\). The number \(\mu\) is
called a \emph{stability margin}.

\subsubsection{Problem 2}

In class we are focusing on continuous-time systems, but we will
occasionally mention discrete-time systems in the exercises. The two
cases are usually quite similar but there are some notable differences.

\begin{enumerate}
\def\labelenumi{\alph{enumi}.}
\item
  Write the formula for the solution \(x(k)\) at time \(k\) of the
  discrete-time control system \(x(k+1)=Ax(k)+Bu(k)\) starting from some
  initial state \(x(0)\) at time 0.\\
  \textbf{Hint:} Your answer will be the discrete counterpart of the
  variation-of-constants formula.
\item
  Under what conditions on the eigenvalues of \(A\) is the discrete-time
  system \(x(k+1)=Ax(k)\) with no controls asymptotically stable?
  stable? Justify your answers. Stability definitions are the same as
  for continuous-time systems, just replace \(t\) by \(k\).\\
  \textbf{Hint:} Same as for continuous-time case, consider diagonal and
  Jordan blocks.
\item
  Lyapunov's second method for the discrete-time system
  \(x(k+1)=f(x(k))\) involves the difference
  \[{\Delta} V(x):=V(f(x))-V(x)\] instead of the derivative
  \(\dot V(x)\); with this substitution, the statement is the same as in
  the continuous-time case.\\
  Derive the counterpart of the Lyapunov equation for the LTI
  discrete-time system \(x(k+1)=Ax(k)\).
\end{enumerate}

\subsubsection{Problem 3}

Lyapunov's second method (for asymptotic stability) generalizes to
time-varying systems \(\dot x=f(t,x)\) as follows.

Let \(V(t,x)\) be a function such that for some positive definite
functions \(W_1(x)\), \(W_2(x)\), and \(W_3(x)\) we have

\[W_1(x)\le V(t,x)\le W_2(x)\] and \[ \dot
V(t,x):=\frac{\partial V}{\partial t}(t,x)+\frac{\partial V}{\partial
x}(t,x)\cdot f(t,x)\le -W_3(x) 
\] \{\#eq-Vdott\} for all \(t\) and \(x\). Then the system is
asymptotically stable (globally if \(W_1\) is radially unbounded).

Now, consider an LTV system \(\dot x=A(t)x\), and let \(V\) be of the
form \(V(t,x)=x^TP(t)x\).

Derive the time-varying analogue of the Lyapunov equation, in other
words, derive an equation that \(P(t)\) needs to satisfy to guarantee
asymptotic stability.

Carefully specify all required properties of the quantities appearing in
your equation so that the above stability result, based on @eq-Vdott, is
applicable.

\subsubsection{Problem 4}

Let \(x_1,x_2,x_3\) be positions of thre moving points on the real line
- let's call them ``agents''.

For each agent \(i\), let \(N_i\) denote the set of all other agents
that agent \(i\) can ``see'' (meaning it can measure their positions),
and consider the \textbf{\emph{consensus equations}}:

\[
\dot x_i=-\sum\nolimits_{j\in N_i}(x_i-x_j),\qquad i=1,2,3
\]

Assume initially that all agents see each other, so that

\[N_1=\{2,3\},\qquad  N_2=\{1,3\}, \qquad  N_3=\{1,2\}\]

Define the following \(3\times 3\) matrices:

\begin{itemize}
\tightlist
\item
  the \textbf{degree matrix} \(D\) is the diagonal matrix with diagonal
  elements \(D_{ii}\) equal to the number of agents in \(N_i\)
\item
  the \textbf{adjacency matrix} \(J\) has elements \(J_{ij}=1\) if
  agents \(i\) and \(j\) see each other, and 0 if they don't (by
  assumption, \(J\) is symmetric and its diagonal elements are 0)
\item
  the \textbf{Laplacian matrix} \(L:=D-J\).
\end{itemize}

\subparagraph{Part 1}

\begin{enumerate}
\def\labelenumi{\alph{enumi}.}
\tightlist
\item
  Write down the consensus equations as an LTI system \(\dot x = Ax\).
\item
  Verify that the matrix \(A\) in part a) equals \(-L\).
\item
  Is it true that system equilibria are exactly points in
  \(\mathbb{R}^3\) with \(x_1=x_2=x_3\) (agents' positions coincide)?
\item
  Are the system equilibria stable? Asymptotically stable?
\end{enumerate}

\subparagraph{Part 2}

Now assume that agents 2 and 3 don't see each other. Answer questions
a)--d) for this case.

\subparagraph{Part 3}

Now assume that agent 3 doesn't see agents 1 and 2 and is not seen by
them. Answer a)--d) again.
