1 Introduction

Intelligent Transportation Systems (ITS) in the rail sector, as well as autonomous vehicles on the roads as they are envisaged for the near future, rely heavily on the availability and quality of mobile network connections. Applications and services such as tracking and monitoring of cargo, remote diagnostics of vehicle systems, collaborative navigation, security applications or value-added passenger services have to be able to operate continuously while the vehicle is on the move. Some of these applications are expected to mainly use the downlink, such as infotainment services for passengers, while others are bidirectional or mainly use the uplink, such as monitoring and diagnostic services or CCTV. A vehicle’s onboard systems may have multiple connectivity options through commercial networks, e.g., fourth generation (4G) or fifth generation (5G) mobile networks for this purpose. Generally, these networks are managed by a commercial network operator, and the onboard systems, as clients in those networks, will have little control over the allocation of resources by the network operator. To make the best use of the available options, the onboard system therefore has to continuously monitor the available connections, assess them, and route its traffic accordingly.

In the scope of this research, Artificial Intelligence (AI) including Machine Learning (ML) methods are developed for two purposes: First, the estimation of available uplink resources (in particular achievable data rates) and second, the selection of connections based on these estimations. To avoid active throughput measurements which create additional load on the network and may lead to additional costs, readily available channel parameters are used as input values to an AI based estimation of the available data rates. The estimation results are then supplied to a decision making agent that directs the traffic to the most favourable connection.

2 Related Work

2.1 Data Rate Estimation

The traditional approach to data rate determination is active sendprobing, i.e., test traffic is pushed onto the connection and the queueing delays are measured. Curve fitting approaches are then applied to the measured delays to determine the data rate. There is some variety of methods following this approach, e.g., [1,2,3,4]. These can in principle be applied to any kind of network interfaces, so would be applicable to 5G as well. Their downside is that they require additional test traffic, thereby contributing to network congestion.

Passive approaches aim to avoid the disadvantages of sendprobing, i.e., the necessity of sending test traffic and delays that are introduced by it, generally at the expense of lower accuracy as they rely on assumptions about the existing traffic or on relationships between channel information and data rate that have to be modeled. Those passive approaches may rely on monitoring existing traffic, e.g., [5], or they use lower level channel information and train a machine learning system with it. Most of the latter, such as the Adaptive Similarity-based Regressor (ASR) approach presented in [6] or a sniffer-based method presented in [7], are designed for 4G networks. Sliwa et al. [8] presents a passive approach for 5G, using a combination of network context (which includes, among others, the same parameters as used in this research), mobility context and application context. A selection of different machine learning methods is used on these inputs and compared for performance evaluation.

As already mentioned, several of these approaches, in particular the active ones, require additional communication traffic, either for probing the channel or for communication with central or cloud-based entities that assist the process. This results in unwanted additional congestion in the network as well as additional costs for the subscriber, especially on mobile connections that may be billed by traffic volume. In addition, it takes time to actively measure the channel, so active measurements introduce delays. Other approaches require access to parameters that are not normally available to the user equipment, limiting applicability to equipment that does provide the parameters.

The approach presented in [8] addresses some of the problems, but does not discriminate between cases where all parameters are available and cases where some are unavailable, which will be shown to be a relevant issue in the scope of this article. This creates a dependency on the characteristics of the input data, potentially favouring situations that are similar to those that have been used for training. For example, if the training data included mostly situations where 5G parameters were available, estimation may fail to properly address cases where they are not.

2.2 Interface Selection

Interface selection in the presence of multiple options has been an area of research since the early 2000s. Early approaches such as those presented in [9, 10] or [11] usually rely on the availability of many parameters such as packet delay, packet jitter, etc. in order to make a decision. Many of these parameters are not available from device drivers by default or would require regular active measurements, which come with the same downsides that were already mentioned above for active data rate estimation methods. Other approaches such as [12] which presents an extended attractor selection model (EASM) require the involvement of the network infrastructure, i.e., the base stations, so are unsuitable for client-side only setups. The amount of information that is broadcast in this approach also adds a substantial amount to the network load and makes this approach impractical.

Centralized or cloud-assisted schemes are presented in [13, 14]. While they are offloading computational effort from the device to a centralized entity, they create a potential single point of failure, and they again introduce additional overhead on the communication interfaces. Niyato and Hossain [14] also includes a decentralized approach based on Q-learning, but this approach is unable to handle unexpected network congestion.

In [15], the Modified Linear Upper Confidence Bound (ModLinUCB) was presented as an approach based on the concept of bandit algorithms. Bandit algorithms use an analogy to slot machines in the gambling industry: An input is provided, then an “arm” is pulled (i.e., a decision is made), and a reward is received. In ModLinUCB, two interfaces are modelled as two arms of a bandit algorithm. The reward for the use of each arm is the achieved data rate, which is predicted from the channel quality parameters used as input, using a ridge regression. ModLinUCB was developed to decide between a 3G and a 4G interface, hence parameters that are specific to these technologies and readily available from interface drivers were chosen as inputs. In the 3G case, these were Received Signal Strength Indicator (RSSI) and the chip to interference power ratio \(E_c/I_0\). For 4G, Reference Signal Received Power (RSRP), Reference Signal Received Quality (RSRQ), Signal to Noise Ratio (SNR) and RSSI were chosen. All the parameters are scaled to [0, 1] intervals before they are used in the ridge regression. A key component in ModLinUCB was a parameter called “additional confidence” that was added to the interface selection policy to address unexpected network congestion. If the actual throughput is much lower than expected, this parameter modifies the confidence related to the affected interface to encourage the algorithm to explore the other interface and switch if a sufficient data rate is expected on that other interface.

Further development lead to the Multi-Armed Bandit Adaptive Similarity-based Regressor (MABASR) [16], which, while maintaining the overall concept introduced with ModLinUCB, replaced the ridge regression by an Adaptive Similarity-based Regressor (ASR), which includes a smart strategy to learn and forget data points. This enables the algorithm to preserve important model knowledge. MABASR was taken a step further in [17], extending the concept to more than two interfaces and adding 5G as additional cellular technology.

3 Use Case and Research Challenge

As already mentioned in the introduction, this research is set in a vehicular context. More specifically, the InSecTT use case that provides the scope is a rail use case. Onboard systems on a train are envisaged to upload data to cloud services for remote monitoring and surveillance. These data come, e.g., from sensors or other onboard equipment such as CCTV cameras. The train is equipped with an onboard gateway that features multiple cellular uplink options. When the train is travelling, it will encounter changing conditions on any cellular uplink as it moves across network cells. Earlier work [6] has provided an approach to estimate the uplink data rate based on downlink parameters in 4G, and to use these estimates as a basis for an interface selection approach in [16].

In the context of 5G Non-Standalone (NSA) networks, the uplink data rate estimation on the User Equipment (UE) faces some challenges, partially already known from the 4G case and partially specific to 5G NSA:

  • The UE generally does not have any information about the uplink channel quality parameters. This information is only available at the base stations and is not signalled to the UE. This was already a challenge in 4G networks and is the same for 5G.

  • 5G NSA, which is the main type of 5G networks that is currently in use by commercial network operators, is a combination of 4G and 5G technology. This means the 5G network does not exist on its own, but it relies on underlying 4G infrastructure. While a 4G link is maintained continuously, the 5G carrier is only used if the link is active, i.e., if there is data traffic on the interface. Essentially, when a 5G connection is established, the device is connected to 4G and 5G infrastructure at the same time, while the two are operating on different frequency bands. In that case, both may be relevant for the achievable data rate. If 5G coverage is lost, only the 4G link is being used. Hence there are two different cases where only the 4G link is active: One where there is no 5G coverage, and the other when the UE is not transmitting.

  • If the 5G link is not active for either reason given above, 5G channel quality parameters are also unavailable. Therefore, taking the earlier approach that was developed for 4G and applying it to 5G NSA does not address the specific issues outlined here and will likely fail when the 5G parameters are unavailable.

4 Data Collection and Analysis

As a basis for the uplink data rate estimation, data had to be collected and the relationship between channel parameters and the available data rate had to be assessed. For this purpose, a TRX R6 rail certified gateway computer that was provided by project partner KLAS was used. The gateway computer, shown in Fig. 1, was equipped with a Telit FN980m 5G modem and a Subscriber Identity Module (SIM) from a commercial operator. In addition, the gateway featured two Sierra Wireless MC7455 modems for 3G and 4G, each also with their own SIM from a commercial operator. UDP traffic was generated with IPerf with a maximum data rate of 100 MBit/s on the uplink and the actual amount of traffic sent through the 5G modem was recorded at intervals of approximately 3 s. In the same intervals, queries were made to the modem for the 4G parameters RSRP, RSRQ and RSSI as well as the 5G parameters New Radio RSRP (NR_RSRP), New Radio RSRQ (NR_RSRQ) and New Radio RSSI (NR_RSSI), which were all accessible via AT commands. With this setup, data was collected driving a car through Cork City on different routes on different days in December 2021 and August 2022, collecting three sets of measurement data. The first December 2021 set contains 350 samples, the second December 2021 set contains 604 samples, the August 2022 set contains 894 samples. In all cases, the routes crossed areas where 5G coverage is present, as well as areas where only 4G is available. Significant geographical overlaps between the routes were avoided to ensure independence between the data sets. The recorded data was saved to CSV files.Footnote 1

Fig. 1
A photograph of a gateway computer device that is provided with a central slot for a 5 G modem. This has four short antennas and a left slot for 3 G or 4 G modems, which is provided with two large antennas.

KLAS TRX R6 with cellular modems. The expansion slot in the middle with the four short antennas contains the 5G modem. The left slot with the larger antennas contains modems for 3G and 4G

In order to assess whether the 4G and 5G channel parameters have sufficient relationship with the achievable data rate, a correlation analysis similar to the one presented for 4G in [16] was done. The following results of the 5G correlation analysis were first presented in [17] and are repeated in this chapter as a foundation to the subsequent work on data rate estimation.

It was expected that the 5G case is more challenging than the previously investigated 3G and 4G cases, due to the specifics of 5G NSA mentioned in Sect. 3: The 5G carrier is only used if the link is active, i.e., if there is data traffic on the interface. If either 5G coverage is unavailable or no data is being sent, only the 4G parameters are available. When a 5G connection is established, the device is connected to 4G and 5G infrastructure at the same time, while the two are operating on different frequency bands. If 5G coverage is unavailable, the interface falls back to 4G for data transmission, which then obviously uses the frequency band on which the 4G link is established. All of this is expected to lead to a more complex relationship between the measured parameters and the data rate.

Hence, it first has to be established whether there is a correlation between the measured channel parameters and the uplink data rate. For this correlation analysis, the two data sets from December 2021 were concatenated into a joint set. On this joint set, the Pearson correlation coefficients were determined among all the parameters and the data rate.

Table 1 Correlation matrix for the full concatenated data set

Table 1 shows the correlation matrix for the full concatenated set, which includes 954 samples. Some of the samples are with and others without 5G coverage. In case of no 5G coverage, the traffic is sent through the 4G link. While there is a moderate to strong correlation among the 4G parameters and the data rate, the correlation between the 5G parameters and the data rate is poor, as is the correlation between 4G and 5G parameters. However, the poor correlation can be explained by the fact that 257 out of the 954 samples, or 27%, recorded zeros for the 5G parameters, meaning that the device was out of 5G coverage (as iPerf traffic was pushed to the interface continuously, the 5G link did not turn off due to lack of traffic). The zeros are obviously uncorrelated to any of the other values and therefore have a negative impact on any correlation between the 5G parameters and the data rate. The 4G parameters however are continuously available, and even though data traffic is using the 4G link when 5G is unavailable and is using the 5G link when available, the 4G parameters seem to be a useful indicator for the achievable data rate throughout. For a more complete understanding of whether one can still also make use of the 5G parameters, it makes sense to have a further look at the cases where the 5G parameters are nonzero.

Table 2 Correlation matrix only based on the samples where 5G is active

The second correlation matrix shown in Table 2 is only based on the 697 samples that contain nonzero 5G parameters. The correlation between the 4G samples and the data rate has now reduced compared to the previous table, but it remains significant. The correlation between the 5G parameters and the data rate however has increased, with the NR_RSRP and NR_RSSI parameters in particular exhibiting a moderate positive correlation. This suggests that the 5G parameters can be useful for data rate estimation as well.

5 Uplink Data Rate Estimation

For uplink data rate estimation in 4G, the Adaptive Similarity-based Regressor (ASR) [6] was presented. ASR uses a similarity-based approach to train an online Support-Vector Regression (SVR) for data rate estimation. A set of channel parameters is compressed by Principal Component Analysis (PCA), and the compressed value is compared to previous samples. If it is similar to a known sample, it replaces the sample. If not, a generalization is applied where existing samples are forgotten temporarily in an iterative process, and the impact on estimation accuracy is assessed, ensuring that the sample which contributes least to the estimation accuracy is discarded permanently.

A straightforward approach for 5G could be to use the same, and add the 5G parameters to the data set before compression. However, as the correlation analysis has confirmed, the 5G parameters are obviously only correlated to the data rate when they are nonzero, i.e., 5G coverage is there and the link is active.

Therefore, there are several options how to determine the available uplink data rate in 5G networks, particularly 5G NSA networks with the specific challenges mentioned in Sect. 3. As stated in that section, both 4G and 5G channel conditions are potentially relevant for the estimation of available uplink data rates.

Hence, the original ASR approach can be taken further: Depending on whether only 4G parameters or 4G and 5G parameters are available, two separate learning algorithms that run in parallel can be used. This article proposes the following approach:

  • Firstly, a new sample of channel parameters is acquired. Depending on whether the 5G link is active or not, it either includes valid values for 4G parameters only or for both 4G and 5G parameters.

  • If the sample contains valid parameters for 4G only, it is sent to one learning algorithm (named Algorithm A in the further course of this document), otherwise it is sent to the other (Algorithm B).

  • Algorithm A uses PCA to compress only the 4G parameters, whereas for Algorithm B, there are two possible variants: use PCA to either compress both the 4G and 5G parameters or compress only the 5G parameters. In either case, this reduces the dimensionality of the data to reduce the computational complexity.

  • From there onwards, both Algorithm A and Algorithm B work essentially the same and follow the ASR approach:

    • Based on a similarity score calculated between the new sample and the most similar one already known to the algorithm, learning and forgetting is based on two different methods:

      • If the similarity score exceeds a given threshold, the most similar old sample is replaced by the new sample and the old sample is forgotten.

      • If there is no old sample that is similar enough, samples are iteratively forgotten, and generalization is measured at each iteration. The generalization ability is implemented as the mean-squared-error of the prediction of every currently known sample. The sample resulting in the least loss of generalization upon its temporary unlearning is forgotten permanently. It is possible that this is the newest data point, or one of the old ones.

      • After a new sample is learned and an old one is forgotten, the online learning algorithm adjusts its parameters so that it can adapt to the new data. This is necessary since the algorithm aims to capture the latest network state in order to improve data rate estimation.

  • Depending on whether the new sample was supplied to Algorithm A or Algorithm B, the estimated data rate is taken from the selected algorithm and provided as a result.

In the following, three different approaches are compared:

  • Approach 1 The straightforward approach: all 4G and 5G parameters are fed into the PCA, which compresses them into one principle component, which then serves as input to a single ASR. In cases where the 5G parameters are zero, those zeros are replaced with minimum valid values as defined in 5G standardisation.

  • Approach 2 The first variant with two learning algorithms: If 5G values are nonzero, all 4G and 5G parameters are compressed by PCA and fed into an ASR; if 5G values are zero, only the 4G parameters are compressed by PCA and fed into a second ASR.

  • Approach 3 The second variant with two learning algorithms: If 5G values are nonzero, only the 5G parameters are compressed by PCA and fed into an ASR; if 5G values are zero, only the 4G parameters are compressed by PCA and fed into a second ASR.

For all three approaches, the hyperparameters used in the ASRs are tuned through Bayesian optimization. The PCAs are incremental PCAs that are pre-trained on the first data set from December 2021. The data set from August 2022 was used as test set.

Table 3 shows the root mean square error (RMSE), the mean relative error (MRE) and the coefficient of variation (CV) for the uplink data rate estimation on the August 2022 data set. It can be seen that Approach 2 shows the best performance, while Approach 1 shows the worst RMSE while being competitive in terms of MRE.

Table 3 Data rate estimation results for all three approaches

Figures 2, 3 and 4 further illustrate the findings. While the overall performance of all approaches looks similar (e.g., all of them struggle with the highly volatile situation between samples 600 and 700), the variants with two ASRs perform better in particular between sample 700 and 800.

Fig. 2
A line graph plots data rates versus samples in a testing environment with a training set size of 37. The lines are plotted for truth, predicted, and absolute error. All the lines follow a fluctuating pattern.

Uplink data rate estimation, Approach 1

Fig. 3
A line graph plots data rates versus samples in a testing environment with a training set size of 21. The lines are plotted for truth, predicted, and absolute error. All the lines follow a fluctuating trend.

Uplink data rate estimation, Approach 2

Fig. 4
A line graph plots data rates versus samples in a testing environment with a training set size of 21. The lines are plotted for truth, predicted, and absolute error. All the lines follow a fluctuating pattern with huge spikes at frequent intervals.

Uplink data rate estimation, Approach 3

6 Interface Decision

As outlined earlier in this article, the aim is not just to estimate the available uplink data rate, but to manage connections, i.e., to select interfaces based on the estimates. An approach named MABASR+ was presented in [17]. MABASR+ estimates the uplink data rate of each link individually and selects the perceived best link based on the estimated instantaneous data rate and feedback about the difference between estimated and achieved data rate in the previous samples. In [17], different combinations of 4G and 5G parameters were used for the 5G estimation, while the estimation approach itself was the one that is labeled as Approach 1 in this document.

In the following, MABASR+ is used with Approaches 1 to 3 to further assess which of the approaches is most suitable for the purpose. For a more challenging scenario compared to the one used in [17], new measurements were taken in August 2022 pushing iPerf traffic on three modems (3G, 4G and 5G) simultaneously for a real-life situation where the UE faces varying conditions on all three links that sometimes favour one link and sometimes another. Other than sending traffic on all interfaces, the measurement setup was the same as described in Sect. 4. Figure 5 shows the measurement trace, with Link 1 being the 3G modem, Link 2 being the 4G modem and Link 3 being the 5G modem. The trace has been smoothened by a five-sample moving average filter. It is clearly visible that the 4G modem and the 5G modem each are the best option for significant periods of time, so it makes sense to switch between them instead of permanently favouring one over the other.

Fig. 5
A line graph plots the data rate versus the acquired samples. The lines are plotted for link 1 data rate, link 2 data rate, and link 3 data rate. All the lines follow a fluctuating pattern.

Measurement trace with traffic on all links. Link 1: 3G modem, Link 2: 4G modem, Link 3: 5G modem

For the interface decision evaluation, the mean achieved reward, i.e., the mean achieved data rate, is used as metric. If perfect decisions are made, the achievable mean data rate is 38.699 MBit/s in the evaluation scenario. A policy that always chooses the 4G modem would achieve 28.625 Mbit/s, a policy that always chooses the 5G modem would achieve 29.709 MBit/s.

The estimators for the 3G and 4G modems used here were trained with the same data that was used in [16], whereas the estimator for the 5G modem was trained with the second measurement from December 2021. Figure 6 shows the result when Approach 1 is used for the 5G estimator. This result shows a strong preference for the 4G modem, indicating that either the estimation results are too low for the 5G modem, or too high for the 4G modem. While the mean achieved data rate of 30.140 MBit/s is higher than for both the always 4G or always 5G policy, the gain is rather modest and leaves significant room for improvement.

Fig. 6
A line graph and dot plot exhibit the data rate and links versus the acquired samples. The values are plotted for link 1 data rate, link 2 data rate, link 3 data rate, reward, and choice. The line graph has a fluctuating pattern, while the values plotted in the dot plot remain stable.

MABASR+ with Approach 1

Figures 7 and 8 present the result for Approaches 2 and 3. It can be seen that there is a significant improvement in the achieved data rate compared to Approach 1. As there were no modifications to the estimators for the 3G and 4G modems, the estimator for the 5G modem is the cause for the improved performance. It can be seen that the 5G modem is chosen more frequently than in the case of Approach 1. This further supports the observation made in Sect. 5 that the approaches with two ASRs perform better than the one with only one ASR for the 5G data rate estimation. The advantage of the approaches with two ASRs is even more prominent than it was before.

Fig. 7
A line graph and dot plot exhibit the data rate and links versus the acquired samples for approach 2. The values are plotted for link 1 data rate, link 2 data rate, link 3 data rate, reward, and choice. The line graph has a fluctuating trend, whereas the values plotted in the dot plot remain stable.

MABASR+ with Approach 2

Fig. 8
A line graph and dot plot exhibit the data rate and links versus the acquired samples for approach 3. The values are plotted for link 1 data rate, link 2 data rate, link 3 data rate, reward, and choice. The line graph has a fluctuating pattern, whereas the values plotted in the dot plot stay constant.

MABASR+ with Approach 3

Another observation that can be made in Figs. 7 and 8 is the probing of other interfaces, i.e. brief interface changes which occur when the achieved data rate is significantly less than the estimated rate. For example, for a period starting from around sample number 150 in both cases, the 4G modem is selected most of the time, while the 5G modem is probed briefly on several occasions. This indicates that the estimation for the 5G modem would produce a higher data rate than that for the 4G modem, but the achieved rate is less. In that case, the 4G modem is selected, while probing the 5G modem from time to time to check whether its actual achievable data rate has recovered to match its estimate. The interval in which this probing happens is subject to a trade-off between the ability to quickly react to changes and the need to limit the amount of connection changes as too many of those would negatively impact ongoing transmissions.

7 Conclusion

This article presents the use of AI algorithms for data rate estimation and interface selection in cellular networks, with a particular focus on the specific challenges of 5G NSA. Three variants are proposed for data rate estimation based on available channel parameters, and their estimation performance is shown. Then, in extension, it is shown how they can be combined with estimators for other interfaces (in this case, 3G and 4G) and how they perform in interface selection in such a scenario. Future work will include further optimizations to the algorithms, as well as the inclusion of short term predictions to assess the expected data rate a few samples ahead.