Electric ship battery energy consumption prediction method and device
By building a battery energy consumption prediction model based on an echo state network, using particle swarm algorithm for training, combined with real-time data of hardware sensors, the problem of insufficient accuracy and stability of battery energy consumption prediction of electric ships is solved, and more efficient energy management and environmentally friendly navigation are achieved.
Patent Information
- Application Number
- CN202411995631.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-29
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art is difficult to meet the needs of scientific planning of navigation routes and efficiently managing energy allocation when predicting battery energy consumption in electric ships. Especially under variable navigation environments and complex operating conditions.
By obtaining river hydrological data, ship's own state data and energy consumption sequence data, an initial prediction model based on an echo state network is constructed, and the particle swarm algorithm is used for training to obtain a trained battery energy consumption prediction model. The hardware sensors and prediction models are then deployed onto the electric ship to obtain data in real time for energy consumption prediction.
It improves the accuracy and stability of electric ship endurance prediction, can adapt to the changing navigation environment and complex operating conditions, optimizes energy management, and assists in environmentally friendly navigation.
Smart Images

Figure CN119903346A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electric ships, and in particular to a method and device for predicting battery energy consumption of electric ships. Background Art
[0002] In today's society, the increasing awareness of environmental protection has prompted electric ships to show a vigorous development momentum in the shipping field as an emerging low-carbon and environmentally friendly means of transportation. However, the endurance performance of electric ships is still a key factor restricting their widespread application, mainly limited by the battery energy storage capacity and the conversion efficiency of the power system. Accurately predicting the cruising range of electric ships is indispensable for scientifically planning navigation routes and efficiently managing energy distribution. At present, the mainstream methods for predicting the energy consumption of electric ship batteries rely on the state of charge (SOC) of lithium batteries for estimation. Although this method provides the possibility of energy consumption prediction to a certain extent, the accuracy and stability of its prediction results still need to be improved, especially in the face of changing navigation environments and complex operating conditions, the optimization results of its prediction performance are often difficult to be satisfactory. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a method and device for predicting the battery energy consumption of an electric ship, which can improve the accuracy of the electric ship's endurance prediction, adapt to changing navigation environments and complex operating conditions, and be conducive to optimizing energy management and promoting environmentally friendly navigation.
[0004] The first aspect of the present application provides a method for predicting battery energy consumption of an electric ship, comprising:
[0005] Obtaining a standard data set for training the model; wherein the standard data set includes river hydrological data, ship status data, and ship energy consumption series data;
[0006] Constructing an initial prediction model based on echo state network;
[0007] Training the initial prediction model based on a particle swarm algorithm and the standard data set to obtain a trained battery energy consumption prediction model;
[0008] Deploy the hardware sensor and the battery energy consumption prediction model on the electric ship to be predicted;
[0009] Acquire real-time ship data through the hardware sensor;
[0010] Energy consumption prediction is performed according to the real-time ship data and the battery energy consumption prediction model to obtain an energy consumption prediction result.
[0011] By implementing the above implementation mode, the method can accurately predict the energy consumption of electric ship batteries by combining river hydrology, ship status and energy consumption data, using the echo state network and particle swarm algorithm to train the prediction model, thereby improving the efficiency and accuracy of energy consumption management.
[0012] Furthermore, the obtaining of a standard data set for training a model includes:
[0013] When the electric ship is actually traveling, river hydrological data is collected by sensors according to a preset sampling interval and a preset sampling time; wherein the river hydrological data at least includes river flow velocity sequence data and river direction sequence data;
[0014] According to the preset sampling interval and the preset sampling time, the ship's own state data and the ship's energy consumption sequence data corresponding to the river hydrological data are obtained; wherein the ship's own state data at least includes the ship's battery real-time power sequence data, the ship's sailing speed sequence data and the ship's draft depth sequence data;
[0015] constructing input data according to the river hydrological data and the ship's own state data;
[0016] Constructing a complete data set based on the input data and the ship energy consumption series data;
[0017] The complete data set is subjected to local mean decomposition processing to obtain a standard data set.
[0018] Furthermore, the complete data set is subjected to local mean decomposition processing to obtain a standard data set, including:
[0019] Determine the complete data set as the data set to be decomposed;
[0020] Extracting local extreme points of the data set to be decomposed;
[0021] Calculate the average value of adjacent local extreme value points and the envelope function value of adjacent extreme value points according to the local extreme value points;
[0022] Obtaining a local mean function according to the average values of the adjacent local extreme value points, and obtaining an envelope estimation function according to the envelope function value;
[0023] Calculating a frequency modulation function according to the local mean function, the data set to be decomposed and the envelope estimation function;
[0024] When the envelope estimation function of the frequency modulation function is always 1, calculating the envelope signal according to the envelope estimation function;
[0025] Decomposing the data set to be decomposed according to the envelope signal and the frequency modulation function to obtain a PF component set;
[0026] The PF component set is spliced to obtain a standard data set.
[0027] Furthermore, the initial prediction model includes an input layer, a time-based sequence partitioning block, a reservoir time difference processing structure, a Sigmoid activation function, a time attention mechanism module and an output layer;
[0028] The output layer includes a softmax activation function and a first fully connected layer;
[0029] The reserve pool time difference processing structure is generated based on the reserve pool unit structure;
[0030] The reservoir unit structure includes a plurality of neurons;
[0031] The storage pool time difference processing structure includes an early data processing storage pool unit, a mid-term data processing storage pool unit, a mid- to near-term data processing storage pool unit, and a near-term data processing storage pool unit;
[0032] The output layer includes a Relu activation function and a second fully connected layer.
[0033] Furthermore, the initial prediction model is trained based on the particle swarm algorithm and the standard data set to obtain a trained battery energy consumption prediction model, including:
[0034] Construct loss function based on mean absolute error and mean square error;
[0035] Initialize the target particle swarm;
[0036] Determine a parameter combination scheme corresponding to the target particle group; wherein the parameter combination scheme includes the number of neurons in the reserve pool corresponding to each target particle group and the degree of sparse connection;
[0037] Optimizing the parameters of the initial prediction model according to the target particle swarm, the loss function, the standard data set, and the parameter combination scheme to obtain a prediction model to be trained;
[0038] The prediction model to be trained is trained using the standard data set to obtain a trained battery energy consumption prediction model.
[0039] Furthermore, the initial prediction model is optimized according to the target particle swarm, the loss function, the standard data set and the parameter combination scheme to obtain the prediction model to be trained, including:
[0040] The initial prediction model is trained according to the target particle swarm, the loss function, the standard data set and the parameter combination scheme to obtain a loss value corresponding to each parameter combination scheme;
[0041] Determine the particle swarm fitness of each of the target particle swarms according to the loss value;
[0042] Determining an optimal particle group from the target particle group according to the particle group fitness;
[0043] Updating the target particle group according to the optimal particle group to obtain an updated target particle group;
[0044] When the number of training iterations is reached, the best particle swarm obtained from the last iteration training is obtained;
[0045] Determine the best particle group as the target best particles in the training process;
[0046] Determine the parameter combination scheme corresponding to the target optimal particle as the optimal combination scheme;
[0047] According to the optimal combination scheme, the optimal number of neurons and the optimal sparsity value corresponding to each reserve pool unit are obtained;
[0048] The model parameters of the initial prediction model are adjusted according to the optimal number of neurons and the optimal sparsity value to obtain the prediction model to be trained.
[0049] Furthermore, the hardware sensor includes an electromagnetic flow velocity sensor deployed on the side of the electric ship to be predicted and a pressure water level gauge deployed at the bottom of the electric ship to be predicted;
[0050] Wherein, the acquiring of real-time ship data through the hardware sensor includes:
[0051] The electromagnetic flow velocity sensor is used to collect the real-time flow velocity and real-time flow direction of the river;
[0052] The real-time draft depth of the electric vessel to be predicted is collected by the pressure water level gauge;
[0053] The remaining power data and the real-time running speed of the electric ship to be predicted are collected through the data control console of the electric ship to be predicted.
[0054] A second aspect of the present application provides a device for predicting battery energy consumption of an electric ship, the device comprising:
[0055] A first acquisition unit is used to acquire a standard data set for training a model; wherein the standard data set includes river hydrological data, ship status data, and ship energy consumption sequence data;
[0056] A construction unit, used for constructing an initial prediction model based on an echo state network;
[0057] A training unit, used for training the initial prediction model based on a particle swarm algorithm and the standard data set to obtain a trained battery energy consumption prediction model;
[0058] A deployment unit, used for deploying the hardware sensor and the battery energy consumption prediction model to the electric ship to be predicted;
[0059] A second acquisition unit, used for acquiring real-time ship data through the hardware sensor;
[0060] The prediction unit is used to perform energy consumption prediction based on the real-time ship data and the battery energy consumption prediction model to obtain an energy consumption prediction result.
[0061] Furthermore, the first acquiring unit includes:
[0062] The first acquisition subunit is used to collect river hydrological data through sensors according to a preset sampling interval and a preset sampling time when the electric ship is actually traveling; wherein the river hydrological data at least includes river flow rate sequence data and river direction sequence data;
[0063] A first acquisition subunit is used to acquire the ship's own state data and the ship's energy consumption sequence data corresponding to the river hydrological data according to the preset sampling interval and the preset sampling time; wherein the ship's own state data at least includes the ship's battery real-time power sequence data, the ship's sailing speed sequence data and the ship's draft depth sequence data;
[0064] A first construction subunit is used to construct input data according to the river hydrological data and the ship's own state data;
[0065] The first construction subunit is further used to construct a complete data set according to the input data and the ship energy consumption series data;
[0066] The decomposition subunit is used to perform local mean decomposition processing on the complete data set to obtain a standard data set.
[0067] Furthermore, the decomposition subunit is specifically used to determine the complete data set as the data set to be decomposed; extract local extreme points of the data set to be decomposed; calculate the average values of adjacent local extreme points and the envelope function values of adjacent extreme points based on the local extreme points; obtain the local mean function based on the average values of adjacent local extreme points, and obtain the envelope estimation function based on the envelope function value; calculate the frequency modulation function based on the local mean function, the data set to be decomposed and the envelope estimation function; when the envelope estimation function of the frequency modulation function is always 1, calculate the envelope signal based on the envelope estimation function; decompose the data set to be decomposed based on the envelope signal and the frequency modulation function to obtain a PF component set; and splice the PF component set to obtain a standard data set.
[0068] Furthermore, the initial prediction model includes an input layer, a time-based sequence partitioning block, a reservoir time difference processing structure, a Sigmoid activation function, a time attention mechanism module and an output layer;
[0069] The output layer includes a softmax activation function and a first fully connected layer;
[0070] The reserve pool time difference processing structure is generated based on the reserve pool unit structure;
[0071] The reservoir unit structure includes a plurality of neurons;
[0072] The storage pool time difference processing structure includes an early data processing storage pool unit, a mid-term data processing storage pool unit, a mid- to near-term data processing storage pool unit, and a near-term data processing storage pool unit;
[0073] The output layer includes a Relu activation function and a second fully connected layer.
[0074] Furthermore, the training unit comprises:
[0075] The second construction subunit is used to construct a loss function based on the mean absolute error and the mean square error;
[0076] Initialization subunit, used to initialize the target particle group;
[0077] A determination subunit is used to determine a parameter combination scheme corresponding to the target particle group; wherein the parameter combination scheme includes the number of neurons in the reserve pool corresponding to each target particle group and the degree of sparse connection;
[0078] An optimization subunit, used for optimizing the parameters of the initial prediction model according to the target particle swarm, the loss function, the standard data set and the parameter combination scheme to obtain a prediction model to be trained;
[0079] The training subunit is used to perform model training on the prediction model to be trained using the standard data set to obtain a trained battery energy consumption prediction model.
[0080] Furthermore, the optimization subunit is specifically used to train the initial prediction model according to the target particle group, the loss function, the standard data set and the parameter combination scheme to obtain the loss value corresponding to each parameter combination scheme; determine the particle group fitness of each target particle group according to the loss value; determine the best particle group from the target particle group according to the particle group fitness; update the target particle group according to the best particle group to obtain an updated target particle group; when the number of training iterations is reached, obtain the best particle group obtained by the last iterative training; determine the best particle group as the target best particle in the training process; determine the parameter combination scheme corresponding to the target best particle as the best combination scheme; obtain the best number of neurons and the best sparsity value corresponding to each reserve pool unit according to the best combination scheme; adjust the model parameters of the initial prediction model according to the best number of neurons and the best sparsity value to obtain the prediction model to be trained.
[0081] Furthermore, the hardware sensor includes an electromagnetic flow velocity sensor deployed on the side of the electric ship to be predicted and a pressure water level gauge deployed at the bottom of the electric ship to be predicted;
[0082] Wherein, the second acquisition unit includes:
[0083] A second collection subunit is used to collect the real-time flow velocity and real-time flow direction of the river through the electromagnetic flow velocity sensor;
[0084] The second acquisition subunit is further used to collect the real-time draft depth of the electric vessel to be predicted through the pressure water level gauge;
[0085] The second acquisition subunit is used to collect the remaining power data and the real-time running speed of the ship through the data control console of the electric ship to be predicted.
[0086] A third aspect of the present application provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the electric ship battery energy consumption prediction method described in any one of the first aspect of the present application.
[0087] A fourth aspect of the present application provides a computer-readable storage medium storing computer program instructions, which, when read and executed by a processor, executes the electric ship battery energy consumption prediction method described in any one of the first aspect of the present application.
[0088] The beneficial effects of this application are:
[0089] (1) The data processing module based on the local mean decomposition (LMD) operation proposed in this method can process the collected initial data, thereby eliminating the noise factors in the initial data set and providing a higher quality training data set for the subsequent electric ship energy consumption prediction. As a result, the accuracy of the electric ship energy consumption prediction can be improved, the time spent in the prediction process can be reduced, and the robustness and applicability of the energy consumption prediction can be significantly enhanced. Whether in inland waterway navigation or ocean voyage, different types of electric ships can benefit from this data processing module to achieve more accurate battery energy consumption prediction.
[0090] (2) This method constructs an echo state network with a reservoir time difference processing structure, which can extract features from data at a finer time scale. Compared with processing input data with a single reservoir, the reservoir structure of time difference processing can capture complex changes, such as the differences in energy consumption characteristics of ships in different navigation phases, providing richer and more accurate features for prediction. In addition, the temporal attention mechanism module can adaptively fuse features at different time scales. Since the importance of energy consumption-related features at different times during ship operation changes dynamically, the temporal attention mechanism can adjust the degree of dependence on data in different time periods, thereby further improving the accuracy of prediction.
[0091] (3) In the training phase, the method constructs a model optimization training strategy based on the particle swarm algorithm. This strategy optimizes the number of neurons and the degree of sparse connection of each reservoir unit in the model reservoir time difference processing structure to improve the feature extraction ability of each reservoir unit at the corresponding time scale. By finding the model parameters corresponding to the best model performance and using it as the final model structure, the overall performance of the model is significantly enhanced. This enables the model to more accurately capture data features and adapt to complex and changeable working conditions when processing electric ship energy consumption related data, such as different speeds, load changes, navigation environment, etc. Therefore, the model shows higher accuracy in the prediction of electric ship battery energy consumption, providing a more reliable basis for ship energy management, voyage planning, battery life extension, etc., and ensuring the efficiency and safety of ship navigation. BRIEF DESCRIPTION OF THE DRAWINGS
[0092] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0093] Figure 1A schematic diagram of a flow chart of a method for predicting battery energy consumption of an electric ship provided in an embodiment of the present application;
[0094] Figure 2 A schematic diagram of the overall process framework of a method for predicting battery energy consumption of an electric ship provided in an embodiment of the present application;
[0095] Figure 3 A partial flow chart of another method for predicting battery energy consumption of an electric ship provided in an embodiment of the present application;
[0096] Figure 4 A schematic diagram of another part of the flow chart of another method for predicting battery energy consumption of an electric ship provided in an embodiment of the present application;
[0097] Figure 5 A schematic diagram of an example flow of an LMD operation provided in an embodiment of the present application;
[0098] Figure 6 A schematic diagram of the model structure of an initial prediction model provided in an embodiment of the present application;
[0099] Figure 7 A schematic block diagram of a process for real-time deployment of a battery energy consumption prediction model provided in an embodiment of the present application;
[0100] Figure 8 A schematic diagram of the structure of a battery energy consumption prediction device for an electric ship provided in an embodiment of the present application;
[0101] Fig. 9 A schematic diagram of the structure of another electric ship battery energy consumption prediction device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0102] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0103] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0104] Example 1
[0105] Please see Figure 1 , Figure 1 A schematic flow chart of a method for predicting battery energy consumption of an electric ship provided in this embodiment. The method for predicting battery energy consumption of an electric ship includes:
[0106] S101. Obtain a standard data set for training a model; wherein the standard data set includes river hydrological data, ship status data, and ship energy consumption series data.
[0107] In this embodiment, the method can pre-construct an energy consumption prediction data set. In particular, the method can use a variety of sensors to collect river hydrological data (water flow velocity, water flow direction) and ship status data (real-time battery power, ship sailing speed, ship draft) under the actual navigation state of the electric ship, and determine it as input data for energy consumption prediction model training.
[0108] In this embodiment, the method can record the real-time energy consumption data of the ship under actual navigation status, and determine it as the output data during the training of the energy consumption prediction model.
[0109] In implementing this implementation method, the method relies on building an energy consumption prediction model based on an echo state network to predict the energy consumption of electric ships, and the training of the echo state network requires a large amount of data as training support. Therefore, comprehensive data collection plays a vital role in improving the overall performance of the dynamic energy consumption prediction model of electric ships. Based on this, in the process of constructing an energy prediction data set, this method needs to select river condition parameters that are highly correlated with the energy consumption of electric ships, as well as the electric ship's own condition parameters. Specifically, this method can deploy sensors during the actual driving of the electric ship to complete the data collection of the above parameters, and record the energy consumption data of the electric ship in real time.
[0110] In this embodiment, in order to eliminate the noise effect in the initial data and enhance the data quality, the method can use LMD (local mean decomposition) operation to decompose the acquired initial data to eliminate the noise and obtain the corresponding standard data set. It can be seen that the use of this standard data set can improve the prediction accuracy of the model.
[0111] S102: construct an initial prediction model based on the echo state network.
[0112] In this embodiment, the initial prediction model includes an input layer, a time-based sequence partitioning block, a reservoir time difference processing structure, a Sigmoid activation function, a time attention mechanism module, and an output layer;
[0113] The output layer includes the softmax activation function and the first fully connected layer;
[0114] The reservoir time difference processing structure is generated based on the reservoir unit structure;
[0115] The reserve cell structure includes multiple neurons;
[0116] The time difference processing structure of the storage pool includes an early data processing storage pool unit, a mid-term data processing storage pool unit, a mid- to near-term data processing storage pool unit, and a near-term data processing storage pool unit;
[0117] The output layer includes a Relu activation function and a second fully connected layer.
[0118] In this embodiment, the method can construct a corresponding battery energy consumption prediction model based on the echo state network, and introduce a reserve pool time difference structure into the constructed battery energy consumption prediction model, so as to extract and process features from multiple time domains. At the same time, the model can also combine the time attention mechanism to complete feature adaptive fusion.
[0119] S103, training the initial prediction model based on the particle swarm algorithm and the standard data set to obtain a trained battery energy consumption prediction model.
[0120] In this embodiment, the method can pre-construct a model optimization strategy based on a particle swarm algorithm, and use it to obtain the number of neurons and the degree of sparse connection corresponding to the reserve pool unit in the reserve pool time difference structure of the battery energy consumption prediction model when the model performance is optimal, so that the model can achieve the best prediction accuracy at one time.
[0121] S104, deploying hardware sensors and battery energy consumption prediction models on the electric ship to be predicted.
[0122] In this embodiment, the method can deploy hardware sensors to electric ships that need to predict battery energy consumption and deploy the optimized battery energy consumption prediction model to the electric ship computing terminal, and then send the real-time collected data into the battery energy consumption prediction model to realize dynamic electric ship battery energy consumption prediction.
[0123] S105. Acquire real-time ship data through hardware sensors.
[0124] S106: Perform energy consumption prediction based on the real-time ship data and the battery energy consumption prediction model to obtain an energy consumption prediction result.
[0125] Please see Figure 2 , Figure 2 A schematic diagram of the overall process framework of an electric ship battery energy consumption prediction method is shown.
[0126] In this embodiment, the execution subject of the method may be a computing device such as a computer or a server, and no limitation is made in this embodiment.
[0127] In this embodiment, the execution subject of the method may also be a smart device such as a smart phone, a tablet computer, etc., which is not limited in this embodiment.
[0128] It can be seen that the implementation of the electric ship battery energy consumption prediction method described in this embodiment can improve the accuracy of electric ship endurance prediction, can adapt to changing navigation environments and complex operating conditions, is conducive to optimizing energy management, and promotes environmentally friendly navigation.
[0129] Example 2
[0130] Please see Figure 3 and Figure 4 , Figure 3 A schematic diagram of a part of the flow chart of a method for predicting battery energy consumption of an electric ship provided in this embodiment. Figure 4 This is another partial flow chart of a method for predicting battery energy consumption of an electric ship provided in this embodiment. Figure 3 and Figure 4 A complete flow chart of a method for predicting the energy consumption of batteries in electric ships is shown in FIG. The method for predicting the energy consumption of batteries in electric ships includes:
[0131] S201. When the electric vessel is actually traveling, river hydrological data is collected through sensors according to a preset sampling interval and a preset sampling time.
[0132] In this embodiment, the river hydrological data at least includes river flow rate sequence data and river direction sequence data.
[0133] In this embodiment, when the electric ship is actually traveling, the actual flow velocity HV and flow direction HF of the river will have a practical impact on the energy consumption of the electric ship battery. Among them, when the river flow direction HF is consistent with the ship's travel direction, the energy consumption of the electric ship will be reduced; and when the directions are inconsistent, the energy consumption will increase. Correspondingly, when the river direction is consistent with the ship's navigation direction, the greater the river flow velocity HV, the lower the energy consumption will be; otherwise, the energy consumption will be higher. When the river direction HF is inconsistent with the ship's travel direction, the higher the river flow velocity HV, the higher the energy consumption will be; otherwise, the energy consumption will be lower.
[0134] In this embodiment, based on the above energy consumption influencing parameters, the method can deploy corresponding sensors on the electric ship to complete data collection. Among them, an electromagnetic flow velocity sensor is deployed on the side of the electric ship to collect the real-time flow velocity HV and real-time flow direction HF of the river.
[0135] Specifically, the method can collect river hydrological data through the sensor according to a preset sampling interval and a preset sampling time.
[0136] S202: Obtain ship status data and ship energy consumption sequence data corresponding to river hydrological data according to a preset sampling interval and a preset sampling time.
[0137] In this embodiment, the ship's own state data at least includes the ship's battery real-time power sequence data, the ship's sailing speed sequence data and the ship's draft depth sequence data.
[0138] In this embodiment, in addition to the above-mentioned river hydrological data, the real-time speed CV of the ship and the draft CX of the ship are also important parameters affecting the energy consumption of the ship. When the running speed and the draft of the ship are large, the energy consumption of the ship will also increase accordingly.
[0139] In addition, the remaining charge CS of the electric ship battery is also a key parameter affecting its battery energy consumption.
[0140] In this embodiment, the method can deploy a pressure water level gauge at the bottom of the ship to collect the draft depth CX of the ship in real time.
[0141] As for the remaining power data CS of the electric ship and the real-time running speed data CV of the electric ship, there is no need to add external sensors for collection. The data can be collected directly from the data control console of the electric ship.
[0142] Specifically, the method can obtain the ship's own state data and the ship's energy consumption series data corresponding to the river hydrological data according to the preset sampling interval and the preset sampling time.
[0143] S203: construct input data according to river hydrological data and the ship's own status data.
[0144] In this embodiment, the method collects the river direction sequence data HFd, the river flow rate sequence data HVd, and the river flow rate sequence data CSd of the battery remaining power of the electric ship at the time T∈[1, Tx] in real time when the electric ship is actually traveling.
[0145] HFd=[HF1,HF2,…,HF Tx ];
[0146] HVd=[HV1,HV2,…,HV Tx ];
[0147] CSd = [CS1, CS2, ..., CS Tx ];
[0148] In addition, the method also collects the electric ship's navigation speed sequence data CVd and the ship's draft depth sequence data CXd.
[0149] CVd=[CV1,CV2,…,CV Tx ];
[0150] CXd=[CX1,CX2,…,CX Tx].
[0151] S204. Construct a complete data set based on the input data and the ship energy consumption series data.
[0152] In this embodiment, the method also collects ship energy consumption sequence data CEd within the range of T∈[Tx+1, 2*Tx].
[0153] CEd=[CE Tx+1 , C.E. Tx+2 ,…,CE 2Tx ].
[0154] In this embodiment, a set of input sequence data Inf is composed of the above-collected river direction sequence data HFd, river flow velocity sequence data HVd, electric ship navigation speed sequence data CVd, ship draft depth sequence data CXd and battery remaining power sequence data CSd, and is expressed as:
[0155] Inf=[HFd, HVd, CVd, CXd, CSd];
[0156] A complete set of data Df consists of a set of input data Inf and a set of ship energy consumption series output data CEd, which can be expressed as:
[0157] Df=[Inf,CEd].
[0158] In this embodiment, in order to improve the integrity of the data in the data set and ensure the diversity and comprehensiveness of data collection, the data sampling interval during data collection can be set to 10s, and the sampling period is 10 minutes. Based on this, the method can actually sample a set of time series data with a length of 60 in each sampling period, and then sample 1000 sets of data based on this data sampling criterion during each actual voyage of the electric ship.
[0159] In this embodiment, in order to further improve the diversity of data, the method samples data from 6 different electric boat berthing routes, and obtains 6,000 sets of data to form the initial data set D.
[0160] D=[Df1,Df2……Df 6000 ].
[0161] S205: Determine the complete data set as the data set to be decomposed.
[0162] In this embodiment, there are noise and outliers in the above initial data set D, and these abnormal data will have a negative impact on the subsequent training of the electric ship battery energy consumption prediction model. Therefore, the method uses the local mean decomposition (LMD) operation to process the initial data.
[0163] In this embodiment, the local mean decomposition operation can decompose each set of initial data into the sum of several PF components, and then reassemble the decomposed PF components of each set of initial data to form a standard data set for neural network training. After such processing, the noise interference in the initial data can be greatly reduced.
[0164] S206: extracting local extreme points of the data set to be decomposed.
[0165] In this embodiment, the method can first extract the local extreme value points of the data to be decomposed X(t), and find the average value M of the adjacent local extreme value points. j .in,
[0166] M i =(N i +N i+1 ) / 2;
[0167] Among them, i=1, 2,...,I;
[0168] Where I is the number of local extreme points in a given signal, N i , N i+1 Respectively represent the i-th and i+1-th local extreme points in the data X(t). Then these average points M i Connect them with a straight line to obtain the local mean function M(t).
[0169] S207, calculating the average value of adjacent local extreme value points and the envelope function value of adjacent extreme value points according to the local extreme value points.
[0170] In this embodiment, this method can solve the envelope function value A of the adjacent local extreme value points. i , the calculation formula is:
[0171] A i =|N i -N i+1 | / 2;
[0172] Among them, i=1, 2,...,I;
[0173] Where I is the number of local extreme points in a given signal.
[0174] S208. Obtain a local mean function according to the average values of adjacent local extreme value points, and obtain an envelope estimation function according to the envelope function value.
[0175] In this embodiment, the method uses the sliding average method to convert two adjacent envelope function values A i Connect them together to obtain the envelope estimation function A(t).
[0176] S209, calculating the frequency modulation function according to the local mean function, the data set to be decomposed and the envelope estimation function.
[0177] In this embodiment, the method can separate the local mean function M(t) from the original data X(t) to obtain a new data H(t):
[0178] H(t) = X(t) - M(t);
[0179] In this embodiment, the method can use H(t) divided by the envelope estimation function A(t) to obtain the frequency modulation function S(t):
[0180] S(t)=H(t) / A(t).
[0181] S210: When the envelope estimation function of the frequency modulation function is always 1, calculating the envelope signal according to the envelope estimation function.
[0182] In this embodiment, the method can determine whether the envelope estimation function of the S(t) function is always 1. If this condition is not met, the previous steps are repeated until the envelope estimation function of the S(t) function meets this condition.
[0183] In this embodiment, the method can multiply all the envelope estimation functions generated in the above-mentioned entire iterative process to obtain the envelope signal
[0184]
[0185] Among them, A n (t) represents the nth envelope estimation function obtained in the above process.
[0186] S211 . Decompose the data set to be decomposed according to the envelope signal and the frequency modulation function to obtain a PF component set.
[0187] In this embodiment, the method can obtain the envelope signal Multiply it with the frequency modulation function S(t) to obtain the first PF1 component of the initial data X(t).
[0188] In this embodiment, the method can separate the obtained PF1 component from the initial data X(t), and use the newly obtained data Y(t) as a new original data, and repeat the above steps to obtain the next PF component.
[0189] Since the characteristic information of the data is mainly concentrated in the first few PF components, this method determines the number of decompositions to be 6, and finally obtains 6 PF components decomposed from the initial data X(t), and then performs channel splicing operation on these 6 components to obtain the data information X without noise information. *=[PF1(t), PF2(t),..., PF6(t)];
[0190] S212: perform splicing processing on the PF component set to obtain a standard data set.
[0191] In this embodiment, the standard data set includes river hydrological data, ship status data and ship energy consumption series data.
[0192] In this embodiment, the method can use the river direction sequence data HFd, river flow rate sequence data HVd, electric ship running speed sequence data CVd, ship draft depth sequence data CXd, electric ship battery remaining power sequence data CSd and ship energy consumption sequence data CEd in each data set Df in the initial data set D as input data X(t), and process them in sequence to obtain processed data HFd * , HVd * , CVd * ,CXd * , CSD * ,CEd * ;in,
[0193] HfD * = Dlmd(HFd);
[0194] HkDJ * = Dlmd(HVd);
[0195] CVd * = Dlmd(CVd);
[0196] XC * = Dlmd(CXd);
[0197] C * = Dlmd(CSd);
[0198] Wherein, Dlmd(*) represents the LMD data processing operation function.
[0199] In this embodiment, the method can obtain the data HFd * , HVd * , CVd * ,CXd * , CSD * The denoised input data Infb is obtained by splicing;
[0200] Infb=Contact[HFd * , HVd * , CVd * ,CXd * , CSD* ]
[0201] Wherein, Contact(*) represents the channel splicing operation function, and combines the denoised input data Infb and its corresponding ship energy consumption sequence output data CEd to obtain a set of standard data Dbz; where,
[0202] Dbz = [Infb, CEd];
[0203] In this embodiment, the method finally performs the iterative processing described in the above steps on each set of data Df in the initial data set D to obtain a standard data set D * ,in,
[0204] D * =[Dbz1,Dbz2,…,Dbz 6000 ].
[0205] Please see Figure 5 , Figure 5 An example flowchart of an LMD operation is shown.
[0206] S213. Construct an initial prediction model based on the echo state network.
[0207] Please see Figure 6 , Figure 6 A schematic diagram of the model structure of an initial prediction model is shown, wherein the initial prediction model is the basic model of the subsequent battery energy consumption prediction model.
[0208] In this embodiment, the electric ship battery energy consumption prediction model is constructed based on the echo state network. At the same time, a multi-reservoir structure and a self-attention mechanism module need to be introduced into the network to further improve the performance of the model and enhance the prediction accuracy of the model.
[0209] In this embodiment, a Softmax activation function is added to the input layer constructed by the model to process the data to complete the normalization operation of the data. After passing through the fully connected layer, the obtained result is connected to the reserve pool:
[0210] Hsi = Full(Softmax(Infb));
[0211] Among them, Full(*) represents the fully connected layer operation function, Softmax(*) represents the Softmax normalization operation function, Infb represents the input data after the LMD operation, and Hsi represents the initial feature data obtained.
[0212] In this embodiment, the reserve pool is the core component of the echo state network, which can perform complex nonlinear processing operations on the data to complete the feature extraction and dynamic storage operations of the data. In this method, the number of neurons in the reserve pool can be initially set to 120. In the reserve pool, the neurons are sparsely connected. N,N=120 85% of the element values are randomly initialized to zero, and the other 15% of the element values are randomly assigned non-zero values in the interval [-1, 1].
[0213] In this embodiment, in the echo state network model, a reservoir time difference processing structure is generated based on the reservoir unit structure design. Since data at different time points have a greater impact on the prediction results, this method extracts features from the input sequence data from different time dimensions to improve the model's extraction degree of the input sequence data and the final prediction accuracy.
[0214] Specifically, the reservoir time difference processing structure includes a total of four reservoir units: an early data processing reservoir unit, a mid-term data processing reservoir unit, a mid- to near-term data processing reservoir unit, and a near-term data processing reservoir unit.
[0215] Since the data in this method are all sequential data, there are differences in the time scale. When a sequence data enters the reserve pool structure, it will be processed in segments based on the time scale. Specifically, the time series length of each group of data in this method is 60, and the early data with time series 1 to 15 are sent to the early reserve pool unit for processing, the mid-term data with time series 16 to 30 are sent to the mid-term reserve pool unit for processing, the mid-to-recent data with time series 31 to 45 are sent to the mid-to-recent reserve pool unit for processing, and the recent data with time series 46 to 60 are sent to the recent reserve pool unit for processing.
[0216] Based on this differential processing structure, each reservoir unit can process data of the corresponding time scale, compared with the structure using a single reservoir for processing. The structure proposed by this method is more sensitive to the time of data, ensuring that each reservoir unit can focus on the data of a specific time period, thereby enabling more refined feature extraction and processing.
[0217] Fea j =Cbt j (Hsi);
[0218] Among them, Fea j , j∈[1,4] represents the jth intermediate feature obtained after processing the jth reserve pool, Cbt j Represents the operation process function of the j-th storage pool.
[0219] In this embodiment, the method can be based on the intermediate feature Fea obtained after processing each reservoir unit in the above steps. j Each feature obtained is first activated by the Sigmoid function to obtain the activated feature Feao j Then it is sent to the temporal attention mechanism module for feature adaptive fusion to obtain the fusion feature Feaz. In the temporal attention mechanism module, for each feature Feao j Assign a weight α j , this weight is not a fixed value. During the model training process, the weight will be adaptively adjusted to achieve the optimal feature fusion effect; among them,
[0220] Feao j =Sigmoid(Fea j );
[0221]
[0222] In this embodiment, the output layer structure of the prediction model can send the fusion features to the fully connected layer for further processing, and then obtain the output result of the model after processing by the Relu activation function, thereby obtaining the predicted energy consumption value Dy of the electric ship.
[0223] Dy = Relu(Full(Feaz));
[0224] Among them, Full(*) represents the fully connected layer operation function, and Relu(*) is the Relu activation function.
[0225] S214. Construct a loss function based on the mean absolute error and the mean square error.
[0226] In this embodiment, in the constructed electric ship energy consumption prediction model, the number of neurons in its reserve pool and the degree of sparse connection between neurons (the proportion of zero parameters in the neuron connection matrix) have a very large impact on the prediction performance of the model. Therefore, in order to further improve the overall prediction performance of the model and enhance the robustness of the model in the prediction process, the method adopts the particle swarm algorithm to optimize the model structure.
[0227] In this embodiment, the method can construct the loss function Loss used by the model based on the mean absolute error and the mean square error.
[0228] Loss=Mae(Dy,Db)+Mse(Dy,Db);
[0229] Among them, Mae(*, *) represents the mean absolute error function, Mse(*, *) represents the mean square error function, Dy represents the energy consumption data predicted by the model, and Db represents the actual energy consumption data;
[0230] S215: Initialize the target particle swarm.
[0231] In this embodiment, the method can randomly generate a particle group including L initial particles, each particle of which represents a combination of the number U of neurons in each reserve pool and the degree of sparse connection M in the reserve pool time difference processing structure of the energy consumption prediction model.
[0232] It should be noted that during the random initialization of the particle swarm, the random value range of the number of neurons U is [90, 130], that is, U∈[90, 130], and the value range of the sparse connection degree M is [0.75, 0.95], that is, M∈[0.75, 0.95].
[0233] L h =[U 1h , M 1h , U 2h , M 2h , U 3h , M 3h , U 4h , M 4h ];
[0234] Among them, L h represents the hth particle in the particle swarm, U qh , M qh Represents the specific values of the number of neurons U and the degree of sparse connection M in the qth reserve pool unit in the hth particle, h∈[1,L],q∈[1,4].
[0235] S216, determining a parameter combination formula corresponding to the target particle group.
[0236] In this embodiment, the parameter combination scheme includes the number of neurons in the reserve pool corresponding to each target particle group and the degree of sparse connection.
[0237] S217, training the initial prediction model according to the target particle swarm, the loss function, the standard data set and the parameter combination scheme to obtain the loss value corresponding to each parameter combination scheme.
[0238] S218. Determine the particle swarm fitness of each target particle swarm according to the loss value.
[0239] In this embodiment, the method is based on the combination of the number of neurons in the reserve pool and the degree of sparse connection corresponding to each particle group in the above steps, uses the obtained complete data set to carry out model training, and uses the determined model loss function formula to calculate the loss value Lz of each combination scheme, and uses this loss value Lz as the fitness of this particle group.
[0240] S219, determining the best particle swarm from the target particle swarm according to the particle swarm fitness.
[0241] In this embodiment, the larger the loss value calculated during the training process, the more the predicted energy consumption parameter value deviates from the true value. Based on the fitness of each particle group obtained in the above steps, since its fitness value is consistent with the loss function value, the particle group with the smallest fitness is taken as the optimal particle group L best .
[0242] S220, updating the target particle group according to the optimal particle group to obtain an updated target particle group.
[0243] In this embodiment, the method can update the initial particle group L according to the determined optimal particle group:
[0244]
[0245] Among them, z is the update speed weight, z = 0.7, Softmax (*) represents the normalized operation function, represents the updated particle swarm, h∈[1,L].
[0246] S221. When the number of training iterations is reached, the best particle swarm obtained from the last iterative training is obtained.
[0247] In this embodiment, the method can set the number of iterations to 50 to iterate the above steps a corresponding number of times. Then, the best particle swarm obtained in the 50th iteration is determined as the best particle swarm in the entire training process.
[0248]
[0249] Among them, U 1best , M 1best , U 2best , M 2best , U 3best , M 3best , U 4best , M 4best They respectively represent the number of neurons and the sparsity value corresponding to each reserve pool unit in the optimal combination solution.
[0250] S222, determining the best particle group as the target best particle in the training process.
[0251] S223, determining the parameter combination scheme corresponding to the target optimal particle as the optimal combination scheme.
[0252] S224. Obtain the optimal number of neurons and the optimal sparsity value corresponding to each reserve pool unit according to the optimal combination scheme.
[0253] In this embodiment, the method is based on determining the best particle The number of neurons and the sparsity value corresponding to each reserve pool unit in the are determined as the number of neurons and the sparsity value actually used in the reserve pool in the electric ship battery energy consumption prediction model, so as to obtain the electric ship energy consumption prediction model with the best prediction effect.
[0254] S225. Adjust the model parameters of the initial prediction model according to the optimal number of neurons and the optimal sparsity value to obtain the prediction model to be trained.
[0255] S226. Perform model training on the prediction model to be trained using a standard data set to obtain a trained battery energy consumption prediction model.
[0256] In this embodiment, the method can perform model training based on the optimized model parameters and utilize standard feature data to obtain a finally trained electric ship battery energy consumption prediction model.
[0257] S227. Deploy hardware sensors and a battery energy consumption prediction model to the electric ship to be predicted.
[0258] In this embodiment, the hardware sensors include an electromagnetic flow velocity sensor deployed on the side of the electric ship to be predicted and a pressure water level gauge deployed on the bottom of the electric ship to be predicted.
[0259] In this embodiment, the method can deploy an electromagnetic flow velocity sensor on the side of the electric ship to collect the real-time flow velocity HV and real-time flow direction HF of the river, and deploy a pressure water level gauge at the bottom of the ship to collect the draft depth CS of the ship in real time.
[0260] In this embodiment, based on the constructed electric ship battery energy consumption prediction model and the model optimization strategy, a final optimized electric ship battery energy consumption prediction model is obtained, and the model is deployed in the processor terminal of the electric ship.
[0261] S228. Collect the real-time flow velocity and real-time flow direction of the river through an electromagnetic flow velocity sensor.
[0262] S229. Collect the real-time draft depth of the electric vessel to be predicted through a pressure water level gauge.
[0263] S230, collecting the remaining power data and the real-time running speed of the electric ship to be predicted through the data control console.
[0264] In this embodiment, the method can use the deployed sensors to collect the real-time flow velocity HV and real-time flow direction HF sequence data of the river and the draft depth sequence data CX of the ship, and combine the electric ship running speed sequence data CV and the electric ship remaining power sequence data CS obtained from the data console to form the input data of the model.
[0265] S231. Perform energy consumption prediction based on real-time ship data and a battery energy consumption prediction model to obtain an energy consumption prediction result.
[0266] In this embodiment, the method can send the initial input data into a data processing module based on LMD operation for denoising, and send the denoised data into an electric ship battery energy consumption prediction model to obtain real-time electric ship energy consumption conditions.
[0267] In this embodiment, the above two steps are continuously iterated during the driving process of the electric ship to realize real-time data collection and data processing, and the processed data is sent to the electric ship battery energy consumption prediction model for prediction, thereby realizing the dynamic update of the electric ship battery energy consumption prediction value.
[0268] In this embodiment, the method can help the electric ship driver choose the most efficient driving mode under different driving conditions to reduce battery energy consumption and extend the ship's cruising range based on the real-time updated predicted value of the electric ship's battery energy consumption. At the same time, in terms of charging plan, the most economical electric ship berthing charging time point can be selected based on the predicted battery energy consumption results.
[0269] Please see Figure 7 , Figure 7 A schematic block diagram of the process of real-time deployment of a battery energy consumption prediction model is shown.
[0270] In this embodiment, the execution subject of the method may be a computing device such as a computer or a server, and no limitation is made in this embodiment.
[0271] In this embodiment, the execution subject of the method may also be a smart device such as a smart phone, a tablet computer, etc., which is not limited in this embodiment.
[0272] It can be seen that the implementation of the electric ship battery energy consumption prediction method described in this embodiment can improve the accuracy of electric ship endurance prediction, can adapt to changing navigation environments and complex operating conditions, is conducive to optimizing energy management, and promotes environmentally friendly navigation.
[0273] Example 3
[0274] Please see Figure 8 , Figure 8 This is a schematic diagram of the structure of a battery energy consumption prediction device for electric ships provided in this embodiment. Figure 8 As shown, the electric ship battery energy consumption prediction device includes:
[0275] A first acquisition unit 310 is used to acquire a standard data set for training a model; wherein the standard data set includes river hydrological data, ship status data, and ship energy consumption sequence data;
[0276] A construction unit 320, configured to construct an initial prediction model based on an echo state network;
[0277] A training unit 330 is used to train the initial prediction model based on a particle swarm algorithm and a standard data set to obtain a trained battery energy consumption prediction model;
[0278] A deployment unit 340 is used to deploy the hardware sensor and the battery energy consumption prediction model to the electric ship to be predicted;
[0279] A second acquisition unit 350 is used to acquire real-time ship data through hardware sensors;
[0280] The prediction unit 360 is used to perform energy consumption prediction based on the real-time ship data and the battery energy consumption prediction model to obtain an energy consumption prediction result.
[0281] In this embodiment, the explanation of the electric ship battery energy consumption prediction device can refer to the description in Example 1 or Example 2, and will not be further described in this embodiment.
[0282] It can be seen that the implementation of the electric ship battery energy consumption prediction device described in this embodiment can improve the accuracy of electric ship endurance prediction, can adapt to changeable navigation environments and complex operating conditions, is conducive to optimizing energy management, and promotes environmentally friendly navigation.
[0283] Example 4
[0284] Please see Fig. 9 , Fig. 9 This is a schematic diagram of the structure of a battery energy consumption prediction device for electric ships provided in this embodiment. Fig. 9 As shown, the electric ship battery energy consumption prediction device includes:
[0285] A first acquisition unit 310 is used to acquire a standard data set for training a model; wherein the standard data set includes river hydrological data, ship status data, and ship energy consumption sequence data;
[0286] A construction unit 320, configured to construct an initial prediction model based on an echo state network;
[0287] A training unit 330 is used to train the initial prediction model based on a particle swarm algorithm and a standard data set to obtain a trained battery energy consumption prediction model;
[0288] A deployment unit 340 is used to deploy the hardware sensor and the battery energy consumption prediction model to the electric ship to be predicted;
[0289] A second acquisition unit 350 is used to acquire real-time ship data through hardware sensors;
[0290] The prediction unit 360 is used to perform energy consumption prediction based on the real-time ship data and the battery energy consumption prediction model to obtain an energy consumption prediction result.
[0291] As an optional implementation manner, the first acquiring unit 310 includes:
[0292] The first acquisition subunit 311 is used to collect river hydrological data through sensors according to a preset sampling interval and a preset sampling time when the electric ship is actually traveling; wherein the river hydrological data at least includes river flow rate sequence data and river direction sequence data;
[0293] The first acquisition subunit 312 is used to acquire the ship's own state data and the ship's energy consumption sequence data corresponding to the river hydrological data according to the preset sampling interval and the preset sampling time; wherein the ship's own state data at least includes the ship's battery real-time power sequence data, the ship's sailing speed sequence data and the ship's draft depth sequence data;
[0294] The first construction subunit 313 is used to construct input data according to the river hydrological data and the ship's own state data;
[0295] The first construction subunit 313 is further used to construct a complete data set according to the input data and the ship energy consumption series data;
[0296] The decomposition subunit 314 is used to perform local mean decomposition processing on the complete data set to obtain a standard data set.
[0297] As an optional implementation, the decomposition subunit 314 is specifically used to determine a complete data set as a data set to be decomposed; extract local extreme points of the data set to be decomposed; calculate the average values of adjacent local extreme points and the envelope function values of adjacent extreme points based on the local extreme points; obtain the local mean function based on the average values of adjacent local extreme points, and obtain the envelope estimation function based on the envelope function value; calculate the frequency modulation function based on the local mean function, the data set to be decomposed and the envelope estimation function; when the envelope estimation function of the frequency modulation function is always 1, calculate the envelope signal based on the envelope estimation function; decompose the data set to be decomposed based on the envelope signal and the frequency modulation function to obtain a PF component set; and splice the PF component set to obtain a standard data set.
[0298] In this embodiment, the initial prediction model includes an input layer, a time-based sequence partitioning block, a reservoir time difference processing structure, a Sigmoid activation function, a time attention mechanism module, and an output layer;
[0299] The output layer includes the softmax activation function and the first fully connected layer;
[0300] The reservoir time difference processing structure is generated based on the reservoir unit structure;
[0301] The reserve cell structure includes multiple neurons;
[0302] The time difference processing structure of the storage pool includes an early data processing storage pool unit, a mid-term data processing storage pool unit, a mid- to near-term data processing storage pool unit, and a near-term data processing storage pool unit;
[0303] The output layer includes a Relu activation function and a second fully connected layer.
[0304] As an optional implementation, the training unit 330 includes:
[0305] A second construction subunit 331 is used to construct a loss function based on the mean absolute error and the mean square error;
[0306] Initialization subunit 332, used to initialize the target particle group;
[0307] The determination subunit 333 is used to determine the parameter combination scheme corresponding to the target particle group; wherein the parameter combination scheme includes the number of neurons in the reserve pool corresponding to each target particle group and the degree of sparse connection;
[0308] The optimization subunit 334 is used to optimize the parameters of the initial prediction model according to the target particle swarm, the loss function, the standard data set and the parameter combination scheme to obtain the prediction model to be trained;
[0309] The training subunit 335 is used to perform model training on the prediction model to be trained using a standard data set to obtain a trained battery energy consumption prediction model.
[0310] As an optional implementation, the optimization subunit 334 is specifically used to train the initial prediction model according to the target particle group, the loss function, the standard data set and the parameter combination scheme to obtain the loss value corresponding to each parameter combination scheme; determine the particle group fitness of each target particle group according to the loss value; determine the best particle group from the target particle group according to the particle group fitness; update the target particle group according to the best particle group to obtain the updated target particle group; when the number of training iterations is reached, obtain the best particle group obtained by the last iterative training; determine the best particle group as the target best particle in the training process; determine the parameter combination scheme corresponding to the target best particle as the best combination scheme; obtain the best number of neurons and the best sparsity value corresponding to each reserve pool unit according to the best combination scheme; adjust the model parameters of the initial prediction model according to the best number of neurons and the best sparsity value to obtain the prediction model to be trained.
[0311] As an optional implementation, the hardware sensor includes an electromagnetic flow velocity sensor deployed on the side of the electric ship to be predicted and a pressure water level gauge deployed on the bottom of the electric ship to be predicted;
[0312] The second acquisition unit 350 includes:
[0313] The second acquisition subunit 351 is used to collect the real-time flow velocity and real-time flow direction of the river through an electromagnetic flow velocity sensor;
[0314] The second acquisition subunit 351 is further used to acquire the real-time draft of the electric vessel to be predicted through a pressure water level gauge;
[0315] The second acquisition subunit 352 is used to collect the remaining power data and the real-time running speed of the electric ship to be predicted through the data control console of the electric ship to be predicted.
[0316] In this embodiment, the explanation of the electric ship battery energy consumption prediction device can refer to the description in Example 1 or Example 2, and will not be repeated in this embodiment.
[0317] It can be seen that the implementation of the electric ship battery energy consumption prediction device described in this embodiment can improve the accuracy of electric ship endurance prediction, can adapt to changeable navigation environments and complex operating conditions, is conducive to optimizing energy management, and promotes environmentally friendly navigation.
[0318] An embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the electric ship battery energy consumption prediction method in embodiment 1 or embodiment 2 of the present application.
[0319] An embodiment of the present application provides a computer-readable storage medium storing computer program instructions. When the computer program instructions are read and executed by a processor, the electric ship battery energy consumption prediction method in embodiment 1 or embodiment 2 of the present application is executed.
[0320] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0321] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0322] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0323] The above description is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0324] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0325] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
Claims
1. A method for predicting battery energy consumption of an electric ship, characterized in that: include: Obtaining a standard data set for training the model; wherein the standard data set includes river hydrological data, ship status data, and ship energy consumption series data; Constructing an initial prediction model based on echo state network; Training the initial prediction model based on a particle swarm algorithm and the standard data set to obtain a trained battery energy consumption prediction model; Deploy the hardware sensor and the battery energy consumption prediction model on the electric ship to be predicted; Acquire real-time ship data through the hardware sensor; Energy consumption prediction is performed according to the real-time ship data and the battery energy consumption prediction model to obtain an energy consumption prediction result.
2. The method for predicting battery energy consumption of an electric ship according to claim 1, characterized in that: The step of obtaining a standard data set for training a model includes: When the electric ship is actually traveling, river hydrological data is collected by sensors according to a preset sampling interval and a preset sampling time; wherein the river hydrological data at least includes river flow velocity sequence data and river direction sequence data; According to the preset sampling interval and the preset sampling time, the ship's own state data and the ship's energy consumption sequence data corresponding to the river hydrological data are obtained; wherein the ship's own state data at least includes the ship's battery real-time power sequence data, the ship's sailing speed sequence data and the ship's draft depth sequence data; constructing input data according to the river hydrological data and the ship's own state data; Constructing a complete data set based on the input data and the ship energy consumption series data; The complete data set is subjected to local mean decomposition processing to obtain a standard data set.
3. The method for predicting battery energy consumption of an electric ship according to claim 2, characterized in that: The performing local mean decomposition processing on the complete data set to obtain a standard data set includes: Determine the complete data set as the data set to be decomposed; Extracting local extreme points of the data set to be decomposed; Calculate the average value of adjacent local extreme value points and the envelope function value of adjacent extreme value points according to the local extreme value points; Obtaining a local mean function according to the average values of the adjacent local extreme value points, and obtaining an envelope estimation function according to the envelope function value; Calculating a frequency modulation function according to the local mean function, the data set to be decomposed and the envelope estimation function; When the envelope estimation function of the frequency modulation function is always 1, calculating the envelope signal according to the envelope estimation function; Decomposing the data set to be decomposed according to the envelope signal and the frequency modulation function to obtain a PF component set; The PF component set is spliced to obtain a standard data set.
4. The method for predicting battery energy consumption of an electric ship according to claim 1, characterized in that: The initial prediction model includes an input layer, a time-based sequence partitioning block, a reserve pool time difference processing structure, a Sigmoid activation function, a time attention mechanism module and an output layer; The output layer includes a softmax activation function and a first fully connected layer; The reserve pool time difference processing structure is generated based on the reserve pool unit structure; The reservoir unit structure includes a plurality of neurons; The storage pool time difference processing structure includes an early data processing storage pool unit, a mid-term data processing storage pool unit, a mid- to near-term data processing storage pool unit, and a near-term data processing storage pool unit; The output layer includes a Relu activation function and a second fully connected layer.
5. The method for predicting battery energy consumption of an electric ship according to claim 1, characterized in that: The initial prediction model is trained based on the particle swarm algorithm and the standard data set to obtain a trained battery energy consumption prediction model, including: Construct loss function based on mean absolute error and mean square error; Initialize the target particle swarm; Determine a parameter combination scheme corresponding to the target particle group; wherein the parameter combination scheme includes the number of neurons in the reserve pool corresponding to each target particle group and the degree of sparse connection; Optimizing the parameters of the initial prediction model according to the target particle swarm, the loss function, the standard data set, and the parameter combination scheme to obtain a prediction model to be trained; The prediction model to be trained is trained using the standard data set to obtain a trained battery energy consumption prediction model.
6. The method for predicting battery energy consumption of an electric ship according to claim 5, characterized in that: The step of optimizing the parameters of the initial prediction model according to the target particle swarm, the loss function, the standard data set, and the parameter combination scheme to obtain the prediction model to be trained includes: The initial prediction model is trained according to the target particle swarm, the loss function, the standard data set and the parameter combination scheme to obtain a loss value corresponding to each parameter combination scheme; Determine the particle swarm fitness of each of the target particle swarms according to the loss value; Determining an optimal particle group from the target particle group according to the particle group fitness; Updating the target particle group according to the optimal particle group to obtain an updated target particle group; When the number of training iterations is reached, the best particle swarm obtained from the last iteration training is obtained; Determine the best particle group as the target best particles in the training process; Determine the parameter combination scheme corresponding to the target optimal particle as the optimal combination scheme; According to the optimal combination scheme, the optimal number of neurons and the optimal sparsity value corresponding to each reserve pool unit are obtained; The model parameters of the initial prediction model are adjusted according to the optimal number of neurons and the optimal sparsity value to obtain the prediction model to be trained.
7. The method for predicting battery energy consumption of an electric ship according to claim 1, characterized in that: The hardware sensor includes an electromagnetic flow velocity sensor deployed on the side of the electric ship to be predicted and a pressure water level gauge deployed on the bottom of the electric ship to be predicted; Wherein, the acquiring of real-time ship data through the hardware sensor includes: The electromagnetic flow velocity sensor is used to collect the real-time flow velocity and real-time flow direction of the river; The real-time draft depth of the electric vessel to be predicted is collected by the pressure water level gauge; The remaining power data and the real-time running speed of the electric ship to be predicted are collected through the data control console of the electric ship to be predicted.
8. An electric ship battery energy consumption prediction device, characterized in that: The electric ship battery energy consumption prediction device comprises: A first acquisition unit is used to acquire a standard data set for training a model; wherein the standard data set includes river hydrological data, ship status data, and ship energy consumption sequence data; A construction unit, used for constructing an initial prediction model based on an echo state network; A training unit, used for training the initial prediction model based on a particle swarm algorithm and the standard data set to obtain a trained battery energy consumption prediction model; A deployment unit, used for deploying the hardware sensor and the battery energy consumption prediction model to the electric ship to be predicted; A second acquisition unit, used for acquiring real-time ship data through the hardware sensor; The prediction unit is used to perform energy consumption prediction based on the real-time ship data and the battery energy consumption prediction model to obtain an energy consumption prediction result.
9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the electric ship battery energy consumption prediction method according to any one of claims 1 to 7.
10. A readable storage medium, characterized in that: The readable storage medium stores computer program instructions, and when the computer program instructions are read and executed by a processor, the electric ship battery energy consumption prediction method according to any one of claims 1 to 7 is executed.
Citation Information
Patent Citations
Short-period wind speed prediction method
CN106875041A
Rolling bearing fault prediction method and system
CN115130495A
Tidal reach ship oil consumption prediction method and device and electronic equipment
CN116108995A
Robot aviation equipment drilling process optimization method based on particle swarm optimization and deep learning
CN117332517A
Method for predicting ship fuel consumption by combining mechanism model and data driving model
CN118861860A
Cited By
High-speed lithium battery energy state estimation method
CN120370170A
New energy ship intelligent navigation safety dynamic monitoring system and method
CN120664087A
A Dynamic Monitoring System and Method for Intelligent Navigation Safety of New Energy Ships
CN120664087B