A modular HCU software model development method for range extender bench joint debugging

By developing a modular HCU software model, the problems of low automation, high risk of physical debugging, and weak robustness in the bench testing of range extenders were solved, and efficient and safe bench testing and durability testing of range extenders were achieved.

CN122331869APending Publication Date: 2026-07-03HARBIN DONGAN AUTO ENGINE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HARBIN DONGAN AUTO ENGINE CO LTD
Filing Date
2026-03-24
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

The development of HCU software models in existing range extender bench testing suffers from low automation, high physical debugging risks, low modularity, and weak robustness, resulting in low efficiency, high cost, and poor safety.

Method used

A modular HCU software model development method is adopted. Based on the VCU hardware platform and Matlab/Simulink environment, input modules, output modules and control modules are constructed, and full module integration and simulation verification are carried out. A two-layer verification system is established and a safety fault tolerance mechanism is added.

Benefits of technology

It improves the automation level of range extender bench testing, reduces the risk of physical debugging, enhances model reusability and system robustness, and ensures safety and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122331869A_ABST
    Figure CN122331869A_ABST
Patent Text Reader

Abstract

This invention discloses a modular HCU software model development method for range extender bench testing, belonging to the field of new energy vehicle range extender electronic control system software development technology. It addresses the core technical problems existing in current range extender bench testing methods. The method includes the following steps: Step 1: Building a development environment based on the VCU hardware platform and supporting code generation toolchain; Step 2: Developing a modular architecture for the HCU software model; Step 3: Constructing a complete HCU software model and performing full-module testing; Step 4: Building a simulation verification platform and conducting simulation verification tests; Step 5: Final integration of the HCU software model based on the simulation verification tests; Step 6: Completing software code preparation and hardware connection, and conducting low-voltage bench testing; Step 7: Formal deployment of the HCU software model to the range extender bench, conducting full-process bench testing and durability tests. This invention improves the automation level of range extender bench testing while enhancing the safety, reliability, and reusability of the development process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of software development technology for electric control systems of range extenders in new energy vehicles, and particularly relates to a modular HCU software model development method for bench testing of range extenders. Background Technology

[0002] The range extender is the core power component of the power system in range-extended electric vehicles. Its power output characteristics and operational reliability directly determine the vehicle's range, power performance, and driving experience. During the range extender's R&D phase, bench testing and durability testing are crucial for verifying the effectiveness of its control strategy, functional integrity, and long-term operational reliability. The hybrid power control unit (HCU), as the core control unit of the range extender system, undertakes the core task of coordinating the collaborative work of key components such as the engine controller (ECU) and generator controller (GCU). The development efficiency of its software model, the correctness of its control logic, and its operational stability directly affect the efficiency of the range extender bench tests, the accuracy of the test data, and even the operational safety of the testing equipment and personnel.

[0003] Currently, there are still many prominent technical defects and shortcomings in the development and application of HCU software models during the bench testing and commissioning of range extenders in the industry. Specifically, these are as follows:

[0004] 1. The control operation is highly dependent on manual labor, with low automation, resulting in poor testing efficiency and safety. During bench testing, operators need to use external calibration tools such as INCA to manually modify core control variables such as start / stop commands, target speed, and requested power to simulate the control commands of the vehicle controller. This method is not only labor-intensive and has a significant delay in command response, making it difficult to meet the real-time control requirements of bench testing, but it is also highly susceptible to human error that can lead to abnormal operation of the range extender. This can result in distorted test data and interruptions in the test process, or even malfunctions of core bench equipment such as the engine and generator, and may even lead to safety accidents.

[0005] 2. Lack of systematic preliminary virtual verification leads to high risks, long cycles, and high costs in physical bench testing. Traditional HCU software model development processes lack a comprehensive integrated simulation verification system, often directly deploying insufficiently verified control logic to the hardware controller for bench testing. Issues such as control logic defects, CAN bus interface protocol incompatibility, and abnormal signal interaction can only be exposed during the physical integration testing phase. This not only requires significant investment of manpower and resources for troubleshooting and code modification, greatly increasing debugging and trial-and-error costs and extending the overall development cycle, but also risks irreversible physical damage to expensive bench testing equipment due to control logic errors causing uncontrolled start-stop of the range extender and sudden changes in speed and torque.

[0006] 3. The software model architecture is loose, with low modularity, and severely insufficient reusability and maintainability. Existing development methods often result in HCU control code or scripts that are temporarily written for specific range extender projects or bench tests. Core functional modules such as input, output, and control are tightly coupled, lacking standardized and modular architectural design. This makes it difficult for the developed software model to quickly adapt to the bench test requirements of different hardware platforms and range extender models, resulting in extremely low code reusability. Furthermore, subsequent functional iterations, logic optimizations, and fault maintenance for testing requirements necessitate modifications to the entire codebase, leading to high operational difficulty and maintenance costs, failing to meet the industry's demand for rapid range extender development.

[0007] 4. The system has weak robustness and lacks safety fault tolerance. The existing range extender joint commissioning and control method relies entirely on the accurate input of operators and lacks an automatic identification and safety handling mechanism for human error and abnormal operating conditions. When the calibration personnel make an operational error, the shutdown command cannot be effectively triggered, which can easily lead to abnormal operation of the range extender. The safety and stability of the system operation have obvious shortcomings.

[0008] In summary, the industry urgently needs an innovative HCU software model development method based on a general-purpose hardware platform and adapted to multiple test scenarios. This method needs to realize the transformation of bench testing from manual control to automated command execution, support the systematic simulation verification of the HCU control model in a virtual environment in the early stage of development, and have a standardized modular architecture to improve the reusability and development efficiency of the model. At the same time, it should add a safety fault-tolerance mechanism, thereby fundamentally improving the automation level, test safety and overall development quality of range extender joint debugging tests, and meeting the industry's needs for rapid R&D of new energy vehicle range extenders. Summary of the Invention

[0009] The purpose of this invention is to provide a modular HCU software model development method for bench testing of range extenders, applicable to the development scenario of electronic control system for bench testing and reliability testing of range extenders in new energy vehicles.

[0010] To achieve the above objectives, the technical solution adopted by the present invention is as follows: a modular HCU software model development method for bench testing of range extenders, the development method comprising the following steps:

[0011] Step 1: Set up the development environment based on the VCU hardware platform and its supporting code generation toolchain;

[0012] Step 2: Overall modular architecture of the HCU software model;

[0013] Step 3: Construct a complete HCU software model and perform full module integration testing;

[0014] Step 4: Build a simulation verification platform and conduct simulation verification experiments;

[0015] Step 5: Based on the simulation verification experiment, finally integrate the HCU software model;

[0016] Step Six: Complete software code preparation and hardware connection, and conduct bench low-voltage verification test;

[0017] Step 7: Deploy the HCU software model to the range extender test bench and conduct full-process bench integration and durability testing.

[0018] Furthermore, step one involves: using Matlab / Simulink as the software development environment to complete the functional configuration for model design and simulation verification; and using the DBC documentation of the engine and generator for the hardware communication layer to complete the CAN bus communication protocol adaptation.

[0019] Furthermore, step two involves the following: the model includes an input module, an output module, and a control module; the input module, output module, and control module interact with each other through a standardized interface.

[0020] Input module: Receives CAN bus messages and outputs the data required by the model to the control module;

[0021] Output module: Sends control signals to the CAN bus;

[0022] Control module: Serves as the core execution unit of the model.

[0023] Furthermore, the control module mentioned in step two includes

[0024] GCU Mode Control Submodule: Controls the GCU modes, including speed mode, torque mode, shut-off mode, and preparation mode. The output module sends the specific control mode signal of GCU to the CAN bus to start the motor. During the range extender shutdown phase, after pressing the one-button stop, it checks if the GCU torque is >0 Nm and if the GCU speed is <500 rpm. If both conditions are met, the GCU mode is switched to shut-off mode to achieve a smooth motor shutdown.

[0025] GCU speed control submodule: After the start-up trigger signal, it outputs a calibrated drag speed of 1000rpm to complete engine drag; after the engine ignition is successful, the range extender power calculation module calculates the target speed according to the requested power and outputs the target speed to achieve precise speed control of the generator at different operating stages;

[0026] Engine start command submodule: It is defined that the signal flag position "0" means the signal is invalid and "1" means the signal is valid. During the engine start phase, the three signals of stop request, start request and fuel injection suppression request are set to "0", "1" and "0" respectively. During the engine stop phase, the three signal flags are set to "1", "0" and "1" respectively, so as to realize the standardized signal control of engine start and stop.

[0027] Range extender power calculation submodule: Calculates the speed at which the range extender should operate based on the requested power using an interpolation algorithm, and further calculates the torque required by the range extender based on the requested power, adapting to the power matching requirements of different test scenarios;

[0028] Slope control submodule: controls the rise / fall slope of the requested GCU speed and requested ECU torque to achieve smooth adjustment of speed and torque;

[0029] Range extender shutdown judgment submodule: An additional judgment module has been added to the original shutdown command. Any number input ≥1 will be converted into a normal shutdown command.

[0030] Furthermore, step three involves: integrating the input module, output module, and control module through standardized data interfaces to construct a complete HCU software model; performing full-module integration testing in the Matlab / Simulink environment to check whether the data interaction between the input module, output module, and control module is smooth, whether the control logic is coordinated, and whether the signal input and output are accurate; and for any module interface incompatibility, logic conflict, or signal transmission abnormality issues that occur during the integration testing process, feeding them back to the corresponding module development stage for modification and optimization until the model runs without faults.

[0031] Furthermore, step four involves: building a simulation verification platform in the Matlab / Simulink environment, setting up full-condition manual calibration simulation parameters, simulating the entire process of range extender startup, idling power generation, variable power operation, and shutdown, and verifying the correctness and effectiveness of the model's control logic by monitoring various signal waveforms, control command response speed, and speed-torque matching accuracy, ensuring that all functions of the model meet the requirements of bench testing.

[0032] Furthermore, step five is as follows: based on the final integrated HCU software model through simulation verification experiments, the VCU-supporting code generation toolchain is used to automatically generate hex program files that can be deployed to hardware and A2L files for calibration, ensuring that the generated code completely restores the model control logic and calibration settings; the integrity and validity of the generated files are checked.

[0033] Furthermore, step six involves connecting a 12V low-voltage power supply to the test system, simulating the actual operating conditions of the range extender, and sequentially verifying the control effects of the range extender's pre-start dragging, start-up mode switching, fixed-point power generation, variable operating condition response, shutdown, and shut-off mode switching, as well as testing the software and hardware compatibility, the accuracy of control command execution, and the stability of signal interaction.

[0034] Furthermore, step seven is as follows: if all the steps from step one to step six above have been verified and there are no functional defects or operational failures, the HCU software model can be formally deployed to the range extender test bench to carry out full-process test bench integration and durability testing, and complete the collection and analysis of test data.

[0035] Compared with the prior art, the beneficial effects of the present invention are:

[0036] 1. The software model development method of the present invention can improve the efficiency of joint debugging and ensure operational safety. By replacing the traditional manual operation mode with the automated output of control commands, it completely solves the drawbacks of manually modifying control variables one by one, greatly improves the efficiency of joint debugging of range extenders on the test bench, and avoids equipment abnormalities and safety accidents caused by human operation errors from the source.

[0037] 2. The software model development method of the present invention can reduce debugging risks, shorten the R&D cycle, and build a two-layer pre-verification system of "simulation verification + low-voltage verification". Before the model is deployed to the physical test bench, problems such as control logic defects and software and hardware compatibility anomalies are investigated and resolved in advance, which effectively reduces the risk of hardware damage during physical test bench debugging, reduces trial and error costs, and significantly shortens the R&D and commissioning cycle of the range extender.

[0038] 3. The software model development method of the present invention can improve model reusability, reduce operation and maintenance costs, and achieve complete decoupling of HCU software model through standardized modular architecture, which greatly improves the reusability of model across hardware platforms and R&D projects. At the same time, subsequent functional iteration, logic optimization and fault maintenance of model can be carried out independently for a single module without modifying the overall code, which significantly reduces the development and maintenance costs of model.

[0039] 4. The software model development method of the present invention can enhance the robustness of the system and ensure stable operation. It adds anti-misoperation and abnormal working condition handling mechanisms to the model, breaks through the limitations of accurate manual input, realizes automatic correction of misoperation commands and rapid response to abnormal working conditions, effectively enhances the robustness and safety fault tolerance of the control system, and comprehensively ensures the stable operation of the range extender bench joint debugging system.

[0040] 5. The software model development method of the present invention can adapt to multiple test scenarios, has industrial application value, and can be directly deployed in range extender bench joint debugging test and durability test without additional modification of the core control logic. It has strong adaptability, can be quickly implemented, and has good industrial application value and promotion prospects. Attached Figure Description

[0041] Figure 1 This is a schematic diagram of the development process for bench testing of range extenders;

[0042] Figure 2 This is a schematic diagram of the overall modular architecture of the HCU software model;

[0043] Figure 3 This is a logic control diagram of the generator mode control submodule;

[0044] Figure 4 This is a logic control diagram of the generator speed control submodule. Detailed Implementation

[0045] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the invention, not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention. Detailed Implementation

[0046] This invention is developed based on a general-purpose VCU hardware platform and a supporting code generation toolchain. It adopts an automatic model-code generation mode and a standardized modular architecture design, decoupling the HCU software model into three independent functional modules: an input module, an output module, and a control module. These modules interact efficiently and accurately through standardized data interfaces. The control module is further subdivided into several refined sub-modules, such as generator speed control, achieving the design goal of "overall decoupling and localized precise control." Simultaneously, this invention follows a standardized development process of "development environment setup → modular model development → model integration and debugging → simulation verification → code generation → low-voltage verification." Each stage is progressive and under closed-loop control. Before deploying the model to the physical test bench, design defects, logical errors, protocol incompatibility, and other issues are identified and resolved in advance, avoiding the high risks of direct physical debugging from the outset. Ultimately, this achieves automated, precise, and safe control for range extender test bench commissioning, meeting the requirements for range extender test bench commissioning and reliability testing.

[0047] Figure 1This diagram illustrates the development process for bench testing of the range extender. It is a standardized flowchart that demonstrates the entire development system of this invention, which includes "development environment setup → modular model development → model integration and debugging → simulation verification → code generation → low-voltage verification". It clearly presents the execution sequence, connection relationship and closed-loop control logic of each step, providing clear process guidance for the standardized development of HCU software models.

[0048] Figure 2 This diagram illustrates the overall modular architecture of the HCU software model. It is a functional architecture block diagram showcasing the core modular design structure of the HCU software model of this invention. The model is decoupled into three independent functional modules: an input module, an output module, and a control module. The control module is further subdivided into six refined sub-modules: a generator speed control module, a generator mode control module, an engine start module, a range extender power calculation module, a shutdown control module, and a slope control module. This clearly presents the functional division, hierarchical relationship, and collaborative working logic of each module, reflecting the core design concept of this invention: "overall decoupling and local fine control."

[0049] Figure 3 The diagram shows the logic control of the generator mode control submodule: This diagram is a logic decision block diagram, showing the core control logic and decision process of the GCU mode control submodule, and clarifying the GCU mode switching decision conditions in the two stages of range extender start-up and shutdown: After the start command is triggered, the GCU directly switches to the speed mode; after the shutdown command is triggered, the GCU can only switch to the shut-off mode to complete the smooth shutdown after the dual determination of "generator torque > 0 Nm" and "generator speed < 500 rpm".

[0050] Figure 4 This diagram illustrates the logic control of the generator speed control submodule: It shows the hierarchical control logic of the GCU speed control submodule, clearly defining the speed control process from start-up to normal operation of the range extender. After the start command is triggered, the GCU first drives the engine at a calibrated value of 1000 rpm. After the engine torque is determined to be <0 Nm and ignition is successful, the range extender power calculation module outputs the target speed based on the requested power, achieving precise and smooth speed control from start-up to normal operation. The diagram clearly presents the triggering conditions, judgment nodes, and command transmission paths for speed control at each stage.

[0051] The core implementation process of this invention follows the appendix. Figure 1 The development process shown progresses step-by-step, from environment setup to modular model development, model integration and debugging, simulation verification, code generation, and low-pressure verification. Each stage is advanced progressively, and any issues discovered at any stage are returned to the corresponding stage for optimization, achieving closed-loop management throughout the entire process. Simultaneously, relying on the attached... Figure 2-4The modular architecture and sub-module control logic complete the model design, and low-voltage verification is completed based on bench hardware.

[0052] like Figures 1-4 As shown, this embodiment discloses a modular HCU software model development method for bench testing of range extenders. The development method includes the following steps:

[0053] Step 1: Set up the development environment based on the VCU hardware platform and its supporting code generation toolchain

[0054] The development environment is built based on the VCU hardware platform and its supporting code generation toolchain. The software development environment uses Matlab / Simulink to complete the functional configuration for model design and simulation verification. The hardware communication layer borrows DBC documents from related equipment such as engines and generators to complete the CAN bus communication protocol adaptation. The completed development environment provides hardware and software support for subsequent modular model development.

[0055] Step 2: Overall Modular Architecture of HCU Software Model

[0056] According to the appendix Figure 2 The HCU software model shown has a modular architecture, dividing it into three independent functional modules: input, output, and control. These modules interact via standardized interfaces. The control module is further divided into six refined sub-modules, each developed independently with precisely matched functions. Specific development details are as follows:

[0057] 1. Input module development: The input module is mainly responsible for receiving CAN bus messages and outputting the data required by the model to the HCU control module;

[0058] 2. Output module development: The output module mainly sends the signals that need to be controlled to the CAN bus;

[0059] 3. Control Module Development: As the core execution unit of the model, six sub-modules are developed and their logical coordination is implemented. The development and control logic of each sub-module are as follows:

[0060] GCU mode control submodule (as attached) Figure 3 As shown): The GCU mode control module mainly controls the GCU modes, including speed mode, torque mode, shut-off mode, and standby mode. The GCU mainly operates in speed mode. After a successful one-button start, the mode directly switches to speed mode. The HCU output module sends the specific control mode signal of the GCU to the CAN bus to start the motor. During the range extender shutdown phase, after pressing the one-button stop, it checks if the GCU torque is >0 Nm and if the GCU speed is <500 rpm. If both conditions are met, the GCU mode is switched to shut-off mode to achieve a smooth motor shutdown.

[0061] GCU speed control submodule (as attached) Figure 4 As shown): After the start-up trigger signal, the rated drag speed of 1000 rpm is output to complete the engine drag; after the engine is successfully ignited, the range extender power calculation module calculates the target speed according to the requested power and outputs the target speed to achieve precise speed control of the generator at different operating stages.

[0062] Engine start command submodule: It is defined that the signal flag position "0" means the signal is invalid and "1" means the signal is valid. During the engine start phase, the three signals of stop request, start request and fuel injection suppression request are set to "0", "1" and "0" respectively. During the engine stop phase, the three signals are set to opposite flags, and the three signal flags are set to "1", "0" and "1" respectively, so as to realize the standardized signal control of engine start and stop.

[0063] Range extender power calculation submodule: This module primarily uses an interpolation algorithm to calculate the required operating speed of the range extender based on the requested power. It further calculates the torque required by the range extender based on the requested power, applying the formula... ,in, Required torque (Nm) : Current requested power (kW) The target rotational speed (rpm) obtained by interpolation in the previous step is adapted to the power matching requirements of different test scenarios;

[0064] Slope control submodule: controls the rise / fall slope of the requested GCU speed and requested ECU torque to achieve smooth adjustment of speed and torque and solve the response lag problem;

[0065] Range extender shutdown judgment submodule: An additional judgment module has been added to the original shutdown command. Any number input ≥1 will be converted into a normal shutdown command, avoiding shutdown failure caused by calibration personnel's operation error and improving the safety of the test equipment.

[0066] Step 3: Construct a complete HCU software model and perform full module integration testing.

[0067] The independently developed input, output, and control modules are integrated through standardized data interfaces to construct a complete HCU software model. Full-module integration testing is then performed in the Matlab / Simulink environment to check the smoothness of data interaction between modules, the coordination of control logic, and the accuracy of signal input and output. Any issues encountered during integration testing, such as incompatible module interfaces, logic conflicts, or abnormal signal transmission, are fed back to the corresponding module development stages for modification and optimization until the model runs flawlessly, laying the foundation for subsequent simulation verification.

[0068] Step 4: Build a simulation verification platform and conduct simulation verification experiments.

[0069] A simulation verification platform was built in the Matlab / Simulink environment. The simulation parameters were manually calibrated under all working conditions to simulate the entire working process of the range extender, including start-up, idling power generation, variable power operation, and shutdown. By monitoring various signal waveforms, control command response speed, speed and torque matching accuracy, the correctness and effectiveness of the model's control logic were verified to ensure that all functions of the model meet the requirements of bench testing.

[0070] Step 5: Based on the simulation verification experiment, finally integrate the HCU software model.

[0071] Based on the final integrated HCU software model verified through simulation, the VCU's supporting code generation toolchain is used to automatically generate hex program files that can be deployed to hardware and A2L files for calibration, ensuring that the generated code completely restores the model's control logic and calibration settings; the generated files are then checked for completeness and validity.

[0072] Step Six: Complete software code preparation and hardware connection, and conduct bench low-voltage verification tests.

[0073] Complete the software code preparation and hardware connection, and conduct bench low-voltage verification tests: connect the test system to a 12V low-voltage power supply to simulate the actual operating conditions of the range extender, and verify the control effects of core links such as pre-start dragging, start-up mode switching, fixed-point power generation, variable operating condition response, shutdown, and pipe shut-off mode switching in sequence, and test the software and hardware compatibility, the accuracy of control command execution, and the stability of signal interaction.

[0074] Step 7: Deploy the HCU software model to the range extender test bench and conduct full-process bench integration and durability testing.

[0075] If all the above steps are verified and there are no functional defects or operational failures, the HCU software model can be formally deployed to the range extender test bench to carry out full-process test bench integration and durability testing, realize the automated, precise and safe control of the range extender, and complete the collection and analysis of test data.

[0076] This invention aims to specifically address four core technical problems existing in current range extender test bench commissioning methods, specifically:

[0077] 1. Solve the technical problems of low efficiency in test bench commissioning of range extenders and excessive reliance on manual operation. Overcome the shortcomings of traditional methods, such as low testing efficiency, slow command response, easy operation errors, and easy to cause equipment failure and safety accidents caused by manually modifying control variables one by one.

[0078] 2. This addresses the technical problem of high risk and cost of physical bench testing due to the lack of early virtual verification in the development of the range extender HCU software model. It also makes up for the technical shortcoming that the lack of a systematic simulation verification process means that control logic defects can only be exposed during physical bench testing, which leads to the risk of hardware damage and a significant extension of the debugging cycle.

[0079] 3. To address the technical issues of poor reusability and insufficient maintainability of HCU software models, and to improve the current situation where the loose software architecture and low modularity make it difficult to reuse models across hardware platforms and R&D projects, and make subsequent functional iteration and maintenance operations difficult.

[0080] 4. Solve the technical problems of weak robustness and lack of safety fault tolerance in the range extender joint commissioning control system, and make up for the shortcomings of the existing method, which relies entirely on the operator's accurate input and lacks an automatic identification and safety handling mechanism for misoperation or abnormal operating conditions, resulting in insufficient system operation safety.

[0081] Based on standardized development processes and modular architecture design, this invention significantly improves the automation level of range extender bench testing while also enhancing the safety, reliability, and reusability of the development process, providing efficient and practical technical support for the rapid development and verification of new energy vehicle range extender systems.

[0082] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of the equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.

[0083] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims

1. A modular HCU software model development method for range extender bench integration, characterized in that: The development method includes the following steps: Step 1: Set up the development environment based on the VCU hardware platform and its supporting code generation toolchain; Step 2: Overall modular architecture of the HCU software model; Step 3: Construct a complete HCU software model and perform full module integration testing; Step 4: Build a simulation verification platform and conduct simulation verification experiments; Step 5: Based on the simulation verification experiment, finally integrate the HCU software model; Step Six: Complete software code preparation and hardware connection, and conduct bench low-voltage verification test; Step 7: Deploy the HCU software model to the range extender test bench and conduct full-process bench integration and durability testing.

2. The modular HCU software model development method for range extender bench testing according to claim 1, characterized in that: Step one is as follows: The software development environment uses Matlab / Simulink to complete the functional configuration of model design and simulation verification; the hardware communication layer borrows the DBC documents of the engine and generator to complete the CAN bus communication protocol adaptation.

3. The modular HCU software model development method for range extender bench testing according to claim 2, characterized in that: Step two is as follows: The model includes an input module, an output module, and a control module; the input module, output module, and control module interact with each other through a standardized interface; Input module: Receives CAN bus messages and outputs the data required by the model to the control module; Output module: Sends control signals to the CAN bus; Control module: Serves as the core execution unit of the model.

4. The modular HCU software model development method for range extender bench testing according to claim 3, characterized in that: The control module mentioned in step two includes GCU Mode Control Submodule: Controls the GCU modes, including speed mode, torque mode, shut-off mode, and preparation mode. The output module sends the specific control mode signal of GCU to the CAN bus to start the motor. During the range extender shutdown phase, after pressing the one-button stop, it checks if the GCU torque is >0 Nm and if the GCU speed is <500 rpm. If both conditions are met, the GCU mode is switched to shut-off mode to achieve a smooth motor shutdown. GCU speed control submodule: After the start-up trigger signal, it outputs a calibrated drag speed of 1000rpm to complete engine drag; after the engine ignition is successful, the range extender power calculation module calculates the target speed according to the requested power and outputs the target speed to achieve precise speed control of the generator at different operating stages; Engine start command submodule: It is defined that the signal flag position "0" means the signal is invalid and "1" means the signal is valid. During the engine start phase, the three signals of stop request, start request and fuel injection suppression request are set to "0", "1" and "0" respectively. During the engine stop phase, the three signal flags are set to "1", "0" and "1" respectively, so as to realize the standardized signal control of engine start and stop. Range extender power calculation submodule: Calculates the speed at which the range extender should operate based on the requested power using an interpolation algorithm, and further calculates the torque required by the range extender based on the requested power, adapting to the power matching requirements of different test scenarios; Slope control submodule: controls the rise / fall slope of the requested GCU speed and requested ECU torque to achieve smooth adjustment of speed and torque; Range extender shutdown judgment submodule: An additional judgment module has been added to the original shutdown command. Any number input ≥1 will be converted into a normal shutdown command.

5. The modular HCU software model development method for range extender bench testing according to claim 4, characterized in that: Step three involves: integrating the input module, output module, and control module through standardized data interfaces to construct a complete HCU software model; performing full-module integration testing in the Matlab / Simulink environment to check whether the data interaction between the input module, output module, and control module is smooth, whether the control logic is coordinated, and whether the signal input and output are accurate; and for any module interface incompatibility, logic conflict, or signal transmission abnormality issues that occur during the integration testing process, feeding them back to the corresponding module development stage for modification and optimization until the model runs without faults.

6. The modular HCU software model development method for bench testing of range extenders according to claim 5, characterized in that: Step four involves: building a simulation verification platform in the Matlab / Simulink environment, setting up full-condition manual calibration simulation parameters, simulating the entire working process of the range extender starting, idling power generation, variable power operation, and shutdown, and verifying the correctness and effectiveness of the model's control logic by monitoring various signal waveforms, control command response speed, and speed-torque matching accuracy, ensuring that all functions of the model meet the requirements of bench tests.

7. The modular HCU software model development method for range extender bench testing according to claim 6, characterized in that: Step five is as follows: Based on the final integrated HCU software model through simulation verification experiments, the VCU-supporting code generation toolchain is used to automatically generate hex program files that can be deployed to hardware and A2L files for calibration, ensuring that the generated code completely restores the model control logic and calibration settings; the integrity and validity of the generated files are checked.

8. The modular HCU software model development method for range extender bench testing according to claim 7, characterized in that: Step six is ​​as follows: Connect a 12V low-voltage power supply to the test system, simulate the actual operating conditions of the range extender, and sequentially verify the control effects of the range extender before starting, starting mode switching, fixed-point power generation, variable operating condition response, shutdown, and shut-off mode switching, and test the software and hardware compatibility, the accuracy of control command execution, and the stability of signal interaction.

9. The modular HCU software model development method for range extender bench testing according to claim 8, characterized in that: Step seven is as follows: If all steps one through six above have been verified and there are no functional defects or operational failures, the HCU software model can be formally deployed to the range extender test bench to carry out full-process test bench integration and durability testing, and complete the collection and analysis of test data.