Area controller hardware-in-loop test system and method

By designing a hardware-in-the-loop test system for area controllers, employing a main control module, an input simulation module, and an output measurement module, and combining them with automated scripts, the system solves the problems of high hardware cost, low signal accuracy, and low automation in existing technologies. It achieves a high-efficiency, low-cost test system suitable for the R&D verification and batch testing of vehicle-mounted area controllers.

CN121934540APending Publication Date: 2026-04-28CHERY AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610112206.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-27
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

In the existing technology, the hardware-in-the-loop test system for vehicle-mounted area controllers (ZCUs) suffers from high hardware costs, poor scalability, low signal accuracy, and inability to meet the requirements of synchronous simulation of multiple types of input signals and high-precision acquisition of output responses. Furthermore, it lacks deep integration with mainstream simulation tools, resulting in low test automation and affecting efficiency and consistency of results.

Method used

A hardware-in-the-loop testing system for a regional controller was designed. It employs a main control module, an input simulation module, an output measurement module, and a host computer interaction module. Through a communication interface module, it achieves bidirectional communication, generates and acquires analog, digital, and frequency signals, and combines automated scripts for test process control and result judgment. It uses a low-cost main control chip and standardized interface design to achieve high integration and high automation.

Benefits of technology

It achieves high-precision output of analog, digital and frequency signals, improves the automation of the testing process and the consistency of results, reduces costs, is suitable for the flexible testing needs of small and medium-sized R&D teams, and improves testing efficiency and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121934540A_ABST
    Figure CN121934540A_ABST
Patent Text Reader

Abstract

The invention provides a regional controller hardware-in-the-loop test system and method, and the method comprises the steps: transmitting a test instruction to a main control module through an upper computer interaction module, analyzing the test instruction through the main control module, generating a corresponding control signal according to an input simulation parameter, and transmitting the control signal to an input simulation module; the input simulation module generates an analog quantity signal, a digital quantity signal or a frequency quantity signal as an external excitation signal of the to-be-tested area controller according to the control signal, and outputs the external excitation signal to the to-be-tested area controller; the output measurement module collects test response data output by the to-be-tested area controller and transmits the test response data to the main control module; the main control module uploads test response data to the upper computer interaction module through the communication interface module; and the upper computer interaction module receives and displays the test response data, and executes a test process and judges a test result through an automatic script. According to the invention, the efficiency and reliability of the hardware-in-the-loop test of the regional controller are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of hardware-in-the-loop (HIL) testing technology for vehicle-mounted area controllers, and in particular to a hardware-in-the-loop testing system and method for area controllers. Background Technology

[0002] Hardware-in-the-loop (HIL) testing of vehicle-mounted area controllers (ZCUs) typically relies on commercial HIL platforms or traditional test benches. While commercial HIL systems offer high real-time performance and multi-channel simulation capabilities, their high hardware costs and closed software result in poor scalability, making them unsuitable for the flexible testing needs of small to medium-sized R&D teams. Simple test setups built with general-purpose microcontrollers suffer from insufficient processing power, limited interface resources, and low signal accuracy, failing to meet the ZCU's requirements for synchronous simulation of multiple input signals (analog, digital, and frequency signals) and high-precision acquisition of output responses. Furthermore, existing testing methods generally lack deep integration with mainstream simulation tools (such as CANoe), resulting in low data visualization, a high proportion of manual operation, and difficulty in achieving closed-loop execution of automated testing processes, impacting testing efficiency and result consistency. Summary of the Invention

[0003] The purpose of this application is to provide a hardware-in-the-loop testing system and method for area controllers, so as to alleviate the above-mentioned technical problems existing in the prior art.

[0004] In a first aspect, the present invention provides a hardware-in-the-loop testing system for a regional controller, including a main control module. The main control module communicates bidirectionally with the regional controller under test and the host computer interaction module through a communication interface module, and is connected to an input simulation module and an output measurement module through a general input / output port or a digital-to-analog converter port. The host computer interaction module is used to send test commands to the main control module, wherein the test commands carry input simulation parameters; The main control module is used to parse the test command, generate corresponding control signals according to the input simulation parameters, and send the control signals to the input simulation module; The input simulation module is used to generate analog signals, digital signals or frequency signals based on the control signals as external excitation signals to the controller under test, and outputs the external excitation signals to the controller under test. The output measurement module is used to collect the test response data output by the controller of the area under test, and transmit the test response data to the main control module; The main control module is also used to upload the test response data to the host computer interaction module through the communication interface module; The host computer interaction module is also used to receive and display the test response data, execute the test process through automated scripts, and determine the test results.

[0005] In an optional implementation, the main control module includes a microcontroller that integrates a central processing unit, a storage unit, and various peripheral interfaces. It is equipped with a clock circuit, a reset circuit, and a power management circuit, and is connected to an external programming device through a debugging interface for running control programs and coordinating data interaction among various functional modules.

[0006] In an optional implementation, the input simulation module includes voltage setting values ​​and current setting values ​​for generating analog signals, level state setting values ​​for generating digital signals, and waveform parameter setting values ​​for generating frequency signals. The input simulation module is used to provide the controller of the area under test with digital switch status, sensor analog voltage or frequency excitation signals.

[0007] In an optional implementation, the output measurement module includes a voltage divider and current limiting circuit connected to the analog output port of the controller of the area under test. The output terminal of the voltage divider and current limiting circuit is connected to the analog-to-digital conversion port of the main control module, and a filter capacitor is connected in parallel to suppress high-frequency interference. The output measurement module also includes a level conditioning circuit for receiving the digital output signal of the area controller under test, and the output terminal of the level conditioning circuit is connected to the general-purpose input / output port of the main control module.

[0008] In an optional implementation, the communication interface module includes a controller local area network (CLAN) function unit built into the main control module and an external bus transceiver. One end of the external bus transceiver is connected to the communication pin of the main control module, and the other end is connected to the communication bus port of the controller under test for bidirectional data transmission.

[0009] In an optional implementation, the host computer interaction module is a computer software system including a graphical user interface, which realizes the configuration of input parameters and the visual display of collected data through controls; The controls include switches or indicator lights for representing binary states, a dashboard for displaying continuous values, a drop-down list for selecting preset options, and a text box for inputting or displaying text information.

[0010] In an optional implementation, the host computer interaction module controls the test process through an automated test script, which is used to define test sequences, read collected data, execute logical judgments, trigger fault injection instructions, and generate test reports.

[0011] In an optional implementation, the main control module is configured with a periodic interrupt task to periodically update the output status of the input simulation module and synchronously collect data from the output measurement module so as to interact with the controller of the area under test in real time.

[0012] In an optional implementation, the main control module communicates with the host computer interaction module via a communication interface module using a preset data frame format; The data frame format includes an instruction identifier, channel number, numerical type, and payload, enabling the parsing of test instructions and the structured return of collected data.

[0013] Secondly, the present invention provides a hardware-in-the-loop testing method for a region controller, applied to a region controller hardware-in-the-loop testing system as described in any of the foregoing embodiments, comprising: Test commands are sent to the main control module through the host computer interaction module, wherein the test commands carry input simulation parameters; The main control module parses the test command, generates corresponding control signals based on the input simulation parameters, and sends the control signals to the input simulation module; The input simulation module generates analog signals, digital signals, or frequency signals based on the control signals as external excitation signals to the controller of the area under test, and outputs the external excitation signals to the controller of the area under test. The output measurement module collects the test response data output by the controller of the area under test and transmits the test response data to the main control module; The main control module uploads the test response data to the host computer interaction module through the communication interface module; The host computer interaction module receives and displays the test response data, and executes the test process and determines the test results through a preset automated script.

[0014] The hardware-in-the-loop (HIL) testing system and method for zone controllers provided in this application effectively solves the problems of coarse signal configuration and delayed response in traditional simple testing devices because the main control module can parse test commands carrying input simulation parameters and generate precise control signals based on these parameters. By connecting to the input simulation module through general-purpose input / output ports or digital-to-analog converter ports, high-precision output of analog, digital, and frequency signals is achieved, meeting the simulation requirements of multiple types of input excitations for the zone controller (ZCU). The output measurement module collects and transmits test response data, and combined with the automated scripts in the host computer interaction module for real-time data processing and judgment, significantly improving the automation level and consistency of the testing process. Through a low-cost main control chip and standardized interface design, the system avoids dependence on expensive commercial HIL platforms while ensuring high performance. Overall, the system achieves synergistic optimization of high integration, low cost, and high automation, significantly improving the efficiency and reliability of hardware-in-the-loop testing for zone controllers. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the specific embodiments of this application or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0016] Figure 1 A structural diagram of a hardware-in-the-loop test system for a region controller provided in an embodiment of this application; Figure 2 A block diagram of the overall structure of a ZCU HIL testing device provided in this application embodiment; Figure 3 A minimum system architecture diagram of STM32H750VBT6 provided for embodiments of this application; Figure 4 This is a structural diagram of a hardware-in-the-loop testing method for a region controller provided in an embodiment of this application. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0018] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0019] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0020] This application provides a hardware-in-the-loop testing system for a region controller. See [link to relevant documentation]. Figure 1 As shown, it includes a main control module, which communicates bidirectionally with the controller of the area under test and the host computer interaction module through a communication interface module, and is connected to the input simulation module and the output measurement module through a general input / output port or a digital-to-analog converter port.

[0021] The main control module is implemented using a microcontroller with high-performance computing capabilities and abundant peripheral resources. In this embodiment, the main control module is built based on the STM32H750VBT6 microcontroller, which features a high clock frequency (480MHz), a hardware floating-point unit, and multi-channel ADC, DAC, CANFD, and GPIO interfaces, meeting the requirements for real-time performance and multi-channel signal processing. As the system's control center, the main control module is responsible for functions such as instruction parsing, signal generation, data acquisition, and communication scheduling.

[0022] The host computer interaction module is used to send test commands to the main control module, which carry input simulation parameters. The host computer interaction module is built on Vector's CANoe software platform and utilizes its graphical interface (CANoe Panel) for human-machine interaction. Testers can configure the status or values ​​of various input signals on the Panel interface, such as setting analog voltage values, switching digital switch states, and selecting PWM frequencies. These configuration parameters are encapsulated into CAN messages of a specific format and sent to the main control module via the CAN bus. Therefore, the input simulation parameters carried in the test commands are the control data used to define the type and characteristics of the excitation signals.

[0023] The main control module parses test commands, generates corresponding control signals based on the input simulation parameters, and sends these control signals to the input simulation module. After receiving the test command from the host computer, the firmware program running on the MCU parses the received message and extracts the input simulation parameters. Subsequently, the main control module calls the corresponding peripheral resources to generate control signals based on the parameter type: for analog signal requirements, it starts the internal DAC and outputs the corresponding voltage reference; for digital signal requirements, it controls the specified GPIO pin to be set to high or low level; for frequency signals, it generates a PWM waveform with a set frequency and duty cycle through the timer module. These control signals are transmitted to the input simulation module via the electrical interface.

[0024] The input simulation module generates analog, digital, or frequency signals as external excitation signals for the zone controller under test (ZCU) based on the control signals, and outputs these external excitation signals to the ZCU. The input simulation module receives control signals from the main control module and converts them into physical signals that conform to the vehicle's electrical characteristics. Analog signals are output through a buffer amplifier circuit to drive the ZCU's analog input ports; digital signals are level-adapted to simulate switch inputs; and frequency signals are directly output to relevant ZCU pins to simulate sensor pulse behavior. These signals together constitute the external excitation for the ZCU, simulating the real input environment from sensors, switches, and other devices during vehicle operation.

[0025] The output measurement module is used to acquire test response data output by the zone controller under test (ZCU) and transmit the test response data to the main control module. The output measurement module is connected to the output port of the ZCU to acquire its response behavior after receiving external stimuli. For analog signals output by the ZCU (such as actuator feedback voltage), the data is periodically sampled and digitized via the ADC channel; for digital signals (such as light and relay status), the level changes are read via GPIO pins. The acquired data is packaged and sent to the main control module for further processing and uploading.

[0026] The main control module is also used to upload test response data to the host computer interaction module via the communication interface module. The main control module encapsulates the received test response data into CANFD messages according to a preset protocol and sends them to the host computer interaction module via the communication interface module. The communication interface module uses a standard CAN transceiver chip to achieve physical layer conversion, ensuring reliable data transmission in complex electromagnetic environments.

[0027] The host computer interaction module is also used to receive and display test response data, execute test procedures through automated scripts, and determine test results. After receiving the test response data, the host computer interaction module displays the signal status in real time on the CANoe Panel interface using numerical boxes, waveform graphs, and indicator lights, enabling visual monitoring of the test process. Simultaneously, the automated test scripts, written in the CAPL language, can automatically load test cases, execute multi-step test procedures, compare actual responses with expected results, and automatically determine whether the test passes or fails based on preset rules. Abnormal items are marked in red and logged. This achieves flexible switching from manual debugging to fully automated verification, improving testing efficiency and consistency.

[0028] In summary, the hardware-in-the-loop testing system for zone controllers provided in this embodiment achieves accurate simulation of external excitation signals and comprehensive acquisition of ZCU response behavior through the coordination of various functional units by the main control module. The system relies on mature embedded hardware and industry-standard software platforms, balancing testing flexibility, visibility, and automation capabilities, and is suitable for R&D verification and batch testing scenarios of vehicle-mounted zone controllers.

[0029] The following provides a detailed description of the area controller hardware-in-the-loop test system provided in the embodiments of this application.

[0030] In one embodiment, the main control module includes a microcontroller that integrates a central processing unit, a storage unit, and multiple peripheral interfaces. It is equipped with a clock circuit, a reset circuit, and a power management circuit, and is connected to an external programming device through a debugging interface for running control programs and coordinating data interaction among various functional modules.

[0031] During HIL testing of the zone controller, the ZCU under test needs to receive multiple types of input signals and output control commands. Therefore, the test system must be able to simultaneously process analog, digital, frequency, and communication messages. In this embodiment, the main control module serves as the command center of the entire test system, responsible for tasks such as stimulus generation, response acquisition, timing scheduling, and coordination between the upper and lower computer communication. The structure of the main control module is designed to meet the comprehensive requirements of HIL testing for real-time performance, stability, and scalability: the central processing unit is responsible for executing control logic, updating the input simulation state periodically, and synchronously reading the ZCU output; the storage unit is used to cache test process configurations and temporary data; rich I / O interfaces support parallel processing of multi-channel signals and are compatible with the interface layout of different ZCU models. The clock circuit ensures the time accuracy of timing tasks, ensuring that signal changes are aligned with the acquisition time; the reset and power management mechanisms improve the reliability of the system during long-term automatic testing and prevent test interruptions due to abnormalities. The debugging interface facilitates rapid program burning and variable status monitoring during the development phase, shortening the debugging cycle. Therefore, the main control module used in this embodiment is not a simple general-purpose microcontroller, but a functional integration platform customized for the vehicle area controller testing scenario, which effectively supports the full process coverage from manual verification to fully automatic batch testing.

[0032] The aforementioned input simulation module includes voltage and current settings for generating analog signals, level settings for generating digital signals, and waveform parameter settings for generating frequency signals, as well as providing digital switch status, sensor analog voltage, or frequency-type excitation signals to the controller of the area under test.

[0033] In the actual operating environment of the zone controller, the ZCU receives continuous signals from various sensors such as temperature, pressure, and vehicle speed, as well as switch inputs such as door locks and brake pedals. To accurately reproduce these input conditions, this embodiment constructs an input simulation module through parameterized configuration, enabling it to flexibly simulate various excitation sources in a real vehicle environment. For example, by setting a voltage value to simulate the output of a thermistor that changes with the environment, the ZCU can be verified to correctly identify over-temperature alarms; by setting a level state to simulate the action of a window lift switch, the anti-pinch control logic can be tested; by adjusting the frequency and duty cycle of the PWM waveform to simulate wheel speed sensor signals, the signal recognition capability of the ZCU under dynamic operating conditions can be verified. This parameter-driven simulation mechanism allows the same hardware to be adapted to various test cases through software configuration without changing physical wiring, significantly improving testing efficiency and repeatability, and solving the problems of complex wiring and difficult switching in traditional bench testing.

[0034] The aforementioned output measurement module includes a voltage divider and current limiting circuit connected to the analog output port of the area under test controller. The output of the voltage divider and current limiting circuit is connected to the analog-to-digital conversion port of the main control module, and a filter capacitor is connected in parallel to suppress high-frequency interference. The output measurement module also includes a level conditioning circuit for receiving the digital output signal of the area under test controller. The output of the level conditioning circuit is connected to the general-purpose input / output port of the main control module.

[0035] Upon receiving external stimuli, the area controller drives actuators such as lights, relays, and motors, and reports the corresponding status information. The output measurement module accurately captures and quantifies these responses. The voltage divider and current limiting circuit not only converts high-voltage signals to a safe acquisition range but, more importantly, provides electrical isolation protection to prevent damage to the test system from ZCU output abnormalities (such as short circuits or reverse connections). Parallel filter capacitors effectively suppress electromagnetic interference common in the automotive environment, improving the accuracy of analog signal sampling. The level conditioning circuit performs a compatible conversion from 12V / 5V automotive-grade logic levels to a 3.3V system, ensuring that the digital output status can be reliably identified by the main control module. Through comprehensive monitoring of the ZCU output, the system can completely record its action sequence for determining whether the functional logic meets expectations, especially suitable for closed-loop verification of functional modules such as power management, load driving, and fault diagnosis.

[0036] The aforementioned communication interface module includes a controller local area network (CLAN) function unit built into the main control module and an external bus transceiver. One end of the external bus transceiver is connected to the communication pin of the main control module, and the other end is connected to the communication bus port of the controller under test for bidirectional data transmission.

[0037] Because the area controller not only relies on local I / O for control but also needs to interact with other ECUs (such as the central computing unit and cockpit domain controller) via the CAN / CANFD bus, the communication interface module in this embodiment acts as a host node, issuing control commands (such as mode switching and remote wake-up) to the ZCU. It can also receive status messages actively reported by the ZCU (such as heartbeat signals, DTC diagnostic codes, and I / O broadcast messages). This bidirectional communication link allows for the verification of the ZCU's communication protocol compliance (such as baud rate matching and message format correctness) and testing its fault tolerance under network anomalies (such as frame loss retransmission and error frame handling). Furthermore, key events during the test can be reported to the host computer via the CAN bus, forming a complete test log and enhancing the traceability of results.

[0038] The aforementioned host computer interaction module is a computer software system that includes a graphical user interface. It uses controls to configure input parameters and visualize the collected data. The controls include switches or indicator lights for representing binary states, a dashboard for displaying continuous values, a drop-down list for selecting preset options, and a text box for inputting or displaying text information.

[0039] During the research and testing of zone controllers, engineers frequently need to adjust input conditions and observe output responses. Traditional methods relying on multimeters and oscilloscopes are inefficient and difficult to record the entire process. This embodiment transforms complex signal interactions into intuitive operational elements through a graphical interface, significantly lowering the testing threshold. For example, a switch control can trigger door opening and closing events with a single click, eliminating the need for manual physical buttons; indicator lights can reflect in real time whether the ZCU is illuminating high beams or activating fault alarms; the dashboard dynamically displays the collected battery voltage curve to determine the stability of the power management logic; and drop-down lists allow for quick switching between different vehicle configurations, adapting to the testing needs of ZCUs on multiple platforms. This structural setup enables testers without embedded systems backgrounds to efficiently participate in functional verification, improving cross-departmental collaboration efficiency. It is particularly suitable for early-stage functional probing and troubleshooting, achieving integrated operation of test configuration and result feedback, reducing testers' dependence on underlying communication protocols and hardware interfaces, and improving the availability and deployment efficiency of the test system.

[0040] In addition, the host computer interaction module controls the test process through automated test scripts, which are used to define test sequences, read collected data, execute logical judgments, trigger fault injection instructions, and generate test reports.

[0041] For highly integrated zone controllers, manual testing of single functional points is no longer sufficient to meet the high-coverage verification requirements before mass production. This embodiment achieves standardized and batch execution of the testing process through automated test scripts. The scripts can preset complete test sequences, such as sequentially simulating all door opening and closing combinations to verify the ZCU's anti-pinch logic and alarm mechanism; they can also periodically inject fault scenarios such as open circuits, short circuits, and signal drift to test its diagnostic accuracy and timeliness. The results of each test are automatically compared with the expected rules and a structured report is generated, including the pass rate, details of failures, and waveform screenshots, facilitating quality traceability and rectification closure. This significantly improves the consistency and repeatability of testing, solves the problems of easy omissions and difficulty in archiving in traditional manual testing, and helps to realize the engineering transformation of ZCU from R&D verification to batch and standardized testing.

[0042] Furthermore, the aforementioned main control module is configured with a periodic interrupt task, which is used to periodically update the output status of the input simulation module and synchronously collect data from the output measurement module so as to interact with the controller of the area under test in real time.

[0043] Many control logics of the area controller have strict timing requirements, such as gradual light illumination, soft start of motors, or delayed fault reporting. If the excitation update and data acquisition of the test system are not synchronized, it may lead to misjudgment or missed detection. To address this, this embodiment sets up a periodic interrupt task to uniformly schedule signal generation and response acquisition operations at fixed time intervals (e.g., 1ms or 10ms), ensuring a consistent time base throughout the testing process. For example, when testing the ZCU's response to the accelerator pedal signal, the input simulation module gradually increases the analog voltage in 10ms increments, while the output measurement module synchronously acquires the action time of the throttle relay, thereby accurately calculating the response delay. This mechanism achieves synchronized control of excitation signal updates and response data acquisition through periodic interrupts, ensuring that input changes and output detection are performed under a unified time base, thus supporting accurate measurement of the ZCU's dynamic response characteristics and improving the accuracy and repeatability of test results.

[0044] In addition, the aforementioned main control module communicates with the host computer interaction module via a communication interface module through a preset data frame format; the data frame format includes instruction identifier, channel number, numerical type and payload, realizing the parsing of test instructions and the structured back transmission of collected data.

[0045] To ensure accurate and efficient information transmission between the host and supervisory computers during HIL testing, the system employs a standardized data frame format for communication. This format clearly defines the purpose and meaning of each data frame, enabling the host computer's test commands to be unambiguously parsed by the main control module, such as "set 2.5V input for the 3rd ADC channel" or "read the status of the 7th GPIO." Similarly, the acquired data uploaded by the main control module is organized according to the same structure, facilitating the host computer's automatic identification of the source channel and signal type, and enabling unified management and trend analysis of multi-channel data. This structured communication mechanism not only improves the system's robustness but also provides a good compatibility foundation for subsequent expansion of more test items (such as adding a PWM input channel or temperature compensation function). This structured communication mechanism supports standardized parsing of test commands and orderly feedback of response data, which is beneficial for reusing the communication protocol framework between different test tasks and provides a compatible interface for adding new test channels or functional modules in the future.

[0046] Figure 2 A block diagram of the overall structure of a HIL test system for a region controller is shown. The core chip of the minimum system module is the STM32H750VBT6, which is responsible for signal processing, logic judgment, and communication. See also Figure 3As shown, the clock circuit uses a 25MHz external crystal oscillator (YXCX322525MOB4SI, multiplied to 480MHz by a PLL) as the main clock source, and a 32.768kHz RTC crystal oscillator (X321532768KGD2SI) provides a real-time clock reference to ensure the accuracy of timers and communication timing. The reset circuit uses a voltage monitoring chip TPS3828-33DBVR with an integrated watchdog timer for power supply voltage monitoring and software operation monitoring. A reset is triggered when VDD falls below the threshold or when the watchdog timer overflows. A manual reset button is designed and connected to the NRST pin via a pull-up resistor to support fast restart in case of system abnormalities. Power management uses an input 12V power supply, which is converted to 3.3V (powering the STM32 and peripherals) by an LDO (TLE42754D) regulator. A 10μF electrolytic capacitor (to filter low-frequency ripple) and a 0.1μF ceramic capacitor (to filter high-frequency noise) are connected in parallel at the power input to ensure power supply stability. The debug interface connects to the ST-Link debugger via SWD headers, which lead out to SWDIO, SWCLK, GND, and VCC, supporting single-step debugging, real-time variable monitoring, and program burning. Reserved GPIO expansion headers (to bring out unused GPIO pins), ADC input, DAC output headers (for connecting analog signal circuits), and a CAN transceiver interface (for connecting to the TJA1050T chip) facilitate future functional expansion.

[0047] The analog input simulation module uses the STM32H750VBT6's built-in DAC (12-bit, outputting 0-3.3V via an internal reference voltage) to generate analog voltage signals. After isolation by a voltage follower (using a TLV2372 operational amplifier to build the analog circuit), high-frequency noise is filtered out by a 100nF filter capacitor before finally outputting to the ZCU's analog correlation input interface. The digital input simulation module uses the STM32H750VBT6's GPIO driver half-bridge chip (SiLM94112-AQ) as the output unit (each channel can be configured with high or low output), ultimately outputting to the ZCU's digital correlation input interface.

[0048] The analog signal output by the ZCU (Zero-Cooler Unit) is connected to the ADC pin of the STM32H750VBT6 via a 1kΩ protection resistor after being divided by a suitable voltage divider. A 0.1μF filter capacitor is connected in parallel to suppress high-frequency interference. The digital signal output by the ZCU is processed by the analog circuit and then connected to the GPIO pin of the STM32H750VBT6. The software determines the digital signal status by reading the pin level.

[0049] The CAN communication module uses a TJA1050T CAN transceiver to connect to the corresponding pins of the STM32H750VBT6's built-in CAN controller, enabling CAN bus communication with the ZCU. Simulated or acquired ZCU data and CAN messages are transmitted to the CANoe host computer via the CAN bus.

[0050] This application also provides a hardware-in-the-loop testing method for a region controller, applicable to any of the aforementioned embodiments of the region controller hardware-in-the-loop testing system. (See also...) Figure 4 As shown, the method includes the following steps: S410 sends test commands to the main control module through the host computer interaction module, and the test commands carry input simulation parameters.

[0051] In this embodiment, the tester can configure various input signal types and values ​​required by the ZCU under test through a graphical user interface. For example, on the Panel interface, the input voltage value of a certain analog sensor can be set to 2.5V, or a certain digital switch quantity can be set to a high level (representing that the door is closed). These configuration information are also the input simulation parameters.

[0052] After the user completes the parameter settings, the CANoe software encapsulates these input simulation parameters into a standard CANFD message format and sends it to the communication interface module in the test system via the PC's CAN card (such as VN1640A). This message serves as a test command, transmitted to the main control module via the CAN bus, and initiates a complete test process.

[0053] S420: The main control module parses the test instructions, generates corresponding control signals based on the input simulation parameters, and sends the control signals to the input simulation module.

[0054] Upon receiving the test command from the host computer, the main control module receives and parses the CANFD message content, extracting the input simulation parameters carried within. The parsing process is completed by an embedded program running on the MCU. This program, developed based on the HAL library, has protocol decoding capabilities and can accurately identify the set values ​​of different channels and signal types.

[0055] Subsequently, the main control module generates the corresponding underlying control signals based on the parsing results. For example: If the input simulation parameters indicate that a 3.0V analog voltage needs to be output, the main control module calculates the digital quantity that should be written to the corresponding DAC register (based on 12-bit resolution and a reference voltage of 3.3V). If a parameter is set to "high" for a certain digital value, the main control module sets the corresponding GPIO pin to high-level output mode; If the signal is a PWM frequency signal (e.g., 60% duty cycle, 1kHz frequency), the main control module configures a timer channel to generate the specified waveform.

[0056] S430, the input simulation module generates analog signals, digital signals or frequency signals based on the control signals as external excitation signals for the area controller under test, and outputs the external excitation signals to the area controller under test.

[0057] The input simulation module generates three typical vehicle-mounted signals based on the control signals issued by the main control module, which are then applied as external excitation signals to the ZCU under test: 1. Analog signal generation: The STM32H750VBT6 uses its built-in 12-bit DAC module to output a preset voltage value (0~3.3V). This analog signal is isolated and buffered by a voltage follower (built with a TLV2372 op-amp) and then connected to an RC low-pass filter circuit (composed of a 1kΩ resistor and a 100nF capacitor) to effectively suppress high-frequency noise. Finally, it is stably output to the corresponding analog input interface of the ZCU (such as the temperature sensor input terminal) to simulate various resistive or voltage sensor signals.

[0058] 2. Digital signal generation: The control module controls the GPIO pins to output high and low levels, driving the external half-bridge driver chip SiLM94112-AQ to achieve a digital signal output with strong driving capability. It is used to simulate the state of a switch being grounded or connected to a power supply, realistically reproducing digital input scenarios such as buttons and limit switches in a vehicle, and is directly connected to the digital input pins of the ZCU.

[0059] 3. Frequency signal generation (e.g., PWM): The STM32H750VBT6 uses an advanced timer module to generate a PWM signal with precise duty cycle and frequency (such as for simulating motor speed feedback signals), which is then adapted to the signal level range required by the ZCU by a level conversion circuit before being output.

[0060] All generated external excitation signals are connected to the physical interface of the ZCU under test via standardized terminal blocks to complete the closed-loop simulation of the ZCU input. This process can comprehensively cover all the input conditions required for the normal operation of the ZCU without the participation of actual vehicle sensors.

[0061] S440, the output measurement module acquires the test response data output by the controller of the area under test and transmits the test response data to the main control module.

[0062] After receiving an external excitation signal, the ZCU executes corresponding control actions according to its internal logic and generates a response signal at its output. The output measurement module is responsible for acquiring and digitizing this type of response signal. For analog signals output by the ZCU (such as 0~10V dimming signals to drive light brightness or current-type actuator drive signals), they are first conditioned to the acceptable range of 0~3.3V for the STM32H750VBT6 ADC through a voltage divider circuit or I / V conversion circuit. Then, after filtering by a 1kΩ protection resistor and a 0.1μF ceramic capacitor, they are connected to the ADC input pin. The main control module starts ADC conversion with a fixed sampling period (e.g., 1ms) to obtain the actual voltage / current values.

[0063] For digital signals output by the ZCU (such as relay engagement status and fault light illumination signals), directly connect them to the GPIO input pins of the STM32H750VBT6. Determine if the ZCU is responding correctly by reading the pin level (high / low). Pull-up / pull-down resistors can be used to ensure signal stability if necessary.

[0064] The collected test response data is packaged into structured data frames (containing fields such as channel number, signal type, and timestamp) and uploaded to the data processing unit of the main control module via the internal data bus, ready to be further forwarded to the host computer.

[0065] In the S450, the main control module uploads the test response data to the host computer interaction module through the communication interface module.

[0066] The main control module encapsulates the test response data from the output measurement module into CANFD message format according to a predetermined communication protocol, and sends it to the TJA1050TCAN transceiver via the CAN controller, and then transmits it to the VectorCANoe software on the PC via the CAN bus. Each message contains data from multiple signal channels, and data classification and priority management are achieved through ID assignment. For example, critical safety signals use high-priority CAN IDs to ensure their real-time performance.

[0067] The S460 host computer interaction module receives and displays test response data, executes the test process and judges the test results through preset automated scripts.

[0068] After receiving the test response data, the Panel module of Vector CANoe dynamically updates the various display controls on the interface. These controls can include real-time display of analog quantities in the form of a dashboard or numerical box, digital quantities presented as indicator lights (green for ON, red for OFF), and waveform signals continuously plotted using trend graph controls.

[0069] Furthermore, testers can write CAPL (Communication Access Programming Language) scripts in the CANoe environment to automate the testing process. Simultaneously, fault injection testing can be performed, whereby the input simulation module is instructed by the host computer to actively create abnormal conditions such as short circuits (signal pull-high / pull-low) and open circuits (floating), and the ZCU can be observed to correctly report diagnostic codes (DTCs), thereby verifying its fault tolerance and diagnostic capabilities.

[0070] In summary, the hardware-in-the-loop (HIL) testing method for area controllers provided in this application achieves closed-loop control throughout the entire process, from test command issuance, excitation signal generation, response acquisition, data feedback to result visualization and automatic judgment. This not only reduces the high costs associated with traditional commercial HIL platforms but also offers excellent flexibility, scalability, and engineering practicality, making it suitable for rapid iterative testing and pre-mass production functional verification during the R&D phase of intelligent vehicles.

[0071] The hardware-in-the-loop testing method for the area controller provided in this application has the same implementation principle and technical effects as the aforementioned system embodiments. For the sake of brevity, any parts not mentioned in the embodiments of the area controller hardware-in-the-loop testing method can be referred to the corresponding content in the aforementioned embodiments of the area controller hardware-in-the-loop testing method.

[0072] In the description of this application, it should be noted that the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0073] In the description of this application, it should also be noted that, unless otherwise expressly specified and limited, the terms "set up," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.

[0074] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A hardware-in-the-loop testing system for a region controller, characterized in that, It includes a main control module, which communicates bidirectionally with the controller of the area under test and the host computer interaction module through a communication interface module, and is connected to the input simulation module and the output measurement module through a general input / output port or a digital-to-analog converter port; The host computer interaction module is used to send test commands to the main control module, wherein the test commands carry input simulation parameters; The main control module is used to parse the test command, generate corresponding control signals according to the input simulation parameters, and send the control signals to the input simulation module; The input simulation module is used to generate analog signals, digital signals or frequency signals based on the control signals as external excitation signals to the controller under test, and outputs the external excitation signals to the controller under test. The output measurement module is used to collect the test response data output by the controller of the area under test, and transmit the test response data to the main control module; The main control module is also used to upload the test response data to the host computer interaction module through the communication interface module; The host computer interaction module is also used to receive and display the test response data, execute the test process through automated scripts, and determine the test results.

2. The area controller hardware-in-the-loop test system according to claim 1, characterized in that, The main control module includes a microcontroller that integrates a central processing unit, a storage unit, and multiple peripheral interfaces. It is equipped with a clock circuit, a reset circuit, and a power management circuit. It is connected to an external programming device through a debugging interface to run the control program and coordinate the data interaction between various functional modules.

3. The area controller hardware-in-the-loop test system according to claim 1, characterized in that, The input simulation module includes voltage setting values ​​and current setting values ​​for generating analog signals, level state setting values ​​for generating digital signals, and waveform parameter setting values ​​for generating frequency signals. The input simulation module is used to provide the controller of the area under test with digital switch status, sensor analog voltage or frequency excitation signals.

4. The area controller hardware-in-the-loop test system according to claim 1, characterized in that, The output measurement module includes a voltage divider and current limiting circuit connected to the analog output port of the controller of the area under test. The output terminal of the voltage divider and current limiting circuit is connected to the analog-to-digital conversion port of the main control module and a filter capacitor is connected in parallel to suppress high-frequency interference. The output measurement module also includes a level conditioning circuit for receiving the digital output signal of the area controller under test, and the output terminal of the level conditioning circuit is connected to the general-purpose input / output port of the main control module.

5. The area controller hardware-in-the-loop test system according to claim 1, characterized in that, The communication interface module includes a controller local area network (CLAN) function unit built into the main control module and an external bus transceiver. One end of the external bus transceiver is connected to the communication pin of the main control module, and the other end is connected to the communication bus port of the controller under test for bidirectional data transmission.

6. The area controller hardware-in-the-loop test system according to claim 1, characterized in that, The host computer interaction module is a computer software system that includes a graphical user interface, which uses controls to configure input parameters and visualize the collected data. The controls include switches or indicator lights for representing binary states, a dashboard for displaying continuous values, a drop-down list for selecting preset options, and a text box for inputting or displaying text information.

7. The area controller hardware-in-the-loop test system according to claim 1, characterized in that, The host computer interaction module controls the test process through automated test scripts, which are used to define test sequences, read collected data, execute logical judgments, trigger fault injection instructions, and generate test reports.

8. The area controller hardware-in-the-loop test system according to claim 1, characterized in that, The main control module is configured with a periodic interrupt task, which is used to periodically update the output status of the input simulation module and synchronously collect data from the output measurement module so as to interact with the controller of the area under test in real time.

9. The area controller hardware-in-the-loop test system according to claim 1, characterized in that, The main control module communicates with the host computer interaction module via a communication interface module using a preset data frame format; The data frame format includes an instruction identifier, channel number, numerical type, and payload, enabling the parsing of test instructions and the structured return of collected data.

10. A hardware-in-the-loop testing method for a region controller, characterized in that, The system is applied to the area controller hardware-in-the-loop test system as described in any one of claims 1 to 9, comprising: Test commands are sent to the main control module through the host computer interaction module, wherein the test commands carry input simulation parameters; The main control module parses the test command, generates corresponding control signals based on the input simulation parameters, and sends the control signals to the input simulation module; The input simulation module generates analog signals, digital signals, or frequency signals based on the control signals as external excitation signals to the controller of the area under test, and outputs the external excitation signals to the controller of the area under test. The output measurement module collects the test response data output by the controller of the area under test and transmits the test response data to the main control module; The main control module uploads the test response data to the host computer interaction module through the communication interface module; The host computer interaction module receives and displays the test response data, and executes the test process and determines the test results through a preset automated script.