CPS

    Cyber-Physical System
NCS

    Networked Control System
LAN

    Local-Area Network
WLAN

    Wireless Local-Area Network
KPI

    Key Performance Indicator
WPAN

    Wireless Personal Area Network
CSMA/CD

    Carrier-Sense Multiple Access with Collision Detection
CLEAVE

    ControL bEnchmArking serVice on the Edge
OS

    Operating System
UDP

    User Datagram Protocol
TCP

    Transmission Control Protocol
RMS

    Root Mean Square
RTT

    Round-Trip Time
CI

    Confidence Interval
AP

    Access Point
API

    Application Programming Interface
SSF

    Swedish Foundation for Strategic Research
TECoSA

    Trustworthy Edge Computing Systems and Applications
ABC

    Abstract Base Class
URL

    Uniform Record Locator
AWS

    Amazon Web Services
EC2

    Elastic Compute 2
AMI

    Amazon Machine Image
SSH

    Secure Shell
IP

    Internet Protocol
VPN

    Virtual Private Network
NAT

    Network Address Translation
NTP

    Network Time Protocol
SDR

    Software-Defined Radio
VLAN

    Virtual Local-Area Network
APT

    Advaced Packaging Tool
LTE

    Long-Term Evolution
SSID

    Service Set Identifier
EPC

    Evolved Packet Core
UE

    User Equipment
eNodeB

    Evolved Node B
DNS

    Domain Name System
MNIST

    Modified National Institute of Standards and Technology
HTTP

    Hyper-Text Transfer Protocol
YAML

    YAML Ain’t Markup Language
O-RAN

    Open Radio Access Network
FOSS

    Free and Open Source Software
COSMOS

    Cloud enhanced Open Software defined MObile wireless testbed for city-Scale deployment
OMF

    ORBIT Management Framework
POWDER

    Platform for Open Wireless Data-driven Experimental Research
COTS

    Commercial Off-The-Shelves
RF

    Radio-Frequency
VM

    Virtual Machine
REST

    REpresentational Sate Transfer
OS

    Operating System
MaaS

    Metal-as-a-Service
OEDL

     ORBIT Management Framework (OMF) Experiment Description Language
RSpec

    Resource Specification
LXC

    LinuX Containers
MEC

    Mobile Edge Computing
USRP

    Universal Software Radio Peripheral
OAI

    OpenAirInterface
NR

    New Radio
FPGA

    Field-Programmable Gate Array
WCA

    Wearable Cognitive Assistance
TTF

    Time-to-Feedback
AR

    Augmented Reality
VR

    Virtual Reality
XR

    eXtended Reality
MAR

    Mobile Augmented Reality (AR)
GPS

    Global Positioning System
QoE

    Quality of Experience
QoS

    Quality of Service
TTF

    Time-to-Feedback
PCA

    Principal Component Analysis
Ex-Gaussian

    Exponentially Modified Gaussian
IEEE

    Institute of Electrical and Electronics Engineers
CPU

    Central Processing Unit
N/A

    Not Applicable
CIO

    Confidence Interval
MLE

    Maximum Likelihood Estimation
CDF

    Cumulative Distribution Function
CCDF

    Complementary Cumulative Distribution Function (CDF)
PDF

    Probability Density Function
XR

    eXtended Reality
FSM

    Finite State Machine
ITQ

    Immersive Tendencies Questionnaire
BFI

    Big Five Inventory of personality traits
PCA

    Principal Component Analysis
ECDF

    Empirical CDF
NSF

    United States National Science Foundation

# Realistic modeling of human timings for Wearable Cognitive Assistance

Manuel Olguín Muñoz1 Vishnu N. Moothedath2 Jaya Prakash Champati3 Roberta
Klatzky4 Mahadev Satyanarayanan5 James Gross6

0000-0002-3383-2335 0000-0002-2739-5060 0000-0002-5127-8497
0000-0001-9701-9186 0000-0002-2187-2049 0000-0001-6682-6559 126EECS School KTH
Royal Institute of Technology Sweden {1molguin, 2vnmo, 6jamesgr} @kth.se
3Edge Networks Group IMDEA Networks Institute Spain<EMAIL_ADDRESS>4Department of Psychology 5School of Computer Science Carnegie Mellon
University USA<EMAIL_ADDRESS><EMAIL_ADDRESS>
###### Abstract

Wearable Cognitive Assistance (WCA) applications present a challenge to
benchmark and characterize due to their human-in-the-loop nature. Employing
user testing to optimize system parameters is generally not feasible, given
the scope of the problem and the number of observations needed to detect small
but important effects in controlled experiments. Considering the intended
mass-scale deployment of WCA applications in the future, there exists a need
for tools enabling human-independent benchmarking.

We present in this paper the first model for the complete end-to-end emulation
of humans in WCA. We build this model through statistical analysis of data
collected from previous work in this field, and demonstrate its utility by
studying application task durations. Compared to first-order approximations,
our model shows a ~$36\text{\,}\mathrm{\char 37\relax}$ larger gap between
step execution times at high system impairment versus low. We further
introduce a novel framework for stochastic optimization of resource
consumption-responsiveness tradeoffs in WCA, and show that by combining this
framework with our realistic model of human behavior, significant reductions
of up to $50\text{\,}\mathrm{\char 37\relax}$ in number processed frame
samples and $20\text{\,}\mathrm{\char 37\relax}$ in energy consumption can be
achieved with respect to the state-of-the-art.

##  1 Introduction

Wearable Cognitive Assistance (WCA) applications are a novel category of
wearable, edge-native applications aiming to amplify human cognition in both
daily activities and professional settings. These systems aim to seamlessly
integrate into the day-to-day of users, leveraging compute-intensive
algorithms to analyze user and environment information and provide real-time,
context-aware information and feedback. WCA applications originally emerged as
assistive use-cases for individuals suffering from cognitive decline due to
aging or traumatic brain injuries [1, 2, 3], and have since expanded to a
greater range of use cases. In particular, following the success of non-
wearable eXtended Reality (XR) and cognitive assistance in industrial settings
[4, 5], there is increasing interest in the research community in the
application of WCA for step-by-step assistance for complex assembly tasks [6,
7].

A defining characteristic of these applications is their lack of reliance on
intentional user inputs to trigger responses. They are intended to operate as
autonomous guides, much akin to how Global Positioning System (GPS) systems
guide drivers, tracking their progress and providing feedback and instructions
at appropriate times. This context-sensitivity and proactivity in providing
user feedback translate into a reliance on high-dimensional, complex,
unstructured inputs, such as real-time video, which require intensive compute
capabilities to process. This also translates into latency-sensitivity, as
with any AR application. Delays and jitter can be jarring to the user, causing
discomfort and leading them to make mistakes and potentially even abandoning
the application altogether. On the other hand, as their name suggests, these
systems are by design _wearable_ , which implies the use of lightweight,
battery-powered, low energy consumption devices.

The combination of these opposing characteristics has led to WCA applications
being identified in the literature as prime candidates for offloading to the
edge [2, 6, 8]. However, many unknowns still remain before consumer-scale
adoption of these applications can become a reality. One key gap in knowledge
pertains to the current lack of tools and methodologies for scalable and
repeatable study of WCA application performance and resource utilization in
realistic deployments. Due to their human-in-the-loop nature, these
applications present a challenge to benchmark and characterize, in particular
in real-scale deployments where dozens or even hundreds of users might
concurrently use the system. Accordingly, recruiting a cohort of subjects for
realistic benchmarking and study of WCA systems can be prohibitively
cumbersome and expensive for many research groups and system designers There
exists therefore a real need for scalable tools for WCA benchmarking which do
not rely on direct testing of the human-in-the-loop.

In that context, the contributions of this paper are:

  1. 1.

We introduce the first, to our knowledge, stochastic model for human timings
in WCA applications. Using the data collected for [9] as a base, we build a
stochastic model which takes as input past measurements of system
responsiveness and produces realistic step execution times. We also introduce
a novel way to generate dynamic traces of frames for WCA applications which
can be combined with the timing model for a full end-to-end emulation of a
human. We name this new model _EdgeDroid $2.0$_; a direct, more realistic
evolution of our initial EdgeDroid approach [10, 11].

  2. 2.

Using this model, we study the implications of realistic human behavior for
the _application lifetime footprint_ of WCA, understanding this term as the
duration of a specific complete execution of the application task. In
accordance with previous work [9], we find dependencies between system
responsiveness and human step execution times that lead to substantially
different application lifetimes when compared to a first-order baseline which
does not take into account human behavior.

  3. 3.

Finally, we study the potential for optimization in WCA when considering human
behavior using our model. We develop a generic model for the stochastic
optimization of resource consumption versus responsiveness trade-offs in these
applications, which we apply to two potential avenues for WCA optimization;
number of processed samples and energy consumption per step. First, we study
the potential for reducing the number of samples captured per step. This is a
valuable endeavor, as reducing the number of samples captured and subsequently
processed directly translates in lower bandwidth demand on the wireless
network and processor time demand on the cloudlet. Next, we explore the
potential for direct optimization of energy consumption. The economic
feasibility of WCA, and hence its likelihood of commercial adoption depends on
it not being a resource hog, and this work furthers that effort. Leveraging
our more involved user model, combined with the introduced optimization
approach, we achieve a ~$60\text{\,}\mathrm{\char 37\relax}$ reduction in the
number of samples processed per step. We also achieve an improvement of
$20\text{\,}\mathrm{\char 37\relax}$ in energy consumption, all while
maintaining comparable levels of system responsiveness.

This paper is structured as follows. Section 2 discusses related work in the
field of Wearable Cognitive Assistance modeling. In Section 3 we define and
discuss key concepts in WCA, as well as summarize the key conclusions from our
previous work relating to the relationship between system responsiveness and
human behavior in these applications [9]. In Section 4 we detail our model for
the generation of realistic human timing in WCA. We present its design, verify
its expected behavior with respect to our previous results, and introduce the
dynamic trace generation for full end-to-end emulation of human behavior.
Next, in Section 5, we discuss the potential implications of such a model on
application lifetimes by studying a small series of representative scenarios.
This is followed by a more in-depth investigation in Section 6 on the
potential consequences of a human timing model on the general optimization of
WCA systems. In the same section, we introduce our generic optimization
framework for resource consumption versus responsiveness trade-offs in WCA.
Finally, in Section 7 we summarize and conclude this paper, as well as briefly
discuss potential avenues for future work.

##  2 Related work

There exist a number of approaches to the characterization and benchmarking of
mobile XR, and by extension WCA, deployments. _OpenRTiST_ [12] is a tool which
uses a compute-heavy, yet latency-sensitive workload — image style transfer
[13] — to load and benchmark edge computing deployments. It acts as an end-to-
end realistic AR workload, allowing thus researchers to measure the real end-
to-end latencies of such systems. [6] use a number of prototype WCA
implementation to study and characterize real-world latency bounds in these
systems. In [14], the authors collect and analyze large amounts of Virtual
Reality (VR) network traffic, which they then use to construct a synthetic
model for the generation of traces of such traffic. [15] propose _ARBench_ , a
toolkit for the benchmarking of mobile hardware in the context of AR. The
toolkit incorporates a series of workloads which stress different components
of the mobile device and calculates a score for each workload. _Yahoo Cloud
Serving Benchmark_ [16] and _DCBench_ [17] are workload sets intended for
benchmarking cloud services which have further been used in the context of
benchmarking edge computing infrastructure for AR suitability. _Edgebench_
[18] and _Defog_ [19] benchmark workload performance on the edge versus on the
cloud.

We contribute to this body of work by providing the first tool for the
benchmarking of WCA that dynamically considers the effects of human behavior.
In contrast to the above described works, which generate loads with relatively
static profiles, our model is able to react to changes in system
responsiveness like a human would. We achieve this by building upon our own
previous contributions to this field. In [10, 11] we introduced a coarse
approximation to human behavior modeling in WCA we called _EdgeDroid_. We used
a trace-driven approach, where a pre-recorded and pre-processed “ideal” trace
of steps for a specific WCA step-based task is replayed to a Gabriel [8]
backend. In order to adapt to potential mismatches between system
responsiveness at trace-capture time and trace-replay time, we used a simple
Finite State Machine (FSM) to adapt the trace at the latter by replaying or
skipping certain segments. In [9] we studied the effects of reduced system
responsiveness on human behavior in WCA applications through human-subject
studies. We found that humans generally pace themselves according to the
perceived system responsiveness. When interacting with a highly responsive
system, humans tended to speed up with each step; conversely, humans tended to
slow down in highly unresponsive states.

The characterization and optimization of mobile XR has also long been a topic
of research. [20] analyze a Mobile  (MAR) workload and identify and
characterize the computational bottlenecks in the application. They use this
characterization to develop a series of code optimizations which allow them to
achieve a threefold increase in performance. [21] develop a taxonomy for WCA
as well as strategies for workload reduction in these applications, including
a novel adaptive sampling scheme with the goal of reducing the number of
processed samples while maintaining application responsiveness. [22] present a
framework for the proactive allocation of edge cloud resources while taking
into account the inherent mobility of wearable and mobile AR. [23] propose a
resource allocation strategy which leverages collaboration between AR
applications to minimize energy consumption. As above, we have also previously
directly contributed to this field. In [24, 25] we find the optimum periodic
sampling interval which minimizes the energy tracking human progress of a
specific subtask in WCA. This is extended into an aperiodic strategy in [26].
We further develop this approach in this work by deriving a more practical
approximate solution to the aperiodic strategy, which we then use to implement
a novel framework for the generic optimization of responsiveness-resource
consumption trade-offs.

##  3 Background of WCA

(a) Overview of a task in a WCA, composed of a series of steps. Each steps
starts with an instruction being provided to the user and ends with the
instruction for the next step. The WCA continuously samples the task state,
automatically triggering transitions between steps as correct (or incorrect)
states are recognized.

(b) Breakdown of a step into its timing components. The instruction for step
$M$ and $M+1$ are provided to the user at $t_{0}$ and $t_{n+1}$, respectively.
$t_{k}|k\in\\{1,\ldots,n\\}$ correspond to the WCA sampling instants for step
$M$, and $t_{c}$ marks the instant at which the user finishes performing the
instruction.

Figure 1: Key concepts in Wearable Cognitive Assistance

Wearable Cognitive Assistance (WCA) applications represent a category of
novel, context-sensitive and highly-interactive AR applications. In this work
we focus on a particular category — “step-based” WCA — that have as their goal
the guiding of a user through a sequential task. Examples of such applications
are the LEGO and IKEA assistants [27, 8], in which users are guided step-by-
step through the process of assembling a LEGO model and an IKEA lamp,
respectively.

Step-based WCAs operate analogously to how GPS navigation assistants guide
users, by seamlessly and continuously monitoring the progress of the user and
autonomously providing relevant instructions and feedback. The application
follows the progress of the task in “realtime” by repeatedly sampling the
state of the physical system, most commonly through video frames. Whenever the
assistant detects that the user has correctly or incorrectly performed an
instruction, it provides a new instruction to either advance the task or
correct the detected mistake. The application otherwise remains silent and
out-of-the-way of the user; that is, samples which do not generate a new
instruction (e.g. because they captured an intermediate or unfinished state,
or simply noise) are silently discarded. Herein lies one of the key
characteristics of these applications: the user only consciously interacts
with the application whenever they finish an instruction, and thus these are
the _only_ points in time at which they can notice changes in system
responsiveness.

In order to discuss these applications with precision we provide some
definitions relating to their operation. First of all, a _step_ is formally
understood as a specific action to be performed by the user, described by a
single instruction, and a _task_ consists of a series of steps to be executed
in sequence (see Figure 1(a)). A step begins when the corresponding
instruction is provided to the user, and ends when the instruction for the
next step is provided; we call the time interval between these two events the
_step duration_.

WCAs employ sampling, most commonly of video feeds, to keep track of the state
of the real world. Take $\\{t_{0},t_{1},\ldots,t_{n+1}\\}$ a series of
discrete and sequential sampling instants at which the WCA captures the state
of the physical system, as illustrated in Figure 1(b). $t_{0}$ corresponds to
the instant at which the instruction for step $M$ is provided and the first
sample is taken, and $t_{n}$ to the instant at which the final sample (i.e.
which captures the final state of step $M$) is taken. $t_{n+1}$ is then the
instant at which the result for sample $t_{n}$ is returned and the instruction
for step $M+1$ is provided. We define $t_{c}$ as the point in time at which
the user finishes performing the instruction for step $M$, and the intervals
$t_{c}-t_{0}$, $t_{n}-t_{c}$, and $t_{n+1}-t_{n}$ as the _execution time_ ,
_wait time_ , and _last sample Round-Trip Time (RTT)_, respectively, of a step
$M$. The sum of the latter two values (i.e. the interval $t_{n+1}-t_{c}$) we
call _ Time-to-Feedback (TTF)_, a metric which we will repeatedly refer to in
this paper as it directly describes the responsiveness of a WCA.

###  3.1 The effects of changes in responsiveness on human behavior

In [9] we studied the effects of system responsiveness on human behavior in
step-based WCA in a controlled experiment. We employed a modified and
instrumented version of the above-mentioned, step-based LEGO WCA [27]. $40$
subjects interacted with the assistant, performing a $169$-step task while we
altered the responsiveness in realtime and captured key application and task
performance metrics. Additionally, we also employed questionnaires to evaluate
personality traits of the participants, and correlated these results with the
task performance metrics.

We used _delay_ and execution time as the variables for system responsiveness
and human behavior, respectively. _Delay_ corresponded to a temporarily fixed
time duration for the processing interval of each frame. That is, if during a
series of steps delay was set to $D$ seconds, the feedback for each frame was
provided to the user $D$ seconds after frame capture. The correlation between
this variable and execution time was then studied. To compensate for the
distribution of $t_{c}$111$t_{c}$, and conversely the wait time $\mathcal{W}$
of a step, can be assumed to be uniformly distributed in the interval
$[t_{n-1},t_{n}]$ without loss of generality. [9], in the present work we
adjust the nominal delay $D$ by a factor $1.5$. We will refer to this adjusted
delay as _ Time-to-Feedback (TTF)_.

Our findings can be summarized as follows:

  1. 1.

System slow-down induces _additional_ behavioral slow-down which scales with
the decrease in system responsiveness. Compared to the unimpaired case,
participants were on average $12\text{\,}\mathrm{\char 37\relax}$ slower when
subject to a mean TTF of $2.475\text{\,}\mathrm{s}$, and $26$ percentage
points slower at a mean TTF of $4.5\text{\,}\mathrm{s}$.

  2. 2.

At lower TTFs, humans get faster at performing steps as the task progresses,
For sequences of $12$ steps in an unimpaired application state, humans
executed the final four steps on average $36\text{\,}\mathrm{\char 37\relax}$
faster than they did the first four. However, this effect is dampened by
reduced system responsiveness, and actually inverts at the highest levels of
system impairment; humans actually become progressively slower the longer they
spend in a degraded system state.

  3. 3.

The effects of system slow-down on human behavior remain for a while even
after system responsiveness improves. These effects are noticeable for at
least $4$ steps after the return to a high-responsiveness state.

  4. 4.

The above effects are modulated by measures of individual levels of
personality characteristics and focus.

####  3.1.1 Moderation of effects by individual characteristics

We recorded variables related to well-known individual differences,
encompassing both the Big Five Inventory of personality traits (BFI) [28], and
the Immersive Tendencies Questionnaire (ITQ) [29]. Out of the individual-
difference variables, the most salient effect on performance corresponded to
_neuroticism_ , a BFI trait linked to low tolerance for stress and high
emotional reactivity, and which has previously been linked to higher _delay
discounting_ rates [30]. Delay discounting is the tendency to devalue rewards
for which one must wait; high rates, indicative of waiting intolerance, have
been associated with negative social and academic outcomes.

In this work, we will use a normalized scale to describe neuroticism, derived
from the minimum and maximum obtainable values for this variable in the BFI
[28]. _Low_ and _high_ neuroticism will refer to the $[0.0,0.5)$ and
$[0.5,1.0]$ ranges respectively.

Linear regression showed a significant correlation between individual
neuroticism scores and the execution time late in a series of high-delay
steps, $\rho=0.418$, $2$-tailed $p<0.05$ Neuroticism was further identified as
a modulating factor for the pacing effects through a Principal Component
Analysis (PCA). Out of the three identified components, which cumulatively
accounted for $73.13\text{\,}\mathrm{\char 37\relax}$ of the variance in the
results, neuroticism was included in the first two. The effect of neuroticism
was observed across all TTFs and impairment durations in the tasks.

Figure 2: $\mu$ parameter of Ex-Gaussian distributions fitted to execution
times of the first four steps of segments of steps subject to the same TTF in
[9]. Distributions were fitted using MLE.  Figure 3: Example Ex-Gaussian fits
on execution times from steps $48$ in a segment of steps at the maximum
experimental TTF. The effects of neuroticism are clearly visible in the tail
and the mean of the distributions.

Furthermore, we found that execution times, when grouped by experimental
variables such as neuroticism, TTF, and continuous segments of steps subject
to the same TTF, were well-fit by an Ex-Gaussian distribution, as verified
using Kolmogorov-Smirnov goodness-of-fit tests [31]. When grouping by level of
neuroticism, TTF, and _slice_ 222In [9] the _slice_ to which a step belongs to
refers to whether the step occurred in the first, second, or third four-step
segment of a sequence of steps subject to the same TTF. , the best fit
statistic was $0.028$ ($p=0.999$). This distribution has an ample body of
research supporting its suitability for the modeling of the timing of human
actions and reaction times [32, 33, 34]. We found that the effects of
neuroticism on execution times were clearly identifiable in the fitted
distributions, in particular in their means and tails. Figure 2 shows an
example of this modulating effect, illustrating the behavior of the mean
($\mu$ parameter) of Ex-Gaussian distributions fitted to the execution times
of the first four steps of segments of steps subject to the same TTF. Finally,
Figure 3 shows an example of the effects of neuroticism on the fitted Ex-
Gaussian distributions for a specific group of execution times. Higher
neuroticism directly translates into a higher mean and longer tail.

##  4 A model of human behavior for WCA

In the following, we employ the above insights together with the data
collected for [9] to design and build a probabilistic model of human behavior
for WCA. We detail the construction of a model which uses the data collected
to generate, at runtime, realistic execution times. In order to accurately
emulate the behavior of a human, such a model needs to implement two main
behaviors. First, it needs to generate realistic execution times for each step
in the task, considering the current and historical impairment of the WCA
system, as well as salient individual-difference measures. We detail this in
Section 4.1. Neuroticism is incorporated in this aspect of the model, as it is
the most salient individual difference in the data; however, other factors
such as immersive tendency could be treated similarly. Second, the model must
produce sequences of input samples for each step mimicking what a real human
would generate; this is explained in Section 4.2.

###  4.1 Generating realistic execution times

The processing of the data from [9] for the generation of execution times can
be summarized as a grouping according to discretized levels of neuroticism and
a weighted rolling average of TTF. The resulting collections of execution
times represent the distributions of these values for users with specific
levels of neuroticism, interacting with systems at specific states of
impairment and recent histories of impairment. These distributions can then be
sampled to produce new, realistic execution times. In the following, we detail
the step-by-step processing of this data and construction of the probabilistic
model.

We employ a cleaned and re-parameterized copy of the timing data. The $6760$
data points are arranged in a table together with identifiers for the
subjects, their normalized neuroticism score, and a sequence number for each
step.

TABLE I: Default bins used for model parameter levels. Values have been rounded to two decimal places.  Parameter | Low |  |  | Medium |  |  | High
---|---|---|---|---|---|---|---
Neuroticism | $[0,0.5)$ |  |  |  |  |  | $[0.5,1.0]$
Weighted TTF | $[0.0],0.82]$ | $(0.82,1.53]$ | $(1.53,2.08]$ | $(2.08,2.67]$ | $(2.67,3.45]$ | $(3.45,4.13]$ | $(4.13,\infty]$

We begin by calculating rolling weighted averages of the TTFs of each of the
$40$ individual repetitions of the data. We use exponentially decaying weights
for the most recent $12$ steps, defined in Equation 1, such that the most
recent TTF accounts for roughly $50\text{\,}\mathrm{\char 37\relax}$ of the
rolling average, the second-most recent for ~$25\text{\,}\mathrm{\char
37\relax}$, the third-most ~$12\text{\,}\mathrm{\char 37\relax}$, and so on.
We additionally pad the data for each run with $12$ copies of the first TTF in
order to ensure sensible values for the first twelve steps; this padding is
removed after the weighted values have been calculated. This weighing ensures
that drastic changes in TTF are significantly remembered by the model for at
least $4$ steps — in line with our previous findings on human behavior — and
are subsequently quickly forgotten.

$w_{n-i}=\left\\{\begin{array}[]{ll}\frac{e^{-0.7i}}{\sum\limits^{12}_{j=1}e^{-0.7j}}&1\leq
i\leq 12\\\ &\\\ 0&i>12\end{array}\right.$ (1)

The resulting weighted TTFs are then binned into continuous ranges by
splitting the data on the $7$-quantiles. The exact resulting bins of this
operation on the data are presented in Table I.

Next, the data is further tagged according to its associated level of
normalized neuroticism. For this work, we use two levels, _low_ and _high_ ,
the exact values for which can also be seen in Table I.

After this preprocessing has been finished, the data is ready to be used for
the generation of execution times by applying the above steps in real-time to
measured TTFs:

  1. 1.

At the beginning of each step, the model is fed the measured TTF for the
previous step.

  2. 2.

The model calculates a weighted average over the latest $12$ steps using the
weights defined in Equation 1.

  3. 3.

The resulting weighted TTF is binned into the corresponding range (Table I).

  4. 4.

The model then filters the pre-processed data to find execution time samples
associated with this same discretized weighted TTF.

  5. 5.

The selected samples are further filtered to match the desired level of
neuroticism.

  6. 6.

The remaining samples are then used to output a realistic execution time,
either by

     * •

directly sampling the execution time values;

     * •

or, using MLE to fit a distribution to the execution time samples and then
sampling the distribution instead.

The distribution chosen for the second variant described above corresponds to
the Ex-Gaussian distribution, previously discussed in Section 3.1.1.

We implement these two variants of the model in Python 3.10, and verify their
correct behavior in the following.

####  4.1.1 Verifying the behavior of the timing model

We verify the behavior of the above described model with respect to the four
main conclusions of our work in [9], which were previously discussed in
Section 3.1. These are reformulated as objectives below:

  1. 1.

Higher TTFs should result in higher execution times.

  2. 2.

When subject to a series of steps at the same level of impairment, desired
behavior depends on the level:

    1. (a)

At low TTFs, the model should speed up; i.e. execution times should decrease.

    2. (b)

At medium TTFs, execution times should remain more or less the same.

    3. (c)

At high TTFs, execution times should increase.

  3. 3.

The effects on execution times due to past changes in system responsiveness
should linger for at least a few steps whenever system responsiveness changes
anew.

  4. 4.

Finally, neuroticism should act as a modulating factor for the above effects.

Figure 4: Effects of feeding three different TTFs (_low_ ,
$0\text{\,}\mathrm{s}$, _medium_ , $2.5\text{\,}\mathrm{s}$, or _high_ ,
$5\text{\,}\mathrm{s}$) into the model on the generated execution times.
Higher TTFs directly lead to higher execution times. Error bars indicate the
$95\text{\,}\mathrm{\char 37\relax}$ CI.

Figure 4 shows the mean execution time outputted by the model when fed three
different levels of TTF (_low_ , $0\text{\,}\mathrm{s}$, _medium_ ,
$2.5\text{\,}\mathrm{s}$, or _high_ , $5\text{\,}\mathrm{s}$). These results
were generated by first warming up the model by feeding it $25$ TTFs selected
at random from the data before feeding it the desired input TTF, and recording
the generated execution time. This procedure is repeated $600$ times for each
configuration and target TTF. The resulting mean execution times match
precisely the desired behavior mentioned in Item 1, with the difference in
mean execution times at low versus high TTFs reaching
$14\text{\,}\mathrm{\char 37\relax}$ (~$5.6\text{\,}\mathrm{s}$ to
~$6.4\text{\,}\mathrm{s}$) in the worst case (high neuroticism configuration).
Additionally, we can observe the effects of neuroticism on generated execution
times, as specified in Item 4. At low neuroticism, the average difference
between execution times at low versus high TTFs was of roughly
$6.2\text{\,}\mathrm{\char 37\relax}$, compared to $12.5\text{\,}\mathrm{\char
37\relax}$ at high neuroticism.

Figure 5: Effects of prolonged exposure to constant levels of system
impairment on the model. At low ($0\text{\,}\mathrm{s}$) TTF, the models
speed-up over time; conversely at high ($5.0\text{\,}\mathrm{s}$) TTF, the
models either present no change or drastically increase their generated
execution times, depending on the level of neuroticism. Error bands indicate
$95\text{\,}\mathrm{\char 37\relax}$ CI.

Next, Figure 5 shows the evolution of generated execution times while the
model is subject to a fixed TTF, either _low_ ($0\text{\,}\mathrm{s}$) or
_high_ ($5\text{\,}\mathrm{s}$). These results were generated by first warming
up the model with $25$ random TTFs, and then recording the generated execution
times over a sequence of $12$ steps at a fixed TTF; this procedure is repeated
$600$ times for each configuration and target TTF. Once again, we see here
behavior matching what is expected of the model, in particular with respect to
Item 2. At low TTFs, the model is on average, across all configurations,
$8.2\text{\,}\mathrm{\char 37\relax}$ faster at step $12$ when compared to
step $1$. At high TTFs, the behavior changes depending on the level of
neuroticism of the model. Low neuroticism models basically do not change their
execution times, whereas high neuroticism configurations are on average
$10\text{\,}\mathrm{\char 37\relax}$ slower after $12$ steps. This is once
again in line with our previous findings, as we had previously concluded that
humans tend to speed up during a task, but that this speed-up is hindered and
eventually reversed as system responsiveness decreases, and that the strength
of this effect is correlated with neuroticism.

Figure 6: Effects of changes in system impairment on subsequently generated
execution times. These effects linger on after the change, and thus execution
times immediately after a transition are either consistently lower or higher
than otherwise at the new TTF, depending on the old TTF. Error bars indicate
$95\text{\,}\mathrm{\char 37\relax}$ CI.

Finally, in Figure 6 we showcase the behavior of the model when comparing
execution times generated immediately after a change in system responsiveness.
We generate these results by first warming up the model by feeding it a fixed
TTF (which we will refer to as the _origin_ TTF) $25$ times. Next, another TTF
value (the _destination_ TTF) is fed to the model, and we record the output
execution time. Each sample is tagged according to the relation between origin
and destination TTF, either lower to higher, higher to lower, or equal. As
before, we run $600$ repetitions of this procedure for each combination of
model configuration, origin TTF, and destination TTF. Execution times
generated immediately after a transition from a higher TTF into a lower one
are consistently higher than execution times generated without a preceding
change in TTFs. Conversely, execution times are consistently lower than
otherwise immediately after a change from a lower TTF into a higher one. These
results are once again in line with our findings in [9], in which we found
lingering effects of transitions between levels of system impairment on human
execution times.

###  4.2 Generating realistic samples

Apart from the aforementioned timing and performance data, for [9] we also
recorded all collected video frame samples together with matching metadata.
For each video frame submitted to the WCA during the tasks, we recorded  1.
the raw video frame captured  2. sample submission timestamp  3. WCAprocessing
completed timestamp  4. result or acknowledgement returned timestamp  5. a tag
representing the result of the WCA processing  . The tags assigned
corresponded to:

SUCCESS:

frames which triggered a transition to a new step (or the correction of a
previous mistake) in the logical task model of the WCA, and thus cause the
generation of feedback to the user.

REPEAT:

frames which captured the same board state as the previous successful frame,
and thus produced no feedback.

LOW_CONFIDENCE

frames for which the image recognition algorithm in the WCA did not reach the
necessary confidence threshold to interpret it as a valid board state. These
frames also produce no feedback.

BLANK

frames in which not enough of the board is visible due to noise, movement,
occlusion, etc. These frames produce no feedback either.

TASK_ERROR

frames which contained an incorrect board state and thus triggered a
transition to a procedural corrective step and the generation of feedback to
the user. However, it must be noted that none of the $40$ participants made
any mistakes during the task, and thus no such frames were encountered in the
data.

We correlate this frame data with the step timing data described in Section
4.1 to match frames with their corresponding step execution times. We assign
to each frame a normalized instant value $t_{\text{norm}}$ corresponding to
its capture instant $\tau$ (expressed in seconds since the start of the step)
divided by the total execution time $t_{\text{exec}}$ of the step:

$\displaystyle\left(t_{\text{norm}}=\frac{\tau}{t_{\text{exec}}}\right)\in[0,1]$
(2)

This allows us to analyze the distribution of frame tag probabilities as a
step progresses, independently of execution times. This is illustrated in
Figure 7. Intuitively, REPEAT frames dominate the early instants after a step
transition, as the user has not had time to start performing the new
instruction and thus the WCA keeps capturing frames representing the previous
state of the board. As the user starts moving and performing actions, BLANK
frames start to dominate, as this activity prevents the WCA from capturing
“clean” frames. Finally, it must be noted that SUCCESS frames are not included
in this probability density plot, as, by definition:

$P(\text{{SUCCESS}}|t_{\text{norm}})=\left\\{\begin{array}[]{ll}0&t_{\text{norm}}<1.0\\\
1&t_{\text{norm}}\geq 1.0\end{array}\right.$ (3)

That is, any frame captured immediately at or after the execution time has
been reached will contain the finished board state and thus correspond to a
SUCCESS frame.

Figure 7: Probability density of frame result tags as a step progresses. Note
that SUCCESS frames are not included as — by definition — the probability for
success frames is $1$ for all normalized instant values greater than or equal
to $1.0$.

Using the above insights, together with the corresponding recorded video
frames, we devise a scheme for the procedural generation of a synthetic trace
for any step in WCA task in the same category as those used in [9]. We first
prepare a discretized representation of the probability density map in Figure
7. We segment the normalized instant value into a number of discrete bins
($25$ in this work), and calculate the relative fraction of frames for each
category in each bin. For each step, given  1. a collection of random non-
SUCCESS, non-REPEAT frames (at least one frame for each of the BLANK and
LOW_CONFIDENCE categories)  2. an appropriate SUCCESS video frame containing
the correct state for the step  3. an appropriate REPEAT video frame
containing the correct state for the _previous_ step  , we can then
procedurally generate a trace by randomly selecting appropriate frames
according to the distributions presented in Figure 7. In other words, for each
sampling instant in a step with a given execution time $t_{\text{exec}}$:

  1. 1.

We calculate $t_{\text{norm}}$ according to Equation 2.

  2. 2.

If $t_{\text{norm}}\geq 1.0$, we select the SUCCESS frame and stop sampling.

  3. 3.

If instead $t_{\text{norm}}<1.0$, we find the appropriate bin for
$t_{\text{norm}}$ and then select a frame by performing a weighted random
sampling of the frame categories in the normalized instant bin.

###  4.3 Obtaining the model

We provide the model implementations in Python $3.10$ as well as the base data
to the community as Free and Open Source Software (FOSS). All of these are
published on the KTH-EXPECA/EdgeDroid2 repository on GitHub under a permissive
Apache version 2 license.

##  5 Implications for the study of WCA footprints

We begin by studying the implications of such a model on the estimation of
application footprints as described by their lifetimes. In the context of WCA,
we will understand _application lifetime_ as the time it takes a user to
complete a specified task. This is an important metric for WCA optimization,
as it directly relates to system resource utilization and contention, and to
energy consumption.

In order to illustrate the consequences of using a less realistic model that
does not take into account higher order effects, we introduce here a reference
model to which we will compare our more realistic models. This model
represents a first-order approximation to empirical execution time modeling,
and consist simply of an Ex-Gaussian distribution fitted to all execution time
samples collected for [9]. This distribution is then randomly sampled at
runtime to obtain execution times for each step, without any adjustment to the
current state of the system.

We start by studying application lifetimes in a controlled, ideal setup by
using the timing models to generate execution times for sequences of $100$
steps subject to constant TTFs. These runs are completely simulated and no
sampling of video frames is performed; for each step, we simply feed the
models a predefined TTF and record the generated execution time. We use the
combination of TTFs and execution times to calculate theoretical step duration
times and subsequent total application lifetimes. This is done for $25$
linearly distributed TTFs in the $05\text{\,}\mathrm{s}$ range; $45$
independent repetitions for each combination of model configuration and TTF.

(a) Evolution of mean application lifetimes as TTFs increase. Error bars
indicate $95\text{\,}\mathrm{\char 37\relax}$ CIs.

(b) Percentage difference in mean application lifetimes with respect to the
reference model at select TTFs. Error bars indicate the
$95\text{\,}\mathrm{\char 37\relax}$ CIs, calculated using a two-sided T-test.

Figure 8: Time-to-Feedback versus application lifetime.

The results of this investigation are presented in Figure 8. Compared to the
reference model, our realistic model is, on average, roughly
$11\text{\,}\mathrm{\char 37\relax}$ faster when subject to low TTFs. At
higher TTFs, the behavior of the model depends on its level of normalized
neuroticism. At low neuroticism, the behavior of the realistic model results
in total task durations that are basically indistinguishable from the
reference model. However, at high neuroticism, the model once again results in
a considerable difference in total task duration with respect to the reference
— this time extending durations by ~$11\text{\,}\mathrm{\char 37\relax}$ on
average.

Figure 9: Experimental setup used to study the implications of the realistic
models of human behavior for WCA. We deploy containerized instances of the
client-server loop running the models on a testbed consisting of $10$
Raspberry Pi clients connected to a cloudlet over a COTS IEEE $802.11$b/g
access point.

Next we study the effects of first- versus second-order models in a more
realistic setting. The models, reference and realistic, are deployed on the
Raspberry Pi clients of the testbed depicted in Figure 9. For this, the timing
models and frame generator are integrated into a custom Python3 client for the
Gabriel WCA platform [8], which are then paired with real instances of Gabriel
deployed on the cloudlet. Clients and cloudlet communicate over an IEEE
$802.11$b/g wireless network. Our choice of wireless standard is simply
motivated by a desire to amplify the potential effects of network congestion.

(a) Mean application lifetimes per testbed configuration. Note that due to the
low number of samples, means have been calculated using the geometric instead
of arithmetic average. Error bars indicate $95\text{\,}\mathrm{\char
37\relax}$ CIs, calculated using bootstrapping.

# clients | 1 | 4 | 7 | 10
---|---|---|---|---
RTT | $0.42\text{\,}\mathrm{s}$ | $1.12\text{\,}\mathrm{s}$ | $1.92\text{\,}\mathrm{s}$ | $2.68\text{\,}\mathrm{s}$
(a) Mean measured Round-Trip Times for each testbed configuration.

(a) Percentage difference in mean application lifetimes with respect to the
reference model. Confidence intervals have been omitted due to the low number
of samples and the use of the geometric mean.

Figure 11: Application lifetimes in the realistic scenarios.

We deploy configurations running $45$-step versions of the LEGO task described
in [9]. The testbed configurations include setups with $14710$ clients. Due to
having limited time, each combination of testbed and timing model
configuration is only repeated $10$ times. The results are presented in Figure
11. Owing to the low number of samples, specifically to minimize the effects
of potential outliers, we opt here for the geometric rather than arithmetic
mean to represent our results. The results are nonetheless clear, and follow
the same pattern as the previously discussed results under ideal, controlled
circumstances. With just a single client and mean RTT of around
$400\text{\,}\mathrm{ms}$, all parameterizations of the realistic model
achieved an average task duration $612\text{\,}\mathrm{\char 37\relax}$
shorter than the reference. At $10$ clients, the results mimic those at higher
TTFs in the ideal controlled setup, with high neuroticism parameterizations
reaching ~$8\text{\,}\mathrm{\char 37\relax}$ longer application lifetimes.

These results highlight the importance of accurate execution time modeling
when studying WCA application lifetimes. Not only do we see considerable
differences in lifetimes at relatively moderate levels of system congestion,
but the sign of these differences depends on the load placed on the system.
Imagine thus a system designer studying resource consumption optimization in a
WCA. If they were to employ the reference model for their study on an
unimpaired system, it could lead them to significantly underestimate the
potential for optimization of resource consumption, leaving performance (and,
potentially, monetary) gains on the table. On the other hand, under heavy
load, they would instead underestimate system resource occupation, again
leading to performance losses.

##  6 Implications for the optimization of resource consumption and
responsiveness trade-offs in WCA

As with any application intended for mass deployment on multi-tenant systems
such as the edge, WCA applications will have to be configured and designed to
minimize resource consumption at runtime. At the same time, imposing too
stringent requirements on resource consumption can adversely affect
application responsiveness, which in turn has the potential to drastically
reduce quality of experience for users. Optimizing the deployment of these
applications thus inherently involves achieving a balance between the
reduction of resource consumption while maintaining an acceptable level of
system responsiveness.

A question then arises as to what extent accurate modeling of human behavior
plays a role in the optimization of WCA applications and systems. We have
already seen from the results in Section 5 that changes in responsiveness can
have drastic effects on human execution times and subsequently on overall
application lifetimes. This points towards parameters with dependencies on
step timings as prime candidates for evaluating the effects of human behavior
on their potential for optimization of different dimensions of WCA. One such
parameter of particular interest to us is sampling strategy, which
intrinsically hinges on a stochastic understanding of human timings in a step.
In the following section we will study the potential advantages of using the
realistic model presented in Section 4 to estimate the execution time
distributions of steps to adapt the sampling strategy at runtime. We will
first introduce a generic optimization framework which produces an aperiodic
sampling strategy that optimizes for arbitrary responsiveness-resource
consumption trade-offs in WCA. We will then employ this framework for the
minimization of two different metrics: number of samples and total energy
consumption per step. In order to illustrate the advantages of our framework,
we will compare our results with a state-of-the-art baseline which does not
dynamically adapt.

###  6.1 Optimization framework

Our optimization approach focuses on the individual steps which comprise a
complete WCA task. Thus, we begin by assuming a given execution time
distribution $\mathcal{T}$, and take the modeling and partial solution
approach from recents works on energy efficient sampling in edge-based
feedback systems. In [24, 25], the authors model the energy in terms of the
expected number of samples $\mathbb{E}[\mathcal{S}]$ and the expected wait
time $\mathbb{E}[\mathcal{W}]$ experienced by the user. The authors then find
the optimum periodic sampling interval that minimizes this energy, or
equivalently the non-constant parts of this energy termed as Energy Penalty.

With a value much smaller than the execution time of the event, the RTT of the
final sample is included in this constant part, which is why $\mathcal{W}$ is
computed without it. Next, in [26], the author retains the model and removes
the constraint of periodicity to find the optimum aperiodic sampling instants
$\\{t_{n},\,n=1,2,\dots\\}$ that minimize the same energy penalty.

In this work, we use the modeling from [26] to find the optimum _aperiodic_
sampling interval. However, instead of using their two-step approach to find
the solution which includes a recursive solution followed by a bisection
algorithm, we develop a novel, approximate, but easier solution to finding the
set of the optimum aperiodic sampling intervals. Furthermore, instead of
directly optimizing for energy, we start by noting that, in general, any
objective metric in these applications which relates to sampling and the
responsiveness of the system will present itself as a linear combination
between $\mathbb{E}[\mathcal{S}]$ and $\mathbb{E}[\mathcal{W}]$ plus terms
independent of the number of samples or wait time. Let $\mathcal{E}$
correspond to such an objective metric. Thus,

$\displaystyle\Rightarrow\mathcal{E}$
$\displaystyle=\alpha\mathbb{E}[\mathcal{S}]+\beta\mathbb{E}[\mathcal{W}]+C\;$
(4)

Here, $\alpha,\beta$ and $C$ are constants responsible for modifying the
objective function from one metric to another. For instance, in the modeling
used by [24, 25, 26], the chosen characterization results in a metric which is
equal to the energy penalty. Our solution which minimizes Equation 4 is
provided in Equation 5. It assumes a $\mathcal{T}$ distributed according to a
Rayleigh distribution with parameter $\sigma$. The complete mathematical
derivation that leads to this formula is detailed in References.

$\displaystyle t_{n}$
$\displaystyle=\Big{(}3\sigma\\!\sqrt{\tfrac{\alpha}{2\beta}}\Big{)}^{\frac{2}{3}}n^{\frac{2}{3}}$
(5)

###  6.2 Optimizing for mean number of samples per step

We first look at the application of Equation 4 for the optimization of number
of captured samples per step. We start with this metric as its implications
for resource consumption and responsiveness are straightforward to understand.
On the one hand, higher sampling rates directly lead to perceived increased
system responsiveness, as smaller sampling intervals translate into smaller
maximum wait times. On the other, the relationship between number of samples
captured and sent and network congestion is exponential, and too high sampling
rates quickly lead to bottlenecks on the network, particularly in multi-tenant
environments. Additionally, the energy cost of capturing a sample on a WCA
client device is often much higher than remaining in an idle state, and thus
excessive sampling leads to drastically increased energy consumption.
Optimizing the number of samples captured per step can thus be a
straightforward way of reducing resource consumption and contention in WCA
applications.

However, an unconstrained optimization of the number of samples is trivial and
meaningless as the solution points to a single sample at
$t\\!\rightarrow\\!\infty$, which also takes the wait time to infinity. Thus,
we look at the constrained optimization of the expected number of samples with
an upper bound $w_{0}$ for the expected wait. That is,
$\mathbb{E}[\mathcal{W}]\\!\leq\\!w_{0}$. We show in References that we can
find appropriate $\alpha$ and $\beta$ for this problem by satisfying the
condition

$\displaystyle\frac{\alpha}{\beta}=\frac{2\sqrt{2}\,w_{0}^{2}}{({\Gamma}(\tfrac{3}{4}))^{2}\,\sigma}\approx
1.9\frac{w_{0}^{2}}{\sigma}$ (6)

where ${\Gamma}(x)$ is the Gamma function.

We introduce here a reference scheme to which we will compare our approach. In
[21], [21] introduce an adaptive sampling scheme for WCA intended to reduce
the number of samples processed per step while still meeting application
responsiveness bounds. At every sampling instant $t$, the scheme adapts the
sampling rate $R(t)$ of the system according to the estimated likelihood of
the user having finished the step, following the formula

$R(t)=R_{\text{min}}+\varphi\left(R_{\text{max}}-R_{\text{min}}\right)*CDF(t)$
(7)

$R_{\text{max}}$ and $R_{\text{min}}$ correspond to the maximum and minimum
sampling rates of the system, respectively. $R_{\text{max}}$ can directly be
assumed to correspond to $1/\text{\acs{RTT}}_{\mu}$, where
$\text{\acs{RTT}}_{\mu}$ corresponds to the mean RTT of the system.
$R_{\text{min}}$ needs to either be calculated according to the latency bounds
of the system or specified manually. $\varphi$ corresponds to a scaling factor
and $t$ to the time of the current sampling instant with respect to the start
of the step. Finally, $CDF$ corresponds to the CDF of a distribution
describing the execution times for the current step; [21] used a single static
Gaussian distribution for all steps in their work.

In the following, we will show the effects of our optimization approach
combined with our timing models compared to the state-of-the-art approach
[21]. For this we implement these sampling schemes in Python and run a number
of simulations with them. The first scheme uses our approach, Equations 4 and
6, to determine the optimum sampling instants and the values for $\alpha$ and
$\beta$ at each step. It includes an embedded timing model (without any
distribution fitting) to provide updated estimates of the mean execution time
$\mu$ and $\sigma$ at every step as well, allowing it to adapt to the state of
the system. We will refer to this scheme as the _sample-count-optimized
aperiodic_ sampling scheme.

We implement [21]’s original design using a Gaussian distribution fitted to
all the execution times collected for [9] for CDF calculation. This scheme
does not include an embedded timing model, and uses the same CDF for every
step.

Finally, we also implement two reference sampling schemes representing best-
and worst-case extremes. The first of these corresponds to the offline optimum
which uses an embedded _oracle_ to perfectly predict the execution time of
each step. Such an ideal scheme is thus able to always sample exactly once per
step, with a constant wait time of zero. The second reference scheme
corresponds to one which _greedily_ samples as much as possible. This
represents a completely unoptimized design with no considerations for
resource-consumption trade-offs; it simply attempts to maximize the number of
captured samples per step. This is an interesting approach to include as it
corresponds to the sampling strategy used in most existing WCA prototypes.

TABLE II: Experimental parameters Parameter | Value | Clarification
---|---|---
# of steps | $100$ |
Repetitions | $100$ |
RTTs | $\left\\{0.3,0.6,\ldots,4.2\right\\}$ |
$\tau_{\text{p}}$ | $250\text{\,}\mathrm{ms}$ | Processing delay
$\tau_{\text{c}}$ | $\text{\acs{RTT}}-\tau_{\text{p}}$ | Communication delay
$w_{0}$ | $1.0\text{\,}\mathrm{s}$ |
$R_{\text{min}}$ | $0.5\text{\,}\mathrm{Hz}$ | Derived as $R_{\text{min}}={(2w_{0})}^{-1}$
$\varphi$ | $1.5$ | Scaling factor, [21]
$P_{0}$ | $15\text{\,}\mathrm{mW}$ | Idle power
$P_{\text{c}}$ | $45\text{\,}\mathrm{mW}$ | Communication power
$\alpha_{\text{samples}}$ | $1.9\sigma^{-1}$ | For sample-count optimization.
$\beta_{\text{samples}}$ | $1.0$ | For sample-count optimization.
$\alpha_{\text{energy}}$ | $\tau_{\text{c}}(P_{\text{c}}-P_{0})$ | For energy optimization.
$\beta_{\text{energy}}$ | $P_{0}$ | For energy optimization.

We proceed to set up an experiment where these sampling approaches are
deployed on identical, simulated, tasks with varying constant RTTs.
Experimental parameters are summarized in Table II. We set the $w_{0}$ and
$\beta$ factors of our sample-count-optimized scheme to
$1.0\text{\,}\mathrm{s}$ and $1.0$, respectively, for mathematical simplicity,
and derive $\alpha=1.9\sigma^{-1}$. Next, we derive $R_{\text{min}}$ for
[21]’s scheme from $w_{0}$. As discussed in Section 3, we assume that wait
times are uniformly distributed between $0\text{\,}\mathrm{s}$ and sampling
interval of each step. A maximum expected wait time $w_{0}=1.0\,$\mathrm{s}$$
thus translates into a maximum expected sampling interval of
$2.0\text{\,}\mathrm{s}$, yielding a minimum sampling rate
$R_{\text{min}}={2.0\,$\mathrm{s}$}^{-1}=0.5\,$\mathrm{Hz}$$. It should also
be noted that in both aperiodic schemes, our sampling-count-optimized approach
and the CDF-based approach, there exists the possibility for sampling instants
to be _missed_ due to the actual RTT of the system being higher than the
parameterization of the schemes. In these cases, both schemes will degrade
into greedy sampling.

The execution times for each step are generated by a timing model without any
distribution fitting on the data. For each combination of sampling scheme
configuration, RTT, and execution time model neuroticism (low or high), we run
$100$ repetitions of the task for good statistical significance. Note that the
embedded timing model in our sampling-count-optimized aperiodic sampling
scheme is always parameterized with a neuroticism matching the neuroticism of
the external execution time model.

(a) Round-trip time versus mean number of captured samples per step, averaged
over all $100$ repetitions of the experiment. Note the logarithmic scale on
the vertical axis. Error bars indicate $95\text{\,}\mathrm{\char 37\relax}$
CIs.

(b) Percentage difference in mean number of captured samples per step by the
sample-count-optimized approach with respect to the three reference schemes.
In other words, curves represent the relative performance of the sample-count-
optimized scheme when using the corresponding reference scheme as baseline.
Error bars indicate $95\text{\,}\mathrm{\char 37\relax}$ CIs, calculated using
a two-sided t-test.

Figure 12: Summary of results for experiment comparing the sample-count-
optimized aperiodic sampling scheme to the reference schemes and [21]’s CDF-
based approach.

The results of this investigation are presented in Figure 12, and clearly show
the advantages of using the sample-count-optimized scheme over the current
state-of-the-art. The performance of [21]’s approach appears to degrade with
lower RTTs, exponentially oversampling as latency tends to zero and the
maximum sampling rate of the system tends to infinity. On the other hand our
sampling scheme consistently matches or beats the state-of-the-art while
maintaining a relatively constant behavior with respect to RTTs. As mentioned
above, the future feasibility and mass adoption of WCA depends on these
applications not hogging the available resources. Our work advances this goal
by being consistently more efficient than existing alternatives at minimizing
the number of samples per step, and thus reducing network and processing load.

It should be noted that although both schemes seem to tend towards two samples
per step as RTTs increase, this is simply an artifact of our experimental
setup. As RTTs increase above the expected wait time, the probability of the
sum of the first sampling interval and the RTT being larger than the execution
time of the step tends towards $1.0$. This leads to these sampling schemes
consistently sampling only twice each step: a first sample which is taken
before the execution time of the step, and a second one RTT seconds later,
after the execution time has been reached.

###  6.3 Optimizing for energy consumption

Next we will explore the implications of combining our timing models with
Equation 4 when directly optimizing for energy consumption in WCA. Although,
as mentioned above, minimizing the number of samples captured during a step
can _potentially_ translate into a reduction in the energy consumption, this
is not a given. Energy consumption depends on multiple other factors other
than number of samples captured, such as idle versus communication power and
delays, and thus cannot be optimized by simply minimizing the number of
samples taken.

In the following, we thus take the general solution, Equation 4, and find the
appropriate $\alpha$ and $\beta$ to minimize the energy consumed per step,
i.e. $\mathcal{E}=E$. We directly take the modeling from [26] with a necessary
modification in the assumption of one-way communication in all but the final
sample. With feedback given even to the discarded samples in our model and
communication delay defined as the total delay in either direction, we have,

$\displaystyle\mathrm{E}=$
$\displaystyle\;\mathcal{S}\tau_{c}P_{c}+(\mathcal{T}+\mathcal{W}+\tau_{\mathrm{p}}+\tau_{\mathrm{c}}-\mathcal{S}\tau_{c})P_{0}$
$\displaystyle=$
$\displaystyle\;\tau_{\text{c}}(P_{\text{c}}-P_{0})\mathcal{S}+\mathcal{W}P_{0}+(\mathcal{T}+\tau_{\text{p}}+\tau_{\text{c}})P_{0}$
$\displaystyle\Rightarrow\alpha=\tau_{\text{c}}(P_{\text{c}}-P_{0}),\text{ and
}\beta=P_{0}$ (8)

$\tau_{\text{p}}$ and $\tau_{\text{c}}$ correspond to the processing and two-
way communication delay for each sample. $P_{\text{c}}$ and $P_{0}$ correspond
to the communication and idle power, respectively, of the WCA client device.

We proceed to repeat the experiment detailed in Section 6.2, replacing the
sample-count-optimized sampling scheme with a new implementation instead
minimizing energy, using Equation 8 for the calculation of $\alpha$ and
$\beta$. Once again, we embed a timing model into the sampling scheme to
provide updated estimates of the mean execution time $\mu$ at each step. We
refer to this scheme as the _energy-optimized aperiodic_ sampling scheme. For
the power constants, we reuse the values estimated by the authors in [25],
$P_{\text{c}}=45\,$\mathrm{mW}$$ and $P_{\text{0}}=15\,$\mathrm{mW}$$. On the
other hand, for the timing variables we define a constant processing delay
$\tau_{\text{p}}=250\,$\mathrm{ms}$$ across all configurations and repetitions
of the experiments; given then a constant RTT for the task, we set
$\tau_{\text{c}}=\text{\acs{RTT}}-\tau_{\text{p}}$.

(a) Round-trip time versus mean per step energy consumption, averaged over all
$100$ repetitions of the experiment. Error bars indicate
$95\text{\,}\mathrm{\char 37\relax}$ CIs.

(b) Percentage difference in mean per step energy consumption by the energy-
optimized sampling scheme with respect to the three reference schemes. Error
bars indicate $95\text{\,}\mathrm{\char 37\relax}$ CIs, calculated using a
two-sided t-test.

Figure 13: Summary of results for experiment comparing the energy-optimized
aperiodic sampling scheme to the reference schemes and [21]’s CDF-based
approach.

Again, we include the reference greedy and offline optimum schemes, as well as
[21]’s approach, and repeat the experiment $100$ times for each combination of
sampling scheme, neuroticism, and RTT.

The results of these experiments are presented in Figure 13, and they clearly
illustrate the advantages of the integration of our timing models with an
adaptive, energy-optimized sampling scheme when compared to unoptimized and
state-of-the-art sampling schemes. Our approach is consistently consumes
$20\text{\,}\mathrm{\char 37\relax}$ less energy than [21]’s state-of-the-art,
and is up to $40\text{\,}\mathrm{\char 37\relax}$ more energy efficient than
the greedy scheme. Furthermore, once again the behavior of our approach is
more consistent and reliable than the competition, exhibiting a flat curve of
energy consumption much akin to that of the offline optimum in behavior.

##  7 Conclusion

This paper addresses the difficulty of benchmarking WCA by offering a model-
based alternative to the extensive human-user studies that would otherwise be
required. It first introduces the EdgeDroid $2.0$ model of human timing
behavior for WCA. This model represents a stochastic approach to execution
time modeling which builds upon prior data [9]. It further introduces a novel
procedure for the generation of synthetic traces of frames in step-based WCA,
allowing for a full end-to-end emulation of a human when combined with the
timing model.

The paper then explores the impact of such a realistic model on the
application lifetime footprint of WCA applications. It shows that less
realistic modeling approaches which do not take into account higher-order
effects on execution time distributions, can potentially lead to substantial
mis-estimations of the application footprint.

Finally, the paper delves into the potential for optimization in WCA systems
using the previously discussed timing models. It proposes a novel stochastic
optimization framework for resource consumption-system responsiveness trade-
offs in WCA, which results in an adaptive sampling strategy. We have shown
that this framework is applicable to both the minimization of number of
samples and total energy consumption per step by showcasing experimental
results. Our results show up to a $50\text{\,}\mathrm{\char 37\relax}$
increase in performance with respect to state of the art when optimizing for
number of samples, and up to a $30\text{\,}\mathrm{\char 37\relax}$
improvement when optimizing for energy consumption, thus proving the value of
such frameworks for the design of WCA applications.

This work serves as an important, yet initial step towards realistic modeling
of human behavior in WCA, and more generally AR. Many directions remain open
to additional exploration in this space. For instance, our current model only
targets a particular class of step-based WCA, and extension of our methodology
to other classes of these applications, or even more generally to AR and XR,
is on our roadmap. Our data [9] also only considers young undergraduate
students at a highly competitive university in the United States. An extension
of this dataset and the model towards a more representative sample of the
general population would surely be a valuable endeavor. Corresponding research
is needed to determine individual difference factors that would substantially
impact response to WCA in novel populations.

In terms of the optimization framework, our current model adopts the
assumption that execution times are Rayleigh-distributed. Although this
distribution fits the data reasonably well, there are other which more
accurately describe the behavior of human execution times (e.g. the
Exponentially Modified Gaussian). Our future efforts consider developing this
framework towards these more accurate distributions. Finally, our current
approach only considers a single client, which will be far from the case in a
real-world WCA deployment. As such, another milestone in this context could be
the exploration for a potential extension towards a collaborative and/or
distributed solution.

## Acknowledgements

This work has been partially funded by the Swedish Foundation for Strategic
Research (SSF) (grant number `ITM17-0246` (ExPECA)), and the United States
National Science Foundation (NSF) (grant number `CNS-2106862`). The funders
had no role in study design, data collection and analysis, decision to
publish, or preparation of the manuscript. Any opinions, findings, conclusions
or recommendations expressed in this material are those of the authors and do
not necessarily reflect the view(s) of their employers or funding sources.

## References

  * [1] Mahadev Satyanarayanan et al.  “The case for vm-based cloudlets in mobile computing”  In _IEEE pervasive Computing_ 8.4 IEEE, 2009, pp. 14–23
  * [2] Kiryong Ha et al.  “Towards Wearable Cognitive Assistance”  In _Proceedings of the 12th Annual International Conference on Mobile Systems, Applications, and Services_ , MobiSys ’14  Bretton Woods, New Hampshire, USA: Association for Computing Machinery, 2014, pp. 68–81  DOI: 10.1145/2594368.2594383
  * [3] Mahadev Satyanarayanan and Nigel Davies  “Augmenting cognition through edge computing”  In _Computer_ 52.7 IEEE, 2019, pp. 37–46  DOI: 10.1109/MC.2019.2911878
  * [4] Markus Funk and Albrecht Schmidt  “Cognitive assistance in the workplace”  In _IEEE Pervasive Computing_ 14.3 IEEE, 2015, pp. 53–55
  * [5] Zhuo Wang et al.  “A comprehensive review of augmented reality-based instruction in manual assembly, training and repair”  In _Robotics and Computer-Integrated Manufacturing_ 78 Elsevier, 2022, pp. 102407
  * [6] Zhuo Chen et al.  “An empirical study of latency in an emerging class of edge computing applications for wearable cognitive assistance”  In _Proceedings of the Second ACM/IEEE Symposium on Edge Computing_ , 2017, pp. 1–14
  * [7] Clément Belletier et al.  “Wearable cognitive assistants in a factory setting: a critical review of a promising way of enhancing cognitive performance and well-being”  In _Cognition, Technology & Work_ 23.1 Springer, 2021, pp. 103–116
  * [8] Zhuo Chen  “An application platform for wearable cognitive assistance”, 2018  URL: https://elijah.cs.cmu.edu/DOCS/CMU-CS-18-104.pdf
  * [9] Manuel Olguín Muñoz et al.  “Impact of delayed response on wearable cognitive assistance”  In _PLOS ONE_ 16.3 Public Library of Science, 2021, pp. 1–25  DOI: 10.1371/journal.pone.0248690
  * [10] Manuel Olguín Muñoz et al.  “Scaling on the Edge–A Benchmarking Suite for Human-in-the-Loop Applicationss”  In _2018 IEEE/ACM Symposium on Edge Computing (SEC)_ , 2018, pp. 323–325  IEEE
  * [11] Manuel Osvaldo J Olguín Muñoz et al.  “EdgeDroid: An experimental approach to benchmarking human-in-the-loop applications”  In _Proceedings of the 20th International Workshop on Mobile Computing Systems and Applications_ , 2019, pp. 93–98
  * [12] Shilpa George et al.  “OpenRTiST: end-to-end benchmarking for edge computing”  In _IEEE Pervasive Computing_ 19.4 IEEE, 2020, pp. 10–18
  * [13] Yongcheng Jing et al.  “Neural style transfer: A review”  In _IEEE transactions on visualization and computer graphics_ 26.11 IEEE, 2019, pp. 3365–3385
  * [14] Mattia Lecci et al.  “An Open Framework for Analyzing and Modeling XR Network Traffic”  In _IEEE Access_ 9 IEEE, 2021, pp. 129782–129795
  * [15] Sofiane Chetoui et al.  “ARBench: Augmented Reality Benchmark For Mobile Devices”  In _2022 IEEE International Symposium on Performance Analysis of Systems and Software (ISPASS)_ , 2022, pp. 242–244  IEEE
  * [16] Brian F Cooper et al.  “Benchmarking cloud serving systems with YCSB”  In _Proceedings of the 1st ACM symposium on Cloud computing_ , 2010, pp. 143–154
  * [17] Zhen Jia et al.  “Characterizing data analysis workloads in data centers”  In _2013 IEEE International Symposium on Workload Characterization (IISWC)_ , 2013, pp. 66–76  IEEE
  * [18] Anirban Das et al.  “Edgebench: Benchmarking edge computing platforms”  In _2018 IEEE/ACM International Conference on Utility and Cloud Computing Companion (UCC Companion)_ , 2018, pp. 175–180  IEEE
  * [19] Jonathan McChesney et al.  “Defog: fog computing benchmarks”  In _Proceedings of the 4th ACM/IEEE Symposium on Edge Computing_ , 2019, pp. 47–58
  * [20] Sadagopan Srinivasan et al.  “Performance characterization and optimization of mobile augmented reality on handheld platforms”  In _2009 IEEE International Symposium on Workload Characterization (IISWC)_ , 2009, pp. 128–137  IEEE
  * [21] Junjue Wang et al.  “Towards scalable edge-native applications”  In _Proceedings of the 4th ACM/IEEE Symposium on Edge Computing_ , 2019, pp. 152–165
  * [22] Zhaohui Huang and Vasilis Friderikos  “Proactive edge cloud optimization for mobile augmented reality applications”  In _2021 IEEE Wireless Communications and Networking Conference (WCNC)_ , 2021, pp. 1–6  IEEE
  * [23] Ali Al-Shuwaili and Osvaldo Simeone  “Energy-efficient resource allocation for mobile edge computing-based augmented reality applications”  In _IEEE Wireless Communications Letters_ 6.3 IEEE, 2017, pp. 398–401
  * [24] Vishnu Narayanan Moothedath et al.  “Energy-Optimal Sampling of Edge-Based Feedback Systems”  In _IEEE International Conference on Communications Workshops (ICC Workshops)_ , 2021, pp. 1–6  DOI: 10.1109/ICCWorkshops50388.2021.9473894
  * [25] Vishnu Narayanan Moothedath et al.  “Energy Efficient Sampling Policies for Edge Computing Feedback Systems”  In _IEEE Transactions on Mobile Computing_ , 2022, pp. 1–1  DOI: 10.1109/TMC.2022.3165852
  * [26] Vishnu Narayanan Moothedath  “Energy-Optimal Sampling for Edge Computing Feedback Systems: Aperiodic Case (To be published)”  In _IEEE/ACM Symposium on Edge Computing (SEC)_ , 2022, pp. 403–408
  * [27] Zhuo Chen et al.  “Early Implementation Experience with Wearable Cognitive Assistance Applications”  In _Proceedings of the 2015 Workshop on Wearable Systems and Applications_ , WearSys ’15  Florence, Italy: Association for Computing Machinery, 2015, pp. 33–38  DOI: 10.1145/2753509.2753517
  * [28] Oliver P John and Sanjay Srivastava  “The Big Five trait taxonomy: History, measurement, and theoretical perspectives”  In _Handbook of personality: Theory and research_ 2.1999, 1999, pp. 102–138
  * [29] Bob G Witmer and Michael J Singer  “Measuring presence in virtual environments: A presence questionnaire”  In _Presence_ 7.3 MIT Press, 1998, pp. 225–240
  * [30] Jacob B Hirsh et al.  “Delay discounting: Interactions between personality and cognitive ability”  In _Journal of research in personality_ 42.6 Elsevier, 2008, pp. 1646–1650
  * [31] Frank J Massey Jr  “The Kolmogorov-Smirnov test for goodness of fit”  In _Journal of the American statistical Association_ 46.253 Taylor & Francis, 1951, pp. 68–78
  * [32] Doug Rohrer and John T Wixted  “An analysis of latency and interresponse time in free recall”  In _Memory & Cognition_ 22.5 Springer, 1994, pp. 511–524
  * [33] Evan M Palmer et al.  “What are the shapes of response time distributions in visual search?”  In _Journal of experimental psychology: human perception and performance_ 37.1 American Psychological Association, 2011, pp. 58
  * [34] Fernando Marmolejo-Ramos et al.  “Generalised exponential-Gaussian distribution: a method for neural reaction time analysis”  In _Cognitive Neurodynamics_ Springer, 2022, pp. 1–17
  * [35] Fukumoto Satoshi et al.  “Optimal Checkpointing Policies Using the Checkpointing Density”  In _Journal of Information Processing_ 15.1, 1992, pp. 97–92
  * [36] Richard Bellman  “Dynamic programming and a new formalism in the calculus of variations”  In _Proceedings of the National Academy of Sciences of the United States of America_ 40.4 National Academy of Sciences, 1954, pp. 231
  * [37] George Arfken et al.  “Calculus of Variations”, 2013, pp. 1081–1124

In this appendix, we give the mathematical derivation of the optimum aperiodic
sampling interval discussed in Section 6.1. We start with the general
solution, where the objective function to be minimized is given by Equation 4:

$\displaystyle\Rightarrow\mathcal{E}$
$\displaystyle=\alpha\mathbb{E}[\mathcal{S}]+\beta\mathbb{E}[\mathcal{W}]+C$

We first borrow the idea of checkpointing density from [35] and define an
instantaneous sampling rate function $r(t)$ which is related to $\\{t_{n}\\}$
such that,

$\displaystyle{\int_{t_{n-1}}^{t_{n}}}r(t)\,\mathrm{d}t=1,\;\forall n\geq 1$
(9)

Note that, for periodic sampling, this function is a constant, equal to the
sampling frequency. In the aperiodic case, we find $r^{*}(t)$, the $r(t)$ that
minimizes $\mathcal{E}$. By construction, the number of samples taken up to
any time instant can be computed directly by computing the area under $r(t)$.
Thus, we obtain the expected number of samples $\mathbb{E}[\mathcal{S}]$ as

$\displaystyle\mathbb{E}[\mathcal{S}]$
$\displaystyle=\int_{t=0}^{\infty}\bigg{(}\\!\int_{x=0}^{t}\\!\\!\\!\\!r(x)\,\mathrm{d}x\bigg{)}f_{\mathcal{T}}(t)\,\mathrm{d}t.$
(10)

To find $\mathbb{E}[\mathcal{W}]$, we use the conditional CDF of the execution
time.

$\mathbb{P}(\mathcal{W}=t_{n}-\mathcal{T}\leq
t\,\big{|}\,t_{n-1}<\mathcal{T}\leq t_{n})\\\
=\dfrac{\mathbb{P}(\mathcal{T}\geq t_{n}-t\,,\,t_{n-1}<\mathcal{T}\leq
t_{n})}{\mathbb{P}(t_{n-1}<\mathcal{T}\leq t_{n})}.$

The numerator is degenerate when $t\\!<\\!0$ or
$t\\!>\\!(t_{n}\\!-\\!t_{n-1})$. Thus, we are only interested in
$0\\!\leq\\!t\\!\leq\\!(t_{n}-t_{n-1})$. Let $F_{\mathcal{T}}$,
$\bar{F}_{\mathcal{T}}$ and $f_{\mathcal{T}}$ correspond to the CDF,
Complementary  (CCDF) and Probability Density Function (PDF) of the execution
time distribution.

$\displaystyle\\!\\!\\!\Rightarrow\mathbb{P}(\mathcal{W}\leq
t\,\big{|}\,t_{n-1}<\mathcal{T}\leq t_{n})$
$\displaystyle=\dfrac{\mathbb{P}(t_{n}-t\leq\mathcal{T}\leq
t_{n})}{F_{\mathcal{T}}(t_{n})-F_{\mathcal{T}}(t_{n-1})}$
$\displaystyle\approx\dfrac{F_{\mathcal{T}}(t_{n})-F_{\mathcal{T}}(t_{n}-t)}{F_{\mathcal{T}}(t_{n})-F_{\mathcal{T}}(t_{n-1})}$
(11)

Here, Equation 11 is an approximation merely for mathematical maturity due to
the slackness of the first inequality in the numerator. We expand
$F_{\mathcal{T}}(t_{n}-t)$ and $F_{\mathcal{T}}(t_{n-1})$ using Taylor series.
Thus we can write the CCDF as

$=\Big{(}F_{\mathcal{T}}(t_{n})-\\\
\big{(}F_{\mathcal{T}}(t_{n})+f_{\mathcal{T}}(t_{n})(-t)+f^{\prime}_{\mathcal{T}}(t_{n})(-t)^{2}/2!+\dots\big{)}\Big{)}\\\
\div\Big{(}F_{\mathcal{T}}(t_{n})-\big{(}F_{\mathcal{T}}(t_{n})+f_{\mathcal{T}}(t_{n})(t_{n-1}-t_{n})\\\
+f^{\prime}_{\mathcal{T}}(t_{n})(t_{n-1}-t_{n})^{2}/2!+\dots\big{)}\Big{)}.$

Simplifying and approximating by ignoring the higher order terms, we arrive at

$\displaystyle\mathbb{P}(\mathcal{W}\leq t\,\big{|}\,t_{n-1}<\mathcal{T}\leq
t_{n})$
$\displaystyle\approx\dfrac{tf_{\mathcal{T}}(t_{n})}{(t_{n}-t_{n-1})f_{\mathcal{T}}(t_{n})}$
(12)
$\displaystyle\Rightarrow\mathbb{P}(\mathcal{W}>t\,|\,t_{n-1}<\mathcal{T}\leq
t_{n})$ $\displaystyle=1-\dfrac{t}{(t_{n}-t_{n-1})}$

Next, using the above CCDF, we find the conditional expectation of
$\mathcal{W}$.

$\displaystyle\Rightarrow\mathbb{E}[\mathcal{W}\,|\,t_{n-1}<\mathcal{T}\leq
t_{n}]$
$\displaystyle=\smashoperator[r]{\int_{0}^{t_{n}-t_{n-1}}}\Big{(}1-\dfrac{t}{(t_{n}-t_{n-1})}\Big{)}\,\mathrm{d}t$
$\displaystyle=\dfrac{(t_{n}-t_{n-1})}{2}.$

If $r(t)$ is varying slowly between two consecutive sampling instants due to
the closeness of two sampling intervals, we can approximate the sampling
interval $(t_{n}\\!-\\!t_{n-1})$ as

$\displaystyle(t_{n}-t_{n-1})$ $\displaystyle\approx\dfrac{1}{r(t)},\;\forall
t,n:t_{n-1}\\!<\\!t\\!\leq\\!t_{n}.$ (13)
$\displaystyle\Rightarrow\mathbb{E}[\mathcal{W}]$
$\displaystyle=\int_{0}^{\infty}\mathbb{E}[\mathcal{W}\,|\,t_{n-1}<\mathcal{T}\leq
t_{n}]f_{\mathcal{T}}(t)\,\mathrm{d}t$
$\displaystyle=\int_{0}^{\infty}\dfrac{1}{2r(t)}f_{\mathcal{T}}(t)\,\mathrm{d}t.$
(14)

We can thus find the energy penalty using Equation 10 and Equation 14 as

$\displaystyle\mathcal{E}$
$\displaystyle=\int_{0}^{\infty}\Big{(}\alpha\int_{x=0}^{t}r(x)\,\mathrm{d}x+\beta\dfrac{1}{2r(t)}\Big{)}f_{\mathcal{T}}(t)\,\mathrm{d}t.$
Let $g(t)=\int_{0}^{t}r(x)\,\mathrm{d}x$. Then
$g^{\prime}(t)=\tfrac{\mathrm{d}}{\mathrm{d}t}g(t)=r(t)$. That is,
$\displaystyle\mathcal{E}$ $\displaystyle=\int_{0}^{\infty}\Big{(}\alpha
g(t)+\dfrac{\beta}{2g^{\prime}(t)}\Big{)}f_{\mathcal{T}}(t)\,\mathrm{d}t$

As per the Euler-Lagrange equation from the calculus of variations [36, 37],
the extreme value of $\mathcal{E}$ is obtained at

$\displaystyle r^{*}(t)$ $\displaystyle=\sqrt{\dfrac{\beta
f_{\mathcal{T}}(t)}{2\alpha\bar{F}_{\mathcal{T}}(t)}}.$ (15) Thus, for a
Rayleigh distributed $\mathcal{T}$ with parameter $\sigma$, $\displaystyle
r^{*}(t)$ $\displaystyle=\sqrt{\dfrac{\beta t}{2\alpha\sigma^{2}}}$ (16)
$\displaystyle\Rightarrow$
$\displaystyle\int_{t_{n}}^{t_{n+1}}\\!\\!\\!\sqrt{\dfrac{\beta
t}{2\alpha\sigma^{2}}}\,\mathrm{d}t=1,\;\forall n\geq 1$ (from (9))
$\displaystyle\Rightarrow$
$\displaystyle\;t_{n+1}^{\frac{3}{2}}-t_{n}^{\frac{3}{2}}=3\sigma\\!\sqrt{\tfrac{\alpha}{2\beta}}$
We have $t_{0}=0$. Substituting $n=1,2,\dots$, in order, in the above equation
provides us our final result
$\displaystyle\;t_{n}=\Big{(}3\sigma\\!\sqrt{\tfrac{\alpha}{2\beta}}\Big{)}^{\frac{2}{3}}n^{\frac{2}{3}}.x$
(17)

Note that, due to the close similarity in their density functions, the task
times can be approximated fairly equally to an Exponentially Modified Gaussian
distribution as well as a Rayleigh distribution, with the former attracting
more attention from works like [32, 33, 34]. This is the reason why the above
results are applicable in this work where we have predominantly considered Ex-
Gaussian distribution. Furthermore, we have also verified the closeness of the
results as well as the validity of the approximations made in the proofs using
distribution fitting and simulations.

By making use of this general solution, we can also prove the results given in
Section 6.2, where we modify the problem and find the optimum sampling
instants that minimize the expected number of samples for a given upper bound
$w_{0}$ for the expected wait time. First note that the general solution has
constants $\alpha$ and $\beta$ corresponding to the weights given to the cost
of sampling and waiting, respectively. The optimization criteria changes from
minimizing wait time to minimizing the number of samples when the ratio
$\frac{\alpha}{\beta}$ goes from zero to infinity. Since any positive real
value is valid for this ratio, one can achieve any valid point
$(\mathbb{E}[\mathcal{S}],\mathbb{E}[\mathcal{W}])$ via simply by varying the
ratio $\frac{\alpha}{\beta}$.

Furthermore, since the sampling instants are aperiodic and can take any
positive real values, the bound will be tight at the optimum. Hence, to solve
for the modified optimization problem explained in Section 6.2 that minimizes
$\mathbb{E}[\mathcal{S}]$ with an upper bound $w_{0}$ on
$\mathbb{E}[\mathcal{W}]$, we equate Equation 14 to $w_{0}$, find the
corresponding $\frac{\alpha}{\beta}$, and find the optimum set of sampling
instants by plugging this ratio into Equation 17.

$\displaystyle\mathbb{E}[\mathcal{W}]$
$\displaystyle=\int_{0}^{\infty}\dfrac{1}{2r(t)}f_{\mathcal{T}}(t)\,\mathrm{d}t.$
$\displaystyle=\int_{0}^{\infty}\frac{1}{2}\sqrt{\frac{2\alpha\sigma^{2}}{\beta
t}}\cdot\frac{t}{\sigma^{2}}e^{-{t^{2}}/{2\sigma^{2}}}\mathrm{d}t$
$\displaystyle=\sqrt{\frac{\alpha\sigma^{2}}{2\beta}}\int_{0}^{\infty}\frac{\sqrt{t}}{\sigma^{2}}e^{-{t^{2}}/{2\sigma^{2}}}\mathrm{d}t$
$\displaystyle=\sqrt{\frac{\alpha\sigma^{2}}{2\beta}}\left({\frac{1}{{2}\sigma^{2}}}\right)^{1/4}\cdot\int_{0}^{\infty}y^{-1/4}e^{-y}\mathrm{d}y$
$\displaystyle=\sqrt{\frac{\alpha\sigma^{2}}{2\beta}}\left({\frac{1}{{2}\sigma^{2}}}\right)^{1/4}\cdot{\Gamma}(\tfrac{3}{4}),$
where ${\Gamma(x)}$ is the gamma function. Thus, when the upper bound $w_{0}$
is tight, $\displaystyle\mathbb{E}[\mathcal{W}]$
$\displaystyle=w_{0}=\sqrt{\frac{\alpha\sigma}{2\sqrt{2}\beta}}{\Gamma}(\tfrac{3}{4})$
$\displaystyle\Rightarrow\frac{\alpha}{\beta}$
$\displaystyle=\frac{w_{0}^{2}}{\sigma}\frac{2\sqrt{2}}{({\Gamma}(\tfrac{3}{4}))^{2}}$
$\displaystyle\approx 1.9\frac{w_{0}^{2}}{\sigma}.$

  *[OMF]: ORBIT Management Framework
  *[AR]: Augmented Reality
  *[CDF]: Cumulative Distribution Function
  *[WCA]: Wearable Cognitive Assistance
  *[XR]: eXtended Reality
  *[GPS]: Global Positioning System
  *[VR]: Virtual Reality
  *[FSM]: Finite State Machine
  *[]:
  *[MAR]: Mobile   ()
  *[WCAs]: Wearable Cognitive Assistance
  *[RTT]: Round-Trip Time
  *[TTF]: Time-to-Feedback
  *[TTFs]: Time-to-Feedback
  *[BFI]: Big Five Inventory of personality traits
  *[ITQ]: Immersive Tendencies Questionnaire
  *[PCA]: Principal Component Analysis
  *[Ex-Gaussian]: Exponentially Modified Gaussian
  *[MLE]: Maximum Likelihood Estimation
  *[CI]: Confidence Interval
  *[FOSS]: Free and Open Source Software
  *[CIs]: Confidence Interval
  *[COTS]: Commercial Off-The-Shelves
  *[IEEE]: Institute of Electrical and Electronics Engineers
  *[RTTs]: Round-Trip Time
  *[SSF]: Swedish Foundation for Strategic Research
  *[NSF]: United States National Science Foundation
  *[CCDF]: Complementary   ()
  *[PDF]: Probability Density Function