Ship power lithium battery sailing mileage prediction method
By combining the width learning system and the particle swarm optimization algorithm, the problem of insufficient accuracy in estimating the state of charge of ship power lithium batteries is solved, high-precision mileage prediction is achieved, navigation risks and energy consumption are reduced, and the development of intelligent shipping is supported.
Patent Information
- Application Number
- CN202510673055.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-23
- Publication Date
- 2025-09-05
AI Technical Summary
The existing method for estimating the state of charge of ship power lithium batteries lacks accuracy, resulting in complex mileage predictions and a large gap between them and actual mileage results, posing navigation risks and safety hazards.
By combining the breadth learning system (BLS) with the particle swarm optimization algorithm (PSO), historical and real-time data are modeled to generate enhanced nodes and optimize model parameters. A voyage mileage prediction model is established, which is then deployed online and adjusted in real time on a real ship.
It achieves high-precision and efficient voyage mileage prediction, reduces navigation risks, optimizes navigation routes, and reduces energy consumption, supporting smart shipping and sustainable development.
Smart Images

Figure CN120596886A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ship power battery systems, and in particular to a method for predicting the mileage of a ship power lithium battery. Background Art
[0002] Predicting the remaining charge of lithium batteries in new energy vessels is crucial for safe navigation. However, many factors influence this, including wind speed, direction, longitude, latitude, speed, heading, load condition, and the battery's state of charge. Furthermore, current methods for estimating the state of charge of marine power lithium batteries lack sufficient accuracy, making range prediction extremely complex. The predicted results often differ significantly from actual voyage duration, leading to navigation risks and potential safety hazards. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a method for predicting the remaining mileage of a marine lithium battery with relatively accurate mileage prediction.
[0004] To solve the above technical problems, the technical solution adopted by the present invention is: a method for predicting the mileage of a ship power lithium battery, the specific steps of which are as follows:
[0005] S1: Ship power lithium battery navigation data acquisition
[0006] Navigation data acquisition includes historical data extraction and real-time data collection; historical data extraction comes from the historical database of the ship's integrated information management system, and real-time data collection is achieved through the sensor components of the ship's integrated information management system and the ship's battery management system. These data are used to update the historical database and store them in the real-time collection database respectively;
[0007] According to the nature of the data source, the data is divided into ship data, environmental data and battery management data;
[0008] S2: Navigation data modeling and sample data construction
[0009] The ship data, environmental data, and battery management data are defined as the dataset X = [x1, x2, ..., x n ] T , where x i =[x i1 ,x i2 ,…,x id ], x specifically represents the ship's discretion, navigation area water current, wind speed, longitude and latitude, speed, mileage, and battery state of charge (SOC) value, n is the number of samples, and d is the feature dimension;
[0010] The sample data is expressed as a real matrix with a specific dimension: X∈R n×d ;
[0011] The ship's weight, navigation area current, wind speed, longitude and latitude, speed, and battery state of charge (SOC) data constitute the sample independent variables, and the mileage constitutes the sample dependent variable, which serves as the sample data required for model training.
[0012] Sample data is extracted from the historical database and divided into a training set and a test set for model training and testing respectively. Before model training, the training data is normalized:
[0013]
[0014] Among them, A nm represents the normalized result, A represents the independent variable input value, and A max and A min Respectively represent the maximum and minimum values of the corresponding influencing factors in the data set;
[0015] S3: Modeling, training and testing of mileage prediction
[0016] S3.1: Building a Width Learning Model (BLS)
[0017] 3.1.1 Enhanced node generation; let the input data be X∈R n×d , where n is the number of samples and d is the feature dimension; randomly generate the weight matrix w∈R d×m , where m is the number of enhanced nodes; the generation process of enhanced node Z is as follows:
[0018]
[0019] is the activation function, concat(·) means concatenating the original input features and the enhanced nodes; the wide feature matrix z∈R n(d+m) Contains the original input features and enhanced nodes;
[0020] 3.1.2 Output weight calculation; The calculation method of output weight β is based on the pseudo-inverse method:
[0021]
[0022] where Y∈R n×c is the target value matrix. For regression problems, c = 1, it represents the matrix composed of the output values of n samples; Z T is the transpose of the wide feature matrix, (Z T Z) -1 is a pseudo-matrix;
[0023] 3.1.3 For test X testing , prediction results The calculation is as follows:
[0024]
[0025] in, β is the weight of the output layer, W is the random weight matrix used to enhance the generation of nodes;
[0026] S3.2: Determine the number of enhanced nodes Z for the BLS model; use the PSO algorithm to find the optimal number of enhanced nodes. The steps are as follows:
[0027] 3.2.1 Assume that there are N particles in the swarm P particles, and the position of each particle represents a candidate solution, that is, the number of enhanced nodes m; the speed and position update formula of the particle swarm is as follows:
[0028] V(t+1)=wV(t)+C1⊙R1⊙(Phest-X(t))+C2⊙R2⊙(Ghest-X(t)) (5) The position update formula is as follows:
[0029] X(t+1)=X(t)+V(t+1) (6)where, is the position matrix of all particles at the tth iteration; is the velocity matrix of all particles at the tth iteration; is the historical optimal position matrix of each particle; is the global optimal position scalar; w∈R 1×1 is the inertia weight; C1,C2∈R 1×1 is the learning factor; Is a random number matrix between [0,1]; ⊙ is the element-by-element multiplication (Hadamard product); The goal of PSO is to minimize the fitness function F(X), which is defined as the mean square error matrix on the validation set:
[0030]
[0031] in, is the true value matrix of the validation set, is the prediction matrix of the validation set, ‖·‖ F is the Frobenius norm;
[0032] 3.2.2 Initialize particle swarm; particle initial position matrix Generate randomly within the search space:
[0033] X(0)~U[lb,ub] (8)
[0034] where lb,ub∈R 1×1 are the lower and upper limits of the number of enhanced nodes respectively; the initial velocity matrix Randomly initialized to a small value close to zero;
[0035] 3.2.3 Iterative Optimization: In each iteration, the fitness matrix F(X) of each particle is calculated; the individual optimal position matrix Pbest and the global optimal position scalar Gbest of each particle are updated; the particle position matrix X(t) and velocity matrix V(t) are adjusted according to the velocity and position update formulas;
[0036] 3.2.4 When the maximum number of iterations is reached or the fitness matrix F(x) converges, stop the iteration; finally, return the number of enhanced nodes m corresponding to Gbest;
[0037] S4: Reconstructed Sum
[0038] The weight matrix w of the BLS model is randomly determined. N groups of BLS models will be repeatedly generated and reconstructed and summed to finally complete the model establishment.
[0039] S5: Online deployment and prediction model optimization
[0040] The trained deep learning model is deployed online on the actual ship. The sailing mileage is predicted based on the data information of the real-time database and the current state of charge of the lithium battery. Based on this, the actual ship's sailing route is optimized and the actual ship's sailing mileage warning is issued.
[0041] As a preferred solution, when the ship power lithium battery system has been used for a certain period of time, or when it is repaired and maintained due to a fault, resulting in changes in the energy consumption characteristics and energy storage characteristics of the lithium battery system, it is necessary to retrain the model to correct the prediction error and repeat steps S1 to S5.
[0042] As a preferred solution, the ship data, the environmental data and the battery management data are all stored and processed using a relational model. The ship data adopts a one-to-many model, that is, one ship or a type of ship is defined to correspond to multiple load capacities; the environmental data adopts a many-to-many data model, including the relationship between the navigation area and water flow, wind speed, longitude and latitude; the battery management data includes the battery state of charge (SOC) value, speed, and mileage, and the relationship between the battery state of charge (SOC) value and the speed and mileage is defined as a one-to-many relationship.
[0043] As a preferred solution, the activation function described in formula (2) Use Relu function.
[0044] The beneficial effects of the present invention are:
[0045] (1) The present invention proposes a method for predicting the mileage of a ship's power lithium battery based on a combination of a broad learning system (BLS) and a particle swarm optimization algorithm (PSO). The method has significant advantages in addressing the problem of insufficient accuracy in the state of charge (SOC) assessment of lithium batteries due to the influence of various factors. The method also achieves high accuracy and high efficiency in predicting the mileage.
[0046] (2) Combined with the particle swarm optimization algorithm, the model parameters can be dynamically adjusted to adapt to data changes under different conditions. This adaptive mechanism ensures that high evaluation accuracy can be maintained even in complex environments. At the same time, it is considered to train multiple BLS models by randomly generating the weight matrix W multiple times, and the results of these models are combined or averaged to obtain a more stable and better performing integrated model.
[0047] (3) It has the advantage of real-time monitoring and adjustment. This method supports real-time data updates, so that the prediction results can be adjusted immediately according to the latest battery status during navigation, ensuring that the predicted value is always close to the actual situation.
[0048] (4) Through high-precision and efficient voyage mileage prediction, the navigation risk of ships can be effectively reduced, the navigation route can be optimized, and energy consumption can be reduced, providing strong technical support for promoting smart shipping and sustainable development. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 This is a flowchart of the mileage prediction method of the present invention.
[0050] Figure 2 Schematic diagram of prediction data collection and sample data extraction of the present invention.
[0051] Figure 3 This is a flow chart of the mileage prediction algorithm of the present invention.
[0052] Figure 4 This is a diagram showing the prediction results of the mileage prediction model of the present invention. DETAILED DESCRIPTION
[0053] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0054] like Figure 1-4 As shown, a method for predicting the mileage of a ship power lithium battery is provided, and the specific steps are as follows:
[0055] S1: Ship power lithium battery navigation data acquisition
[0056] Navigation data acquisition includes historical data extraction and real-time data collection; historical data extraction comes from the historical database of the ship's integrated information management system, and real-time data collection is achieved through the sensor components of the ship's integrated information management system and the ship's battery management system. These data are used to update the historical database and store them in the real-time collection database respectively;
[0057] According to the nature of the data source, the data is divided into ship data, environmental data and battery management data;
[0058] The ship data, the environmental data and the battery management data are all stored and processed using a relational model. The ship data uses a one-to-many model, that is, one ship or a type of ship is defined to correspond to multiple load capacities; the environmental data uses a many-to-many data model, including the relationship between the navigation area and water flow, wind speed, longitude and latitude; the battery management data includes the battery state of charge (SOC) value, speed, and mileage, and the relationship between the battery state of charge (SOC) value and the speed and mileage is defined as a one-to-many relationship.
[0059] S2: Navigation data modeling and sample data construction
[0060] The ship data, environmental data, and battery management data are defined as the dataset X = [x1, x2, ..., x n ] T , where x i =[x i1 ,x i2 ,…,x id ], x specifically represents the ship's discretion, navigation area water current, wind speed, longitude and latitude, speed, mileage, and battery state of charge (SOC) value, n is the number of samples, and d is the feature dimension;
[0061] The sample data is expressed as a real matrix with a specific dimension: X∈R n×d ;
[0062] The ship's weight, navigation area current, wind speed, longitude and latitude, speed, and battery state of charge (SOC) data constitute the sample independent variables, and the mileage constitutes the sample dependent variable, which serves as the sample data required for model training.
[0063] Sample data is extracted from the historical database and divided into a training set and a test set for model training and testing respectively. Before model training, the training data is normalized:
[0064]
[0065] Among them, A nm represents the normalized result, A represents the independent variable input value, and A max and A ,in Respectively represent the maximum and minimum values of the corresponding influencing factors in the data set;
[0066] S3: Modeling, training and testing of mileage prediction
[0067] S3.1: Building a Width Learning Model (BLS)
[0068] 3.1.1 Enhanced node generation; let the input data be X∈R n×d , where n is the number of samples and d is the feature dimension; randomly generate the weight matrix w∈R d×m , where m is the number of enhanced nodes; the generation process of enhanced node Z is as follows:
[0069]
[0070] is the activation function, using the Relu function, concat(·) represents the concatenation of the original input features and the enhanced nodes; the wide feature matrix Z∈R n(d+m) Contains the original input features and enhanced nodes;
[0071] 3.1.2 Output weight calculation; The calculation method of output weight β is based on the pseudo-inverse method:
[0072]
[0073] where Y∈R n×c is the target value (mileage) matrix. For regression problems, c = 1, which represents the matrix composed of the output values of n samples; Z T is the transpose of the wide feature matrix, (Z T Z) -1 is a pseudo-matrix;
[0074] 3.1.3 For test X testing , prediction results The calculation is as follows:
[0075]
[0076] in, β is the weight of the output layer, W is the random weight matrix used to enhance the generation of nodes;
[0077] S3.2: Determine the number of enhanced nodes Z for the BLS model; use the PSO algorithm to find the optimal number of enhanced nodes. The steps are as follows:
[0078] 3.2.1 Assume that there are N particles in the swarm P particles, and the position of each particle represents a candidate solution, that is, the number of enhanced nodes m; the speed and position update formula of the particle swarm is as follows:
[0079] V(t+1)=wV(t)+C1⊙R1⊙(Phest-X(t))+C2⊙R2⊙(Ghest-X(t)) (5) The position update formula is as follows:
[0080] X(t+1)=X(t)+V(t+1) (6)where, is the position matrix of all particles at the tth iteration; is the velocity matrix of all particles at the tth iteration; is the historical optimal position matrix of each particle; is the global optimal position scalar; w∈R 1×1 is the inertia weight; C1,C2∈R 1×1 is the learning factor; is a random number matrix between [0,1]; ⊙ is element-by-element multiplication (Hadamard product is used in this embodiment); the goal of PSO is to minimize the fitness function F(X), which is defined as the mean square error matrix on the validation set:
[0081]
[0082] in, is the true value matrix of the validation set, is the prediction matrix of the validation set, ‖·‖ F is the Frobenius norm;
[0083] 3.2.2 Initialize particle swarm; particle initial position matrix Generate randomly within the search space:
[0084] X(0)~U[lb,ub] (8)
[0085] where lb,ub∈R 1×1 are the lower and upper limits of the number of enhanced nodes respectively; the initial velocity matrix Randomly initialized to a small value close to zero;
[0086] 3.2.3 Iterative Optimization: In each iteration, the fitness matrix F(X) of each particle is calculated; the individual optimal position matrix Pbest and the global optimal position scalar Gbest of each particle are updated; the particle position matrix X(t) and velocity matrix V(t) are adjusted according to the velocity and position update formulas;
[0087] 3.2.4 When the maximum number of iterations is reached or the fitness matrix F(x) converges, stop the iteration; finally, return the number of enhanced nodes m corresponding to Gbest;
[0088] S4: Reconstructed Sum
[0089] The weight matrix w of the BLS model is randomly determined. N groups of BLS models will be repeatedly generated and reconstructed and summed to finally complete the model establishment.
[0090] S5: Online deployment and prediction model optimization
[0091] The trained deep learning model is deployed online on the actual ship. The sailing mileage is predicted based on the data information of the real-time database and the current state of charge of the lithium battery. Based on this, the actual ship's sailing route is optimized and the actual ship's sailing mileage warning is issued.
[0092] When the ship power lithium battery system has been used for a certain period of time, which meets the requirement of marine lithium battery for cycle life of more than 4000 times (capacity retention rate less than 80%), or when it is repaired and maintained due to a fault, resulting in changes in the energy consumption characteristics and energy storage characteristics of the lithium battery system, it is necessary to retrain the model to correct the prediction error and repeat steps S1 to S5.
[0093] The above embodiments are merely illustrative of the principles and effects of the present invention, as well as some embodiments of its application, and are not intended to limit the present invention. It should be noted that a person skilled in the art can make several modifications and improvements without departing from the inventive concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention.
Claims
1. A method for predicting the mileage of a ship's power lithium battery, comprising the following steps: S1: Ship power lithium battery navigation data acquisition Navigation data acquisition includes historical data extraction and real-time data collection; historical data extraction comes from the historical database of the ship's integrated information management system, and real-time data collection is achieved through the sensor components of the ship's integrated information management system and the ship's battery management system; These data are used to update the historical database and store in the real-time acquisition database; According to the nature of the data source, the data is divided into ship data, environmental data and battery management data; S2: Navigation data modeling and sample data formation The ship data, environmental data, and battery management data are defined as the dataset X = [x1, x2, ..., x n ] T , where x i =[x i1 ,x i2 ,…,x id ], x specifically represents the ship's discretion, navigation area water current, wind speed, longitude and latitude, speed, mileage, and battery state of charge (SOC) value, n is the number of samples, and d is the feature dimension; The sample data is expressed as a real matrix with a specific dimension: X∈R n×d ; The ship's weight, navigation area current, wind speed, longitude and latitude, speed, and battery state of charge (SOC) data constitute the sample independent variables, and the mileage constitutes the sample dependent variable, which serves as the sample data required for model training. Sample data is extracted from the historical database and divided into a training set and a test set for model training and testing respectively. Before model training, the training data is normalized: Among them, A nm represents the normalized result, A represents the independent variable input value, and A max and A min Respectively represent the maximum and minimum values of the corresponding influencing factors in the data set; S3: Modeling, training and testing of mileage prediction S3.1: Building a Width Learning Model (BLS) 3.1.1 Enhanced node generation; let the input data be X∈R n×d , where n is the number of samples and d is the feature dimension; randomly generate the weight matrix w∈R d×m , where m is the number of enhanced nodes; the generation process of enhanced node Z is as follows: is the activation function, concat(·) means concatenating the original input features and the enhanced nodes; the wide feature matrix z∈R n(d+m) Contains the original input features and enhanced nodes; 3.1.2 Output weight calculation; The calculation method of output weight β is based on the pseudo-inverse method: in: Y∈R n×c is the target value matrix. For regression problems, c = 1, it represents the matrix composed of the output values of n samples; Z T is the transpose of the wide feature matrix, (Z T Z) -1 is a pseudo-matrix; 3.1.3 For test X testing , prediction results The calculation is as follows: in, β is the weight of the output layer, W is the random weight matrix used to enhance the generation of nodes; S3.2: Determine the number of enhanced nodes Z for the BLS model; use the PSO algorithm to find the optimal number of enhanced nodes. The steps are as follows: 3.2.1 Assume that there are N particles in the swarm P particles, and the position of each particle represents a candidate solution, that is, the number of enhanced nodes m; the speed and position update formula of the particle swarm is as follows: V(t+1)=wV(t)+C1⊙R1⊙(Phest-X(t))+C2⊙R2⊙(Ghest-X(t)) (5) The position update formula is as follows: X(t + 1) = X(t) + V(t + 1) (6) Where, is the position matrix of all particles at the tth iteration; is the velocity matrix of all particles at the tth iteration; is the historical optimal position matrix of each particle; is the global optimal position scalar; w∈R 1×1 is the inertia weight; C1,C2∈R 1×1 is the learning factor; Is a random number matrix between [0,1]; ⊙ is element-by-element multiplication; the goal of PSO is to minimize the fitness function F(X), which is defined as the form of the mean square error matrix on the validation set: in, is the true value matrix of the validation set, is the prediction matrix of the validation set, ‖·‖ F is the Frobenius norm; 3.2.2 Initialize particle swarm; particle initial position matrix Generate randomly within the search space: X(0)~U[lb,ub] (8) where lb,ub∈R 1×1 are the lower and upper limits of the number of enhanced nodes respectively; the initial velocity matrix Randomly initialized to a small value close to zero; 3.2.3 Iterative Optimization: In each iteration, the fitness matrix F(X) of each particle is calculated; the individual optimal position matrix Pbest and the global optimal position scalar Gbest of each particle are updated; the particle position matrix X(t) and velocity matrix V(t) are adjusted according to the velocity and position update formulas; 3.2.4 When the maximum number of iterations is reached or the fitness matrix F(x) converges, stop the iteration; finally, return the number of enhanced nodes m corresponding to Gbest; S4: Reconstructed Sum The weight matrix w of the BLS model is randomly determined. N groups of BLS models will be repeatedly generated and reconstructed and summed to finally complete the model establishment. S5: Online deployment and prediction model optimization The trained deep learning model is deployed online on the actual ship. The sailing mileage is predicted based on the data information of the real-time database and the current state of charge of the lithium battery. Based on this, the actual ship's sailing route is optimized and the actual ship's sailing mileage warning is issued.
2. The method for predicting the mileage of a ship power lithium battery according to claim 1, wherein: When the ship power lithium battery system has been used for a certain period of time, or has been repaired and maintained due to a fault, resulting in changes in the energy consumption characteristics and energy storage characteristics of the lithium battery system, it is necessary to retrain the model to correct the prediction error and repeat steps S1 to S5.
3. The method for predicting the mileage of a ship power lithium battery according to claim 1, wherein: The ship data, the environmental data and the battery management data are all stored and processed using a relational model. The ship data uses a one-to-many model, that is, one ship or a type of ship is defined to correspond to multiple load capacities; the environmental data uses a many-to-many data model, including the relationship between the navigation area and water flow, wind speed, longitude and latitude; the battery management data includes the battery state of charge (SOC) value, speed, and mileage, and the relationship between the battery state of charge (SOC) value and the speed and mileage is defined as a one-to-many relationship.
4. A method for predicting the mileage of a ship power lithium battery according to any one of claims 1 to 3, characterized in that: The activation function described in formula (2) Use Relu function.