A vehicle-mounted communication method and system, electronic equipment, and storage medium
By introducing a combination of pulse width modulation wiring harness and CAN bus into the vehicle communication system, the location encoding and communication ID learning of the battery monitoring unit were realized, solving the problems of resource waste and cumbersome compilation and download, and achieving efficient data differentiation and communication.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING JINGWEI HIRAIN TECH CO INC
- Filing Date
- 2023-12-28
- Publication Date
- 2026-05-05
AI Technical Summary
In existing technologies, the communication methods of vehicle battery monitoring units require a large amount of CAN bus resources or cumbersome program compilation and download, resulting in resource waste and inconvenience.
By introducing a pulse width modulation (PWM) harness into the vehicle communication system to form a ring connection, the battery management system and multiple battery monitoring units are connected through the PWM harness and CAN bus. The target signal is transmitted and compared using signals with specified frequencies and duty cycles, thereby enabling the learning of the battery monitoring unit's location encoding and communication ID.
This system enables all battery monitoring units to use the same program and share the same CAN bus, effectively avoiding resource waste and the inconvenience of compilation and download, and can distinguish the data transmission of different battery monitoring units.
Smart Images

Figure CN117831150B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle communication technology, and in particular to a vehicle communication method and system, electronic device, and storage medium. Background Technology
[0002] Vehicles typically have multiple Battery Monitor Units (BMUs) to collect data such as battery voltage and temperature, and send it to the Battery Management System (BMS) for processing via the CAN bus.
[0003] To distinguish the data transmitted by each BMU group, two main communication methods are currently used. One method involves each BMU group being connected to a different CAN bus for data transmission, ensuring data differentiation while maintaining program consistency across all BMU groups. The other method involves connecting each BMU group to the same CAN bus, but requiring the download of different programs to each group. These different programs generate different communication IDs during communication, allowing for data differentiation between the BMU groups.
[0004] However, since there are many BMUs, the first method requires a significant amount of CAN bus space, thus wasting microcontroller unit resources. The second method, on the other hand, requires compiling and downloading a large number of different programs, making it overly cumbersome. Summary of the Invention
[0005] In view of the shortcomings of the prior art, this application provides a vehicle communication method and system, electronic device and storage medium to solve the problems of resource waste and relative cumbersomeness of the prior art.
[0006] To achieve the above objectives, this application provides the following technical solution:
[0007] The first aspect of this application provides a vehicle communication method applied to a vehicle communication system. The vehicle communication system includes a battery management system and multiple sets of battery monitoring units. Each set of battery monitoring units is sequentially connected via a pulse width modulation (PWM) harness. The battery management system is connected to the first and last sets of battery monitoring units via PWM harnesses, and to each battery monitoring unit via the same CAN bus. The vehicle communication method includes:
[0008] The battery management system sends the first target signal among various target signals to the first group of battery monitoring units via a pulse width modulation harness; wherein, the target signal is a signal with a specified frequency and a specified duty cycle;
[0009] Each of the battery monitoring units acquires signals sent to it via a pulse width modulation harness, and determines the target signal it has acquired by comparing the acquired signal with each of the target signals.
[0010] The battery monitoring unit encodes its own position according to the determined position corresponding to the target signal it has collected, and obtains its own position identifier. When communicating with the battery management system, it sends a communication ID within the communication ID range corresponding to its own position identifier to the battery management system via the CAN bus.
[0011] The battery monitoring unit sends the target signal corresponding to the next position of its own position to its corresponding current downstream object through the pulse width modulation harness; wherein, the current downstream object corresponding to the battery monitoring unit refers to the battery monitoring unit or the battery management system that is connected to it through pulse width modulation and is not currently sending a signal to it through pulse width modulation.
[0012] The battery management system collects the signals sent to it by the last group of battery monitoring units through the pulse width modulation harness, and determines the target signal it has collected by comparing the collected signals with the target signal.
[0013] The battery management system determines the number of battery monitoring units based on the target signals it has collected.
[0014] Optionally, in the above-described vehicle communication method, the battery monitoring unit acquires signals transmitted to it via a pulse width modulation harness, and determines the target signals it has acquired by comparing the acquired signals with each of the target signals, including:
[0015] The system continuously acquires signals transmitted to it via a pulse width modulation (PWM) harness. For each acquired signal, the acquired signal is compared with each of the target signals until the deviations of a preset number of continuously acquired signals from one of the target signals all meet a preset deviation range. The target signal whose deviations from the preset number of continuously acquired signals all meet the preset deviation range is determined as the target signal acquired by the system.
[0016] Optionally, in the above-described vehicle-mounted communication method, the continuous acquisition of signals transmitted to it via a pulse width modulation harness, and the comparison of each acquired signal with each of the target signals, until the deviations of a preset number of continuously acquired signals from one of the target signals all meet a preset deviation range, and the target signal whose deviations from the preset number of continuously acquired signals all meet the preset deviation range is determined as the target signal acquired by itself, includes:
[0017] Acquire signals transmitted to it via a pulse width modulation (PWM) harness;
[0018] Determine if the current signal set is empty;
[0019] If it is determined that the current signal set is empty, then by comparing the currently acquired signal with each of the target signals, it is determined whether the deviation between the currently acquired signal and any of the target signals meets the preset deviation range.
[0020] If it is determined that the deviation between the currently acquired signal and any of the target signals does not meet the preset deviation range, then return to the step of acquiring the signal sent to it through the pulse width modulation harness;
[0021] If it is determined that the deviation between the currently acquired signal and any of the target signals meets a preset deviation range, then the currently acquired signal is determined to belong to the target signal whose deviation meets the preset deviation range, and the currently acquired signal is placed in the current signal set;
[0022] If it is determined that the current signal set is not empty, then compare whether the deviation between the currently acquired signal and the target signal to which the signal in the current signal set belongs meets the preset deviation range.
[0023] If the deviation between the currently acquired signal and the target signal to which the signal in the current signal set belongs does not meet the preset deviation range, then the current signal set is cleared, and the process returns to the step of acquiring the signal sent to it through the pulse width modulation harness.
[0024] If the deviation between the currently acquired signal and the target signal in the current signal set is within a preset deviation range, then the currently acquired signal is placed in the current signal set.
[0025] Determine whether the number of signals in the current signal set is the preset number;
[0026] If it is determined that the number of signals in the current signal set is not the preset number, then return to the step of collecting the signals sent to it through the pulse width modulation harness;
[0027] If it is determined that the number of signals in the current signal set is the preset number, then the target signal to which the signal in the current signal set belongs is identified as the target signal acquired by itself.
[0028] Optionally, in the above-described vehicle communication method, the battery monitoring unit sends the target signal corresponding to the next position of its own position to its corresponding current downstream object via a pulse width modulation harness, including:
[0029] The battery monitoring unit updates the target signal it has collected according to a preset unit change amount, obtains the target signal corresponding to the next position of its own position, and sends it to its corresponding current downstream object.
[0030] Optionally, in the above-described vehicle communication method, the battery monitoring unit updates the target signal it has collected according to a preset unit change amount to obtain the target signal corresponding to the next position of its own position, including:
[0031] The battery monitoring unit keeps the frequency of the target signal it has collected unchanged and increases the duty cycle by a preset unit change ratio to obtain the target signal corresponding to the next position of its own position.
[0032] Optionally, in the above-described vehicle communication method, the battery management system determines the number of battery monitoring units based on the target signal it has collected, including:
[0033] The first target signal is compared with the target signal collected by itself to obtain the total signal change.
[0034] The number of battery monitoring units is obtained by dividing the total signal change by the preset unit change.
[0035] Optionally, the above-described vehicle communication method further includes:
[0036] After sending the first target signal, the battery management system monitors in real time whether it has collected the signal sent to it by the last group of battery monitoring units through the pulse width modulation harness within a preset time.
[0037] If the signal sent by the last group of battery monitoring units through the pulse width modulation harness is not collected within the preset time, an alarm message will be sent.
[0038] A second aspect of this application provides a vehicle-mounted communication system, comprising:
[0039] A battery management system and multiple battery monitoring units;
[0040] The battery monitoring units in each group are connected sequentially via pulse width modulation harnesses;
[0041] The battery management system is connected to the first and last groups of battery monitoring units via pulse width modulation wiring harnesses, and is also connected to each of the battery monitoring units via the same CAN bus. The vehicle communication method includes:
[0042] The battery management system is configured to send the first target signal of each target signal to the first group of battery monitoring units via a pulse width modulation (PWM) harness, and to collect the signal sent to the last group of battery monitoring units via the PWM harness. By comparing the collected signal with the target signal, the system determines the target signal it has collected, and based on the determined target signal, determines the number of battery monitoring units. The target signal is a signal with a specified frequency and a specified duty cycle.
[0043] The battery monitoring unit is configured to: collect signals transmitted to it via a pulse width modulation harness, and determine the target signals it has collected by comparing the collected signals with each of the target signals.
[0044] According to the determined location corresponding to the target signal collected by itself, the self-position is encoded to obtain its own position identifier, so that when communicating with the battery management system, the communication ID within the communication ID range corresponding to its own position identifier is sent to the battery management system via the CAN bus.
[0045] The target signal corresponding to the next position of its own position is sent to its corresponding current downstream object through the pulse width modulation harness; wherein, the current downstream object corresponding to the battery monitoring unit refers to the battery monitoring unit or the battery management system that is connected to it through pulse width modulation and is not currently sending signals to it through pulse width modulation.
[0046] This application involves a third party providing an electronic device, including:
[0047] Memory and processor;
[0048] The memory is used to store programs;
[0049] The processor is used to execute the program, which, when executed, is specifically used to implement the vehicle communication method as described in any of the above.
[0050] The fourth aspect of this application provides a computer storage medium for storing a computer program, which, when executed, implements the vehicle communication method as described in any of the preceding claims.
[0051] This application provides a vehicle-mounted communication method applied to a vehicle-mounted communication system. In this system, the battery management system (BMS) and each group of battery monitoring units are connected via a CAN bus. A pulse width modulation (PWM) harness is added to create a ring connection between the BMS and the battery monitoring units. Specifically, the BMS sends the first target signal from each set of target signals to the first group of battery monitoring units via the PWM harness. The target signal is a signal with a specified frequency and duty cycle. Each battery monitoring unit then collects the signal sent to it via the PWM harness and compares it with the target signals to determine its own target signal. The battery monitoring unit then encodes its own position according to the determined target signal, obtaining its own position identifier. When communicating with the BMS, it sends a communication ID within the communication ID range corresponding to its position identifier to the BMS via the CAN bus. Finally, the battery monitoring unit sends the target signal corresponding to the next position of its current position to its current downstream target via the PWM harness. In this context, the current downstream object corresponding to the battery monitoring unit refers to the battery monitoring unit or battery management system connected to it via pulse width modulation (PWM) and not currently sending signals to it via PWM. Finally, the battery management system collects the signals sent to it by the last group of battery monitoring units via the PWM harness. By comparing the collected signals with the target signals, it determines its own target signals and, based on these, determines the number of battery monitoring units. Thus, each battery monitoring unit uses the same processing logic, learns its corresponding communication ID range, and can distinguish the data sent by each battery monitoring unit based on the range of its communication ID. This allows all battery monitoring units to use the same program, share the same CAN bus, and differentiate data sent by different battery monitoring units, effectively avoiding resource waste and the inconvenience of compiling and downloading multiple different programs. Attached Figure Description
[0052] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0053] Figure 1 This application provides a schematic diagram of the architecture of an in-vehicle communication system.
[0054] Figure 2 A flowchart illustrating a vehicle-mounted communication method provided in an embodiment of this application;
[0055] Figure 3 A flowchart illustrating a method for determining a target signal acquired by itself, provided in an embodiment of this application;
[0056] Figure 4 This is a schematic diagram of the architecture of an electronic device provided in an embodiment of this application. Detailed Implementation
[0057] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0058] In this application, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0059] This application provides a vehicle communication method to solve the problems of existing technologies being wasteful of computer resources or overly cumbersome.
[0060] To implement the vehicle communication method provided in the embodiments of this application, a corresponding vehicle communication system is provided in the embodiments of this application. For example... Figure 1 As shown in the embodiment of this application, a vehicle communication system includes:
[0061] A battery management system and multiple battery monitoring units.
[0062] Each battery monitoring unit is connected sequentially via a pulse width modulation (PWM) harness.
[0063] The battery management system (BMU) is connected to the first and last group of battery monitoring units (BMUs) in a series of sequential connections via a pulse width modulation (PWM) harness. In this embodiment, an additional PWM harness is added to allow the BMU to be connected to multiple BMUs sequentially via the PWM harness, forming a ring connection. Different signals, i.e., signals with different frequencies and duty cycles, can then be transmitted through this harness. Each BMU can then adaptively learn based on these signals to encode its position.
[0064] Furthermore, the BMS is connected to each battery monitoring unit via the same CAN bus, meaning that the battery management system and multiple battery monitoring units are all connected to the same CAN bus.
[0065] It should be noted that the first group of battery monitoring units and the last group of battery monitoring units are relative terms. Among each battery monitoring unit, there will be two battery monitoring units connected to only one battery monitoring unit. Either of these two battery monitoring units can be regarded as the first group of battery monitoring units, and the corresponding other group is regarded as the last group of battery monitoring units.
[0066] Based on the vehicle communication system provided above, this application provides a vehicle communication method, which is applied to the aforementioned vehicle communication system. For example... Figure 2 As shown in the figure, an embodiment of this application provides a vehicle communication method, which includes the following steps:
[0067] S201, The battery management system sends the first target signal among the target signals to the first group of battery monitoring units through the pulse width modulation harness.
[0068] The target signal is a signal with a specified frequency and a specified duty cycle, and different target signals have different frequencies and / or duty cycles.
[0069] It should be noted that, in this embodiment, multiple target signals are used, and the location of the battery monitoring unit needs to be determined based on the collected target signals. This can be simply understood as determining which monitoring group the battery monitoring unit belongs to. Therefore, each target signal has a corresponding location, and the locations of these target signals are consecutive. This ensures that when sending target signals according to their corresponding locations, the location of the battery monitoring unit can be determined based on the location of the received target signal. The entire process begins with the battery management system, which sends the first target signal among the target signals to the first group of battery monitoring units.
[0070] Optionally, since the number of battery monitoring units is initially uncertain for the system, only the first target signal can be configured at the beginning. Subsequent target signals for the next location can be generated and sent according to rules. Alternatively, multiple target signals can be predetermined and applied directly later; even if not all target signals are applied, the learning results will not be affected.
[0071] It should also be noted that the first group of battery monitoring units refers to any one of the two groups of battery monitoring units connected to the battery management system via the PWM harness, while the other group is the last group of battery monitoring units.
[0072] Optionally, the BMS can send the first target signal to the first group of battery monitoring units when it receives the ID learning instruction from the external host computer.
[0073] Optionally, to ensure that each component in the system can perform its function correctly, the BMS and BMU can be further initialized before executing step S201. This includes initializing the MCU clock, CAN module, PWM module, etc.
[0074] S202. Each battery monitoring unit collects the signals sent to it through the pulse width modulation harness, and determines the target signal it has collected by comparing the collected signals with each target signal.
[0075] It should be noted that in the embodiments of this application, the battery management system and each group of battery monitoring units are connected in a ring via PWM. Correspondingly, in the communication ID learning process, the signal is also sent in this ring. That is, for each object in each system, the next object will be sent a signal, and the previous object will also be received.
[0076] Specifically, for the first group of battery monitoring units, after the battery management system sends a target signal to it via PWM, it can acquire the signal sent to it from the PWM harness. For other battery monitoring units, they can acquire signals sent to them by other battery monitoring units connected to them from the PWM harness.
[0077] Specifically, after each battery monitoring unit is powered on, it can continuously attempt to acquire signals sent to it by the PWM harness through the input capture module. When a signal is acquired, it can compare the acquired signal with each target signal to determine which target signal it has acquired, and then execute the subsequent steps S203 to S205. That is, the working logic of each battery monitoring unit is consistent, so the same program can be used.
[0078] Specifically, when a sender transmits a target signal to a receiver, the receiver receives that target signal. Therefore, by comparing the acquired signal with various target signals, the signal that matches the acquired signal is the target signal acquired by the sender. Thus, by comparing the acquired signal with various target signals, the target information that matches the acquired signal can be identified and designated as the acquired target signal, which also determines which target signal the sender transmitted.
[0079] It should be noted that, in this embodiment, the acquired signal is compared with each target signal. Specifically, the frequency and duty cycle of the acquired signal are compared with the frequency and duty cycle of the target signal. If the frequency and duty cycle of the acquired signal are consistent with those of the target signal, it indicates that the two signals are identical.
[0080] Optionally, considering that frequency signals may be affected by electromagnetic interference in a vehicle, the transmitted target signal may be interfered with. Therefore, in another embodiment of this application, a specific implementation of step S202 includes:
[0081] The system continuously acquires signals sent to it through the pulse width modulation harness. For each acquired signal, it compares the acquired signal with each target signal until the deviation of a preset number of acquired signals from one of the target signals meets a preset deviation range. Then, the target signal whose deviation from the preset number of acquired signals meets the preset deviation range is determined as the target signal acquired by the system.
[0082] Specifically, frequency deviation range and duty cycle deviation range can be preset separately. Only when the frequency and duty cycle of the acquired signal are both within the corresponding deviation range are they considered to be the target signal. Furthermore, to avoid errors, in this embodiment, it is necessary for a preset number of acquired signals to be within the preset deviation range of the target signal to confirm that the received signal is indeed the target signal. For example, if the target signal is a 500Hz signal with a 10% duty cycle, and a 10% tolerance is applied to the frequency signal (i.e., the preset deviation range for the frequency is 10%), and a 4% tolerance is applied to the duty cycle signal (i.e., the preset deviation range for the duty cycle is 4%), then if a 550Hz, 14% PWM signal is acquired, it will be classified as a 500Hz, 10% signal. If a 500Hz, 15% PWM signal is acquired, since the duty cycle exceeds the preset deviation range, a preset number of signals need to be reacquired.
[0083] Optionally, in another embodiment of this application, signals transmitted to it via a pulse width modulation (PWM) harness are continuously acquired, and each acquired signal is compared with various target signals until the deviations of a preset number of continuously acquired signals from one of the target signals all meet a preset deviation range. The target signal whose deviations from the preset number of continuously acquired signals all meet the preset deviation range is determined as the target signal acquired by the application. Figure 3 As shown, it includes the following steps:
[0084] S301, Acquire the signal sent to it through the pulse width modulation harness.
[0085] S302. Determine if the current signal set is empty.
[0086] It should be noted that, in order to facilitate the recording of signals that continuously meet the deviation conditions, a set is used to store the signals that meet the deviation conditions in this embodiment. Of course, it is also possible to directly count without storing the signals.
[0087] If it is determined that the current signal set is empty, then step S303 is executed. If it is determined that the current signal set is not empty, then step S305 is executed.
[0088] S303. By comparing the currently acquired signal with each target signal, determine whether the deviation between the currently acquired signal and any target signal meets the preset deviation range.
[0089] If it is determined that the deviation between the currently acquired signal and any target signal does not meet the preset deviation range, then return to step S301.
[0090] If it is determined that the deviation between the currently acquired signal and any target signal meets the preset deviation range, then step S304 is executed.
[0091] S304. Determine that the currently acquired signal belongs to the target signal whose deviation meets the preset deviation range, and place the currently acquired signal into the current signal set.
[0092] Since the current signal set is empty, only one target signal has a deviation that meets the preset deviation range. This indicates that the target signal may be the target signal sent by the upstream object. Therefore, the currently acquired signal is determined to be a target signal whose deviation meets the preset deviation range, and the currently acquired signal is placed in the current signal set. Then, we can return to step S301 and continue to acquire the next signal.
[0093] S305. Compare whether the deviation between the currently acquired signal and the target signal in the current signal set meets the preset deviation range.
[0094] Since the current signal set already contains previously acquired signals, and it is necessary to ensure that the continuously acquired signals all belong to the same target signal, it is possible to determine whether the continuously acquired signals belong to the same target signal simply by comparing whether the deviation between the currently acquired signal and the target signal to which the signal in the current signal set belongs meets the preset deviation range. This eliminates the need to compare with each target signal individually, thereby effectively improving processing efficiency.
[0095] If the deviation between the currently acquired signal and the target signal in the current signal set does not meet the preset deviation range, it indicates that the continuously acquired signals do not belong to the same target signal, so step S306 is executed. If the deviation between the currently acquired signal and the target signal in the current signal set meets the preset deviation range, it indicates that the currently acquired signal and the signals in the set belong to the same target signal, so step S307 can be executed directly.
[0096] S306. Clear the current signal set.
[0097] It should be noted that after executing step S306, it is necessary to return to execute step S301.
[0098] S307. Place the currently acquired signal into the current signal set.
[0099] S308. Determine whether the number of signals in the current signal set is the preset number.
[0100] If it is determined that the number of signals in the current signal set is not the preset number, then return to step S301. If it is determined that the number of signals in the current signal set is the preset number, then proceed to step S309.
[0101] S309. Determine the target signal to which the signal in the current signal set belongs as the target signal acquired by itself.
[0102] S203. The battery monitoring unit encodes its own position according to the position corresponding to the target signal it has collected, and obtains its own position identifier. When communicating with the battery management system, it sends the communication ID within the communication ID range corresponding to its own position identifier to the battery management system via the CAN bus.
[0103] It should be noted that since the target signal is sent according to its corresponding location, when the current group of battery monitoring units acquires a target signal, it means that it belongs to the location corresponding to that target signal. Therefore, the battery monitoring unit can be encoded according to that location. For example, if the BMS sends the first target signal as a 500Hz, 10% PWM signal, and the signal received by a group of battery monitoring units is a 500Hz, 10% PWM signal, then it means that it is the first group of battery monitoring units and can be encoded and marked as BMU1.
[0104] It should also be noted that in this embodiment, the communication ID range corresponding to each location is predetermined. For example, the communication ID range of BMU1 is 0x18E00000~0x18E0FFFF, while the communication ID range of BMU2 is 0x18E10000~0x18E1FFFF. Therefore, after a battery monitoring unit learns its own location, it determines its corresponding communication ID range, and can subsequently use its determined location identifier to send communication IDs within the corresponding communication ID range. For example, for the first group of battery monitoring units, when communication is required, it will send a CAN communication ID to the BMS as BMU1. Accordingly, the BMS can determine which battery monitoring unit sent the data based on the communication ID range of the received communication ID.
[0105] S204. The battery monitoring unit sends the target signal corresponding to the next position of its own position to its corresponding current downstream object through the pulse width modulation harness.
[0106] Here, the current downstream object corresponding to the battery monitoring unit refers to the battery monitoring unit or battery management system that is connected to it via pulse width modulation and is not currently sending signals to it via pulse width modulation.
[0107] Specifically, in order for the next battery monitoring unit to learn the communication ID and for the BMS to determine the number of monitoring units in the system and confirm the completion of learning, a battery monitoring unit, after learning its own communication ID, needs to send the next target object to the next object it is connected to. For the last group of battery monitoring units, which is connected to the BMS, it sends the target signal corresponding to the next location to the BMS. Other battery monitoring units, on the other hand, send the target signal corresponding to the next location to the next connected battery monitoring unit.
[0108] Optionally, in another embodiment of this application, one specific implementation of step S204 includes:
[0109] The battery monitoring unit updates the target signal it has collected according to a preset unit change, obtains the target signal corresponding to the next position of its own position, and sends it to its corresponding current downstream object.
[0110] Specifically, the preset unit change may include one or both of the preset unit change in frequency and the preset unit change in duty cycle. Therefore, in this embodiment, the deviation between two adjacent target signals is consistent.
[0111] Optionally, in another embodiment of this application, a specific implementation of the battery monitoring unit updating the target signal it has collected according to a preset unit change amount to obtain the target signal corresponding to the next position of its own position includes:
[0112] The battery monitoring unit keeps the frequency of the target signal it has collected constant and increases the duty cycle by a preset unit change ratio to obtain the target signal corresponding to the next position of its own position.
[0113] It should be noted that different frequency signals have different durations. For example, at a frequency of 100Hz, each high or low level lasts for 5ms. However, at 1000Hz, each high or low level lasts for 500µs, resulting in a significant time span. The input capture module's function is to acquire data based on these high and low levels. Therefore, in this embodiment, a method of continuously generating the target signal with a constant frequency and an increasing duty cycle is used. For example, if there are two BMUs, when the BMS sends a 500Hz, 10% signal to BMU1, BMU1 will generate a 500Hz, 20% signal and send it to BMU2 via a PWM harness. Meanwhile, BMU2 will generate a 500Hz, 30% signal and send it to the BMS via a PWM harness.
[0114] S205 The battery management system collects the signals sent to it by the last group of battery monitoring units through the pulse width modulation harness, and determines the target signal it has collected by comparing the collected signal with the target signal.
[0115] It should be noted that the specific implementation of step S205 can be referred to the specific implementation of step S202 accordingly, and will not be repeated here.
[0116] S206. The battery management system determines the number of battery monitoring units based on the target signals it has collected.
[0117] Since the target signal is sent according to its corresponding location, the number of battery monitoring units can be determined based on the location finally sent to the battery management system, which makes it easier to distinguish the data sent by each battery monitoring unit later.
[0118] Optionally, when the target signal is continuously generated according to a preset unit change, a specific implementation of step S206 includes:
[0119] The first target signal is compared with the target signal collected by itself to obtain the total signal change. The total signal change is then divided by the preset unit change to obtain the number of battery monitoring units.
[0120] In this embodiment, the target signal is continuously generated according to a preset unit change amount, that is, the change amount is continuously superimposed. Each time the target signal changes, that is, each time the change amount is superimposed, the position corresponding to the generated target signal is also incremented by one position. Therefore, the number of battery monitoring units can be obtained based on the quotient of the total signal change amount and the preset unit change amount.
[0121] For example, the target signal is continuously generated with a duty cycle of 10%. When the BMS sends a 500Hz signal with a 10% duty cycle to BMU1, it eventually receives a 500Hz signal with a 30% duty cycle. Therefore, the total change in duty cycle is 20%. Dividing this by 10% gives 2, indicating that there are two BMUs.
[0122] Optionally, in another embodiment of this application, it further includes:
[0123] After sending the first target signal, the battery management system monitors in real time whether it has collected the signal sent to it by the last group of battery monitoring units through the pulse width modulation harness within a preset time.
[0124] If the signal sent by the last group of battery monitoring units through the pulse width modulation harness is not collected within the preset time, it indicates that a battery monitoring unit has malfunctioned, and an alarm message can be sent at this time.
[0125] This application provides a vehicle communication method applied to a vehicle communication system. In this system, the battery management system (BMS) and each group of battery monitoring units are connected via a CAN bus. A pulse width modulation (PWM) harness is added to create a ring connection between the BMS and the battery monitoring units. Specifically, the BMS sends the first target signal from each target signal to the first group of battery monitoring units via the PWM harness; the target signal is a signal with a specified frequency and duty cycle. Each battery monitoring unit then collects the signal sent to it via the PWM harness and compares it with the target signals to determine its own target signal. The battery monitoring unit then encodes its own position according to the determined target signal, obtaining its own position identifier. When communicating with the BMS, it sends a communication ID within the communication ID range corresponding to its position identifier to the BMS via the CAN bus. Finally, the battery monitoring unit sends the target signal corresponding to its next position to its corresponding downstream object via the pulse width modulation (PWM) harness. The current downstream object refers to the battery monitoring unit or battery management system connected to it via PWM that is not currently sending a signal to it via PWM. The battery management system then collects the signals sent to it by the last group of battery monitoring units via the PWM harness. By comparing the collected signals with the target signals, it determines its own target signals and, based on these, determines the number of battery monitoring units. Thus, each battery monitoring unit uses the same processing logic, learns its corresponding communication ID range, and can distinguish the data sent by each battery monitoring unit based on the range of its communication ID. This allows all battery monitoring units to use the same program, share the same CAN bus, and differentiate data sent by different battery monitoring units, effectively avoiding resource waste and the inconvenience of compiling and downloading multiple different programs.
[0126] Another embodiment of this application provides an electronic device, such as... Figure 4 As shown, it includes:
[0127] Memory 401 and processor 402.
[0128] The memory 401 is used to store the program.
[0129] The processor 402 is used to execute the program stored in the memory 701, which, when executed, is specifically used to implement the vehicle communication method provided in any of the above embodiments.
[0130] Another embodiment of this application provides a computer storage medium for storing a computer program, which, when executed, implements the vehicle communication method provided in any of the above embodiments.
[0131] Computer storage media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0132] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. 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.
[0133] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A vehicle-mounted communication method, characterized in that, An in-vehicle communication system is applied, comprising a battery management system and multiple battery monitoring units. The battery monitoring units are sequentially connected via pulse width modulation (PWM) harnesses. The battery management system is connected to the first and last groups of battery monitoring units via PWM harnesses, and to each battery monitoring unit via the same CAN bus. The in-vehicle communication method includes: The battery management system sends the first target signal among various target signals to the first group of battery monitoring units via a pulse width modulation harness; wherein, the target signal is a signal with a specified frequency and a specified duty cycle, and the specified frequency and specified duty cycle of different target signals are different; Each of the battery monitoring units acquires signals sent to it via a pulse width modulation harness, and determines the target signal it has acquired by comparing the acquired signal with each of the target signals. The battery monitoring unit encodes its own position according to the position corresponding to the target signal it has collected, and obtains its own position identifier. When communicating with the battery management system, it sends a communication ID within the communication ID range corresponding to its own position identifier to the battery management system via the CAN bus. The battery monitoring unit sends the target signal corresponding to its next position to its corresponding current downstream object via a pulse width modulation (PWM) harness; wherein, the current downstream object corresponding to the battery monitoring unit refers to the battery monitoring unit or the battery management system that is connected to it via PWM and is not currently sending a signal to it via PWM; the target signal corresponding to the next position is obtained by updating the target signal it has collected by itself through a preset unit change amount; The battery management system collects the signals sent to it by the last group of battery monitoring units through the pulse width modulation harness, and determines the target signal it has collected by comparing the collected signals with the target signal. The battery management system determines the number of battery monitoring units based on the target signals it has collected.
2. The method according to claim 1, characterized in that, The battery monitoring unit acquires signals transmitted to it via a pulse width modulation harness, and determines the target signals it has acquired by comparing the acquired signals with each of the target signals, including: The system continuously acquires signals transmitted to it via a pulse width modulation (PWM) harness. For each acquired signal, the acquired signal is compared with each of the target signals until the deviations of a preset number of continuously acquired signals from one of the target signals all meet a preset deviation range. The target signal whose deviations from the preset number of continuously acquired signals all meet the preset deviation range is determined as the target signal acquired by the system.
3. The method according to claim 2, characterized in that, The continuous acquisition of signals transmitted to it via a pulse width modulation (PWM) harness, and the comparison of each acquired signal with each of the target signals, until the deviations of a preset number of continuously acquired signals from one of the target signals all meet a preset deviation range, and the target signal whose deviations from the preset number of continuously acquired signals all meet the preset deviation range is determined as the target signal acquired by itself, including: Acquire signals transmitted to it via a pulse width modulation (PWM) harness; Determine if the current signal set is empty; If it is determined that the current signal set is empty, then by comparing the currently acquired signal with each of the target signals, it is determined whether the deviation between the currently acquired signal and any of the target signals meets the preset deviation range. If it is determined that the deviation between the currently acquired signal and any of the target signals does not meet the preset deviation range, then return to the step of acquiring the signal sent to it through the pulse width modulation harness; If it is determined that the deviation between the currently acquired signal and any of the target signals meets a preset deviation range, then the currently acquired signal is determined to belong to the target signal whose deviation meets the preset deviation range, and the currently acquired signal is placed in the current signal set; If it is determined that the current signal set is not empty, then compare whether the deviation between the currently acquired signal and the target signal to which the signal in the current signal set belongs meets the preset deviation range. If the deviation between the currently acquired signal and the target signal to which the signal in the current signal set belongs does not meet the preset deviation range, then the current signal set is cleared, and the process returns to the step of acquiring the signal sent to it through the pulse width modulation harness. If the deviation between the currently acquired signal and the target signal belonging to the signal in the current signal set meets a preset deviation range, then the currently acquired signal is placed in the current signal set. Determine whether the number of signals in the current signal set is the preset number; If it is determined that the number of signals in the current signal set is not the preset number, then return to the step of collecting the signals sent to it through the pulse width modulation harness; If it is determined that the number of signals in the current signal set is the preset number, then the target signal to which the signal in the current signal set belongs is identified as the target signal acquired by itself.
4. The method according to claim 1, characterized in that, The battery monitoring unit sends the target signal corresponding to the next position of its own position to its corresponding current downstream object via a pulse width modulation harness, including: The battery monitoring unit updates the target signal it has collected according to a preset unit change amount, obtains the target signal corresponding to the next position of its own position, and sends it to its corresponding current downstream object.
5. The method according to claim 4, characterized in that, The battery monitoring unit updates the target signal it has collected according to a preset unit change, and obtains the target signal corresponding to the next position of its own position, including: The battery monitoring unit keeps the frequency of the target signal it has collected unchanged and increases the duty cycle by a preset unit change ratio to obtain the target signal corresponding to the next position of its own position.
6. The method according to claim 4, characterized in that, The battery management system determines the number of battery monitoring units based on the target signals it has collected, including: The first target signal is compared with the target signal collected by itself to obtain the total signal change. The number of battery monitoring units is obtained by dividing the total signal change by the preset unit change.
7. The method according to claim 1, characterized in that, Also includes: After sending the first target signal, the battery management system monitors in real time whether it has collected the signal sent to it by the last group of battery monitoring units through the pulse width modulation harness within a preset time. If the signal sent by the last group of battery monitoring units through the pulse width modulation harness is not collected within the preset time, an alarm message will be sent.
8. A vehicle-mounted communication system, characterized in that, include: A battery management system and multiple battery monitoring units; The battery monitoring units in each group are connected sequentially via pulse width modulation harnesses; The battery management system is connected to the first and last groups of battery monitoring units via pulse width modulation wiring harnesses, and is also connected to each of the battery monitoring units via the same CAN bus. The vehicle communication method includes: The battery management system is configured to send the first target signal from each target signal to the first group of battery monitoring units via a pulse width modulation (PWM) harness, and to collect the signal sent to the last group of battery monitoring units via the PWM harness. By comparing the collected signal with the target signal, the system determines the target signal it has collected, and based on the determined target signal, it determines the number of battery monitoring units. The target signal is a signal with a specified frequency and a specified duty cycle; different target signals have different specified frequencies and duty cycles. The battery monitoring unit is configured to: collect signals transmitted to it via a pulse width modulation harness, and determine the target signals it has collected by comparing the collected signals with each of the target signals. According to the determined location corresponding to the target signal collected by itself, the self-position is encoded to obtain its own position identifier, so that when communicating with the battery management system, the communication ID within the communication ID range corresponding to its own position identifier is sent to the battery management system via the CAN bus. The target signal corresponding to the next position of the battery monitoring unit is sent to its corresponding current downstream object via a pulse width modulation (PWM) harness; wherein, the current downstream object corresponding to the battery monitoring unit refers to the battery monitoring unit or the battery management system that is connected to it via PWM and is not currently sending signals to it via PWM; the target signal corresponding to the next position is obtained by updating the target signal collected by the battery monitoring unit through a preset unit change.
9. An electronic device, characterized in that, include: Memory and processor; The memory is used to store programs; The processor is used to execute the program, which, when executed, is specifically used to implement the vehicle communication method as described in any one of claims 1 to 7.
10. A computer storage medium, characterized in that, Used to store a computer program, which, when executed, is used to implement the vehicle communication method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Battery management system and control method thereof
CN105730274A
Automatic addressing method and system for electric automobile cell management system
CN106657435A
Battery manager system (BMS), electronic control unit (ECU), and communication method between BMS and ecu
CN112823497A