Energies 14 07438 v2
Energies 14 07438 v2
Article
Robust Control Design for Autonomous Vehicles Using Neural
Network-Based Model-Matching Approach
Dániel Fényes, Tamás Hegedűs, Balázs Németh * and Péter Gáspár
Institute for Computer Science and Control (SZTAKI), Eötvös Loránd Research Network (ELKH),
Kende u. 13-17, H-1111 Budapest, Hungary; [email protected] (D.F.); [email protected] (T.H.);
[email protected] (P.G.)
* Correspondence: [email protected]
Abstract: In this paper, a novel neural network-based robust control method is presented for a
vehicle-oriented problem, in which the main goal is to ensure stable motion of the vehicle under
critical circumstances. The proposed method can be divided into two main steps. In the first step, the
model matching algorithm is proposed, which can adjust the nonlinear dynamics of the controlled
system to a nominal, linear model. The aim of model matching is to eliminate the effects of the
nonlinearities and uncertainties of the system to increase the performances of the closed-loop system.
The model matching process results in an additional control input, which is computed by a neural
network during the operation of the control system. Furthermore, in the second step, a robust H∞ is
designed, which has double purposes: to handle the fitting error of the neural network and ensure
the accurate tracking of the reference signal. The operation and efficiency of the proposed control
algorithm are investigated through a complex test scenario, which is performed in the high-fidelity
vehicle dynamics simulation software, CarMaker.
Citation: Fényes, D.; Hegedűs, T.; Keywords: vehicle control; model-matching; robust control; neural networks
Németh, B.; Gáspár, P. Robust Control
Design for Autonomous Vehicles
Using Neural Network-Based
Model-Matching Approach. Energies 1. Introduction and Motivation
2021, 14, 7438. https://doi.org/
In recent years, the main focal point of the automotive industry has shifted towards
10.3390/en14217438
the development of autonomous vehicles. This challenge involves several problems, which
must be solved before launching the first fully automated vehicle, e.g., decision making,
Academic Editor: Wiseman Yair
accurate sensing and the design of robust and reliable control systems. During the last few
decades, numerous control algorithms have been developed for the control and analysis
Received: 27 August 2021
Accepted: 4 November 2021
of nonlinear and safety-critical systems, such as autonomous vehicles. Most of these
Published: 8 November 2021
control solutions are ordered as conventional control approaches and non-conventional
learning-based control algorithms.
Publisher’s Note: MDPI stays neutral
The classical approaches include the robust optimal methods (H∞ ) [1], optimal con-
with regard to jurisdictional claims in
trols (LQR, H2 ) [2], model predictive control (MPC) approaches [3] and polytopic system-
published maps and institutional affil- based algorithms (LPV) [4]. The main advantage of these algorithms is that the achieved
iations. stability and performances of the closed-loop system can be analytically proven, at least
for a specific region of their operating range. Furthermore, these solutions are good at
handling the specific nonlinearities of the production plant and can also deal with unmod-
elled dynamics and noises as well. However, their performances can significantly degrade
Copyright: © 2021 by the authors.
with the consideration of more uncertainties due to the resulting conservativeness of the
Licensee MDPI, Basel, Switzerland.
worst-case approaches. Furthermore, the determination and description of the unmodelled
This article is an open access article
dynamics and nonlinearities can also be a challenging task, which can make the control
distributed under the terms and design difficult.
conditions of the Creative Commons With the increasing computational capacity of computers and with the increased
Attribution (CC BY) license (https:// numbers of data sources, novel methods have become available for controlling autonomous
creativecommons.org/licenses/by/ vehicles, e.g., learning-based approaches. This group of methods can include algorithms,
4.0/). such as support vector machine (SVM) approaches [5], or further learning methods with
neural-network-based agents (e.g., supervised learning for achieving deep neural networks,
reinforcement learning-based methods [6], etc.). These algorithms have a significant
advantage over the classical approaches: they use (and learn from) data, which describes
the behavior of the control plant more accurately than any modeling process is capable
of. Therefore, the performances of these solutions can be significantly better than classical
approaches. However, most of the machine learning-based control algorithms have a
notable pitfall, i.e., theoretical guarantees on the stability and performances of the closed-
loop system cannot be provided.
Therefore, the engineers started focusing on the development of mixed control al-
gorithms, which take advantage of both groups. For example, the combination of the
machine learning algorithm and Linear Parameter Varying (LPV) approach can be found
in [4,7]. Meanwhile, paper [8] presents an MPC-based solution, which is extended with a
machine learning-based reachability set computation for trajectory tracking of autonomous
vehicles. The use of linearization feedback can be a promising approach to deal with the
nonlinearities of the plant. However, the design of that feedback controller can also be
a challenging task using classical methods, but neural networks can provide satisfying
results. Since the classical approaches are good at guaranteeing predefined performances
in the case of linear systems and an appropriately linearized system can eliminate the effect
of the nonlinearities and other unmodelled dynamics, it can ease the control design.
In this paper, a novel robust control algorithm is proposed, which exploits the ad-
vantages of both the classical control and machine-learning-based methods. The whole
algorithm includes two main parts: the modeling and the control design phases.
• Modeling phase: A neural network-based model matching is proposed, which aims to
adjust the original nonlinear dynamics of the vehicle to a nominal, linear model.
• Control design phase: A robust control design based on the H∞ method is presented, in
which the fitting error of the resulting neural network is taken into account during the
design phase.
The aim of the model-matching part is to eliminate the effects of the nonlinearities and
uncertainties of the system. The neural network uses the measurable states of the vehicle
and determines an additional steering angle. This means that the neural-network creates an
inner loop of the control structure. Using the additional steering angle, the behavior of the
vehicle is modified and the goal is to match it to the nominal model. The nominal model
is determined using a classical single track dynamical bicycle model. The main challenge
of using a neural network-based control algorithm is that the stability of the closed-loop
system cannot be analytically proven. Therefore, a robust H∞ controller is designed, which
takes into account the effect and the errors of the neural network in order to compensate
the mentioned pitfalls of the neural network. Briefly summarizing the contribution of the
paper, the goal is to increase the performances and the stability of the closed-loop system
by combining a machine learning-based model matching algorithm and a robust control
approach. The main steps of the control design are illustrated in Figure 1, and are:
1. Simulation environment, which provides the datasets for training the neural network.
2. Model-matching algorithm, which contains the training phase of the neural network.
3. Control design, in which the H∞ -based robust controller is designed.
The paper is structured as follows. Section 2 presents the nominal vehicle model,
which is used in the training of the neural network and in the robust control design phase
as well. Section 3 details the neural network-based model-matching method. The H∞ -
based lateral control design is presented in Section 4. Finally, in the last section, a complex
simulation example is given to show the operation and effectiveness of the proposed
control algorithm.
Energies 2021, 14, 7438 3 of 14
Feedback linearization
Neural Network
Uncertainty of NN
Measured attributes
Nominal model
Data acquisition
process
Robust
controller
Vehicle
where m is the mass of the car, l f , f r are geometrical parameters and Iz denotes the yaw-
inertia. Moreover, β is the side-slip angle. The longitudinal velocity of the vehicle is (v x ),
the steering angle is denoted by δ and ψ̇ is the yaw-rate. The lateral tire forces can be
computed as:
Fi,y = Ci αi , (2)
where Ci is the cornering stiffness of the tires and αi represents the side-slip angles of the
tires. Using Equations (1) and (2), a transfer function (Gdyn (s)) can be determined. The
input of the system is the steering angle (δ) and the output is the yaw-rate (ψ̇) of the vehicle.
This results in the following transfer function, which is formed as:
Bdyn (s)
Gdyn (s) = (3)
Adyn (s)
Energies 2021, 14, 7438 4 of 14
b1 s + b0
Gst (s) = , (4)
a2 s2 + a1 s + a0
where bi and ai are the parameters of the given system, which are determined through
the identification process. During the identification process of the model parameters in (4)
the ARX (AutoRegressive model with eXogenous variable) structure is used, which is
formed as:
A ( q ) y ( t ) = B ( q ) u ( t − n ) + e ( t ), (5)
where y is the output of the system, which is the road-wheel angle (δ) and the input of the
system is the angle of the steering wheel. Using a q−1 shift operator, the polynomials for
A(q) and B(q) are the following:
The transfer function for the steering system can be formed as:
B(q)
Gst (q) = . (7)
A(q)
The details of the identification process (i.e., data acquisition, optimization method)
behind the parameter selection was found in an earlier paper, see [10].
However, the computation of the inverse model may result in a non-causal system,
therefore a prefilter is applied to solve this issue.
G− 1 −1
p f ,nom ( s ) = G p f ( s ) Gnom ( s ) (9)
where G p f (s) denotes the transfer function of the prefilter. In the next step, the computed
inverse of the transfer function is discretized using Tustin’s method [12].
1 + sT/2
z = esT ≈ (10)
1 − sT/2
Since the real system is not accurately known, the computation of the additional
control input is a challenging task. The whole system can be influenced by nonlinearities
(e.g., tire characteristics) and uncertainties (e.g., velocity). This means, that the additional
control input for the nonlinear model cannot be computed in only one step. In order to
address this issue, an iterative algorithm is proposed, by which the additional control input
can be determined for a predefined control input sequence. The main drawback of this
algorithm is that it cannot be used in real-time applications. Therefore, a neural network
is trained by using the results of the iterative algorithm, which can be used to determine
the additional input signal during the operation of the control system. In the following,
the generation of the training data is presented, which includes the computation of the
additional steering angle ∆δ.
-
+
The main goal of the iteration process is to calculate an additional steering angle
sequence (∆δ). The nominal yaw-rate (ψ̇n ) can be computed using the nominal model
Energies 2021, 14, 7438 6 of 14
and the steering angle sequence. In each iteration step, the yaw-rate of the vehicle is
measured and saved from CarMaker. The error between the two signals is computed and
an additional steering angle is determined using the inverse of the nominal model.
In the first step of the iteration process, the input of the nonlinear system is the same
as the input of the nominal model (δ). Note that during the iterative process the reference
control input sequence is not changed, this means that the nominal yaw-rate also remains
the same. After computing the error between the two yaw-rate values, the additional
steering angle (δ̂) is determined using the inverse of the nominal model. This steering angle
sequence is added to the nominal steering angle sequence and the simulation is performed
using the modified sequence. After each iteration step, the additional steering angle is
added to the previously determined steering angle sequence, as:
n
∆δ = ∑ δ̃i , (11)
i
where i denotes the ith iteration step. Using the computed additional steering angle
sequence the input for the nonlinear system can be determined as:
δ̂ = δ + ∆δ (12)
where n gives the maximum number of iterations. Due to the differences between the
nonlinear and the nominal model, the yaw-rate values may not match perfectly even after
numerous iteration steps. In parallel, the use of a large number of iterations makes the
whole process very time consuming. In order to solve this issue, the iterations continue
until the highest error value becomes less then a previously defined value:
where e is a design parameter, and defines the maximum deviation between the out-
put of the linear and the nonlinear model. In Figure 4 an example is presented for the
iteration process.
0.1
0.05
-0.05
-0.1
-0.2
-0.25
0 10 20 30 40 50 60 70 80 90 100
Time (s)
As Figure 4 illustrates, the error between the two outputs converges to zero. This
means that using the computed additional steering angle sequence, nearly the same yaw-
rate value can be achieved in case of the nonlinear system. Since the iterative algorithm
cannot be used in real-time applications, a neural network is trained to determine the
additional control input. The input of the neural network is the measurable states of
the vehicle, which is saved at the last iteration step. The sampling time during the data
collection was set to Ts = 0.01 s and over 200,000 data points were saved. For the training
process of the neural network, the following attributes were saved and collected:
• Longitudinal velocity (v x );
• Accelerations (longitudinal a x , lateral ay );
Energies 2021, 14, 7438 7 of 14
The results of the training process are shown in Figure 6. The first figure shows error
of the trained neural network, and the second figure presents the mean squared error
during the training process.
104
8 10 -2
Test
Train
Validation
Training
Validation
7
Zero Error Test
Best
6 10 -3
10 -4
4
10 -5
2
1
10 -6
0
-0.00503
-0.00452
-0.00349
-0.00297
-0.00246
-0.00194
-0.00143
-0.00092
-0.0004
0.000112
0.000627
0.001141
0.001655
0.002169
0.002683
0.003198
0.003712
0.004226
-0.004
0.00474
10 -7
Errors = Targets - Outputs 0 10 20 30 40
Epochs
(a) (b)
Figure 6. Results of the training process. (a) Error of the neural network. (b) Mean squared error
during the training process.
In Figure 7 an example is presented, which shows the efficiency of the neural network.
In this example, the neural network computes the additional steering angle, which is added
to the nominal control input. Note that the data collection process used a step function-like
input sequence (see: Figure 4). Nevertheless, during this test the control input was selected
for a different type of signal, which is a chirp signal. Using this different input signal, the
generalization capability of the network was also examined.
2.5 30
Nominal model
Linearized model
Nonlinear model
2
25
1.5
20
1
15
0.5
10
0
5
-0.5
-1 0
0 2 4 6 8 10 12 14 16 18 20 0 2 4 6 8 10 12 14 16 18 20
During the test of the neural network, both the nonlinear and linear vehicle models
are excited by the same chirp signal as the input of the system. As the figures show, the
outputs of the linear nominal model (dashed blue line) and the linearized model (red line)
are the same, apart from a short segment. At the beginning of the simulation, the velocity of
the vehicle starts from zero, which causes significant inaccuracy in the linearization, since
the presented nominal vehicle model is not valid at low longitudinal velocities. However,
in other cases, the neural network provides satisfying results.
process as an uncertainty is taken into account. First, the modeling of the uncertainty is
proposed and second, the design of the robust controller.
1 1
Magnitude (dB)
Magnitude (dB)
0 0
-1 -1
-2 -2
-3 -3
-4 -4
-5 -5
10-1 10 0
10-1 100
Frequency (rad/s) Frequency (rad/s)
As can be seen, the amplitude of the yaw-rate error (∆ψ̇) decreases along with the
velocity and amplitude of the steering angle. The error of the neural network is handled as
an uncertainty in the control design, which is described by the presented transfer functions.
The uncertainty of the system is formed through the worst-case scenario of the sim-
ulations. Thus, the uncertainty for the robust control design with the achieved highest
magnitude of all scenarios is considered. The uncertainty from the difference between ∆δ
and ∆δ∗ is modeled as a first-order proportional term, i.e.,
A∆
W∆ = , (14)
T∆ s + 1
where A∆ , T∆ are parameters, which are selected based on the simulation scenarios. Hence,
A∆ , T∆ are fitted through a least-squares method to over-approximate the simulation results.
• In order to guarantee smooth trajectory tracking, the tracking of the reference yaw-rate
is also prescribed:
The performances can be written into the following vector: z = [z1 z2 z3 ]. The
state-space representation of the extended system:
ẋ = Ax + Bu (18)
z = Cz x + Du (19)
where A, B and Cz are the matrices of the state-space representation of the nominal
model (1), and its state vector: x = [ψ̇ ẏ y]. Cz is defined by the performances. Figure 9
illustrates the augmented plant for the robust control design.
+
+
+
- +
+
+
+
+
As can be seen, the plant is augmented with several weighting functions. The goal of the
transfer functions Wz,1 , Wz,2 and Wz,3 is to guarantee the predefined performances (15)–(17).
Ww,1 and Ww,2 are to attenuate the noises of the measured signals (ψ̇, y). The weighting
functions Wre f ,1 and Wre f ,2 aim to scale the reference signals of the controller. Finally, W∆
symbolizes the uncertainty of the neural network, which is determined from the presented
simulations (Figure 8).
The goal of the H∞ design is to minimize the H∞ -norm of the co-sensitivity functions
of the closed-loop system (Tz,w ), see [16,17]. This means that a K controller must be found,
which meets the following criterion:
Moreover, the resulted controller (K) must also guarantee that the closed-loop system
is asymptotically stable. Finally, Figure 10 shows the whole control algorithm including
the neural network-based model-matching method.
Neural Reference
network trajectory
+
+
- +
Vehicle -
+
5. Simulation Example
A comprehensive simulation is presented in this section, which is made using Car-
Maker vehicle dynamics simulation software. During the simulation, the goal is to track the
given reference trajectory at varying longitudinal velocities, which contains sharp bends,
where the vehicle is close to its physical limits. The car is driven along the given section of
the track twice. In the first case, the vehicle is controlled by the extended robust controller
(with the neural network-based linearization), while in the second case, it is driven by the
plain nominal robust controller.
Figure 11 shows the longitudinal velocity profile of the vehicle. The velocity varies in
a high range between v x ∈ {13–22 m/s}.
22
21
20
19
Velocity (m/s)
18
17
16
15
14
13
0 10 20 30 40 50 60
Time (s)
Figure 12 demonstrates the trajectory tracking of the vehicle for both cases. In the first
case, when the car is driven by the extended controller, it is able to follow the predefined
track. In the other case, the vehicle leaves the road at a sharp bend. It means that the
nominal controller is not able to guarantee the required performance.
0
-20
-40
-60
-80
-100
-120
-140
-200
-200 -150 -100 -50 0 50 100 150 200
Figure 13 depicts the lateral acceleration of the vehicle using the extended controller.
As can be seen, the lateral acceleration varies between ay ∈ {−8, 8 m/s2 }, which means it
is close to the physical limits of the car. Basically, this is the cause of the unstable behavior
of the vehicle in the second case, when the nominal controller is used.
8
6
Lateral acceleration (m/s2)
-2
-4
-6
-8
0 10 20 30 40 50 60
Time (s)
Figure 14 presents the yaw-rates of the vehicle. The yaw-rate of the nominal model
is denoted by the blue line, while the measured yaw-rate is given by the red line. As the
figure shows, the yaw-rate signals are close to each other, which means the linearization
algorithm provides satisfying performances.
0.6
Nominal model
Measured
0.4
0.2
Yaw rate (rad/s)
-0.2
-0.4
-0.6
0 10 20 30 40 50 60
Time (s)
Figure 15 demonstrates the yaw-rate for the case when the neural network-based
model-matching is not used. It can be seen that the two signals differ from each other,
especially at the sharp bend, where the vehicle becomes unstable.
1
Yaw rate (rad/s)
0.5
-0.5
-1
-1.5
0 5 10 15 20 25 30
Time (s)
The reference and the measured yaw-rate signals are illustrated in Figure 16. The error
of the tracking has a maximum of ψ̇e ≈ 0.15 rad/s. This value may be considered to be
high; however, a balance must be found between the tracking of the lateral position and
the yaw-rate, which is dealt with by weighting functions illustrated in Figure 9.
0.6
Reference
Measured
0.4
0.2
Yaw rate (rad/s)
-0.2
-0.4
-0.6
0 10 20 30 40 50 60
Time (s)
Finally, in Figure 17 the input signals are shown. It can be seen that the neural network
intervenes significantly when the vehicle is traveling at high velocity at the sharp bend.
Whilst, in other cases, when the vehicle is in the linear range, the neural network provides
a significantly smaller steering angle.
Energies 2021, 14, 7438 13 of 14
0.15
H
Neural network
0.1
-0.05
-0.1
-0.15
0 10 20 30 40 50 60
Time (s)
It can be concluded that the extended controller can ensure the stability requirements,
especially in those cases, when the vehicle is close to its physical limits. Moreover, the
performance of the model-matching algorithm has been investigated in [18].
6. Conclusions
In this paper, a novel H∞ -based robust control algorithm has been proposed for
autonomous vehicles, which was extended with a neural network-based model-matching
approach. The main role of the neural network is to match the output of the nonlinear
system to the predefined linear one. The error of the neural network has also been taken
into account during the design phase as uncertainty on the measured signal. Finally, a
complex simulation example has been given, which showed the advantage of the proposed
control algorithm over the nominal robust controller. The whole simulation is performed
in a vehicle dynamics simulation software, CarMaker.
Author Contributions: Conceptualization, algorithms, software, T.H. and D.F.; methodology, T.H.,
D.F. and B.N.; supervision, P.G. All authors have read and agreed to the published version of
the manuscript.
Institutional Review Board Statement: Not applicable.
Informed Consent Statement: Not applicable.
Data Availability Statement: No data available.
Acknowledgments: The research was supported by the Ministry of Innovation and Technology NRDI
Office within the framework of the Autonomous Systems National Laboratory Program. The research
was partially supported by the National Research, Development and Innovation Office (NKFIH)
under OTKA Grant Agreement No. K 135512. The work of Tamás Hegedűs and Dániel Fényes have
been supported by the ÚNKP-21-3 New National Excellence Program of the Ministry for Innovation
and Technology from the source of the National Research, Development and Innovation Fund.
Conflicts of Interest: The authors declare no conflict of interest.
References
1. Wang, R.; Jing, H.; Hu, C.; Yan, F.; Chen, N. Robust H8 Path Following Control for Autonomous Ground Vehicles with Delay and
Data Dropouts. IEEE Trans. Intell. Transp. Syst. 2016, 17, 2042–2050. [CrossRef]
2. Yakub, F.; Mori, Y. Comparative study of autonomous path-following vehicle control via model predictive control and linear
quadratic control. Proc. Inst. Mech. Eng. Part D J. Automob. Eng. 2015, 229, 1695–1714. [CrossRef]
3. Németh, B.; Hegedus, T.; Gaspar, P. Model Predictive Control Design for Overtaking Maneuvers for Multi-Vehicle Scenarios.
In Proceedings of the 2019 18th European Control Conference (ECC), Naples, Italy, 25–28 June 2019; pp. 744–749.
4. Fenyes, D.; Nemeth, B.; Gaspar, P. LPV-based autonomous vehicle control using the results of big data analysis on lateral
dynamics. In Proceedings of the 2020 American Control Conference (ACC), Denver, CO, USA, 1–3 July 2020; pp. 2250–2255.
5. Xu, F.; Qu, Y.; Qu, T.; Chen, H.; Liang, D. Support Vector Machine Based Model Predictive Control for Vehicle Path Tracking
Control. In Proceedings of the 2020 39th Chinese Control Conference (CCC), Shenyang, China, 27–29 July 2020; pp. 2461–2466.
6. Ji, X.; He, X.; hen Lv.; Liu, Y.; Wu, J. Adaptive-neural-network-based robust lateral motion control for autonomous vehicle at
driving limits. Control Eng. Pract. 2018, 76, 41–53. [CrossRef]
Energies 2021, 14, 7438 14 of 14
7. Balázs, N.; Gáspár, P. Ensuring performance requirements for semiactive suspension with nonconventional control systems via
robust linear parameter varying framework. Int. J. Robust Nonlinear Control 2020, 31, 8165–8182. doi: 10.1002/rnc.5282. [CrossRef]
8. Fenyes, D.; Nemeth, B.; Gaspar, P. Impact of big data on the design of MPC control for autonomous vehicles. In Proceedings of
the 2019 18th European Control Conference (ECC), Naples, Italy, 25–28 June 2019; pp. 4154–4159.
9. Rajamani, R. Vehicle Dynamics and Control; Springer: Berlin/Heidelberg, Germany, 2005.
10. Hegedus, T.; Fenyes, D.; Nemeth, B.; Gaspar, P. Handling of tire pressure variation in autonomous vehicles: An integrated
estimation and control design approach. In Proceedings of the 2020 American Control Conference (ACC), Denver, CO, USA,
1–3 July 2020; 2244–2249.
11. Shamash, Y. Construction of the inverse of linear time-invariant multivariable systems. Int. J. Syst. Sci. 1975, 6, 733–740.
[CrossRef]
12. Malinen, J. Tustin’s method for final state approximation of conservative dynamical systems. IFAC Proc. Vol. 2011, 44, 4564–4569.
[CrossRef]
13. IPG Automotive. CarMaker 9.2. Available online: https://ipg-automotive.com/products-services/simulation-software/
carmaker (accessed on 27 October 2021).
14. Demut, H.; Hagan, M.; Beale, M. Neural Network Design; PWS Publishing Co.: Boston, MA, USA, 1997.
15. Li, Y.; Liu, F. Whiteout: Gaussian Adaptive Noise Regularization in Deep Neural Networks. arXiv 2016, arXiv:1612.01490.
16. Scherer, C.; Weiland, S. Lecture Notes DISC Course on Linear Matrix Inequalities in Control; Delft University of Technology: Delft,
The Netherlands, 2000.
17. Boyd, S.; Ghaoui, L.E.; Feron, E.; Balakrishnan, V. Linear Matrix Inequalities in System and Control Theory; Society for Industrial and
Applied Mathematics: Philadelphia, PA, USA, 1997.
18. Hegedus, T.; Fenyes, D.; Nemeth, B.; Gaspar, P. Improving Sustainable Safe Transport via Automated Vehicle Control with
Closed-Loop Matching. Sustainability 2021, 13, 11264. [CrossRef]