SOC estimation method based on electric vehicle controller
By using the ADC module to collect data in the electric vehicle controller and combining the open circuit voltage method and the A-time integration method, the problem of inaccurate SOC calculation of lead-acid battery is solved, and more accurate and stable power display is achieved, which improves the two-wheel electric power The bike ride experience.
Patent Information
- Application Number
- CN202411336290.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2024-11-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing SOC calculation method for lead-acid batteries is not accurate enough, resulting in unstable battery display when riding a two-wheeled electric bike, affecting the user experience.
The SOC estimation method based on the electric vehicle controller is adopted, voltage and current data are collected through the ADC module, and SOC calculation is performed in combination with the open circuit voltage method and the A-time integration method, and the data is accurately corrected and displayed through the first-line protocol.
Improves the accuracy and stability of SOC display, avoids battery fluctuations, and enhances the riding experience.
Smart Images

Figure CN118906913A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a SOC estimation method based on an electric vehicle controller, and belongs to the field of electric vehicle control. Background Art
[0002] Lead-acid batteries are still one of the most widely used chemical power sources due to their mature technology, high safety, and low price. Their performance directly affects the performance of two-wheeled electric vehicles. With the advancement of technology, there is a strong demand for batteries in the market, especially lead-acid batteries, which are widely used. The problem that follows is that there are various methods for calculating the remaining battery capacity (State of Charge, or SOC), and the calculation results are not accurate enough. Each algorithm has its own unavoidable shortcomings. In the current examples on the market where the battery SOC power is integrated into the controller and displayed through the instrument of the two-wheeled electric vehicle, the SOC power display is not accurate enough. The ampere-hour integration can accurately measure the actual capacity of the battery, avoiding capacity errors caused by inconsistent charge and discharge curves or battery aging. When multiple batteries are used in series or parallel, the ampere-hour integration can ensure that the usage of each battery is consistent, avoiding overuse or underuse of some batteries, thereby maintaining the overall performance and life of the battery pack.
[0003] In summary, in the examples currently on the market where the SOC capacity of lead-acid batteries is integrated into the controller and displayed through the instrument panel of two-wheeled electric vehicles, there will be a phenomenon of power jumps when the handlebar is turned to the bottom while riding, indicating that the SOC display is not accurate and stable enough, which greatly reduces the user's riding experience. Summary of the invention
[0004] The purpose of the present invention is to provide a SOC estimation method based on an electric vehicle controller to solve the problem that current SOC calculation and display are not accurate enough.
[0005] To achieve the above object, the technical solution adopted by the present invention is: a SOC estimation method based on an electric vehicle controller, which comprises the following steps: Step 1: Start powering on; Step 2: The ADC module of the chip collects voltage and current values; Step 3: Calculate the SOC value based on the collected data, using the open circuit voltage method to look up the OCV table for calibration when at rest, and using the ampere-hour integration method for estimation during charging and discharging; Step 4: Correct the SOC data; Step 5: Send the SOC data to the controller chip via the one-line protocol and display it in the instrument.
[0006] Further, in step 3, when the battery is being processed and left standing, according to the type and model of the battery, obtain the OCV-SOC reference curve provided by the battery manufacturer, compare the measured open-circuit voltage value with the reference curve, and find the corresponding SOC value.
[0007] Further, in step 3, when standing through the initial power-on, calibrate the SOC according to the current temperature and the total battery voltage. Retrieve the current temperature T and voltage V according to the OCV-SOC table to calibrate a true SOC.
[0008] Further, in step 3, the SOC value estimation method during charge and discharge is as follows: Use the integration of time and charge / discharge current, and the correction at the end of charge and discharge to jointly estimate the SOC:
[0009] where: SOC 0 is the capacity when the battery is powered on, defaulting to the current capacity stored in the single-chip microcomputer or the capacity before power-off or the capacity recognized during power-on; Q total is the current actual total capacity of the battery; t0 and t1 are the start time and end time, and I is the real-time current; The above formula means that the change in the amount of electricity is obtained by the ratio of the integral of the current during this period to the total capacity, so as to perform accumulation and subtraction on the basis of the original amount of electricity; during the operation, ampere-hour integration is performed once every 1 s, and according to the load size, the remaining capacity is corrected and then a true SOC is corrected.
[0010] Further, when the BMS detects full charge, calibrate the SOC to 100%; when the BMS detects over-discharge, calibrate the SOC to 0%.
[0011] Further, in step 4, the SOC value correction strategy is as follows: (1) In the small current charging stage, use fast following correction, and increase the true SOC value by 1% every T (1 < T < 5) min; (2) During the discharge stage, the temperature coefficient accelerates the change of the true SOC value and the displayed value; (3) In case of over-discharge failure, trigger the rapid correction of the true SOC value to the specified SOC.
[0012] Even further, in the small current charging stage, use fast following correction, 1% SOC / min: the current cumulative charging capacity = the current cumulative charging capacity + the SOC correction current; During the discharge stage, accelerate the SOC change through the temperature coefficient: (1) If the true SOC value is greater than SOC 2 , and the highest temperature of the battery cell is greater than the lower threshold of the highest temperature of the battery cell and less than the higher threshold of the highest temperature of the battery cell, then calibrate the current at this time; (2) If the SOC display value is greater than SOC 2 , and the maximum temperature of the battery cell is greater than the low threshold of the maximum temperature of the battery cell, and less than the high threshold of the maximum temperature of the battery cell, then calibrate the current at this time; Among them, SOC 2 It is the SOC threshold that accelerates the SOC change through the temperature coefficient during the discharge phase; the calculation formula is: Current = discharge current * 10 / (6 + (cell maximum temperature - cell maximum temperature low threshold) * 4 / (cell maximum temperature high threshold - cell maximum temperature low threshold)); When the discharge current is too large and triggers an over-discharge fault, the actual SOC value is quickly corrected to the specified SOC: (1) If an over-discharge fault is triggered and the actual SOC value is higher than the SOC low threshold, the cumulative discharge capacity is corrected; the calculation formula is: Current cumulative discharge capacity = current cumulative discharge capacity + SOC correction current - discharge current; At the same time, when the internal module voltage is lower than the SOC low threshold BATTVOTSOCLIM of the battery module voltage, the actual SOC value is corrected to the SOC low threshold. The calculation formula is: The currently used capacity (real value) = the currently used capacity (real value) * SOC low threshold / 100; (2) If the actual SOC value is higher than (SOC low threshold + 5) and MOS is closed, the calculation formula is: Current cumulative discharge capacity (true value) = current cumulative discharge capacity (true value) + MOS dual-closed hardware power consumption.
[0013] Furthermore, in step 4, the SOC real value full charge judgment strategy is: if the full charge flag is valid, the currently used capacity = the rated capacity of the battery; SOC true value boundary strategy: (1) If the currently used capacity exceeds the rated capacity of the battery, then the currently used capacity = the rated capacity of the battery; (2) If the current used capacity is less than the SOC of the battery's rated capacity 3 Value, that is, the currently used capacity = battery rated capacity * SOC 3 , SOC 3 is the minimum boundary value, and SOC 3 <5%; SOC real value high-end maintenance strategy: (1) If it is in low current charging state or full charge is detected; If the SOC true value with 10 times higher accuracy > SOC 4 , then enable the SOC high-end hold flag to be valid, and improve the SOC real value with 10 times accuracy = 1000; (2) If the SOC high-end hold flag is valid && the SOC true value with 10 times the accuracy is greater than SOC4, then the SOC true value with 10 times the accuracy is equal to 1000; Otherwise, if the SOC true value with 10 times higher accuracy is <= SOC 4 , then clear the SOC high-end hold flag valid bit; if the SOC true value with 10 times the accuracy is > SOC 4 , then the SOC true value with 10 times higher accuracy = SOC 4 ; where 1000>SOC 4 >950.
[0014] Furthermore, in step 4, the SOC display value correction strategy is: if fully charged or over-discharged, the SOC display value is the SOC true value; SOC display value boundary value strategy: If the SOC full charge flag ‖ SOC actual value = 100, the currently used capacity display value = battery rated capacity; SOC display value is 99%-SOC 5 % means 99%, in SOC 5 %-100% is expressed as 100%, where SOC 5 is the SOC threshold for anti-jumping; SOC display value following strategy: charging current is greater than I1A or discharging current is greater than I1A, satisfying (SOC real value belongs to (2%, 100%]&&SOC display value and SOC real value have difference)||(SOC real value is 2%&&SOC display value under discharge>SOC real value); Under the above conditions, the discharge state &&discharge current is greater than I1A, and the SOC display value adopts the discharge follow strategy; Under the above conditions, the charging state && charging current is greater than I1A, and the SOC display value adopts the charging follow strategy; <I1<10。
[0015] Furthermore, in step 5, the entire data transmission process is managed by a state machine to implement a complete transmission process of a single-line communication, and the steps include: (1) Initialization management: Initialize control structure and GPIO; (2) Signal and data transmission management: sending a single signal and a set of data; (3) Battery information sending function: fill a data buffer SignTxBuf, which contains battery status information. This information is sent out through the one-line communication protocol: the current, voltage, and SOC are calculated and stored in the data sending buffer. According to the mode, it is decided whether to store the current in the buffer. Finally, the checksum is calculated and stored. (4) Signal sending state management: used to manage the state transition and processing of the state machine: define the sending idle state, sending start state, sending end state, and sending information state; and perform transitions between the four states by judging the duration of high and low level signals; (5) State transition and processing of the state machine: update the variables of the state machine under different conditions and return the corresponding state according to the state of the signal pin; (6) Receive state machine processing: manages the receive process by checking and updating multiple state variables.
[0016] The beneficial effects of the present invention are as follows: based on the analysis of the traditional method for monitoring the insufficient SOC of the battery, the present invention proposes to use the open circuit voltage method and the ampere-hour integration method as well as some dynamic correction strategies to monitor the change of the battery SOC in real time, and at the same time adopts a one-line speed protocol to realize the communication between chips. Compared with the SOC display of the two-wheeled electric vehicles currently on the market, it is more accurate and stable, and it also solves the problem of the load state fluctuation of the two-wheeled electric vehicles and the excessively inaccurate SOC. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is a flow chart of the present invention; Figure 2 It is a message format definition diagram; Figure 3 It is the schematic diagram of data transmission; Figure 4 This is the format of the front-line notification document; Figure 5 It is the application message format (data content in the main message format). DETAILED DESCRIPTION
[0018] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0019] like Figure 1 , a SOC estimation method based on an electric vehicle controller comprises the following steps: Step 1: Start powering on; Step 2: The ADC module of the chip collects voltage and current values; Step 3: Calculate the SOC value based on the collected data, using the open circuit voltage method to look up the OCV table for calibration when the device is stationary, and the ampere-hour integration method when charging and discharging; Step 4: Correct the SOC data according to the correction strategy; Step 5: Send the SOC data to the controller chip via the one-line protocol and display it in the instrument.
[0020] The estimation, correction, data transmission, control and display are further described below.
[0021] 1. SOC estimation calibration strategy: To obtain the true value of SOC, you first need to obtain the voltage and current values of the ADC module in the chip, and then obtain the true value of SOC through SOC calibration and estimation strategy.
[0022] 1.1 SOC estimation: State-Of-Charge, referred to as SOC, refers to the state of charge, which reflects the remaining capacity of the battery pack, specifically the ratio of the remaining capacity of the battery under a certain discharge rate to the rated capacity under the same conditions. Users need to know the remaining capacity of the battery in real time when using electric vehicles, which is convenient for users to take corresponding treatment measures, and has very practical significance. In actual environments, the estimation accuracy of the SOC remaining capacity depends on the estimation method. Due to the different algorithms used, the estimation accuracy of the battery remaining capacity is easily affected by the load voltage detection accuracy. This embodiment uses open circuit voltage and ampere-hour integration to estimate SOC.
[0023] 1.2 SOC calibration: When the vehicle is in the "stationary" state and the current |I|<(C1)mA is detected for T1h (where |I| is the current value, C1 is the current threshold for monitoring whether it is stationary, and T1 is the duration of the stationary state) or when powered on for the first time, the SOC is calibrated according to the current temperature and total battery pressure; the current external temperature is retrieved according to the OCV-SOC table to calibrate a real SOC.
[0024] Specific operation examples Assumption: The current ambient temperature T = 25°C, the total voltage of the battery pack V = 3.75V.
[0025] OCV-SOC table (example only): (1) Based on V = 3.75VT = 25°C, find the corresponding SOC in the OCV-SOC table.
[0026] (2) It was found that the SOC corresponding to 3.75V is between 50% and 60%.
[0027] (3) Calculate SOC using interpolation method: SOC=50+(3.75-3.7) / (3.8-3.7)*(60-50)=50+0.5*10=55%.
[0028] (4) Calibrate the current SOC estimate to 55%.
[0029] 1.3 Specific SOC estimation method: 1.3.1 Open circuit voltage method: The open circuit voltage method is based on the relationship between the open circuit voltage (OCV) of a battery and its SOC. After a battery has been standing for a period of time without charging or discharging, its voltage will tend to a stable value, which is called the open circuit voltage. Different types of batteries have different open circuit voltages at different SOCs. By measuring the open circuit voltage of a battery, the SOC of the battery can be inferred.
[0030] 1.3.2 Steps: Make sure the battery is left to rest long enough before measurement so that the chemical reaction inside it reaches equilibrium, which usually takes several minutes to several hours. The specific time depends on the battery type and previous charge and discharge conditions. Use an accurate voltmeter to measure the open circuit voltage of the battery. According to the type and model of the battery, obtain the OCV-SOC reference curve provided by the battery manufacturer. This curve shows the corresponding open circuit voltage values at different SOCs. Compare the measured open circuit voltage value with the reference curve to find the corresponding SOC value. As shown in Table 1, when the battery is left to rest for the first time and powered on, the SOC is calibrated according to the current temperature and total battery pressure; the current temperature T and voltage V are retrieved according to the OCV-SOC table to calibrate a real SOC.
[0031] Table 1 SOC-OCV matrix
[0032]
[0033] Among them, V1-V33 represent the single cell voltage values at various temperatures and SOCs.
[0034] 1.3.3 Ampere-hour integration method: The basic idea of the SOC estimation algorithm is to use the integration of time and charging and discharging currents, as well as the correction at the end of charging and discharging to form the SOC estimation method.
[0035] SOC calculation method ,in: SOC 0 It is the capacity of the battery when it is powered on. The default is the current capacity or the capacity before power failure stored in the microcontroller or the capacity recognized when it is powered on. Qtotal is the actual total capacity of the battery. Qtotal = Qnominal*SOH (*other coefficients). t0 and t1 are the start time and end time. I is the real-time current. This formula indicates that the change in power is obtained by the ratio of the integral of the current during this period of time to the total capacity, thereby accumulating and subtracting on the basis of the original power. During operation, the ampere-hour integration is performed once every 1s. According to the load size, the remaining capacity is corrected and a real SOC is corrected.
[0036] 1.4 Charging terminal calibration: When the BMS detects "fully charged", the SOC is calibrated to 100%; if it does not reach the previous maximum displayed value SOCmax (that is, when it does not reach full charge, the maximum SOC display value is SOCmax, and the value of SOCmax > 95).
[0037] 1.5 Discharge end calibration: When the BMS detects "over-discharged", the SOC is calibrated to 0%.
[0038] II. SOC correction strategy: 2.1. SOC value correction: (1) During the small current charging stage, use fast following correction, increasing the true SOC value by 1% every T (1 < T < 5) minutes; (2) During the discharge stage, the temperature coefficient accelerates the change of the true SOC value and the displayed value; (3) In case of over-discharge failure, trigger the rapid correction of the true SOC value to the specified SOC.
[0039] 2.1.1 SOC value correction strategy 1 (true SOC value and displayed value) During the small current charging stage, use fast following correction, 1% SOC / min: current cumulative charging capacity = current cumulative charging capacity + SOC correction current.
[0040] 2.1.2 SOC value correction strategy 2 (true SOC value and displayed value) During the discharge stage, accelerate the SOC change through the temperature coefficient: (1) If the true SOC value is greater than SOC 2 , and the highest cell temperature is greater than the lower threshold of the highest cell temperature and less than the upper threshold of the highest cell temperature, then calibrate the current at this time.
[0041] (2) If the displayed SOC value is greater than SOC 2 , and the highest cell temperature is greater than the lower threshold of the highest cell temperature and less than the upper threshold of the highest cell temperature, then calibrate the current at this time.
[0042] Where SOC 2 is the SOC threshold for accelerating the SOC change through the temperature coefficient during the discharge stage, and SOC 2 < 30.
[0043] Calculation formula: Current = discharge current * 10 / (6 + (highest cell temperature - lower threshold of highest cell temperature) * 4 / (upper threshold of highest cell temperature - lower threshold of highest cell temperature)).
[0044] 2.1.3 SOC value correction strategy 3 (true SOC value) When the discharge current is too large to trigger an over-discharge fault, the true value of SOC is quickly corrected to the specified SOC: (1)If the over-discharge fault is triggered and the true value of SOC is higher than the low SOC threshold, the cumulative discharge capacity is corrected: Calculation formula: Current cumulative discharge capacity = current cumulative discharge capacity + SOC correction current - discharge current.
[0045] At the same time, when the internal module voltage is lower than the low SOC threshold BATTVOTSOCLIM of the battery module, the true value of SOC is corrected to the low SOC threshold; Calculation formula: Current used capacity (true value) = current used capacity (true value) * low SOC threshold / 100.
[0046] (2)Otherwise, if the true value of SOC is higher than (low SOC threshold + 5) and the MOS is closed; Calculation formula: Current cumulative discharge capacity (true value) = current cumulative discharge capacity (true value) + MOS double-closed hardware power consumption.
[0047] 2.2 True SOC full charge judgment strategy If the full charge flag is valid, the current used capacity = battery rated capacity.
[0048] 2.2.1 True SOC full charge judgment strategy Full charge flag valid and clearing strategy: (1)If the full charge flag is invalid && (the highest cell voltage >= the low threshold of the highest cell voltage && (the lowest cell voltage >= Vmin) && (the highest cell voltage < Vmax, and this state lasts for more than 10s, then enable the full charge flag to be valid and clear the external load detection status.
[0049] (2)Otherwise, if (the lowest cell voltage <= Vmin) && the full charge flag is valid, then clear the full charge flag valid bit, where Vmax and Vmin are the thresholds of the highest and lowest voltages of a single cell.
[0050] 2.3 True SOC boundary strategy (1)If the current used capacity exceeds the battery rated capacity, then the current used capacity = battery rated capacity.
[0051] (2)Otherwise, if the current used capacity is less than the SOC of the battery rated capacity 3 value, that is, the current used capacity = battery rated capacity * SOC 3 (SOC 3is the minimum boundary value, and SOC 3 <5%).
[0052] 2.4 SOC real value high-end maintenance strategy (1) If it is in low current charging state or full charge is detected; Under the above conditions, if the SOC true value with 10 times higher accuracy > SOC 4 , then the SOC high-end hold flag is enabled, and the SOC true value with 10 times accuracy is improved = 1000.
[0053] (2) Otherwise, if (SOC high-end hold flag is valid && (SOC true value with 10 times higher accuracy > SOC 4 )), then the actual value of SOC with 10 times higher accuracy = 1000.
[0054] If (the SOC true value is improved by 10 times the accuracy <= SOC 4 ), then clear the SOC high-end hold flag valid bit; if (the SOC true value with 10 times the accuracy is increased > SOC 4 ), then the SOC true value with 10 times higher accuracy = SOC 4 . Where 1000>SOC 4 >950.
[0055] 2.5 SOC display value correction strategy If fully charged or over-discharged, the SOC displayed value is the actual SOC value.
[0056] 2.6 SOC display value boundary value strategy (100%) If (SOC full charge flag ‖ SOC actual value = 100), the currently used capacity display value = battery rated capacity.
[0057] The SOC display value is 99%-SOC5% is expressed as 99%, and the SOC 5 %-100% is expressed as 100%, ensuring that the discharge from 100 will not jump directly to 99%. 5 It is the SOC threshold for anti-jumping.
[0058] 2.7 SOC display value following strategy SOC display value following strategy: (1) SOC display value follows: the charging current is greater than I1A or the discharging current is greater than I1A, and it satisfies (the actual SOC value belongs to (2%, 100%]&&there is a difference between the SOC display value and the actual SOC value)||(the actual SOC value is 2%&&the SOC display value during discharge>the actual SOC value).
[0059] Under the above conditions, when in the discharging state && the discharging current is greater than I1A, the SOC display value adopts the discharging following strategy.
[0060] Under the above conditions, when in the charging state && the charging current is greater than I1A, the SOC display value adopts the charging following strategy; where 2 < I1 < 10.
[0061] 2.7.1 SOC display value exits following: When any of the following conditions is met, the SOC display value does not follow and the ampere-hour integration condition is carried out normally: the current belongs to [-I1A, I1A], there is no difference between the SOC display value and the true SOC value, the true SOC value is 2%, and the SOC display value is less than the true SOC value under discharging.
[0062] 2.7.2 SOC display value following strategy (charging): Charging following strategy: In the charging state, the SOC display value can only follow upward.
[0063] When the SOC display value < the true SOC value, the SOC display value will increase rapidly to follow the true SOC value.
[0064] It is divided into three intervals according to the current magnitude: When the charging current is greater than or equal to I1 and less than or equal to I2, the following change increase rate of the SOC display value is C1% SOC / min.
[0065] When the charging current is greater than or equal to I2 and less than or equal to I3, the following change increase rate of the SOC display value is C2% SOC / min.
[0066] When the charging current is greater than I3, the following change increase rate of the SOC display value is C3% SOC / min.
[0067] Where 1A < I1 < I2 < I3 < 20A, 0 < C1 < C2 < C3 <= 1.0.
[0068] When the SOC display value > the true SOC value, the SOC display value will increase slowly to follow the true SOC value.
[0069] The following change rate of the SOC display value is X1 times the original rate (0.2 < coefficient X1 < 1).
[0070] 2.7.3 SOC display value following strategy (discharging) Discharging following strategy: In the discharging state, the SOC display value can only follow downward.
[0071] When the SOC display value > the true SOC value, it follows rapidly.
[0072] It is divided into three intervals according to the current magnitude: When the discharge current is greater than or equal to I1 and less than or equal to I2, the following change increase rate of the SOC display value is C1% SOC / min.
[0073] When the discharge current is greater than or equal to I2 and less than or equal to I3, the following change increase rate of the SOC display value is C2% SOC / min.
[0074] When the discharge current is greater than I3, the following change increase rate of the SOC display value is C3% SOC / min.
[0075] Among them, 1A < I1 < I2 < I3 < 20A, 0 < C1 < C2 < C3 <= 1.0.
[0076] The SOC display value < the true SOC value, with a decelerated following.
[0077] The following change rate of the SOC display value is X1 times the original rate (coefficient X1 < 1).
[0078] III. Data Sending Communication Module Currently, some microcontrollers do not have a standard serial communication port UART, and the MCU peripheral hardware interface is insufficient. But sometimes it is necessary to communicate with other devices or components, the speed requirement is not very high, or due to hardware limitations, only one communication line can be provided for communication. At this time, the one-wire communication protocol can be tried for communication.
[0079] In this embodiment, a non-controller chip sends SOC data to the controller chip. The data sending uses the one-wire communication protocol. Through this communication protocol, fast, efficient, and stable data transmission between this chip and the controller chip can be achieved. It includes message format, signal definition, and data sending.
[0080] 3.1 The message format is defined as Figure 2 , and the obtained SOC data is stored in the third byte of the sending buffer.
[0081] 3.2 Signal definition: Define the synchronization signal: the low-level duration is T3ms, and the high-level duration is T4ms. Generation condition: The MCU starts sending after detecting the bus idle for T5ms.
[0082] Define logic 0: the low-level duration is T6ms, and the high-level duration is T7ms; Define logic 1: the low-level duration is T8ms, and the high-level duration is T9ms; Define the end signal: the low-level duration is T10ms, and the high-level duration is T11ms; Define the bus idle: the low-level duration is T12ms, and the high-level duration is T13ms.
[0083] 3.3 Data transmission: Data transmission is mainly divided into several stages: initialization management, signal and data transmission management, and signal transmission status management. The whole process is managed by the state machine to realize a complete transmission process of a single-line communication. The main steps include: 3.3.1 Initialization management: Initialize control structure and GPIO.
[0084] Initialize the control signal of the first-line communication: including setting the input and output mode of the signal, and initializing the related timers and state variables. Initialize the control structure, including clock configuration, setting GPIO to output mode, initializing timers and state variables, and clearing the buffer for subsequent signal processing operations.
[0085] 3.3.2 Signal and data transmission management: Send a single signal and a set of data. These functions work together to send a string of data bits. Control the level change of the pin according to the current time and the set low level duration and high level duration: set the appropriate high and low level duration according to the current bit level (0 or 1). When all bits of a byte are sent, move to the next byte. When all data are sent, return 1 to indicate that the sending is completed, otherwise return 0, thereby realizing the function of sending the data in a data buffer bit by bit.
[0086] 3.3.3 Battery information sending function: Fill a data buffer SignTxBuf, which contains battery status information (such as voltage, current, SOC, etc.). This information can be sent out through the one-line communication protocol: the current, voltage, and SOC are calculated and stored in the data sending buffer, and the current is stored in the buffer according to the mode. Finally, the checksum is calculated and stored.
[0087] 3.3.4 Signal sending status management: Used to manage the state transition and processing of the state machine: define the send idle state, send start state, send end state, and send information state. The transition between the four states is performed by judging the duration of the high and low level signals, mainly used for sending messages, obtaining timestamps, and changing states.
[0088] 3.3.5 State transition and processing of state machine: Update the variables of the state machine under different conditions and return the corresponding status according to the status of the signal pin. The specific functions are as follows: Check whether the timer has timed out, and return SIGN_ERR if it has timed out. Check the status of the signal pin. If it is high, update the corresponding timer and flag bit; if it is low, update the timer according to the status of the flag bit and return SIGN_OK or continue checking. SIGN_CHK is returned by default, indicating that the check will continue. This function mainly controls and monitors the system status through the status changes of the signal pin.
[0089] 3.3.6 Receiving state machine processing: This function implements a receiving state machine, which manages the receiving process by checking and updating multiple state variables. The specific functions are as follows: Initialize states and timers.
[0090] Checks the signal and changes state based on different conditions.
[0091] Receives messages and processes received data.
[0092] Handle error conditions and attempt to recover.
[0093] The whole process ensures the reliability and correctness of the received signal and is applicable to the one-line communication system, such as Figure 3 .
[0094] 4. Controller-side data receiving and display module 4.1 The data reception of the controller part adopts a one-line communication bus: Controller One-Stop Protocol, also known as One-Stop Speed Protocol. The controller is a device used to control the speed and direction of electric vehicles. By integrating the One-Stop Speed Protocol, it enables electric vehicles to achieve more stable and efficient control during driving.
[0095] Controller One-Line Speed Protocol: This is an advanced communication protocol that enables fast, efficient and stable data transmission between the controller and the motor. Through this protocol, the controller can monitor the driving status of the electric vehicle in real time and adjust the working parameters of the motor according to the actual situation, thereby ensuring the good performance of the vehicle under various road conditions.
[0096] Advantages: It improves the driving stability of electric vehicles. By real-time monitoring and adjusting the motor operating parameters, the One-Stop Speed Protocol can effectively avoid driving instability caused by poor communication between the controller and the motor. Secondly, this protocol improves the form efficiency of electric vehicles. While ensuring stability, the One-Stop Speed Protocol can make the motor run in the best working state, thereby increasing the vehicle's range and driving speed. Finally, it improves the safety of the vehicle. By real-time monitoring of the vehicle's driving status, the One-Stop Speed Protocol can detect potential safety hazards at the first time, and adjust the vehicle through the controller to ensure driving safety.
[0097] 4.2 Data frame composition: One frame of data is transmitted at a time, and each frame of data consists of three parts: synchronization signal + data signal (8bit*12 data bits) + end signal. The data level complies with the TTL specification.
[0098] (1) The synchronization signal is the leading signal for sending data signals; (2) The data signal is the valid data content that needs to be sent and is sent at a certain duty cycle; (3) The end signal represents the signal indicating the end of sending a complete frame of data.
[0099] The synchronization signal is defined as a low level of T14ms±T15ms and a high level of T16ms±T17us.
[0100] Logic 0 definition: low level of T18ms±T19us and high level of T20ms±T21us. The period of one bit is T22±T23us.
[0101] Logic 1 definition: low level of T24ms±T25us and high level of T26ms±T27us. The period of one bit is T28±T29us.
[0102] 4.3 Communication interval: 4.3.1: The time interval between sending two consecutive frames of data is T30ms.
[0103] 4.3.2: Before sending data, the battery will detect the bus level. If the bus level is detected to be low, it is considered that the bus is not connected to the charger or the charger is not powered on. At this time, the battery pack will stop sending data; if the low level lasts for T31s, the battery pack enters low power mode.
[0104] 4.3.3: The battery pack can be awakened by a high level on the bus in low power mode. After awakening, if the battery pack continuously detects that the bus level is high and the high level lasts for T32s, it starts sending data. Before the battery pack sends the next frame of message normally, it needs to monitor that the bus level is high to start sending.
[0105] 4.4 Format of frontline notification document like Figure 4 The first-line notification text consists of four parts: message ID, protocol version, data content, and check byte.
[0106] Message ID: including initial message and periodic message; Protocol version: including secondary communication version and primary communication version; Check byte: message ID, protocol version and data content; Note: Unused bytes in the data content are filled with 0XFF.
[0107] Figure 5 It is the data content in the main message format; among them: Single byte transmission mode: Each section of the application message consists of 8 binary bits, b0 is the least significant bit of the byte, and b7 is the most significant bit of the byte. When sending and receiving data, the least significant bit b0 is transmitted first, then the second least significant bit b1, and so on, and finally the most significant bit b7 is transmitted.
[0108] Multi-byte transmission mode: When sending or receiving multi-byte signals, the default Intel-LSB format is used for data transmission. As shown in the signal in the table above, the lowest byte is transmitted first, followed by the low byte.
[0109] Code implementation: pure timer scanning method + array reception.
[0110] 5. Data Display After the data is received and stored in the controller, the data received by the SOC is stored in the controller, and the data is discharged to the corresponding position in the LCD and displayed on the LCD display.
[0111] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the above embodiments do not limit the protection scope of the present invention in any form, and all technical solutions obtained by equivalent replacement and the like fall within the protection scope of the present invention. The parts not involved in the present invention are the same as the prior art or can be implemented by the prior art.
Claims
1. A SOC estimation method based on an electric vehicle controller, characterized in that: It includes the following steps: Step 1: Start power-on; Step 2: The ADC module of the chip collects voltage and current values; Step 3: Calculate the SOC value from the collected data. When the battery is static, the open-circuit voltage method is used to look up the table for OCV calibration, and the ampere-hour integration method is used for estimation during charge and discharge; Step 4: Correct the SOC data; The SOC value correction strategy is as follows: (1) During the small-current charging stage, fast-following correction is used, and the true SOC value increases by 1% every T (1 < T < 5) min; (2) During the discharge stage, the temperature coefficient accelerates the change of the true SOC value and the displayed value; (3) In case of over-discharge fault, trigger the rapid correction of the true SOC value to the specified SOC; During the small-current charging stage, fast-following correction is used, 1% SOC / min: current cumulative charge capacity = current cumulative charge capacity + SOC correction current; During the discharge stage, the change of SOC is accelerated through the temperature coefficient: (1) If the true SOC value is greater than SOC2, and the highest temperature of the battery cell is greater than the lower threshold of the highest temperature of the battery cell and less than the upper threshold of the highest temperature of the battery cell, then calibrate the current at this time; (2) If the displayed SOC value is greater than SOC2, and the highest temperature of the battery cell is greater than the lower threshold of the highest temperature of the battery cell and less than the upper threshold of the highest temperature of the battery cell, then calibrate the current at this time; Where SOC2 is the SOC threshold for accelerating the change of SOC through the temperature coefficient during the discharge stage, and SOC2 < 30; Calculation formula: Current = discharge current * 10 / (6 + (highest temperature of the battery cell - lower threshold of the highest temperature of the battery cell) * 4 / (upper threshold of the highest temperature of the battery cell - lower threshold of the highest temperature of the battery cell)); When the over-discharge fault is triggered due to excessive discharge current, trigger the rapid correction of the true SOC value to the specified SOC: (1) If the over-discharge fault is triggered and the true SOC value is higher than the lower SOC threshold, then correct the cumulative discharge capacity; Calculation formula: Current cumulative discharge capacity = current cumulative discharge capacity + SOC correction current - discharge current; At the same time, when the internal module voltage is lower than the SOC low threshold BATTVOTSOCLIM of the battery module voltage, correct the true SOC value to the SOC low threshold, and the calculation formula is: Current used capacity (true value) = current used capacity (true value) * SOC low threshold / 100; (2) If the true SOC value is higher than (SOC low threshold + 5) and the MOS is closed, the calculation formula is: Current cumulative discharge capacity (true value) = current cumulative discharge capacity (true value) + MOS double-closed hardware power consumption; Step 5: Send the SOC data to the controller chip through the One-Wire protocol and display it on the meter.
2. The SOC estimation method based on an electric vehicle controller according to claim 1, characterized in that: In the said Step 3, when the battery is static, according to the type and model of the battery, obtain the OCV-SOC reference curve provided by the battery manufacturer, compare the measured open-circuit voltage value with the reference curve, and find the corresponding SOC value.
3. The SOC estimation method based on an electric vehicle controller according to claim 2, characterized in that: In the said Step 3, when static through the initial power-on, calibrate the SOC according to the current temperature and the total battery voltage, retrieve the current temperature T and voltage V according to the OCV-SOC table, and calibrate a true SOC.
4. The SOC estimation method based on an electric vehicle controller according to claim 1, characterized in that: In step 3, the SOC value estimation method during charging and discharging is to use the integral of time and charging and discharging current, as well as the correction at the end of charging and discharging to jointly estimate the SOC: ; Among them: SOC0 is the capacity of the battery when it is powered on, and the default is the current capacity or the capacity before power failure stored in the microcontroller or the capacity recognized when powered on; Q is the actual total capacity of the battery; t0 and t1 are the start time and end time, and I is the real-time current; The above formula indicates that the change in power is obtained by the ratio of the integral of the current during this period of time to the total capacity, thereby accumulating and subtracting the original power. During operation, the ampere-hour integration is performed once every 1s, and a real SOC is corrected after correcting the remaining capacity according to the load size.
5. The SOC estimation method based on an electric vehicle controller according to claim 1, characterized in that: When the BMS detects full charge, the SOC is calibrated to 100%; when the BMS detects over discharge, the SOC is calibrated to 0%.
6. The SOC estimation method based on an electric vehicle controller according to claim 1, characterized in that: In step 4, the SOC real value full charge judgment strategy is: if the full charge flag is valid, the currently used capacity = the rated capacity of the battery; SOC true value boundary strategy: (1) If the currently used capacity exceeds the rated capacity of the battery, then the currently used capacity = the rated capacity of the battery; (2) If the currently used capacity is less than the SOC3 value of the battery rated capacity, that is, the currently used capacity = battery rated capacity * SOC3, SOC3 is the minimum boundary value, and SOC3 < 5%; SOC real value high-end maintenance strategy: (1) If it is in low current charging state or full charge is detected; If the SOC real value with 10 times higher precision is greater than SOC4, the SOC high-end hold flag is enabled, and the SOC real value with 10 times higher precision = 1000; (2) If the SOC high-end hold flag is valid && the SOC true value with 10 times the accuracy is greater than SOC4, then the SOC true value with 10 times the accuracy is equal to 1000; Otherwise, if the actual value of the SOC with 10 times the accuracy is <= SOC4, the valid bit of the SOC high-end hold flag is cleared; if the actual value of the SOC with 10 times the accuracy is > SOC4, the actual value of the SOC with 10 times the accuracy is = SOC4; wherein 1000>SOC4>950.
7. The SOC estimation method based on an electric vehicle controller according to claim 1, characterized in that: In step 4, the SOC display value correction strategy: if it is fully charged or over-discharged, the SOC display value is the SOC real value; SOC display value boundary value strategy: If the SOC full charge flag ‖ SOC actual value = 100, the currently used capacity display value = battery rated capacity; The SOC display value is 99% when it is between 99% and 5%, and 100% when it is between 5% and 100%, where SOC5 is the SOC threshold for preventing jumps. SOC display value following strategy: charging current is greater than I1A or discharging current is greater than I1A, satisfying (SOC real value belongs to (2%, 100%]&& SOC display value and SOC real value have difference)||(SOC real value is 2%&& SOC display value under discharge>SOC real value); Under the above conditions, the discharge state &&discharge current is greater than I1A, and the SOC display value adopts the discharge follow strategy; Under the above conditions, the charging state && charging current is greater than I1A, and the SOC display value adopts the charging follow strategy; <I1<10。 8. The SOC estimation method based on an electric vehicle controller according to claim 1, characterized in that: In step 5, the entire data transmission process is managed by a state machine to implement a complete transmission process of a single-line communication, and the steps include: (1) Initialization management: Initialize control structure and GPIO; (2) Signal and data transmission management: sending a single signal and a set of data; (3) Battery information sending function: fill a data buffer SignTxBuf, which contains battery status information. This information is sent out through the one-line communication protocol: the current, voltage, and SOC are calculated and stored in the data sending buffer. According to the mode, it is decided whether to store the current in the buffer. Finally, the checksum is calculated and stored. (4) Signal sending state management: used to manage the state transition and processing of the state machine: define the sending idle state, sending start state, sending end state, and sending information state; and perform transitions between the four states by judging the duration of high and low level signals; (5) State transition and processing of the state machine: update the variables of the state machine under different conditions and return the corresponding state according to the state of the signal pin; (6) Receive state machine processing: manages the receive process by checking and updating multiple state variables.
Citation Information
Patent Citations
SOC estimation method for power battery
CN111289906A
SOC estimation method with weighted ampere-hour integration
CN111308356A
Method and system for correcting SOC of lithium iron phosphate battery and storage medium
CN116520162A
Method for online correcting SOC-OCV data after aging
CN118641960A
SOC management system of onboard battery
JP2017138127A
Cited By
New energy vehicle lithium battery electric quantity estimation method and system based on motor controller
CN120942118A
Hybrid vehicle LFP battery SOC calibration method and vehicle energy collaborative management method
CN122430715A
Managing an energy storage system by evaluating accuracy of a state of charge of the energy storage system
EP4793084A1
