\section{Uncertainty Models}
\label{sec:uncertainty}
This section summarizes techniques for incorporating uncertainty into occupation-measure based frameworks, and briefly notes their application to peak estimation. The methods mentioned here arose from optimal control and the approximation of reachability sets. The two basic types of uncertainty are time-independent ($\theta \in \Theta$) and time-dependent ($w \in W$). It is assumed that $\Theta$ and $W$ are compact basic semialgebraic sets, just like $X$ and $X_0$. 

\subsection{Time-Independent Uncertainty}
% $w, d$
\label{sec:time_indep}
Time-independent uncertainty $\theta_\ell$ for $\ell = 1 \ldots N_\theta$ may take values in a set $\Theta \subseteq \R^{N_\theta}$, and typically arises in systems with parameter tolerances. 
% As an example, the mass in a spring-mass system may be known within 5\% but does not change once the system starts moving. 
The time-independent $\theta$ may start at any value in $\Theta \subset \R^{N_\theta}$ and is then constant along trajectories. By the methods in \cite{lasserre2008nonlinear, henrion2012measures}, the state space may be extended into $X \times \Theta$ by adding new states $\theta$ with constant dynamics $\dot{\theta}_\ell = \Lie_f \theta_\ell = 0$ for each $\ell = 1 \ldots N_\theta$. 

% This goes later
% The measures in \eqref{eq:peak_meas} may be augmented to include $W$, such that $\mu_0 \in \Mp{X_0 \times W}$ and $\mu, \ \mu_p \in \Mp{[0, T] \times X \times W}$ for parameters $w \in W$.
% The Function program in \eqref{eq:peak_cont} will likewise have a polynomial with arguments $v(t,x,w)$, and the nonnegativity constraints are imposed on the region $X_0 \times W$ and $[0, T] \times X \times W$. 




\subsection{Time-Dependent Uncertainty}
\label{sec:time_dep}
Systems with time-dependent uncertainty may have the noise process $w(t)$ change arbitrarily quickly in $W$ over time $t$. Such bounded time-varying noise may be found in driving or piloting tasks with changing winds. 
The disturbance $w(t)$ is a Borel measurable function of time rather than the It\^o-type stochastic process  considered in \cite{helmes2001exittime}.
% [todo: disturbance occupation measure]
% External controls or disturbances can be added into an occupation measure framework. 
% For an input $w(t) \in W$ and a subset $D \subseteq W$, the disturbance-occupation measure $\mu^w$ is:
% \begin{align}
%     \label{eq:occ_measure_d}
%     &\mu^w(A \times B \times D) = \\
%     &\quad \int_{[0, T] \times X_0} I_{A \times B \times D}((t, x(t), w(t)) \mid x_0) dt d \mu_0(x_0). \nonumber
% \end{align}
For an input $w(t) \in W$ and a subset $D \subseteq W$, the disturbance-occupation measure $\mu^w(A \times B \times D)$ is,
\begin{align}
    \label{eq:occ_measure_d}
    \int_{[0, T] \times X_0} I_{A \times B \times D}((t, x(t), w(t)) \mid x_0) dt \, d \mu_0(x_0). 
\end{align}
The disturbance $w(t)$ may be relaxed into a distribution $\omega(w \mid x, t)$, which is known as a Young Measure \cite{young1942generalized, lewis1980relaxation}.
The disturbance-occupation measure $\mu^w$ can be disentangled into $d\mu^w(t, x, w) = dt \, d\xi(x \mid t) \, d\omega(w \mid x, t)$ for conditional distributions $\xi, \omega$.
Liouville's equation with a relaxed disturbance $\omega(w \mid x, t)$ influencing dynamics $f(t, x, w)$ for all $v(t, x) \in C^1([0, T]\times X)$ is,
\begin{subequations}
\begin{align}
\label{eq:liou_d}
\inp{v(t, x)}{\mu_p} &= \inp{v(0, x)}{\mu_0} + \inp{\Lie_f v(t, x)}{\mu^w}. \end{align}
Equivalent expressions are formed by rearranging operators,
\begin{align}
\inp{v}{\mu_p} &= \inp{v}{\delta_0 \otimes \mu_0} + \inp{\Lie_f v}{\mu^w} & & \forall v \\
\inp{v}{\mu_p} &= \inp{v}{\delta_0 \otimes \mu_0} + \inp{v}{\Lie_f^\dagger \mu^w}&  & \forall v \label{eq:weak_before_sum}\\
\inp{v}{\mu_p} &= \inp{v}{\delta_0 \otimes \mu_0 + \pi^{tx}_\#\Lie_f^\dagger \mu^w} & & \forall v.\label{eq:weak_after_sum}
\end{align}
\end{subequations}

The measures of the two summands on the right hand side of \eqref{eq:weak_before_sum} reside in different spaces, as $\delta_0 \otimes \mu_0 \in \Mp{[0, T] \times X}$ while $\Lie_f^\dagger \mu^w \in \Mp{[0, T] \times X \times W}$. The $(t,x)$-marginalization $\pi^{tx}_\# \Lie^\dagger_f \mu^w \in \Mp{[0, T] \times X}$ allows the measures to be added together inside the duality pairing in \eqref{eq:weak_after_sum}. The duality pairings $\inp{v(t,x)}{\Lie^\dagger_f \mu^w}$ and $\inp{v(t,x)}{\pi^{tx}_\#\Lie^\dagger_f \mu^w}$ are equal for all $v \in C^1([0, T] \times X)$
because $v(t,x)$ is not a function of $w$. The weak disturbed Liouville's Equation is derived from \eqref{eq:weak_after_sum}  by treating  $\forall v(t, x) \in C^1([0, T]\times X)$ as implicit,
\begin{equation}
\label{eq:liou_disturb_weak}
    \mu_p = \delta_0 \otimes \mu_0 + \pi^{tx}_\# \Lie^\dagger_f \mu^w.
\end{equation}



Time-varying disturbances may be incorporated into peak estimation by letting $\mu \in \Mp{[0, T] \times X \times W}$ be a disturbance-occupation measure of the form in \eqref{eq:occ_measure_d} obeying a disturbed Liouville equation \eqref{eq:liou_disturb_weak}. The support sets  of the measures $\mu_0 \in \Mp{X_0}, \ \mu_p \in \Mp{[0, T] \times X}$ are unchanged when time-dependent uncertainty is added.

% \urg{Thinking of cutting this content, and adding it in conclusion/future work or an extensions section. Would require rewriting my sampling code}
% Properties of the disturbance $d(t)$ may be specified by moment constraints on the disturbance-occupation measure $\mu$.
% For any polynomial $h(d) \in \R[d]$, the integral quantity $\int_{t=0}^T h(d(t)) dt$ may be reformulated as $\inp{h(d)}{\mu}$. 
% % Constraints on instantaneous values of the noise process are contained in the support $h$, and accumulated information of the process from times $[0, T]$ can be read from the moments of $\mu^w$. 
% As an example, the $L_2$-norm of the process $d(t)$ may be set to a value $e$ by imposing that $\norm{d(t)}_2^2 = \inp{\norm{d}_2^2}{\mu} = e^2$.



% along system trajectories is $\norm{d(t)}_2 = \sqrt{\inp{\norm{d}_2^2}{\mu}}$. The disturbance process may be constrained to have unit $L_2$ norm by imposing the moment constraint $\inp{\norm{d}_2^2}{\mu} = 1$. 
% $L_p$ norms with rational $p > 1$ can be handled with liftings to higher powers \cite{alizadeh2003second}.