A method and device for predicting ocean temperature difference energy power generation efficiency

By embedding physical constraints in the ocean thermoelectric power generation system through the physical information neural network (PINN), the high cost and low real-time performance problems of existing technologies are solved, high-precision prediction of ocean thermoelectric power generation efficiency is achieved, and dynamic system optimization and clean energy development are supported.

CN120258249BActive Publication Date: 2025-09-05SHANDONG UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510736867.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-04
Publication Date
2025-09-05
Estimated Expiration
2045-06-04

AI Technical Summary

Technical Problem

Existing ocean temperature difference energy power generation efficiency prediction technologies rely on large amounts of experimental data or high-precision grid calculations, which are costly, have poor real-time performance, are difficult to handle phase change nonlinearity and multi-physical field coupling, and lack dynamic prediction capabilities, resulting in insufficient reliability of prediction results under complex working conditions.

Method used

By leveraging the self-learning capability of the Physical Information Neural Network (PINN), we establish a relationship between network input and output, and embed physical constraints to achieve high-precision and rapid prediction of ocean temperature difference energy generation efficiency. The PINN model can ensure physical rationality even with a small training dataset, and handle complex nonlinear relationships through the physical constraint terms in the loss function.

Benefits of technology

It has achieved rapid and accurate prediction of ocean temperature difference energy power generation efficiency in the case of insufficient data, improved the reliability and real-time performance of the prediction, can adapt to dynamic system changes, support the optimization of structural design and operation strategies, and promote the development of clean energy and the realization of the "dual carbon" goals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120258249B_ABST
    Figure CN120258249B_ABST
Patent Text Reader

Abstract

The present invention relates to a method and device for predicting ocean thermal energy generation efficiency, belonging to the field of marine energy development and prediction technology. Leveraging the self-learning capabilities of the PINN neural network (PINN) model, a relationship is established between network inputs (accumulator pressure, motor speed, current flowing through a load resistor, and time) and outputs (system efficiency), enabling prediction of ocean thermal energy generation efficiency. By embedding physical constraints in the PINN model, the present invention ensures physical rationality even in data-scarce conditions. This method significantly improves transfer learning beyond small training datasets and training conditions, achieving high-precision and rapid predictions and enhancing reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method and device for predicting ocean temperature difference energy power generation efficiency, belonging to the technical field of ocean energy development and prediction. Background Art

[0002] With the development of the global economy and the continuous growth of the population, the demand for energy continues to rise. Energy shortages have become a major bottleneck restricting the sustainable development of countries around the world. At the same time, climate change is becoming increasingly prominent. Global warming and frequent extreme weather events caused by greenhouse gas emissions pose enormous challenges to human survival and development. Reducing carbon emissions and promoting the transition of energy structures towards clean, low-carbon ones have become a universal consensus and urgent need of the international community.

[0003] As Earth's largest resource repository, the ocean contains abundant renewable energy. Ocean thermal energy, a clean energy source with vast reserves and sustainable utilization, is of great significance for its development and possesses enormous development potential. In ocean thermal energy power generation systems, predicting power generation efficiency can guide material selection, heat exchanger structural design, and optimization of operating parameters (such as temperature difference and flow rate), maximizing energy conversion efficiency. Simultaneously, operating strategies (such as working fluid flow rate and pump speed) can be adjusted in real time to avoid efficiency drops or equipment damage caused by temperature changes. System damage can be promptly detected and maintained based on efficiency anomalies, minimizing downtime losses. Chinese patent document CN111210080A proposes a hybrid ocean energy hub and joint control method for multi-energy complementarity. By integrating multiple ocean energy sources (tidal energy, offshore wind energy, ocean thermal energy, etc.) with energy storage systems, the coordinated production and efficient scheduling of electricity, heat, and cooling energy can be achieved. This solution utilizes ocean temperature differences to use traditional OTEC, which relies on direct heat exchange with seawater temperature differences. Its efficiency is limited by the low temperature difference and it relies on a static coupling matrix and preset constraints. It cannot adapt to changes in the ocean environment in real time (such as temperature fluctuations and efficiency degradation caused by biological attachment). Its scheduling strategy is based on historical data and lacks dynamic prediction capabilities.

[0004] However, existing prediction technologies rely on large amounts of experimental data or high-precision grid calculations, which are costly, have poor real-time performance, and are difficult to handle for issues such as phase transition nonlinearity and multi-physics field coupling. This results in insufficient reliability of prediction results under complex working conditions. Furthermore, the difficulty of collecting real experimental data in some cases further increases the difficulty of prediction. Therefore, the development of a new prediction method is of great significance. Summary of the Invention

[0005] To address the shortcomings of existing technologies, the present invention provides a method and device for predicting ocean thermal energy generation efficiency. Leveraging the self-learning capabilities of a physical information neural network (PINN), the method establishes a relationship between network inputs (accumulator pressure, motor speed, current flowing through a load resistor, and time) and outputs (system efficiency), enabling prediction of ocean thermal energy generation efficiency. By embedding physical constraints in the PINN model, the present invention ensures physical plausibility even when experimental data is insufficient. It also significantly improves transfer learning beyond small training datasets and training conditions, achieving high-precision and rapid predictions and enhancing reliability.

[0006] The technical solutions of the present invention are as follows:

[0007] A method for predicting ocean temperature difference energy power generation efficiency comprises the following steps:

[0008] Step 1: Build an amesim simulation model of the ocean temperature difference energy power generation system;

[0009] Step 2: Perform an accumulator discharge experiment to collect the pressure, motor speed, current flowing through the load resistor, and system output power during the accumulator discharge process;

[0010] Step 3: Input the collected parameters into the PINN neural network model and preprocess it;

[0011] Step 4: Split the preprocessed dataset into training set, test set, and validation set in proportion;

[0012] Step 5: Build a preliminary PINN model for predicting ocean temperature difference energy generation efficiency;

[0013] Step 6: Use the split training set data as the input of the model for training. After multiple training updates, a PINN prediction model for ocean temperature difference energy power generation efficiency is obtained.

[0014] Step 7: Build a test bench for the ocean temperature difference energy power generation system;

[0015] Step 8: The pressure, motor speed, current flowing through the load resistor, and power generation efficiency of some accumulator discharge processes are collected through test bench experiments. The collected actual experimental parameters are input into the trained PINN prediction model for fine-tuning to obtain the final prediction model.

[0016] Step 9: Input the newly collected test parameters into the PINN prediction model based on ocean temperature difference energy power generation efficiency, and finally obtain the corresponding system prediction efficiency.

[0017] Preferably, in step 1, an amesim simulation platform for an ocean temperature difference energy generation system is constructed, including a pressure source, an accumulator, a reversing valve, a hydraulic motor, a rotating load, a motor, a rectifier module, a load resistor, a sensor acquisition module, a power acquisition module, and an efficiency acquisition module. The pressure source is used to provide power to the system, the reversing valve is used to control the working state of the system, the hydraulic motor is used to convert hydraulic energy into mechanical energy, the hydraulic motor is connected to a rotating load and can be used to receive torque feedback from the motor, the motor is used to convert mechanical energy into electrical energy, the rectifier module is used to convert three-phase alternating current into direct current, and the load resistor is used to consume the power output by the motor; the sensor acquisition module includes a speed sensor, a current sensor, and a pressure sensor, which are used to collect key parameters in real time, and during the entire discharge experiment, energy is transmitted from the accumulator to the hydraulic motor, the motor, and the load resistor, and undergoes conversion from hydraulic energy to mechanical energy to electrical energy; the power acquisition module is used to collect the input power and output power of the system; and the efficiency acquisition module is used to collect the system power generation efficiency y.

[0018] Preferably, step 2 is to use the simulation platform built in step 1 to perform an accumulator discharge experiment, without considering the energy storage process of the motor, connecting the output end of the motor to a load resistor, directly consuming the electric energy generated by the motor, and connecting a current sensor next to the load resistor to collect the current value flowing through the load resistor.

[0019] The method for obtaining the input data set of training data is as follows: the volume of the accumulator is determined to be a certain value, an accumulator discharge experiment is performed, and the accumulator pressure P, motor speed n, current I flowing through the load resistor, and system power generation efficiency y are collected through sensors.

[0020] Preferably, step 3 is to combine the data collected in step 2 into a complete data set, which contains five columns of data: time, accumulator pressure, motor speed, current flowing through the load resistor, and power generation efficiency. The four columns of data other than time are filtered and pre-processed, and the data is normalized to the maximum and minimum values ​​so that the data are mapped to the interval [-1, 1] to improve the training efficiency and stability of the model. Moving average filtering is used for filtering to remove high-frequency noise in the data. The formula is as follows:

[0021] (1)

[0022] Where x[n] represents the data sequence to be processed, y[n] represents the sequence after moving average filtering, N represents the window size of the moving average, and n represents the index of the data point.

[0023] The formula for data normalization is as follows:

[0024] (2)

[0025] Where:x max Represents the maximum value in the data set to be processed, x min Represents the minimum value in the data set to be processed, x m Represents the normalized data.

[0026] Preferably, in step 4, overfitting may occur during training. Overfitting occurs when the model overlearns the noise and specific patterns of the training data, failing to effectively capture the underlying patterns. To address this issue, the preprocessed dataset is split into training, test, and validation sets in a ratio of 6:2:2.

[0027] Preferably, the preliminary PINN model for predicting ocean temperature difference energy generation efficiency built in step 5 uses a fully connected multi-layer neural network as a feature code to embed input parameter features, and adds multiple physical constraints to improve the reliability of the PINN model output.

[0028] Among them, the PINN neural network model is built based on Python language.

[0029] The PINN neural network consists of an input layer, a hidden layer, and an output layer. The activation function of the output layer is sigmoid, which compresses the output to the range of [0,1].

[0030] The neural network has two hidden layers, and each hidden layer has 64 neurons. The hidden layer uses a fully connected layer, and its activation function is tanh (hyperbolic tangent), which compresses the output to the range of [-1, 1].

[0031] Preferably, the model is trained in step 6, and the training process is as follows:

[0032] First, the divided training set data is brought into the constructed PINN neural network model; then the network weights are initialized, the learning rate and optimizer are set; the collected time series data and physical parameters are input, the data-driven loss and physical constraint loss are calculated respectively, and the weighted sum is obtained as the total loss L; then automatic differentiation is used for optimization, the optimized correction value is propagated forward, and the grid weights are updated; finally, after multiple iterative updates, the PINN neural network model for ocean temperature difference energy generation is output, completing the training.

[0033] Further preferably, in step 6, two optimizers, adam and lbfgs, are provided for learning during model training; there are two optimizers in the model, and adam is used first during training, and then lbfgs is used.

[0034] The Adam optimizer is used for learning, which is based on the gradient descent optimization algorithm with a learning rate of 1×10 3 , the total number of training times is 2000, and the model performance is verified on the test data for 100 rounds each.

[0035] Use lbfgs optimizer for learning, adopt the second-order optimization algorithm, set the initial learning rate to 1, and then automatically determine the step size through search, without manually setting the learning rate. In each iteration, find a step size along the current search direction. α , so that the objective function f ( x + αd ) satisfies the descent condition, the total number of training is 2000, and each 100 rounds are used to verify the model performance on the test data.

[0036] Further preferably, in step 6, the loss function of the PINN neural network is L, and its calculation formula is as follows:

[0037] L = l d L data + l p L phys + l b L bound (3)

[0038] Where, L data represents the data loss term of the PINN neural network, L phys is the physical loss term, L bound is the efficiency frontier loss term, and l d 、 l p 、 l b are the weights of different items respectively.

[0039] l d 、 l p 、 l b The weight value is given by the parameter training network, and the initial weight is defined as 、 、 , each training will save and update the weight value, the updated weight is ,Will l1 Bring in the PINN neural network to continue participating in model training.

[0040] The training is iterated multiple times until the PINN neural network model for predicting ocean temperature difference power generation efficiency converges.

[0041] Further preferably, the data loss term of the PINN neural network is L data Using mean square error, the calculation formula is as follows:

[0042] (4)

[0043] Where N is the number of initial samples, t i Indicates the i The sample point corresponding to each time point, y pre Represents the predicted value obtained after training the PINN neural network model, y data Represents the output sample data at the initial moment, y pre ( t i ) indicates the i The predicted value obtained by training the data of the initial sample time point at the initial moment through the PINN neural network model, y data ( t i ) indicates the i The output sample data of the initial sample time point at the initial moment.

[0044] Further preferably, the physical loss term of the PINN neural network L phys is the residual of the physical equation and is calculated as follows:

[0045] (5)

[0046] (6)

[0047] (7)

[0048] Where M is the number of physical constraint sampling points, t j Indicates the j The sampling point corresponding to each time point, f phys The physical equation representing the PINN neural network model, f phys ( tj ) indicates the j The physical equation corresponding to each sampling time point, y pre ( t j ) indicates the j The predicted value of system efficiency corresponding to each sampling time point, R represents the resistance value of the load resistor, P Indicates the accumulator pressure, Indicates the motor angular velocity.

[0049] According to the energy conservation of the accumulator discharge process and Newton's second law, the following formula is obtained:

[0050] (8)

[0051] Where, V 0. P 0 represents the initial volume and initial pressure of nitrogen in the accumulator, Q ( t j ) indicates the j The hydraulic motor inlet flow value corresponding to each sampling time point, represents the adiabatic index of the gas (here nitrogen), represents the effective bulk elastic modulus of the accumulator, Indicates the j The sampling time points corresponding to , J represents the moment of inertia, c represents the damping constant, D Indicates the displacement of the hydraulic motor, k e represents the back electromotive force constant, I ( t j ) indicates the j The current value flowing through the load resistor corresponding to the sampling time point, Indicates the j The sampling time points correspond to .

[0052] Motor speed n and motor angular velocity in the system and flow Q have the following relationships:

[0053] (9)

[0054] Q=nD(10)

[0055] Therefore, by substituting equations (7), (8), and (10) into equation (6), we can obtain:

[0056] (11)

[0057] in V 0. P 0. 、 、 J 、 c 、 D 、 k e , R are both known and determined values.

[0058] Further preferably, the boundary condition for limiting efficiency is 0 < y pre < y max , so the efficiency boundary loss term of the PINN neural network is L bound The calculation formula is as follows:

[0059] (12)

[0060] Where, ReLU is the activation function, which is used to punish values ​​outside the allowed range. ReLU ( y pre ( t i ) - y max ) represents the prediction efficiency of the PINN neural network y pre ( t i ) exceeds the efficiency limit y max , the value is positive, otherwise it is 0. ReLU (- y pre ( t i )) represents the predicted value of the PINN neural network y pre ( t i ) is a negative number, the value is positive, otherwise the value is 0.

[0061] Further preferably, in step 6, when training the neural network, the initial conditions are fitted through supervised learning, while the power and efficiency constraints are incorporated into the loss function in an unsupervised manner; the optimization process is optimized using automatic differentiation, that is, using the Adam and L-BFGS algorithms until the model converges, and the mean square error (MSE) is used to judge the convergence of the model, and the formula is as follows:

[0062] (13)

[0063] Where, represents the number of samples, y pre represents the predicted output of the sample, y ref Represents the actual reference output of the sample, and the weights are adjusted during training to minimize the error between the predicted value and the actual reference value.

[0064] A device for predicting ocean temperature difference energy power generation efficiency includes a device platform, which includes a pump providing a power source, an accumulator, a pressure sensor, a flow sensor, a reversing valve, a hydraulic motor, an electric motor, a rectifier module, and a load resistor connected in sequence; a torque sensor is provided on the hydraulic motor, a speed sensor is provided on the electric motor, and a current sensor is provided on the load resistor;

[0065] The pump is used to provide power to the system. The pressure sensor and flow sensor respectively detect the pressure and flow values ​​of the accumulator in real time. The reversing valve is used to control the working state of the system. The hydraulic motor is used to convert hydraulic energy into mechanical energy. The torque sensor is used to measure the change in the output torque of the hydraulic motor. The motor is used to convert mechanical energy into electrical energy. The speed sensor is used to measure the real-time speed value of the motor. The rectifier module is used to convert three-phase AC power into DC power. The load resistor is used to consume the power output by the motor. At the same time, the current sensor is used to collect the current value flowing through the load resistor.

[0066] The pressure sensor, flow sensor, torque sensor, rotation speed sensor and current sensor are connected to a computer, and the computer executes the steps in the above method.

[0067] This application is for an ocean thermal energy generation system based on phase change materials. By leveraging the latent heat storage properties of solid-liquid phase change materials, the system efficiently absorbs and releases heat during temperature fluctuations, improving the system's instantaneous power output and energy density. Physical constraints are embedded in machine learning to ensure that predictions conform to physical laws. Even in the absence of sufficient data, the system's efficiency can be accurately predicted, allowing for timely adjustment of device parameters for adaptive optimization. Emphasizing efficiency prediction, the PINN neural network is constructed to handle complex nonlinear relationships. Combining physical information (such as thermodynamic equations) with data-driven methods provides higher prediction accuracy and can capture dynamic changes in system efficiency, making it suitable for predicting long-term data series.

[0068] The beneficial effects of the present invention are:

[0069] 1. This invention proposes a method and device for predicting ocean thermal energy generation efficiency. Leveraging the self-learning capabilities of a physical information neural network (PINN), a relationship is established between network inputs (accumulator pressure, motor speed, current flowing through a load resistor, and time) and outputs (system efficiency), enabling rapid and accurate prediction of ocean thermal energy generation efficiency. Combining physical models with data-driven machine learning methods, the PINN uses time-series efficiency prediction to achieve more accurate and reliable prediction results. Compared to traditional machine learning methods, PINN offers higher precision and robustness when dealing with complex physical systems, while also enabling accurate predictions at a small order of magnitude.

[0070] 2. Compared with existing technologies, this method uses energy and efficiency constraints to directly embed physical information into the network structure. By embedding physical constraints into the PINN model, physical rationality can be maintained even in the presence of insufficient data. This significantly improves transfer learning beyond small training datasets and training conditions, and enables high-precision, rapid predictions, improving reliability. By integrating physical knowledge through the physical constraint term in the loss function, the method can handle complex nonlinear relationships and is suitable for dynamic system modeling.

[0071] 3. This invention is driven by both physics and data, and can utilize physical laws and data-driven methods to perform time series forecasting. It can accurately predict ocean thermal energy power generation efficiency, and even in the absence of sufficient data, it can provide more accurate system efficiency forecasts. This forecast allows for early identification of changing trends in system efficiency, allowing for timely adjustments. Furthermore, the forecast results reflect actual variations, enabling timely adjustments to optimize the structural design and operating parameters of power generation equipment. Furthermore, operational strategies can be adjusted in real time to maximize energy conversion efficiency. This is of great significance for ocean thermal energy conversion and the development of clean energy, and plays a significant role in achieving the "dual carbon" goals. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] Figure 1 This is a simulation model diagram of the ocean temperature difference energy power generation system amesim of the present invention;

[0073] Figure 2 This is a flow chart of the implementation method of the present invention for predicting ocean temperature difference energy power generation efficiency;

[0074] Figure 3 This is a PINN framework diagram for predicting ocean temperature difference energy generation efficiency of the present invention;

[0075] Figure 4 This is a schematic diagram of the connection of the modules of the test device for the ocean thermal energy power generation system of the present invention;

[0076] In the figure, 1- accumulator, 2- reversing valve, 3- input power acquisition module, 4- hydraulic motor, 5- rotating load, 6- speed sensor, 7- motor, 8- rectifier module, 9- load resistor, 10- current sensor, 11- output power acquisition module, 12- efficiency acquisition module, 13- pressure sensor, 14- pressure source. DETAILED DESCRIPTION

[0077] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, the present invention is further described below through embodiments and in conjunction with the accompanying drawings, but is not limited thereto. Matters not fully described in the present invention are based on conventional techniques in the art.

[0078] Example 1:

[0079] This embodiment discloses a method for predicting the efficiency of ocean temperature difference energy generation. Figure 2 As shown, the following steps are included:

[0080] Step 1: Build the amesim simulation model of the ocean temperature difference energy power generation system.

[0081] like Figure 1 As shown, the amesim simulation platform includes a pressure source 14, an accumulator 1, a reversing valve 2, a hydraulic motor 4, a rotating load 5, a motor 7, a rectifier module 8, a load resistor 9, and a sensor acquisition module, an input power acquisition module 3, an output power acquisition module 11, and an efficiency acquisition module 12. The sensor acquisition module includes a speed sensor 6, a current sensor 10, and a pressure sensor 13. The accumulator 1 first sets an inflation pressure, that is, the initial pressure of the accumulator P 0, the pressure source 14 instantly replenishes the accumulator 1 to the maximum pressure of the system. At the same time, the module of N2 in the amesim simulation diagram is a universal gas definition. This module is used to define the gas properties of the entire model. Nitrogen is selected in this model.

[0082] During the overall discharge experiment, the pressure sensor 13 at the outlet of the accumulator 1 can monitor the outlet pressure in real time. The reversing valve 2 can control the working state of the system. When the reversing valve 2 is in the right position, the system does not discharge; otherwise, it does. The input power acquisition module 3 can collect the power released by the accumulator 1, that is, the input power of the system. The hydraulic motor 4 can convert hydraulic energy into mechanical energy. The hydraulic motor 4 is connected to a rotating load 5 and can be used to receive torque feedback from the motor 7. A speed sensor 6 is provided between the motor 7 and the rotating load 5 for real-time monitoring of the speed change of the motor 7. The rectifier module 8 is used to convert three-phase AC power into DC power. The load resistor 9 can consume the electricity generated by the motor. The current sensor 10 can monitor the current value flowing through the load resistor 9 in real time. The output power acquisition module 11 can collect the electric power consumed by the load resistor 9, that is, the output power of the system. The efficiency acquisition module 12 can collect the power generation efficiency value of the system. During the entire discharge experiment, energy is transferred from the accumulator 1 to the hydraulic motor 4, the motor 7, and the load resistor 9, undergoing the conversion from hydraulic energy to mechanical energy to electric energy.

[0083] Step 2: Perform a discharge experiment on the energy accumulator 1 and collect the pressure, motor speed, current flowing through the load resistor 9 and output power value of the system during the discharge process of the energy accumulator 1.

[0084] Without considering the energy storage process of the motor 7, the output end of the motor 7 is connected to the load resistor 9 to directly consume the electric energy generated by the motor 7. At this time, the load power is the output power.

[0085] The method for obtaining the input data set of training data is as follows: the volume of the accumulator 1 is determined to be a certain value, a discharge experiment of the accumulator 1 is performed, and the pressure P of the accumulator 1, the speed n of the motor 7, the current value I flowing through the load resistor 9, and the system power generation efficiency y are respectively collected through sensors.

[0086] The accumulator's pressure, P, is a key indicator for measuring the amount of energy stored in the accumulator and is directly related to its ability to provide power to the system. The accumulator's flow rate refers to the volume of oil flowing into or out of the accumulator per unit time. This study only considers the accumulator's discharge process, determining the inflation volume to be 0.25L. Using sensors to collect the accumulator's time series pressure P data can fully reflect the accumulator's operating status and system load changes throughout the discharge process.

[0087] Step 3: Input the collected parameters into the PINN neural network model and preprocess it.

[0088] To improve the training efficiency and prediction accuracy of the model, the data collected in step 2 are combined into a complete data set. Each column of data except the time column is filtered and preprocessed. At the same time, the data is normalized to the maximum and minimum values ​​so that the data is mapped to the interval [-1, 1] to improve the training efficiency and stability of the model. The moving average filter is used for filtering to remove high-frequency noise in the data. The formula is as follows:

[0089] (1)

[0090] Where x[n] represents the data sequence to be processed, y[n] represents the sequence after moving average filtering, N represents the window size of the moving average, and n represents the index of the data point.

[0091] The formula for data normalization is as follows:

[0092] (2)

[0093] Where: x max Represents the maximum value in the data set to be processed, x min Represents the minimum value in the data set to be processed, x m Represents the normalized data.

[0094] Step 4: Split the preprocessed dataset into training set, test set, and validation set in proportion.

[0095] Overfitting can occur during training. This phenomenon occurs when a model overlearns the noise and specific patterns in the training data, failing to effectively capture the underlying patterns. To address this issue, the preprocessed dataset is split into training, test, and validation sets in a 6:2:2 ratio.

[0096] Step 5: Build a preliminary PINN model for predicting ocean temperature difference energy generation efficiency.

[0097] The model uses a fully connected multi-layer neural network as a feature code to embed input parameter features, and adds multiple physical constraints to improve the reliability of the PINN model output.

[0098] Among them, the PINN neural network prediction model is built based on Python language.

[0099] The PINN neural network consists of an input layer, a hidden layer, and an output layer. The activation function of the output layer is sigmoid, which compresses the output to the range of [0,1].

[0100] The neural network has two hidden layers, and each hidden layer has 64 neurons. The hidden layer uses a fully connected layer, and its activation function is tanh (hyperbolic tangent), which compresses the output to the range of [-1, 1].

[0101] Step 6: Use the split training set data as the input of the model for training. After multiple training updates, the PINN prediction model for ocean temperature difference energy power generation efficiency is obtained. The training process is as follows:

[0102] First, the divided training set data is brought into the constructed PINN neural network model; then the network weights are initialized, the learning rate and optimizer are set; the collected time series data and physical parameters are input, the data-driven loss and physical constraint loss are calculated respectively, and the weighted sum is obtained as the total loss L; then automatic differentiation is used for optimization, the optimized correction value is propagated forward, and the grid weights are updated; finally, after multiple iterative updates, the PINN neural network model for ocean temperature difference energy generation is output, completing the training.

[0103] Among them, the input and output layers of the PINN neural network are all time series parameters. Set X_f as the input layer of the PINN neural network, X_f=[t, P, n, I], and Y_f as the output layer of the PINN neural network, Y_f=[ y pre ], each time point t corresponds to a P and Q, and also corresponds to a y pre .

[0104] During model training, two optimizers, Adam and lbfgs, are provided for learning. There are two optimizers in the model. Adam is used first during training, and then lbfgs is used.

[0105] The Adam optimizer is used for learning, which is based on the gradient descent optimization algorithm with a learning rate of 1×10 3 , the total number of training times is 2000, and the model performance is verified on the test data for 100 rounds each.

[0106] Use lbfgs optimizer for learning, adopt the second-order optimization algorithm, set the initial learning rate to 1, and then automatically determine the step size through search, without manually setting the learning rate. In each iteration, find a step size along the current search direction. α , so that the objective function f ( x + αd ) satisfies the descent condition, the total number of training is 2000, and each 100 rounds are used to verify the model performance on the test data.

[0107] The loss function of the PINN neural network is L, and its calculation formula is as follows:

[0108] L = l d L data + l p L phys + l b L bound (3)

[0109] Where, L data represents the data loss term of the PINN neural network, L phys is the physical loss term, L bound is the efficiency frontier loss term, and l d 、 l p 、 l b are the weights of different items respectively.

[0110] l d 、 l p 、 l b The weight value is given by the parameter training network, and the initial weight is defined as 、 、 , each training will save and update the weight value, the updated weight is ,Will l 1 Bring in the PINN neural network to continue participating in model training.

[0111] The training is iterated multiple times until the PINN neural network model for predicting ocean temperature difference power generation efficiency converges.

[0112] Data loss term of PINN neural network L data Using mean square error, the calculation formula is as follows:

[0113] (4)

[0114] Where N is the number of initial samples, t i Indicates the i The sample point corresponding to each time point, y pre Represents the predicted value obtained after training the PINN neural network model,y data Represents the output sample data at the initial moment, y pre ( t i ) indicates the i The predicted value obtained by training the data of the initial sample time point at the initial moment through the PINN neural network model, y data ( t i ) indicates the i The output sample data of the initial sample time point at the initial moment.

[0115] Physical loss term of PINN neural network L phys is the residual of the physical equation and is calculated as follows:

[0116] (5)

[0117] (6)

[0118] (7)

[0119] Where M is the number of physical constraint sampling points, t j Indicates the j The sampling point corresponding to each time point, f phys The physical equation representing the PINN neural network model, f phys ( t j ) indicates the j The physical equation corresponding to each sampling time point, y pre ( t j ) indicates the j The predicted value of system efficiency corresponding to each sampling time point, R represents the resistance value of the load resistor, P Indicates the accumulator pressure, Indicates the motor angular velocity.

[0120] According to the energy conservation of the accumulator discharge process and Newton's second law, the following formula is obtained:

[0121] (8)

[0122] Where, V 0. P 0 represents the initial volume and initial pressure of nitrogen in the accumulator,Q ( t j ) indicates the j The hydraulic motor inlet flow value corresponding to each sampling time point, represents the adiabatic index of the gas (here nitrogen), represents the effective bulk elastic modulus of the accumulator, Indicates the j The sampling time points corresponding to , J represents the moment of inertia, c represents the damping constant, D Indicates the displacement of the hydraulic motor, k e represents the back electromotive force constant, I ( t j ) indicates the j The current value flowing through the load resistor corresponding to the sampling time point, Indicates the j The sampling time points corresponding to .

[0123] Motor speed n and motor angular velocity in the system and flow Q have the following relationships:

[0124] (9)

[0125] Q=nD(10)

[0126] Therefore, by substituting equations (7), (8), and (10) into equation (6), we can obtain:

[0127] (11)

[0128] in V 0. P 0. 、 、 J 、 c 、 D 、 k e , R are both known and determined values.

[0129] The boundary condition for limiting efficiency is 0< y pre < y max , so the efficiency boundary loss term of the PINN neural network is L bound The calculation formula is as follows:

[0130] (12)

[0131] Where, ReLU is the activation function, which is used to punish values ​​outside the allowed range. ReLU ( y pre ( t i ) - y max ) represents the prediction efficiency of the PINN neural network y pre ( t i ) exceeds the efficiency limit y max , the value is positive, otherwise it is 0. ReLU (- y pre ( t i )) represents the predicted value of the PINN neural network y pre ( t i ) is a negative number, the value is positive, otherwise the value is 0.

[0132] When training the neural network, initial conditions are fitted through supervised learning, while power and efficiency constraints are incorporated into the loss function in an unsupervised manner. The optimization process uses automatic differentiation, such as the Adam or L-BFGS algorithm, until the model converges. The mean squared error (MSE) is used to determine the convergence of the model, as shown in the following formula:

[0133] (13)

[0134] Where, represents the number of samples, y pre represents the predicted output of the sample, y ref Represents the actual reference output of the sample, and the weights are adjusted during the training process to minimize the error between the predicted value and the actual reference value. Figure 3 As shown in Figure 2, when the mean square error (MSE) is less than the set value ε, the model converges and completes training, otherwise the training continues.

[0135] Step 7: Build a test bench for the ocean temperature difference energy power generation system;

[0136] like Figure 4As shown, the test bench includes a power source pump, accumulator, pressure sensor, flow sensor, reversing valve, hydraulic motor, electric motor, rectifier module, and load resistor, all connected in sequence. A torque sensor is installed on the hydraulic motor, a speed sensor is installed on the electric motor, and a current sensor is installed on the load resistor. Compared to the virtual amesim simulation model, the test bench is a real-world, concrete device.

[0137] Step 8: The pressure, motor speed, current flowing through the load resistor, and power generation efficiency of some accumulator discharge processes are collected through the test bench experiment. The collected actual experimental parameters are input into the trained PINN prediction model for fine-tuning to obtain the final prediction model.

[0138] There may be some differences between simulation data and actual experimental data. The PINN prediction model trained with simulation data can be fine-tuned on a small scale using experimental data to improve the accuracy of model prediction.

[0139] Step 9: Input the newly collected test parameters into the PINN prediction model based on ocean temperature difference energy power generation efficiency, and finally obtain the corresponding system prediction efficiency.

[0140] Example 2

[0141] A device for predicting ocean temperature difference energy generation efficiency includes a device platform, and its module connection diagram is as follows: Figure 4 shown.

[0142] The device platform includes a pump, accumulator, pressure sensor, flow sensor, reversing valve, hydraulic motor, motor, rectifier module, and load resistor that are connected in sequence to provide a power source; a torque sensor is set on the hydraulic motor, a speed sensor is set on the motor, and a current sensor is set on the load resistor.

[0143] The pump source provides power to the system. The pressure sensor and flow sensor respectively detect the pressure and flow values ​​of the accumulator in real time. The reversing valve can be used to control the working state of the system. The hydraulic motor converts hydraulic energy into mechanical energy. The torque sensor can measure the change of the output torque of the hydraulic motor. The motor can convert mechanical energy into electrical energy. The speed sensor can detect the real-time speed value of the motor. The rectifier module can convert three-phase AC power into DC power. The load resistor is used to consume the power output by the motor. At the same time, the current sensor can collect the current value flowing through the load resistor.

[0144] The pressure sensor, flow sensor, torque sensor, rotation speed sensor, and current sensor are connected to a computer, and the computer executes the steps in the method of Example 1.

[0145] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.

Claims

1. A method for predicting ocean temperature difference energy generation efficiency, characterized in that: The following steps are involved: Step 1: Build an amesim simulation model of the ocean temperature difference energy power generation system; Step 2: Perform an accumulator discharge experiment to collect the pressure, motor speed, current flowing through the load resistor, and system output power during the accumulator discharge process; Step 3: Input the collected parameters into the PINN neural network model and preprocess it; Step 4: Split the preprocessed dataset into training set, test set, and validation set in proportion; Step 5: Build a preliminary PINN model for predicting ocean temperature difference energy generation efficiency; Step 6: Use the split training set data as the input of the model for training. After multiple training updates, a PINN prediction model for ocean temperature difference energy power generation efficiency is obtained. In step 6, the model is trained. The training process is as follows: First, the divided training set data is introduced into the constructed PINN neural network model. Then, the network weights are initialized, and the learning rate and optimizer are set. The collected time series data and physical parameters are input, and the data-driven loss and physical constraint loss are calculated respectively, and the weighted sum is used to obtain the total loss L. Automatic differentiation is then used for optimization, and the optimized correction value is propagated forward to update the grid weights. Finally, after multiple iterative updates, the PINN neural network model for ocean temperature difference energy generation is output, completing the training. The loss function of the PINN neural network is L, and its calculation formula is as follows: L = λ d L data + λ p L phys + λ b L bound (3) Where, L data represents the data loss term of the PINN neural network, L phys is the physical loss term, L bound is the efficiency frontier loss term, and λ d 、 λ p 、 λ b are the weights of different items respectively; λ d 、 λ p 、 λ b The weight value is given by the parameter training network, and the initial weight is defined as 、 、 , each training will save and update the weight value, the updated weight is ,Will λ 1 Bring in the PINN neural network to continue participating in model training; Repeated training cycles until the PINN neural network model for predicting ocean temperature difference power generation efficiency converges; Step 7: Build a test bench for the ocean temperature difference energy power generation system; Step 8: The pressure, motor speed, current flowing through the load resistor, and power generation efficiency of some accumulator discharge processes are collected through test bench experiments. The collected actual experimental parameters are input into the trained PINN prediction model for fine-tuning to obtain the final prediction model. Step 9: Input the newly collected test parameters into the PINN prediction model based on ocean temperature difference energy power generation efficiency, and finally obtain the corresponding system prediction efficiency.

2. The method for predicting ocean temperature difference energy power generation efficiency according to claim 1, characterized in that: In step 1, a simulation platform of the ocean temperature difference energy generation system amesim is built, which includes a pressure source, an accumulator, a reversing valve, a hydraulic motor, a rotating load, a motor, a rectifier module, a load resistor, a sensor acquisition module, a power acquisition module, and an efficiency acquisition module. The pressure source is used to provide power to the system, the reversing valve is used to control the working state of the system, the hydraulic motor is used to convert hydraulic energy into mechanical energy, the hydraulic motor is connected to a rotating load to receive torque feedback from the motor, the motor is used to convert mechanical energy into electrical energy, the rectifier module is used to convert three-phase alternating current into direct current, and the load resistor is used to consume the power output by the motor; the sensor acquisition module includes a speed sensor, a current sensor, and a pressure sensor, which are used to collect key parameters in real time. During the entire discharge experiment, energy is transferred from the accumulator to the hydraulic motor, the motor, and the load resistor, undergoing the conversion from hydraulic energy to mechanical energy to electrical energy; the power acquisition module is used to collect the input power and output power of the system; the efficiency acquisition module is used to collect the system power generation efficiency y.

3. The method for predicting ocean temperature difference energy power generation efficiency according to claim 1, characterized in that: Step 2 is to use the simulation platform built in step 1 to conduct an accumulator discharge experiment. Ignoring the energy storage process of the motor, the output end of the motor is connected to a load resistor to directly consume the electric energy generated by the motor. A current sensor is connected next to the load resistor to collect the current value flowing through the load resistor. The method for obtaining the input data set of training data is as follows: the volume of the accumulator is determined to be a certain value, an accumulator discharge experiment is performed, and the accumulator pressure P, motor speed n, current I flowing through the load resistor, and system power generation efficiency y are collected through sensors.

4. The method for predicting ocean temperature difference energy power generation efficiency according to claim 1, characterized in that: Step 3 is to combine the data collected in step 2 into a complete data set. The data set contains five columns of data: time, accumulator pressure, motor speed, current flowing through the load resistor, and power generation efficiency. Each column of data except time is filtered and preprocessed separately. At the same time, the data is normalized to the maximum and minimum values ​​so that the data are mapped to the interval [-1, 1]. Moving average filtering is used for filtering to remove high-frequency noise in the data. The formula is as follows: (1) Where x[n] represents the data sequence to be processed, y[n] represents the sequence after moving average filtering, N represents the window size of the moving average, and n represents the index of the data point; The formula for data normalization is as follows: (2) Where: x max Represents the maximum value in the data set to be processed, x min Represents the minimum value in the data set to be processed, x m Represents the normalized data.

5. The method for predicting ocean temperature difference energy generation efficiency according to claim 1, characterized in that: In step 4, the preprocessed dataset is split into training set, test set, and validation set in a ratio of 6:2:

2.

6. The method for predicting ocean temperature difference energy generation efficiency according to claim 1, characterized in that: The preliminary PINN model for predicting ocean thermal energy generation efficiency built in step 5 uses a fully connected multi-layer neural network as a feature code to embed input parameter features and incorporates multiple physical constraints. Among them, the PINN neural network model is built based on Python language; The PINN neural network consists of an input layer, a hidden layer, and an output layer. The activation function of the output layer is sigmoid, which compresses the output to the range of [0,1]. The neural network has two hidden layers, and each hidden layer has 64 neurons. The hidden layer uses a fully connected layer, and its activation function is tanh, which compresses the output to the range of [-1,1].

7. The method for predicting ocean temperature difference energy power generation efficiency according to claim 1, characterized in that: In step 6, two optimizers, adam and lbfgs, are provided for learning during model training. There are two optimizers in the model, and adam is used first during training, followed by lbfgs. The Adam optimizer is used for learning, which is based on the gradient descent optimization algorithm with a learning rate of 1×10 3 , the total number of training times is 2000, and the model performance is verified on the test data for 100 rounds each; Use lbfgs optimizer for learning, adopt the second-order optimization algorithm, set the initial learning rate to 1, and then automatically determine the step size through search, without manually setting the learning rate. In each iteration, find a step size along the current search direction. α , so that the objective function f ( x + αd ) satisfies the descent condition, the total number of training is 2000, and each 100 rounds are used to verify the model performance on the test data.

8. The method for predicting ocean temperature difference energy power generation efficiency according to claim 1, characterized in that: In step 6, Data loss term of PINN neural network L data Using mean square error, the calculation formula is as follows: (4) Where N is the number of initial samples, t i Indicates the i The sample point corresponding to each time point, y pre Represents the predicted value obtained after training the PINN neural network model, y data Represents the output sample data at the initial moment, y pre ( t i ) indicates the i The predicted value obtained by training the data of the initial sample time point at the initial moment through the PINN neural network model, y data ( t i ) indicates the i Output sample data of the initial sample time point at the initial moment; Physical loss term of PINN neural network L phys is the residual of the physical equation and is calculated as follows: (5) (6) (7) Where M is the number of physical constraint sampling points, t j Indicates the j The sampling point corresponding to each time point, f phys Represents the physical equation of the PINN neural network model, f phys ( t j ) indicates the j The physical equation corresponding to each sampling time point, y pre ( t j ) indicates the j The predicted value of system efficiency corresponding to each sampling time point, R represents the resistance value of the load resistor, P Indicates the accumulator pressure, Indicates the motor angular velocity; According to the energy conservation of the accumulator discharge process and Newton's second law, the following formula is obtained: (8) Where, V 0. P 0 represents the initial volume and initial pressure of nitrogen in the accumulator, Q ( t j ) indicates the j The hydraulic motor inlet flow value corresponding to each sampling time point, represents the adiabatic index of the gas, represents the effective bulk elastic modulus of the accumulator, Indicates the j The sampling time points correspond to , J represents the moment of inertia, c represents the damping constant, D Indicates the displacement of the hydraulic motor, k e represents the back electromotive force constant, I ( t j ) indicates the j The current value flowing through the load resistor corresponding to the sampling time point, Indicates the j The sampling time points correspond to ; Motor speed n and motor angular velocity in the system and flow Q have the following relationships: (9) Q=nD(10) Therefore, by substituting equations (7), (8), and (10) into equation (6), we can obtain: (11) in V 0. P 0. 、 、 J 、 c 、 D 、 k e , R are all known and determined values; The boundary condition for limiting efficiency is 0 < y pre < y max , so the efficiency boundary loss term of the PINN neural network is L bound The calculation formula is as follows: (12) Where, ReLU is the activation function, which is used to punish values ​​outside the allowed range. ReLU ( y pre ( t i ) - y max ) represents the prediction efficiency of the PINN neural network y pre ( t i ) exceeds the efficiency limit y max , the value is positive, otherwise it is 0. ReLU (- y pre ( t i )) represents the predicted value of the PINN neural network y pre ( t i ) is a negative number, the value of this item is positive, otherwise the value is 0; When training the neural network, the initial conditions are fitted through supervised learning, while the power and efficiency constraints are incorporated into the loss function in an unsupervised manner. The optimization process uses automatic differentiation, that is, the Adam and L-BFGS algorithms, until the model converges. The mean square error (MSE) is used to judge the convergence of the model. The formula is as follows: (13) Where, represents the number of samples, y pre represents the predicted output of the sample, y ref Represents the actual reference output of the sample, and the weights are adjusted during training to minimize the error between the predicted value and the actual reference value.

9. A device for predicting ocean temperature difference power generation efficiency, characterized in that: The device comprises a device platform, which includes a pump, an accumulator, a pressure sensor, a flow sensor, a reversing valve, a hydraulic motor, an electric motor, a rectifier module, and a load resistor connected in sequence; a torque sensor is provided on the hydraulic motor, a speed sensor is provided on the electric motor, and a current sensor is provided on the load resistor; The pump is used to provide power to the system. The pressure sensor and flow sensor respectively detect the pressure and flow values ​​of the accumulator in real time. The reversing valve is used to control the working state of the system. The hydraulic motor is used to convert hydraulic energy into mechanical energy. The torque sensor is used to measure the change in the output torque of the hydraulic motor. The motor is used to convert mechanical energy into electrical energy. The speed sensor is used to measure the real-time speed value of the motor. The rectifier module is used to convert three-phase AC power into DC power. The load resistor is used to consume the power output by the motor. At the same time, the current sensor is used to collect the current value flowing through the load resistor. The pressure sensor, flow sensor, torque sensor, speed sensor, and current sensor are connected to a computer, and the computer executes the steps of the method for predicting ocean temperature difference energy power generation efficiency according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Hybrid ocean energy multi-energy complementary energy hub and combined regulation and control method

    CN111210080A

  • Wind power generation prediction method integrated with physical knowledge

    CN119358727A

  • Column structure response forecasting method and system based on residual connection neural network

    CN119476058A