\subsection{Switching Uncertainty}

\label{sec:affine}

Many dynamical systems exhibit an affine structure in terms of the disturbance $d \in \Delta$:
\begin{equation}
\label{eq:affine_base}
    \dot{x} = f(t,x,d) = f_0(t,x,d) + \sum_{k=1}^{N_d} d_k(t) f_k(t,x,d)
\end{equation}
% Peak estimation of input-affine systems with time-varying uncertainty may proceed through the methods of Problem \eqref{eq:peak_meas_w} and \eqref{eq:peak_cont_w}. 
% In some specific cases the affine structure may be used to simplify computation
% \cite{majumdar2014convex, korda2014controller}.
% \subsubsection{Polytopic Uncertainty}
% \label{sec:polytopic}

Polytopic uncertainty is an instance of time-varying uncertainty where all $d_i(t) \geq 0$ and $\sum_i d_i(t) = 1$. The dynamics from \eqref{eq:affine_base} may be divided into:
\begin{equation}
\label{sec:poly_split}
    \sum_{k=1}^{N_d} d_k(t) (f_0(t,x,d) + f_k(t,x,d) ) = \sum_{w=1}^{N_w} d_k(t) \tilde{f}_k(t,x,d)
\end{equation}
for merged dynamics $\tilde{f}_k(t,x,w)$ on each parameter $w_k$. Dynamics in $f$ are convex combinations of $\tilde{f}_k(t,x,d)$. Mixed dynamics may be realized as a system switching arbitrarily quickly between base dynamics $\tilde{f}_k(t,x,d)$. The occupation measure $\mu \in \Mp{[0, T]\times X}$ and adjoint Lie derivative of constraint \eqref{eq:peak_meas_flow} can be decomposed \cite{henrion2012measures},
\begin{equation}
\label{eq:occ_poly}
    \mu = \textstyle\sum_k \mu_k \qquad \Lie^\dagger \mu = \textstyle\sum_k \Lie^\dagger_{\tilde{f}_k} \mu_k
\end{equation}
A valid auxiliary function $v(t,x)$ from \eqref{eq:peak_cont_f} must decrease along all subsystems \cite{parrilo2008approximation, vlassis2014polytopic}.
\begin{equation}
    \Lie_{\tilde{f}_k} v(t, x) \leq 0 \quad \forall (t, x) \in [0, T] \times X, \ k=1\ldots N_d \label{eq:peak_cont_f_poly}
\end{equation}
The moments $\inp{1}{\mu_k}$ are the expected amount of time that trajectories spend following dynamics $\tilde{f}_k$. 


\label{sec:switching}
Switching uncertainty is a generalization of polytopic uncertainty.
Let $\{X^k\}_{k=1}^{N_s}$ be a closed cover of $X$ for $k=1\ldots N_s$, which is a set of not necessarily disjoint closed subsets $X^k \subseteq X$ such that $\cup_k X^k = X$. Further, let $\dot{x} = \tilde{f}_k(t,x)$ be dynamics that evolve on each $X_k$. 
The closed cover formalism generalizes partitions of $X$ where $X^k \cap X^{k'} = \varnothing \ \forall k \neq k'$ and arbitrary switching where $X^k = X \ \forall k$. The switched measure program introduces an occupation measure $\mu_k \in \Mp{[0, T] \times X^k}$ for each subsystem $\tilde{f}_k$ subject to \eqref{eq:occ_poly}. The nonnegativity condition \eqref{eq:peak_cont_f_poly} in $v(t,x)$ is restricted to each region $[0, T] \times X_k$
\begin{equation}
    \Lie_{\tilde{f}_k} v(t, x) \leq 0 \quad \forall (t, x) \in [0, T] \times X_k, \ k=1\ldots N_d \label{eq:peak_cont_f_switch}
\end{equation}

% \subsubsection{Box Uncertainty}
% \label{sec:box}
% % All parameters are in a box

% Box uncertainty is a case where the region $\Delta$ is a box, and there are no other constraints on $d(t)$. With a proper scaling of dynamics, all $d$ can be constrained to the region $d_k(t) \in [0,1]$. The methods in \cite{korda2014controller, majumdar2014convex} introduce box-measures $\{\sigma_k \in \Mp{[0,T] \times X} \}_{k=1}^{N_d}$ such that for all subsets $A \times B \in [0, T] \times X$.
% \begin{equation}
%     \int_{A\times B} d_k(t) d \mu = \int_{A \times B} d \sigma
% \end{equation}

% Each measure $\sigma_k$ is absolutely continuous with respect to the occupation measure $\mu$ $(\sigma(A \times B) \leq \mu(A \times B), \ \forall A \in [0, T], \ \forall B \in X$. It therefore holds that there exists a nonnegative measure $\hat{\sigma}_k \in \Mp{[0, T] \times X}$ such that $\sigma_k + \hat{\sigma}_k = \mu$ for each $k$.

% % By the Jordan decomposition there exists nonnegative complement measures $\hat{\sigma}_k \in \Mp{[0,T] \times X}$ such that $\sigma_k + \hat{\sigma}_k = \mu$ for each $k = 1, \ldots, N_d$. 

% The Liouville equation \eqref{eq:liou_d} may be expressed in terms of $\sigma$ for all test functions $v (t, x) \in C^1([0, T] \times X)$ as
% \begin{equation}
%     \inp{v(t, x)} {\mu_p} = \inp{v(0, x)}{\mu_0} + \inp{\Lie_{f_0}  v(t, x)}{\mu} + + \textstyle\sum_{k = 1}^{N_w} \inp{f_k \cdot \nabla_x v (t,x)}{ \sigma_k}
% \end{equation}
% \begin{equation}
% \label{eq:liou_control}
%   \mu_p = \delta_0 \otimes\mu_0 + \Lie_{f_0}^\dagger \mu + \textstyle\sum_{k = 1}^{N_w} (f_k \cdot \nabla_x)^\dagger \sigma_k
% \end{equation}


