\subsection{Peak Estimation}
\label{sec:peak}
% The peak estimation problem aims to solve:
% The peak estimation problem in \cite{miller2020peak} solves \eqref{eq:peak_traj} without the presence of a disturbance $w$.

Peak estimation programs without uncertainty in a compact space $X \subset \R^n$ may be upper bounded as infinite-dimensional LPs in occupation measures \cite{cho2002linear}, 
% These infinite dimensional programs have been approximated by discretizing the state space into finite-dimensional LPs \cite{cho2002linear}, or by using the Moment-SOS hierarchy with a set of LMIs in combinatorially increasing size \cite{fantuzzi2020bounding}. 
% It is assumed that the state sets $X$ and $X_0$ are compact basic semialgebraic sets \cite{lasserre2009moments} to assure convergence in increasing degree of the Moment-SOS hierarchy to an accumulation point.
% The measure program for peak estimation from \cite{cho2002linear} is,
\begin{subequations}
\label{eq:peak_meas}
\begin{align}
p^* = & \ \textrm{max} \quad \inp{p(x)}{\mu_p} \label{eq:peak_meas_obj} \\
    & \mu_p = \delta_0 \otimes\mu_0 + \Lie_f^\dagger \mu \label{eq:peak_meas_flow}\\
    & \mu_0(X) = 1 \label{eq:peak_meas_prob}\\
    & \mu, \mu_p \in \Mp{[0, T] \times X} \label{eq:peak_meas_peak}\\
    & \mu_0 \in \Mp{X_0}. \label{eq:peak_meas_init}
\end{align}
\end{subequations}
The peak probability measure $\mu_p$ is a free-time terminal measure with a similar form to \eqref{eq:occ_terminal}, where the time-stopping can occur anywhere between $t \in [0, T]$ in order to extremize $p(x)$.
The occupation measure $\mu$ connects $\mu_0$ and $\mu_p$ by Liouville's equation \eqref{eq:peak_meas_flow}, and one consequence is that $\inp{1}{\mu} = \inp{t}{\mu_p}$ with $v(t,x) = t$. 
The dual problem to the measure program \eqref{eq:peak_meas} is posed over continuous functions, 
\begin{subequations}
\label{eq:peak_cont}
\begin{align}
    d^* = & \ \min_{\gamma \in \R} \quad \gamma & \\
    & \forall x \in X_0: \nonumber \\
    & \quad {\gamma} \geq {v(0, x)}   \label{eq:peak_cont_init}\\
    & \forall (t, x) \in [0, T] \times X: \nonumber \\
    & \quad \Lie_f v(t, x) \leq 0 \label{eq:peak_cont_f}\\
    & \quad v(t, x) \geq p(x)  \label{eq:peak_cont_p} \\
    &v(t, x) \in C^1([0, T]\times X). \label{eq:peak_cont_v}
\end{align}
\end{subequations}
% \begin{subequations}
% \label{eq:peak_cont}
% \begin{align}
%     d^* = & \ \min_{\gamma \in \R} \quad \gamma & \\
%     & {\gamma} \geq {v(0, x)}  &  \forall x \in X_0 \label{eq:peak_cont_init}\\
%     & \Lie_f v(t, x) \leq 0 & \forall (t, x) \in [0, T] \times X \label{eq:peak_cont_f}\\
%     & v(t, x) \geq p(x) & \forall (t, x) \in [0, T] \times X \label{eq:peak_cont_p} \\
%     &v \in C^1([0, T]\times X) \label{eq:peak_cont_v}&
% \end{align}
% \end{subequations}
% $v(t,x)$ is referred to as an auxiliary function in \cite{fantuzzi2020bounding}, and is an upper bound on the cost function $p(x)$ by \eqref{eq:peak_cont_p}. 
For computational purposes, it is assumed that the set $[0, T] \times X$ is compact. This compactness asssures that programs \eqref{eq:peak_meas} and \eqref{eq:peak_cont} satisfy strong duality, since all measures have bounded moments and the image of the affine map in \eqref{eq:peak_meas_flow}-\eqref{eq:peak_meas_init} is closed and bounded (Theorem C.20 of \cite{lasserre2009moments}). These programs form an upper bound $p^* = d^* \geq P^*$ on \eqref{eq:peak_traj} without $(\theta, w)$, which is tight to $p^* = P^*$ with the assumption that $[0, T] \times X$ is compact (Sec. 2.3 of \cite{fantuzzi2020bounding} and \cite{lewis1980relaxation}).
% This upper bound will be tight with $p^*=d^*=P^*$ if the auxiliary function $v(t, x)$ in \eqref{eq:peak_cont_v} is allowed to be discontinuous \cite{fantuzzi2020bounding}. 
% $v(t,x)$ is an upper bound on the on the cost function $p(x)$ by \eqref{eq:peak_cont_p} for all time $t \in [0, T]$, and 
The sublevel set $\{(t,x) \mid v(t,x) \leq \gamma\}$ is an invariant set containing the graph of all trajectories starting from $X_0$ in time $[0, T]$.

% \urg{Talk about moment relaxations? SOS, polynomials?}

Problems \eqref{eq:peak_meas} and \eqref{eq:peak_cont} are a pair of infinite-dimensional linear programs. The work in \cite{cho2002linear} approximates these problems by a discretized linear program over a fine mesh. The method in \cite{fantuzzi2020bounding} bounds \eqref{eq:peak_cont} with a sum-of-squares (SOS) relaxation of polynomial nonnegativity constraints. The SOS relaxation produces a converging sequence of upper bounds to $d^*$ when $[0, T] \times X$ is compact. This SOS formulation is dual to LMIs in moments of occupation measures formed by a finite truncation of \eqref{eq:peak_meas} \cite{lasserre2009moments}. 
The degree-$d$ moment matrix for $\mu_p$ defined over the $1+N_x $ variables $(t, x)$ is a symmetric PSD matrix of size $\binom{1+N_x+d}{d}$. 
Near-optimal trajectories extremizing $p(x)$ may be recovered from LMI solutions if the moment matrices obey rank conditions \cite{miller2020recovery}. These trajectories may also be localized by sublevel sets of the dual $v(t,x)$ following the method in \cite{fantuzzi2020bounding}.
% The sequence of optima 
% Optimal trajectories extremizing $p(x)$ may be approximately recovered from LMI solutions if the moment matrices obey rank conditions \cite{miller2020recovery}.

% \urg{If space permits, put in more content about LMIs and write the LMI for the unified uncertain peak problem.}

% A degree-$\delta$ LMI relaxation of \eqref{eq:peak_meas} or SOS relaxation of \eqref{eq:peak_cont} generically results in  

% In an LMI relaxation, the coefficients of the degree-$2d$ polynomial $v(t,x)$ can be recovered from dual variables of the truncated degree-$d$ Moment program.


% \subsection{Peak Estimation}
