1. Introduction
Political guidelines in various countries to decarbonize individual mobility led to an exponential growth of EVs in offers and sales. However, one obstacle for the success of EVs is the so-called range anxiety [
1]. Customers are afraid that an EV is not able to provide the range they need for all of their journeys. To combat range anxiety and increase the range of EVs, there are two different ways. The first one is to simply increase the size of the High Voltage Battery (HVB). Unfortunately, this means to increase the size of the most expensive component of an EV, and after all, it is not a very sustainable way. The second way, which is our solution of choice, is to make EVs more efficient.
Kirchhoff’s current law states that the sum of all currents at a node of an electric system is equal to 0 A. However, considering measurement signals of nodes in the power trains of EVs with distributed sensor systems, the sum of all currents can differ up to 20% of the maximum current (see
Figure 1). If we look closer at the Root Mean Square Error (RMSE) of the sum of currents
, we realize that it has the same value as the mean current of the DCDC converter
.
A different value than 0 A for the sum of all currents indicates that there is a divergence between measurements and real values. The divergence becomes problematic when the power train is operating close to the system boundaries. For example, there are boundaries for the protection of the HVB. The HVB is only capable of discharging or charging a restricted amount of power. Higher amounts would threaten the HVB’s lifetime and safety [
2]. To ensure a safe operation mode even for high divergences between measurements and real values, additional protection offsets (see
Figure 2) might be added to the boundaries, although they have some drawbacks.
For example, in the charging case, most notably during recuperation, the HVB might not allow the full power level, even though it would be capable of handling it. Thus, the amount of power charged to the battery is restricted and the EV loses cruising range while its power consumption increases. In the opposite case, the system might not release requested power, although the HVB could provide it in reality. This additional restriction of power decreases the EV’s performance. As can be seen from the two examples above, minimizing the magnitude of the protection offsets also allows increasing the performance as the efficiency and the cruising range of EVs.
Besides measurement faults and sensor uncertainties [
3], the divergence between measurements and real values is caused by time delays.
Figure 3 shows an example of the sum of all currents
being reduced by shifting a signal by 6 time steps. The delays result from distributed sensor systems in the power train as plotted in
Figure 4. The High Voltage (HV) components have their own ECU which is connected with the current sensors and processes the sensor information. The ECUs exchange this information via bus systems. The buses require individual amounts of time to send the measurement signals. Thus, from an ECU’s point of view, the sensor information from other ECUs arrives with individual delays (see the Ego ECU in
Figure 4). These individual delays could be compensated easily with a synchronized clock and time stamps as part of each bus message. However, this solution would have two drawbacks. First, it would increase the bus traffic as not only the measurement information must be carried by the messages but also the time stamp. As a result, the EV would either require a faster bus which is able to transport more information, or it would have to reduce the information exchanged between the ECUs. Second, there exists no clock in the power trains of modern series EVs which is synchronized with all ECUs at the same frequency as the message exchange. Usually, the ECUs are synchronized in a longer time frame than they communicate. Thus, the time stamp solution would require additional or higher performing hardware and increase the costs for the production of the EV.
The aim of this work is to automatically detect the time delay between measurement signals from different sensors without additional hardware. For this purpose, we develop two different approaches. One of them is based on LR, whereas the other one optimizes the estimated variance of the difference between several signals. We compare our approaches to other state-of-the-art TDE algorithms and evaluate them with a focus on precision and run-time efficiency. Apart from allowing a more accurate power distribution, the automated TDE helps to reduce the battery protection offset and thus to increase the performance, efficiency and cruising range of EVs.
The rest of this paper is structured as follows.
Section 2 states related work and the similarities and differences to our work. Furthermore,
Section 2 highlights the contributions of our work to the state of the art. In
Section 3, we explain the theory behind our work before we describe the practical experiments in
Section 4. The experiments’ results, stated in
Section 5, show us the performance of the algorithms for our use case. Based on this evaluation, we take the best performing algorithm and optimize it further. The optimization steps can be taken from
Section 3.4 and their impacts to the results from
Section 5.4. In
Section 6, we discuss the advantages and drawbacks of all proposed concepts. Finally, we draw our conclusions and give a short outlook in
Section 7.
2. State of the Art
There exists plenty of literature about TDE, although—to the best of our knowledge—none of them is tailored to the specific problem of TDE of current signals in EVs. In the following, we present several publications about TDE from different fields of application, such as embedded systems, acoustics, medicine, positioning, aeronautics, process technology, and robotics.
An approach which also deals with EVs and time delays is the one by Guo et al. [
4]. However, their approach is similar to ours only at the first look. Their goal is to stabilize a grid of electric sources and sinks with EVs. For the stabilization of the grid, they propose time delay resistent control strategies of smart grids with EVs. The EVs are able to charge bidirectionally. The bidirectional charging is used to smooth disturbances and respond rapidly to fast occurring changes in the power distribution of the grid. An example for such a rapidly occurring change in the times of renewable energies is the power output of wind turbines when a strong wind occurs. Compared to our approach, Guo’s focus is rather on the control strategy than on the TDE. Another difference with our work is that Guo’s system is rather macroscopic with lots of different elements and many EVs in the grid. Our system is instead quite microscopic. We consider a single EV with a power train of around five sources and sinks. Our communication network might be smaller than the number of HV components as some consumers might share the same ECU. For example, the heating and the cooling component of an EV use both the climate control ECU for bus communication.
Kali et al. [
5] propose a controller with TDE for Electric Machine (EMs). The TDE is executed state-based with the help of a model of the EM. The model design demands expert knowledge about the physical principles of an EM. This is justified for Kali et al. as they require the same knowledge for their controller. However, for our case, we want to be able to estimate the time delays without further knowledge about the HV components. Our TDE shall be executable with nothing else than the available measurement data.
Zeng et al. [
6] introduce a statistical approach to predict the delay of a bus message. The content of the messages does not need to be known to achieve high accuracy. This is different from our scenario where we want to make use of the information carried by the message. In contrast to Zeng et al., we do not require predicting the time delay accurately to milliseconds. For our purposes, an estimation of the number of delayed discrete time steps is sufficient.
Not from the field of electric power trains or bus communication, but from acoustics is the approach shown by Lourtie and Moura [
7]. They use a stochastic approach to model time delays in an acoustic path environment. Like ours, their environment consists of several sources. However, in contrast to our scenario, the delay they want to estimate varies with time. In our case, we assume the time delay to be constant in a short time frame. For longer periods, it might change slowly. The reason for the slowly changing time delay is that it is caused during the wake up procedure of the EV. The ECUs wake up in an unsynchronized way. Afterwards, the ECUs are synchronized on a relatively large time frame (e.g., 1 s), but work based on short time steps (e.g., 10 ms).
Another acoustics application for TDE is shown by He et alii [
8]. They use the so-called Multichannel Cross-Correlation Coefficient algorithm to estimate time delays of speech sources in noisy and reverberant environments.
Svilainis et al. [
9] present another interesting approach. Their goal is to estimate the time passed between emitting an ultrasonic signal and absorbing its reflection. Like Zeng et al., they require high precision. Another difference to our approach is that their algorithms make use of the pulse form of ultrasonic signals. Our signal as plotted in
Figure 1 can vary in a large range and does not necessarily contain pulses (e.g., after time step 5,000).
Mirzaei et al. expand TDE for ultrasonic signals to the field of medicine [
10]. The authors introduce a window-based TDE approach to estimate the time passed between two frames of radio-frequency data. They compare the results of the new window-based approach to their previously developed, optimization-based method [
11] and to Normalized Cross-Correlation.
Recently, Garcez et al. published their work on a similar problem to ours, but in a completely different field of application [
12]. Like bus systems of EVs, Global Navigation Satellite Systems (GNSSs) systems have real-time requirements. Their goal is to minimize deviations between measurements and real position data. The time delays are caused during the transmission of GNSS messages, when the signals do not take straight lines of sight, but are reflected on their way or suffer from noise. The authors propose a tensor-based subspace tracking algorithm to efficiently estimate time delays of received GNSS signals.
A similar approach is presented by Xie et al. for an indoor positioning sensing system [
13]. They sense positions of mobile devices based on the signal strength and the signal’s time delay since its transmission from a base station. For the TDE, Xie et al. combine Cross-Correlation with Quadratic Fitting. This is similar to our LR approach (see
Section 3.2), where we try to fit the signals with quadratic functions to retrieve the delay between them. Like Garcez et al., they have to deal with the problem that the signals are often reflected and do not take direct lines of sight. Different to Garcez et al., Xie’s approach takes the strength of the signal into account for retrieving a more exact position estimation. For our work, we cannot take advantage of this information, because in wire-based bus systems all signals are equally strong.
Schmidhammer et al. estimate positions of moving, non-cooperative objects in vehicular environments [
14]. Their idea is to estimate the position of an object based on time delays in a network of distributed receiving and transmitting nodes. In contrast to our work, the networking nodes of Schmidhammer et al. are not necessarily on-board the vehicle, but can also be mounted on the road infrastructure.
Emadzadeh et al. [
15] show an inspiring approach for detecting the relative position of spacecrafts. For retrieving the position, they examine an X-ray signal received by two spacecrafts and determine the time delay between them. For the TDE, they use AFs. This approach seems very promising to us. We implement the algorithms of Emadzadeh et al. and compare them to ours in order to find out if their approach can be transferred from X-ray signals to current measurements in the power train of EVs.
Like Emadzadeh et al., Liu et al. focus on AFs [
16]. Compared to our problem of fixed or only slowly changing time delays, the difference in Liu et al. is that they deal with time-varying time delays. That makes further processing steps necessary. For example, they require a transition probability matrix and an initial probability distribution vector to model the time delay changes with a Markov chain.
Park et al. analyze time series data with Autoencoders and Long Short-Term Memory Neural Network (LSTMs) to detect faults in industrial processes [
17]. The authors emphasize the importance of TDE for correct fault detection. However, they focus only on time delays caused by their own fault detection system. Our focus lies on earlier steps in the processing chain. We want to detect time delays between the input signals before they are passed to other computation processes. Furthermore, we want to implement algorithms which are able to learn on-board the automotive ECUs and adapt themselves to new data. As the training of Neural Networks is quite memory intensive and demands high computational power, they do not belong to our methods of choice.
Close to the application field of industrial processes is the approach of Srinivasa Rao et al. [
18]. In their recent article, the authors propose fuzzy parametric uncertainty to mathematically model systems with time delays. Their goal is to enable a robust controller design. For this purpose, they first approximate the time delay system as an interval system. After retrieving the intervals, they design an optimal controller for these. Like Guo et al., Srinivasa Rao et al. focus on how to retrieve an optimal controller, which is not part of our work. Although they focus on the control of industrial processes, their article is very general. Besides industrial plants, they also mention potential fields of application, such as EMs or robot manipulators.
Time delay compensation for robots is the focus of Shen et al [
19]. Their focus is on teleoperating robots which require knowledge about the time delay between the master and the slave robot for stable operation. The robots and their communication channels are modeled as extended dynamical system. For this system, Shen et al. develop a cascade observer which is able to control it in a stable way. The authors assume that a sufficiently accurate value for the TDE is given and concentrate on its compensation. This is different to our work here. We explicitly want to estimate the time delay.
You et al. develop a proportional multiple integral observer for fuzzy systems [
20]. The goal of their work is the same as ours. They want to minimize deviations between measurements and real values caused by time delays and measurement inaccuracies. Their time delays are also varying. Unlike the varying time delays presented before, the ones of You et al. do not vary with time but rather with states. Their focus is also on industrial processes and not on electric power trains. However, the main difference between our works is that You et al. want to minimize time delays and measurement inaccuracies with the same system.
Our approach follows the
divide and conquer strategy and faces the two problems separately. We focus on the problem of measurement deviations caused by measurement inaccuracies in our previous work [
3]. However, measurement inaccuracies are not part of this work. Here, we assume that the measurements are appropriately accurate and that the main deviations are caused by time delays as shown in
Figure 1 and
Figure 3. Thus, TDE is our solution of choice to minimize the deviations.
Our contribution in this article is the development of a regression-based approach and an algorithm based on VM for TDE as first presented in [
21]. We transfer the ideas introduced by Emadzadeh et al. to the domain of currents in the HV system of EVs and compare the results to our approaches in matters of accuracy and computational performance. Our TDE works only with the data available in modern series EVs and does not require an additional clock. In addition to [
21], we introduce an optimization of the most accurate and efficient of our evaluated approaches. We further evaluate the optimization both on artificially created data with known ground truth as well as real drive data with unknown ground truth.
3. Concepts
In this section, we introduce the algorithms and shortly explain the concepts from other authors which we implement and compare for TDE. From now on, for the sake of easier understanding, we focus on the current of the EM and the HVB (without other consumers than the EM) as examples. Nevertheless, the proposed methods can be extended to every current signal in the HV system of an EV. Furthermore, we inverse the sign of from now on to make its shape similar to the one of the EM. Thus, we can treat the HVB current signal as a delayed or preceded version of the EM, respectively.
Our goal is to find the time delay
in a bus system which can be described as
where
t stands for the time step,
is the measurement signal of the faster component,
describes the slower component’s signal,
and
describe the corresponding currents and
and
are noise terms [
15]. As we cannot retrieve the currents
and
directly, we cannot minimize the difference between
and
. Instead, we directly minimize the difference between the two measurement signals
and
.
3.1. Adaptive Filter
The idea of Emadzadeh et al. is to model the time delay as Finite Impulse Response (FIR) filter. They define
to be the faster signal. For each measurement
at time step
, they collect a row of the last
M measurements of the other signal
Then, the authors search for an optimal channel impulse response vector
such that the deviation between
and
becomes minimal. Mathematically, this can be expressed by the minimization of the expectation value of the Mean Squared Error (MSE) between the measurement value of the slower signal and the filtered measurement row of the faster signal. It results in the formula
This is similar to our VM approach (see
Section 3.3) with the difference that we minimize the variance instead of the MSE. In Emadzadeh’s work, the optimal factor
is estimated recursively. For the recursion, the authors implement and compare the four algorithms Least Mean-Squares (LMS), Normalized Least Mean-Squares (NLMS), Least Mean-Fourth (LMF) and Recursive Least-Squares (RLS). The optimal time delay estimate
is then the one where the impulse response
reaches its maximum, or mathematically
For further details on this approach, we kindly refer the interested reader to [
15].
3.2. Linear Regression
Our first approach is to use LR to identify the basis functions of two received signals and compare the horizontal offset between these functions. As degree of the basis function, we choose a parabola for two reasons. First, the sampling frequency of our measurements is high enough to fit the signals with a parabola for a short time duration. Second, the comparison of the horizontal offset is easiest with a parabola because it only has one extremum.
We collect the last
M measurements
of the HV components
in a measurement vector
. Then, we retrieve the weight vector
with LR [
22] according to
Here, the notation
and
represents the
n-th column of
and
, respectively. The so-called
design matrix
consists of
columns in our case.
With the weight vector from (
5), we are able to fit a parabola
as basis function to the measurement vector
.
After retrieving the basis functions in (
6), we transfer them into vertex form
to identify the coordinates
of each basis function’s vertex. The estimated time delay between the EM and the HVB current signals is then given by the difference on the time axis between their vertices according to
3.3. Variance Minimization
Our second approach is to minimize the variance of the difference between two signals and by shifting the signal forward.
Like in
Section 3.2, we collect the two signals
and
for
M time steps. A straightforward idea for the minimization of the difference between
and
is to minimize their estimated MSE
with different time shifts
in a pre-defined range
with
. However, our experiments show that we need a relatively high
M to achieve stable results. We can significantly minimize
M, if we take the estimated expected value
into account. Thus, instead of minimizing the MSE from (
9), we minimize the estimated variance of the difference between the two signals
The time delay between the EM and the HVB current signals is the
that minimizes the variance
As we do not know in the beginning whether or is the faster signal, we have to choose one of them as and the other one as for the first execution and try . From the second execution on, the value of and can be reduced and chosen recursively, because the EV’s bus system usually changes its time delay only once in the beginning, but not during advanced execution. Therefore, we choose and from the algorithm’s second execution on.
3.4. Optimized Variance Minimization
As the results of our experiments (see
Section 5) show, the VM concept provides the best results in terms of RMSE, run-time and required frame size. However, when running this concept in real time (both on simulated and real data, see
Section 5.4), we find that the TDE is unstable and that the estimated time delay frequently alternates between different values. These many changes of the estimated time delay contradict the fact that the time delay is rather stable in reality, and that, if any, changes occur after relatively long periods. Thus, in order to stabilize the TDE, we suggest the following improvement of the
plain VM approach from
Section 3.3.
The main idea of the stabilization is to use a statistical test. The test’s purpose is to quantify the
reliability of the input data segment on which the TDE is performed. In fact, we know from
Section 3.3 that the estimated time delay
at time step
t minimizes the variance given by Equation (
11). This equation in turn is based on the
M last values of both signals. Due to the noise in the data, the estimation for the next step can jump to a different value, even if the vast majority of data points (
) are shared between the two steps. The idea is thus to compare at each step the minimal variance with the second smallest one. If the difference between both in relative terms is not sufficiently large, we presume that the TDE is not reliable, and consequentially do not estimate a time delay. In this case, we simply keep the prediction from the last step. Otherwise, we update the estimation to the newly calculated
.
Formally, at each time step, we calculate the variance criterion from Equation (
11) for each potential time delay
. Let us denote this by
. Then, we know that the least achievable variance is given by
The second smallest achievable variance in turn is given by
In other words, we minimize the variance over all potential time delays except that which minimizes it (
). By definition, we have
. The intuition is that if the difference between those two values is not large enough, the noise makes it impossible to tell with high confidence which one is the real minimizer. The minimum in Equation (
13) might result in
by random noise instead of being the true minimum. Thus, we suggest deciding whether to perform an update based on the criterion
where
K is a hyper-parameter defining the minimal percentage error required to perform an update. Clearly, the larger
K, the more severe is the criterion, and the fewer updates are done. Therefore, we choose
K to strike a balance between reliability on the one hand, and being up-to-date on the other hand. In fact, if we choose
K too high, updates are performed only rarely, so that we can miss changes in the underlying real time delay. If
K is chosen too small, then the predictions are more unstable. We empirically found
to strike a balance between both criteria for our power train data.
6. Discussion
We discuss the advantages and drawbacks of the previously described and evaluated concepts in this section.
Although it is not as efficient and accurate as VM, the AF approach still retrieves better results than LR. The best results for AFs, in our case, are reached with the LMS algorithm and a learning rate of
(see
Table 2). The learning rate, which must be chosen manually, is one drawback of this algorithm. It can lead to sub-optimal learning if the user chooses a wrong value. In contrast with LMS, the RLS algorithm does not require a learning rate. However, we see that the RLS algorithm has lower accuracy, requires longer run-time and more memory for a larger frame than the VM concept (see
Table 6).
LR has the advantage that it can directly find out the faster component. Thus, one single execution during the same time step for the same signal is sufficient even in the beginning, which makes it interesting, if a computational effective approach is needed. However, its efficiency suffers from the matrix inversion in Equation (
5). Even worse, it is the least accurate of the three proposed concepts due to noise and vertical offsets between the signals. The high estimation errors make this approach unfeasible for our purpose. Another drawback is that a parabola is not always the optimal basis function for the regression of measurement signals.
The VM approach does not require such a basis function. Unfortunately, it is not able to detect the faster signal without trying each possible time delay for both signals. This results in a computationally expensive brute force calculation in the first time step. Afterwards, it is very efficient because it must only execute basic math operations and searches only for a restricted number of possible delays. Compared to the other approaches, VM requires the smallest frame size to retrieve feasible results. In total,
Table 6 shows clearly that VM is the most accurate and fastest of the three proposed approaches with the lowest memory consumption.
For the high precision and low run-time, we decide to continue our work with the VM concept. Before we are able to apply our approach to series production EVs, we require further optimization as shown in
Section 3.4 to stabilize the estimated time delay. This stabilization comes with another drawback. The algorithm requires more time steps to pass before it adapts to a new delay. Nevertheless, regarding that succeeding power train control functions require stable inputs, this drawback seems acceptable for us. Another drawback of the optimization is the threshold value
K in Equation (
15) which must be chosen manually. Although it does not require expert knowledge but can be set by trial and error, we would prefer an automated way for finding the optimal value for
K.