SOC estimation method and device of new energy vehicle, electronic equipment and storage medium
By using a method of combining local convolutional neural network with federated learning in new energy vehicles, SOC estimation is used to use driver behavior, vehicle environment and temperature data to perform SOC estimation, the problems of error accumulation, high accuracy requirements, poor real-time performance and limited application scope of SOC estimation methods in the prior art are solved, and SOC estimation with higher accuracy and reliability are achieved.
Patent Information
- Application Number
- CN202411548544.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-02-28
AI Technical Summary
In the prior art, SOC estimation methods such as the ATM method and OCV-SOC table lookup have problems such as the ATM method and the OCV-SOC table cumulative error accumulation, high accuracy requirements, poor real-time performance and limited application scope. It is difficult to accurately estimate the SOC of new energy vehicles without using these methods.
The local convolutional neural network combined with federated learning method is used to estimate the SOC by obtaining driver behavior data, vehicle operating environment data and temperature data. This method includes training of local data, clustering and aggregation of network parameters, and application of global drift constraints to improve the accuracy and reliability of SOC estimation.
It significantly improves the accuracy of SOC estimation, reduces the error from 8% to below 5%, enhances the adaptability and practicality of the model, while protecting data privacy, ensuring the generalization ability and reliability of the model.
Smart Images

Figure CN119538032A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of battery management systems for new energy vehicles, and in particular to a SOC estimation method, device, electronic equipment and storage medium for new energy vehicles. Background Art
[0002] The battery management system (BMS) plays an irreplaceable core role in ensuring the safety of power batteries and improving battery life. For power batteries, the core functions of BMS are cell monitoring, single cell balancing, and state of charge (SOC) estimation. Among them, the accuracy of SOC estimation directly affects the battery's range and service life.
[0003] The existing SOC estimation method is generally based on the ampere-hour integration method, which uses the OCV-SOC table for correction.
[0004] The ampere-hour integration method calculates the change in SOC based on the integration of the battery's current and time; the OCV-SOC table estimates the SOC by measuring the battery's open circuit voltage (OCV). Specifically, the OCV-SOC table is the correspondence between the open circuit voltage and SOC obtained through experiments. Different battery types (such as ternary batteries, lithium iron phosphate batteries) have different OCV-SOC curves.
[0005] When estimating SOC, the ampere-hour integration method estimates SOC by integrating current, but the error in current measurement accumulates over time, causing the deviation between the estimated SOC value and the actual value to gradually increase, and the accuracy of the current sensor is very high. Any sensor error or drift will directly affect the estimation accuracy of SOC. At the same time, the ampere-hour integration method is an open-loop control method, which cannot automatically correct the SOC estimation deviation caused by measurement error or inaccurate battery model. Since the ampere-hour integration method requires an accurate initial SOC value, if the initial value is inaccurate, the entire SOC estimation will be based on this wrong starting point, resulting in inaccurate subsequent estimation results. During driving, the internal resistance and voltage of the battery change with the ambient temperature, which will also affect the current measurement and integration results.
[0006] The OCV-SOC lookup table requires the battery to rest for a period of time without load in order to stabilize the voltage, which makes it unsuitable for real-time SOC estimation. In practical applications, such as when electric vehicles are running, this method is not practical. At the same time, due to different battery types, the steepness of the OCV-SOC curve is also different. For example, the OCV-SOC curve of lithium iron phosphate batteries is relatively flat, especially in the medium SOC range, making this method only reliable in a small range.
[0007] Based on the above reasons, how to accurately estimate the SOC of new energy vehicles without using the ampere-hour integration method and OCV-SOC lookup table has become a technical problem that needs to be solved urgently. Summary of the invention
[0008] The present invention discloses a SOC estimation method, device, electronic equipment and storage medium for a new energy vehicle, aiming to solve the technical problems existing in the prior art.
[0009] The present invention adopts the following technical solutions:
[0010] In a first aspect, an embodiment of the present invention provides a method for estimating the SOC of a new energy vehicle, the method comprising:
[0011] Obtain driver behavior data, vehicle operating environment data and temperature data;
[0012] Using the acquired data to train the local convolutional network, and sending the trained network parameters of the local convolutional network to the central server;
[0013] The central server is enabled to cluster the received network parameters based on the vehicle operating environment data and the temperature data, and to aggregate the network parameters of the same type, based on federated learning;
[0014] Receive the aggregation parameters sent by the central server, iteratively update the local convolutional network until a preset condition is met, and in the updating process, constrain the network parameters of the local convolutional network according to a preset global drift constraint, wherein the weight of the global drift constraint gradually increases with the number of training times;
[0015] The updated local convolutional network is used to estimate the SOC of new energy vehicles.
[0016] In a second aspect, an embodiment of the present invention provides a SOC estimation device for a new energy vehicle, the device comprising:
[0017] A data acquisition module, used to acquire driver behavior data, vehicle operating environment data and temperature data;
[0018] A local training module, used to train a local convolutional network using the acquired data, and send the trained network parameters of the local convolutional network to a central server;
[0019] A federated learning module, configured to enable the central server to cluster the received network parameters based on the vehicle operating environment data and the temperature data, and to aggregate the network parameters of the same type, based on federated learning;
[0020] A model updating module, configured to receive the aggregated parameters sent by the central server, iteratively update the local convolutional network until a preset condition is met, and during the updating process, constrain the network parameters of the local convolutional network according to a preset global drift constraint, wherein the weight of the global drift constraint gradually increases with the number of training times;
[0021] The SOC estimation module is used to estimate the SOC of the new energy vehicle by using the updated local convolutional network.
[0022] In a third aspect, an embodiment of the present invention provides an electronic device, including:
[0023] Processor; and
[0024] A memory arranged to store computer executable instructions which, when executed, cause the processor to perform a method as described in any one of the above.
[0025] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores one or more programs. When the one or more programs are executed by an electronic device including multiple application programs, the electronic device executes any of the methods described above.
[0026] One embodiment of the above invention has the following advantages or beneficial effects:
[0027] The embodiments of the present invention mainly provide a SOC estimation method, device, electronic device and storage medium for a new energy vehicle. Compared with the prior art, the SOC estimation method provided by the embodiments of the present invention combines driver behavior data, vehicle operating environment data and temperature data, and uses a local convolutional neural network to estimate the SOC of the new energy vehicle. Through the fusion of multi-source data and the learning ability of the neural network, it can accurately reflect the actual changes in the SOC, reduce the estimation error from the current 8% to below 5%, and significantly improve the estimation accuracy.
[0028] Secondly, the optimized federated learning algorithm is adopted to improve the generalization ability of the model while protecting data privacy. Specifically, the parameters of the locally trained convolutional network are sent to the central server for aggregation, without uploading the original data, meeting the requirements of data security and privacy protection. By clustering and aggregating parameters according to the vehicle operating environment and temperature, and introducing global drift constraints to prevent model overfitting, the model can be effectively applied in different environments and driving behaviors, and the reliability of SOC estimation is improved.
[0029] Furthermore, by gradually increasing the weight of the global drift constraint during the training process and dynamically adjusting the training strategy, the model can learn the characteristics of local data while also having the universality of the global model. For different vehicle operating environments and temperature conditions, an SOC estimation model suitable for a variety of scenarios is generated, which reduces the system error and enhances the adaptability and practicality of the model. This comprehensive approach effectively solves the deficiencies in the existing technology and provides a more accurate and reliable solution for SOC estimation of new energy vehicles. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments, which constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions explain the present invention and do not constitute improper limitations on the present invention. In the drawings:
[0031] Figure 1 A flowchart of a method for estimating the SOC of a new energy vehicle provided by an embodiment of the present invention;
[0032] Figure 2 A structural block diagram of a SOC estimation device for a new energy vehicle provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the specific embodiments of the present invention and the corresponding drawings. In the description of the present invention, it should be noted that the term "or" is usually used in the sense of including "and / or", unless the content clearly indicates otherwise.
[0034] Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0035] refer to Figure 1 In order to solve the deficiencies of the prior art, the present invention provides a method for estimating the SOC of a new energy vehicle, which is preferably applicable to new energy commercial vehicles, such as electric trucks, electric logistics vehicles, electric buses, electric transport vehicles, etc. Specifically, the SOC estimation method includes at least steps S110 to S150.
[0036] Step S110, acquiring driver behavior data, vehicle operating environment data and temperature data.
[0037] In one embodiment of the present invention, the driver behavior data at least includes accelerator pedal opening, brake pedal opening and energy recovery gear information.
[0038] Specifically, the accelerator pedal opening and brake pedal opening are collected by their respective position sensors to obtain the degree of the driver's stepping on the corresponding pedal in real time. Among them, the accelerator pedal opening reflects the driver's acceleration demand for the vehicle and can reflect the driver's driving style, such as smooth driving or rapid acceleration. This information can be used to predict the energy consumption changes of the vehicle under different driving habits; while the brake pedal opening reflects the driver's deceleration and braking behavior, reflecting the vehicle's braking frequency and strength, and has a direct impact on energy recovery and battery SOC changes.
[0039] In addition, new energy vehicles are usually equipped with energy recovery systems. The driver can choose different energy recovery gears. The specific data of the energy recovery gear can be obtained from the vehicle control unit (VCU). Different energy recovery gear information indicates the intensity of energy recovery during deceleration. A higher energy recovery gear can increase the battery charge, thereby affecting the SOC estimation.
[0040] Inputting the above collected driver behavior data into the local convolutional neural network for training can improve the adaptability and accuracy of the SOC estimation model to different driving habits.
[0041] In one embodiment of the present invention, the vehicle operating environment data at least includes average values of the climbing amount and the descending amount of the vehicle's driving route.
[0042] Since the SOC estimation method in this embodiment is preferably applicable to new energy commercial vehicles, the vehicle's usage scenario is fixed, usually operating in a fixed or specific area, the driving route is relatively fixed, the operating environment is relatively stable, and the terrain data is repeatable and predictable, so as to facilitate learning and prediction of terrain features.
[0043] In one embodiment of the present invention, the average climbing and descending amount of the vehicle's driving route is based on a single charge as a cycle. Since commercial vehicles usually complete specific route tasks within a single charge, the average climbing and descending amount within a single charge is used as an input parameter, which is more in line with actual use needs and can fully evaluate the change of SOC during a single charge and discharge process. Focusing on the average value within a single charge can avoid overfitting the model to the terrain characteristics of a specific section of the road, so that the model has better generalization ability.
[0044] Specifically, the GPS positioning system and map data equipped in the vehicle can obtain the geographical location information and altitude information of the vehicle's driving route. By analyzing the altitude, the accumulated climbing and descent of the vehicle during driving can be calculated. Among them, the climbing amount represents the total height difference of the vehicle driving on the uphill section. The vehicle needs to overcome gravity when climbing, so the power consumption increases and the SOC drops faster; while the descent amount represents the total height difference of the vehicle driving on the downhill section. When going downhill, the vehicle can use the gravitational potential energy to reduce the motor power output, and even charge the battery through the brake energy recovery system. These data can reflect the impact of the vehicle's terrain on energy consumption and SOC. Using the climbing amount and descent amount as input parameters can enable the local convolutional network to more accurately predict the SOC changes under different terrain conditions.
[0045] In one embodiment of the present invention, the temperature data includes vehicle environment temperature and / or battery pack temperature.
[0046] Specifically, a temperature sensor is installed inside the vehicle to monitor the vehicle ambient temperature, that is, the air temperature of the environment in which the vehicle is located. Alternatively, a temperature sensor is also configured in the battery management system (BMS) to detect the temperature of the battery pack.
[0047] Temperature is one of the important factors that affect battery performance and SOC estimation. Ambient temperatures that are too high or too low will affect the chemical reaction rate of the battery, which in turn affects the battery's discharge capability and capacity. In addition, the battery pack temperature can reflect the thermal state inside the battery. Excessive temperature may lead to battery performance degradation or safety risks. Collecting and monitoring temperature data can help the model consider the impact of temperature on battery discharge characteristics. Inputting temperature data into the local convolutional network can improve the accuracy of SOC estimation under different temperature conditions and ensure that the model has good prediction performance under various ambient temperatures.
[0048] Step S120, using the acquired data to train the local convolutional network, and sending the network parameters of the trained local convolutional network to the central server.
[0049] In one embodiment of the present invention, after obtaining the driver's behavior data, vehicle operating environment data and temperature data, these data are input into the local convolutional network, and the predicted SOC value is obtained after the network calculation, and then the loss function f(w k ), since the initial network parameters are random or default settings, the model's prediction results will be somewhat different from the actual values. In order to make the model predict SOC more accurately, it is necessary to adjust the network parameters so that the loss function f(w k ) is minimized, preferably, the loss function f(w k) is optimized to obtain the network parameters of the local neural network.
[0050] Specifically, in the loss function f(w k ) is optimized. First, the value of the loss function is calculated based on the predicted value and true value of SOC to measure the prediction error of the model. Then, the partial derivative (i.e., gradient) of the loss function with respect to each network parameter is calculated. These gradients indicate the direction of change of the loss function in the parameter space. Next, the network parameters are adjusted in a certain step size in the opposite direction of the gradient to reduce the value of the loss function. By repeating these steps and after multiple iterations, the network parameters of the local convolutional network gradually stabilize and the loss function reaches a smaller value.
[0051] By utilizing the gradient descent algorithm, the local convolutional network continuously learns the characteristics of local data and optimizes its own network parameters to improve the accuracy of SOC estimation.
[0052] In this embodiment, the construction method of the local convolutional network and the specific details of the gradient descent algorithm are no longer specifically limited. Those skilled in the art can use any implementation method disclosed in the prior art to implement the above solution.
[0053] In one embodiment of the present invention, the network parameters include at least the weight parameters of the local convolutional neural network; when the loss function f(w k ) is optimized by adjusting the weight parameters to adjust the loss function f(w k ) for optimization.
[0054] Specifically, in each layer of the local convolutional network, the connection between neurons will have a weight value, which can be represented by a matrix or tensor. The weight value reflects the correlation between the input data and the output results of the local convolutional network, that is, it determines the degree of influence of the driver's behavior data, vehicle operating environment data and temperature data on the SOC prediction value finally output by the network. During the training process, the partial derivative (i.e., gradient) of the loss function with respect to the weight is calculated, and the weight is updated by the gradient descent algorithm to reduce the error between the predicted value and the true value.
[0055] In the initial state, the weight parameters in the local convolutional network may be randomly assigned or preset. By inputting training data, the predicted SOC value is calculated and compared with the actual SOC value to obtain the error. Then the gradient descent algorithm is used to calculate the partial derivative of the loss function with respect to the weight parameters. According to the gradient information and a certain learning rate, the weights and biases are adjusted so that the error of the local convolutional network is reduced in the next prediction. After repeated attempts, the network parameters can be gradually optimized, so that the local convolutional network can learn the impact of driver behavior, vehicle operating environment and temperature on SOC, and the prediction accuracy of SOC can be continuously improved.
[0056] In one embodiment of the present invention, the central server can receive data from each local convolutional network, generate global model parameters through federated learning, and achieve global optimization and knowledge sharing of the model. In order to protect the privacy and data security of users, when sending data to the central server, only network parameters, that is, weight parameters of the local convolutional network, are sent, without sending specific local sensitive data, such as driver behavior and environmental data.
[0057] In one embodiment of the present invention, the central server is deployed in a cloud data center, which can handle a large number of parameter aggregation and calculation tasks. When sending network parameters to it, the vehicle, as a client, communicates with the central server through a network connection, and selects a suitable secure communication mechanism, communication protocol and data format according to actual needs, and finally completes the sending of network parameters. Specifically, the data sending method is no longer limited in this embodiment, and those skilled in the art can make reasonable adjustments according to actual needs.
[0058] Step S130 , enables the central server to cluster the received network parameters based on federated learning according to the vehicle operating environment data and temperature data, and aggregate the network parameters of the same type.
[0059] In one embodiment of the present invention, the central server serves as the coordination center and overall model of federated learning, and is responsible for receiving local model parameters from each vehicle, aggregating them, generating global model parameters, and sending the aggregated global model parameters back to each vehicle for updating its local model.
[0060] When the data heterogeneity between different types is serious, different local models will optimize the overall model in different directions, which will ultimately make the overall model have poor convergence and low accuracy under models with different features. At the same time, the difference in the quantity of different types of data will cause the model to bias in a certain direction, reducing the global generalization ability of the model. To solve this problem, in one embodiment of the present invention, the central server classifies the received network parameters according to the preset vehicle operating environment type and temperature range; for each category, the central server performs weighted averaging on the network parameters within the same category to obtain the aggregation parameters corresponding to the category; the central server sends the corresponding aggregation parameters to the client belonging to the corresponding category to update the local convolutional network.
[0061] Specifically, the central server receives trained weight parameters from each vehicle client. At the same time, the central server also collects statistical features of the vehicle operating environment data and temperature data corresponding to each client. These features can be environmental type identifiers and temperature ranges calculated locally or preset by the client, rather than raw data, to protect privacy.
[0062] Next, the central server sets the clustering criteria for the vehicle operating environment type and temperature range respectively. The driver behavior data is not clustered during clustering because commercial vehicles such as electric trucks often require different drivers to drive, and the federated learning network can improve the compatibility of the local model with drivers' different driving habits.
[0063] Specifically, since mountainous areas usually have large terrain undulations, with more uphill and downhill sections, the vehicle energy consumption characteristics are different from those in plain areas. Therefore, according to the preset standards, the vehicle operating environment type is at least divided into mountainous and plain areas; and temperature has a significant impact on battery performance. The discharge capacity and efficiency of the battery are different at different temperatures. Therefore, according to the preset standards, the temperature range is divided into different average temperature intervals, such as low temperature interval (≤0℃), medium temperature interval (0℃~25℃), and high temperature interval (≥25℃). It should be noted that according to different specific standards and application scenarios, when clustering the vehicle operating environment type and temperature range, the classification standards can be adaptively adjusted.
[0064] According to the environment type and temperature range of each client, its weight parameter is assigned to the corresponding cluster. Each cluster contains the weight parameters of all clients belonging to the environment type and temperature range. For example:
[0065] Client A—mountain environment, average temperature is -5℃, classified into the “mountain-low temperature” cluster;
[0066] Client B - Plain environment, with an average temperature of 20°C, is classified into the "Plain - Medium Temperature" cluster.
[0067] For each cluster, the network parameters uploaded by all clients in the cluster are collected, and then the weights for aggregation are determined based on factors such as the amount of local data of each client (such as the number of training samples), model performance (such as the value of the local loss function), etc. In one embodiment of the present invention, a method of weighted average of data volume can be used, that is, clients with large amounts of data contribute more to the aggregation results, and the formula and specific calculation process of weighted average are not repeated here. Through weighted average, the aggregated network parameters corresponding to the cluster can be obtained, and the central server then sends the aggregated network parameters of each cluster to all clients belonging to the cluster.
[0068] In one embodiment of the present invention, after receiving the aggregation parameters, each client updates the local convolutional network. After a certain number of rounds of local training, the client sends the updated network parameters to the central server again. The central server repeats the clustering and aggregation steps to continuously optimize the aggregation model.
[0069] In one embodiment of the present invention, if the operating environment type or temperature range of a vehicle client changes, the client can update these feature information in the next round of training, and the central server re-clusters according to the latest feature information to ensure that the client always participates in aggregation in the appropriate cluster.
[0070] Step S140, receiving the aggregation parameters sent by the central server, iteratively updating the local convolutional network until the preset conditions are met. During the updating process, the network parameters of the local convolutional network are constrained according to the preset global drift constraint, wherein the weight of the global drift constraint gradually increases with the number of training times.
[0071] In one embodiment of the present invention, the network parameters corresponding to the local convolutional network are replaced with aggregated parameters to obtain an updated local convolutional network. In order to constrain the drift degree of the local model to ensure that the model does not overfit to the data of a specific client and thus lose its generalization ability, during the update process of the local convolutional network, the updated network parameters are constrained according to the preset global drift constraints.
[0072] In one embodiment of the present invention, the original loss function is f(w k ), the loss function after adding constraints is f'(w k ), f'(w k )=f(w k )+μ||ww k || 2 , where w k is the network parameter of the local convolutional network, w is the aggregation parameter of the total model after aggregation, and μ is the weight of the global drift constraint, which is used to adjust the degree of drift constraint.
[0073] In one embodiment of the present invention, the weight of the global drift constraint increases according to a preset functional relationship, and the preset functional relationship is:
[0074]
[0075] Among them, n is the current number of training times, and N is the preset total number of training times.
[0076] At the beginning of training, the local model is mainly used to ensure the local model's ability to learn local conditions as much as possible and improve the prediction accuracy of local data. After the network parameters are basically stable, the weight of the global drift constraint is quickly increased. The model gradually strengthens its dependence on the global model and reduces the deviation from the global model. This can improve the elimination of errors such as drift and avoid overfitting of the local model.
[0077] In each round of training, the client updates the network parameters according to the above strategy. After each round of training or multiple rounds of training, the updated network parameters are sent to the central server to participate in a new aggregation process. Through multiple rounds of interaction and optimization, the model parameters gradually stabilize, and the loss function value decreases. Finally, the model has good prediction performance on both local and global data, and the accuracy of SOC estimation is improved.
[0078] Step S150, using the updated local convolutional network to estimate the SOC of the new energy vehicle.
[0079] In one embodiment of the present invention, when the local convolutional network reaches a preset total number of training times, the vehicle's current driver behavior data, vehicle operating environment data, and temperature data are obtained again, and then the acquired current data is input into the updated local convolutional network, and the local convolutional network can output the SOC estimation value of the new energy vehicle.
[0080] like Figure 2 In one embodiment of the present invention, a SOC estimation device 200 for a new energy vehicle is also provided, which includes a data acquisition module 210, a local training module 220, a federated learning module 230, a model updating module 240, and a SOC estimation module 250.
[0081] In one embodiment of the present invention, the data acquisition module 210 is used to acquire driver behavior data, vehicle operating environment data and temperature data.
[0082] In one embodiment of the present invention, the driver behavior data includes at least the accelerator pedal opening, the brake pedal opening and the energy recovery gear information; the vehicle operating environment data includes at least the average climbing amount and the downhill amount in the vehicle driving route after a single charge; the temperature data includes the vehicle ambient temperature and / or the battery pack temperature.
[0083] In one embodiment of the present invention, the local training module 220 is used to train the local convolutional network using the acquired data, and send the network parameters of the trained local convolutional network to the central server.
[0084] In one embodiment of the present invention, after obtaining the driver's behavior data, vehicle operating environment data and temperature data, the local training module 220 inputs these data into the local convolutional network, obtains the predicted SOC value through network calculation, and then determines the loss function f(w k ), since the initial network parameters are random or default settings, the model's prediction results will be somewhat different from the actual values. In order to make the model predict SOC more accurately, it is necessary to adjust the network parameters so that the loss function f(w k) is minimized, preferably, the loss function f(w k ) is optimized to obtain the network parameters of the local neural network.
[0085] In one embodiment of the present invention, the federated learning module 230 is used to enable the central server to cluster the received network parameters based on the vehicle operating environment data and temperature data, and to aggregate the network parameters of the same type based on the federated learning.
[0086] In one embodiment of the present invention, the central server receives trained weight parameters from each vehicle client. At the same time, the central server also collects statistical features of the vehicle operating environment data and temperature data corresponding to each client. These features can be environmental type identifiers and temperature ranges calculated locally or preset by the client, rather than raw data, to protect privacy.
[0087] Next, the central server sets the clustering criteria for the vehicle operating environment type and temperature range respectively. The driver behavior data is not clustered during clustering because commercial vehicles such as electric trucks often require different drivers to drive, and the federated learning network can improve the compatibility of the local model with drivers' different driving habits.
[0088] Specifically, according to preset standards, the vehicle operating environment type is divided into at least mountains and plains; according to preset standards, the temperature range is divided into different average temperature intervals, such as low temperature interval (≤0℃), medium temperature interval (0℃~25℃), and high temperature interval (≥25℃).
[0089] According to the environment type and temperature range of each client, its weight parameter is assigned to the corresponding cluster, and each cluster contains the weight parameters of all clients belonging to the environment type and temperature range.
[0090] For each cluster, the network parameters uploaded by all clients in the cluster are collected, and then the weight for aggregation is determined based on factors such as the amount of local data of each client and model performance. In one embodiment of the present invention, a method of weighted average of data volume can be used to obtain the aggregated network parameters corresponding to the cluster, and the central server then sends the aggregated network parameters of each cluster to all clients belonging to the cluster.
[0091] In one embodiment of the present invention, after receiving the aggregation parameters, each client iteratively updates the local convolutional network. After a certain number of rounds of local training, the client again sends the updated network parameters to the central server. The central server repeats the clustering and aggregation steps to continuously optimize the aggregation model.
[0092] In one embodiment of the present invention, the model update module 240 is used to receive the aggregation parameters sent by the central server, iteratively update the local convolutional network until the preset conditions are met, and during the update process, constrain the network parameters of the local convolutional network according to the preset global drift constraint, wherein the weight of the global drift constraint gradually increases with the number of training times.
[0093] In one embodiment of the present invention, the network parameters corresponding to the local convolutional network are replaced with aggregation parameters to obtain an updated local convolutional network. In order to constrain the drift degree of the local model to ensure that the model does not overfit to the data of a specific client and thus lose its generalization ability, during the update process of the local convolutional network, the updated network parameters are constrained according to the preset global drift constraints.
[0094] In one embodiment of the present invention, the original loss function is f(w k ), the loss function after adding constraints is f'(w k ), f'(w k )=f(w k )+μ||ww k || 2 , where w k is the network parameter of the local convolutional network, w is the aggregation parameter of the total model after aggregation, and μ is the weight of the global drift constraint, which is used to adjust the degree of drift constraint.
[0095] In one embodiment of the present invention, the weight of the global drift constraint increases according to a preset functional relationship, and the preset functional relationship is:
[0096]
[0097] Among them, n is the current number of training times, and N is the preset total number of training times.
[0098] In each round of training, the client updates the network parameters according to the above strategy. After each round of training or multiple rounds of training, the updated network parameters are sent to the central server to participate in a new aggregation process. Through multiple rounds of interaction and optimization, the model parameters gradually stabilize, and the loss function value decreases. Finally, the model has good prediction performance on both local and global data, and the accuracy of SOC estimation is improved.
[0099] In one embodiment of the present invention, the SOC estimation module 250 is used to estimate the SOC of the new energy vehicle using the updated local convolutional network.
[0100] In one embodiment of the present invention, when the local convolutional network reaches a preset total number of training times, the vehicle's current driver behavior data, vehicle operating environment data, and temperature data are obtained again, and then the acquired current data is input into the updated local convolutional network, and the local convolutional network can output the SOC estimation value of the new energy vehicle.
[0101] It should be noted that the SOC estimation device for new energy vehicles and the SOC estimation method for new energy vehicles provided in the above embodiments belong to the same concept, and their specific implementation processes are detailed in the embodiments of the control method, which will not be repeated here.
[0102] An embodiment of the present invention further provides an electronic device, which includes a memory and a processor, wherein a computer program executed by the processor is stored in the memory, and when the computer program is executed by the processor, the processor executes the SOC estimation method for new energy vehicles described above. Various applications and various data, such as various data used and / or generated by the application, can also be stored in the memory. The processor can be a central processing unit (CPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other forms of processing units having data processing capabilities and / or instruction execution capabilities.
[0103] The embodiment of the present invention also provides a computer-readable storage medium, on which a computer program executed by a processor is stored. When the computer program is executed by the processor, the processor executes the SOC estimation method for new energy vehicles as described above. Exemplarily, the computer storage medium may include a memory card of a smart phone, a storage component of a tablet computer, a hard disk of a personal computer, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disk read-only memory (CD-ROM), a USB memory, or any combination of the above storage media. The computer-readable storage medium may be any combination of one or more computer-readable storage media.
[0104] Although example embodiments have been described herein with reference to the accompanying drawings, it should be understood that the above example embodiments are merely exemplary and are not intended to limit the scope of the present application to this. Those of ordinary skill in the art may make various changes and modifications therein without departing from the scope and spirit of the present application. All these changes and modifications are intended to be included within the scope of the present application as required by the appended claims.
[0105] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0106] Similarly, it should be understood that in order to streamline the present application and help understand one or more of the various inventive aspects, in the description of the exemplary embodiments of the present application, the various features of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, the method of the present application should not be interpreted as reflecting the following intention: the claimed application requires more features than the features clearly stated in each claim. More specifically, as reflected in the corresponding claims, the inventive point is that the corresponding technical problem can be solved with features less than all the features of a single disclosed embodiment. Therefore, the claims following the specific embodiment are hereby explicitly incorporated into the specific embodiment, wherein each claim itself serves as a separate embodiment of the present application.
[0107] It will be understood by those skilled in the art that, except for mutually exclusive features, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this specification may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature that provides the same, equivalent or similar purpose.
[0108] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.
Claims
1. A method for estimating the SOC of a new energy vehicle, characterized in that: The method comprises: Obtain driver behavior data, vehicle operating environment data and temperature data; Using the acquired data to train the local convolutional network, and sending the trained network parameters of the local convolutional network to the central server; The central server is enabled to cluster the received network parameters based on the vehicle operating environment data and the temperature data, and to aggregate the network parameters of the same type, based on federated learning; Receive the aggregation parameters sent by the central server, iteratively update the local convolutional network until a preset condition is met, and in the updating process, constrain the network parameters of the local convolutional network according to a preset global drift constraint, wherein the weight of the global drift constraint gradually increases with the number of training times; The updated local convolutional network is used to estimate the SOC of new energy vehicles.
2. The SOC estimation method for new energy vehicles according to claim 1, characterized in that: The driver behavior data includes at least the accelerator pedal opening, the brake pedal opening and the energy recovery gear information; the vehicle operating environment data includes at least the climbing amount and the descending amount of the vehicle's driving route; the temperature data includes the vehicle ambient temperature and / or the battery pack temperature.
3. The SOC estimation method for new energy vehicles according to claim 1, characterized in that: The step of training the local neural network using the acquired data includes: Inputting the driver behavior data, the vehicle operating environment data and the temperature data into the local convolutional network to obtain a predicted SOC value; determining a loss function based on the actual SOC value and the predicted SOC value; The loss function is optimized by gradient descent to obtain the network parameters of the local neural network.
4. The SOC estimation method for new energy vehicles according to claim 3, characterized in that: The network parameters include weight parameters of the local convolutional neural network; wherein, in the step of optimizing the loss function by gradient descent, the loss function is optimized by adjusting the weight parameters.
5. The SOC estimation method for new energy vehicles according to claim 1, characterized in that: In the step of enabling the central server to cluster the received network parameters based on the vehicle operating environment data and the temperature data based on federated learning, and to aggregate the network parameters of the same type, the step includes: The central server classifies the received network parameters according to a preset vehicle operating environment type and temperature range; For each category, the central server performs weighted averaging on the network parameters within the same category to obtain the aggregation parameter corresponding to the category; The central server sends the corresponding aggregation parameters to clients belonging to the corresponding category to update the local convolutional network.
6. The SOC estimation method for new energy vehicles according to claim 5, characterized in that: The step of classifying the received network parameters specifically includes: The vehicle operating environment type is divided into at least mountainous areas and plains, and the temperature range is divided into at least different average temperature intervals.
7. The SOC estimation method for new energy vehicles according to claim 1, characterized in that: In the step of receiving the aggregation parameters sent by the central server, updating the local convolutional network, and constraining the network parameters of the local convolutional network according to a preset global drift constraint during the updating process, wherein the weight of the global drift constraint gradually increases with the number of training times, the step includes: Using the aggregation parameters to replace the network parameters corresponding to the local convolutional network, to obtain the updated local convolutional network; During the updating process of the local convolutional network, the updated network parameters are constrained according to the preset global drift constraint.
8. The SOC estimation method for new energy vehicles according to claim 7, characterized in that: The step of gradually increasing the weight of the global drift constraint with the number of training times specifically includes: The weight of the global drift constraint increases according to a preset functional relationship, and the preset functional relationship is: Wherein, μ is the weight of the global drift constraint, n is the current number of training times, and N is the preset total number of training times.
9. The SOC estimation method for new energy vehicles according to claim 1, characterized in that: The step of estimating the SOC of the new energy vehicle by using the updated local convolutional network includes: Acquiring the current driver behavior data, vehicle operating environment data and temperature data of the vehicle; The acquired current data is input into the updated local convolutional network to determine the SOC estimation value of the new energy vehicle.
10. A SOC estimation control device for a new energy vehicle, characterized in that: The device comprises: A data acquisition module, used to acquire driver behavior data, vehicle operating environment data and temperature data; A local training module, used to train a local convolutional network using the acquired data, and send the trained network parameters of the local convolutional network to a central server; A federated learning module, configured to enable the central server to cluster the received network parameters based on the vehicle operating environment data and the temperature data, and to aggregate the network parameters of the same type, based on federated learning; A model updating module, configured to receive the aggregated parameters sent by the central server, iteratively update the local convolutional network until a preset condition is met, and during the updating process, constrain the network parameters of the local convolutional network according to a preset global drift constraint, wherein the weight of the global drift constraint gradually increases with the number of training times; The SOC estimation module is used to estimate the SOC of the new energy vehicle by using the updated local convolutional network.
11. An electronic device, characterized in that: include: processor; as well as A memory arranged to store computer executable instructions, which when executed cause the processor to perform a method as claimed in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, which, when executed by an electronic device including a plurality of application programs, enable the electronic device to execute the method according to any one of claims 1 to 9.