A BMS timed wake-up method, device and vehicle
By introducing a software-implemented timed wake-up method into the BMS, and using message information from the host computer and the vehicle management system to synchronize time data to the timed wake-up unit, the problems of high hardware cost and real vehicle testing risks in the prior art are solved, and functional verification and cost reduction are achieved.
Patent Information
- Application Number
- CN202411831338.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2044-12-12
AI Technical Summary
The existing BMS wake-up function is implemented through a complex wake-up circuit, which increases hardware costs and poses risks in real vehicle testing.
The vehicle management system sends message information to the host computer, parses and synchronizes time data to the timed wake-up unit. The timed wake-up unit contains timed wake-up code, which reduces the complexity of hardware circuits and moves some functions to software implementation.
The circuit complexity of the wake-up function was reduced, the hardware cost was lowered, and the correctness of the function was initially verified through HIL testing, thereby reducing the risk of real vehicle testing.
Smart Images

Figure CN119781841B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of vehicle-related technology, and in particular relates to a BMS timed wake-up method, device and vehicle. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] Since the implementation of the sustainable development strategy, new energy technologies have developed rapidly, and the market share of electric vehicles has continued to increase. As the core component of new energy vehicles, the power battery determines key performance parameters such as driving range and overall vehicle energy consumption. The Battery Management System (BMS) is crucial for ensuring the normal and efficient operation of the power battery pack. Implementing a timed wake-up function for the BMS to detect its own status can mitigate potential risks. However, existing wake-up functions are often achieved through complex wake-up circuits, increasing hardware costs. Summary of the Invention
[0004] To overcome the shortcomings of the prior art, the present invention provides a BMS timed wake-up method, device and vehicle, which reduces the circuit complexity of the wake-up function, moves some functions to software implementation, and reduces hardware costs; the HIL test method reduces the risks that may exist in real vehicle testing, and can preliminarily verify the correctness of the function.
[0005] To achieve the above objectives, the present invention adopts the following technical solution:
[0006] In a first aspect, the present invention provides a BMS timed wake-up method, comprising:
[0007] Send message information to the vehicle management system via the host computer;
[0008] The vehicle management system receives and parses the message information to extract time data; wherein, the message information is used to indicate whether the BMS should perform HIL testing, and the BMS contains HIL test code;
[0009] The vehicle management system synchronizes the extracted time data to the timed wake-up unit; the timed wake-up unit contains timed wake-up code;
[0010] When the message information instructs the vehicle management system to perform a HIL test, the timed wake-up unit performs a timed wake-up function in response to the synchronized time data.
[0011] In a second aspect, the present invention provides a BMS timed wake-up device, comprising:
[0012] The host computer is used to send message information to the vehicle management system;
[0013] The vehicle management system is used to receive and parse message information sent by the host computer to extract time data; wherein, the message information is used to indicate whether the vehicle management system should perform HIL testing, and the vehicle management system contains HIL test code;
[0014] A timed wake-up unit is used to receive time data synchronization extracted by the vehicle management system; when the message information instructs the vehicle management system to perform HIL testing, it executes a timed wake-up function in response to the synchronized time data; wherein, the timed wake-up unit contains timed wake-up code.
[0015] Thirdly, the present invention provides a vehicle that executes the above-described BMS timed wake-up method.
[0016] The above one or more technical solutions have the following beneficial effects:
[0017] This invention sends message information to a vehicle management system via a host computer; the vehicle management system receives and parses the message information to extract time data; the message information indicates whether the vehicle management system should perform HIL testing, and the vehicle management system contains HIL test code; the vehicle management system synchronizes the extracted time data to a timed wake-up unit; the timed wake-up unit contains timed wake-up code; when the message information instructs the vehicle management system to perform HIL testing, the timed wake-up unit executes the timed wake-up function in response to the synchronized time data. This invention reduces the circuit complexity of the wake-up function by moving some functions to software implementation, thus reducing hardware costs; the HIL testing method reduces potential risks in real-vehicle testing and can preliminarily verify functional correctness.
[0018] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0019] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0020] Figure 1 This is a flowchart of a BMS timed wake-up method according to Embodiment 1 of the present invention. Detailed Implementation
[0021] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0022] It should be noted that the terminology used herein is for the purpose of describing particular implementations only and is not intended to limit the exemplary implementations of the present invention.
[0023] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.
[0024] Conventional vehicle charging methods involve charging equipment, such as charging piles, sending a BMS wake-up signal to the electric vehicle via a dedicated signal cable to activate the BMS. Additionally, the charging equipment includes a low-voltage power supply (such as a 12V power supply). After the BMS is activated, this power supply powers the BMS through the aforementioned signal cable, enabling the BMS to monitor the battery's charging status during the charging process. However, current wake-up functions often employ complex circuitry, increasing hardware costs.
[0025] This application sends message information to the vehicle management system via a host computer; the vehicle management system receives and parses the message information, extracting time data; the message information instructs the vehicle management system whether to perform HIL testing, and the vehicle management system contains HIL test code; the vehicle management system synchronizes the extracted time data to a timed wake-up unit; the timed wake-up unit contains timed wake-up code; when the message information instructs the vehicle management system to perform HIL testing, the timed wake-up unit executes the timed wake-up function in response to the synchronized time data. This application reduces the circuit complexity of the wake-up function by moving some functions to software implementation, reducing hardware costs; the HIL testing method reduces potential risks in real-vehicle testing and can preliminarily verify functional correctness.
[0026] This embodiment discloses a BMS timed wake-up method, including:
[0027] Send message information to the vehicle management system via the host computer;
[0028] The vehicle management system receives and parses the message information to extract time data; wherein, the message information is used to indicate whether the BMS should perform HIL testing, and the BMS contains HIL test code;
[0029] The vehicle management system synchronizes the extracted time data to the timed wake-up unit; the timed wake-up unit contains timed wake-up code;
[0030] When the message information instructs the BMS to perform a HIL test, the timed wake-up unit performs a timed wake-up function in response to the synchronized time data.
[0031] In some embodiments, when the CAN interface of the vehicle management system receives new CAN message information, the vehicle CAN message reception interrupt function is triggered, a message is read from the CAN bus, and when new data is read, the message ID is checked.
[0032] In some embodiments, the vehicle management system calls the vehicle CAN message receiving interrupt function and the semaphore mapping function to process the message information, and maps the message information to global variables through the semaphore mapping function.
[0033] In some embodiments, in the vehicle management system, the polling calibration time function is periodically called in the main loop to check whether a message is received. If a message is received, the time data is packaged into an array, and the rtc_can_communicate_x function is called to send the time data to the timed wake-up unit to complete time synchronization.
[0034] In some embodiments, in the vehicle management system, the polling calibration time function checks whether the received message information is the same as the previous one. If they are the same, the received message information is reset to 0, indicating that time data does not need to be sent again.
[0035] In some embodiments, the timed wake-up function of the timed wake-up unit is set through a timed wake-up interface function to perform corresponding operations at corresponding times.
[0036] In some embodiments, the timed wake-up interface function sets the time increment to 1 hour per hour and calls the rtc_can_communicate_x function to set the timed wake-up function of the timed wake-up unit.
[0037] In some embodiments, the message information includes a message ID and a data field; wherein the data field contains time data.
[0038] like Figure 1 As shown, Figure 1 A flowchart of a BMS timed wake-up method provided in this embodiment specifically includes:
[0039] Send message information to the vehicle management system via the host computer;
[0040] The vehicle management system receives and parses the message information to extract time data; wherein, the message information is used to indicate whether the BMS should perform HIL testing, and the BMS contains HIL test code;
[0041] The vehicle management system synchronizes the extracted time data to the timed wake-up unit; the timed wake-up unit contains timed wake-up code;
[0042] When the message information instructs the BMS to perform a HIL test, the timed wake-up unit performs a timed wake-up function in response to the synchronized time data.
[0043] In this embodiment, the timed wake-up unit is specifically an RTC chip, specifically the MCP7940N chip, which meets automotive-grade safety standards and has the advantage of low power consumption. The backup power supply is only 925nA, 3.0V.
[0044] Configure the MFP pin of the MCP7940N chip as an alarm output in low-level mode. Connect it to the inverting circuit and the pin of the Infineon recommended power chip TLF35584Wak. The power chip wakes up the main control chip.
[0045] Design an initialization time calibration message with ID 0x585, using Intel encoding format, and define the RTC calibration enable bit, time data year, time data month, time data day, time data hour, time data minute, time data second, and time data week semaphores.
[0046] This embodiment uses four functions: receiving messages, parsing messages, time synchronization, periodic checking, and timed wake-up.
[0047] The four functions used are explained in detail below:
[0048] The semaphore mapping function Rev_PCRTC(void) maps time data received from the CAN bus to global variables representing different time units, such as year, month, day, hour, minute, second, and weekday. The semaphore mapping function extracts time data from the gs_CAN_RvData.data_CAN1Rx array and stores it in the corresponding field of the gs_CAN_Apply structure.
[0049] The vehicle CAN message receive interrupt function CAN_Rev_Isr1_Handler(void) is the interrupt service routine (ISR) for CAN message reception. It first attempts to read a message from the CAN bus. If new data is received, it checks if the message ID is 0x585, which is the ID of an RTC (Real-Time Clock) message. If it is an RTC message, it stores the data in the data_interrupt_Msg1 array and calls the CAN_RX_interrupt and Rev_PCRTC functions to process the data, incrementing the gs_CAN_Apply.ub_RTC_Data counter by 1. Finally, it clears the status flag of the CAN message object, indicating that the message has been processed.
[0050] The polling calibration function `PollingCal(void)` is called periodically in the main function `core0_main` to check if an RTC message has been received. If an RTC message is received (`gs_CAN_Apply.ub_RTC_Flg` is 1), it packages the time data into the `add_time.recvbuf1` array and calls the `rtc_can_communicate_x` function to send the time data to the RTC chip. It also checks if `gs_CAN_Apply.ub_RTC_Data` is the same as the previous value; if so, it resets `gs_CAN_Apply.ub_RTC_Flg` to 0, indicating that time data does not need to be sent again.
[0051] The timed wake-up interface function WakeupAPI(void) is used to set up timed wake-up. It sets the time increment to 1 hour per hour and calls the rtc_can_communicate_x function to set up the timed wake-up function of the RTC chip.
[0052] During HIL testing of the vehicle management system, the semaphore mapping function Rev_PCRTC(void), the vehicle CAN message reception interrupt function CAN_Rev_Isr1_Handler(void), the polling calibration time function PollingCal(void), and the timed wake-up interface function WakeupAPI(void) are respectively for receiving messages, parsing messages, time synchronization, periodic checks, and timed wake-up.
[0053] The entire message reception and processing can be divided into five parts: CAN message reception interrupt handling, message ID checking, time data extraction and mapping, polling check and time synchronization, and timed wake-up setting.
[0054] Specifically, receiving messages: The vehicle management system receives time data messages sent by the host computer via the CAN bus.
[0055] Parsing messages: The vehicle management system parses these messages using the CAN_Rev_Isr1_Handler function to extract time data.
[0056] Time synchronization: The vehicle management system uses the Rev_PCRTC function to map the parsed time data to global variables.
[0057] Periodic checks: The vehicle management system periodically checks whether new time data has been received using the PollingCal function and synchronizes it to the RTC chip.
[0058] Timed wake-up: The Wakeup API function is used to set the timed wake-up function of the RTC chip so that certain operations can be performed at a specific time.
[0059] In this embodiment, the message content includes:
[0060] 0x585: Message ID, indicating that this is an RTC message.
[0061] Data fields: contain time data, such as year (01), month (17), day (0A), hour (1E), minute (0F), second (00), weekday (01).
[0062] The specific time data is as follows:
[0063] Year: The first byte of the message, for example, 0x01 represents 2023;
[0064] Month: The second byte of the message, for example, 0x17 represents October;
[0065] Day: The third byte of the message, for example, 0x0A represents the 10th day;
[0066] Hour: The fourth byte of the message, for example, 0x1E represents 30 (hexadecimal) hours;
[0067] Minute: The fifth byte of the message, for example, 0x0F represents 15 minutes;
[0068] Second: The sixth byte of the message, for example, 0x00 means 0 seconds.
[0069] For example, when starting the HIL test, the host computer sends a message. If the initial time is set to 15:00:00 on October 30, 2023, Monday, the corresponding CAN data is 01 170A 1E 0F 00 00 01. After receiving the data, the main control chip writes it into the RTC chip register to complete the time initialization.
[0070] The following is a detailed explanation of the entire message reception and processing process:
[0071] 1. CAN message receive interrupt handling:
[0072] (1) When the BMS's CAN interface receives a new CAN message, the CAN_Rev_Isr1_Handler function is triggered.
[0073] The CAN_Rev_Isr1_Handler function first attempts to read a message from the CAN bus using the IfxMultican_Can_MsgObj_readMessage function.
[0074] (2) If new data is read (ifxMultican_Status_newData flag is set), the message ID (rxMsgRx1.id) will be checked.
[0075] 2. Message ID check:
[0076] If the message ID is 0x585, it indicates that this is an RTC time synchronization message. This ID corresponds to case 0x585 in the code.
[0077] 3. Time data extraction and mapping:
[0078] (1) For RTC messages, the data_interrupt_Msg1 array stores the data fields of the message, and then calls the CAN_RX_interrupt and Rev_PCRTC functions to further process the data.
[0079] (2) The Rev_PCRTC function maps these data to the global variable gs_CAN_Apply, which represents different time units such as year, month, day, hour, minute, second and weekday.
[0080] 4. Polling checks and time synchronization
[0081] (1) The PollingCal function is called periodically in the main loop to check whether an RTC message has been received (via the gs_CAN_Apply.ub_RTC_Flg flag).
[0082] (2) If an RTC message is received, it will pack the time data into the add_time.recvbuf1 array and call the rtc_can_communicate_x function to send the time data to the RTC chip to complete time synchronization.
[0083] 5. Timed wake-up settings
[0084] The WakeupAPI function is used to set up a timed wake-up function for an RTC chip, so that certain operations can be performed at specific times. This function sets a time increment, causing the RTC chip to wake up once per hour.
[0085] The testing process in this embodiment is as follows:
[0086] Initialization: The BMS initializes the CAN interface to prepare for receiving messages.
[0087] Message reception: The BMS receives RTC messages sent by the host computer via the CAN interface.
[0088] Parsing the message: The CAN_Rev_Isr1_Handler function parses the message and extracts the time data.
[0089] Time synchronization: The Rev_PCRTC function maps time data to global variables, and the PollingCal function synchronizes this data to the RTC chip.
[0090] Timed wake-up: The Wakeup API function sets the timed wake-up function of the RTC chip so that test or monitoring operations can be performed at a specific time.
[0091] Through the above steps, the BMS can receive and process the time data sent by the host computer and synchronize this data to the RTC chip to ensure the accuracy of the BMS time.
[0092] This embodiment provides a BMS timed wake-up device, including:
[0093] The host computer is used to send message information to the vehicle management system;
[0094] The vehicle management system is used to receive and parse message information sent by the host computer to extract time data; wherein, the message information is used to indicate whether the BMS should perform HIL testing, and the BMS contains HIL test code;
[0095] A timed wake-up unit is used to receive time data synchronization extracted by the vehicle management system; when the message information instructs the BMS to perform HIL testing, it executes a timed wake-up function in response to the synchronized time data; wherein, the timed wake-up unit contains timed wake-up code.
[0096] This embodiment also provides a vehicle that executes the above-described BMS timed wake-up method.
[0097] The computer program code used to implement the methods of the present invention may be written in one or more programming languages. This computer program code may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the computer or other programmable data processing device, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a computer, partially on a computer, as a stand-alone software package, partially on a computer and partially on a remote computer, or entirely on a remote computer or server.
[0098] In the context of this invention, computer program code or related data may be carried by any suitable carrier to enable a device, apparatus, or processor to perform the various processes and operations described above. Examples of carriers include signals, computer-readable media, and the like. Examples of signals may include electrical, optical, radio, sound, or other forms of propagation signals, such as carrier waves, infrared signals, etc.
[0099] Those skilled in the art will recognize that the units and algorithm steps described in conjunction with the embodiments herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0100] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.
Claims
1. A BMS timed wake-up method, characterized in that, include: Send message information to the vehicle management system via the host computer; The vehicle management system receives and parses the message information to extract time data; wherein, the message information is used to indicate whether the vehicle management system should perform HIL testing, and the vehicle management system contains HIL test code; The vehicle management system synchronizes the extracted time data to the timed wake-up unit; the timed wake-up unit contains timed wake-up code; When the message information instructs the vehicle management system to perform a HIL test, the timed wake-up unit performs a timed wake-up function in response to the synchronized time data.
2. The BMS timed wake-up method as described in claim 1, characterized in that, When the CAN interface of the vehicle management system receives a new CAN message, the vehicle CAN message receive interrupt function is triggered, and a message is read from the CAN bus. When new data is read, the message ID is checked.
3. The BMS timed wake-up method as described in claim 1, characterized in that, The vehicle management system calls the vehicle CAN message receiving interrupt function and the semaphore mapping function to process the message information, and maps the message information to global variables through the semaphore mapping function.
4. The BMS timed wake-up method as described in claim 1, characterized in that, In the vehicle management system, the polling calibration time function is periodically called in the main loop to check whether a message has been received. If a message has been received, the time data is packaged into an array and the rtc_can_communicate_x function is called to send the time data to the timed wake-up unit to complete the time synchronization.
5. A BMS timed wake-up method as described in claim 4, characterized in that, In the vehicle management system, the polling calibration time function checks whether the received message information is the same as the previous one. If they are the same, the received message information is reset to 0, indicating that time data does not need to be sent again.
6. The BMS timed wake-up method as described in claim 1, characterized in that, The timed wake-up function of the timed wake-up unit is set through the timed wake-up interface function so that corresponding operations can be performed at the corresponding time.
7. A BMS timed wake-up method as described in claim 6, characterized in that, The timed wake-up interface function sets the time increment to 1 hour per hour and calls the rtc_can_communicate_x function to set the timed wake-up function of the timed wake-up unit.
8. A BMS timed wake-up method as described in claim 1, characterized in that, The message information includes a message ID and a data field; wherein, the data field contains time data.
9. A BMS timed wake-up device, characterized in that, include: The host computer is used to send message information to the vehicle management system; The vehicle management system is used to receive and parse message information sent by the host computer to extract time data; wherein, the message information is used to indicate whether the vehicle management system should perform HIL testing, and the vehicle management system contains HIL test code; A timed wake-up unit is used to receive time data synchronization extracted by the vehicle management system; when the message information instructs the vehicle management system to perform HIL testing, it executes a timed wake-up function in response to the synchronized time data; wherein, the timed wake-up unit contains timed wake-up code.
10. A vehicle, characterized in that, Perform a BMS timed wake-up method as described in any one of claims 1-8.
Citation Information
Patent Citations
Automatic diagnosis method and device for battery management system
CN117110733A
Communication state control method, battery management system, vehicle, and storage medium
CN117841677A