Vehicle-mounted LED control software simulation and automatic test system
By designing the on-board LED control software simulation and automated testing system, the problems of irregular and inefficient traditional manual writing software code are solved, and a more efficient development and testing process is achieved.
Patent Information
- Application Number
- CN202310929776.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-26
- Publication Date
- 2025-02-07
AI Technical Summary
The traditional manual writing of the software code for the headlight driver controller is not standardized, which makes it difficult to guarantee the overall quality of the software, a long development cycle, and inefficient testing of complex functions, and inaccurate test results.
Design a vehicle-mounted LED control software simulation and automated testing system, including IO equipment, headlight drive control board, hardware fault injection unit, temperature measurement equipment and LED test light box, control these equipment through the PC side to simulate various test conditions and automatically inject them. Failure and collect data to realize automated testing.
Through graphical programming and automated testing, the development cycle is shortened, development efficiency and software quality is improved, development costs are reduced, and testing is more efficient and accurate.
Smart Images

Figure CN119403014A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of vehicle lamp control systems, and in particular to a vehicle-mounted LED control software simulation and automatic testing system. Background Art
[0002] With the rapid development of the automotive industry, headlights have also shifted from the traditional purpose of ensuring functional safety to the future of electronic and intelligent. LED headlights have gradually begun to carry more functions, such as assisting driving, signal transmission, etc., and also have the effects of adaptive high beam and welcoming guests. Therefore, the software design and functional testing of the headlight drive controller have become very critical and become an important part of the development of automotive electronic control systems.
[0003] The traditional software development method is implemented through manual hand-written code, including the underlying driver and application layer algorithm program. When testing the product, the corresponding functional test is also performed by manually turning on the LED test light box switch, viewing and recording oscilloscope data, etc.
[0004] As the functions of car lights become increasingly complex, the requirements for safety and stability are becoming higher and higher, and the software control code in the car light driver controller has also begun to expand rapidly.
[0005] Traditional hand-written codes are not standardized, and the overall quality of the software is difficult to guarantee. At the same time, it consumes a lot of time and manpower, and the development cycle is long. In addition, the testing of complex functions cannot be done manually, and manual testing also has problems such as low efficiency and inaccurate test results. Summary of the invention
[0006] In view of the deficiencies in the prior art, the present invention provides a vehicle-mounted LED control software simulation and automated testing system.
[0007] The technical solution of the present invention is: a vehicle-mounted LED control software simulation and automated testing system, the system comprising an IO device, a vehicle light drive control board, a hardware fault injection unit FIU, a power module, an LED test light box, a temperature measuring device, and a PC terminal;
[0008] The PC terminal is installed with a simulation system and a test system; and the PC terminal is connected to the headlight drive control board through an IO device, and the headlight drive control board is also connected to a hardware fault injection unit FIU, a power module, a temperature measuring device, and an LED test light box;
[0009] The PC-side controlled hardware fault injection unit FIU is used to inject faults into the input or output of the headlight drive control board to simulate the actual faults encountered by the headlight drive control board; so as to test, characterize or verify the behavior of the headlight drive control board under a specific fault.
[0010] The temperature measuring device is controlled by the PC to provide the simulated ambient temperature and collected temperature information to the headlight drive control board;
[0011] The LED test light box is used to simulate the actual load of the vehicle light drive control panel.
[0012] Preferably, the IO device has 16 analog output channels, 8 analog input channels, 24 digital input channels, 24 digital output channels, and 7 power supply channels.
[0013] Preferably, the model of the hardware fault injection unit FIU is NI PXI-2510.
[0014] Preferably, the power supply module is a switching DC power supply of model PSW3036, which is used to power the headlight drive control board.
[0015] Preferably, the temperature measuring equipment includes a temperature chamber and a thermocouple. The temperature chamber is a programmable constant temperature and humidity test chamber with model number HD-E702, which is used to simulate the test environment of the headlight drive control board. The thermocouple model is NI-USB-TC01, and the maximum voltage range is 3.125mV-73.125mV. The thermocouple is powered by a USB bus and is used to collect the actual temperature of the headlight drive control board, and convert the temperature into voltage and then feed it back to the PC.
[0016] Preferably, the simulation system includes a three-layer architecture of a business logic layer, a data management layer and a display layer; the data management layer receives data generated from the business logic layer and is responsible for managing the data; the data is the system data of the animation model and the simulation data after the visualization interface is modified, and these data are stored in the data dictionary and basic workspace of Matlab.
[0017] Preferably, the business logic layer includes an animation model simulation management module and an animation visualization interface management module.
[0018] Preferably, the animation model simulation management module is used for building the animation model, the animation model is built and set by Matlab / Simulink software, the input of the animation model comes from the animation scheduling instruction, scene request instruction and scene stop instruction sent by the body controller; the output of the animation model is PWM signal, animation state and scene state;
[0019] The animation model construction specifically includes model initial parameter setting, module initial parameter setting and algorithm module construction;
[0020] The initial model parameter setting is aimed at the simulation time and simulation step of the animation model; the initial module parameter setting is aimed at the starting point, climbing point, waiting point and final point of the specific algorithm module of the animation model; the algorithm module construction is aimed at input parameter preprocessing, parameter update and PWM interpolation method search;
[0021] The output PWM signal of the animation model is determined by the initial parameters of the starting point, climbing point, waiting point and final point of the algorithm module, and various animation output effects are obtained by configuring different module initial parameters;
[0022] Among them, the starting point represents the time value of each LED starting a certain sequence, the climbing point represents the time value of each LED slope in a certain sequence, the waiting point represents the delay time value of each LED before starting a certain sequence; the final point represents the final PWM value of each LED sequence.
[0023] Preferably, the animation visualization interface management module is constructed and set up through Matlab / App designer tools, and can call, load, modify parameters and display animations of Matlab / Simulink models.
[0024] Preferably, the display layer is a visual animation interface for vehicle-mounted LED animation display; it includes a login interface and a main operation interface.
[0025] Preferably, the test system comprises VTEST studio and CANoe, wherein the VTEST studio is used to develop and manage test scripts, and the CANoe is used to provide an execution environment for automated testing and execute test scripts.
[0026] The beneficial effects of the present invention are:
[0027] 1. The present invention builds a model on Matlab software by means of graphical programming, and verifies the designed model in a simulation environment; thereby shortening the development cycle of automotive electronic software products, reducing development costs, improving development efficiency, and making the software products have good maintainability and reusability;
[0028] 2. The present invention simulates the test conditions of the vehicle lamp through the LED test light box and the temperature measuring equipment, and performs simulation and testing through the simulation system and the test system;
[0029] 3. The PC end of the present invention sends simulation instructions to the headlight drive control board through the IO device and receives simulation data from the headlight drive control board at the same time; writes test case scripts on the test system, and uses the hardware fault injection unit FIU, LED test light box, and temperature measuring equipment to simulate the test conditions of the headlight drive control board. When the PC end outputs a simulation signal to the headlight drive control board, the headlight drive control board performs logical identification on the simulation signal, and then controls the hardware fault injection unit FIU through the PC end to inject a fault at the input or output end of the headlight drive control board to simulate the actual fault encountered by the headlight drive control board; to test, characterize or verify the behavior of the headlight drive control board under a specific fault; and controls the temperature measuring equipment through the PC end to provide the headlight drive control board with simulated ambient temperature and collect temperature information; collects the input and output of the headlight drive control board through the IO device, and then feeds the signal back to the PC end test system;
[0030] 4. The present invention builds an animated visualization interface based on the headlight control model, so that various parameters of the model can be modified more conveniently on the interface without entering the complex model to change the parameters; at the same time, the simulation results of the model are visualized, so that it can be preliminarily checked whether the design of the headlight function meets the expectations, thereby improving human-computer interaction; by modifying and configuring the key parameters of the algorithm model on the visualization interface software, the headlight animation effect can be diversified, so that it can be directly displayed and selected by the user;
[0031] 5. The present invention utilizes automated testing to replace manual testing, which not only automates task testing, but also allows test cases to be reused. In the long run, it can improve testing efficiency and save enterprise costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 It is a framework diagram of the system of the present invention;
[0033] Figure 2 It is an architecture diagram of the simulation system of the present invention; DETAILED DESCRIPTION
[0034] The specific implementation of the present invention will be further described below in conjunction with the accompanying drawings:
[0035] Example 1
[0036] like Figure 1As shown, this embodiment provides a vehicle-mounted LED control software simulation and automated testing system, the system includes a PC terminal, an IO device, a headlight drive control board, a hardware fault injection unit FIU, a power module, an LED test light box, and a temperature measuring device; the PC terminal is installed with a simulation system and a test system; and the PC terminal is connected to the headlight drive control board through the IO device, and the headlight drive control board is also connected to the hardware fault injection unit FIU, the power module, the temperature measuring device, and the LED test light box;
[0037] The PC-side controlled hardware fault injection unit FIU is used to inject faults into the input or output of the headlight drive control board to simulate the actual faults encountered by the headlight drive control board; so as to test, characterize or verify the behavior of the headlight drive control board under a specific fault.
[0038] The temperature measuring device is controlled by the PC to provide the simulated ambient temperature and collected temperature information to the headlight drive control board;
[0039] The LED test light box is used to simulate the actual load of the vehicle light drive control panel.
[0040] In this embodiment, the PC terminal sends simulation instructions to the headlight drive control board through the IO device and receives simulation data from the headlight drive control board at the same time; writes test case scripts on the test system, and uses the hardware fault injection unit FIU, LED test light box, and temperature measuring equipment to simulate the test conditions of the headlight drive control board. When the PC terminal outputs a simulation signal to the headlight drive control board, the headlight drive control board performs logical identification on the simulation signal, and then controls the hardware fault injection unit FIU through the PC terminal to inject a fault at the input or output of the headlight drive control board to simulate the actual fault encountered by the headlight drive control board; to test, characterize or verify the behavior of the headlight drive control board under a specific fault; and controls the temperature measuring equipment through the PC terminal to provide the headlight drive control board with simulated ambient temperature and collect temperature information; and collects the input and output of the headlight drive control board through the IO device, and then feeds the signal back to the PC terminal test system.
[0041] As a preferred embodiment of this embodiment, the IO device has 16 analog output channels, 8 analog input channels, 24 digital input channels, 24 digital output channels, and 7 power supply channels, wherein the 16 analog output channels support an output voltage range of 0-16V; of the 8 analog input channels, 2 are used as ordinary analog inputs, supporting an input voltage range of 0-12v, and 6 are used as input power module measurements, supporting an input voltage range of 0-60V; the frequency range of the 4 digital output channels is 1Hz-1MHz, for outputting high or low levels; the frequency range of the 24 digital input channels is 1Hz-1MHz, for inputting high or low levels; and the 7 power supply channels support both DC and PWM modes.
[0042] As a preferred embodiment of this embodiment, the model of the hardware fault injection unit FIU is NI PXI-2510.
[0043] Preferably, the power supply module is a switching DC power supply of model PSW3036, which is used to power the headlight drive control board.
[0044] As a preferred embodiment of the present invention, the temperature measuring device includes a temperature box and a thermocouple, and the temperature box is a programmable constant temperature and humidity test box of model HD-E702, which is used to simulate the test environment of the headlight drive control board and provide a test environment temperature of -50°C-200°C;
[0045] The thermocouple model is NI-USB-TC01, and the maximum voltage range is 3.125mV-73.125mV; the thermocouple is powered by a USB bus, and is used to collect the actual temperature of the headlight drive control board, and convert the temperature into voltage and then feed it back to the PC end.
[0046] As a preferred embodiment of the present invention, the LED test light box includes an LED module and a resistor module. The LED module is used to simulate the actual load of the vehicle light drive control board; the resistor module is configured with a variety of resistance values to simulate the actual resistance required by the load.
[0047] As a preferred embodiment of the present invention, the simulation system is used for animation model construction and animation model visualization; it includes a three-layer architecture of a business logic layer, a data management layer and a display layer.
[0048] As a preferred embodiment of this invention, the data management layer receives data generated from the business logic layer and manages the data; the data are system data of the animation model and simulation data modified by the visualization interface, and these data are stored in the data dictionary and basic workspace of Matlab.
[0049] As a preferred embodiment of this embodiment, the business logic layer includes an animation model simulation management module and an animation visualization interface management module.
[0050] As a preferred embodiment of the present invention, the animation model simulation management module is used for building the animation model, and the animation model is built and set by Matlab / Simulink software. The input of the animation model comes from the animation scheduling instructions, scene request instructions and scene stop instructions sent by the body controller; the output of the animation model is PWM signal, animation state and scene state.
[0051] As a preferred embodiment of the present invention, the animation model building specifically includes model initial parameter setting, module initial parameter setting and algorithm module construction;
[0052] The initial model parameter setting is aimed at the simulation time and simulation step of the animation model; the initial module parameter setting is aimed at the starting point, climbing point, waiting point and final point of the specific algorithm module of the animation model; the algorithm module construction is aimed at input parameter preprocessing, parameter update and PWM interpolation method search;
[0053] The output PWM signal of the animation model is determined by the initial parameters of the starting point, climbing point, waiting point and final point of the algorithm module, and various animation output effects are obtained by configuring different module initial parameters.
[0054] As a preferred embodiment of this invention, the starting point represents the starting time value of each LED sequence, the climbing point represents the duration time value of the slope of each LED sequence, the waiting point represents the delay time value of each LED before starting a sequence; the final point represents the final PWM value of each LED sequence.
[0055] As a preferred embodiment of the present invention, the animation visualization interface management module is constructed and set up through the Matlab / Appdesigner tool, which can call and load the Matlab / Simulink model, modify parameters and display animations. It includes adding controls and panels, defining properties, writing functions and callback responses;
[0056] The control includes buttons, lights, digital edit boxes, text display boxes, labels and pictures; the property definition includes private properties such as Pasuse, Continue and Stop; the callback function includes button callback trigger, digital edit box callback trigger and page close request, etc.; the button callback trigger function includes file selection function, file operation function, model related block opening function, etc.; the digital edit box callback trigger function includes animation rate adjustment function and control light association function;
[0057] As a preferred embodiment of the present invention, the display layer is a visual animation interface for displaying vehicle-mounted LED animations; it includes a login interface and a main operation interface.
[0058] The main operation interface includes a model selection and loading module, a parameter modification module, a work log display module and an animation operation and display module;
[0059] The model selection and loading module includes model selection and model loading operations, model selection is to determine the model file to be simulated, and model loading is to run the determined model to be simulated;
[0060] The parameter modification module includes the parameters modified including the simulation time, simulation step, TStart, Tramp, StartValue and EndValue of the model;
[0061] The work log display module is mainly used to record the information of the user's operation of the software, and display the information in a specific window in real time to inform the user of the current operation status;
[0062] The animation operation and display module includes buttons and LED controls such as animation rate, animation start, animation pause, animation continue and animation stop. Through various operations on the animation running, users can better watch the animation effects or find problems therein.
[0063] As a preferred embodiment of the present invention, the test systems are VTEST studio and CANoe, wherein the VTEST studio is used to develop and manage test scripts, and the CANoe is used to provide an execution environment for automated testing and execute test scripts.
[0064] As a preferred embodiment of this invention, the simulation operation is as follows:
[0065] Step 1, open the login interface of the vehicle-mounted LED animation visualization interface;
[0066] Step 2: Enter the user account and password. If the account and password are correct, enter the main operation interface. Otherwise, repeat step 2.
[0067] Step 3, click the Select File button and select the model to be simulated;
[0068] Step 4, click the Load button to load the selected model. If the model is loaded successfully, configure the parameters. Otherwise, repeat step 3.
[0069] Step 5, click each parameter button in the parameter configuration module to complete the corresponding configuration. If the configuration is successful, proceed to the next step, otherwise repeat step 5;
[0070] Step 6, enter the animation operation and display module, enter the animation running rate, click the animation start button, if the animation is displayed successfully, otherwise return to step 1.
[0071] As preferred in this embodiment, the test operation is specifically as follows:
[0072] Step 1: Connect the PC to the headlight driver control board through the IO device;
[0073] Step 2: Write the test case script on VTEST studio software;
[0074] Step 3, import the test case script into CANoe software;
[0075] Step 4: Initialize and set up the automatic testing environment;
[0076] Step 5, start each test case script program to start testing;
[0077] Step 6: Save relevant data and generate a test report.
[0078] The above embodiments and descriptions are only for illustrating the principles and best embodiments of the present invention. Without departing from the spirit and scope of the present invention, the present invention may be subject to various changes and improvements, all of which fall within the scope of the present invention to be protected.
Claims
1. A vehicle-mounted LED control software simulation and automated testing system, characterized in that: The system includes IO equipment, a headlight drive control board, a hardware fault injection unit FIU, a power module, an LED test light box, a temperature measuring device, and a PC terminal; The PC terminal is installed with a simulation system and a test system; and the PC terminal is connected to the headlight drive control board through an IO device, and the headlight drive control board is also connected to a hardware fault injection unit FIU, a power module, a temperature measuring device, and an LED test light box; The PC-side controlled hardware fault injection unit FIU is used to inject faults into the input or output of the headlight drive control board to simulate the actual faults encountered by the headlight drive control board, thereby testing, characterizing or verifying the behavior of the headlight drive control board under a specific fault. Controlling the temperature measuring device through the PC end is used to provide simulated ambient temperature and collected temperature information to the headlight drive control board; The LED test light box is used to simulate the actual load of the vehicle light drive control panel.
2. The vehicle-mounted LED control software simulation and automated testing system according to claim 1, characterized in that: The IO device has 16 analog output channels, 8 analog input channels, 24 digital input channels, 24 digital output channels, and 7 power supply channels.
3. The vehicle-mounted LED control software simulation and automated testing system according to claim 1, characterized in that: The model of the hardware fault injection unit FIU is NI PXI-2510.
4. The vehicle-mounted LED control software simulation and automated testing system according to claim 1, characterized in that: The power supply module is a switching DC power supply of model PSW3036, which is used to supply power to the headlight drive control board.
5. The vehicle-mounted LED control software simulation and automated testing system according to claim 1, characterized in that: The temperature measuring equipment includes a temperature chamber and a thermocouple. The temperature chamber is a programmable constant temperature and humidity test chamber with model number HD-E702, which is used to simulate the test environment of the headlight drive control board. The thermocouple model is NI-USB-TC01, and the maximum voltage range is 3.125mV-73.125mV; the thermocouple is powered by a USB bus, and is used to collect the actual temperature of the headlight drive control board, and convert the temperature into voltage and then feed it back to the PC end.
6. The vehicle-mounted LED control software simulation and automated testing system according to claim 1, characterized in that: The simulation system includes a three-layer architecture of business logic layer, data management layer and display layer; the data management layer receives data generated from the business logic layer and is responsible for managing the data; the data is the system data of the animation model and the simulation data modified by the visualization interface, and these data are stored in the data dictionary and basic workspace of Matlab.
7. The vehicle-mounted LED control software simulation and automated testing system according to claim 6, characterized in that: The business logic layer includes an animation model simulation management module and an animation visualization interface management module; The animation model simulation management module is used for building the animation model. The animation model is built and set by Matlab / Simulink software. The input of the animation model comes from the animation scheduling instruction, scene request instruction and scene stop instruction sent by the body controller; the output of the animation model is PWM signal, animation state and scene state; The animation model construction specifically includes model initial parameter setting, module initial parameter setting and algorithm module construction; The initial model parameter setting is aimed at the simulation time and simulation step of the animation model; the initial module parameter setting is aimed at the starting point, climbing point, waiting point and final point of the specific algorithm module of the animation model; the algorithm module construction is aimed at input parameter preprocessing, parameter update and PWM interpolation method search; The output PWM signal of the animation model is determined by the initial parameters of the starting point, climbing point, waiting point and final point of the algorithm module, and various animation output effects are obtained by configuring different module initial parameters; Among them, the starting point represents the time value of each LED starting a certain sequence, the climbing point represents the time value of each LED slope in a certain sequence, the waiting point represents the delay time value of each LED before starting a certain sequence; the final point represents the final PWM value of each LED sequence.
8. The vehicle-mounted LED control software simulation and automated testing system according to claim 7, characterized in that: The animation visualization interface management module is constructed and set up through the Matlab / App designer tool, and can call and load the Matlab / Simulink model, modify parameters and perform animation display.
9. The vehicle-mounted LED control software simulation and automated testing system according to claim 6, characterized in that: The display layer is a visual animation interface used for vehicle-mounted LED animation display; it includes a login interface and a main operation interface.
10. The vehicle-mounted LED control software simulation and automated testing system according to claim 1, characterized in that: The test system is VTEST studio and CANoe. The VTEST studio is used to develop and manage test scripts, and the CANoe is used to provide an execution environment for automated testing and execute test scripts.
Citation Information
Cited By
Vehicle lamp logic function test controller based on CANFD protocol and implementation method thereof
CN121284805A