# Absolute frequency measurement of a Yb optical clock at the limit of the Cs
fountain

Irene Goti1,2, Stefano Condio1,2, Cecilia Clivati1, Matias Risaro1, Michele
Gozzelino1, Giovanni A. Costanzo1,2, Filippo Levi1, Davide Calonico1 and Marco
Pizzocaro1 1 Istituto Nazionale di Ricerca Metrologica (INRiM), Strada delle
Cacce 91, 10135 Torino, Italy  2 Dipartimento di Elettronica e
Telecomunicazioni, Politecnico di Torino, Corso duca degli Abruzzi 24, 10129
Torino, Italy<EMAIL_ADDRESS>
###### Abstract

We present the new absolute frequency measurement of ytterbium (171Yb)
obtained at INRiM with the optical lattice clock IT-Yb1 against the cryogenic
caesium (133Cs) fountain IT-CsF2, evaluated through a measurement campaign
lasted 14 months. Measurements are performed by either using a hydrogen maser
as a transfer oscillator or by synthesizing a low-noise microwave for Cs
interrogation using an optical frequency comb. The frequency of the 171Yb
unperturbed clock transition 1S${}_{0}\rightarrow{{}^{3}}$P0 results to be
$518\,295\,836\,590\,863.44(14)\text{\,}\mathrm{H}\mathrm{z}$, with a total
fractional uncertainty of $2.7\text{\times}{10}^{-16}$ that is limited by the
uncertainty of IT-CsF2. Our measurement is in agreement with the Yb frequency
recommended by the Consultative Committee for Time and Frequency (CCTF). This
result confirms the reliability of Yb as a secondary representation of the
second and is relevant to the process of redefining the second in the
International System of Units (SI) on an optical transition.

††:

Keywords : frequency metrology, optical lattice clock, Cs fountain, SI second

##  1 Introduction

The definition of the SI second is currently realized through a Cs frequency
transition in the microwave regime [1, 4, 5, 6, 7, 8, 9, 10, 11, 2, 3].
Nevertheless, in recent years it has been widely demonstrated that optical
clocks represent a better frequency standard [12, 13, 14, 15], both in terms
of fractional frequency instability and estimated systematic uncertainty.
Specific optical transitions are currently indicated by the Consultative
Committee for Time and Frequency (CCTF) as secondary representations of the SI
second, and recent progress in the field of optical clocks paves the way to a
redefinition of the SI second [16, 17, 18]. In 2022, the CCTF published a
roadmap stating relevant milestones to be achieved to proceed to a
redefinition of the SI second, among which emerge multiple and independent
measurements of optical clocks relative to independent Cs primary clocks. One
of the secondary representations of the second recommended by the CCTF is the
transition 1S${}_{0}\rightarrow^{3}$P0 of 171Yb. Absolute frequency
measurements of this clock transition have been realized by several
metrological institutes worldwide [14, 20, 21, 22, 23, 24, 25, 26, 27, 19]. At
INRiM we measured the absolute frequency of the 171Yb clock (IT-Yb1) relative
to our local cryogenic Cs fountain (IT-CsF2) [28] and via International Atomic
Time (TAI) [29]. Moreover, we measured the frequency ratio between 171Yb and
87Sr clock with a transportable optical Sr clock developed at PTB [30], and
via VLBI (Very Long Baseline Interferometry) in collaboration with NICT INAF
and BIPM [31]. Recently we used the new fiber link between INRiM and SYRTE to
measure the Yb clock frequency against the french Cs-Rb fountain [19]

In this article, we report the improvements of our optical lattice clock IT-
Yb1 and the results obtained from a new measurement of the Yb absolute
frequency against IT-CsF2 over a period of 14 months. The frequency
measurement is performed with two different techniques: with the first method,
the hydrogen maser is used as a transfer oscillator between the optical clock
and the fountain, while with the second method the microwave interrogating the
fountain is directly obtained by photonic synthesis on a frequency comb, using
the Yb clock laser as a local oscillator.

This paper is organized as follows: in section 2 we describe the main
components of our experimental setup, i.e. the Yb clock, the Cs fountain and
the two measurement techniques. In section 3 we report the results obtained in
terms of Yb absolute frequency. Finally, section 4 presents the conclusions of
our work.

##  2 Experimental setup

###  2.1 IT-Yb1 and IT-CsF2

IT-Yb1 is the optical lattice clock based on 171Yb atoms developed at INRiM.
The uncertainty budget of IT-Yb1 during this measurement campaign is reported
in Table 1 and the total relative uncertainty is $1.9\text{\times}{10}^{-17}$.
The typical instability of IT-Yb1 is
$$2\text{\times}{10}^{-15}$/\sqrt{\tau/$\mathrm{s}$}$. IT-Yb1 is among the
optical clocks that regularly submit data to the International Bureau of
Weights and Measures (BIPM) for the calibration of the International Atomic
Time (TAI) [29, 27, 32, 25, 33].

Table 1: Uncertainty budget Yb optical lattice clock at INRiM. Other shifts are AOM switching, fibre links, and line pulling. Effect | Rel. Shift/${10}^{-17}$ | Rel. Unc./${10}^{-17}$
---|---|---
Density shift | -0.5 | 0.2
Lattice shift | 0.8 | 1.2
Zeeman shift | -3.12 | 0.02
Blackbody radiation shift (room) | -234.9 | 1.2
Blackbody radiation shift (oven) | -1.3 | 0.6
Static Stark shift | -1.7 | 0.2
Probe light shift | 0.04 | 0.03
Background gas shift | -0.5 | 0.2
Servo error | 0.0 | 0.3
Other shifts | 0.0 | 0.1
Grav. redshift | 2599.5 | 0.3
Total | 2358.3 | 1.9

IT-Yb1 and its details have been described in previous work [28, 29]. An
ultrastable laser at $1156\text{\,}\mathrm{n}\mathrm{m}$ is frequency
duplicated to generate the $578\text{\,}\mathrm{n}\mathrm{m}$ light that is
kept resonant with the 171Yb clock transition 1S${}_{0}\rightarrow^{3}$P0. A
new ultrastable cavity directly stabilizes the
$1156\text{\,}\mathrm{n}\mathrm{m}$ radiation instead of its second harmonic
at $578\text{\,}\mathrm{n}\mathrm{m}$. It is a horizontal 10-cm-long cavity,
made in ultra-low-expansion glass and fused silica mirror, characterized by a
flicker floor of $\sim$ $1\text{\times}{10}^{-15}$. Compared to previous
publications we improved the evaluation of the lattice shift and the static
stark shift. In particular, we changed the optical setup from a horizontal to
a vertical optical lattice with the advantage of having the strong axis of the
trap contrasting the gravity. In this way, we managed to reduce the minimum
trapping depth to 75 $E_{\text{r}}$, where $E_{\text{r}}\simeq h\times 2$ kHz
is the recoil energy for Yb and $h$ is the Plank constant. We also decreased
the depth of our working point from 200 $E_{\text{r}}$ [28] to 100
$E_{\text{r}}$, with consequent advantages in terms of uncertainty budget. The
working point of the lattice frequency is chosen at
$\nu_{lattice}=$394\,798\,267\text{\,}\mathrm{M}\mathrm{H}\mathrm{z}$$, and it
is continuously measured by an optical comb. Moreover, atoms are loaded into
the lattice directly at the working depth $U$, making the atomic temperature
of the trapped atoms linear as a function of the lattice depth. It is then
possible to apply the approach described in [34, 35] and calculate the
relative lattice shift by following the model: $\frac{\delta\nu}{\nu}=-\alpha
U-\beta U^{2}$, where $\alpha$ and $\beta$ are two parameters that have to be
measured in the specific experimental conditions. We estimate a model
uncertainty of $1\text{\times}{10}^{-17}$ [34] resulting from deviation from
linearity between the atomic temperature and the lattice depth.

We note that, since the density shift is smaller for lower lattice depth [36],
at the new working point of 100 $E_{\text{r}}$ the density shift is reduced by
a factor of 10 if compared to previous work [29]. Furthermore, the atomic
tunnelling between adjacent lattice sites is suppressed in a vertical lattice
[37, 14], making this source of uncertainty negligible.

Eight electrodes are placed on the vertical windows, four on the top window
and four on the bottom, to evaluate the static stark shift. By applying
voltages of up to $\pm$$150\text{\,}\mathrm{V}$ independently to each
electrode, it is possible to measure its contribution along the three spatial
directions [38, 39]. With this new setup, we detect a stray electric field of
about 1-2 V/cm on the horizontal plane, which is found to change slightly from
day to day. The direction of the field suggests that the oven used to generate
the Yb atomic beam emits some ionized particles that accumulate on the
windows. We manage to compensate for the stray electric field by using the
same electrodes. The electric field in the 3 directions is measured typically
3 times per week. As each measurement is independent, we allow the resulting
shift to be averaged over the campaign. The resulting shift for the period
considered in this work is reported in Table 1.

IT-CsF2 is a cryogenic Cs fountain [10] and since 2013 it operates as a
primary frequency standard contributing to the realization of UTC(IT) and TAI,
with over 50 TAI calibration campaigns performed and published on the BIPM
circular T. The uncertainty budget of IT-CsF2 is reported in Table 2 and the
total relative uncertainty is $2.3\text{\times}{10}^{-16}$.

The density shift is evaluated by alternating clock measurements with 2
different atom numbers and extrapolating to zero-density. Indeed, the
knowledge of the collisional-shift parameter for performing the extrapolation
progressively improves with time, as its computation takes advantage of using
historical and newly accumulated data, until some parameter characterizing the
shift does change, requiring a new measurement run to re-calibrate the
density-shift extrapolation.

In its usual configuration, the local oscillator for this clock is a BVA
quartz phase-locked to an H-maser and upconverted to
$9.2\text{\,}\mathrm{G}\mathrm{H}\mathrm{z}$ using cascaded multiplication
stages and a Dielectric Resonator Oscillator (DRO) [10]. This signal is tuned
to the atomic resonance using a Direct Digital Synthesizer (DDS) at about
$7.4\text{\,}\mathrm{M}\mathrm{H}\mathrm{z}$, adjusted at each interrogation
cycle. The typical short-term stability of IT-CsF2 results from a combination
of the Dick effect due to the BVA quartz noise and the atomic background noise
due to hot Cs atoms. It ranges between
$$2.4\text{\times}{10}^{-13}$/\sqrt{\tau/$\mathrm{s}$}$ in high density regime
and $$2.8\text{\times}{10}^{-13}$/\sqrt{\tau/$\mathrm{s}$}$ at low density.

Table 2: Uncertainty budget of IT-CsF2. Effect | Rel. Shift/${10}^{-16}$ | Rel. Unc./${10}^{-16}$
---|---|---
Zeeman shift | 1080.3 | 0.8
Blackbody radiation | -1.45 | 0.12
Gravitational redshift | 260.4 | 0.1
Microwave leakage | -1.2 | 1.4
DCP (Distributed Cavity Phase) | - | 0.2
Second order cavity pulling | - | 0.3
Background gas | - | 0.5
Density shift | -19.8 | 1.6
Total | 1318.2 | 2.3

###  2.2 The measurement chain

Figure 1 shows the block diagram of the two measurement chains used to compare
IT-Yb1 and IT-CsF2.

Figure 1: Experimental setup scheme of IT-Yb1 absolute frequency measurement
against a IT-CsF2 clock. In blue is represented the path of the H-maser chain,
which is our usual measurement chain. In orange instead is shown the
microwave-to-optical chain: a new measurement technique we tested in this
campaign.

The usual measurement scheme is represented in the lower branch (blue path,
hereafter referenced to as "H-maser chain"). Radiation at
$1156\text{\,}\mathrm{n}\mathrm{m}$, frequency-stabilised to the ultrastable
cavity, is doubled to $578\text{\,}\mathrm{n}\mathrm{m}$ for interrogating the
171Yb clock transition. Part of it is also beaten to a fibre frequency comb
stabilised to the same BVA quartz/H-maser system that serves as a local
oscillator for IT-CsF2. The IT-Yb1/IT-CsF2 ratio can thus be computed using
the comb and H-maser as transfer oscillators. Some of the measurements are
instead collected using the measurement chain shown in Fig. 1 with the orange
path (hereafter referred to as "Optical Microwave chain"). In this
configuration, the frequency comb is referenced to the ultrastable
$1156\text{\,}\mathrm{n}\mathrm{m}$ radiation and operates as a low-noise
microwave generator to synthesize a signal resonant with the Cs clock
transition. The coherent spectral transfer between optical and microwave
frequencies is obtained by tightly phase-locking the comb to the optical
reference (bandwidth $\approx$ $300\text{\,}\mathrm{k}\mathrm{H}\mathrm{z}$),
following a scheme similar to the one described in [40]. The comb pulse train
is collected by a fast photodiode, where the 40th harmonic of the repetition
rate at $10\text{\,}\mathrm{G}\mathrm{H}\mathrm{z}$ is selected and amplified.
We note that coherent transfer of spectral properties of an optical oscillator
to a microwave could alternatively be designed for optimized robustness,
without recurring to a fast optical comb lock [41] as we did. The noise of the
generated microwave is dominated by a flicker phase process at the level of
$-105\text{\,}\mathrm{d}\mathrm{B}\mathrm{c}\mathrm{/}\mathrm{H}\mathrm{z}$ at
$1\text{\,}\mathrm{H}\mathrm{z}$, limited by detection and signal conditioning
stages. The Cs interrogation signal is synthesized from the
$10\text{\,}\mathrm{G}\mathrm{H}\mathrm{z}$ input by a two-stage down-
conversion. In the first stage, we produce a
$9.2\text{\,}\mathrm{G}\mathrm{H}\mathrm{z}$ microwave by mixing to a
$800\text{\,}\mathrm{M}\mathrm{H}\mathrm{z}$ radio-frequency obtained by
downscaling the input $10\text{\,}\mathrm{G}\mathrm{H}\mathrm{z}$ signal. This
is then brought to resonance with the Cs transition by mixing to a DDS at
about $7.4\text{\,}\mathrm{M}\mathrm{H}\mathrm{z}$, adjusted at each clock
cycle. The flicker phase noise contributed by this chain is
$-106\text{\,}\mathrm{d}\mathrm{B}\mathrm{c}\mathrm{/}\mathrm{H}\mathrm{z}$ at
$1\text{\,}\mathrm{H}\mathrm{z}$ Fourier frequency, corresponding to an
instability of $4\text{\times}{10}^{-16}\text{\,}$ at $1\text{\,}\mathrm{s}$,
with a temperature sensitivity of
$0.07\text{\,}\mathrm{p}\mathrm{s}\mathrm{/}\mathrm{K}$. The ultrastable
$1156\text{\,}\mathrm{n}\mathrm{m}$ laser that is used as a seed for the
microwave synthesis is also calibrated by IT-Yb1 during the clock operation.

##  3 Results

###  3.1 Absolute frequency measurement of Yb

As usual with atomic clocks, data is processed and reported as fractional
frequencies $y=r/r_{0}-1$, where $r$ is the frequency measurement and $r_{0}$
is an arbitrary reference frequency. For this analysis, the reference is
chosen consistent with the recommended value of the secondary representation
of the second for the Yb transition, i.e.
$518\,295\,836\,590\,863.63\text{\,}\mathrm{H}\mathrm{z}$, which has an
uncertainty of $1.9\text{\times}{10}^{-16}$ as established by CCTF in 2021
[42]. The use of fractional frequency linearizes equations and is convenient
for computations with numbers with many digits [43, 44, 16].

(

a)

(

Figure 2: a) Fractional frequency ratio of IT-Yb1 and IT-CsF2 reported as $y$
(see main text). Data were collected from June 2021 to September 2022 using
the H-maser chain (blue dots) and the Optical Microwave chain (orange dots).
b) Same data averaged monthly. The grey line represents the average fractional
frequency ratio and the shaded area its uncertainty.

b)

We collected data from June 2021 to September 2022. Within this period, we
have collected a total of 32 days of data with common uptime between IT-Yb1
and IT-CsF2 using the H-maser chain and a total of 6.9 days of data using the
Optical Microwave chain. Data from the combs and IT-Yb1 are collected with a
sampling time of $1\text{\,}\mathrm{s}$. Data from IT-CsF2, either the
frequency measurement relative to the maser or the optically generated
microwave, are recorded with a sampling time of $864\text{\,}\mathrm{s}$. Data
from the optical clock and optical combs are averaged in bins with a duration
of $864\text{\,}\mathrm{s}$ and combined with the Cs fountain data. The
recorded data collected in these $864\text{\,}\mathrm{s}$ bins is shown in
Fig. 2a, while Fig. 2b shows the same data averaged monthly. The shaded area
represents the average fractional frequency ratios over the entire campaign
and its uncertainty. All uncertainties include the systematic uncertainties of
the clocks.

Figure 3: Overlapping Allan deviation of the comparisons over the entire
campaign. Orange(blue) dots show data of a measurement carried out using
Optical Microwave(H-maser) chain and the dashed(solid) line represents its
instability at $$2.1\text{\times}{10}^{-13}$/\sqrt{\tau/$\mathrm{s}$}$
($$2.7\text{\times}{10}^{-13}$/\sqrt{\tau/$\mathrm{s}$}$).

The instabilities of the comparisons for the entire campaign are shown in Fig.
3 as overlapping Allan deviations. The comparison through the H-maser chain
has an instability at $$2.7\text{\times}{10}^{-13}$/\sqrt{\tau/$\mathrm{s}$}$
over the full campaign. The comparison through the Optical Microwave chain has
slightly lower instability at
$$2.1\text{\times}{10}^{-13}$/\sqrt{\tau/$\mathrm{s}$}$. The improvement is
obtained thanks to the lower phase noise of the optically-generated microwave
compared to that introduced by the BVA quartz/H-maser system. We have
estimated that the contribution of the Dick effect is reduced from
$1.6\text{\times}{10}^{-13}\text{\,}$$/\sqrt{\tau/s}$ to a value lower than
$3\text{\times}{10}^{-15}\text{\,}$$/\sqrt{\tau/s}$. The best instability
observed over a short period of time (less than 1 day) is reduced from
$2.1\text{\times}{10}^{-13}\text{\,}$$/\sqrt{\tau/s}$ to
$1.3\text{\times}{10}^{-13}\text{\,}$$/\sqrt{\tau/s}$ in high density regime.
The residual instability is dominated by the atomic background noise. The
average fractional frequency difference between IT-Yb1 and IT-CsF2 is
$y(\text{IT-Yb1/IT-CsF2, Optical Microwave chain})=-3.2(3.7)\times 10^{-16}$
as measured with Optical Microwave chain and $y(\text{IT-Yb1/IT-CsF2, H-maser
chain})=-3.8(2.9)\times 10^{-16}$ measured with H-maser chain. The statistical
uncertainties are respectively $2.8\text{\times}{10}^{-16}$ and
$1.6\text{\times}{10}^{-16}$, derived from the instabilities shown in Fig. 3.
The weighted average of the two measurements is $y(\text{IT-Yb1/IT-
CsF2})=-3.6(2.7)\times 10^{-16}$, that corresponds to an absolute frequency
measurement of $f(\text{IT-
Yb1})=$518\,295\,836\,590\,863.44(14)\text{\,}\mathrm{H}\mathrm{z}$$.

The measurement is limited by the systematic uncertainty of IT-CsF2, including
the density shift calculations, that is $2.3\text{\times}{10}^{-16}$ (Table
2). The uncertainties of IT-Yb1 ($1.9\text{\times}{10}^{-17}$) and the
microwave-to-optical conversion at the combs are negligible. With more than
one year of data, the statistical uncertainty limited by the fountain
instability is reduced below the systematic contribution. In this way, we
avoided the need to increase the fountain measurement time by using the
H-maser as flywheel [45, 32, 29], and measurements using the H-maser chain and
the Optical Microwave chain are handled in the same way.

###  3.2 Gravitational coupling of fundamental constants

Clock comparisons have been used to constrain the variations of fundamental
constants [46, 47]. For example, violations of the Einstein equivalence
principle would result in changes in the frequency ratios of atomic clocks. As
a possible application, we investigate the coupling of our frequency
measurement to the gravitational potential of the sun [2, 48, 49, 50, 45]. We
fit the data in Fig. 2a to $y=y_{0}+A\cos\left(2\pi(t-t_{0})/T_{0}\right)$,
where $t$ is the date of measurement, $t_{0}$ is the date of the 2022
perihelion, and $T_{0}=$365.26\text{\,}\mathrm{d}$$ is the duration of the
anomalistic year. We find $A=-0.0(2.0)\times 10^{-16}$. The amplitude of the
annual variation of the gravitational potential is
$\Delta\Phi=$1.65\text{\times}{10}^{-10}$c^{2}$, where $c$ is the speed of
light. The coupling coefficient of the Yb/Cs ratio to the gravitational
potential is then found to be
$\beta_{\text{Yb,Cs}}=Ac^{2}/\Delta\Phi=-0.0(1.2)\times 10^{-6}$. This result
shows no violation of the Einstein equivalence principle and has a similar
uncertainty while being largely independent to the result in Ref. [50].
Following the same approach of Refs. [50, 45] it results in a constrain to the
gravitational coupling of the electron-to-proton mass ratio of
$k_{\mu}=-0.1(1.2)\times 10^{-6}$. This result can be improved by the
continuous long-term operation of frequency standards [47, 2].

##  4 Conclusions

In this paper, we report the measurement of the clock transition of IT-Yb1
against the primary Cs fountain clock IT-CsF2. The measurement result is
$f(\text{IT-
Yb1})=$518\,295\,836\,590\,863.44(14)\text{\,}\mathrm{H}\mathrm{z}$$ and the
total fractional uncertainty, limited by the systematic uncertainty of IT-
CsF2, is $2.7\text{\times}{10}^{-16}$. This is the absolute frequency
measurement of Yb against a Cs fountain with the lowest fractional
uncertainty. We also show the updated uncertainty budget of IT-Yb1 that has a
relative uncertainty of $1.9\text{\times}{10}^{-17}$. In Fig. 4 our
measurement reported as a red square is compared to the recommended secondary
representations of the second and previous absolute frequency measurements
[20, 21, 22, 23, 28, 24, 14, 29, 25, 26, 27, 19, 51], showing a good
agreement. Moreover, we note that this measurement supersedes the local
frequency measurement we reported in [19], as it extends the analysed data
period.

Figure 4: Absolute frequency of Yb performed in several metrological
institutes worldwide from 2009 up to now. In red the measurements of Yb
against a Cs fountain are shown, while in blue are reported the results of Yb
frequency measurements obtained with a link to TAI. The result of the
measurement described in this paper is shown as a red square. The grey solid
line and shaded area are respectively the recommended secondary representation
of the second and its uncertainty, given by CCTF.

These results are a strong demonstration of the improvements achieved in the
field of optical clocks and the consequent possibility of introducing a new
definition of the second.

This work is supported by: the European Metrology Program for Innovation and
Research (EMPIR) Projects 18SIB05 ROCIT and 20FUN08 Nextlasers, which have
received funding from the EMPIR programme co-financed by the Participating
States and from the European Union’s Horizon 2020 research and innovation
programme.

## References

  * [1] Akifumi Takamizawa, Shinya Yanagimachi and Ken Hagimoto  “First uncertainty evaluation of the cesium fountain primary frequency standard NMIJ-F2”  In _Metrologia_ 59.3 IOP Publishing, 2022, pp. 035004  URL: http://dx.doi.org/10.1088/1681-7575/ac5e7b
  * [2] J. Guena et al.  “Progress in atomic fountains at LNE-SYRTE”  In _IEEE Transactions on Ultrasonics, Ferroelectrics, and Frequency Control_ 59.3, 2012, pp. 391–409  DOI: 10.1109/TUFFC.2012.2208
  * [3] Ruoxin Li, Kurt Gibble and Krzysztof Szymaniec  “Improved accuracy of the NPL-CsF2 primary frequency standard: evaluation of distributed cavity phase and microwave lensing frequency shifts”  In _Metrologia_ 48.5, 2011, pp. 283  DOI: 10.1088/0026-1394/48/5/007
  * [4] Scott Beattie et al.  “First accuracy evaluation of the NRC-FCs2 primary frequency standard”  In _Metrologia_ 57.3 IOP Publishing, 2020, pp. 035010  URL: http://dx.doi.org/10.1088/1681-7575/ab7c54
  * [5] S Weyers et al.  “Advances in the accuracy, stability, and reliability of the PTB primary fountain clocks”  In _Metrologia_ 55.6 IOP Publishing, 2018, pp. 789–805  DOI: 10.1088/1681-7575/aae008
  * [6] A Jallageas et al.  “First uncertainty evaluation of the FoCS-2 primary frequency standard”  In _Metrologia_ 55.3 IOP Publishing, 2018, pp. 366  DOI: 10.1088/1681-7575/aab3fa
  * [7] J Guéna et al.  “First international comparison of fountain primary frequency standards via a long distance optical fiber link”  In _Metrologia_ 54.3 IOP Publishing, 2017, pp. 348–354  DOI: 10.1088/1681-7575/aa65fe
  * [8] I.. Blinov et al.  “Budget of Uncertainties in the Cesium Frequency Frame of Fountain Type”  In _Measurement Techniques_ 60.1, 2017, pp. 30–36  DOI: 10.1007/s11018-017-1145-z
  * [9] Fang Fang et al.  “NIM5 Cs fountain clock and its evaluation”  In _Metrologia_ 52.4 IOP Publishing, 2015, pp. 454–468  DOI: 10.1088/0026-1394/52/4/454
  * [10] Filippo Levi et al.  “Accuracy evaluation of ITCsF2: a nitrogen cooled caesium fountain”  In _Metrologia_ 51.3, 2014, pp. 270  URL: http://stacks.iop.org/0026-1394/51/i=3/a=270
  * [11] J Guéna, M Abgrall, A Clairon and S Bize  “Contributing to TAI with a secondary representation of the SI second”  In _Metrologia_ 51.1, 2014, pp. 108  URL: http://stacks.iop.org/0026-1394/51/i=1/a=108
  * [12] Kyle Beloy et al.  “Frequency ratio measurements at 18-digit accuracy using an optical clock network”  In _Nature_ 591.7851, 2021, pp. 564–569  URL: https://doi.org/10.1038/s41586-021-03253-4
  * [13] S.. Brewer et al.  “${}^{27}{\mathrm{Al}}^{+}$ Quantum-Logic Clock with a Systematic Uncertainty below ${10}^{-18}$”  In _Physical Review Letters_ 123 American Physical Society, 2019, pp. 033201  DOI: 10.1103/PhysRevLett.123.033201
  * [14] W.. McGrew et al.  “Atomic clock performance enabling geodesy below the centimetre level”  In _Nature_ 564.7734, 2018, pp. 87–90  URL: https://doi.org/10.1038/s41586-018-0738-2
  * [15] Ichiro Ushijima et al.  “Cryogenic optical lattice clocks”  In _Nature Photonics_ 9.3 Nature Publishing Group, 2015, pp. 185–189  URL: http://dx.doi.org/10.1038/nphoton.2015.5
  * [16] Patrick Gill  “Is the time right for a redefinition of the second by optical atomic clocks?”  In _Journal of Physics: Conference Series_ 723.1, 2016, pp. 012053  URL: http://stacks.iop.org/1742-6596/723/i=1/a=012053
  * [17] Jérôme Lodewyck  “On a definition of the SI second with a set of optical clock transitions”  In _Metrologia_ 56.5 IOP Publishing, 2019, pp. 055009  DOI: 10.1088/1681-7575/ab3a82
  * [18] Fritz Riehle, Patrick Gill, Felicitas Arias and Lennart Robertsson  “The CIPM list of recommended frequency standard values: guidelines and procedures”  In _Metrologia_ 55.2, 2018, pp. 188–200  URL: http://stacks.iop.org/0026-1394/55/i=2/a=188
  * [19] C. Clivati et al.  “Coherent Optical-Fiber Link Across Italy and France”  In _Phys. Rev. Applied_ 18.5 American Physical Society, 2022, pp. 054009  URL: https://link.aps.org/doi/10.1103/PhysRevApplied.18.054009
  * [20] N.. Lemke et al.  “Spin-$1/2$ Optical Lattice Clock”  In _Physical Review Letters_ 103.6 American Physical Society, 2009, pp. 063001  DOI: 10.1103/PhysRevLett.103.063001
  * [21] Takuya Kohno et al.  “One-Dimensional Optical Lattice Clock with a Fermionic 171Yb Isotope”  In _Applied Physics Express_ 2.7 The Japan Society of Applied Physics, 2009, pp. 072501  DOI: 10.1143/APEX.2.072501
  * [22] Masami Yasuda et al.  “Improved Absolute Frequency Measurement of the 171Yb Optical Lattice Clock towards a Candidate for the Redefinition of the Second”  In _Applied Physics Express_ 5.10 The Japan Society of Applied Physics, 2012, pp. 102401  DOI: 10.1143/APEX.5.102401
  * [23] Chang Yong Park et al.  “Absolute frequency measurement of 1S0($F=1/2$)-3P0($F=1/2$) transition of 171Yb atoms in a one-dimensional optical lattice at KRISS”  In _Metrologia_ 50.2, 2013, pp. 119  URL: http://stacks.iop.org/0026-1394/50/i=2/a=119
  * [24] Huidong Kim et al.  “Improved absolute frequency measurement of the 171 Yb optical lattice clock at KRISS relative to the SI second”  In _Japanese Journal of Applied Physics_ 56.5, 2017, pp. 050302  URL: http://stacks.iop.org/1347-4065/56/i=5/a=050302
  * [25] Takumi Kobayashi et al.  “Demonstration of the nearly continuous operation of an 171Yb optical lattice clock for half a year”  In _Metrologia_ 57.6 IOP Publishing, 2020, pp. 065021  DOI: 10.1088/1681-7575/ab9f1f
  * [26] Limeng Luo et al.  “Absolute frequency measurement of an Yb optical clock at the 10-16 level using international atomic time”  In _Metrologia_ , 2020  URL: http://iopscience.iop.org/10.1088/1681-7575/abb879
  * [27] Huidong Kim et al.  “Absolute frequency measurement of the 171Yb optical lattice clock at KRISS using TAI for over a year”  In _Metrologia_ 58.5 IOP Publishing, 2021, pp. 055007  URL: http://dx.doi.org/10.1088/1681-7575/ac1950
  * [28] Marco Pizzocaro et al.  “Absolute frequency measurement of the 1S0 $\rightarrow$ 3P0 transition of 171Yb”  In _Metrologia_ 54.1 IOP Publishing, 2017, pp. 102  DOI: 10.1088/1681-7575/aa4e62
  * [29] Marco Pizzocaro et al.  “Absolute frequency measurement of the 1S0 $\rightarrow$ 3P0 transition of 171Yb with a link to international atomic time”  In _Metrologia_ 57.3 IOP Publishing, 2020, pp. 035007  DOI: 10.1088/1681-7575/ab50e8
  * [30] Jacopo Grotti et al.  “Geodesy and metrology with a transportable optical clock”  In _Nature Physics_ 14.5, 2018, pp. 437–441  URL: https://doi.org/10.1038/s41567-017-0042-3
  * [31] Marco Pizzocaro et al.  “Intercontinental comparison of optical atomic clocks through very long baseline interferometry”  In _Nature Physics_ 17.2, 2021, pp. 223–227  URL: https://doi.org/10.1038/s41567-020-01038-6
  * [32] Nils Nemitz et al.  “Absolute frequency of 87Sr at $1.8\text{\times}{10}^{-16}$ uncertainty by reference to remote primary frequency standards”  In _Metrologia_ 58.2 IOP Publishing, 2021, pp. 025006  URL: http://dx.doi.org/10.1088/1681-7575/abc232
  * [33] Gregoire Vallet, Slawomir Bilicki, Rodolphe Le Targat and Jerome Lodewyck  “Study of Accuracy and Stability of Sr Lattice Clocks at LNE-SYRTE”  In _2018 Conference on Precision Electromagnetic Measurements (CPEM 2018)_ IEEE, 2018  DOI: 10.1109/cpem.2018.8500833
  * [34] R.. Brown et al.  “Hyperpolarizability and Operational Magic Wavelength in an Optical Lattice Clock”  In _Physical Review Letters_ 119 American Physical Society, 2017, pp. 253001  DOI: 10.1103/PhysRevLett.119.253001
  * [35] K. Beloy et al.  “Modeling motional energy spectra and lattice light shifts in optical lattice clocks”  In _Phys. Rev. A_ 101 American Physical Society, 2020, pp. 053416  DOI: 10.1103/PhysRevA.101.053416
  * [36] Nils Nemitz et al.  “Modeling light shifts in optical lattice clocks”  In _Phys. Rev. A_ 99 American Physical Society, 2019, pp. 033424  DOI: 10.1103/PhysRevA.99.033424
  * [37] Pierre Lemonde and Peter Wolf  “Optical lattice clock with atoms confined in a shallow trap”  In _Phys. Rev. A_ 72 American Physical Society, 2005, pp. 033409  DOI: 10.1103/PhysRevA.72.033409
  * [38] J.. Sherman et al.  “High-Accuracy Measurement of Atomic Polarizability in an Optical Lattice Clock”  In _Physical Review Letters_ 108 American Physical Society, 2012, pp. 153002  DOI: 10.1103/PhysRevLett.108.153002
  * [39] J. Lodewyck et al.  “Observation and cancellation of a perturbing dc stark shift in strontium optical lattice clocks”  In _IEEE Trans. Ultrason., Ferroelect., Freq. Cont._ 59.3, 2012, pp. 411–415  DOI: 10.1109/tuffc.2012.2209
  * [40] Jacques Millo et al.  “Ultralow noise microwave generation with fiber-based optical frequency comb and application to atomic fountain clock”  In _Appl. Phys. Lett._ 94, 2009, pp. 141105  DOI: 10.1063/1.3112574
  * [41] Burghard Lipphardt, Vladislav Gerginov and Stefan Weyers  “Optical Stabilization of a Microwave Oscillator for Fountain Clock Interrogation”  In _IEEE Transactions on Ultrasonics, Ferroelectrics, and Frequency Control_ 64.4, 2017, pp. 761–766  DOI: 10.1109/TUFFC.2017.2649044
  * [42] Consultative Committee for Time and Frequency (CCTF)  “Recommendation CCTF PSFS 2: Updates to the CIPM list of standard frequencies”, 2021  URL: https://www.bipm.org/en/committees/cc/cctf/22-_2-2021
  * [43] Jérôme Lodewyck et al.  “Universal formalism for data sharing and processing in clock comparison networks”  In _Phys. Rev. Research_ 2.4 American Physical Society, 2020, pp. 043269  URL: https://link.aps.org/doi/10.1103/PhysRevResearch.2.043269
  * [44] H S Margolis and P Gill  “Least-squares analysis of clock frequency comparison data to deduce optimized frequency and frequency ratio values”  In _Metrologia_ 52.5, 2015, pp. 628–634  URL: http://stacks.iop.org/0026-1394/52/i=5/a=628
  * [45] R. Schwarz et al.  “Long term measurement of the ${}^{87}\mathrm{Sr}$ clock frequency at the limit of primary Cs clocks”  In _Phys. Rev. Research_ 2 American Physical Society, 2020, pp. 033242  DOI: 10.1103/PhysRevResearch.2.033242
  * [46] Christian Sanner et al.  “Optical clock comparison for Lorentz symmetry testing”  In _Nature_ 567.7747, 2019, pp. 204–208  URL: https://doi.org/10.1038/s41586-019-0972-2
  * [47] R. Lange et al.  “Improved Limits for Violations of Local Position Invariance from Atomic Clock Comparisons”  In _Phys. Rev. Lett._ 126.1 American Physical Society, 2021, pp. 011102  URL: https://link.aps.org/doi/10.1103/PhysRevLett.126.011102
  * [48] V.. Dzuba and V.. Flambaum  “Limits on gravitational Einstein equivalence principle violation from monitoring atomic clock frequencies during a year”  In _Phys. Rev. D_ 95.1 American Physical Society, 2017, pp. 015019  URL: https://link.aps.org/doi/10.1103/PhysRevD.95.015019
  * [49] Neil Ashby, Thomas E. Parker and Bijunath R. Patla  “A null test of general relativity based on a long-term comparison of atomic transition frequencies”  In _Nature Physics_ 14.8, 2018, pp. 822–826  URL: https://doi.org/10.1038/s41567-018-0156-2
  * [50] W.. McGrew et al.  “Towards the optical second: verifying optical clocks at the SI limit”  In _Optica_ 6.4 OSA, 2019, pp. 448–454  DOI: 10.1364/OPTICA.6.000448
  * [51] Takumi Kobayashi et al.  “Search for Ultralight Dark Matter from Long-Term Frequency Comparisons of Optical and Microwave Atomic Clocks”  In _Phys. Rev. Lett._ 129 American Physical Society, 2022, pp. 241301  DOI: 10.1103/PhysRevLett.129.241301


# SafetyNet: Safe planning for real-world self-driving vehicles
using machine-learned policies

Matt Vitelli∗, Yan Chang∗, Yawei Ye∗, Maciej Wołczyk, Błażej Osiński,
Moritz Niendorf, Hugo Grimmett, Qiangui Huang, Ashesh Jain, Peter Ondruska+
∗ Equal contribution.+ Authors are with Toyota, Woven Planet, Level 5 self-
driving division {matthew.vitelli, yan.chang, yawei.ye, maciej.wolczyk,
blazej.osinski, moritz.niendorf, hugo.grimmett, qiangui.huang, ashesh.jain,
peter.ondruska<EMAIL_ADDRESS>Videos are available at safety.l5kit.org

###### Abstract

In this paper we present the first safe system for full control of self-
driving vehicles trained from human demonstrations and deployed in
challenging, real-world, urban environments. Current industry-standard
solutions use rule-based systems for planning. Although they perform
reasonably well in common scenarios, the engineering complexity renders this
approach incompatible with human-level performance. On the other hand, the
performance of machine-learned (ML) planning solutions can be improved by
simply adding more exemplar data. However, ML methods cannot offer safety
guarantees and sometimes behave unpredictably. To combat this, our approach
uses a simple yet effective rule-based fallback layer that performs sanity
checks on an ML planner’s decisions (e.g. avoiding collision, assuring
physical feasibility). This allows us to leverage ML to handle complex
situations while still assuring the safety, reducing ML planner-only
collisions by 95%. We train our ML planner on 300 hours of expert driving
demonstrations using imitation learning and deploy it along with the fallback
layer in downtown San Francisco, where it takes complete control of a real
vehicle and navigates a wide variety of challenging urban driving scenarios.

##  I Introduction

Self-Driving Vehicles (SDVs) have the promise to revolutionize several
industries including people and goods transportation. However, the development
of L4+ SDVs has proved to be a significant challenge. Today, the main
bottleneck is the vehicle’s ability to safely handle the ‘long tail’ of
driving events [1]. World-class SDVs can handle common situations, but can
behave unsafely in the many, rarely-occurring scenarios that are encountered
on the road.

In the self-driving stack, the _planning_ module is most responsible for this
bottleneck. It determines what the SDV should do in any given situation. A
traditional _rule-based_ planning approach selects a trajectory that minimizes
a hand-engineered loss function. In order to improve its performance,
engineers must design new terms in that loss function or re-tune their
respective weights, for each driving scenario. This process is expensive and
scales poorly to new geographies. Unlike perception, planning has benefited
little from modern machine learning techniques, which leverage large
quantities of data in order to avoid the hand-engineering of rules.

Figure 1: _Top:_ SafetyNet is the best-of-both combination of ML planning that
improves with data, and rule-based safety and legality guarantees from the
fallback layer. _Bottom:_ an example of SafetyNet deployed to control a real-
world self-driving vehicle on the streets of San Francisco.

Recently, the work of [2] has demonstrated the first machine-learned policies
for autonomous driving learned directly from human demonstrations. These
approaches, although they scale much better than the hand-engineering method,
do not provide the interpretability and safety guarantees required to safely
deploy these systems in production.

In this work we propose SafetyNet: the first autonomous driving system to
combine the strengths of an ML planner with the interpretable safety of a
rule-based system, road-tested in busy San Francisco. The ML component is a
high-capacity planning policy trained from expert demonstrations, and its
performance scales with the amount of training data without the need for
costly behavior engineering. To improve system safety, decisions of the ML
planner pass through a lightweight _fallback layer_ : a simple, rule-based
system that tests the decisions against a small set of checks, and can
minimally modify them to improve safety if required. This allows SafetyNet to
transparently enforce safety and legality constraints, such as avoiding
collisions, road rules violations, while simultaneously maximizing comfort
metrics.

This combination outperforms ML-only systems and allows us to _safely_ deploy
an ML planning system in the busy streets of San Francisco, constituting the
first demonstration of its kind. Our system exhibits a variety of maneuvers
such as lane-following, keeping the distance to other vehicles, and navigating
intersections without impeding the safety of the vehicle and other traffic
participants.

Our contributions are three-fold:

  1. 1.

The first combination of machine learning and a lightweight hand-engineered
system to control a self-driving vehicle that learns from data while offering
safety and legality guarantees.

  2. 2.

The first evaluation of such a system in the challenging, real-world, urban
environment of downtown San Francisco.

  3. 3.

The source code will be provided to the public to encourage the advancement of
the field111The source code for the ML planner and a reference implementation
of the fallback layer will be available at safety.l5kit.org..

##  II Related works

Figure 2: The neural network architecture of the presented ML planning model
is inspired by VectorNet [3]. The vectorized information on each agent and map
element is encoded by a PointNet network. This local information is combined
by a Transformer into global embedding. The embedding is later translated into
actions via kinematic decoder.

Trajectory optimization-based planning. Traditional trajectory optimization-
based planning systems are widely used in both academia and industry[4, 5, 6,
7]. Here the motion planning task is formulated as an optimization problem,
usually by hand-engineering a cost function. The optimal trajectory is then
generated by minimizing this cost using optimization algorithms, such as A*
search-based methods [5, 8], sampling-based methods [9, 10, 11], dynamic
programming [7] or combinations thereof that decompose the problem in a
hierarchical fashion [12].

However, it is very difficult to hand-craft an objective function that
provides a human-like trade-off between comfort, safety, and route progress
over a wide variety of driving situations[13]. In comparison, encoding certain
hard constraints, e.g. obstacles avoidance, physical feasibility, requires far
less engineering. Therefore, building a lightweight hand-engineered system
whose only purpose is to detect and correct infeasible trajectories is much
simpler and more scalable.

Additionally, these hand-engineered approaches do not improve with data, and
their performance does not generalize well in highly unstructured urban
scenarios. Therefore, tremendous engineering efforts are needed to fine-tune
them, in particular when expanding to a new operational design domain (ODD) or
new geographies.

Machine-learned planning. Recently, ML planning has gained attention due to
successes in deep learning. This approach has the advantage of avoiding hand-
crafted rules and scales well with data, thus performing better and better as
more data is used for training. Therefore, this approach has great potential
to handle a wide variety of driving situations [2, 14, 15, 16]. Next, we
introduce the two most commonly used ML paradigms for motion planning.

(1) Imitation learning (IL). IL is a supervised learning approach in which a
model is trained to mimic expert behavior. The first application of IL to
autonomous driving was the seminal ALVINN[17] back in 1989, which mapped the
sensor data to steering and performed rural road following. More recently,
[14, 16] demonstrated end-to-end driving using multiple-camera input alone,
but the real-world driving results are limited to simple tasks such as lane
follow or urban driving with light traffic. ChauffeurNet[2] proposed to apply
IL on a bird’s eye view of a scene and use synthetic perturbations to
alleviate the covariate shift problem [18], but it is yet to be tested in
real-world urban environments.

(2) RL & IRL. Reinforcement learning (RL) is well-suited for sequential
decision processes such as self-driving as it handles the interaction between
the agent and the environment. Several methods[19, 20, 21] have been proposed
to apply RL to autonomous driving. In particular [19] proposes combining
learned and rule-based components, similarly to us, but the reported results
are only from simulation. On the other hand, inverse reinforcement learning
(IRL)[22, 23] is another popular ML paradigm applied to autonomous driving,
which infers the underlying reward function based on expert demonstrations as
well as a model of the environment. However, all these methods are yet to be
evaluated in real-world urban driving.

The ML planning approaches introduced above, although very promising, do not
provide safety guarantees, which prevent them to be deployed at scale in the
real world. We are inspired by this paradigm but aim to mitigate this
limitation by the SafetyNet proposed in this paper.

Hybrid approaches. The combination of ML and traditional motion planning
techniques falls mostly into two categories: _ML-based heuristics_ , which are
leveraged to improve traditional planning algorithms, e.g. in terms of speed
up [24, 25, 26, 27]. _Modular approaches_ , where expert planners are
leveraged to generate the trajectory candidates, e.g., by evaluating
trajectories against a ML-based cost volume [15, 28]. The latter of these
works, [28] also provides safety guarantees based on imposing a very high cost
on trajectories leading to a potential collision. These safety guarantees were
not however verified in the real world.

Another specific area of research that has emerged in this field is the study
of safety frameworks [29, 30]. While this work is relevant, our goal is not to
propose a comprehensive framework for safety, but rather a simple yet
effective method that allows for the deployment of a powerful neural network
planner that learns and improves with data while ensuring certain safety and
legality constraints.

SafetyNet leverages the strengths of the expert system to guarantee certain
determinism, legality, and safety rules for specific scenarios while relying
on the machine-learned motion planner for nominal trajectory generation.

##  III Hybrid ML planning system

In this section we describe SafetyNet, our system for combining a machine-
learned motion planner with an effective fallback layer to deliver a
trajectory planning system for SDVs. Instead of relying on hand-engineered
driving rules, this system learns to drive from expert driving demonstrations
while guaranteeing certain interpretable safety constraints, such as avoidance
of collisions and adherence to traffic rules.

The SafetyNet system is outlined in Fig. 1. It is composed of an ML neural
policy network (“ML Planner”) $\mathcal{M}$ that takes as input $I$ the
environment state around the SDV and produces an intended trajectory
$\bar{\tau}$ to be taken by SDV. This trajectory is validated to obey the
required constraints and in the case it does not satisfy them the closest
trajectory $\tau^{i}$ is taken from a set of safe trajectory candidates.

###  III-A Input and Output

Input representation. The input data is encoded in an ego-centric frame of
reference where the SDV is always at a fixed location relative to a frame. As
shown in Fig. 2, the input to our model consists of:

  1. 1.

SDV: the current and past poses of the SDV and its size.

  2. 2.

Agents: the current and past poses of perceived agents, their sizes, and
object type (e.g. vehicle, pedestrian, cyclist) produced by the SDV’s
perception system.

  3. 3.

Static map elements: road network from High Definition (HD) maps including
lanes, cross-walks, stop lines, localized using the SDV’s localization system.

  4. 4.

Dynamic map elements: traffic light states, and static obstacles detected by
the perception system (e.g. construction zones).

  5. 5.

Route: the intended global route that the SDV should follow.

We use a vectorized input representation based on [3] to encode the perception
outputs and map elements to vector sets. Each element includes a pose relative
to the SDV pose, as well as additional features, such as the element type,
time of observation.

Output representation. We define a trajectory $\tau$ as a sequence of $T$
discrete states separated uniformly in time by $\Delta t$. Each state $s_{t}$
is defined as:

$s_{t}=\\{x_{t},y_{t},\theta{{}_{t}},v_{t},a_{t},k_{t},j_{t}\\}.$ (1)

where $x_{t},y_{t},\theta{{}_{t}}$ correspond to the pose of the rear axle of
the SDV w.r.t. a fixed coordinate frame at time $t$ and
$v_{t},a_{t},k_{t},j_{t}$ correspond to the velocity, longitudinal
acceleration, curvature and jerk respectively.

###  III-B ML planner

Figure 3: Safety (_top_) and comfort (_bottom_) events as a function of dataset size for the ML planner (with and without the fallback layer). We see that the addition of the fallback layer significantly improves every metric, save passiveness. We note that the number of collisions is not decreasing quickly as the ML planner is trained on more data, but despite this the fallback layer ensures a high level of safety. | Average Displacement Error [m]
---|---
Training set size | @1s | @2s | @3s | @4s
5h | 0.24 | 0.90 | 1.70 | 2.52
50h | 0.14 | 0.51 | 0.98 | 1.53
150h | 0.12 | 0.40 | 0.77 | 1.22
300h | 0.11 | 0.37 | 0.73 | 1.18
Table I:  Open-loop performance trend with increasing training set size. The
open-loop prediction error improves when trained with more data.

The ML planning component of our system takes the input $I$ capturing the
states around the SDV and outputs the trajectory $\bar{\tau}$ to be executed.

Model architecture. Inspired by [3], our model is built on a hierarchical
graph network-based architecture as shown in Fig. 2. It consists of a
PointNet-based [31] local subgraph for processing local information from
vectorized inputs and a global graph using a Transformer encoder [32] for
reasoning about interactions over agents and map features.

To ensure the predicted trajectories are physically feasible, we introduce a
kinematic decoder, which models the vehicle kinematic using a unicycle model
[6]. First, a 3-layer multilayer perceptron (MLP) is added after the
Transformer encoder, which predicts longitudinal jerk $j_{1:T}$ and curvature
$k_{1:T}$ for each time step within the prediction horizon $T$. Then a
kinematic layer takes the predictions as well as the current ego state to roll
out the next state of the ego:

$s_{t+1}=f(s_{t},k_{t},j_{t},\gamma),$ (2)

where ${f}$ is the update function of the kinematic model, ${\gamma}$
comprises a set of parameters for vehicle kinematic constraint, including the
maximum allowed jerk, acceleration, curvature and steering angle, which are
used to clip controls to ensure physical feasibility.

Inspired by the deep kinematic model introduced in [33], we implement ${f}$ as
follows:

$s_{t+1}=s_{t}+\dot{s_{t}}\Delta{t},$ (3)

where the state derivatives are computed as follows:

$\begin{split}&\dot{x_{t}}=v_{t}\cos{\theta{{}_{t}}},\;\dot{y_{t}}=v_{t}\sin{\theta{{}_{t}}},\\\
&\dot{\theta{{}_{t}}}={k_{t}}v_{t},\;\dot{v_{t}}=a_{t},\;\dot{a_{t}}=j_{t}.\\\
\end{split}$ (4)

Training framework. We use imitation learning to train a driving policy that
mimics expert driving behavior by minimizing the L1 loss between the poses
generated by the model and the ground truth poses. Following [2], we include
perturbations to extend the distribution of states seen during the training
and thus reduce the impact of the covariate shift [17, 18]. Although previous
work used a pre-solver to smooth the target trajectory after applying
perturbations, we can skip that thanks to the fact that we are using a
kinematic decoder. Instead, we can simply penalize large values of jerk and
curvature to reduce jerk and improve driving comfort. The final loss is then:

$L=\sum_{t=1}^{T}\|p_{t}-\hat{p}_{t}\|_{1}+\alpha\|k_{t}\|_{2}+\beta\|j_{t}\|_{2},$
(5)

where $p_{t}$ is the predicted pose $(x_{t},y_{t},\theta_{t})$ at time $t$,
$\hat{p_{t}}$ is the target pose, and $\alpha$ and $\beta$ are
hyperparameters.

###  III-C Fallback Layer

After generating an ML trajectory, our system evaluates it along several
dimensions for dynamic feasibility, legality, and collision probability, and
determines a trajectory label {Feasible, Infeasible}. We describe these next.

Dynamic feasibility. We evaluate whether the input trajectory remains within a
feasible envelope characterized by the SDV’s dynamics limits. Concretely, we
evaluate each trajectory state and check whether the parameters, including
longitudinal jerk, longitudinal acceleration, curvature, curvature rate,
lateral acceleration, and steering jerk (curvature rate $\times$ velocity) are
within reasonable bounds.

The bounds for those parameters were obtained from real-world vehicle testing.
In practice, we typically use more conservative limits for jerk, longitudinal
acceleration, and lateral acceleration to remain within comfortable limits.

Legality. For a given trajectory, we evaluate whether it is violating the
traffic rules. A trajectory will be labeled as Infeasible if any of the
following violations happens:

  * •

Running the stop sign,

  * •

Violation of the right of way,

  * •

Running a red traffic light,

  * •

Leaving the drivable surface.

Collision likelihood. We check each state in the given trajectory for
collisions with predicted poses of other agents from an in-house prediction
module. Collision detection is performed by rasterizing future agent
predictions and checking for overlaps with planned ego poses. Additionally, we
also check for longitudinal distance, time-to-collision, and time headway
violations along the trajectory. If any of the collision likelihood checks
fail, the trajectory is labeled as Infeasible.

Fallback trajectory generation. Assuming the ML trajectory is labeled as
Feasible, we will directly execute it. If the trajectory is labeled as
Infeasible, we select a feasible fallback trajectory as close as possible to
the ML trajectory.

For this we use a trajectory generation method based on [34], generating a
number of lane-aligned trajectory candidates $\tau^{i}$. These candidates
consist of speed keeping, distance keeping, and emergency stopping maneuvers.
Our implementation can be easily adapted to specific scenarios of interest.

Each of the generated trajectories is checked for feasibility as described
above and the trajectory candidate which is most similar to the ML trajectory
is selected for execution:

$\tau=\operatorname*{argmin}_{\tau^{i}}\|\bar{\tau}-\tau^{i}\|_{2}.$ (6)

##  IV Experiments

| # events per 1k miles
---|---
Planner Type | Collisions | Close Calls | Discomfort Braking | Passiveness | Deviation from Route
ML Planner | 91.5 | 74.5 | 312.8 | 213.9 | 0.0
ML Planner + Fallback Layer | 4.6 | 45.0 | 24.2 | 277.0 | 0.0
_Change Rate_ | -95% | -40% | -92.3% | +29.5% | 0%
Table II: Comparing the performance of an ML-Planner-only approach vs
SafetyNet, in closed-loop evaluation. This shows that SafetyNet significantly
reduces collisions, close calls, and discomfort breaking, at the expense of
more passiveness. See Fig. 5 for some qualitative examples.

In this section we evaluate our system across several dimensions: (a) the
performance of the ML planner in simulation when trained on an increasing
amount of data (no fallback layer), (b) the effectiveness of the fallback
layer in simulation, and (c) the performance of SafetyNet in the real world
when controlling a real vehicle in San Francisco. We start by describing the
datasets and metrics used during the evaluation.

###  IV-A Data

We created an in-house dataset to train and evaluate our system: 380 hours of
urban driving collected in Palo Alto and San Francisco. It contains a wide
range of driving scenarios in a densely populated urban environment. The
dataset consists of 25 second _scenes_ , which capture the perception output,
the SDV trajectory, and HD maps. We partition the dataset into 300h for
training and 80h for testing.

###  IV-B Metrics

We validate our planner using large-scale real-world driving dataset with
closed-loop simulation. During simulation, we execute the planner and motion
controller modules and simulate the SDV motion. The vehicle model is
calibrated to the real-world SDV. Since the simulated SDV pose can diverge
significantly from the logged pose in the dataset, we allow the other road
_agents_ to be reactive in their longitudinal behavior, avoiding collisions
while preserving their trajectories from the dataset.

To evaluate the closed-loop performance of the model, for each scene in the
test set we simulate the SDV by unrolling the driving policy for the full
duration of the scene and detect the following binary events:

  1. 1.

_Collisions_ : the simulated SDV is $<$5cm from the road boundaries, static
obstacles, or agents.

  2. 2.

_Close-calls_ : the simulated SDV has no collision, but either gets within
25cm of another agent, has a time-to-collision $<$1.5s, or has a time headway
to another agent $<$1s.

  3. 3.

_Discomfort braking_ : the simulated SDV’s jerk drops below $-5$m/s3.

  4. 4.

_Passiveness_ : the simulated SDV travels slower than its behavior in the
dataset by $<-$5m/s and it is spatially behind its dataset position.

  5. 5.

_Off road events_ : the simulated SDV deviates from the dataset route center
line by $>$10m.

After identifying the events in each scene, we aggregate them, normalizing by
the number of miles driven in the simulations. All metrics are reported as the
total number of events per 1000 miles.

Additionally, to evaluate the open-loop performance, we compute the Average
Displacement Error (ADE) between the position of the simulated SDV and the
dataset position. This gives us insight into trajectory similarity between
simulation and the dataset (see Table I).

Finally, we test how the system performs in the real world by deploying it in
downtown San Francisco. We evaluate the ML planner performance via how often
the fallback trajectory is used and we provide qualitative examples.

###  IV-C Effect of dataset size

For this experiment, the fallback layer is disabled, and the ML planner’s
trajectory is always executed. We evaluate the performance of various ML
planners trained with varying dataset sizes: {5, 50, 150, 300} hours in
simulation.

Looking at the dashed lines in Fig. 3 (w/o fallback) we observe that the
closed-loop performance across all safety and comfort metrics increases with
training set size, and that more data should continue improving performance,
albeit slowly. Models trained on $<$50h produce unstable driving policies that
have significantly more collisions, off-route events, or even cases where the
SDV remains completely still (passiveness). When dataset size is increased to
300 hours, performance improves significantly and the learned driving policy
is able to reduce collisions, close-call and discomfort brakes, and reliably
follows the route. In terms of passiveness, performance plateaus, which we
attribute to causal confusion inherent to open-loop training [35]. Similarly,
the average displacement error (ADE) of the open-loop predictions keeps
improving when trained with more data, as shown in Table I.

###  IV-D Effect of fallback layer

Figure 4: The distribution of causes for a fallback trajectory to be used over
the ML Planner trajectory. Figure 5: Examples of when the fallback layer
prevented unsafe behavior caused by the ML planner. _[Top]_ avoiding collision
with a bus, _[middle]_ running a red light, and _[bottom]_ ensuring yielding
to vehicle with right-of-way. We report the unsafe trajectory in column (b),
and SafetyNet safe trajectory in column (c).

Now we evaluate the effectiveness of the fallback layer in simulation by
comparing the SafetyNet performance with, and without the fallback layer
enabled. Here the ML planner is trained on the full 300h dataset. As shown in
Tab. II, collisions are reduced by 95%, close call events by 40%, and
discomfort braking by 92% when the fallback layer is enabled. This clearly
demonstrates the value of the fallback layer and its importance for real world
deployment. Crucially, we see that the solid lines in Fig. 3 (w/ fallback) are
close to zero regardless of the maturity of the ML planner. This indicates
that, with our method, we can safely deploy not only well-performing ML
planners, but even immature ones (trained on $<$50h of data), thus
facilitating faster development and evaluation cycle.

We note that there is also a 29.5% increase in passive behavior when the
fallback layer is enabled, due to the fact that the SDV drives more
conservatively. We see this as a necessary trade-off for reducing collisions
and close calls.

In Fig. 4 we show the distribution of events that trigger the fallback
trajectory to be used during simulation. The main causes for fallback
behaviors are the ML trajectory leaving the drivable surface, contacting
dynamic agent predictions, infeasible distance gap with other agents,
infeasible steering jerk, and contact with static obstacles. By manually
triaging these ML planner failure cases, we see (a) contact lane boundary
issues are a result of the ML planner cutting corners too closely, and (b)
collisions are caused by the network not paying enough attention to the size
of the large vehicles and assuming that vehicles are of similar size (Fig. 5,
_top_). Moreover, near traffic light intersections the ML planner occasionally
generates trajectories that do not properly yield to oncoming traffic (Fig. 5,
_bottom_). It is caused by the synthetic perturbations applied to the ego
poses during training. Note that in all these examples, the fallback layer
successfully prevented collisions from happening.

###  IV-E Failure cases

There is still a small proportion of the ML planner failures that are not
caught by SafetyNet. This is mostly because the current fallback layer
implementation does not limit the proximity of the SDV to lane boundaries, and
does not fully compensate for the uncertainty in the prediction of behavior of
other agents. In Fig. 6 we see that the most recent feasible ML trajectory has
brought the SDV close to the lane boundary and simultaneously the oncoming
vehicle has a sudden change of velocity. With this combination of factors, the
fallback trajectory fails to assure a comfortable lateral distance from the
oncoming vehicle.

Figure 6: A SafetyNet failure case in simulation. Two simultaneous situations
(SDV driving close to dividing line, and a sudden change in velocity of the
oncoming vehicle) combine to reveal an issue in the implementation of the
system.

Figure 7: Examples of successful ML planner behavior (no fallback trajectory
was used) in the real world. _Top:_ merging, _middle:_ yielding to
pedestrians, and _bottom:_ nudging around a parked car.

###  IV-F Real world testing

Finally, we extensively tested SafetyNet with ML planner (trained on 300
hours), in the real world, in densely populated downtown San Francisco, under
the supervision of human safety drivers. During the 150+ mile public road
testing, the model successfully performed a wide variety of challenging
maneuvers including lane-following, merging, yielding to pedestrians or
nudging around parked cars (Fig. 7). At the same time, the fallback layer
assured the safety of the overall system, taking control for around 7.9% of
the total driving time. This confirms our hypothesis that although the ML
planner is able to perform complex maneuvers and drive safely for most of the
time ($>$90%), an additional layer of safety is required in certain
situations. We refer the reader to the accompanying video for a more thorough
analysis.

##  V Conclusions

We present SafetyNet, a method for combining ML planners with a rule-based
system fallback layer to provide safe driving in challenging, real-world urban
environments. We have demonstrated the very significant improvements in safety
and comfort metrics compared to a purely machine-learning-based system, both
in simulation as well as in challenging San Francisco streets. This approach
makes it possible to safely use learned planners in the real world, and
benefit from their ability to improve with the data and handle more complex
situations than their purely rule-based counterparts. We believe that teams
starting to explore ML planning methods, and even those with state-of-the-art
ML planning solutions [2, 16, 15] would benefit from incorporating a SafetyNet
system. In effect, SafetyNet may facilitate the development of machine-
learning-based planners and their wider adoption in the AV industry.

We see many exciting opportunities for further development. The fallback layer
can be refined to be less conservative and not increase passiveness. In terms
of the ML planner, the presented approach is relatively simple, based on
imitation learning. It can be improved by drawing from recent advancements in
model-based Reinforcement Learning (RL) [36], offline RL [37], or closed-loop
training in a data-driven simulation [38].

##  VI Acknowledgements

We would like to thank following contributors who work on Autonomy 2.0 at
Level 5: Luca Bergamini, Sergey Zagoruyko, Ana Ferreira, Oliver Scheel,
Stefano Pini, Christian Perone, Lukas Platinsky, Jasper Friedrichs, Jared
Wood, Yilun Chen and Alex Ozark.

## References

  * [1] A. Jain, L. D. Pero, H. Grimmett, and P. Ondruska, “Autonomy 2.0: Why is self-driving always 5 years away?” 2021.
  * [2] M. Bansal, A. Krizhevsky, and A. Ogale, “Chauffeurnet: Learning to drive by imitating the best and synthesizing the worsts,” in _Proceedings of Robotics: Science and Systems XV_ , 2019.
  * [3] J. Gao, C. Sun, H. Zhao, Y. Shen, D. Anguelov, C. Li, and C. Schmid, “VectorNet: Encoding HD maps and agent dynamics from vectorized representation,” in _IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)_ , June 2020.
  * [4] M. Montemerlo, J. Becker, S. Bhat, H. Dahlkamp, D. Dolgov, S. Ettinger, D. Hähnel, T. Hilden, G. Hoffmann, B. Huhnke, D. Johnston, S. Klumpp, D. Langer, A. Levandowski, J. Levinson, J. Marcil, D. Orenstein, J. Paefgen, I. Penny, and S. Thrun, “Junior: The stanford entry in the urban challenge.” 2009, pp. 91–123.
  * [5] M. Buehler, K. Iagnemma, and S. Singh, _The DARPA Urban Challenge: Autonomous Vehicles in City Traffic_. Springer, 2009.
  * [6] B. Paden, M. Čáp, S. Z. Yong, D. Yershov, and E. Frazzoli, “A survey of motion planning and control techniques for self-driving urban vehicles,” _IEEE Transactions on intelligent vehicles_ , vol. 1, no. 1, pp. 33–55, 2016\.
  * [7] H. Fan, F. Zhu, C. Liu, L. Zhang, L. Zhuang, D. Li, W. Zhu, J. Hu, H. Li, and Q. Kong, “Baidu apollo em motion planner,” 07 2018.
  * [8] Z. Ajanovic, B. Lacevic, B. Shyrokau, M. Stolz, and M. Horn, “Search-based optimal motion planning for automated driving,” _2018 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)_ , pp. 4523–4530, 2018.
  * [9] J. J. K. Jr. and S. M. Lavalle, “Rrt-connect: An efficient approach to single-query path planning,” in _Int. Conf. on Robotics and Automation_ , 2000.
  * [10] S. Karaman and E. Frazzoli, “Sampling-based algorithms for optimal motion planning,” _The International Journal of Robotics Research_ , vol. 30, no. 7, pp. 846–894, 2011.
  * [11] T. Bandyopadhyay, K. S. Won, E. Frazzoli, D. Hsu, W. S. Lee, and D. Rus, “Intention-aware motion planning,” in _Algorithmic Foundations of Robotics X_ , E. Frazzoli, T. Lozano-Perez, N. Roy, and D. Rus, Eds., 2013.
  * [12] J. Wei, J. M. Snider, T. Gu, J. M. Dolan, and B. Litkouhi, “A behavioral planning framework for autonomous driving,” in _2014 IEEE Intelligent Vehicles Symposium Proceedings_. IEEE, 2014, pp. 458–464.
  * [13] Y. Chang, S. Omari, and M. S. Vitelli, “Systems and methods for determining vehicle trajectories directly from data indicative of human-driving behavior,” Jun. 10 2021, uS Patent App. 16/706,307.
  * [14] M. Bojarski, D. D. Testa, D. Dworakowski, B. Firner, B. Flepp, P. Goyal, L. D. Jackel, M. Monfort, U. Muller, J. Zhang, X. Zhang, J. Zhao, and K. Zieba, “End to end learning for self-driving cars,” 2016.
  * [15] W. Zeng, W. Luo, S. Suo, A. Sadat, B. Yang, S. Casas, and R. Urtasun, “End-to-end interpretable neural motion planner,” in _IEEE International Conference on Computer Vision and Pattern Recognition (CVPR)_ , 2019\.
  * [16] J. Hawke, R. Shen, C. Gurau, S. Sharma, D. Reda, N. Nikolov, P. Mazur, S. Micklethwaite, N. Griffiths, A. Shah, and A. Kendall, “Urban driving with conditional imitation learning,” _2020 IEEE International Conference on Robotics and Automation (ICRA)_ , pp. 251–257, 2020.
  * [17] D. A. Pomerleau, “Alvinn: An autonomous land vehicle in a neural network,” in _Advances in Neural Information Processing Systems_ , vol. 1, 1989.
  * [18] S. Ross, G. J. Gordon, and J. Bagnell, “A reduction of imitation learning and structured prediction to no-regret online learning,” in _International Conference on Artificial Intelligence and Statistics_ , 2011.
  * [19] S. Shalev-Shwartz, S. Shammah, and A. Shashua, “Safe, multi-agent, reinforcement learning for autonomous driving,” _arXiv preprint arXiv:1610.03295_ , 2016.
  * [20] M. Riedmiller, M. Montemerlo, and H. Dahlkamp, “Learning to drive a real car in 20 minutes,” in _2007 Frontiers in the Convergence of Bioscience and Information Technologies_. IEEE, 2007, pp. 645–650.
  * [21] A. Kendall, J. Hawke, D. Janz, P. Mazur, D. Reda, J.-M. Allen, V.-D. Lam, A. Bewley, and A. Shah, “Learning to drive in a day,” in _International Conference on Robotics and Automation (ICRA)_. IEEE, 2019, pp. 8248–8254.
  * [22] B. D. Ziebart, A. L. Maas, J. Bagnell, and A. Dey, “Maximum entropy inverse reinforcement learning,” in _AAAI_ , 2008.
  * [23] M. Wulfmeier, P. Ondruska, and I. Posner, “Maximum entropy deep inverse reinforcement learning,” _arXiv: Learning_ , 2015.
  * [24] A. H. Qureshi, A. Simeonov, M. J. Bency, and M. C. Yip, “Motion planning networks,” in _2019 International Conference on Robotics and Automation (ICRA)_ , 2019, pp. 2118–2124.
  * [25] O. Arslan and P. Tsiotras, “Machine learning guided exploration for sampling-based motion planning algorithms,” in _2015 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)_ , 2015, pp. 2646–2652.
  * [26] H.-T. L. Chiang, J. Hsu, M. Fiser, L. Tapia, and A. Faust, “Rl-rrt: Kinodynamic motion planning via learning reachability estimators from rl policies,” _IEEE Robotics and Automation Letters_ , vol. 4, no. 4, pp. 4298–4305, 2019.
  * [27] H. Pulver, F. Eiras, L. Carozza, M. Hawasly, S. Albrecht, and S. Ramamoorthy, “Pilot: Efficient planning by imitation learning and optimisation for safe autonomous driving,” _arXiv preprint arXiv:2011.00509_ , 2020.
  * [28] S. Casas, A. Sadat, and R. Urtasun, “Mp3: A unified model to map, perceive, predict and plan,” in _IEEE/CVF International Conference on Computer Vision and Pattern Recognition_ , 2021, pp. 14 403–14 412.
  * [29] S. Shalev-Shwartz, S. Shammah, and A. Shashua, “On a formal model of safe and scalable self-driving cars,” _CoRR_ , vol. abs/1708.06374, 2017. [Online]. Available: http://arxiv.org/abs/1708.06374
  * [30] M. Althoff and J. M. Dolan, “Online verification of automated road vehicles using reachability analysis,” _IEEE Transactions on Robotics_ , vol. 30, no. 4, pp. 903–918, 2014.
  * [31] C. R. Qi, H. Su, K. Mo, and L. J. Guibas, “PointNet: Deep learning on point sets for 3d classification and segmentation,” _arXiv preprint arXiv:1612.00593_ , 2016.
  * [32] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, L. u. Kaiser, and I. Polosukhin, “Attention is all you need,” in _Advances in Neural Information Processing Systems_ , vol. 30, 2017.
  * [33] H. Cui, T. Nguyen, F.-C. Chou, T.-H. Lin, J. Schneider, D. Bradley, and N. Djuric, “Deep kinematic models for kinematically feasible vehicle trajectory predictions,” 2020.
  * [34] M. Werling, S. Kammel, J. Ziegler, and L. Gröll, “Optimal trajectories for time-critical street scenarios using discretized terminal manifolds,” _The International Journal of Robotics Research_ , vol. 31, no. 3, pp. 346–359, 2012.
  * [35] P. de Haan, D. Jayaraman, and S. Levine, “Causal confusion in imitation learning,” in _Advances in Neural Information Processing Systems_ , vol. 32, 2019.
  * [36] T. M. Moerland, J. Broekens, and C. M. Jonker, “Model-based reinforcement learning: A survey,” _arXiv preprint arXiv:2006.16712_ , 2020.
  * [37] S. Levine, A. Kumar, G. Tucker, and J. Fu, “Offline reinforcement learning: Tutorial, review, and perspectives on open problems,” _arXiv preprint arXiv:2005.01643_ , 2020.
  * [38] L. Bergamini, Y. Ye, O. Scheel, L. Chen, C. Hu, L. Del Pero, B. Osinski, H. Grimmett, and P. Ondruska, “Simnet: Learning reactive self-driving simulations from real-world observations,” in _International Conference on Robotics and Automation (ICRA)_. IEEE, 2021.


* Tozzi et al. (2023) Tozzi, G., Maiolino, R., Cresci, G., et al. 2023, arXiv e-prints, arXiv:2302.04282, doi: 10.48550/arXiv.2302.04282
  * Treu et al. (2022) Treu, T., Roberts-Borsani, G., Bradac, M., et al. 2022, ApJ, 935, 110, doi: 10.3847/1538-4357/ac8158
  * Trump et al. (2023) Trump, J. R., Arrabal Haro, P., Simons, R. C., et al. 2023, ApJ, 945, 35, doi: 10.3847/1538-4357/acba8a
  * Vanzella et al. (2010) Vanzella, E., Grazian, A., Hayes, M., et al. 2010, A&A, 513, A20, doi: 10.1051/0004-6361/200913042
  * Veilleux & Osterbrock (1987) Veilleux, S., & Osterbrock, D. E. 1987, ApJS, 63, 295, doi: 10.1086/191166
  * Wise et al. (2014) Wise, J. H., Demchenko, V. G., Halicek, M. T., et al. 2014, MNRAS, 442, 2560
  * Wofford et al. (2021) Wofford, A., Vidal-García, A., Feltre, A., Chevallard, J., et al. 2021, MNRAS, 500, 2908, doi: 10.1093/mnras/staa3365
  * Xiao et al. (2018) Xiao, L., Stanway, E. R., & Eldridge, J. J. 2018, MNRAS, 477, 904, doi: 10.1093/mnras/sty646
  * Xu et al. (2022) Xu, X., Heckman, T., Henry, A., et al. 2022, ApJ, 933, 222, doi: 10.3847/1538-4357/ac6d56
  * Xu et al. (2023) —. 2023, arXiv e-prints, arXiv:2301.11498, doi: 10.48550/arXiv.2301.11498

##  Appendix A Comparing UV and optical kinematics

Here we want to further discuss the emission line kinematics, also comparing
optical and UV results. The left and right panels of Fig. 11 show the velocity
offset of the UV stellar (left panel) and gas kinematics (right panel) with
respect to the systemic velocity $v_{sys}$ (derived from $z_{lit}$),
consistent with the ionized gas velocity measured from optical emission lines,
as a function of the galaxy stellar mass. In general, we find no systematic
offsets between the ionizing stellar component velocity explored by fitting
the UV spectra (magenta squares) and $v_{sys}$, with $\Delta v$ mainly within
$\pm\sim 50$ km/s and median value $<\Delta v>\sim 7$ km/s (dash-dotted
magenta line). One implication is that the narrow components of the optical
emission lines are really tracing non-outflowing gas (Rigby et al. 2018). The
right panel of Fig. 11 instead shows the O III]$~{}\lambda\lambda$1661,6, C
III]$~{}\lambda\lambda$1907,9, and C IV$~{}\lambda\lambda$1548,51 velocities
as red dots, blue triangles and yellow stars. There is a scatter between the
UV and systemic velocities mainly within $\pm\sim 50$ km/s, and more enhanced
for some C III] measurements, with three galaxies (J1359+5726, J0926+4427 and
J0942+3547) showing a clear redshifted offset ($\Delta v\sim+100-200$ km/s)
and three (I Zw 18, Mrk 996 and J1025+3622) showing a clear blueshifted offset
($\delta v\sim-150{-}-200$ km/s). However, we do not see either any systematic
offsets, as shown by the dashed red and dotted blue lines indicating the
corresponding median values with respect to $v_{sys}$. Hence, we conclude it
is unlikely that they are due to issues in the G185M grating calibration,
covering the C III], discussed in detail in James et al. (2022).

Figure 11: Velocity offset of the UV stellar (left panel, magenta squares) and
gas kinematics (right panel) with respect to the systemic velocity $v_{sys}$,
consistent with the ionized gas velocity measured from optical spectra, and as
a function of the galaxy stellar mass. In the right panel, we indicate the O
III]$~{}\lambda\lambda$1661,6, C III]$~{}\lambda\lambda$1907,9, and C
IV$~{}\lambda\lambda$1548,51 velocities as red dots, blue triangles and yellow
stars, as reported in the legend.

Interestingly, we find a systematic offset between the $v_{CIV}$ and $v_{sys}$
with a median value of $<\Delta v>\sim+60$ km/s (solid gold line), implying
that C IV emission is systematically redshifted with respect to the systemic
velocity, consistently with resonant scattering/absorption (see also Berg et
al. 2019; Wofford et al. 2021). For seven out of the nine galaxies for which
we measure C IV nebular emission, this blueshifted offset increases with the
stellar mass, going from $\sim 0$ km/s to $\sim 90$ km/s in the range
log(M⋆/M⊙) $6{-}8$. The two exceptions are I Zw 18 and J1323-0132, with
stellar masses of log(M⋆/M⊙) $\sim 6.3$, showing $\delta v\sim 65$ km/s.

As discussed in Sec. 2.2 and in Fig, 1, optical emission lines of half of the
CLASSY sample needed a narrow and a broad Gaussian component to be accurately
reproduced. Looking at the single and narrow component $\sigma$ values shown
in the right panel of Fig, 1, we see that $\sigma$ (and also its scatter)
increases at larger stellar masses, with only objects with $M_{\star}\gtrsim
10^{7}$ M⊙ needing a 2-component fit. We highlight here that all the galaxies
characterized by a broad component in optical emission lines (apart Mrk 996
and SBS 0335-052 E) were found to have an outflowing component in rest-UV
absorption lines analyzed by Xu et al. (2022; 2023) (CLASSY Paper III, Paper
VI). Recent studies have shown that low-mass systems ($M_{\star}<10^{9}$ M⊙)
such as those of the CLASSY survey can have irregular velocity fields in the
ionized gas studied through optical emission lines, indicating the presence of
non-circular motions (e.g., Marasco et al. 2023). However, galactic winds,
defined as gas at velocities larger than the galaxy escape speed, have found
to be able to account only for a few percent of their observed fluxes both in
the local universe (Marasco et al. 2023) and at $z\sim 1.2-2.6$ (Concas et al.
2022). Here we highlight that the lack of galactic wind detection in small
systems could be also an issue of S/N, but in this work we do not explore this
topic any further, leaving it to a future study using optical integral-field
spectroscopy data, that can provide both a spatial and kinematical information
of our galaxies, and thus a more complete picture that the integrated optical
spectra analyzed here cannot provide.

##  Appendix B Alternative diagnostic diagrams

Fig. 12 shows an alternative optical diagnostic diagram to discriminate the
excitation properties, using [O II]$~{}\lambda\lambda$3727/H$\beta$ versus [O
III]$~{}\lambda 5007$/H$\beta$ line ratios (Lamareille et al. 2004; Lamareille
2010). The dotted, solid and dashed lines indicate the empirical dividing line
between star-forming galaxies and AGN identified by Lamareille et al. (2004),
while the dash-dotted line identifies the empirical locus of LI(N)ER and
composite galaxies, found by Lamareille (2010). The advantage of this diagram
is that it can be used to explore JWST targets at redshifts up to $z\sim 8.5$
in the observed NIR (with NIRISS or NIRspec), for which redder wavelengths are
unavailable (e.g., Curti et al. 2022). However, this diagram should be taken
with caution since, as shown in Table 2, it does not always disentangle
ionizing mechanisms in our sample, with many galaxies (classified as star-
forming according to the classical BPT) lying in the boundary region between
SF and Seyferts and thus classified as composite. This shows the limit of [O
II]/H$\beta$ in distinguishing among ionization mechanisms.

Figure 12: Analogously to Fig. 2, [O II]$~{}\lambda\lambda$3727/H$\beta$
versus [O III]$~{}\lambda 5007$/H$\beta$ diagnostic diagram for the narrow and
broad components of the CLASSY galaxies, shown as red dots and blue diamonds,
respectively. Only the measurements with $S/N>3$ for all the lines involved
are reported. The dotted and solid lines indicate the empirical dividing line
between star-forming galaxies and AGN identified by Lamareille et al. (2004),
the dashed ones show the uncertainty region, while the dash-dotted line
identifies the empirical locus of LI(N)ER and Seyfert galaxies, found by
Lamareille (2010). Unfortunately, this diagnostic plot does not represent a
good tool to discriminate among the different ionizing mechanisms of our
systems.

##  Appendix C Other UV diagnostic diagrams

Fig. 13 and 14 show the C3He2-C3O3 and C3He2-C4C3 diagrams, respectively,
proposed together with the C3He2-O3He2 diagram (Fig. 6) by Feltre et al.
(2016). C3He2-C3O3 behaves similarly to C3He2-O3He2 (Fig. 6), and thus, at
sub-solar metallicities, it can clearly distinguish among SF, AGN and shocks,
as shown by the Shock-SF separator

$y=2.1\,x+0.6$ (C1)

and the AGN-SF separator lines

$y=0.1\,\,\,\,\,\,and\,\,\,\,\,\,x<-0.25$ (C2)

with $x=$ log([O III]$\lambda 1666$/C III]$\lambda\lambda$1907,9) and $y=$
log(C III]$\lambda\lambda$1907,9/He II$\lambda$1640). At sub-solar
metallicities (i.e., excluding the dark-green shock grid), shocks can reach
higher [O III]/C III] line ratios than AGN models, while SF grids are located
at higher C III]/He II values.

C3He2-C4C3 instead behaves similarly to C3He2-C4He2 diagram (Fig. 5) and are a
very similar version of the C4C3He2-C4C3 diagram (Fig. 7). There is not a
clear difference in C IV/C III] line ratios between the different models, and
thus the difference between SF and other mechanisms is mainly traced by the
different C III]/He II (higher for SF grids, lower for AGN/shocks), as
indicated by the Shock-SF separator

$y\geq 0.1\,\,\,\,\,\,and\,\,\,\,\,\,x\geq 0.1$ (C3)

and the AGN-SF separator lines

$y=0.1\,\,\,\,\,\,and\,\,\,\,\,\,x<-0.25$ (C4)

with $x=$ log(C IV$\lambda\lambda 1548,51$/C III]$\lambda\lambda$1907,9) and
$y=$ log(C III]$\lambda\lambda$1907,9/He II$\lambda$1640) Also, AGN and shocks
show similar C IV/C III], and thus this diagnostic diagram cannot distinguish
them.

Figure 13: C3He2-O3C3 diagram: C III] $~{}\lambda\lambda$1907,9/He II
$~{}\lambda$1640 vs O III] $~{}\lambda$1666/C III] diagnostic plot proposed by
F16 to separate SF and AGN activities. The models superimposed are as
explained in Fig. 5. This diagram clearly distinguishes among SF, AGN and
shocks at sub-solar metallicities (i.e., excluding the dark-green shock grid),
as C3He2-O3He2 (Fig. 6), as indicated by the dashed dark green and dash-dotted
black lines. Figure 14: C3He2-C4C3 diagram: C III]
$~{}\lambda\lambda$1907,9/He II $~{}\lambda$1640 vs C IV
$~{}\lambda\lambda$1548,51/C III] diagnostic plot proposed by F16 to separate
SF and AGN activities. There is not a clear difference in C IV/C III] line
ratios between the different models, and thus the difference between SF and
other mechanisms is mainly traced by the different C III]/He II (higher for SF
grids, lower for AGN/shocks), as indicated by the dashed dark green and dash-
dotted black lines.