#  Control Barrier Functions-based Semi-Definite Programs (CBF-SDPs): Robust
Safe Control For Dynamic Systems with Relative Degree Two Safety Indices

Jaskaran Grover∗, Changliu Liu∗, Katia Sycara ∗ ∗J. Grover, C. Liu, K. Sycara
are with the Robotics Institute, Carnegie Mellon University, 5000 Forbes
Avenue, Pittsburgh, PA 15213, USA<EMAIL_ADDRESS>
(22 August 2022)

## Abstract

In this draft article, we consider the problem of achieving safe control of a
dynamic system for which the safety index or (control barrier function
(loosely)) has relative degree equal to two. We consider parameter affine
nonlinear dynamic systems and assume that the parametric uncertainty is
uniform and known a-priori or being updated online through an
estimator/parameter adaptation law. Under this uncertainty, the usual CBF-QP
safe control approach takes the form of a robust optimization problem. Both
the right hand side and left hand side of the inequality constraints depend on
the unknown parameter. With the given representation of uncertainty, the CBF-
QP safe control ends up being a convex semi-infinite problem. Using two
different philosophies, one based on weak duality and another based on the
Lossless s-procedure, we arrive at identical SDP formulations of this robust
CBF-QP problem. Thus we show that the problem of computing safe controls with
known parametric uncertainty can be posed as a tractable convex problem and be
solved online. (This draft is work in progress).

##  1 Introduction

We are interested in guaranteeing safety of humans in tasks that involve space
sharing interactions between a human and a robot. We establish notation first.
Let $\boldsymbol{x}_{A}$ denote the state of the human which could either be
its position or both its position and velocity. Let $\boldsymbol{x}_{R}$
denote the state of the robot. In this work, we let $\boldsymbol{x}_{R}$ refer
to the robot’s position and $\boldsymbol{x}_{A}$ refer to the human’s
position. Further, we assume both the human and the robot have single-
integrator dynamics i.e. they are velocity controlled. The closed-loop
dynamics of the human are assumed to be in a parameter-affine form as:

$\displaystyle\dot{\boldsymbol{x}}_{A}=\boldsymbol{G}(\boldsymbol{x}_{A},\boldsymbol{x}_{R})\boldsymbol{\theta}+\boldsymbol{f}(\boldsymbol{x}_{A},\boldsymbol{x}_{R})$
(1)

Here
$\boldsymbol{G}(\boldsymbol{x}_{A},\boldsymbol{x}_{R})\in\mathbb{R}^{2\times
p}$ is a matrix of domain-specific basis functions,
$\boldsymbol{\theta}\in\mathbb{R}^{p}$ is a parameter vector and
$\boldsymbol{f}(\boldsymbol{x}_{A},\boldsymbol{x}_{R})\in\mathbb{R}^{2}$ is a
vector of domain-specific basis functions. The dynamics of the robot are
velocity controlled and can be posed as:

$\displaystyle\dot{\boldsymbol{x}}_{R}=\boldsymbol{u}_{R}$ (2)

###  1.1 Posing the barrier function

Suppose there is a safety constraint on the human’s motion where we require
the position of the human to lie in a set described as

$\displaystyle\mathcal{S}\coloneqq\\{\boldsymbol{x}\in\mathbb{R}^{2}|h(\boldsymbol{x})\geq
0\\}$ (3)

To ensure this condition is satisfied, we use $h(\cdot)$ as a control barrier
function and evaluate its derivative over the closed-loop dynamics of human.

$\displaystyle\dot{h}$
$\displaystyle=\nabla_{\boldsymbol{x}_{A}}h(\boldsymbol{x}_{A})^{T}(\boldsymbol{G}(\boldsymbol{x}_{A},\boldsymbol{x}_{R})\boldsymbol{\theta}+\boldsymbol{f}(\boldsymbol{x}_{A},\boldsymbol{x}_{R}))$
$\displaystyle=\boldsymbol{w}^{T}(\boldsymbol{x}_{A},\boldsymbol{x}_{R})\boldsymbol{\theta}+v(\boldsymbol{x}_{A},\boldsymbol{x}_{R})$
(4)

where we have defined

$\displaystyle\boldsymbol{w}(\boldsymbol{x}_{A},\boldsymbol{x}_{R})$
$\displaystyle\coloneqq\boldsymbol{G}^{T}(\boldsymbol{x}_{A},\boldsymbol{x}_{R})\nabla_{\boldsymbol{x}_{A}}h(\boldsymbol{x}_{A})$
$\displaystyle v(\boldsymbol{x}_{A},\boldsymbol{x}_{R})$
$\displaystyle\coloneqq\boldsymbol{f}^{T}(\boldsymbol{x}_{A},\boldsymbol{x}_{R})\nabla_{\boldsymbol{x}_{A}}h(\boldsymbol{x}_{A})$
(5)

Since $\dot{h}$ does not depend on the robot control $\boldsymbol{u}_{R}$, we
take another derivative:

$\displaystyle\ddot{h}$
$\displaystyle=\boldsymbol{\theta}^{T}\bigg{(}\frac{\partial\boldsymbol{w}}{\partial\boldsymbol{x}_{A}}\dot{\boldsymbol{x}}_{A}+\frac{\partial\boldsymbol{w}}{\partial\boldsymbol{x}_{R}}\dot{\boldsymbol{x}}_{R}\bigg{)}+\bigg{(}\frac{\partial
v^{T}}{\partial\boldsymbol{x}_{A}}\dot{\boldsymbol{x}}_{A}+\frac{\partial
v^{T}}{\partial\boldsymbol{x}_{R}}\dot{\boldsymbol{x}}_{R}\bigg{)}$
$\displaystyle=\boldsymbol{\theta}^{T}\bigg{(}\frac{\partial\boldsymbol{w}}{\partial\boldsymbol{x}_{A}}\dot{\boldsymbol{x}}_{A}+\frac{\partial\boldsymbol{w}}{\partial\boldsymbol{x}_{R}}\boldsymbol{u}_{R}\bigg{)}+\bigg{(}\frac{\partial
v^{T}}{\partial\boldsymbol{x}_{A}}\dot{\boldsymbol{x}}_{A}+\frac{\partial
v^{T}}{\partial\boldsymbol{x}_{R}}\boldsymbol{u}_{R}\bigg{)}$
$\displaystyle=\bigg{(}\boldsymbol{\theta}^{T}\frac{\partial\boldsymbol{w}}{\partial\boldsymbol{x}_{R}}+\frac{\partial
v^{T}}{\partial\boldsymbol{x}_{R}}\bigg{)}\boldsymbol{u}_{R}+\bigg{(}\boldsymbol{\theta}^{T}\frac{\partial\boldsymbol{w}}{\partial\boldsymbol{x}_{A}}+\frac{\partial
v^{T}}{\partial\boldsymbol{x}_{A}}\bigg{)}\dot{\boldsymbol{x}}_{A}$
$\displaystyle=\bigg{(}\boldsymbol{\theta}^{T}\frac{\partial\boldsymbol{w}}{\partial\boldsymbol{x}_{R}}+\frac{\partial
v^{T}}{\partial\boldsymbol{x}_{R}}\bigg{)}\boldsymbol{u}_{R}+\bigg{(}\boldsymbol{\theta}^{T}\frac{\partial\boldsymbol{w}}{\partial\boldsymbol{x}_{A}}+\frac{\partial
v^{T}}{\partial\boldsymbol{x}_{A}}\bigg{)}(\boldsymbol{G}(\boldsymbol{x}_{A},\boldsymbol{x}_{R})\boldsymbol{\theta}+\boldsymbol{f}(\boldsymbol{x}_{A},\boldsymbol{x}_{R}))$
$\displaystyle=\bigg{(}\boldsymbol{\theta}^{T}\frac{\partial\boldsymbol{w}}{\partial\boldsymbol{x}_{R}}+\frac{\partial
v^{T}}{\partial\boldsymbol{x}_{R}}\bigg{)}\boldsymbol{u}_{R}+\boldsymbol{\theta}^{T}\frac{\partial\boldsymbol{w}}{\partial\boldsymbol{x}_{A}}\boldsymbol{G}(\boldsymbol{x}_{A},\boldsymbol{x}_{R})\boldsymbol{\theta}+\bigg{(}\frac{\partial\boldsymbol{w}}{\partial\boldsymbol{x}_{A}}\boldsymbol{f}(\boldsymbol{x}_{A},\boldsymbol{x}_{R})+\boldsymbol{G}^{T}(\boldsymbol{x}_{A},\boldsymbol{x}_{R})\frac{\partial
v}{\partial\boldsymbol{x}_{A}}\bigg{)}^{T}\boldsymbol{\theta}+\frac{\partial
v^{T}}{\partial\boldsymbol{x}_{A}}\boldsymbol{f}(\boldsymbol{x}_{A},\boldsymbol{x}_{R})$
(6)

For ensuring forward invariance of the set $\mathcal{S}$, we impose
$\ddot{h}+{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\alpha}\dot{h}+{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\beta}h\geq
0$ where
${\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\alpha}$
and ${\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\beta}$
are suitably chosen constants. This constraint can be reformulated as

$\displaystyle\ddot{h}+{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\alpha}\dot{h}+{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\beta}h$
$\displaystyle\geq 0\iff$
$\displaystyle-\bigg{(}\boldsymbol{\theta}^{T}\frac{\partial\boldsymbol{w}}{\partial\boldsymbol{x}_{R}}+\frac{\partial
v^{T}}{\partial\boldsymbol{x}_{R}}\bigg{)}\boldsymbol{u}_{R}$
$\displaystyle\leq\boldsymbol{\theta}^{T}\bigg{(}\frac{\partial\boldsymbol{w}}{\partial\boldsymbol{x}_{A}}\boldsymbol{G}(\boldsymbol{x}_{A},\boldsymbol{x}_{R})\bigg{)}\boldsymbol{\theta}+\bigg{(}\frac{\partial\boldsymbol{w}}{\partial\boldsymbol{x}_{A}}\boldsymbol{f}(\boldsymbol{x}_{A},\boldsymbol{x}_{R})+\boldsymbol{G}^{T}(\boldsymbol{x}_{A},\boldsymbol{x}_{R})\frac{\partial
v}{\partial\boldsymbol{x}_{A}}+{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\alpha}\boldsymbol{w}(\boldsymbol{x}_{A},\boldsymbol{x}_{R})\bigg{)}^{T}\boldsymbol{\theta}+$
$\displaystyle+\bigg{(}\frac{\partial
v^{T}}{\partial\boldsymbol{x}_{A}}\boldsymbol{f}(\boldsymbol{x}_{A},\boldsymbol{x}_{R})+{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\alpha}v(\boldsymbol{x}_{A},\boldsymbol{x}_{R})+{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\beta}h(\boldsymbol{x}_{A})\bigg{)}$
(7)

Define the following :

$\displaystyle C$
$\displaystyle\coloneqq-\frac{\partial\boldsymbol{w}}{\partial\boldsymbol{x}_{R}}$
$\displaystyle\boldsymbol{d}$ $\displaystyle\coloneqq-\frac{\partial
v}{\partial\boldsymbol{x}_{R}}$ $\displaystyle H$
$\displaystyle\coloneqq\frac{\partial\boldsymbol{w}}{\partial\boldsymbol{x}_{A}}\boldsymbol{G}(\boldsymbol{x}_{A},\boldsymbol{x}_{R})$
$\displaystyle\boldsymbol{f}$
$\displaystyle\coloneqq\frac{\partial\boldsymbol{w}}{\partial\boldsymbol{x}_{A}}\boldsymbol{f}(\boldsymbol{x}_{A},\boldsymbol{x}_{R})+\boldsymbol{G}^{T}(\boldsymbol{x}_{A},\boldsymbol{x}_{R})\frac{\partial
v}{\partial\boldsymbol{x}_{A}}+{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\alpha}\boldsymbol{w}(\boldsymbol{x}_{A},\boldsymbol{x}_{R})$
$\displaystyle g$ $\displaystyle\coloneqq\frac{\partial
v^{T}}{\partial\boldsymbol{x}_{A}}\boldsymbol{f}(\boldsymbol{x}_{A},\boldsymbol{x}_{R})+{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\alpha}v(\boldsymbol{x}_{A},\boldsymbol{x}_{R})+{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}\beta}h(\boldsymbol{x}_{A})$
(8)

Thus, the constraint becomes:

$\displaystyle(\boldsymbol{\theta}^{T}C+\boldsymbol{d})\boldsymbol{u}_{R}\leq\boldsymbol{\theta}^{T}H\boldsymbol{\theta}+\boldsymbol{f}^{T}\boldsymbol{\theta}+g$
(9)

To synthesize the safe control, we pose the following QP:

$\displaystyle\begin{aligned}
\boldsymbol{u}^{*}_{R}&=\underset{\boldsymbol{u}_{R}}{\arg\min}&&\left\lVert\boldsymbol{u}_{R}\right\rVert^{2}\\\
&\text{subject
to}&&(\boldsymbol{\theta}^{T}C+\boldsymbol{d})\boldsymbol{u}_{R}\leq\boldsymbol{\theta}^{T}H\boldsymbol{\theta}+\boldsymbol{f}^{T}\boldsymbol{\theta}+g\end{aligned}$
(10)

Suppose instead of knowing the true parameter $\boldsymbol{\theta}$, we only
know a bound in which it is contained as reported by an estimator or a
parameter adaptation law. For simplicity, we assume that we have an estimate
$\boldsymbol{\hat{\theta}}$ and a bound $\eta$ capturing the maximum deviation
of the estimate $\boldsymbol{\hat{\theta}}$ from $\boldsymbol{\theta}$. Thus,
we would like to solve (10) for all possible parameters that lie within $\eta$
of the estimate $\boldsymbol{\hat{\theta}}$. If using a parameter adaptation
law, $\eta$ will be updated online to ensure that it $\eta(t)$ is non-
increasing i.e. the parameter uncertainty doesn’t increase with time. At a
given time $t=\tau$, for a fixed $\eta(\tau)$, we would like to solve the
following robust QP:

$\displaystyle\begin{aligned}
\boldsymbol{u}^{*}_{R}&=\underset{\boldsymbol{u}_{R}}{\arg\min}&&\left\lVert\boldsymbol{u}_{R}\right\rVert^{2}\\\
&\text{subject
to}&&(\boldsymbol{\tilde{\theta}}^{T}C+\boldsymbol{d})\boldsymbol{u}_{R}\leq\boldsymbol{\tilde{\theta}}^{T}H\boldsymbol{\tilde{\theta}}+\boldsymbol{f}^{T}\boldsymbol{\tilde{\theta}}+g\hskip
11.38092pt\forall\left\lVert\boldsymbol{\tilde{\theta}}-\boldsymbol{\hat{\theta}}\right\rVert_{2}\leq\eta\end{aligned}$
(11)

This is a robust optimization problem. We can rewrite the constraint using a
new variable $\boldsymbol{z}$ by making the following substitution in (11).

$\displaystyle\boldsymbol{\tilde{\theta}}=\boldsymbol{\hat{\theta}}+\eta\boldsymbol{z}\mbox{
where }\left\lVert\boldsymbol{z}\right\rVert_{2}\leq 1.$ (12)

Then substituting this in the QP, we get

$\displaystyle\begin{aligned}
\boldsymbol{u}^{*}_{R}&=\underset{\boldsymbol{u}_{R}}{\arg\min}&&\left\lVert\boldsymbol{u}_{R}\right\rVert^{2}\\\
&\text{subject
to}&&(\boldsymbol{z}^{T}\tilde{C}+\boldsymbol{\tilde{d}})\boldsymbol{u}_{R}\leq\boldsymbol{z}^{T}\tilde{H}\boldsymbol{z}+\boldsymbol{\tilde{f}}^{T}\boldsymbol{z}+\tilde{g}\hskip
11.38092pt\forall\left\lVert\boldsymbol{z}\right\rVert_{2}\leq 1\end{aligned}$
(13)

Here,

$\displaystyle\tilde{C}$ $\displaystyle\coloneqq\eta C$
$\displaystyle\boldsymbol{\tilde{d}}$
$\displaystyle\coloneqq\boldsymbol{\hat{\theta}}^{T}C+\boldsymbol{d}$
$\displaystyle\tilde{H}$ $\displaystyle\coloneqq\eta^{2}H$
$\displaystyle\boldsymbol{\tilde{f}}$
$\displaystyle\coloneqq\eta\boldsymbol{f}+2\eta H\boldsymbol{\hat{\theta}}$
$\displaystyle\tilde{g}$
$\displaystyle\coloneqq\boldsymbol{\hat{\theta}}^{T}H\boldsymbol{\hat{\theta}}+\boldsymbol{f}^{T}\boldsymbol{\hat{\theta}}+g,$
(14)

where $C$, $\boldsymbol{d}$, $H$, $\boldsymbol{f}$ and $g$ were defined in
(1.1).

###  1.2 Posing 13 as an SDP

####  1.2.1 Approach using weak duality

Let us recall problem (13):

$\displaystyle\begin{aligned}
\boldsymbol{u}^{*}_{R}&=\underset{\boldsymbol{u}_{R}}{\arg\min}&&\left\lVert\boldsymbol{u}_{R}\right\rVert^{2}\\\
&\text{subject
to}&&(\boldsymbol{z}^{T}\tilde{C}+\boldsymbol{\tilde{d}})\boldsymbol{u}_{R}\leq\boldsymbol{z}^{T}\tilde{H}\boldsymbol{z}+\boldsymbol{\tilde{f}}^{T}\boldsymbol{z}+\tilde{g}\hskip
11.38092pt\forall\left\lVert\boldsymbol{z}\right\rVert_{2}\leq 1\end{aligned}$
(15)

The inequality constraint effectively consists of an infinite number of
constraints corresponding to each $\boldsymbol{z}$ in the unit ball. These
infinite constraints make the overall problem a convex semi-infinite
optimization problem. A conservative approach to solve this problem is by only
considering the worst constraint among those infinite constraints. This
conservative problem can be posed as follows:

$\displaystyle\begin{aligned}
\boldsymbol{u}^{*}_{R}&=\underset{\boldsymbol{u}_{R}}{\arg\min}&&\left\lVert\boldsymbol{u}_{R}\right\rVert^{2}\\\
&\text{subject to}&&0\leq\inf_{\left\lVert\boldsymbol{z}\right\rVert_{2}\leq
1}\underbrace{\boldsymbol{z}^{T}\tilde{H}\boldsymbol{z}+(\boldsymbol{\tilde{f}}-\tilde{C}\boldsymbol{u}_{R})^{T}\boldsymbol{z}+\tilde{g}-\boldsymbol{\tilde{d}}\boldsymbol{u}_{R}}_{f_{0}(\boldsymbol{z})}\end{aligned}$
(16)

We have converted the infinite constraints into a single constraint which in
itself is an optimization problem. Let’s consider this inner problem now.

$\displaystyle\begin{aligned}
&\text{inf.}&&\boldsymbol{z}^{T}\tilde{H}\boldsymbol{z}+(\boldsymbol{\tilde{f}}-\tilde{C}\boldsymbol{u}_{R})^{T}\boldsymbol{z}+\tilde{g}-\boldsymbol{\tilde{d}}\boldsymbol{u}_{R}\\\
&\text{subject to}&&\left\lVert\boldsymbol{z}\right\rVert_{2}\leq
1\end{aligned}$ (17)

Note that problem (17) is equivalent to the following (possibly non-convex)
QCQP:

$\displaystyle\begin{aligned}
&\text{inf.}&&\boldsymbol{z}^{T}\tilde{H}\boldsymbol{z}+(\boldsymbol{\tilde{f}}-\tilde{C}\boldsymbol{u}_{R})^{T}\boldsymbol{z}+\tilde{g}-\boldsymbol{\tilde{d}}\boldsymbol{u}_{R}\\\
&\text{subject to}&&\boldsymbol{z}^{T}\boldsymbol{z}\leq 1\end{aligned}$ (18)

Let $\boldsymbol{z}^{*}(\boldsymbol{u}_{R})$ be the optimizer of (18) (assume
it exists). We require $\boldsymbol{z}^{*}(\boldsymbol{u}_{R})$ to satisfy
$f_{0}(\boldsymbol{z}^{*}(\boldsymbol{u}_{R}))\geq 0$ per the robustness
requirement in (16). Thus, if we can find any lower bound for
$f_{0}(\boldsymbol{z}^{*}(\boldsymbol{u}_{R}))$ and constrain that lower bound
to be non-negative, then we will ensure
$f_{0}(\boldsymbol{z}^{*}(\boldsymbol{u}_{R}))\geq 0$ as required by the
robustness constraint. We will use weak duality to obtain a lower bound for
$f_{0}(\boldsymbol{z}^{*}(\boldsymbol{u}_{R}))$. The Lagrangian for (18) is

$\displaystyle\mathcal{L}(\boldsymbol{z},\lambda)$
$\displaystyle\coloneqq\boldsymbol{z}^{T}\tilde{H}\boldsymbol{z}+(\boldsymbol{\tilde{f}}-\tilde{C}\boldsymbol{u}_{R})^{T}\boldsymbol{z}+\tilde{g}-\boldsymbol{\tilde{d}}\boldsymbol{u}_{R}+\lambda(\boldsymbol{z}^{T}\boldsymbol{z}-1)$
$\displaystyle=\boldsymbol{z}^{T}(\tilde{H}+\lambda
I)\boldsymbol{z}+(\boldsymbol{\tilde{f}}-\tilde{C}\boldsymbol{u}_{R})^{T}\boldsymbol{z}+\tilde{g}-\boldsymbol{\tilde{d}}\boldsymbol{u}_{R}-\lambda$
(19)

Define the Lagrange dual function $g(\lambda)$ as

$\displaystyle g(\lambda)$
$\displaystyle\coloneqq\inf_{\boldsymbol{z}\in\mathbb{R}^{p}}\mathcal{L}(\boldsymbol{z},\lambda)$
(20)

If $\lambda\geq 0$, then from the lower bound property, we have that
$g(\lambda)\leq f_{0}(\boldsymbol{z}^{*}(\boldsymbol{u}_{R}))$ i.e. if
$\lambda\geq 0$, then $g(\lambda)$ is a candidate lower bound for
$f_{0}(\boldsymbol{z}^{*}(\boldsymbol{u}_{R}))$. Thus, the robustness
constraint in (11) can be posed by requiring $g(\lambda)\geq 0$. To impose
this constraint, we therefore derive an expression for $g(\lambda)$ in (20) by
using the Lagrangian defined in (1.2.1).

$\displaystyle g(\lambda)$
$\displaystyle\coloneqq\inf_{\boldsymbol{z}\in\mathbb{R}^{p}}\boldsymbol{z}^{T}(\tilde{H}+\lambda
I)\boldsymbol{z}+(\boldsymbol{\tilde{f}}-\tilde{C}\boldsymbol{u}_{R})^{T}\boldsymbol{z}+\tilde{g}-\boldsymbol{\tilde{d}}\boldsymbol{u}_{R}-\lambda$
$\displaystyle=\begin{cases}-\infty&\text{if }\tilde{H}+\lambda I\nsucceq 0\\\
-\infty&\text{if }\tilde{H}+\lambda I\succcurlyeq 0\mbox{ and
}\boldsymbol{\tilde{f}}-\tilde{C}\boldsymbol{u}_{R}\notin\mathcal{R}(\tilde{H}+\lambda
I)\\\
-\frac{1}{4}(\boldsymbol{\tilde{f}}-\tilde{C}\boldsymbol{u}_{R})^{T}(\tilde{H}+\lambda
I)^{\dagger}(\boldsymbol{\tilde{f}}-\tilde{C}\boldsymbol{u}_{R})+\tilde{g}-\boldsymbol{\tilde{d}}\boldsymbol{u}_{R}-\lambda&\mbox{otherwise}\end{cases}$
(21)

Thus, to ensure that $g(\lambda)\geq 0$ when $\lambda\geq 0$, we require.

  1. 1.

$-\frac{1}{4}(\boldsymbol{\tilde{f}}-\tilde{C}\boldsymbol{u}_{R})^{T}(\tilde{H}+\lambda
I)^{\dagger}(\boldsymbol{\tilde{f}}-\tilde{C}\boldsymbol{u}_{R})+\tilde{g}-\boldsymbol{\tilde{d}}\boldsymbol{u}_{R}-\lambda\geq
0$

  2. 2.

$\tilde{H}+\lambda I\succcurlyeq 0$

  3. 3.

$\boldsymbol{\tilde{f}}-\tilde{C}\boldsymbol{u}_{R}\in\mathcal{R}(\tilde{H}+\lambda
I)$

From the Schur Complement theorem, these three conditions are equivalent to

$\displaystyle\left[\begin{matrix}\tilde{H}+\lambda
I&&\frac{1}{2}(\boldsymbol{\tilde{f}}-\tilde{C}\boldsymbol{u}_{R})\\\
\frac{1}{2}(\boldsymbol{\tilde{f}}-\tilde{C}\boldsymbol{u}_{R})^{T}&&\tilde{g}-\boldsymbol{\tilde{d}}\boldsymbol{u}_{R}-\lambda\end{matrix}\right]\succcurlyeq
0$ (22)

This is a linear matrix inequality type constraint. In conjunction with
$\lambda\geq 0$ and (22), problem (16) becomes

$\displaystyle\begin{aligned}
\boldsymbol{u}^{*}_{R},\lambda^{*}=\underset{\boldsymbol{u}_{R},\lambda}{\arg\min}&\left\lVert\boldsymbol{u}_{R}\right\rVert^{2}\\\
\text{subject to}&\left[\begin{matrix}\tilde{H}+\lambda
I&&\frac{1}{2}(\boldsymbol{\tilde{f}}-\tilde{C}\boldsymbol{u}_{R})\\\
\frac{1}{2}(\boldsymbol{\tilde{f}}-\tilde{C}\boldsymbol{u}_{R})^{T}&&\tilde{g}-\boldsymbol{\tilde{d}}\boldsymbol{u}_{R}-\lambda\end{matrix}\right]\succcurlyeq
0\\\ &\lambda\geq 0\end{aligned}$ (23)

Using the epigraph trick and Schur complement theorem, we can write this as

$\displaystyle\begin{aligned}
\boldsymbol{u}^{*}_{R},\lambda^{*},t^{*}=\underset{\boldsymbol{u}_{R},\lambda,t}{\arg\min}\hskip
8.5359pt&t\\\ \text{subject to}&\left[\begin{matrix}\tilde{H}+\lambda
I&&\frac{1}{2}(\boldsymbol{\tilde{f}}-\tilde{C}\boldsymbol{u}_{R})\\\
\frac{1}{2}(\boldsymbol{\tilde{f}}-\tilde{C}\boldsymbol{u}_{R})^{T}&&\tilde{g}-\boldsymbol{\tilde{d}}\boldsymbol{u}_{R}-\lambda\end{matrix}\right]\succcurlyeq
0\\\ &\lambda\geq 0\\\ &\left[\begin{matrix}I&&\boldsymbol{u}_{R}\\\
\boldsymbol{u}_{R}^{T}&&t\end{matrix}\right]\succcurlyeq 0\end{aligned}$ (24)

This is an SDP which can be easily solved online. Next, we derive the same SDP
using the s-procedure.

####  1.2.2 Approach using the s-procedure

Let us recall problem (13) again:

$\displaystyle\begin{aligned}
\boldsymbol{u}^{*}_{R}&=\underset{\boldsymbol{u}_{R}}{\arg\min}&&\left\lVert\boldsymbol{u}_{R}\right\rVert^{2}\\\
&\text{subject
to}&&(\boldsymbol{z}^{T}\tilde{C}+\boldsymbol{\tilde{d}})\boldsymbol{u}_{R}\leq\boldsymbol{z}^{T}\tilde{H}\boldsymbol{z}+\boldsymbol{\tilde{f}}^{T}\boldsymbol{z}+\tilde{g}\hskip
11.38092pt\forall\left\lVert\boldsymbol{z}\right\rVert_{2}\leq 1\end{aligned}$
(25)

We write the constraint $\left\lVert\boldsymbol{z}\right\rVert_{2}\leq 1$
constraint as follows:

$\displaystyle\left[\begin{matrix}\boldsymbol{z}\\\
1\end{matrix}\right]^{T}\left[\begin{matrix}-I&0\\\
0&1\end{matrix}\right]\left[\begin{matrix}\boldsymbol{z}\\\
1\end{matrix}\right]\geq
0\iff\boldsymbol{\tilde{z}}^{T}P\boldsymbol{\tilde{z}}\geq 0$ (26)

where we have defined

$\displaystyle\boldsymbol{\tilde{z}}$
$\displaystyle\coloneqq(\boldsymbol{z}^{T},1)^{T}$ $\displaystyle P$
$\displaystyle\coloneqq\left[\begin{matrix}-I&&0\\\ 0&&1\end{matrix}\right]$
(27)

Then we write
$(\boldsymbol{z}^{T}\tilde{C}+\boldsymbol{\tilde{d}})\boldsymbol{u}_{R}\leq\boldsymbol{z}^{T}\tilde{H}\boldsymbol{z}+\boldsymbol{\tilde{f}}^{T}\boldsymbol{z}+\tilde{g}$
as follows

$\displaystyle\left[\begin{matrix}\boldsymbol{z}\\\
1\end{matrix}\right]^{T}\left[\begin{matrix}\tilde{H}&\frac{1}{2}(\boldsymbol{\tilde{f}}-\tilde{C}\boldsymbol{u}_{R})\\\
\frac{1}{2}(\boldsymbol{\tilde{f}}-\tilde{C}\boldsymbol{u}_{R})^{T}&\tilde{g}-\boldsymbol{\tilde{d}}\boldsymbol{u}_{R}\end{matrix}\right]\left[\begin{matrix}\boldsymbol{z}\\\
1\end{matrix}\right]\geq
0\iff\boldsymbol{\tilde{z}}^{T}Q\boldsymbol{\tilde{z}}\geq 0,$ (28)

where we have defined

$\displaystyle Q$
$\displaystyle\coloneqq\left[\begin{matrix}\tilde{H}&&\frac{1}{2}(\boldsymbol{\tilde{f}}-\tilde{C}\boldsymbol{u}_{R})\\\
\frac{1}{2}(\boldsymbol{\tilde{f}}-\tilde{C}\boldsymbol{u}_{R})^{T}&&\tilde{g}-\boldsymbol{\tilde{d}}\boldsymbol{u}_{R}\end{matrix}\right]$
(29)

Thus we want $\boldsymbol{\tilde{z}}^{T}P\boldsymbol{\tilde{z}}\geq 0$
$\implies\boldsymbol{\tilde{z}}^{T}Q\boldsymbol{\tilde{z}}\geq 0$. Recall the
statement of s-lemma 111https://web.stanford.edu/class/msande314/lecture15.pdf

######  Lemma 1.

Let $M$ and $N$ be two symmetric matrices such that there exists
$\boldsymbol{u}^{0}$ satisfying
$(\boldsymbol{u}^{0})^{T}M\boldsymbol{u}^{0}>0$. Then the implication
$\boldsymbol{u}^{T}M\boldsymbol{u}\geq
0\implies\boldsymbol{u}^{T}N\boldsymbol{u}$ holds true if and only if there
exists $\lambda\geq 0$ such that $N\succcurlyeq\lambda M$.

Thus, by using $M\coloneqq P$ and $N\coloneqq Q$ in the s-lemma,
$\boldsymbol{\tilde{z}}^{T}P\boldsymbol{\tilde{z}}\geq 0$
$\implies\boldsymbol{\tilde{z}}^{T}Q\boldsymbol{\tilde{z}}\geq 0$ occurs when
$\exists\lambda\geq 0$ for which $Q\succcurlyeq\lambda P$ i.e.,

$\displaystyle\left[\begin{matrix}\tilde{H}&&\frac{1}{2}(\boldsymbol{\tilde{f}}-\tilde{C}\boldsymbol{u}_{R})\\\
\frac{1}{2}(\boldsymbol{\tilde{f}}-\tilde{C}\boldsymbol{u}_{R})^{T}&&\tilde{g}-\boldsymbol{\tilde{d}}\boldsymbol{u}_{R}\end{matrix}\right]\succcurlyeq\lambda\left[\begin{matrix}-I&&0\\\
0&&1\end{matrix}\right]\iff\left[\begin{matrix}\tilde{H}+\lambda
I&&\frac{1}{2}(\boldsymbol{\tilde{f}}-\tilde{C}\boldsymbol{u}_{R})\\\
\frac{1}{2}(\boldsymbol{\tilde{f}}-\tilde{C}\boldsymbol{u}_{R})^{T}&&\tilde{g}-\boldsymbol{\tilde{d}}\boldsymbol{u}_{R}-\lambda\end{matrix}\right]\succcurlyeq
0$ (30)

Thus, (13) becomes

$\displaystyle\begin{aligned}
\boldsymbol{u}^{*}_{R},\lambda^{*}=\underset{\boldsymbol{u}_{R},\lambda}{\arg\min}&\left\lVert\boldsymbol{u}_{R}\right\rVert^{2}\\\
\text{subject to}&\left[\begin{matrix}\tilde{H}+\lambda
I&&\frac{1}{2}(\boldsymbol{\tilde{f}}-\tilde{C}\boldsymbol{u}_{R})\\\
\frac{1}{2}(\boldsymbol{\tilde{f}}-\tilde{C}\boldsymbol{u}_{R})^{T}&&\tilde{g}-\boldsymbol{\tilde{d}}\boldsymbol{u}_{R}-\lambda\end{matrix}\right]\succcurlyeq
0\\\ &\lambda\geq 0\end{aligned}$ (31)

Using the epigraph trick and Schur complement theorem, we can write this as

$\displaystyle\begin{aligned}
\boldsymbol{u}^{*}_{R},\lambda^{*},t^{*}=\underset{\boldsymbol{u}_{R},\lambda,t}{\arg\min}\hskip
8.5359pt&t\\\ \text{subject to}&\left[\begin{matrix}\tilde{H}+\lambda
I&&\frac{1}{2}(\boldsymbol{\tilde{f}}-\tilde{C}\boldsymbol{u}_{R})\\\
\frac{1}{2}(\boldsymbol{\tilde{f}}-\tilde{C}\boldsymbol{u}_{R})^{T}&&\tilde{g}-\boldsymbol{\tilde{d}}\boldsymbol{u}_{R}-\lambda\end{matrix}\right]\succcurlyeq
0\\\ &\lambda\geq 0\\\ &\left[\begin{matrix}I&&\boldsymbol{u}_{R}\\\
\boldsymbol{u}_{R}^{T}&&t\end{matrix}\right]\succcurlyeq 0\end{aligned}$ (32)

Note that this SDP is equivalent to (24).