A hardware-in-the-loop testing system (HIL) for automatic testing of vehicle air-conditioning controller is proposed.
The design scheme of HIL software and hardware is introduced comprehensively.
The automatic testing of logic function of vehicle air-conditioning controller is completed by building test model, editing and executing test program. With the development of automobile intellectualization, networking and ecology, on-board air-conditioning system is now an indispensable part of vehicle comfort system, and the functions of air-conditioning controllers are becoming more and more diversified, thus bringing great challenges to the functions and reliability of air-conditioning controllers.
Therefore, in the process of developing air-conditioning controllers, the measurement of air-conditioning controllers is necessary. Trial work is also essential. In the bench test of air conditioner, if the automation test can be realized, it can not only replace the tedious test work with high repeatability, but also save most of the time for the tester to verify the reliability and comfort of the vehicle, so as to improve the overall quality of the controller. The air conditioning system is mainly composed of compressor, thermostatic element HVAC, condenser assembly, refrigeration pipe, warm air pipe, sensors, air conditioning controller, air conditioning control panel and so on. As shown in Figure 1, taking refrigeration cycle as an example, the working principle of automobile air conditioning system is briefly introduced.
Among them, the air conditioning controller is the control unit of the air conditioning system. It controls the actuators and switch output modules through the input of switching signals, sensors and buses, so as to realize the functions of controlling the compressor’s work, heating, ventilation, refrigeration and other modules.
It can also realize the communication and diagnosis functions with other electrical devices through CAN. Standby interaction and data storage, as shown in Figure 2. The test of air conditioning control mainly includes the verification of input and output, interactive control, mixer valve control, air volume control, blow-out control, suction port control, compressor control, defrosting control, cooling fan control, start-stop control, diagnostic service, power management and so on. These tests take a long time to pass manual test. And the repetitive operation is more, the efficiency is low. Therefore, in order to improve the efficiency of testing, we should liberate the manual to do other real vehicle testing.
HIL (Hardware-in-the-loop), which is hardware-in-the-loop, is an effective and feasible means to create and automate test efficiently. HIL can simulate drivers, vehicles and working environment to test a large number of controllers, realize all-weather automated test, shorten the development cycle and save development costs. Automatic test of air conditioning controller is the application of HIL system. According to the system settings, using hardware to simulate the input sensor values, through the processing of the controller, the various inputs and outputs of the controller are collected, and the results are automatically judged to determine whether the logic of the air conditioning can meet the design requirements [2]. In the test, sensors such as internal temperature, external temperature, evaporator, pressure, sunlight, air quality and humidity are simulated according to different input types such as resistance, voltage, current and PWM. Actuators such as mixer motor, mode motor, internal and external gas motor, blower are connected to real load, and bus signals such as CAN and LIN are used.
Analog transmission through bus tool. After determining the test implementation scheme, the construction of the test system will begin, including the wiring harness connection of the test system bench and the simulation model building. The air conditioning controller is connected with HIL bench through the whole vehicle harness, and is connected according to different signal types. According to the actual harness connection, a test model is built in the simulation system. Dspace real-time simulation system uses Simulink software in MATLAB to build the hardware simulation model of the test system, including IO wiring and bus model. It can also build more complex models according to the functions, thus corresponding to the one-to-one correspondence between the controller signal and the board. The sensor model is established according to the actual connection harness.
After building and encapsulating the sensor model, and then matching other inputs and outputs in the model, the hardware model is built, as shown in Figure 7. The model building of CAN and LIN modules should be based on the model library built by Dspace, import DBC files according to their instructions, and configure them appropriately according to the need. The built bus model is shown in Figure 8. After the hardware platform and simulation model are built, the automated test program can be written according to the test cases. The automated test program and the automated test report need to be developed in the Automation Desk software developed by Dspace. The realization process of the automated test software is shown in Figure 9. Power down. Therefore, the test condition initialization and recovery initialization steps implemented in Automation Desk are shown in Figure 10, and the main test case steps are shown in Figure 11.
Automation Design software can choose to generate test reports automatically before executing test cases, and the format of test reports can also be chosen according to needs. An example of the test report is shown in Figure 12. This paper covers almost all the steps involved in the development of automatic test for vehicle air conditioning controller. According to the above steps, the automatic test bench and the corresponding software of air conditioner can cover 90% of manual test, greatly saving the test cycle and improving the test efficiency, so that it can be more used for real vehicle test and the investigation of complex and difficult problems.