A system and method for configuring vehicle information based on a UDS diagnostic service, data storage

By using a method based on UDS diagnostic services and data storage, the chaotic problem of MCU software development for main drive motors in new energy vehicles was solved, enabling rapid iteration and software compatibility across multiple vehicle models and powertrains, reducing development and management costs, and improving maintenance efficiency.

CN120762391BActive Publication Date: 2026-07-21ZHIXIN TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHIXIN TECH CO LTD
Filing Date
2025-06-30
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

The existing MCU software development model for main drive motors in new energy vehicles requires the development of different software for each main drive motor, which leads to chaotic software development and management, easy flashing errors, and difficulty in adapting to the rapid iteration of multiple vehicle models and powertrains.

Method used

The method adopts UDS diagnostic service and data storage, and realizes the software function abstraction definition of different MCU main drive motors through configuration word configuration unit, MCU software configuration unit and software logic switching unit. Data identifiers and NVM storage configuration words are defined through UDS protocol stack, and the host computer is used for reading and writing, and the motor control logic module is switched periodically.

Benefits of technology

This technology enables the development of only one software version for multiple main drive motors, reducing development workload and version management costs, avoiding flashing errors, supporting rapid iteration across multiple vehicle models, and improving software compatibility and after-sales maintenance efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120762391B_ABST
    Figure CN120762391B_ABST
Patent Text Reader

Abstract

The application discloses a system and method for realizing vehicle information configuration based on UDS diagnosis service and data storage. The method comprises the following steps: configuring a configuration word according to different MCU main drive motors; defining a readable and writable data identifier in a MCU software UDS protocol stack; further used for defining a specific length space in an MCU software NVM to store the configuration word; using the UDS service to read and write the configuration word according to the data identifier by an upper computer; periodically reading the configuration word from the NVM, and switching the corresponding main drive motor control logic module according to the configuration word. The application can make multiple motors with consistent main functions only need to develop one version of software, thereby reducing the version management cost; the main drive motor supplier only needs to write one version of basic software, thereby avoiding writing errors caused by software version confusion; and one set of software can be compatible with multiple motor configurations, thereby providing technical support for software rapid iteration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of MCU software development technology for new energy vehicle power systems, specifically relating to a system and method for configuring vehicle information based on UDS diagnostic services and data storage. Background Technology

[0002] New energy vehicle technology iterates rapidly, resulting in diverse powertrain system configurations. The same model may offer pure electric four-wheel drive, four-wheel drive range-extended, and rear-wheel drive range-extended configurations. Generally, the core software functions of the main drive motors in different configurations of the same model are the same; differences may lie in calibration data or specific motor-specific functionalities. Similarly, the core software functions of the main drive motors in different models developed on the same vehicle platform are also identical.

[0003] The current development of MCU software for the main drive motor of new energy vehicles involves developing a separate software version for each main drive motor.

[0004] The current development model for MCU software in the main drive motors of new energy vehicles involves developing different software for different main drive motors. For example, the three rear drive motors in the pure electric four-wheel drive version, four-wheel drive range-extended version, and rear-wheel drive range-extended version of the same model require three different software versions. This causes confusion in software development, software version management, and factory software flashing and management, and can easily lead to software flashing errors in actual vehicles. Summary of the Invention

[0005] To address the problems raised in the background art, this invention proposes a system and method for configuring vehicle information based on UDS diagnostic services and data storage.

[0006] A system for configuring vehicle information based on UDS diagnostic services and data storage, which achieves one of the objectives of this invention, includes:

[0007] Configuration word configuration unit: used to configure the configuration word according to different MCU main drive motors. The configuration word is a byte sequence of a specific length used to confirm different functional parts of the software for different MCU main drive motors.

[0008] MCU software configuration unit: used to define a readable and writable data identifier in the MCU software UDS protocol stack; also used to define a space of a specific length in the MCU software NVM to store the configuration word; the host computer uses the UDS service to read and write the configuration word stored in the space of the specific length in the NVM according to this data identifier;

[0009] Software logic switching unit: used to periodically read the configuration word from NVM through MCU software, and switch the corresponding main drive motor control logic module according to the configuration word.

[0010] The beneficial effects of the above system include: abstracting and defining the software functions of different MCU main drive motors through configuration words, so that multiple motors with the same main functions only need to develop one version of software, reducing the workload of software development and version management costs; and the main drive motor supplier only needs to flash one version of basic software, and the OEM can adapt to different models through configuration words, avoiding flashing errors caused by software version confusion; through the architecture of "configuration word + logic switching", a single software can be compatible with multiple motor configurations, providing technical support for the rapid iteration of multiple models and powertrains of new energy vehicles.

[0011] Furthermore, in the MCU software configuration unit, the host computer reads and writes the data identifier through the 2E and 22 services of the UDS diagnostic protocol; the host computer calls interface variables or functions related to NVM storage to trigger the storage and retrieval of NVM data. Beneficial effects include: standardized reading and writing of configuration words between the host computer and the MCU based on the UDS protocol services, ensuring compatibility between different devices; data storage and retrieval triggered by NVM interface variables / functions ensure that configuration words are not lost after power failure, supporting automatic loading of preset configurations after vehicle restart; with the help of the UDS diagnostic service, configuration words can be remotely modified when the vehicle is taken off the production line, under maintenance, or upgraded, without the need for physical software replacement, improving after-sales maintenance efficiency.

[0012] Furthermore, the configuration word is used to represent vehicle type, vehicle model, powertrain type, rear motor model and drive form, and rotary zero position; in the software logic switching unit, different main drive motor control logic modules are switched according to the read configuration word. Vehicle type represents the comprehensive technical characteristics of the vehicle's powertrain system, including energy source, energy conversion device, and drive form, such as: gasoline vehicle, pure electric vehicle, range-extended electric vehicle, hybrid electric vehicle, and hydrogen fuel cell vehicle. Powertrain includes EV (Electric Vehicle), PHEV (Plug-in Hybrid Electric Vehicle), and REV (Range-Extended Electric Vehicle); rear motor model and drive form include: single-motor transverse rear-wheel drive, dual-motor transverse four-wheel drive, single-motor transverse rear-wheel drive, and dual-motor transverse four-wheel drive; the beneficial effects include: the configuration word integrates key information such as vehicle type (gasoline vehicle / pure electric vehicle, etc.), powertrain (EV / PHEV, etc.), and motor drive form, enabling the software to adapt to the differentiated needs of different models on the same platform. Based on the parameters of each dimension in the configuration word, the application layer can automatically match the corresponding control strategy. For example, it can adjust the torque output logic for REV range-extended models to improve the efficiency of the power system. By adapting the software logic to different motor models, it can avoid repeated software development due to hardware differences and reduce the overall vehicle development cost.

[0013] Furthermore, the configuration word comprises multiple bytes. The first byte contains 3 bits representing the vehicle type and 3 bits representing the vehicle model. The second byte represents the vehicle powertrain, rear motor model, and drive type, with 2 bits representing the powertrain and 2 bits representing the combination of the rear motor model and drive type. The third byte represents the resolver zero-position selection, with the higher 2 bits representing the resolver zero position. Beneficial effects include: clearly defining the functional allocation of each byte and bit in the configuration word (e.g., 3 bits in the first byte representing the vehicle type and 3 bits representing the vehicle model); efficiently storing multi-dimensional configuration information within an 8-byte space, saving NVM storage space; enabling precise switching of software functions through bit-level definitions (e.g., 2 bits in the second byte distinguishing the powertrain type), for example, adjusting only the corresponding bit of "resolver zero-position selection" can adapt to different motor installation scenarios; and the unified bit allocation rules facilitate quick understanding of the configuration word's meaning by development, testing, and maintenance personnel, reducing communication costs across teams.

[0014] Furthermore, in the software logic switching unit, an array and a global variable are defined. The MCU software periodically retrieves configuration words from the NVM and stores them in the array, and then retrieves vehicle configuration information from the array and stores it in the global variable. The beneficial effects include: by periodically reading configuration words from the NVM and storing them in the array and global variable, the application layer ensures that it obtains the latest configuration in real time, avoiding logical errors caused by configuration lag; the layered design of the array and global variable decouples the configuration word parsing logic from the application layer logic, improving software maintainability; and the periodic refresh mechanism supports dynamic modification of configuration words during vehicle operation (such as switching driving modes), ensuring the real-time performance and stability of function switching.

[0015] Furthermore, when the MCU's application layer software receives the values ​​in the array, it automatically switches the corresponding main drive motor control logic. The benefits include: the application layer automatically switches control logic based on the configuration word values ​​in the array, eliminating the need for manual intervention or additional triggering instructions, thus reducing the risk of operational errors; the automatic switching mechanism allows developers to focus on application layer logic implementation without needing to concern themselves with the details of underlying configuration parsing, shortening the development cycle.

[0016] Furthermore, it also includes a multi-scenario software adaptation module: used to generate the corresponding main drive motor control logic module in the MCU software based on the main drive motor represented by the configuration word. Beneficial effects include: by generating logic through configuration words, it ensures that all supported motor models and drive types have corresponding control strategies, avoiding functional deficiencies due to missing configurations; when adding a new vehicle model or motor configuration, only the configuration word definition and corresponding logic module need to be expanded, without reconstructing the underlying architecture, improving R&D iteration efficiency; during the development phase, all possible motor control logic is integrated into a single software version, avoiding the need to develop separate branches for different configurations, reducing code redundancy, and reducing later maintenance costs.

[0017] A method for configuring vehicle information based on UDS diagnostic services and data storage to achieve the second objective of this invention includes:

[0018] The configuration word is configured according to the different MCU main drive motors. The configuration word is a byte sequence of a specific length used to identify different functional parts of the software for different MCU main drive motors.

[0019] A readable and writable data identifier is defined in the UDS protocol stack of the MCU software; it is also used to define a space of a specific length in the NVM of the MCU software to store the configuration word; the host computer uses the UDS service to read and write the configuration word stored in the space of the specific length in the NVM according to this data identifier;

[0020] The MCU software periodically reads the configuration word from the NVM and switches the corresponding main drive motor control logic module according to the configuration word.

[0021] A non-transitory computer-readable storage medium for achieving the third objective of the present invention stores a computer program thereon, wherein when the computer program is executed by a processor, it implements the steps of the method for configuring vehicle information based on UDS diagnostic services and data storage.

[0022] A computer program product for achieving the fourth objective of the present invention includes a computer program / instruction that, when executed by a processor, implements the steps of the method for configuring vehicle information based on UDS diagnostic services and data storage.

[0023] The beneficial effects of this invention include:

[0024] 1. Regarding the existing MCU software development model for main drive motors in new energy vehicles, this invention develops different software for different main drive motors; this technology only requires the development of one version of software for multiple MCU main drive motors with the same main function, reducing the workload of software development; at the same time, it effectively avoids the phenomenon of chaotic software version management during the software development process;

[0025] 2. When the main drive motor supplier supplies the vehicle OEM, it only needs to flash a basic software version for the main drive motor with the same main function, which reduces the chaos of factory parts management.

[0026] 3. This invention reduces the phenomenon of powertrain assembly errors at vehicle OEMs. When vehicles are assembled at the OEM, the installation of main drive motors with the same main function does not need to be differentiated. Different configuration words can be written according to the vehicle configuration to adapt to different models. Attached Figure Description

[0027] Figure 1 This is a schematic diagram of an embodiment of the method described in this invention. Detailed Implementation

[0028] The following detailed embodiments are provided to explain the technical solutions of the present invention, so that those skilled in the art can understand the present invention. The scope of protection of the present invention is not limited to the following specific embodiments. Any modifications or improvements made by those skilled in the art that incorporate the technical solutions of the present invention but differ from the following detailed embodiments are also within the scope of protection of the present invention.

[0029] A method for configuring vehicle information based on UDS diagnostic services and data storage

[0030] Step 1: Confirm the software configuration word and its content.

[0031] (1) Software configuration word confirmation is performed on different functional parts of the software for multiple MCU main drive motors. Table 1 below shows the configuration word information in a development project in a certain embodiment. As can be seen, this configuration word is 8 bytes long, and the default information of the configuration word is 0x1122={0x9,0xF,0x00,0x00,0x00,0x00,0x00,0x01} (converted to hexadecimal values ​​through the default configuration value column).

[0032] Table 1 Configuration Word Information Table

[0033]

[0034] (2) Confirming the configuration word content means confirming the specific software content corresponding to the above configuration word. For example, the difference between the MCU software logic of the single-motor transverse rear drive and the dual-motor transverse four-wheel drive in the 2nd and 3rd bits of Byte1 in 0x1122 is the number of configuration parameters, or the number of parameters is the same but the value of each parameter is different. For example, some software has anti-shake function, some software does not need this function, some software has complex anti-shake function and therefore more parameters, and some software has simple anti-shake function and therefore fewer parameters. Anti-shake parameters include: anti-shake start speed threshold 1 / 2 / 3, anti-shake start torque threshold high and low, anti-shake start feedback torque threshold, anti-shake start accelerator pedal threshold, anti-shake start speed threshold under low feedback capability, vehicle speed slip filter coefficient, etc.; it also includes the configuration of other parameters, such as: torque compensation parameters (torque compensation coefficient, speed compensation value, torque compensation limit, etc.); anti-slip calibration parameters (acceleration filter coefficient, anti-slip start acceleration upper and lower limits, anti-slip enable, anti-slip start count upper limit, anti-slip start torque limit coefficient, etc.); heating function, etc. The differences in software logic corresponding to other data in configuration word 0x1122 will not be elaborated upon. Configuration words can be used to switch software functions, as well as switch parameters for software with similar functions.

[0035] Step 2: Implement the configuration word identifier 0x1122 and data storage function in the MCU software.

[0036] When developing the UDS protocol stack in the MCU software, a DID-0x1122 that supports reading and writing is defined. The host computer can write to this DID through the UDS 2E service and read its value through the UDS 22 service. An 8-byte storage space is defined in the MCU's NVM to store the value of DID-0x1122. Calling the interface variables or functions related to NVM storage will trigger the storage and retrieval of NVM data.

[0037] Step 3: Develop different functional parts of the main drive motor software for multiple MCUs.

[0038] The development of different functional parts of the software requires incorporating the logic for all main drive motors supported by the software. Taking the information in Table 1 as an example, the application layer of this software requires five different logics depending on the vehicle type, reflecting the differences between fuel vehicles, pure electric vehicles, range-extended electric vehicles, hybrid vehicles, and hydrogen fuel cell vehicles; due to different vehicle models, the software needs to distinguish between model 1, model 2, and model 3; due to different powertrains, the software needs to distinguish between EV, PHEV, and REV; due to different rear motor models and drive types, the software needs to distinguish between single-motor transverse rear-wheel drive (supplier 1), dual-motor transverse four-wheel drive (supplier 1), single-motor transverse rear-wheel drive (supplier 2), and dual-motor transverse four-wheel drive (supplier 2); due to different resolver zero-point selections, the software needs to distinguish between zero-point 1 and zero-point 2. The resolver zero-point is the reference position parameter of the resolver used to detect the rotor position of the motor, used to calibrate the zero point of the motor rotor's initial position; by selecting different resolver zero points, the rotor position calibration requirements of different motor models or installation scenarios can be adapted to ensure the accuracy of motor control.

[0039] Step 4: Implement application layer software logic switching through data writing via UDS service.

[0040] After completing steps 1, 2, and 3, it is also necessary to associate the changes in the value of DID-0x1122 with the different logic of the application layer in step 3. Again, let's take the single-motor transverse rear-drive and dual-motor transverse four-drive configurations in the 2nd and 3rd bits of Byte2 in 0x1122 as an example.

[0041] Define an array of length 8 bytes, Configurable_DataIdentifier_Read[8], and define a global variable, Configurable_DataIdentifier_Read_toAPP. Set a periodic task (e.g., 10ms period) in the software. This periodic task is used to periodically retrieve the value of DID-0x1122 from NVM and store it in the custom array Configurable_DataIdentifier_Read[]. Then, it retrieves the value of the 2nd and 3rd bits from the custom array Configurable_DataIdentifier_Read[] and stores it in the custom global variable Configurable_DataIdentifier_Read_toAPP. After receiving the value of Configurable_DataIdentifier_Read_toAPP, the application layer software in step 3 automatically switches the logic between single-motor transverse rear drive and dual-motor transverse four-wheel drive; for example, when the value is equal to 0x8, it switches to the software logic of single-motor transverse rear drive (supplier 2), and when the value is equal to 0xC, it switches to the software logic of dual-motor transverse four-wheel drive (supplier 2).

[0042] The implementation of other functions in the configuration word information table (Table 1) is similar to the methods in steps 1, 2, 3, and 4 above, and will not be listed one by one here.

[0043] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0044] This invention also provides a non-transitory computer-readable storage medium storing a computer program. The computer program includes program instructions that, when executed by a processor, implement the various steps of the method described in this invention, which will not be elaborated further here.

[0045] The computer-readable storage medium can be the data transmission apparatus or the internal storage unit of a computer device provided in any of the foregoing embodiments, such as the hard disk or memory of the computer device. The computer-readable storage medium can also be the external storage device of the computer device, such as the plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. equipped on the computer device.

[0046] Furthermore, the computer-readable storage medium may include both internal storage units and external storage devices of the computer device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may also be used to temporarily store data that is to be output or has already been output.

[0047] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0048] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0049] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0050] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0051] The contents not described in detail in this specification are existing technologies known to those skilled in the art.

Claims

1. A system for configuring vehicle information based on UDS diagnostic services and data storage, characterized in that, include: Configuration word configuration unit: used to configure the configuration word according to different MCU main drive motors. The configuration word is a byte sequence of a specific length used to confirm different functional parts of the software for different MCU main drive motors. MCU software configuration unit: used to define a readable and writable data identifier in the MCU software UDS protocol stack; also used to define a space of a specific length in the MCU software NVM to store the configuration word; the host computer uses the UDS service to read and write the configuration word stored in the space of the specific length in the NVM according to this data identifier; Software logic switching unit: used to periodically read the configuration word from NVM through MCU software, and switch the corresponding main drive motor control logic module according to the configuration word; The configuration word is used to represent the vehicle type, vehicle model, powertrain type, rear motor model and drive type, and the zero position of the reversing converter; in the software logic switching unit, different main drive motor control logic modules are switched according to the read configuration word; The configuration word includes multiple bytes. In the first byte, 3 bits are used to indicate the vehicle type and the other 3 bits are used to indicate the vehicle model. The second byte indicates the vehicle powertrain, rear motor model and drive type, with 2 bits used to indicate the powertrain and the other 2 bits used to indicate the combination of rear motor model and drive type. The third byte is used to indicate the resolver zero position selection, with 2 bits indicating the resolver zero position. It also includes a multi-scenario software adaptation module: used to generate the corresponding main drive motor control logic module in the MCU software based on the main drive motor represented by the configuration word.

2. The system for configuring vehicle information based on UDS diagnostic services and data storage as described in claim 1, characterized in that, In the MCU software configuration unit, the host computer reads and writes the data identifier through the UDS diagnostic protocol service; the host computer calls the interface variables or functions related to NVM storage to trigger the storage and reading of NVM data.

3. The system for configuring vehicle information based on UDS diagnostic services and data storage as described in claim 1, characterized in that, In the software logic switching unit, the MCU software periodically retrieves configuration words from NVM and stores them in an array, and then retrieves vehicle configuration information from the array and stores it in a global variable.

4. The system for configuring vehicle information based on UDS diagnostic services and data storage as described in claim 1, characterized in that, When the MCU's application layer software receives the values ​​in the array, it automatically switches the corresponding main drive motor control logic.

5. A method for configuring vehicle information based on UDS diagnostic services and data storage, applied to the system for configuring vehicle information based on UDS diagnostic services and data storage as described in claim 1, characterized in that, include: The configuration word is configured according to the different MCU main drive motors. The configuration word is a byte sequence of a specific length used to identify different functional parts of the software for different MCU main drive motors. A readable and writable data identifier is defined in the UDS protocol stack of the MCU software; it is also used to define a space of a specific length in the NVM of the MCU software to store the configuration word; the host computer uses the UDS service to read and write the configuration word stored in the space of the specific length in the NVM according to this data identifier; The MCU software periodically reads the configuration word from the NVM and switches the corresponding main drive motor control logic module according to the configuration word.

6. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method for configuring vehicle information based on UDS diagnostic services and data storage as described in claim 5.

7. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instruction is executed by the processor, it implements the steps of the method for configuring vehicle information based on UDS diagnostic services and data storage as described in claim 5.