2017 IEEE 6th Global Conference on Consumer Electronics (GCCE 2017)
Effective Validation Framework Using Wheel-Microcontroller
Co-Emulation of Safe Adaptive Front Light Controller
Hyeongyun Moon, Jeonghun Cho, and Daejin Park∗
School of Electronics Engineering, Kyungpook National University
Daehakro 80, Bukgu, Daegu, 41566, Republic of Korea
∗
boltanut@knu.ac.kr
Abstract—In this paper, we propose how to implement the
Hardware-in-the-Loop Simulation (HILS) System by linking a
Backup Adaptive Front Lighting System (AFLS) implemented
with Simulation, Logitech G29 Wheel Set and Arduino Mega
2560. The Backup AFLS Model is implemented using MAT-
LAB/SIMULINK. By implementing the communication layer
separately to connect an external physical device interface,
this paper introduces a structure that enables real-time event Without AFLS With AFLS
extraction, and controls and supplies a plug-in method using the
implemented communication layer. Using the proposed verifica-
tion framework, this paper describes the analysis and results Fig. 1. Adaptive Front Lighting System
based on the Backup AFLS System, which is designed with the
signals being entered in real-time from an actual Steering Wheel User Action (Input) G29 + AFLS Simulink Model
Set.
Steering
I. I NTRODUCTION angle
Recently, electricalization of car parts is proceeding rapidly.
In this situation, the Hardware-in-the-Loop Simulation (HILS) Vehicle
speed
system is widely used to evaluate electrical components. Pre- G29 Steering Wheel Set
viously proposed Backup AFLS systems were verified only by
fixed constant values in the Simulink. [1] Thus there was a lack Run-time Communication between
of real-time tests that linked hardware elements. To improve Matlab and Simulink
Output
this point, simulation was performed in the configuration
similar to the actual driving environment by constructing an Headlamp
HILS system using Logitech G29 Steering Wheel Set and Control
signal
Arduino Mega 2560. Headlamp
MATLAB Model Arduino Mega2560 (Physical Device)
AFLS is a system that guarantees safety and visibility while
driving at night. The proposed HILS system used to validate
Fig. 2. Backup AFLS HILS System Model
AFLS is implemented by Mathworks Simulink and Matlab.
When the steering angle and vehicle velocity is entered into
the system using the G29 Steering Wheel Set, a headlamp III. P ROPOSED A RCHITECTURE AND I MPLEMENTATION
control signal is sent from the Simulink model to Arduino
The system implemented in this paper performs modeling
Mega 2560. However, if an error occurs in the main AFLS
using Mathworks Matlab/Simulink and gives the results from
due to external noise during the process, it is automatically
linking each hardware in a real-time simulation.
operated by the Backup AFLS.
Fig. 2 shows the structure of the proposed Backup AFLS
II. A DAPTIVE F RONT L IGHTING S YSTEM (AFLS) HILS System. First, Backup AFLS receives the vehicle ve-
AFLS provides optimal visibility and safety during night- locity and steering angle in real time and returns the corre-
time driving, especially when turning corners. The AFLS sponding swivel angle. By attaching the G29 Steering Wheel
controller receives the velocity and steering angle of the Set to this system input, the user will be able to enter the
vehicle from the Body Control Module (BCM). When data desired value in real-time. This G29 Steering Wheel Set was
from the BCM determines the turning radius, the swivel modeled using the Simulink Joystick Input Interface. Since the
angle is calculated based on the determined turning radius. data received from the Steering Wheel Set has a simple value
Fig. 1 shows that vehicles without AFLS cannot illuminate between -1 and 1, it is converted to the steering angle and to
people on the curve when the vehicle is turning a corner. the velocity value suitable for this system. These two models
However, vehicles with AFLS can illuminate people on the are integrated into a single Simulink model to form a system.
curve because the swivel angle changes with the turning This paper uses Matlab to model the Arduino Mega 2560.
radius. The Matlab model is the top model, and the Steering Wheel
Authorized licensed use limited to: ST. JOSEPH ENGINEERING COLLEGE MANGALORE. Downloaded on November 14,2024 at 10:47:09 UTC from IEEE Xplore. Restrictions apply.
978-1-5090-4045-2/17/$31.00 ©2017 IEEE
2017 IEEE 6th Global Conference on Consumer Electronics (GCCE 2017)
Steering
Noise
Swivel Final
Fig. 5 shows the difference in processing performance
angle swivel
angle
G29
angle Arduino for real-time input when the Backup AFLS is applied. In
Velocity AFLS Mega2560
Interface the software simulation of the existing Backup AFLS, only
Headlamp
control
external noise was considered. However, internal noise also
signal
Logitech Backup AFLS occurs when the input is received through actual hardware. The
G29
Steering Backup internal/external noise shown in Fig. 5(a) is filtered through
Wheel Backup swivel
Set Swivel
Diagnosis Memory angle
the Backup AFLS’s internal diagnostic routines, and then the
angle
Headlamp
(Step Motor)
results shown in Fig. 5(b) are demonstrated. In additional
Warning
experiments, the simulation time was measured using Matlab’s
tic and toc commands. From this experimental result, we can
see that it is slightly better than the FIR filter in terms of delay.
Fig. 3. Proposed Backup AFLS HILS System
External Noise
Set/AFLS Simulink model is placed in the lower model to Internal Noise
bring the processed values from the Simulink model into the
Arduino model in real time. Then, the Arduino controls the
swivel angle based on the received value.
Fig. 3 shows the structure of the more detailed Backup
AFLS HILS system. In the Backup AFLS model, the steering
angle and vehicle velocity from the G29 interface are entered
into the Main AFLS and Backup AFLS. Using these two data,
the Main AFLS calculates the swivel angle. This calculated (a) Result of the AFLS without Backup function
value is inputted to Backup AFLS to check whether it is a
correct value. Normally, the swivel angle data from the Main
AFLS is sent to the headlamp.
However, when an error occurs due to external noise, the
diagnostic routine inside Backup AFLS informs the situation.
It returns the normal operation value from the previous state
stored in the Backup Memory and sends the value to the
headlamp.
IV. E XPERIMENTAL R ESULTS
Fig. 4.(a) shows swivel angles according to vehicle velocity
and turning radius input in real-time due to the controlling (b) Result of the AFLS with Backup function
characteristics of AFLS. As a result, headlights are controlled
by Arduino. It suggests that the rotational angle of the head- Fig. 5. Effectiveness of Backup AFLS
lamp increases as the speed increases, and it decreases as
the turning radius increases. Fig. 4(b) shows the swivel angle V. C ONCLUSIONS
according to the angle of the steering wheel at 20 km/h, as This paper proposes a HILS system in which the G29
shown in the results of Fig. 4(a). Steering Wheel Set and Arduino Mega 2560 are linked with
a Backup AFLS modeled simply using software simulation.
V = 20
Steering Swivel
Through this, the paper confirms the internal/external noise
V = 50
V = 80 angle angle processing and the simulation results via the user’s input in
20 ~ -5.5 -19.5 real time instead of a fixed constant value.
-2.7 -9.8
Swivel angle (degree)
ACKNOWLEDGMENT
-1.2 -4.9
10
0 0
This research was supported by the Basic Science Re-
1.2 5
search Program through the National Research Founda-
2.7 10
tion of Korea(NRF) funded by the Ministry of Education
5.5 ~ 20
(2014R1A6A3A04059410).
0
0 150 300
Turning radius (meter)
R EFERENCES
(a) Normal AFLS operation (b) Swivel angle corresponding to [1] J. Youn, M. D. Yin, J. Cho, and D. Park, “Steering wheel-based adap-
according to the velocity steering angle at 20 km/h tive headlight controller with symmetric angle sensor compensator for
functional safety requirement,” in 2015 IEEE 4th Global Conference on
Fig. 4. Main AFLS operation Consumer Electronics (GCCE), Oct 2015, pp. 619–620.
Authorized licensed use limited to: ST. JOSEPH ENGINEERING COLLEGE MANGALORE. Downloaded on November 14,2024 at 10:47:09 UTC from IEEE Xplore. Restrictions apply.
978-1-5090-4045-2/17/$31.00 ©2017 IEEE