# Delicatessen: M-Estimation in Python

Paul N Zivich1, Mark Klose1, Stephen R Cole1, Jessie K Edwards1, Bonnie E
Shook-Sa2

(1Department of Epidemiology, Gillings School of Global Public Health,
University of North Carolina at Chapel Hill, Chapel Hill, NC
2Department of Biostatistics, Gillings School of Global Public Health,
University of North Carolina at Chapel Hill, Chapel Hill, NC
)

###### Abstract

M-estimation is a general statistical approach that simplifies and unifies
estimation in a variety of settings. Here, we introduce delicatessen, a Python
library that automates the tedious calculations of M-estimation. To highlight
the utility of delicatessen for data analyses in life science research, we
provide several illustrations: linear regression robust to outliers,
estimation of a dose-response curve, and standardization of results.

M-estimation is a general statistical framework for analysis based on
asymptotic inference [1]. Here, we introduce delicatessen, an open-source
Python library that flexibly automates the mathematics of M-estimation.
delicatessen includes a variety of built-in estimating equations (e.g., robust
regression, four parameter log-logistic models, etc.) and supports custom,
user-specified estimating equations. While other M-estimation implementations
are available [2, 3, 4], delicatessen provides a number of advantages
(Appendix Table 1). To help contextualize the value of M-estimation, we
showcase applications common to statistical analyses in life sciences
research: linear regression with outliers, dose-response curves, and
standardization.

To begin, we briefly review M-estimation theory; see Stefanski and Boos (2002)
for a detailed introduction [1]. M-estimation was developed to study the large
sample properties of robust statistics [5], but many large-sample estimators
can be expressed as M-estimators [1]. Specifically, an M-estimator,
$\hat{\bm{\theta}}_{n}$, is the solution (for $\bm{\theta}$) to the vector
equation $\sum_{i=1}^{n}\psi(\mathbf{Z}_{i};\bm{\theta})$, where $\psi(.)$ is
a known ($v\times 1$)-function,
$\bm{\theta}=\\{\theta_{1},\theta_{2},...,\theta_{v}\\}$ is the parameter
vector, and $\mathbf{Z}_{i}$ are the observed data for $n$ independent and
identically distributed units. The asymptotic variances of the parameter
estimates can be estimated using the empirical sandwich variance estimator

$V(\mathbf{Z};\hat{\bm{\theta}}_{n})=B(\mathbf{Z};\hat{\bm{\theta}}_{n})^{-1}F(\mathbf{Z};\hat{\bm{\theta}}_{n})\left((\mathbf{Z};\hat{\bm{\theta}}_{n})^{-1}\right)^{T}$

where the ’bread’ is

$B(\mathbf{Z};\hat{\bm{\theta}}_{n})=\frac{1}{n}\sum_{i=1}^{n}\left(-\psi^{\prime}(\mathbf{Z}_{i};\hat{\bm{\theta}}_{n})\right)$

with $\psi^{\prime}(\mathbf{Z}_{i};\hat{\bm{\theta}}_{n})$ indicating the
matrix derivative, and the ’filling’ is

$F(\mathbf{Z};\hat{\bm{\theta}}_{n})=\frac{1}{n}\sum_{i=1}^{n}\psi(\mathbf{Z}_{i};\hat{\bm{\theta}}_{n})\psi(\mathbf{Z}_{i};\hat{\bm{\theta}}_{n})^{T}$

A key advantage o the sandwich variance estimator is that it is less
computationally demanding compared to alternative variance estimation
procedures, such as bootstrapping [6, 7].

Widespread application of M-estimation is often hindered by tedious derivative
and matrix calculations. To circumvent this barrier, delicatessen automates
M-estimation and provides built-in estimating equations. Estimating
equation(s) are provided to the MEstimator class, which then computes
$\hat{\bm{\theta}}_{n}$ using a root-finding algorithm. Root-finding
algorithms implemented in SciPy [8], as well as user-provided root-finding
algorithms, are supported. After successful completion of the root-finding
step, the bread is computed by numerically approximating the partial
derivatives and the filling is calculated using NumPy [9]. Finally, the
sandwich variance estimates are constructed from the corresponding pieces.

To demonstrate the advantages of delicatessen, we provide three examples
common to life sciences research. First, consider simple linear regression
with outliers [10, 11]. A common approach to handling outliers is to simply
exclude them. However, exclusion ignores all information contributed by
outliers, and should only be done when outliers are unambiguously a result of
experimental error [11]. Yet, including outliers and using least squares
regression can lead to unstable or unreliable estimates. Robust regression has
been proposed as a middle ground, whereby outliers contribute but their
influence is curtailed [5, 12]. The estimating equation for implementing
robust regression is

$\psi(Y_{i},X_{i};\bm{\alpha})=g_{k}(Y_{i}-X_{i}^{T}\bm{\alpha})X_{i}=0$

where $Y_{i}$ is the independent variable, $X_{i}$ is the dependent
variable(s), $\bm{\alpha}$ is the parameter vector for the regression model,
and the $g_{k}(.)$ constrains the residuals. Here, we use

$g_{k}(w)=\left\\{\begin{matrix}w\text{ if }|w|\leq k\\\ k\text{ if
}|w|>k\end{matrix}\right\\}$

To illustrate, 15 observations were simulated following Altman & Krzywinski
(2016) [11]. A reference model was fit to the simulated data using least
squares linear regression (Figure 1a). An outlying value of $Y_{i}$ was then
generated by replacing $Y_{i}$ with $Y_{i}+3$ for the observation with the
smallest $X_{i}$ value. When incorporating this outlier, the slope is
decreased. With robust regression and $k=1.345$ [13], the influence of the
outlier was reduced and the estimated slope was closer to the reference
(Figure 1a).

As the second example, consider estimation of a dose-response curve. We
replicate the results of Ritz et al. (2015) using data on herbicides and
ryegrass root length [14, 15]. Since there is a natural lower bound of zero on
root length, a three-parameter log-logistic (3PL) model was used, with
parameters for the halfway maximum effective concentration ($\gamma_{1}$),
steepness of the dose-response curve ($\gamma_{2}$), and upper limit
($\gamma_{3}$) [14]. The corresponding estimating equations for the 3PL are
denoted by $\psi_{PL}(R_{i},D_{i};\bm{\gamma})$, where $R_{i}$ is the response
and $D_{i}$ is the dose. Besides the halfway maximum effective concentration,
other levels of effective concentrations may be of interest. Let $EC_{\delta}$
denote the $\delta$-level effective concentration, where $0<\delta<100$. Here,
estimation of $EC_{20}$ is of interest, with the corresponding estimating
equation denoted by $\psi_{20}(EC_{20};\bm{\gamma})$. Since $EC_{20}$ is a
transformation of $\bm{\gamma}$, the estimating equation does not directly
depend on $D_{i}$ or $R_{i}$. The estimating equations can then be ’stacked’
together

$\psi(R_{i},D_{i},\bm{\theta})=\begin{bmatrix}\psi_{PL}(R_{i},D_{i};\bm{\gamma})\\\
\psi_{20}(EC_{20},\bm{\gamma})\end{bmatrix}$

where $\bm{\theta}=(\bm{\gamma},EC_{20})$. Solving
$\psi(R_{i},D_{i},\bm{\theta})$ means the variance for $EC_{20}$ is also
estimated through the sandwich variance. The sandwich variance can then be
used to construct Wald-type 95% confidence intervals (CI). The data and
estimated dose-response curve are shown in Figure 1b. The estimated $EC_{20}$
was 1.86 (95% CI: 1.58, 2.14). This example highlights how estimating
equations can be stacked with equations for transformations of the parameters,
e.g., $EC_{20}$, and point and variance estimates for those transformations
can be computed using delicatessen.

Figure 1: Robust linear regression (a), dose-response curve estimation (b),
and mean of log-transformed biomarkers standardized by drug use (c)

a: The reference line was estimated using least squares linear regression and
based on all the gray data points. The ‘with outlier’ least squares linear
regression and robust linear regression lines were estimated with the induced
outlier, indicated by the arrow and the red data point. For robust regression,
the Huber’s proposed threshold of k=1.345 was used.
b: Dose-response curve for herbicide on ryegrass root length. Dots indicate
the data points, and the blue line is the estimated dose-response curve.
c: Forest plot for the estimated mean of the natural log-transformed
biomarkers. Naive corresponds to the means for the original $n=57$ HIV
patients. Standardized corresponds to the inverse odds weighted means. Lines
indicate the 95% confidence intervals calculating using the sandwich variance.

In our final example, we consider the problem of standardization. Often the
available data is not a random sample of the population of interest. As an
archetypical example, consider the biomarker data from a convenience sample of
HIV patients ($n=57$) in Kamat et al. (2012) [16]. When comparing the
prevalence of recent drug use (either cocaine or opiates) to a more
generalizable cohort,[17] drug use is notably higher in Kamat et al.’s sample
(70% versus 8%). As Kamat et al. reported differential biomarker expression by
cocaine use, the differential patterns in drug use between data sets indicates
that the summary statistics on biomarker expression may not be generalizable.
To account for the discrepancy in drug use, we standardized the mean for
select biomarkers to the distribution of drug use in the secondary data source
using inverse odds weights [18]. Inverse odds weights were estimated using a
logistic regression model [19]. The estimating equation for the logistic model
is

$\psi_{w}(S_{i},X_{i};\bm{\beta})=\left(Y_{i}-\text{expit}(X_{i}^{T}\bm{\beta})\right)X_{i}$

where $X_{i}$ indicates drug use for individual $i$, $S_{i}$ indicates if the
individual was in the Kamat et al. ($S_{i}=1$) or secondary data source
($S_{i}=0$), and $\text{expit}(.)$ is the inverse logit. The estimating
equation for the weighted mean is

$\psi_{m}(B_{i},S_{i},\mu_{m},\bm{\beta})=I(S_{i}=1)\times
w_{i}(X_{i};\bm{\beta})\times(\text{log}(B_{i}^{m})-\mu_{m})$

where $\text{log}(B_{i}^{m})$ is the log-transformed biomarker $m$, $\mu_{m}$
is the mean for biomarker $m$, and

$w_{i}(X_{i};\bm{\beta})=\left(1-\text{expit}(X_{i}^{T}\bm{\beta})\right)/\text{expit}(X_{i}^{T}\bm{\beta})$

is the inverse odds weight. While $\bm{\beta}$ is not of primary interest
(i.e., nuisance parameter), the estimates of $\mu_{m}$ depend on $\bm{\beta}$
through the weights. This dependence means that the variance of $\bm{\beta}$
should carry forward into the variance of $\mu_{m}$. Otherwise, there is a
danger in underestimating the uncertainty in $\mu_{m}$. M-estimation addresses
this problem by propagating the uncertainty of nuisance parameters thought the
stacked estimating equations and into the sandwich variance. Therefore,
estimating equations for the logistic model and for the biomarker means were
stacked together, with $\bm{\theta}=(\bm{\beta},\mu_{1},\mu_{2},...,\mu_{m})$.
Results for the mean and 95% CIs of select biomarkers are presented in Figure
1c. Notably, the means for log-transformed sIL-2R and IL-12 decreased after
standardization. While these results were standardized by drug use,
definitions varied between studies and other important differences likely
exist. Therefore, these results should be interpreted with caution and viewed
as a simple illustration of how M-estimation can be used to generalize
results.

To summarize, M-estimation is a flexible approach which allows for estimation
in a variety of contexts. We introduce delicatessen, a Python library for
M-estimation that supports both pre-built and user-specified estimating
equations. Specifically, delicatessen allows for robust statistics, variance
estimation for transformations of parameters, and propagation of uncertainty
in nuisance parameters when estimating variances of the interest parameters.
These features were shown using examples common to life science research.

## Acknowledgments

The authors would like to thank Dr. Michael Love for his feedback. PNZ was
supported by T32-AI007001 at the time of the software development and writing
of this paper. All code, along with data for the examples, is available on
both GitHub (github.com/pzivich/Delicatessen) and through the Python Package
Index (pypi.org/project/delicatessen/). Feature requests, bug reports, or help
requests can be done through the GitHub repository.

## References

  * [1] L. A. Stefanski and D. D. Boos, “The calculus of m-estimation,” The American Statistician, vol. 56, no. 1, pp. 29–38, 2002.
  * [2] B. C. Saul and M. G. Hudgens, “The calculus of m-estimation in r with geex,” Journal of Statistical Software, vol. 92, no. 2, 2020.
  * [3] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, et al., “Scikit-learn: Machine learning in python,” the Journal of Machine Learning Research, vol. 12, pp. 2825–2830, 2011.
  * [4] S. Seabold and J. Perktold, “Statsmodels: Econometric and statistical modeling with python,” in Proceedings of the 9th Python in Science Conference, vol. 57, p. 61, Austin, TX, 2010.
  * [5] P. J. Huber, “Robust estimation of a location parameter,” in Breakthroughs in Statistics, pp. 492–518, Springer, 1992.
  * [6] B. Efron, “Nonparametric estimates of standard error: the jackknife, the bootstrap and other methods,” Biometrika, vol. 68, no. 3, pp. 589–599, 1981.
  * [7] A. Kulesa, M. Krzywinski, P. Blainey, and N. Altman, “Sampling distributions and the bootstrap,” Nature Methods, vol. 12, pp. 477–478, 2015.
  * [8] P. Virtanen, R. Gommers, T. E. Oliphant, M. Haberland, T. Reddy, D. Cournapeau, E. Burovski, P. Peterson, W. Weckesser, J. Bright, et al., “Scipy 1.0: fundamental algorithms for scientific computing in python,” Nature Methods, vol. 17, no. 3, pp. 261–272, 2020.
  * [9] C. R. Harris, K. J. Millman, S. J. Van Der Walt, R. Gommers, P. Virtanen, D. Cournapeau, E. Wieser, J. Taylor, S. Berg, N. J. Smith, et al., “Array programming with numpy,” Nature, vol. 585, no. 7825, pp. 357–362, 2020.
  * [10] N. Altman and M. Krzywinski, “Points of significance: Simple linear regression.,” Nature Methods, vol. 12, no. 11, 2015.
  * [11] N. Altman and M. Krzywinski, “Analyzing outliers: influential or nuisance?,” Nature Methods, vol. 13, no. 4, pp. 281–283, 2016.
  * [12] P. J. Huber, “Robust regression: asymptotics, conjectures and monte carlo,” The Annals of Statistics, pp. 799–821, 1973.
  * [13] P. J. Huber, Robust statistics, vol. 523.  John Wiley & Sons, 2004.
  * [14] C. Ritz, F. Baty, J. C. Streibig, and D. Gerhard, “Dose-response analysis using r,” PloS One, vol. 10, no. 12, p. e0146021, 2015.
  * [15] Inderjit, J. C. Streibig, and M. Olofsdotter, “Joint action of phenolic acid mixtures and its significance in allelopathy research,” Physiologia Plantarum, vol. 114, no. 3, pp. 422–428, 2002.
  * [16] A. Kamat, V. Misra, E. Cassol, P. Ancuta, Z. Yan, C. Li, S. Morgello, and D. Gabuzda, “A plasma biomarker signature of immune activation in hiv patients on antiretroviral therapy,” PloS one, vol. 7, no. 2, p. e30881, 2012.
  * [17] G. D’Souza, F. Bhondoekhan, L. Benning, J. B. Margolick, A. A. Adedimeji, A. A. Adimora, M. L. Alcaide, M. H. Cohen, R. Detels, M. R. Friedman, et al., “Characteristics of the macs/wihs combined cohort study: opportunities for research on aging with hiv in the longest us observational study of hiv,” American journal of epidemiology, vol. 190, no. 8, pp. 1457–1475, 2021\.
  * [18] D. Westreich, J. K. Edwards, C. R. Lesko, E. Stuart, and S. R. Cole, “Transportability of trial results using inverse odds of sampling weights,” American journal of epidemiology, vol. 186, no. 8, pp. 1010–1014, 2017\.
  * [19] J. Lever, M. Krzywinski, and N. Altman, “Logistic regression: Regression can be used on categorical responses to estimate probabilities and to classify,” Nature Methods, vol. 13, no. 7, pp. 541–543, 2016.

## Appendix

Table 1: Available features of open-source software implementing M-estimation*

|  |  | Built-in EE
---|---|---|---
Library | Language |  | User-Specified
---
EE
| Huber robust
---
location
| Robust
---
regression
| 4 parameter
---
log-logistic
g-computation | IPW | AIPW
delicatessen | Python | x | x | x | x | x | x | x
statsmodels | Python |  | x | x |  |  |  |
sklearn | Python |  |  | x |  |  |  |
geex | R | x |  |  |  |  |  |
sandwich | R | x |  | x |  |  |  |
MASS | R |  | x | x |  |  |  |
rlm | R |  |  | x |  |  |  |
drc | R |  |  |  | x |  |  |
Mestimation | Julia | x |  |  |  |  |  |

EE: estimating equation(s). IPW: inverse probability weighting, AIPW:
augmented inverse probability weighting.
* Available features based on most recent version of each software as of 2022/02/13.


# Performance Analysis of V2I Zone Activation and Scalability for C-V2X
Transactional Services

Mahdi Zaman, Md Saifuddin, Mahdi Razzaghpour, Yaser P. Fallah
Dept. of Electrical & Computer Engineering, Univ. of Central Florida, Orlando,
FL
{mahdizaman, md.saif<EMAIL_ADDRESS><EMAIL_ADDRESS>
###### Abstract

Cellular-V2X (C-V2X) enables communication between vehicles and other
transportation entities over the 5.9GHz spectrum. C-V2X utilizes direct
communication mode for safety packet broadcasts (through the usage of periodic
basic safety messages) while leaving sufficient room in the resource pool for
advanced service applications. While many such ITS applications are under
development, it is crucial to identify and optimize the relevant network
parameters. In this paper, we envision an infrastructure-assisted transaction
procedure entirely carried out by C-V2X, and we optimize it in terms of the
service parameters. To achieve the service utility of a transaction class, two
C-V2X entities require a successive exchange of multiple messages. With this
notion, our proposed application prototype can be generalized for any
vehicular service to establish connections on-the-fly. We identify suitable
activation zones for vehicles and assess their impact on service efficiency.
The results show a variety of potential service and parameter settings that
can be appropriate for different use-cases, laying the foundation for
subsequent studies.

###### Index Terms:

Cellular-V2X, 5G-NR, V2I, Infrastructure, Transaction Service, Intelligent
Transportation

##  I Introduction

Our current transportation ecosystem consists of diverse categories of
vehicles with infrastructural entities providing complimentary assistance in
mobility. The evolution trajectory of the transport system is gradually
morphing into an increasingly autonomous one. As a massive quantity of
resources is spent on developing infrastructure support every year[1],
efficient infrastructure design is equally crucial. When equipped with radio
technology, infrastructures are capable of contributing in efficient
transportation, which enables a wide range of service leveraging the
connectivity. For users to enjoy quality of service, reliable and scalable
communication along with efficient application protocol designs are required.
C-V2X has been developed under stringent QoS requirement to ensure such
communication. It enables cooperative applications that expand the service
utilities beyond the safety-critical services achievable by Basic Safety
Message (BSM). The use cases, relevant requirements, and the major key
performance indicators (KPI) are elaborated in 3GPP Services and Systems
Aspects (SA) and 5G Automotive Association (5GAA) [2].

Applications like Advanced and Cooperative Driving leverage Vehicle-to-Vehicle
(V2V) and Vehicle-to-Infrastructure (V2I) communications to deploy on-the-fly
group formation, transaction etc. In theory, the scope of these applications
spans over the whole listening range of C-V2X. However, the applications are
by definition utility-oriented and context-aware. This makes the activation
zone a critical factor in ensuring the quality of service. For infrastructure-
assisted services, the activation zone refers to a virtual trigger line, where
vehicles crossing the line can be considered eligible for the service usage.
We aim to identify the impact of the trigger line on the efficiency and
scalability of a V2I-based service. In this motive, we first design a
prototype service which can operate on any C-V2X unit; a Road-Side Unit (RSU)
and the vehicle’s C-V2X equipped On Board Unit (OBU) to operate as the service
provider and the users, respectively, in a one-to-many fashion. The service
utilizes a sequence of messages transmitted over LTE air interface to carry
out the service procedure. From an application-centric perspective, we observe
how different settings of activation zone affects the service efficiency.

Leveraging communication systems for traffic management has been of decade
long research interest. Prior works by Schulz _et al._[3] discuss the
features, benefits, and drawbacks of the concurrent communication technologies
for this purpose. It sheds light on the Global System for Mobile
Commmunication (GSM), short messaging service (SMS), and general packet radio
service (GPRS) for traffic management. Although these protocols proved the
potential for providing autonomous in-car navigation, they did not scale. As
communication protocols evolved and dedicated frequency bandwidth was claimed
for transportation services, the vision of efficient traffic management
through radio technology accelerated as well.

Traffic management encompasses many different types of applications; prime
examples can be intersection management via smart traffic lights, smart
parking in urban cities, etc. Djahel _et al._ discusses a protocol-agnostic
adaptive traffic management architecture for emergency vehicles [4] with the
ability to adjust per driving policy and behavior [5]. Evolution towards 6G
also enables usage of larger bandwidth with low latency, which promises data
utilization in platooning [6], predictive QoS [7] and cooperative perception
by leveraging remote vision via V2X [8]. In this paper, we explore:

  * •

a general prototype of a V2I-assisted transaction service,

  * •

identifying the major parameters with potential impact on the service
performance,

  * •

optimizing the service based on the V2I zone activation.

##  II System Model

Infrastructures can play two distinct roles in the traffic system: one as a
base station with network assistance capability, and the other as an RSU. The
RSU can communicate with surrounding C-V2X entities (OBU and other RSU) and
provide enhanced V2X (eV2X) context under both mode-3 (in-coverage) and mode-4
(out of coverage) operations [9]. On freeways, this can lead to safer highway
entrance and lane merge events. For urban streets, this can introduce no-stop
intersections to reduce fleet time. In this work, we assume mode-4 sidelink
operation for all communications.

The prototype under discussion assumes service-specific message transmissions
beside BSM. The transmission and reception procedures do not differ for BSM
and V2I packets. However, V2I packets need to propagate the context over
successive packet exchanges, which is difficult with BSM as it is designed for
broadcasting periodic updates. Applications like cooperative driving and
collective perception require arbitration-specific message exchange (V2V or
V2I), whereas fee collection involves transaction-specific message exchange
(V2I) [10]. This calls for a (1) modern message set dictionary encompassing
BSM, and (2) a handshake algorithm to address the objective by utilizing the
context. Because safety applications generate BSM periodically, the lower
level procedures including sensing-based semipersistent (SB-SPS) resource
selection (under mode-4) are tailored to optimize primarily for periodic
reservation of resources. On the contrary, the advanced use cases are
opportunist and mission-critical, thus they mostly resort to aperiodic
transmission. To the best of authors’ knowledge, no standardized resource
allocation procedure currently exists in C-V2X to facilitate such aperiodic
transmissions. In [11], the authors show the limitations of the current C-V2X
protocol in handling aperiodic packets, especially with high traffic arrival
rate or large packetsize. Authors in [12] suggest amendments in the mode-4
application layer for the resource selection scheme and emphasizes the need
for application-oriented evaluation to maintain efficient cooperative
awareness. In presence of aperiodic packets, channel efficiency can suffer for
similar reasons. However due to lack of directives, we assume that all
transmissions in the simulated scenarios employ standardized lower layer
procedures including medium access [13]. During this stage of transmission,
BSMs are subject to congestion control [14] and one-shot semipersistent
scheduling [15]. The one-shot transmissions are proposed to increase aperiodic
packet reception chances so one might argue for using one-shot for all V2I
transmissions. However one-shot adds more randomness to minimize inter-packet
delay [15] without selecting a better resource, hence does not particularly
help aperiodic transmission. In addition. V2I packets also have a lower ProSe
Per Packet Priority and larger packetsize than BSM. These parameters were
adopted from [10] and summarized in table I

###  II-A Service Design & Relevant Assumptions

Figure 1: Service Procedure in Timeline

Figure 1 serves as a frame of reference to demonstrate the service as a
handshake mechanism. The core operational entity is a static RSU that caters
to transactions within a preset geo-zone as dictated by the protocol
parameters. Vehicles with appropriate subscription and authentication keys can
use the service by communicating with the RSU during passing through its geo-
zone. The RSU initiates the service by broadcasting a Service Advertisement
Message (SAM) periodically at $[T_{1},T_{1}+n*1000]$ms $(n\in N)$. SAM
consists of necessary information for subscribed users to respond upon their
eligibility. A subscribed vehicle moving towards the RSU can store the
relevant contents from a SAM. On the vehicle side, the service API prompts a
usage request called Service Usage Message (SUM) at time $T_{2}$ when it
crosses a virtual trigger line ($d_{t}$). Our analyses and results is centered
around $d_{t}$, which is predetermined at a particular distance from the RSU
for each scenario. SUM consists of information about service usage intent,
timestamp, vehicle ID, etc. Following reception of a SUM, internal procedures
at the RSU checks the user’s eligibility for usage and subscription status,
following with authentication or discarding of the request based on the
assessment. For qualifying users, an acknowledgment packet (ACK) is
transmitted at time $T_{3}$ with the necessary information to declare the
usage as complete for the targetted vehicle. The transaction is marked
complete for a particular user when it receives an ACK with its unique ID.

The actions occur sequentially from $T_{1}$ to $T_{2}$ and then to $T_{3}$.
All vehicles within the RSU vicinity can receive SAM at $T_{1}$ and store it
until reacting accordingly when it crosses trigger line at $T_{2}$. So the
interval between $T_{1}$ and $T_{2}$ effectively depends on the time of
crossing the trigger. At $T_{2}$, the usage intention is conveyed and the
actual service usage starts, until it ends with an ACK reception at $T_{3}$.
To minimize service latency is to minimize interval between $T_{2}$ and
$T_{3}$. In ideal communication where all transmitted packets are received,
this interval equals the net intra-layer delay on the OBU and RSU, which can
be $[8\ 200]$ms. Instead, we set up realistic communication with a stochastic
channel model [16] where packets can be lost due to interference. If a
transmitted SUM is not met with an ACK within a predefined interval
($T_{SUM}$), the respective UE retransmits SUM. Multiple retransmissions can
occur until an ACK is received. Additionally, the RSU does not differentiate
between the first ACK from a user and the retransmissions, so it addresses all
SUM receptions with an ACK transmission. Notably, the RSU can send ACKs to
individual users, or to a group of users ($B_{ACK}$), or it can wait for
$T_{ACK}$ duration and reply all the SUM received within this duration with a
single ACK consisting multiple recipients. We configured this range of control
at the RSU with a combination of $B_{ACK}$ and $T_{ACK}$, i.e. an ACK is
transmitted when either the size of the group of unresponded SUMs reaches
$B_{ACK}$, or when $T_{ACK}$ time has passed since its previous ACK
transmission. Each of these schemes provides a trade-off between promptness
and channel occupancy.
The service procedures include operations with user information. The exact
approaches on maintaining authenticity, availability, and confidentiality [17]
throughout the procedure are subjects of ongoing discussions under [18] and
[19]. These protocols are also dependent on the message content for SAM, SUM,
and ACK, which presumably are different from that of BSM. For the sake of a
system-level analysis, we assume these processing overheads are negligible
compared to the propagation delays. From the design prototype, the major
factors that can affect the Service Completion Time ($\Delta(T_{3}-T_{2})$)
for each vehicle are:
Trigger Line Distance ($d_{t}$) : a vehicle transmits SUM immediately after
crossing $d_{t}$. Smaller $d_{t}$ implies smaller distance between UE, hence
the higher reception chances.
ACK Batchsize ($B_{ACK}$): It determines the number of recipients within a
single ACK. While a small $B_{ACK}$ can crowd the channel with V2I packets, a
large $B_{ACK}$ can inversely affect a subset of users in each batch by adding
delay induced by the time to fill a batch.
SUM Repeat Interval ($T_{SUM}$): Each vehicle initiates a timer immediately
after a SUM transmission. Once the timer reaches $T_{SUM}$, the user repeats a
SUM transmission. Hence a longer $T_{SUM}$ implies longer wait time for users,
while short $T_{SUM}$ will force more SUM transmission, thereby increasing
resource consumption.
ACK Transmission Interval ($T_{ACK}$): Similar to $T_{SUM}$ at UE, $T_{ACK}$
is another count-up timer that runs at RSU. This count starts after every ACK
transmission and determines the time for the next ACK transmission. This works
simultaneously with $B_{ACK}$ to generate ACK transmission requests from the
upper layers at RSU.

TABLE I: Simulation Parameters & Configurations BSM periodicity | [100 600] ms
---|---
BSM PPPP | 5
BSM Payload Size | 300 byte
BSM MCS | 11
SAM periodicity | 1s
SAM,SUM,SCM PPPP | 6
SAM,SUM,SCM Payload Size | 700,450,300 bytes
SAM,SUM,SCM MCS | 7,11,6
Trigger Distance ($d_{t}$) | 300m, 0m, -100m
ACK Batchsize ($B_{ACK}$) | 16
SUM Repeat Interval ($T_{SUM}$) | 600ms
ACK Transmission Interval ($T_{ACK}$) | 400ms
Traffic Crossing Rate | 10, 20 & 30 veh/sec
Propagation Loss Model | I-405 Model [16]

For different use case and traffic flow, the suitable choice for these
parameters can vary. With respect to the RSU, the range of $d_{t}$ suggests
three options: (1) a positive trigger line implies users approaching the RSU
will transmit SUM before reaching the RSU, (2) a negative trigger implies
users cross the RSU first and transmit SUM afterward, and (3) a $0m$ trigger
line implies users transmit SUM right while crossing the RSU. In the following
sections, we present analysis of these settings for $d_{t}$ before presenting
the results in section IV. Analyses on the other three parameters are also
under investigation and will be published in future works.

###  II-B Analysis and Optimization

In this section, a system-level analysis of the service protocol is described.
To achieve service completion during one runtime, both entities need to convey
the context to each other through handshake (figure 1), starting with a SUM
transmission and ending with an ACK reception. Reception probabilities in
wireless radio networks are measured by Packet Error Rate (PER); the
percentage of lost packets over all transmitted packets in a network. PER can
be expressed as a function of vehicle density and distance between
communicating pair. In case of the service under experimentation, each V2I
link is formed once a user crosses the trigger. Hence, the success of the
service can be impacted by $d_{t}$ can directly impact the PER of the V2I
packets.

For the basis of steady-state analysis, we assume no vehicle is entering or
leaving the RSU coverage during $1ms$ time, which is the resource granularity
for C-V2X physical layer. We assume that the vehicles arrive at $d_{t}$
following a Poisson process. Hence the SUM packets which are generated by each
vehicle follows the same distribution. A constant $30m/s$ velocity profile is
used for mobility. Recall that a successful service cycle requires consecutive
SUM and ACK reception. In terms of PER, the success probability of such case
with $d_{t}$ is a product of individual reception probability for the two
packets (SUM and ACK) as $P(d_{t})\times
P\big{(}d_{t}-(\tau\times\bar{v}\big{)}$, where $P(d_{t})$ is the probability
of success at distance $d_{t}$, $\bar{v}$ is the average speed of the UEs and
$\tau$ is the small duration between a SUM reception at RSU and the
corresponding ACK reception at UE. $\tau$ depends on the lower layer
operations of C-V2X for priority management and physical resource allocation.

Once a successful cycle occurs, no further exchange is required between that
RSU-OBU pair for this service. Thus for efficiency, the service needs to be
completed in as early as possible, with the least possible count of attempts.
Hence, maximizing the expected service utility implies maximizing the
probability of success at the first attempt by UE given a specific $d_{t}$. In
case of failed first attempt, the second (and all following) transmission
carries equal significance. Probability of first success at $n^{th}$ trial is
therefore given by

$\displaystyle P(\text{$1^{st}$ success after n trial})=P(\text{success at
$n^{th}$ trial})\times$ (1) $\displaystyle\prod_{m=1}^{n-1}(1-P(\text{success
at $m^{th}$ trial}))$

Each of the attempts made by individual UEs are separated in time by
$T_{SUM}=0.6s$. The joint reception probability at the $n^{th}$ trial
therefore can be expressed as a product of success probabilities at the
distances in each SUM attempts:

$P(d_{t}-0.6n\bar{v})\times P\big{(}d_{t}-(0.6n+\tau)\bar{v}\big{)}\times\\\
\prod_{m=1}^{n-1}\bigg{[}1-P(d_{t}-0.6m\bar{v})-P\big{(}d_{t}-(0.6m+\tau)\bar{v}\big{)}\\\
+P(d_{t}-0.6m\bar{v})\times P\big{(}d_{t}-(0.6m+\tau)\bar{v}\big{)}\bigg{]}$
(2)

We noted the theoretical implication of this algorithm in terms of the average
number of UE attempts made before achieving first success. Figure 2 shows the
mean attempts required for completion across a range of trigger distances,
where $d_{t}=0m$ outperforms the others. This implies the best service utility
can be achieved with a trigger being located right below the RSU. Since PER
gradually increases with traffic density, we have higher average required
attempts for higher densities. In the case of positive trigger distances, the
probability of success for consecutive attempts increases while vehicles
approach RSU. For negative trigger distance, since vehicles move away from the
RSU, this change in success probability is the opposite. In Figure 2, the
model depicts this fact by producing a skewed left-half with a greater slope
than its positive counterpart on the right.

Figure 2: Mean number of attempts for successful completion (analytical)

##  III Experiment Setup

In the this section, we discuss the implementation of the network and the
scenario in the simulator.

###  III-A Deployment in Simulator

We deployed the service prototype in a link-level network simulator equipped
with C-V2X protocol layers. The high-fidelity simulator has been developed
over several years to simulate the communication protocol as specified in 3GPP
and SAE standards for release 14 with incremental upgrades as they were
released[20].

###  III-B Scenario Description

Figure 3: Freeway Service Zone with RSU and Trigger Lines under test

We modeled a 3km, 16 lanes bidirectional freeway. An RSU situated mid-stretch
(Figure 3) which provides V2X services to traffic along both directions. The
simulator mimics realistic communication between different entities with BSM
and V2I service-specific messages. All vehicles are capable of exchanging BSM
(among themselves) and service packets (with the RSU) through C-V2X sidelink
channel. The traffic density is characterized in terms of traffic flow rate.

Figure 4: Service Completion Time for 10,20,30 veh/s

##  IV Simulation Results

We present Service Completion Time (Figure 4) and the average number of SUM
attempts (Figure 5) for performance assessment. Service Completion Time (SCT)
refers to the time a UE is occupied with the transaction procedure.
Specifically, for a particular UE, the tolling process effectively starts with
the transmission of the first SUM and ends with the reception of an ACK. This
time gap is gauged for all participating UEs and presented as SCT. In Figure
4, we show SCT for three trigger distances under observation. The figure
demonstrates a range of traffic flow rates spanning from medium-low to high.
Within each flow rate group, SCT with 0m trigger outperforms the other trigger
settings, followed by -100m trigger.

Since the reception probability can be the highest right below the RSU, the 0m
setting shows the smallest 90th%tile SCT. While differentiating between 300m
and -100m, it should be noted that packet reception can be comparable at equal
absolute Transmitter-Receiver distance, so reception probability at
$d_{t}=-100m$ is equivalent to $d_{t}=100m$, which is higher than that at
$d_{t}=300m$. This translates to lower SCT for $d_{t}=-100m$. However, the
relative direction of UE motion with respect to RSU have the potential to
impact the service performance. Let’s consider a group of vehicles moving
towards an RSU (V1), and another group (V2) moving away. V1 will gradually get
a higher success probability in the spatial sense, while V2 spatially moves to
a lower success probability. Since there is a time gap between each UE’s SUM
and it’s corresponding ACK, V1 gets a systematic advantage. The same event can
occur for both SUM and ACK. If repetition is required for either of them, V1
would enjoy higher success probability for those repeated trials in comparison
to V2.

In order to capture the number of attempts made by the UEs to complete the
procedure, the mean number of attempts across the same range of traffic flow
rates are plotted in Figure 5. While 0m trigger results shows reliable
completion with the expense of 1 attempt by UEs, -100m trigger results in a
trend of increasing attempts in case of higher flow rates. This increment is
more rapid for 300m trigger line. Overall, 0m outperforms the others with the
least number of average attempts. Throughout different configurations, BSM
reception shows no advert impact in terms of PER, as shown in Figure 6.

Figure 5: Mean number of attempts for successful completion (empirical)

##  V Concluding Remarks

Infrastructure-based services are one of the fundamental blocks for the next-
generation intelligent transportation systems. In this paper, we explored
various strategies that can be used in the communication between
infrastructure and vehicles, especially where a transaction occurs. We
demonstrated that a trigger line adjacent to the RSU outperforms trigger lines
before or after the RSU. While this suggests the superiority of a particular
setting, it may not be a one-stop solution for all traffic scenarios or
applications because of different sets of case-specific requirements. While in
this paper, we focus on the impact of trigger-line location choice, the
findings can provide further performance optimizations. We are currently
conducting further research on the impact of other parameters of transactional
protocols; the findings from this paper will allow a smaller search space for
optimal solutions.

Figure 6: Packet Error Rate for BSM Reception

## References

  * [1] “Usdot outlines its vision for the future of the country’s streets - national association of city transportation officials.” https://nacto.org/2021/12/16/fhwa-vision-for-infrastructure-spending/.
  * [2] M. B. et al, “Connected roads of the future: Use cases, requirements, and design considerations for vehicle-to-everything communications,” IEEE Vehicular Technology Magazine, vol. 13, no. 3, pp. 110–123, 2018.
  * [3] W. Schulz, “Traffic management improvement by integrating modern communication systems,” IEEE Communications Magazine, vol. 34, no. 10, pp. 56–60, 1996\.
  * [4] S. Djahel, M. Salehie, I. Tal, and P. Jamshidi, “Adaptive traffic management for secure and efficient emergency services in smart cities,” in 2013 IEEE International Conference on Pervasive Computing and Communications Workshops (PERCOM Workshops), IEEE, 2013.
  * [5] A. Jami, M. Razzaghpour, H. Alnuweiri, and Y. P. Fallah, “Augmented driver behavior models for high-fidelity simulation study of crash detection algorithms,” 2022.
  * [6] M. Razzaghpour, A. Datar, D. Schneider, M. Zaman, H. Werner, H. Frey, J. M. Velni, and Y. P. Fallah, “Finite state markov modeling of c-v2x erasure links for performance and stability analysis of platooning applications,” in 2022 IEEE International Systems Conference (SysCon), pp. 1–8, 2022.
  * [7] M. Boban, M. Giordani, and M. Zorzi, “Predictive quality of service (pqos): The next frontier for fully autonomous systems,” arXiv preprint arXiv:2109.09376, 2021.
  * [8] R. Xu, H. Xiang, Z. Tu, X. Xia, M.-H. Yang, and J. Ma, “V2x-vit: Vehicle-to-everything cooperative perception with vision transformer,” arXiv preprint arXiv:2203.10638, 2022.
  * [9] C.-P. et al, “Prototyping and evaluation of infrastructure-assisted transition of control for cooperative automated vehicles,” IEEE Transactions on Intelligent Transportation Systems, pp. 1–17, 2021.
  * [10] S. International, “Profiles for v2x-based fee collection,” Standard Doc J3217, Society of Automotive Engineers, 11 2019.  Issued 2019-11, WIP.
  * [11] L. Lusvarghi and M. L. Merani, “On the coexistence of aperiodic and periodic traffic in cellular vehicle-to-everything,” IEEE Access, vol. 8, pp. 207076–207088, 2020.
  * [12] P. Wendland, G. Schaefer, and R. Thomä, “An application-oriented evaluation of lte-v’s mode 4 for v2v communication,” in Proceedings of the 34th ACM/SIGAPP Symposium on Applied Computing, 2019.
  * [13] 3gpp, “Evolved universal terrestrial radio access (e-utra); medium access control (mac) protocol specification (v14.7.0),” tech. rep., July 2018.
  * [14] S. International, “Lte vehicle-to-everything (lte-v2x) deployment profiles and radio parameters for single radio channel multi-service coexistence,” Standard Doc J3161, Society of Automotive Engineers, 04 2022.
  * [15] A. Bazzi, C. Campolo, A. Molinaro, A. O. Berthet, B. M. Masini, and A. Zanella, “On wireless blind spots in the c-v2x sidelink,” IEEE Transactions on Vehicular Technology, vol. 69, no. 8, 2020.
  * [16] E. E. Marvasti, S. M. O. Gani, and Y. P. Fallah, “A statistical approach toward channel modeling with application to large-scale censored data,” IEEE Transactions on Intelligent Transportation Systems, pp. 1–12, 2020.
  * [17] A. Ghosal and M. Conti, “Security issues and challenges in v2x: A survey,” Computer Networks, vol. 169, p. 107093, 2020.
  * [18] 3gpp, “Security aspect for lte support of vehicle-to-everything (v2x) services specification # 33.185,” tech. rep., July 2020.
  * [19] 3gpp, “Architecture enhancements for v2x services (release 15), specification # 23.285,” tech. rep., Mar 2018.
  * [20] T. et al, “Multiple access in cellular v2x: Performance analysis in highly congested vehicular networks,” in 2018 IEEE Vehicular Networking Conference (VNC), pp. 1–8, 2018.