Developing_an_Unreal_Engine_4-Based_Vehicle_Drivin
Developing_an_Unreal_Engine_4-Based_Vehicle_Drivin
Developing_an_Unreal_Engine_4-Based_Vehicle_Drivin
Article
Developing an Unreal Engine 4-Based Vehicle Driving
Simulator Applicable in Driver Behavior
Analysis—A Technical Perspective
David Michalík *, Miroslav Jirgl, Jakub Arm and Petr Fiedler
Department of Control and Instrumentation, Brno University of Technology, 61600 Brno, Czech Republic;
jirgl@vut.cz (M.J.); jakub.arm@vut.cz (J.A.); fiedlerp@vut.cz (P.F.)
* Correspondence: david.michalik@vut.cz
Abstract: Vehicle safety remains a topic of major interest, and diverse assistance systems are imple-
mented that focus primarily on analyzing the immediate vicinity of the car and the driver’s control
inputs. In this paper, by contrast, we emphasize understanding the driver’s control performance
via obtaining valuable data and relevant characteristics. To acquire the data, we employed an in-
house-designed, laboratory-built vehicle driving simulator. This simulator exploits the Unreal Engine
4 framework to deliver a high level of realism. The fact that the actual designing and associated
processes were materialized through our own efforts has brought advantages such as simplified
data acquisition, possibility of creating custom scenarios, and modification of the virtual elements
according to our specific needs. We also developed an application to analyze the measured data from
the perspective of control theory, establishing a set of parameters that provided the basis for an early
version of a driver performance index indicator.
Citation: Michalík, D.; Jirgl, M.; Arm,
J.; Fiedler, P. Developing an Unreal
Keywords: vehicle driving simulator; driver analysis; driver performance; Unreal Engine 4; man-
Engine 4-Based Vehicle Driving
machine systems
Simulator Applicable in Driver
Behavior Analysis:
A Technical Perspective. Safety 2021,
7, 25. https://doi.org/10.3390/
safety7020025 1. Introduction
In all state-of-the-art technologies, safety embodies a most important parameter. Sci-
Academic Editor: Tom Brijs and entists and engineers are attempting to combine adequate safety precautions, considering
Martin Lavallière all relevant aspects, while making every effort to maintain a reasonable price for the final
product. These facts obviously apply also to the automotive industry and the development
Received: 11 January 2021 of new technologies that are or will be implemented in modern cars [1]. Many tests are
Accepted: 19 March 2021
conducted to evaluate vehicles or drivers (for example, the moose test); such assessment,
Published: 1 April 2021
however, tends to be rather costly and, most significantly, potentially dangerous for the
test subjects (drivers). In order to create a safe test environment, vehicle driving simulators
Publisher’s Note: MDPI stays neutral
find use as an effective, simulation-based alternative comprising multiple scenarios that
with regard to jurisdictional claims in
may be difficult to execute in real life. The advantages of a simulator are presented in [2–4].
published maps and institutional affil-
The individual chapters of the paper outline the background of driving simulators,
iations.
presenting an overview of their advantages, disadvantages, and relation to control theory
in terms of the driver as a controller. In the Methods section, we characterize the simulator
designed in our laboratories, with a particular focus on the hardware, software (with its
virtual elements), operating scenarios, and data storing options. The measured data are
Copyright: © 2020 by the authors.
then discussed in the Results chapter, which summarizes multiple derived parameters
Licensee MDPI, Basel, Switzerland.
in the context of a MATLAB application analysis. Importantly, we also present various
This article is an open access article
methods for analyzing the measured data and highlight possible outcomes and indicators
distributed under the terms and
of the research.
conditions of the Creative Commons
The benefits of using a driving simulator, according to reference [5], are as follows.
Attribution (CC BY) license (https://
Controllability, reproducibility, and standardization – in general terms, virtually any en-
creativecommons.org/licenses/by/
4.0/).
vironment (or behavior) is simulable and settable for research purposes, maximizing the
Other
Player Vehicle Scenarios
elements
PlayerVehicle Data
comp Sudden AVDS_Game
MooseTest
obstacle Instance
Scene2D
components AGameMode AGameMode
Sudden Moose
Camera Obstacle Test
components
BP_GameMode BP_GameMode
Sudden Moose
BP_PlayerVehicle
Controller Obstacle Test
Data
.csv
Analysis software
External Database
(MATLAB)
in debugging (from this perspective, we can see elements that cannot be visually
perceived by the driver, such as the terrain the vehicle is currently standing on).
• BP_PlayerVehicleController, being a PlayerMovementController derived from the
APlayerVehicleController custom class. This item checks the input devices, such as
the keyboard, mouse, and steering wheel, and sends the data to the Vehicle Movement
component.
• PlayerVehicleData, embodying an actor element derived from the APlayerVehicle-
DataComponent class. This instrument takes the measured data concerning the
vehicle/input devices and allows them be packed into an FStruct struct variable.
The most significant parts of the HUD are the Lane and Arrow indicators, as they
directly interfere with the measurement scenarios, helping the tested driver to improve the
responsiveness to the action events.
MooseTest
The option is based on a real-life test that measures the capabilities and dynamics of
a vehicle. The particulars of the procedure are defined in ISO 3888-2:2011; this standard
specifies the dimensions of the testing track, outlines the vehicle behavior, and characterizes
the maneuvering to be performed by the driver. In general terms, this is one of the tests
applicable in evaluating a driver’s ability to control a vehicle (considering factors such
as age, training, and experience). In our case, the test focuses especially on the behavior
of the vehicle physical model implemented in the VDS; currently, we are testing the
vehicle’s behavior and comparing the NVidia PhysX model and the Unreal Engine Chaos
physical engine.
Highway: Sudden Obstacle Scenario
Similarly to the Step Response option, this scenario consists in riding a long highway
with no turns. The driver’s responsibility is to keep straight in the lane; at random time
intervals, however, an object is spawned in front of the car. The central difference from the
Step Response mode is that in this scenario, the driver does not expect the need to perform
any sudden maneuvers. This input simulates an impulse function.
Remote server
Database
REST API
Figure 6. The architecture of the remote database connected with the simulator.
3. Results
In order to analyze the measured data, a data model was created to arrange into an
organized structure the input variables and data of a driver and a vehicle, respectively.
The data model (Figure 8) of the remote database follows the measure scenario concept,
which comprises the bunch of the currently measured data and the actual measurement
mode. The measure scenario utilizes one of the pre-defined scenarios available in the
simulator and is specified in greater detail by the measurement conditions.
To verify the methods for evaluating driver performance by means of the custom
vehicle driving simulator, we conducted initial test measurements on 10 volunteers. The ob-
Safety 2021, 7, 25 13 of 17
tained results are then to be regarded as merely demonstrative because the data sample is,
from the statistical perspective, relatively small. The set of participants involved exclusively
men, active drivers between 24 and 45 years of age, and each of these was subjected to all
of the testing scenarios, according to the measurement procedure.
An example of measured data (relating to the Highway: Step Response scenario) is
shown in Figure 9, where a link between the line distance and the steering wheel rotation
can be identified. The driver responds to a sudden lane change event with a variable
reaction delay; nevertheless, after the initial two control actions, a certain driver behavior
pattern is observable. These measured data are then employed to evaluate diverse parame-
ters defining the driver’s behavior in a concrete situation under particular conditions.
Figure 10 displays the achievement by one of the drivers, based on the analysis from
the Highway: Step Response scenario (which consisted of 17 lane step change commands).
The resulting parameters can then be statistically compared with those characterizing
the other drivers, via histograms. The indicated histograms represent the data acquired
through analyzing the step lane change commands (in each tested subject).
Figure 9. Measured data from VDS: the steering wheel angle and distance from the line.
Our monitoring approach exploits, above all, control loop modeling; in more global
terms, as already mentioned in Section 1.1, the research utilizes methods that currently
find use in the evaluation of pilot behavior, skills, and performance. The loop contains a
controlled vehicle and a human driver, allowing us to describe the driver as a controller
and to evaluate the basic parameters often used in control theory, including transport delay,
transfer function details, nonlinear perception of the distance from the center of the lane,
and overall control quality. In the evaluating procedure, the initial scenario is Highway:
Step response, where the data associated with a driver’s reaction are measured (applying
the steering wheel angle) by means of a repeated step change of the driving lane, Figure 9.
The outcomes are then examined and classified.
The performance of a driver is quantifiable by means of diverse analytical methods.
The first of these techniques rests in evaluating the frequency response analysis to yield
information about the driver’s control approach in terms of the need to compensate small
deviations from the center of the lane. Based on these data, the level of the driver’s skill
can be determined.
Safety 2021, 7, 25 14 of 17
The second approach to data analysis exploits the modeling of human behavior and
the identification of the model parameters. This option exposes the abilities and limitations
of a human driver as regards responses to sudden situations and the ability to adapt
to controlled dynamics; for such purposes, we use a combination of linear and fuzzy
models. The linear portion of the behavioral model was derived from McRuer’s Crossover
law and the corresponding general models [20]. The applied formula is in the form of a
second-order transfer function, (1) [20]; we then have.
s
F (s) = K · · e−τs , (1)
T 2 s2 + 2ξTs + 1
where K is the driver’s gain, T and ξ denote the parameters defining the dynamics of
the driver’s neuro-muscular system, τ represents the response delay, and s is the Laplace
operator.
Each of the parameters of the model is acquired via identification, for which we
employ MATLAB System Identification Toolbox. The input and output signals embody
the driver’s visual stimuli (lane change command) and response to a sudden change
(rotating the steering wheel), respectively. The structure of the model is derived from
Equation (1). The output of the identification process rests in the transfer function with
identified parameters τ, T, ξ and K, characterizing the basic dynamic properties of the
human regulator, that is, the driver.
In calculating the integral criteria of quality, the input data used are those that represent
the distance from the lane, following directly after the step lane change command. This
may be considered the response of the control loop (comprising the human regulator and
Safety 2021, 7, 25 15 of 17
the simulated vehicle) to the step change of the input signal. Integrating the absolute
value of deviation from the line in time (or the deviation squared) yields the values of the
modified-linear Jl in and the quadratic Jq criterion. The deviation pattern then allows us
to read relatively easily the parameters tw (the time it took to achieve the desired value).
The criteria for evaluating the expended energy, L1 and L2 , are calculated as an absolute
and a quadratic norm of the steering wheel rotation signal.
The list of the parameters that represent the outputs of the individual methods is
summarized in the Table 1, together with a brief description of the individual parameters’
meaning.
The VDS data processing tool (Figure 10) was created in MATLAB to apply the
above-mentioned analyses to the measured data; the tool loads the data as a CSV file in a
pre-defined order, executes the control theory-based parameter identification, and outputs
multiple control variables, as displayed in Table 1.
4. Discussion
The initial results indicate that the specific model based on the aforementioned second-
order transfer function enables us to identify the parameters that determine a driver’s
control performance. Using these parameters, in addition to the results of other approaches
employed, we may classify drivers according to their performances and control attitudes.
After creating a statistically significant dataset based on a high amount of test drives by
multiple subjects, we aim to develop a ’driver performance indicator’, a variable that
resembles the overall driver’s performance. The relevant analysis is to be carried out by an
inference mechanism that weighs the influence of each parameter and outputs a number in
the range of 0% to 100%. A higher percentage then represents better skill-based driving
performance and likely a higher competence to drive safely; however, we are aware of the
Safety 2021, 7, 25 16 of 17
fact that the ability to drive safely is a combination of skill-based, rule-based and knowledge-
based control. Another outcome of the research consists in an indicator of oddness (also
within the range of 0–100%); in this case, a higher number denotes a mismatch between
the driver’s usual behavior/performance and his or her actual parameters. As regards
the application potential, we assume that the driver performance indicator can be used to
not only compare the abilities of different drivers but also track changes in an individual
driver’s state over time, for example, a process corresponding to fatigue. As a driver is
distinguishable via the parameters listed in the Table 1, there is a possibility of developing
a method for driver identity mismatch detection based on his or her control behavior; an
example of a practical application is the detection of car theft or hijack.
The presented driving simulator complemented with a data processing tool can be
employed to evaluate the skill-based performance of fresh drivers, and it can also find
use as a tool to objectively detect a loss of the ability to control the vehicle safely due to
medical, age-related, or other reasons. A major advantage of the presented VDS rests
in the research and application flexibility due to full control of the scenarios and a high
level of realism mediated by a state-of-the-art gaming framework. If the measurement
scenarios or the process itself need to be changed, we can flexibly modify the simulator
hardware and software to better suit the project tasks. Future research is planned to consist
especially in expanding the current dataset, increasing the quality of the analysis algorithm,
and enabling the Vehicle Driving Simulator to incorporate data from external sensors, as is
required mainly in investigating drowsiness detection options. We are also making relevant
efforts to expand the simulator with a VR headset to achieve an even higher level of realism.
In this context, we are open to collaboration with other institutes or research groups.
Author Contributions: D.M. delivered, designed, or performed the concept, methodology, analysis,
writing, editing, visualization, and software creation; M.J. produced the analysis software and,
together with J.A., participated in the investigation and data curation; and P.F. supervised the
research, administered the project, and ensured the funding. All authors have read and agreed to the
published version of the manuscript.
Funding: The research was supported by Brno University of Technology and, partially, the core
facilities of CEITEC, the Central European Institute of Technology. This work also received funding
from the project “783119-1 SECREDAS Product Security for Cross Domain Reliable Dependable Au-
tomated System, H2020-ECSEL, EU” and the grant No. FEKT-S-20-6205—“Research in Automation,
Cybernetics and Artificial Intelligence within Industry 4.0” financially supported by the Internal sci-
ence fund of Brno University of Technology. The above-mentioned grants and institutions facilitated
efficient performance of the presented investigation and associated tasks.
Institutional Review Board Statement: The study was conducted according to the guidelines of
the Declaration of Helsinki, and approved by the Ethics Committee for Biomedical Research at the
Faculty of Electrical Engineering and Communication (approval No.04b/2020 of 25 September 2020).
Informed Consent Statement: All tested subjects gave their informed consent for inclusion before
they participated in the research.
Data Availability Statement: The data that support the findings of this study are available from the
corresponding author D. M. on request.
Conflicts of Interest: The authors declare no conflict of interest.
Abbreviations
The following abbreviations are used in this manuscript:
References
1. Akamatsu, M.; Green, P.; Bengler, K. Review Article Automotive Technology and Human Factors Research: Past, Present, and
Future. Int. J. Veh. Technol. 2013, 2013, 526180, doi:10.1155/2013/526180.
2. Mulder, M.; Abbink, D.A.; Boer, E.R. The effect of haptic guidance on curve negotiation behavior of young, experienced drivers.
In Proceedings of the 2008 IEEE International Conference on Systems, Man and Cybernetics, Singapore, 12–15 October 2008;
pp. 804–809, doi:10.1109/ICSMC.2008.4811377.
3. Guo, C.; Sentouh, C.; Popieul, J.C.; Haué, J.B.; Langlois, S.; Loeillet, J.J.; Soualmi, B.; Nguyen That, T. Cooperation between driver
and automated driving system: Implementation and evaluation. Transp. Res. Part F Traffic Psychol. Behav. 2019, 61, 314–325,
doi:10.1016/j.trf.2017.04.006.
4. Jirgl, M.; Boril, J.; Jalovecky, R. Statistical evaluation of pilot’s behavior models parameters connected to military flight training.
Energies 2020, 13, 4452, doi:10.3390/en13174452.
5. de Winter, J.; Leeuwen, P.; Happee, R. Advantages and Disadvantages of Driving Simulators: A Discussion. In Proceedings of
Measuring Behavior; Utrecht, The Netherlands, 2012; pp. 47–50.
6. Shechtman, O.; Classen, S.; Awadzi, K.; Mann, W. Comparison of Driving Errors Between On-the-Road and Simulated Driving
Assessment: A Validation Study. Traffic Inj. Prev. 2009, 10, 379–85, doi:10.1080/15389580902894989.
7. Carsten, O.; Kircher, K.; Jamson, S. Vehicle-based studies of driving in the real world: The hard truth? Accid. Anal. Prev. 2013,
58, 162–174, doi:10.1016/j.aap.2013.06.006.
8. de Winter, J.; Groot, S.; Mulder, M.; Wieringa, P.; Dankelman, J.; Mulder, J. Relationships between driving simulator performance
and driving test results. Ergonomics 2008, 52, 137–53, doi:10.1080/00140130802277521.
9. Lee, H.C.; Lee, A.H.; Cameron, D.; Li-Tsang, C. Using a driving simulator to identify older drivers at inflated risk of motor
vehicle crashes. J. Saf. Res. 2003, 34, 453–459. doi:10.1016/j.jsr.2003.09.007.
10. Roesener, C.; Harth, M.; Weber, H.; Josten, J.; Eckstein, L. Modelling Human Driver Performance for Safety Assessment of Road
Vehicle Automation. In Proceedings of the 2018 21st International Conference on Intelligent Transportation Systems (ITSC), Maui,
HI, USA, 4–7 November 2018; pp. 735–741, doi:10.1109/ITSC.2018.8569669.
11. Strand, N.; Nilsson, J.; Karlsson, I.M.; Nilsson, L. Semi-automated versus highly automated driving in critical situations caused
by automation failures. Transp. Res. Part F Traffic Psychol. Behav. 2014, 27, 218–228, doi:10.1016/j.trf.2014.04.005.
12. Xu, S.; Tan, W.; Efremov, A.; Qu, X. Review of control models for human pilot behavior. Annu. Rev. Control 2017, 44, 274–291,
doi:10.1016/j.arcontrol.2017.09.009.
13. Rasmussen, J. Skills, rules, and knowledge; signals, signs, and symbols, and other distinctions in human performance models.
IEEE Trans. Syst. Man Cybern. 1983, SMC-13, 257–266, doi:10.1109/TSMC.1983.6313160.
14. Mulder, M.; Pool, D.M.; Abbink, D.A.; Boer, E.R.; Zaal, P.M.; Drop, F.M.; Van Der El, K.; Van Paassen, M.M. Manual Control Cy-
bernetics: State-of-the-Art and Current Trends. IEEE Trans. Hum.-Mach. Syst. 2018, 48, 468–485, doi:10.1109/THMS.2017.2761342.
15. Seppelt, B.D.; Lee, J.D. Keeping the driver in the loop: Dynamic feedback to support appropriate use of imperfect vehicle control
automation. Int. J. Hum. Comput. Stud. 2019, 125, 66–80, doi:10.1016/j.ijhcs.2018.12.009.
16. Jiang, H.; Tian, H.; Hua, Y. Model predictive driver model considering the steering characteristics of the skilled drivers. Adv.
Mech. Eng. 2019, 11, 168781401982933, doi:10.1177/1687814019829337.
17. Landau, H.J. Necessary density conditions for sampling and interpolation of certain entire functions. Acta Math. 1967, 117, 37–52,
doi:10.1007/BF02395039.
18. Marvasti, F.; Analoui, M.; Gamshadzahi, M. Recovery of signals from nonuniform samples using iterative methods. IEEE Trans.
Signal Process. 1991, 39, 872–878, doi:10.1109/78.80909.
19. Szabolcsi, R. Modeling of the human pilot time delay using Padé series. Acad. Appl. Res. Mil. Sci. 2007, 6, 405–428.
20. McRuer, D.; Krendel, E. Mathematical Models of Human Pilot Behavior; Advisory Group for Aerospace Research and Development
Neuilly-Sur-Seine: Neuilly-Sur-Seine, France, 1974.
21. Gregory, J. Game Engine Architecture; CRC Press, Taylor & Francis Group: Boca Raton, FL, USA, 2019.
22. Satheesh, P.V. Unreal Engine 4 Game Development Essentials: Master the Basics of Unreal Engine 4 to Build Stunning Video Games;
Community Experience Distilled, Packt Publ.: Birmingham, UK, 2016.