\section{Affine Uncertainty}

\label{sec:affine}

Many dynamical systems exhibit a input-affine or parameter-affine structure:

\begin{equation}
\label{eq:affine_base}
    \dot{x} = f(t,x,w) = f_0(t,x,w) + \sum_{w=1}^{N_w} w_k f_k(t,x,w)
\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 where there are no moment constraints $h(w)$, the affine structure may drastically simplify computation.

\cite{majumdar2014convex, korda2014controller}



\subsection{Polytopic Uncertainty}
\label{sec:polytopic}

Polytopic uncertainty is an instance of time-varying uncertainty where all $w_i \geq 0$ and $\sum_i w_i = 1$. The dynamics from equation \eqref{eq:affine_base} may be divided into:
\begin{equation}
\label{sec:poly_split}
    \sum_{w=1}^{N_w} w_k (f_0(t,x,w) + f_k(t,x,w) ) = \sum_{w=1}^{N_w} w_k \tilde{f}_k(t,x,w)
\end{equation}
for merged dynamics $\tilde{f}_k(t,x,w)$ on each parameter $w_k$. Dynamics in $f$ at every point in time are convex combinations of $\tilde{f}_k(t,x,w)$. Mixed dynamics may be realized as a system switching arbitrarily fast between base dynamics $\tilde{f}_k(t,x,w)$. 

A polytopic-uncertain system can be certified as stable if all components $\tilde{f}_k(t,x,w)$ have a common Lyapunov function \cite{parrilo2008approximation, vlassis2014polytopic}. In the same manner, the Function problem of peak estimation may be adapted to polytopic uncertainty by ensuring that the value function $v(t,x)$ satisfies:
\begin{equation}
    \Lie_{\tilde{f}_k} v(t, x) \geq 0 \quad \forall (t, x) \in [0, T] \times X, \ k=1\ldots N_w \label{eq:peak_cont_f_poly}
\end{equation}
Constraint \eqref{eq:peak_cont_f_poly} replaces constraint \eqref{eq:peak_cont_f} and constraint \eqref{eq:peak_cont_w_f}. The occupation measure $\mu$ and adjoint Lie derivative of constraint \eqref{eq:peak_meas_flow} can be decomposed into:
\begin{equation}
    \mu = \sum_k \mu_k \qquad \Lie^\dagger \mu = \sum_k \Lie^\dagger_{\tilde{f}_k} \mu_k
\end{equation}



The moments $\inp{t}{\mu_k}$ are the expected amount of time that trajectories spend following dynamics $\tilde{f}_k$. The switching sequence $w^*(t)$ connecting the optimal $x_0^* \rightarrow x_p^*$ is not immediately available from the truncated moments of all $\mu_k$, and requires postprocessing by the methods \cite{marx2019tractable} to recover.


Using the approach in \eqref{eq:peak_cont_w} results in one occupation measure $\mu$ with $n + N_w$ variables. With polytopic uncertainty, the $N_w$ occupation measures $\mu_k \in \Mp{[0, T] \times X}$ each have $n$ variables and do not involve $w$. The complexity of the moment-SOS hierarchy scales polynomially on the number of states and linearly on the number of measures, so depending on the degree $d$ it may be favorable to solve peak estimation in switched or polytopic form.



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

Box uncertainty is a case where each time-varying $w_k \in [w_k^{min}, w_k^{max}]$ with no other constraints on $w$. With a proper scaling of dynamics, all $w$ can be constrained to the region $w_k \in [0,1]$. The methods in \cite{majumdar2014convex, korda2014controller} introduce parameter-measures $\{\sigma_k \in \Mp{[0,T] \times X} \}_{k=1}^{N_w}$ such that  for all subsets $A \times B \in [0, T] \times X$.
\begin{equation}
    \int_{A\times B} w_k(t) d \mu(t,x) = \int_{A \times B} d \sigma(t,x)
\end{equation}
The peak estimation with box uncertainty in $[0, 1]^{N_w}$ is:
\begin{subequations}
\label{eq:peak_meas_box}
\begin{align}
p^* = & \ \textrm{max} \quad \inp{p(x)}{\mu_p} & \label{eq:peak_meas_box_obj} \\
    & \mu_p = \delta_0 \otimes\mu_0 + \Lie_{f_0}^\dagger \mu + \sum_{k = 1}^{N_w} \Lie_{f_k}^\dagger \sigma_k & \label{eq:peak_meas_box_flow}\\
    & \mu_0(X_0) = 1 & \label{eq:peak_meas_box_prob}\\
    & \sigma_k + \hat{\sigma}_k = \mu &\forall k = 1 \ldots N_w \label{eq:peak_meas_box_cont}\\
    & \sigma_{k}, \ \hat{\sigma}_k \in \Mp{[0, T] \times X} &\forall k = 1 \ldots N_w\\
    & \mu, \mu_p \in \Mp{[0, T] \times X}&\\
    & \mu_0 \in \Mp{X_0}& \label{eq:peak_meas_box_init}
\end{align}
\end{subequations}
Constraint \eqref{eq:peak_meas_box_flow} splits up dynamics in \eqref{eq:peak_meas_w_flow} across $\sigma_k$. Absolute continuity of $\sigma_k$ with respect to $\mu$ is enforced by constraint \eqref{eq:peak_meas_box_cont}. The dual program of \eqref{eq:peak_meas_box} is:
\begin{subequations}
\label{eq:peak_cont_box}
\begin{align}
    d^* = & \ \min_{\gamma \in \R} \quad \gamma & \\
    & v(0, x) + \gamma \geq 0  &  \forall x \in X_0 \label{eq:peak_cont_init_box}\\
    & \Lie_{f_0} v(t, x) \geq \sum_{k=1}^{N_w}\zeta_k(t,x)  & \forall (t, x) \in [0, T] \times X \label{eq:peak_cont_f_box}\\
    & \Lie_{f_k} v(t, x) + \zeta_k(t,x) \geq 0  & \forall (t, x) \in [0, T] \times X \label{eq:peak_cont_f_box}\\
    & v(t, x) + p(x) \leq 0 & \forall (t, x) \in [0, T] \times X \label{eq:peak_cont_p_box} \\
    & v \in C^1([0, T] \times X) & \\
    & \zeta_k \in C_+([0, T] \times X) & \forall k = 1 \ldots N_w
\end{align}
\end{subequations}

% The nonnegative functions  $\zeta_k$

    % & \Lie_{f_0} v(t, x) - \sum_{k=1}^{N_w}\zeta_k(t,x) \geq 0 & \forall (t, x) \in [0, T] \times X 
    % & \Lie_{f_k} v(t, x) + \zeta_k(t,x) \geq 0 & \forall k = 1 \ldots N_w, \ (t, x) \in [0, T] \times X \label{eq:peak_cont_f_box}\\
    % \zeta_k(t,x) \geq 0 & \forall k = 1 \ldots N_w, \ (t, x) \in [0, T] \times X \label{eq:peak_cont_f_box}\\
    % & v(t, x) + p(x) \leq 0 & \forall (t, x) \in [0, T] \times X \label{eq:peak_cont_p_box} \\
    % & v \in C^1([0, T] \times X) & \\
    % & \zeta_k \in C([0, T] \times X) & \forall k = 1 \ldots N_w\\

A system with $N_w$ parameters with box uncertainty from Section \eqref{sec:box} may be expressed as an instance of polytopic uncertainty with $2^{N_w}$ subsystems. Each subsystem is comprised of dynamics $\dot{x} = f_w(t,x)= f(t, x, w)$ where $w$ is fixed to a vertex of the box $W = \prod_{\ell=1}^{N_w} [0, \bar{w}_\ell]$. Since the number of subsystems (and measures) scale exponentially in $N_w$,  posing boxed uncertainty according to Section \eqref{sec:box} is generally more tractable than solving as a per-vertex switched system.
