Golf cart battery capacity prediction method and device, equipment and storage medium
The three-dimensional feature vectors of golf cart batteries are extracted through backpropagation neural network and bidirectional long and short-term memory network, and combined with the metabolic gray model and elastic weight merging framework, the accuracy and adaptability problems of traditional battery capacity prediction methods are solved, and high precision is achieved capacity prediction and health status assessment.
Patent Information
- Application Number
- CN202411765232.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-12-04
AI Technical Summary
Traditional battery capacity prediction methods are difficult to accurately capture the nonlinear characteristics and long-term dependencies of golf cart battery capacity degradation, have low prediction accuracy, and poor adaptability to different usage conditions and data noise.
The backpropagation neural network is used to generate incremental capacity curves, combine the bidirectional long and short-term memory network to extract three-dimensional feature vectors, stack the gray model of metabolism for integration, build an elastic weight merge framework, dynamically adjust the model parameters through the double-layer optimization algorithm to realize capacity prediction and Health status assessment.
Improves accuracy and adaptability of battery capacity prediction, provides intuitive capacity attenuation trend charts and residual service life estimates, supporting golf cart maintenance and battery replacement decisions.
Smart Images

Figure CN119247151A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of battery capacity prediction, and in particular to a method, device, equipment and storage medium for predicting the battery capacity of a golf cart. Background Art
[0002] Due to the complex and changeable usage environment of golf carts and the irregular charging and discharging patterns, battery capacity prediction and health status assessment face many challenges.
[0003] Traditional battery capacity prediction methods often rely on simple statistical models or single machine learning algorithms, which are difficult to accurately capture the nonlinear characteristics and long-term dependencies of battery capacity degradation. This results in low prediction accuracy and makes it difficult to provide reliable support for golf cart maintenance and battery replacement decisions. At the same time, existing methods have poor adaptability to battery capacity changes under different operating conditions and cannot effectively handle data noise and outliers in practical applications. Summary of the invention
[0004] The present invention provides a golf cart battery capacity prediction method, device, equipment and storage medium, which are used to improve the accuracy of golf cart battery capacity prediction.
[0005] In a first aspect, the present invention provides a method for predicting the battery capacity of a golf cart, the method comprising: Collect and preprocess the historical charge and discharge data of golf cart batteries to obtain a time series feature data set; Based on the time series feature data set, a generalized derivative method is constructed using a back propagation neural network to generate an incremental capacity curve and extract a three-dimensional feature vector; Inputting the three-dimensional feature vector into a bidirectional long short-term memory network to obtain an initial capacity prediction model through training; The initial capacity prediction model is used as the first layer model, and the metabolic gray model is used as the second layer model for stacking and integration to obtain a hybrid prediction model; Based on the hybrid prediction model, an elastic weight merging framework is constructed, and model parameters are dynamically adjusted through a two-layer optimization algorithm to obtain a target capacity prediction model; The real-time battery operation data of the golf cart battery is input into the target capacity prediction model for capacity prediction and health status assessment, and a capacity decay trend graph and a remaining service life estimation value are output.
[0006] In a second aspect, the present invention provides a golf cart battery capacity prediction device, the golf cart battery capacity prediction device comprising: The acquisition module is used to collect and preprocess the historical charge and discharge data of the golf cart battery to obtain a time series feature data set; A construction module is used to construct a generalized derivative method based on the time series feature data set using a back propagation neural network to generate an incremental capacity curve and extract a three-dimensional feature vector; A training module, used for inputting the three-dimensional feature vector into a bidirectional long short-term memory network to obtain an initial capacity prediction model through training; An integration module, used for stacking and integrating the initial capacity prediction model as a first-layer model and the metabolic gray model as a second-layer model to obtain a hybrid prediction model; An optimization module, used to construct an elastic weight merging framework based on the hybrid prediction model, dynamically adjust model parameters through a double-layer optimization algorithm, and obtain a target capacity prediction model; The output module is used to input the real-time battery operation data of the golf cart battery into the target capacity prediction model to perform capacity prediction and health status assessment, and output a capacity decay trend graph and a remaining service life estimation value.
[0007] A third aspect of the present invention provides a golf cart battery capacity prediction device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory to enable the golf cart battery capacity prediction device to execute the above-mentioned golf cart battery capacity prediction method.
[0008] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the above-mentioned golf cart battery capacity prediction method.
[0009] In the technical solution provided by the present invention, the incremental capacity curve is generated by combining the back propagation neural network and the generalized derivative method, and the high-quality three-dimensional feature vector is extracted to effectively capture the key features of the battery capacity degradation, thereby improving the input quality of the prediction model. The bidirectional long short-term memory network is used as the initial capacity prediction model, which makes full use of the long-term dependency and bidirectional information flow of the battery capacity degradation, and enhances the model's learning ability for time series features. The initial capacity prediction model is stacked and integrated with the metabolic gray model to construct a multi-level hybrid prediction model, which not only retains the nonlinear fitting ability of the deep learning model, but also incorporates the modeling advantages of the gray system theory for small samples and uncertain systems. The elastic weight merging framework and the two-layer optimization algorithm are introduced to realize the dynamic adjustment of the model parameters, and improve the adaptability and robustness of the prediction model to different operating conditions. Through the collaborative prediction of multiple sub-models and the weight allocation of the attention mechanism, the prediction deviation of a single model is effectively reduced, and the overall prediction accuracy is improved. The whole process automation from historical data preprocessing to real-time capacity prediction is realized, providing a one-stop solution for the golf cart battery management system, which is convenient for practical deployment and application. The output capacity decay trend graph and remaining service life estimate provide an intuitive and reliable decision-making basis for golf cart maintenance planning and battery replacement timing.
[0010] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0011] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 A schematic diagram of an embodiment of a method for predicting the battery capacity of a golf cart in an embodiment of the present invention; Figure 2 A schematic diagram of an embodiment of a golf cart battery capacity prediction device according to an embodiment of the present invention; Figure 3 Schematic diagram of an embodiment of a golf cart battery capacity prediction device in an embodiment of the present invention. DETAILED DESCRIPTION
[0013] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the 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.
[0014] The terms "including" and "having" and any variations thereof mentioned in the embodiments of the present invention are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device end including a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or device ends.
[0015] To facilitate understanding of this embodiment, a golf cart battery capacity prediction method disclosed in an embodiment of the present invention is first introduced in detail. Figure 1 As shown, the method comprises the following steps: 101. Collect and preprocess the historical charge and discharge data of the golf cart battery to obtain a time series feature data set; It is understandable that the execution subject of the present invention may be a golf cart battery capacity prediction device, or a terminal or a server, which is not limited here. The embodiment of the present invention is described by taking a server as the execution subject as an example.
[0016] Specifically, the voltage, current and temperature data of the golf cart battery during the charging and discharging process are collected to obtain the original data set. The sliding window technology is used to divide the continuous time series data in the original data set into data segments of fixed length to obtain a segmented data set. The sliding window technology helps to structure the time series data and can retain the details of changes in a short period of time while capturing long-term trends. The outliers and noise in the segmented data set are identified and removed to obtain a cleaned data set. The identification of outliers is achieved by setting reasonable upper and lower thresholds and combining statistical methods such as mean and standard deviation to identify data that does not conform to the normal range. The removal of noise is achieved through filter technology such as low-pass filter or Kalman filter. The cleaned data set is standardized to eliminate the dimensional differences between different features, so that all features are compared and processed on the same scale, avoiding the model's over-reliance on or neglect of certain features during the training process due to the order of magnitude differences between the features. Based on the standardized data set, the statistical features in each data segment are calculated, including mean, variance, peak, valley, etc., to obtain a statistical feature set. The mean reflects the overall level of battery operation characteristics in the data segment, the variance is used to measure the volatility of battery characteristics during the charging and discharging process, and the peak and valley values represent the maximum and minimum values of battery characteristics in the data segment, respectively. These features together depict the changing trend and dynamic behavior during battery operation. In order to reduce the dimension of features and reduce computational complexity, while avoiding the impact of multicollinearity between features on model performance, the statistical feature set is subjected to feature dimensionality reduction. Using the principal component analysis (PCA) method, high-dimensional data is projected into a low-dimensional space, and the most informative features are retained to obtain the reduced-dimensional feature set. The reduced-dimensional feature set is arranged in chronological order to construct a time series feature matrix to reflect the dynamic changes of the battery during the charging and discharging process. The time series feature matrix is normalized to obtain a time series feature data set.
[0017] 102. Based on the time series feature data set, a generalized derivative method is constructed using a back propagation neural network to generate an incremental capacity curve and extract a three-dimensional feature vector; Specifically, the charging voltage and current data in the time series feature data set are input into the pre-trained generalized derivative network to obtain a high-precision voltage derivative sequence. The generalized derivative network can accurately capture the subtle differences in voltage changes through in-depth learning of the charging voltage and current data, calculate the voltage derivative with high precision, and reflect the changing trend of the reaction dynamics inside the battery. Based on the high-precision voltage derivative sequence, the charging data is sampled at equal intervals, and the sampling interval is set to 0.1V to obtain a set of uniformly distributed charging data points. The capacity increment ΔQ and voltage increment ΔV between adjacent points in the uniformly distributed charging data points are calculated, and the central difference method is used to obtain a discrete dQ / dV value sequence. The calculation of the capacity increment and voltage increment reflects the electrochemical reaction rate inside the battery during the charging process. The central difference method is used to more accurately obtain the derivative value of each data point, forming a set of discrete dQ / dV value sequences, which reflect the charging rate characteristics of the battery in each charging voltage interval. A 5-point sliding average filter is applied to the discrete dQ / dV value sequence to obtain a smoothed dQ / dV value sequence. By taking the average of multiple adjacent data points, the influence of high-frequency noise can be effectively reduced. The incremental capacity curve is drawn with voltage V as the horizontal axis and the smoothed dQ / dV value as the vertical axis, and a continuous IC curve is obtained using the cubic spline interpolation method. The cubic spline interpolation method generates a smooth and continuous curve by smoothly connecting the data points. Characteristic peaks and valleys are identified on the IC curve. By analyzing the curve, the Gaussian fitting method is applied to determine the exact position of the peak point and the valley point to obtain a set of characteristic points. From the obtained set of characteristic points, the peak voltage, peak dQ / dV value and the corresponding cumulative capacity Q are extracted to construct a three-dimensional feature vector. The peak voltage reflects the voltage level when the battery reaches the peak capacity change rate during charging, the peak dQ / dV describes the capacity change rate of the battery at this voltage, and the cumulative capacity Q is the total capacity of the battery when it reaches the peak value.
[0018] 103. Input the three-dimensional feature vector into the bidirectional long short-term memory network, and obtain the initial capacity prediction model through training; Specifically, the three-dimensional feature vector is divided into time series. By setting the sliding window size to 30 and the step size to 1, the original feature vector is divided into multiple continuous input sequences to obtain the input sequence data set. A bidirectional long short-term memory network structure is constructed, which includes an input layer, a bidirectional LSTM layer, a fully connected layer and an output layer. The bidirectional LSTM layer consists of a forward LSTM and a reverse LSTM, and each direction contains 64 hidden units. The bidirectional LSTM network is a deep neural network structure that can process sequence data. By considering the forward and reverse information of the sequence at the same time, it can better capture the complex pattern of battery capacity changes. Through this network structure, the model can not only utilize the forward information of historical data in the capacity prediction process, but also make full use of the reverse feedback information, thereby improving the prediction performance and the accuracy of the model. In the input layer, the input three-dimensional feature vector is embedded, and the feature vector is mapped to a 128-dimensional hidden space to obtain an embedded sequence. Embedding processing is a process of mapping low-dimensional features to high-dimensional space, which helps to enhance the expressive power of feature representation, so that the bidirectional LSTM layer can better capture the complex relationship between different features in high-dimensional space. The embedded sequence is input into the bidirectional LSTM layer. In the forward LSTM, the information is selectively memorized and forgotten through the input gate, forget gate, and output gate to obtain the forward hidden state sequence. LSTM can effectively learn long-term dependencies through the gating mechanism, where the input gate controls the input amount of new information, the forget gate determines the degree of forgetting old information, and the output gate determines the output of the hidden state. In the reverse LSTM, the input sequence is processed in reverse to obtain the reverse hidden state sequence. The forward hidden state sequence and the reverse hidden state sequence are spliced in the time dimension to obtain the fused hidden state sequence. In order to highlight the important time step features, the attention mechanism is applied to weight the fused hidden state sequence, and the attention weight of each time step is calculated to obtain the weighted hidden state. The attention mechanism can automatically focus on the key moments in the sequence according to specific learning goals and give them higher weights. By applying the attention mechanism, the model can pay more attention to the key time nodes in the battery capacity change and improve the accuracy of capturing the capacity change trend. The weighted hidden state is input into the fully connected layer, and the ReLU activation function is used for nonlinear transformation to obtain the feature representation. The ReLU activation function can introduce nonlinearity into the network, making the model more expressive and able to effectively learn the complex features of battery capacity changes. In the output layer, a linear activation function is used to map the feature representation to a scalar output to obtain the final capacity prediction value. In order to optimize the model performance, the root mean square error loss is calculated based on the capacity prediction value and the true capacity value. The root mean square error is a loss function that measures the deviation between the predicted value and the true value, which can reflect the overall accuracy of the prediction model. In order to minimize the loss, the Adam optimizer is used to back-propagate and update the network parameters.The Adam optimizer is an optimization algorithm with an adaptive learning rate that can automatically adjust the learning rate according to the gradient information during the training process to achieve rapid convergence and reduce the impact of local optimal solutions. Through back propagation and parameter updates, the prediction performance of the network is gradually improved, and finally an initial capacity prediction model that can accurately predict the battery capacity is obtained.
[0019] 104. The initial capacity prediction model is used as the first layer model, and the metabolic gray model is used as the second layer model for stacking and integration to obtain a hybrid prediction model; Specifically, the initial capacity prediction model is used as the first layer model, and its output result is obtained to obtain the first output result. Then, the first output result is subjected to cumulative generation processing to obtain a predicted first-order cumulative sequence. The original sequence is converted into a relatively smooth sequence to better reflect the trend characteristics. Based on the predicted first-order cumulative sequence, the differential equation of the metabolic gray model is constructed. The metabolic gray model is a prediction model constructed based on time series data, which describes the change trend of data through differential equations. The parameters of the differential equation are solved using the least squares method to obtain the second prediction result of the metabolic gray model. The least squares method obtains the optimal parameter estimate by minimizing the residual square sum. The prediction residual sequence between the first output result and the second prediction result is calculated, and the prediction residual sequence is subjected to cumulative generation processing to construct a metabolic residual error gray model. The cumulative generation of the residual sequence effectively extracts the long-term trend characteristics in the prediction error, so that the metabolic residual error gray model can capture the information that the first layer model has not fully learned during the prediction process. By constructing the metabolic residual error gray model, the prediction of the first layer model is corrected to improve the accuracy of the overall prediction. The residual sequence of the metabolic residual error grey model is obtained and the state is divided to construct the Markov chain state transfer matrix. The residual sequence is divided into multiple discrete states according to certain rules, and is divided into multiple levels based on the size of the residual value. According to the transfer relationship between these states, the state transfer matrix of the Markov chain is constructed. The state transfer matrix of the Markov chain can describe the transition probability of the residual sequence between different states. The state transfer matrix is combined with the metabolic residual error grey model to obtain the metabolic Markov residual grey model. This model can better characterize the dynamic characteristics of the residual sequence and improve the description and correction capabilities of unexplained errors. The metabolic grey model, the metabolic residual error grey model and the metabolic Markov residual grey model are used as the second layer model, and the second prediction result of the metabolic grey model, the third prediction result of the metabolic residual error grey model and the fourth prediction result of the metabolic Markov residual grey model are feature spliced with the first output result of the initial capacity prediction model to obtain a fused feature vector. The attention mechanism is applied to the fused feature vector to calculate the attention weight of the prediction result of each model to obtain a weighted feature vector. The attention mechanism can automatically assign weights to the prediction results of each model, so that in the final prediction process, more attention is paid to the features that have made important contributions to capacity changes in a specific time period. The weighted feature vector is input into the fully connected neural network for nonlinear mapping to obtain a hybrid prediction result. The fully connected neural network can perform deep feature extraction on the weighted feature vector through multiple layers of nonlinear transformation and map it to the final prediction output. In order to optimize the hybrid prediction model, the weighted root mean square error loss is calculated based on the hybrid prediction results and the true capacity value, and end-to-end model training is performed.The weighted root mean square error loss can pay more attention to those important prediction errors during the training process, thereby effectively improving the overall prediction accuracy of the model. Through end-to-end training, the parameters of all network layers are updated synchronously, and finally a hybrid prediction model is obtained.
[0020] 105. Based on the hybrid prediction model, an elastic weight merging framework is constructed, and the model parameters are dynamically adjusted through a two-layer optimization algorithm to obtain the target capacity prediction model; Specifically, an elastic weight merging framework is constructed based on the hybrid prediction model. The output results of each sub-model of the hybrid prediction model are used as input features, and the true capacity value is used as the target variable. Preliminary model fusion and optimization are performed to obtain the initial weight allocation scheme. L1 regularization constraints are applied to the initial weight allocation scheme to construct the loss function of the elastic network. In the elastic network, L1 regularization is used to sparse the weights, that is, to assign small or even zero weights to unimportant features, making the model more concise and having stronger generalization ability. The regularization coefficient is selected by the cross-validation method, and the optimal regularization strength is determined by cross-validation to strike a balance between model complexity and prediction accuracy, and the regularized weight vector is obtained. The regularized weight vector is input into the outer optimizer of the two-layer optimization algorithm for global weight search to obtain a candidate weight set. In the two-layer optimization algorithm, the role of the outer optimizer is to globally explore the weights to ensure that the optimal weight combination is found in the entire search space. The weight scheme is ensured not to be limited to the local optimal solution through global search. For each weight vector in the candidate weight set, the inner optimizer of the two-layer optimization algorithm is applied for local optimization. The goal of local optimization is to make fine adjustments to the weight scheme found initially, so as to improve the performance of the model. In the inner optimization process, the adaptive moment estimation algorithm (Adam) is used to update the model parameters. Adam is an optimization algorithm that combines momentum and adaptive learning rate. Its advantage is that it can converge quickly and effectively deal with imbalances in the parameter space. By using the Adam optimizer, fine local adjustments are made on the basis of each candidate weight vector to obtain the optimized weight vector. Based on the optimized weight vector, the output results of each sub-model of the hybrid prediction model are weighted and combined to obtain the combined prediction result. By weighted combination of the outputs of different sub-models, the prediction advantages of each model under different data characteristics are effectively integrated, the prediction deviation of each model is minimized, and the overall prediction accuracy is improved. The combined prediction result is compared with the true capacity value, and the root mean square error is calculated. The root mean square error is used as the fitness function to evaluate and screen the candidate weight set. The root mean square error is an important indicator to measure the difference between the predicted value and the true value. The goal of the fitness function is to minimize the root mean square error to ensure that the final selected weight vector can achieve the minimum prediction error. By evaluating the candidate weight set, the optimal weight vector with the best prediction performance is screened out to make the model achieve the highest prediction accuracy. The optimal weight vector is applied to the hybrid prediction model to adjust the model parameters and obtain the target capacity prediction model.
[0021] 106. The real-time battery operation data of the golf cart battery is input into the target capacity prediction model for capacity prediction and health status assessment, and the capacity decay trend graph and the estimated value of the remaining service life are output.
[0022] Specifically, the real-time operation data of the golf cart battery is collected and preprocessed to obtain a real-time feature data set. Real-time data collection includes battery voltage, current, temperature and other data, which reflect the instantaneous operation status of the battery. The real-time data is preprocessed to remove the existing noise and outliers, and the data is standardized to ensure that the data scales of different features are consistent. The real-time feature data set is input into the first-layer initial capacity prediction model of the target capacity prediction model to obtain the initial capacity prediction result. The initial capacity prediction model can make a preliminary estimate of the current capacity state of the battery by modeling the input features. The initial capacity prediction result is accumulated and generated to obtain a real-time first-order cumulative sequence, and the real-time first-order cumulative sequence is input into the second-layer metabolic gray model to obtain the prediction result of the metabolic gray model. The purpose of the accumulation generation is to transform the original capacity prediction result into a smoother trend data sequence, so that the metabolic gray model can capture the overall trend of capacity change. The metabolic gray model is a model suitable for processing small sample time series data. By modeling the real-time cumulative sequence, it can accurately predict the medium- and long-term change trend of capacity, thereby effectively making up for the shortcomings of the initial capacity prediction model. Based on the initial capacity prediction results and the metabolic gray model prediction results, the real-time residual sequence is calculated, and the real-time residual sequence is input into the metabolic residual error gray model to obtain the prediction results of the metabolic residual error gray model. The real-time residual sequence reflects the difference between the initial capacity prediction and the metabolic gray model prediction results. This difference originates from the instantaneous fluctuation of the battery or the nonlinear characteristics that the metabolic gray model fails to fully capture. Modeling the residual using the metabolic residual error gray model can correct the prediction error and improve the overall prediction accuracy. The residual sequence of the metabolic residual error gray model is divided into states, and the Markov chain is used for modeling to obtain the state transfer matrix, and the result is input into the metabolic Markov residual gray model to obtain the prediction results of the metabolic Markov residual gray model. By dividing the residual into states, the residual sequence can be divided into different state levels, and the Markov chain is used to describe the transfer relationship between these states. The metabolic Markov residual gray model combines the advantages of the gray model and the Markov chain, which can not only describe the medium- and long-term trends in capacity changes, but also capture the random fluctuation characteristics in the residual sequence. The initial capacity prediction results, metabolic gray model prediction results, metabolic residual error gray model prediction results and metabolic Markov residual gray model prediction results are feature concatenated to form a fusion feature vector. The attention mechanism is used to calculate the attention weights of the prediction results of each model to obtain the weighted fusion features. The weighted fusion features are input into the fully connected neural network, and the real-time capacity prediction value is obtained through multi-layer nonlinear transformation. Based on the real-time capacity prediction value, a capacity decay trend graph is constructed, which reflects the gradual decrease of battery capacity over time.By extrapolating the capacity decay trend graph, the time point when the battery capacity reaches the preset threshold is determined, and the estimated value of the remaining service life of the battery is obtained. Usually, the preset capacity threshold is the lowest acceptable capacity limit of the battery. When the capacity drops to this limit, the battery will no longer be able to provide reliable performance. By extrapolating the capacity decay trend graph, the time point when the capacity reaches the threshold is predicted, helping users plan battery maintenance and replacement in advance to avoid inconvenience caused by battery failure.
[0023] In the embodiment of the present invention, the incremental capacity curve is generated by combining the back propagation neural network and the generalized derivative method, and the high-quality three-dimensional feature vector is extracted to effectively capture the key features of the battery capacity degradation, thereby improving the input quality of the prediction model. The bidirectional long short-term memory network is used as the initial capacity prediction model, which makes full use of the long-term dependency and bidirectional information flow of the battery capacity degradation, and enhances the model's learning ability for time series features. The initial capacity prediction model is stacked and integrated with the metabolic gray model to construct a multi-level hybrid prediction model, which not only retains the nonlinear fitting ability of the deep learning model, but also incorporates the modeling advantages of the gray system theory for small samples and uncertain systems. The elastic weight merging framework and the two-layer optimization algorithm are introduced to realize the dynamic adjustment of the model parameters, and improve the adaptability and robustness of the prediction model to different operating conditions. Through the collaborative prediction of multiple sub-models and the weight allocation of the attention mechanism, the prediction deviation of a single model is effectively reduced, and the overall prediction accuracy is improved. The whole process automation from historical data preprocessing to real-time capacity prediction is realized, providing a one-stop solution for the golf cart battery management system, which is convenient for practical deployment and application. The output capacity decay trend graph and remaining service life estimate provide an intuitive and reliable decision-making basis for golf cart maintenance planning and battery replacement timing.
[0024] In a specific embodiment, the process of executing step 101 may specifically include the following steps: The voltage, current and temperature data of the golf cart battery during the charging and discharging process are collected to obtain the original data set; The sliding window technology is used to divide the continuous time series data in the original data set into data segments of fixed length to obtain a segmented data set, and the outliers and noise in the segmented data set are identified and removed to obtain a cleaned data set; The cleaned data set is standardized to eliminate the dimensional differences between different features to obtain a standardized data set. Based on the standardized data set, the statistical features in each data segment are calculated, including the mean, variance, peak value, and valley value to obtain a statistical feature set. The statistical feature set is subjected to feature dimensionality reduction to obtain a reduced feature set, the reduced feature set is arranged in chronological order, a time series feature matrix is constructed, and the time series feature matrix is normalized to obtain a time series feature data set.
[0025] Specifically, the operating status of the battery is fully monitored and collected. The original data set is obtained by recording the key parameters such as voltage, current and temperature of the battery at different time points during the charging and discharging process in real time. The original data set exists in the form of a time series, in which variables such as voltage (V), current (I), temperature (T) change with time (t). The sliding window technology is used to divide the continuous time series data in the original data set into data segments of fixed length to obtain a segmented data set. Assume that the length of the sliding window is , the step length is , divide the original data set into multiple data segments to form a segmented data set. The data for each time period is expressed as: ; in, Indicates The first The data of each time point includes features such as voltage, current and temperature. The outliers and noise in the segmented data set are identified and removed. In the process of outlier identification, statistical methods and machine learning methods are used. For example, the standard deviation-based method is used to determine whether a data point is an outlier. If a data point deviates from the mean of the data segment where it is located by more than a set threshold (such as B times the standard deviation), it is considered an outlier. For noise removal, signal processing techniques such as low-pass filters are used to obtain a cleaned data set. The cleaned data set is standardized to eliminate the dimensional differences between different features and obtain a standardized data set. Based on the standardized data set, the statistical features in each data segment are calculated to obtain a statistical feature set. Statistical features include mean, variance, peak and valley, which can effectively describe the dynamic characteristics of the battery during the charging and discharging process. The mean represents the average state of the battery during the entire charging and discharging process, and the variance describes the volatility of the data within the data segment, which can reflect the stability of the battery. The peak and valley represent the maximum and minimum values in the data segment, respectively, and are used to determine the extreme state of the battery during the charging and discharging process. In order to reduce the feature dimension and computational complexity, the statistical feature set is subjected to feature dimensionality reduction to retain the most important information in the data while removing redundant and irrelevant features to improve the efficiency and generalization ability of the model. A commonly used dimensionality reduction method is principal component analysis (PCA), which projects high-dimensional data into a lower-dimensional space to retain the maximum amount of information. For example, for a feature vector X containing multiple statistical features, PCA is used to convert it into a low-dimensional feature vector Y: ; in, It is a dimensionality reduction matrix, which is obtained by calculating eigenvalues and eigenvectors. Through PCA dimensionality reduction, the original high-dimensional feature vector is converted into a low-dimensional vector containing the main components, thereby reducing data redundancy and improving the efficiency of subsequent modeling. The reduced feature set is arranged in chronological order to construct a time series feature matrix. Each row of the time series feature matrix represents a dimensionality reduction feature within a time segment. The matrix can reflect the feature changes of the battery in different time periods. In order to eliminate the numerical differences between different features, the time series feature matrix is normalized, and all eigenvalues are converted to the same range, usually [0, 1] or [-1, 1], to obtain a time series feature data set.
[0026] In a specific embodiment, the process of executing step 102 may specifically include the following steps: Input the charging voltage and current data in the time series feature data set into the pre-trained generalized derivative network to obtain a high-precision voltage derivative sequence; Based on the high-precision voltage derivative sequence, the charging data is sampled at equal intervals, and the sampling interval is set to 0.1V to obtain uniformly distributed charging data points; Calculate the capacity increment ΔQ and voltage increment ΔV between adjacent points in the uniformly distributed charging data points, and use the central difference method to obtain a discrete dQ / dV value sequence; Apply a 5-point sliding average filter to the discrete dQ / dV value sequence to remove high-frequency noise and obtain a smoothed dQ / dV value sequence; The incremental capacity curve is plotted with voltage V as the horizontal axis and the smoothed dQ / dV value as the vertical axis, and a continuous IC curve is obtained using the cubic spline interpolation method; Characteristic peaks and valleys are identified on the IC curve, and the precise positions of the peak points and valley points are determined by Gaussian fitting to obtain a set of characteristic points. The peak voltage, peak dQ / dV and corresponding cumulative capacity Q are extracted from the set of characteristic points to construct a three-dimensional feature vector.
[0027] Specifically, the charging voltage and current data in the time series feature data set are input into the pre-trained generalized derivative network to obtain a high-precision voltage derivative sequence. The generalized derivative network is a model based on a neural network. It learns the changing characteristics of time series data and calculates its derivatives to capture the changing trend of the data. The input data includes the voltage (V) and current (l) of the battery at different charging stages. The generalized derivative network generates the corresponding high-precision voltage derivative sequence based on these input data, which is expressed as The derivative sequence can reflect the rate of change of voltage over time and reveal the reaction kinetics of the battery. Based on the high-precision voltage derivative sequence, the charging data is sampled at equal intervals, and the sampling interval is set to 0.1V. The entire charging voltage range is divided and sampled every 0.1V to obtain uniformly distributed charging data points. Calculate the capacity increment between adjacent points in the uniformly distributed charging data points and voltage increment Capacity increase Indicates the change in capacity during charging, while the voltage increment Represents the voltage difference between two adjacent sampling points. In order to obtain the relationship between voltage and capacity, the central difference method is used to calculate the discrete derivative value sequence , the formula is as follows: ; in, and are the capacity values of adjacent sampling points, and are the voltage values of adjacent sampling points. Through the central difference method, the discrete derivative value of each data point is obtained to form a discrete In order to reduce the high-frequency noise in the data, the discrete The value sequence is filtered by a 5-point moving average filter, which smoothes the data by taking the average of adjacent data points, eliminating high-frequency noise and making the curve smoother and more coherent. The formula for the 5-point moving average filter is: ; in, Represents the smoothed value, Indicates the value of the current point and the four adjacent points before and after it in the original sequence. In this way, the influence of high-frequency noise is effectively reduced, making The series is smoother. After the value sequence, the voltage is the horizontal axis, smoothed The incremental capacity curve is drawn with the value as the ordinate. This curve reflects the rate of change of the capacity of the battery during the charging process. In order to smooth and continuous the incremental capacity curve, the cubic spline interpolation method is used to obtain a continuous IC curve. Cubic spline interpolation generates a continuous curve by smoothing and fitting discrete data points. Through cubic spline interpolation, a cubic polynomial is constructed between every two sampling points to ensure the continuity and smoothness of the curve. The generated IC curve reflects the relationship between the battery capacity and the voltage change and is used to identify key characteristic points. On the IC curve, the characteristic peaks and valleys are identified by analyzing the shape of the curve. Generally, the peaks and valleys in the IC curve correspond to important stages of the internal reaction of the battery, such as SEI film formation, lithium ion insertion and deinsertion processes, etc. In order to accurately determine the position of the peak point and valley point, Gaussian fitting is applied to fit the characteristic peaks and valleys. Gaussian fitting is a curve fitting method suitable for peak identification. The position of the peak and valley and its corresponding characteristic value are determined more accurately by fitting. For example, assuming that a characteristic peak is located at 3.8V, a more accurate peak position and its corresponding maximum value can be obtained after using Gaussian fitting. Through Gaussian fitting, we get a set of characteristic points, from which we can extract the peak voltage and peak and the corresponding cumulative capacity , construct a three-dimensional feature vector. The three-dimensional feature vector is expressed as: ; in, represents the voltage corresponding to the characteristic peak, Indicates the characteristic peak corresponding to value, Indicates the corresponding cumulative capacity.
[0028] In a specific embodiment, the process of executing step 103 may specifically include the following steps: Divide the three-dimensional feature vector into time series, set the sliding window size to 30 and the step size to 1, and obtain the input sequence data set; Construct a bidirectional long short-term memory network structure, including an input layer, a bidirectional LSTM layer, a fully connected layer, and an output layer. The bidirectional LSTM layer contains a forward LSTM and a reverse LSTM, each direction containing 64 hidden units. In the input layer, the input sequence data is embedded, and the three-dimensional feature vector is mapped to a 128-dimensional latent space to obtain an embedded sequence; The embedded sequence is input into the bidirectional LSTM layer. In the forward LSTM, the information is selectively memorized and forgotten through the input gate, forget gate, and output gate to obtain the forward hidden state sequence. In the reverse LSTM, the input sequence is processed in reverse to obtain the reverse hidden state sequence. The forward hidden state sequence and the reverse hidden state sequence are concatenated in the time dimension to obtain a fused hidden state sequence, and the attention mechanism is applied to the fused hidden state sequence to calculate the attention weight of each time step to obtain a weighted hidden state; The weighted hidden state is input into the fully connected layer, and the ReLU activation function is used for nonlinear transformation to obtain the feature representation. The linear activation function is used in the output layer to map the feature representation to a scalar output to obtain the capacity prediction value. The root mean square error loss is calculated based on the capacity prediction value and the actual capacity value, and the Adam optimizer is used for back propagation to update the network parameters and obtain the initial capacity prediction model.
[0029] Specifically, the three-dimensional feature vector is divided into time series. The sliding window technology is used to divide the three-dimensional feature vector into time series, where the sliding window size is set to 30 and the step size is 1. This means that in each sliding window operation, 30 continuous feature vectors are selected as an input sequence, and 1 data point is slid each time to obtain the input sequence data set. The sliding window operation helps to capture the short-term dynamic changes and long-term dependencies between features. A bidirectional long short-term memory network (BiLSTM) structure is constructed to predict the battery capacity. The network includes an input layer, a bidirectional LSTM layer, a fully connected layer, and an output layer, where the bidirectional LSTM layer contains a forward LSTM and a reverse LSTM, and each direction contains 64 hidden units. Bidirectional LSTM is a deep learning network structure suitable for time series data. Through the LSTM units in the forward and reverse directions, it can simultaneously learn the past and future information of the time series and capture the bidirectional dependencies in the data. In the input layer, the input time series data is embedded, and the three-dimensional feature vector is mapped to a 128-dimensional hidden space to obtain an embedded sequence. The purpose of embedding is to increase the representation ability of data so that subsequent network layers can better extract features in high-dimensional space. An embedding layer converts the original three-dimensional features into a 128-dimensional feature vector, increasing the complexity and expressiveness of the features. ,in is a three-dimensional feature vector, which is embedded in the embedding layer to obtain an embedded sequence ,in Represents a hidden space mapped to 128 dimensions. The embedded sequence is input into the bidirectional LSTM layer. In the forward LSTM, information is selectively memorized and forgotten through the input gate, forget gate, and output gate to obtain a forward hidden state sequence. The LSTM unit controls the input of new information through the input gate, determines the degree of retention of historical information through the forget gate, and generates a new hidden state through the output gate. Suppose the input sequence is , the calculation formula of the forward LSTM unit is as follows: ; in, represents the forward hidden state, is the activation value of the output gate, is the cell state, In the reverse LSTM, the input sequence is processed in reverse, starting from the end of the sequence and inputting in sequence to obtain the reverse hidden state sequence The forward and reverse LSTM layers process data in different orders, which can capture the cause-and-effect relationship in the battery capacity change. The forward hidden state sequence and the reverse hidden state sequence are concatenated in the time dimension to obtain the fused hidden state sequence. ,in Indicates that the forward and reverse hidden states are concatenated in the feature dimension. The attention mechanism is applied to the fused hidden state sequence, and the attention weight of each time step is calculated to obtain the weighted hidden state. The introduction of the attention mechanism enables the model to adaptively assign the weight of each time step according to the current learning goal, thereby paying more attention to the features that play a key role in battery capacity prediction. Assume that the attention weight is , then the weighted hidden state is expressed as: ; in, represents the length of the sequence, Represents the time step The attention weight, Represents the hidden state. Through the attention mechanism, the model effectively focuses on the information that has an important impact on the current prediction, thereby improving the prediction effect. The weighted hidden state is input into the fully connected layer and nonlinearly transformed using the ReLU activation function to obtain the feature representation. The ReLU activation function can introduce the nonlinear characteristics of the model and improve the model's ability to fit complex relationships. The definition of ReLU is: ; By using ReLU, the network keeps the output of positive values as they are and sets negative values to 0, thereby introducing sparsity and improving the training speed and generalization ability of the model. The feature representation obtained after the full connection layer and ReLU activation is passed to the output layer, where a linear activation function is used to map the feature representation to a scalar output to obtain the battery capacity prediction value. The linear activation function is defined as , the purpose is to ensure the linear relationship between the output result and the capacity value, so as to facilitate the subsequent error calculation. In order to evaluate the performance of the prediction model, the root mean square error loss is calculated based on the capacity prediction value and the true capacity value. The root mean square error is a regression task loss function that measures the difference between the predicted value and the true value. The formula is: ; in, represents the number of samples, Indicates The true capacity value of the samples, Indicates The predicted capacity value of samples. RMSE reflects the square root of the prediction error. The smaller its value, the better the prediction performance of the model. The Adam optimizer is used to back-propagate and update the parameters of the model to obtain the initial capacity prediction model. Adam is an optimization algorithm based on first-order and second-order momentum. It combines the advantages of momentum optimization and adaptive learning rate to train the model quickly and effectively. The update formula of Adam is: ; in, represents the model parameters, represents the learning rate, and denote the estimates of the first-order momentum and the second-order momentum of the gradient, respectively. is a small constant that prevents the denominator from being zero. By using the Adam optimizer, the model dynamically adjusts the learning rate at each training step to achieve fast convergence and reduce oscillations during training.
[0030] In a specific embodiment, the process of executing step 104 may specifically include the following steps: The initial capacity prediction model is used as the first layer model, and the first output result of the initial capacity prediction model is used as input, and the first output result of the initial capacity prediction model is accumulated and generated to obtain a predicted first-order accumulation sequence; A differential equation of a metabolic grey model is constructed based on the predicted first-order cumulative sequence, the differential equation parameters are solved using the least square method, and a second prediction result of the metabolic grey model is obtained; Calculating a prediction residual sequence between the first output result and the second prediction result, and performing accumulation generation processing on the prediction residual sequence to construct a metabolic residual error grey model; Obtain the residual sequence of the metabolic residual error grey model and perform state division, construct the Markov chain state transfer matrix, and combine the state transfer matrix with the metabolic residual error grey model to obtain the metabolic Markov residual grey model; The metabolic gray model, the metabolic residual error gray model and the metabolic Markov residual gray model are used as the second layer model, and the second prediction result of the metabolic gray model, the third prediction result of the metabolic residual error gray model and the fourth prediction result of the metabolic Markov residual gray model are feature spliced with the first output result of the initial capacity prediction model to obtain a fused feature vector; Apply the attention mechanism to the fused feature vector, calculate the attention weight of each model prediction result, obtain the weighted feature vector, and input the weighted feature vector into the fully connected neural network for nonlinear mapping to obtain the hybrid prediction result; The weighted root mean square error loss is calculated based on the hybrid prediction results and the true capacity value, and end-to-end training is performed to obtain the hybrid prediction model.
[0031] Specifically, the initial capacity prediction model is used as the first layer model, and the first output result of the initial capacity prediction model is used as input. The first output result of the initial capacity prediction model is accumulated and generated to obtain a first-order accumulated sequence of predictions. For example, if the initial output is the sequence , the predicted first-order cumulative sequence after accumulation It is expressed as: ; in, represents the initial prediction model output values, Indicates the cumulative generation of Based on the predicted first-order cumulative sequence, the differential equation of the metabolic gray model is constructed. The metabolic gray model is a model suitable for small samples and time series data, which describes the change trend of the data through differential equations. When constructing the metabolic gray model, it is assumed that the cumulative generation sequence Satisfies the following differential equation: ; in, Represents the cumulative sequence over time The rate of change, and are the parameters of the model. To solve this differential equation, the least squares method is used to find the parameters and The least squares method determines the optimal parameters by minimizing the sum of squares of the residuals, so that the model can better fit the data and obtain the second prediction result of the metabolic gray model. The objective function of the least squares method is expressed as: ; The optimal parameter value is obtained by taking the derivative of the objective function and setting the derivative to zero. After obtaining the second prediction result of the metabolic gray model, the prediction residual sequence between the first output result and the second prediction result is calculated, and the prediction residual sequence is accumulated and generated to construct a metabolic residual error gray model. The prediction residual sequence represents the difference between the initial prediction model and the metabolic gray model in the prediction. These differences are caused by the failure of the initial model and the metabolic gray model to fully capture the complex patterns in the data. Through cumulative generation, the residual sequence becomes smoother, which is helpful for the subsequent modeling of the metabolic residual error gray model. The metabolic residual error gray model uses the cumulative generation results of the residual sequence to model and correct the error to improve the overall prediction accuracy. Obtain the residual sequence of the metabolic residual error gray model, divide it into states, and construct a Markov chain state transfer matrix. Divide the residual sequence into multiple discrete states, for example, divide it into different levels according to the size of the residual value, and each level corresponds to a discrete state. Based on the transfer relationship between these states, the state transfer matrix of the Markov chain is constructed. Let the state set be , the state transfer matrix Elements Indicates that the system is in state Transfer to state The probability is expressed as: ; In this way, the state transfer matrix describing the state transfer characteristics of the residual sequence is obtained, and the state transfer matrix is combined with the metabolic residual error gray model to construct the metabolic Markov residual gray model. This model can capture the randomness and dynamic change characteristics in the residual sequence. The metabolic gray model, the metabolic residual error gray model and the metabolic Markov residual gray model are used as the second-layer model, and the features are fused in combination with the output results of the initial capacity prediction model to obtain a fused feature vector. The second prediction result of the metabolic gray model, the third prediction result of the metabolic residual error gray model and the fourth prediction result of the metabolic Markov residual gray model are spliced with the first output result of the initial capacity prediction model to obtain a fused feature vector. The attention mechanism is applied to the fused feature vector to calculate the attention weight of each model prediction result to obtain a weighted fused feature vector. The introduction of the attention mechanism enables the model to dynamically adjust the weight of each prediction result according to the importance of the data, thereby paying more attention to the information that is most important to the current prediction task. Let the fused feature vector be , the attention weight is , then the weighted fusion feature vector is expressed as: ; in, Indicates The attention weights of the features are calculated by weighted summing these features to obtain the final weighted fusion feature vector . The weighted fused feature vector is input into the fully connected neural network for nonlinear mapping to obtain the hybrid prediction result. The fully connected layer can extract the complex relationship between features through multiple layers of nonlinear transformation and improve the prediction ability of the model. The weighted root mean square error (RMSE) loss is calculated based on the hybrid prediction result and the true capacity value, and the model is trained end-to-end. The formula for the weighted root mean square error is: ; in, represents the number of samples, Indicates The weight of the samples, Indicates the real capacity value, Represents the predicted capacity value. By minimizing the weighted root mean square error and optimizing the model parameters, an accurate hybrid prediction model is finally obtained.
[0032] In a specific embodiment, the process of executing step 105 may specifically include the following steps: Based on the hybrid prediction model, an elastic weight merging framework is constructed. The output results of each sub-model of the hybrid prediction model are used as input features, and the true capacity value is used as the target variable to obtain the initial weight allocation scheme. Apply L1 regularization constraint to the initial weight distribution scheme and construct the elastic network loss function, where the regularization coefficient is determined by cross-validation to obtain the regularized weight vector; The regularized weight vector is input into the outer optimizer of the two-layer optimization algorithm to perform a global weight search to obtain a candidate weight set; For each weight vector in the candidate weight set, the inner optimizer of the two-layer optimization algorithm is applied to perform local optimization, and the model parameters are updated using the adaptive moment estimation algorithm to obtain the optimized weight vector; Based on the optimized weight vector, the output results of each sub-model of the hybrid prediction model are weighted combined to obtain the combined prediction result; The root mean square error is calculated between the combined prediction result and the actual capacity value, and the root mean square error is used as the fitness function to evaluate and screen the candidate weight set to obtain the optimal weight vector; The optimal weight vector is applied to the hybrid prediction model to adjust the model parameters and obtain the target capacity prediction model.
[0033] Specifically, an elastic weight merging framework is constructed based on the hybrid prediction model. The output results of each sub-model of the hybrid prediction model are used as input features, and the actual battery capacity value is used as the target variable, so as to perform a weighted combination of the outputs of different sub-models and obtain an initial weight allocation scheme. The hybrid prediction model contains multiple sub-models. The output results of each sub-model describe the battery capacity status from different perspectives. These sub-models are combined to make full use of the information of each sub-model and maximize the overall prediction accuracy. Assume that the sub-model output of the hybrid prediction model is , and the actual capacity value is , the initial weight distribution scheme is expressed as the weight vector ,in Indicates The weights of the sub-models. On the basis of the initial weight distribution scheme, in order to avoid overfitting of the model and enhance the robustness of the model, the L1 regularization constraint is applied to the initial weight distribution scheme to construct the elastic network loss function. L1 regularization imposes constraints on the weight vector so that the weights of unimportant features are close to zero, reducing the complexity of the model and improving the generalization ability. The goal of the elastic network loss function is to minimize the error between the weighted prediction result and the true capacity value, while applying L1 regularization to the weights. The elastic network loss function is defined as: ; in, represents the elastic net loss function, represents the number of samples, Indicates The true capacity value of the samples, Indicates In the sample The predicted value of each sub-model, represents the regularization coefficient. The determination is achieved through cross-validation, by The value is verified, and the value that makes the model perform best is selected to obtain the regularized weight vector. The regularized weight vector is input into the outer optimizer of the two-layer optimization algorithm to perform a global search of the weights and obtain a candidate weight set. The outer optimizer of the two-layer optimization algorithm is used to explore the entire weight space to find the optimal weight combination. Through global search, the entire weight distribution is covered to ensure that a weight vector set close to the global optimal solution is found. Assume that the candidate weight set obtained is , where each Represents a candidate weight vector. For each weight vector in the candidate weight set, the inner optimizer of the two-layer optimization algorithm is applied for local optimization. The purpose of the inner layer optimization is to further fine-tune the candidate weights to improve the prediction accuracy of the model. In the inner layer optimization, the adaptive moment estimation algorithm (Adam) is used to update the model parameters. Adam is an optimization algorithm that combines momentum and adaptive learning rate. It dynamically adjusts the learning rate through the estimation of first-order momentum and second-order momentum, thereby effectively updating the parameters. The parameter update formula of Adam is: ; in, represents the model parameters, represents the learning rate, represents the first-order momentum of the gradient, represents the second-order momentum of the gradient, is a small constant used to prevent the denominator from being zero. Through the Adam optimizer, each candidate weight vector is fine-tuned to obtain the optimized weight vector. Based on the optimized weight vector, the output results of each sub-model of the hybrid prediction model are weighted combined to obtain the combined prediction result. The weighted combination is expressed as: ; in, represents the combined prediction result, represents the optimized weight, Indicates The combined prediction result is compared with the actual capacity value, the root mean square error (RMSE) is calculated, and the RMSE is used as the fitness function to evaluate and screen the candidate weight set to obtain the optimal weight vector. RMSE is an indicator that measures the difference between the predicted value and the actual value. The formula is: ; in, Indicates The combined prediction value of samples is Represents the true capacity value. By calculating RMSE, the prediction performance of each candidate weight vector is evaluated, and the weight vector with the smallest RMSE is selected as the optimal weight vector. The optimal weight vector is applied to the hybrid prediction model, and the model parameters are adjusted to finally obtain the target capacity prediction model. This model makes full use of the advantages of each sub-model, and through elastic weight merging and double-layer optimization, the weights can be adaptively adjusted to better adapt to different capacity change scenarios, thereby improving the overall prediction performance and the robustness of the model.
[0034] In a specific embodiment, the process of executing step 106 may specifically include the following steps: Collect and preprocess the real-time operating data of the golf cart battery to obtain a real-time feature data set; Inputting the real-time feature data set into the first-layer initial capacity prediction model of the target capacity prediction model to obtain an initial capacity prediction result; The initial capacity prediction results are accumulated and generated to obtain a real-time first-order accumulation sequence, and the real-time first-order accumulation sequence is input into the second-layer metabolic gray model to obtain the metabolic gray model prediction result; Based on the initial capacity prediction result and the metabolic grey model prediction result, the real-time residual sequence is calculated, and the real-time residual sequence is input into the metabolic residual error grey model to obtain the metabolic residual error grey model prediction result; The residual sequence of the metabolic residual error grey model is divided into states and Markov chain modeled, and the results are input into the metabolic Markov residual grey model to obtain the prediction results of the metabolic Markov residual grey model; The initial capacity prediction results, metabolic grey model prediction results, metabolic residual error grey model prediction results and metabolic Markov residual grey model prediction results are feature spliced, and the attention mechanism and fully connected neural network are applied to obtain the real-time capacity prediction value; A capacity decay trend graph is constructed based on the real-time capacity prediction value. By extrapolating the capacity decay trend graph, the time point when the battery capacity reaches the preset threshold is determined to obtain the estimated remaining service life.
[0035] Specifically, the real-time operating data of the battery is collected and preprocessed to obtain a real-time feature data set. The collected data includes key variables such as voltage (V), current (I), and temperature (T) of the battery during the charging and discharging process. These variables can reflect the current working status of the battery. The raw data is preprocessed, including denoising and normalization. Data anomalies caused by sensor noise or external interference are removed, and the normalization process converts each feature to the same numerical range to avoid certain features from having too much impact on the model due to different dimensions. The real-time feature data set is input into the first layer of the target capacity prediction model, the initial capacity prediction model, to obtain the initial capacity prediction result. The goal of the initial capacity prediction model is to make a preliminary estimate of the current capacity of the battery. Assume that the initial capacity prediction result is ,in Indicated in The capacity forecast value of each time step. The initial capacity forecast results are accumulated and generated to obtain a real-time first-order cumulative sequence. Accumulation generation is a way to smooth the time series. By accumulating the original sequence, its high-frequency fluctuations are eliminated and its trend is more obvious. The formula for first-order accumulation generation is: ; in, Indicates at time The accumulated value of Represents the initial capacity forecast value. By accumulating and generating, a new sequence is obtained. The real-time first-order cumulative sequence is input into the second layer of the target capacity prediction model, the metabolic gray model, to obtain the prediction results of the metabolic gray model. The metabolic gray model is a model suitable for small samples and time series with trend characteristics. It can describe the change law of data by constructing a differential equation. In this step, the metabolic gray model is based on the first-order cumulative sequence. Construct a differential equation and estimate the model parameters by the least squares method to obtain the prediction results of the metabolic gray model. Assume that the prediction results of the metabolic gray model are These results represent the capacity change trend predicted by the metabolic gray model. In order to improve the accuracy of the prediction, based on the initial capacity prediction results and metabolic grey model prediction results , calculate the real-time residual sequence. The residual sequence represents the difference between the two prediction results and can reveal the characteristics that the initial model and the metabolic gray model failed to capture. The calculation formula of the residual sequence is: ; in, Indicates at time The residual value of and Represent the initial capacity prediction value and the metabolic gray model prediction value respectively. By accumulating and generating the residual sequence, a metabolic residual error gray model is constructed to model and correct the error. The goal of the metabolic residual error gray model is to correct the error of the initial prediction model by capturing the trends and characteristics in the residual sequence to improve the accuracy of the overall prediction. The residual sequence of the metabolic residual error gray model is state-divided and Markov chain-modeled, and the state transition matrix is constructed. The result is input into the metabolic Markov residual gray model to obtain the prediction result of the metabolic Markov residual gray model. State division refers to dividing the values in the residual sequence into multiple discrete states according to certain rules. For example, based on the size of the residual, it is divided into three states: high, medium, and low, which represent different error levels. Based on the state division results, the state transition matrix of the Markov chain is constructed to describe the transition probability between different states. The elements of the state transition matrix represent the probability of transitioning from one state to another. This description can effectively capture the dynamic change characteristics in the residual sequence. The metabolic Markov residual grey model combines the advantages of the metabolic grey model and the Markov chain. It can not only describe the trend characteristics of capacity changes, but also model the random fluctuations in the residual sequence, thereby improving the accuracy of the prediction. , Metabolic grey model prediction results , Grey model prediction results of metabolic residual error and metabolic Markov residual grey model prediction results Perform feature concatenation to obtain a fused feature vector. Apply the attention mechanism to the fused feature vector to calculate the attention weight of each model prediction result and obtain a weighted fused feature vector. The introduction of the attention mechanism enables the model to automatically assign weights to each prediction result, thereby paying more attention to the information that is most important for prediction at the current moment. Assume that the attention weight is , then the weighted fusion feature vector is expressed as: ; in, Indicates The attention weight of the model prediction results, Represents the corresponding prediction result. Through weighted summation, a weighted fusion feature vector that comprehensively considers each prediction model is obtained. . The weighted fusion feature vector The input is sent to the fully connected neural network for nonlinear mapping to obtain the real-time capacity prediction value. The fully connected layer extracts the complex relationship between the features through multiple layers of nonlinear transformation to improve the accuracy and generalization ability of the prediction. Suppose the output of the fully connected layer is , which is the real-time capacity prediction value of the battery. Based on the real-time capacity prediction value, a capacity decay trend graph is constructed. The capacity decay trend graph reflects the process of battery capacity gradually decreasing over time. By extrapolating the capacity decay trend graph, the time point when the battery capacity reaches the preset threshold is determined, thereby estimating the remaining service life of the battery. Assume that the preset capacity threshold is , determine the intersection point of the capacity decay curve and the threshold by extrapolation method, assuming that the intersection time is , then the estimated remaining useful life is expressed as: ; in, Indicates the remaining useful life. Indicates the current time. Indicates the time point when the capacity reaches the threshold. In this way, the remaining life of the battery is accurately estimated, helping users to maintain and replace the battery in time to avoid usage problems caused by insufficient battery capacity.
[0036] The above describes the method for predicting the battery capacity of a golf cart in an embodiment of the present invention. The following describes the device for predicting the battery capacity of a golf cart in an embodiment of the present invention. Figure 2 , an embodiment of a golf cart battery capacity prediction device in an embodiment of the present invention includes: The acquisition module 201 is used to collect and preprocess the historical charge and discharge data of the golf cart battery to obtain a time series feature data set; A construction module 202 is used to construct a generalized derivative method based on a time series feature data set using a back propagation neural network to generate an incremental capacity curve and extract a three-dimensional feature vector; A training module 203 is used to input the three-dimensional feature vector into a bidirectional long short-term memory network to obtain an initial capacity prediction model through training; An integration module 204 is used to stack and integrate the initial capacity prediction model as a first layer model and the metabolic grey model as a second layer model to obtain a hybrid prediction model; The optimization module 205 is used to construct an elastic weight merging framework based on the hybrid prediction model, dynamically adjust the model parameters through a two-layer optimization algorithm, and obtain a target capacity prediction model; The output module 206 is used to input the real-time battery operation data of the golf cart battery into the target capacity prediction model to perform capacity prediction and health status assessment, and output a capacity decay trend graph and a remaining service life estimation value.
[0037] Through the synergy of the above components, the incremental capacity curve is generated by combining the back propagation neural network and the generalized derivative method, and the high-quality three-dimensional feature vector is extracted to effectively capture the key features of battery capacity degradation, thereby improving the input quality of the prediction model. The bidirectional long short-term memory network is used as the initial capacity prediction model, which makes full use of the long-term dependency and bidirectional information flow of battery capacity degradation and enhances the model's learning ability for time series features. The initial capacity prediction model is stacked and integrated with the metabolic gray model to construct a multi-level hybrid prediction model, which not only retains the nonlinear fitting ability of the deep learning model, but also incorporates the modeling advantages of the gray system theory for small samples and uncertain systems. The elastic weight merging framework and the two-layer optimization algorithm are introduced to realize the dynamic adjustment of model parameters and improve the adaptability and robustness of the prediction model to different usage conditions. Through the collaborative prediction of multiple sub-models and the weight allocation of the attention mechanism, the prediction deviation of a single model is effectively reduced and the overall prediction accuracy is improved. The whole process automation from historical data preprocessing to real-time capacity prediction is realized, providing a one-stop solution for the golf cart battery management system, which is convenient for actual deployment and application. The output capacity decay trend graph and remaining service life estimate provide an intuitive and reliable decision-making basis for golf cart maintenance planning and battery replacement timing.
[0038] above Figure 2 The golf cart battery capacity prediction device in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The golf cart battery capacity prediction device in the embodiment of the present invention is described in detail from the perspective of hardware processing.
[0039] Figure 3 3 is a schematic diagram of the structure of a golf cart battery capacity prediction device provided by an embodiment of the present invention. The golf cart battery capacity prediction device 300 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 310 (for example, one or more processors) and a memory 320, and one or more storage media 330 (for example, one or more mass storage device terminals) storing application programs 333 or data 332. Among them, the memory 320 and the storage medium 330 can be short-term storage or permanent storage. The program stored in the storage medium 330 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the golf cart battery capacity prediction device 300. Furthermore, the processor 310 may be configured to communicate with the storage medium 330, and execute a series of instruction operations in the storage medium 330 on the golf cart battery capacity prediction device 300 to implement the steps of the above-mentioned golf cart battery capacity prediction method.
[0040] The golf cart battery capacity prediction device 300 may also include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input and output interfaces 360, and / or one or more operating systems 331, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc. It will be appreciated by those skilled in the art that Figure 3 The structure of the golf cart battery capacity prediction device shown does not constitute a limitation on the golf cart battery capacity prediction device provided by the present invention, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0041] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the steps of the golf cart battery capacity prediction method.
[0042] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0043] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0044] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A golf cart battery capacity prediction method, characterized in that: The method comprises: Collect and preprocess the historical charge and discharge data of golf cart batteries to obtain a time series feature data set; Based on the time series feature data set, a generalized derivative method is constructed using a back propagation neural network to generate an incremental capacity curve and extract a three-dimensional feature vector; Inputting the three-dimensional feature vector into a bidirectional long short-term memory network to obtain an initial capacity prediction model through training; The initial capacity prediction model is used as the first layer model, and the metabolic gray model is used as the second layer model for stacking and integration to obtain a hybrid prediction model; Based on the hybrid prediction model, an elastic weight merging framework is constructed, and model parameters are dynamically adjusted through a two-layer optimization algorithm to obtain a target capacity prediction model; The real-time battery operation data of the golf cart battery is input into the target capacity prediction model for capacity prediction and health status assessment, and a capacity decay trend graph and a remaining service life estimation value are output.
2. The golf cart battery capacity prediction method according to claim 1, characterized in that: The historical charge and discharge data of the golf cart battery is collected and preprocessed to obtain a time series feature data set, including: The voltage, current and temperature data of the golf cart battery during the charging and discharging process are collected to obtain the original data set; Using a sliding window technique to divide the continuous time series data in the original data set into data segments of fixed length to obtain a segmented data set, and identifying and removing outliers and noise in the segmented data set to obtain a cleaned data set; The cleaned data set is standardized to eliminate the dimensional differences between different features to obtain a standardized data set, and based on the standardized data set, the statistical features in each data segment are calculated, including the mean, variance, peak value, and valley value to obtain a statistical feature set; The statistical feature set is subjected to feature dimensionality reduction to obtain a feature set after dimensionality reduction, the feature set after dimensionality reduction is arranged in chronological order to construct a time series feature matrix, and the time series feature matrix is normalized to obtain a time series feature data set.
3. The golf cart battery capacity prediction method according to claim 2, characterized in that: The method of constructing a generalized derivative method based on the time series feature data set using a back propagation neural network to generate an incremental capacity curve and extract a three-dimensional feature vector includes: Inputting the charging voltage and current data in the time series feature data set into a pre-trained generalized derivative network to obtain a high-precision voltage derivative sequence; Based on the high-precision voltage derivative sequence, the charging data is sampled at equal intervals, and the sampling interval is set to 0.1V to obtain uniformly distributed charging data points; Calculating the capacity increment ΔQ and the voltage increment ΔV between adjacent points in the uniformly distributed charging data points, and obtaining a discrete dQ / dV value sequence using a central difference method; Applying a 5-point sliding average filter to the discrete dQ / dV value sequence to eliminate high-frequency noise and obtain a smoothed dQ / dV value sequence; The incremental capacity curve is plotted with voltage V as the horizontal axis and the smoothed dQ / dV value as the vertical axis, and a continuous IC curve is obtained using the cubic spline interpolation method; Characteristic peaks and valleys are identified on the IC curve, and the precise positions of the peak points and valley points are determined by Gaussian fitting to obtain a set of characteristic points. The peak voltage, peak dQ / dV and corresponding cumulative capacity Q are extracted from the set of characteristic points to construct a three-dimensional feature vector.
4. The golf cart battery capacity prediction method according to claim 3, characterized in that: The step of inputting the three-dimensional feature vector into a bidirectional long short-term memory network and obtaining an initial capacity prediction model through training includes: Perform time series division on the three-dimensional feature vector, set the sliding window size to 30 and the step size to 1, and obtain an input sequence data set; Construct a bidirectional long short-term memory network structure, including an input layer, a bidirectional LSTM layer, a fully connected layer, and an output layer. The bidirectional LSTM layer contains a forward LSTM and a reverse LSTM, each direction containing 64 hidden units. Embedding the input sequence data at the input layer, mapping the three-dimensional feature vector to a 128-dimensional latent space, and obtaining an embedded sequence; The embedded sequence is input into the bidirectional LSTM layer. In the forward LSTM, the information is selectively memorized and forgotten through the input gate, the forget gate and the output gate to obtain a forward hidden state sequence. In the reverse LSTM, the input sequence is reversely processed to obtain a reverse hidden state sequence. The forward hidden state sequence and the reverse hidden state sequence are concatenated in the time dimension to obtain a fused hidden state sequence, and an attention mechanism is applied to the fused hidden state sequence to calculate the attention weight of each time step to obtain a weighted hidden state; Input the weighted hidden state into a fully connected layer, perform nonlinear transformation using a ReLU activation function to obtain a feature representation, and use a linear activation function in the output layer to map the feature representation to a scalar output to obtain a capacity prediction value; The root mean square error loss is calculated based on the capacity prediction value and the actual capacity value, and the Adam optimizer is used for back propagation to update the network parameters to obtain the initial capacity prediction model.
5. The golf cart battery capacity prediction method according to claim 4, characterized in that: The initial capacity prediction model is used as the first layer model, and the metabolic grey model is used as the second layer model for stacking and integration to obtain a hybrid prediction model, including: The initial capacity prediction model is used as a first-layer model, and the first output result of the initial capacity prediction model is used as input, and the first output result of the initial capacity prediction model is accumulated and generated to obtain a predicted first-order accumulated sequence; constructing a differential equation of a metabolic grey model based on the predicted first-order cumulative sequence, solving the differential equation parameters using a least squares method, and obtaining a second prediction result of the metabolic grey model; Calculating a prediction residual sequence between the first output result and the second prediction result, and performing accumulation generation processing on the prediction residual sequence to construct a metabolic residual error grey model; Obtaining the residual sequence of the metabolic residual error grey model and performing state division, constructing a Markov chain state transfer matrix, and combining the state transfer matrix with the metabolic residual error grey model to obtain a metabolic Markov residual grey model; The metabolic gray model, the metabolic residual error gray model and the metabolic Markov residual gray model are used as second-layer models, and the second prediction result of the metabolic gray model, the third prediction result of the metabolic residual error gray model and the fourth prediction result of the metabolic Markov residual gray model are feature-joined with the first output result of the initial capacity prediction model to obtain a fused feature vector; Applying an attention mechanism to the fused feature vector, calculating the attention weight of each model prediction result to obtain a weighted feature vector, and inputting the weighted feature vector into a fully connected neural network for nonlinear mapping to obtain a hybrid prediction result; A weighted root mean square error loss is calculated based on the hybrid prediction result and the true capacity value, and end-to-end training is performed to obtain a hybrid prediction model.
6. The golf cart battery capacity prediction method according to claim 5, characterized in that: The elastic weight merging framework is constructed based on the hybrid prediction model, and the model parameters are dynamically adjusted through a two-layer optimization algorithm to obtain a target capacity prediction model, including: Building an elastic weight merging framework based on the hybrid prediction model, taking the output results of each sub-model of the hybrid prediction model as input features and the real capacity value as the target variable, and obtaining an initial weight allocation scheme; Applying L1 regularization constraint to the initial weight distribution scheme, constructing an elastic network loss function, wherein the regularization coefficient is determined by cross-validation, and obtaining a regularized weight vector; Inputting the regularized weight vector into the outer optimizer of the two-layer optimization algorithm to perform a global weight search to obtain a candidate weight set; For each weight vector in the candidate weight set, the inner optimizer of the two-layer optimization algorithm is applied to perform local optimization, and the model parameters are updated using an adaptive moment estimation algorithm to obtain an optimized weight vector; Based on the optimized weight vector, weighted combination is performed on the output results of each sub-model of the hybrid prediction model to obtain a combined prediction result; Calculate the root mean square error between the combined prediction result and the actual capacity value, and use the root mean square error as a fitness function to evaluate and screen the candidate weight set to obtain an optimal weight vector; The optimal weight vector is applied to the hybrid prediction model to adjust model parameters to obtain a target capacity prediction model.
7. The golf cart battery capacity prediction method according to claim 6, characterized in that: The real-time battery operation data of the golf cart battery is input into the target capacity prediction model to perform capacity prediction and health status assessment, and output a capacity attenuation trend graph and a remaining service life estimation value, including: Collecting and preprocessing the real-time operating data of the golf cart battery to obtain a real-time feature data set; Inputting the real-time feature data set into the first-layer initial capacity prediction model of the target capacity prediction model to obtain an initial capacity prediction result; Performing accumulation generation processing on the initial capacity prediction result to obtain a real-time first-order accumulation sequence, and inputting the real-time first-order accumulation sequence into the second-layer metabolic gray model to obtain a metabolic gray model prediction result; Based on the initial capacity prediction result and the metabolic grey model prediction result, a real-time residual sequence is calculated, and the real-time residual sequence is input into the metabolic residual error grey model to obtain a metabolic residual error grey model prediction result; Performing state division and Markov chain modeling on the residual sequence of the metabolic residual error grey model, inputting the result into the metabolic Markov residual grey model, and obtaining the prediction result of the metabolic Markov residual grey model; The initial capacity prediction result, the metabolic gray model prediction result, the metabolic residual error gray model prediction result and the metabolic Markov residual gray model prediction result are feature spliced, and an attention mechanism and a fully connected neural network are applied to obtain a real-time capacity prediction value; A capacity decay trend graph is constructed based on the real-time capacity prediction value, and a time point when the battery capacity reaches a preset threshold is determined by extrapolating the capacity decay trend graph to obtain an estimated value of the remaining service life.
8. A golf cart battery capacity prediction device, characterized in that: The device is used to execute the golf cart battery capacity prediction method according to any one of claims 1 to 7, the device comprising: The acquisition module is used to collect and preprocess the historical charge and discharge data of the golf cart battery to obtain a time series feature data set; A construction module is used to construct a generalized derivative method based on the time series feature data set using a back propagation neural network to generate an incremental capacity curve and extract a three-dimensional feature vector; A training module, used for inputting the three-dimensional feature vector into a bidirectional long short-term memory network to obtain an initial capacity prediction model through training; An integration module, used for stacking and integrating the initial capacity prediction model as a first-layer model and the metabolic gray model as a second-layer model to obtain a hybrid prediction model; An optimization module, used for constructing an elastic weight merging framework based on the hybrid prediction model, dynamically adjusting model parameters through a double-layer optimization algorithm, and obtaining a target capacity prediction model; The output module is used to input the real-time battery operation data of the golf cart battery into the target capacity prediction model to perform capacity prediction and health status assessment, and output a capacity decay trend graph and a remaining service life estimation value.
9. A golf cart battery capacity prediction device, characterized in that: The golf cart battery capacity prediction device includes: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instructions in the memory to enable the golf cart battery capacity prediction device to execute the golf cart battery capacity prediction method according to any one of claims 1-7.
10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by a processor, the golf cart battery capacity prediction method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Lithium battery remaining service life prediction method and system based on optimized neural network
CN117665627A
Embedded device-oriented lithium battery service life prediction method
CN118604632A
Determining a lithium-plating state of a battery, and related systems, devices and methods
US20240006675A1
Cited By
Model training method and prediction method for jointly predicting SOC, RUL and SOH of battery
CN119936687A
Dynamic determination method and device of early warning threshold and storage medium
CN120218912A
Electric vehicle battery health assessment method and system based on multi-source data fusion
CN120507659A
Battery remaining life prediction method, system and device and medium
CN121186642A
Battery capacity prediction method and system and computer program product
CN121410573A
