Small sample learning output prediction method for underwater universal energy collection based on meta-learning

Through a small sample learning output prediction system based on meta-learning, the parameters that affect the output performance of the underwater universal energy harvesting device are fitted, and the inaccurate output performance prediction problem caused by insufficient sample size in the prior art is solved, and high-accurate output performance monitoring and prediction are achieved.

CN119783466APending Publication Date: 2025-04-08TIANJIN UNIV OF SCI & TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411915788.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

The output performance evaluation and testing methods of existing underwater universal energy harvesting devices are limited in the sample size, resulting in inaccurate prediction of output performance under various operating conditions, and deep learning models are prone to overfitting.

Method used

A small sample learning output prediction system based on meta-learning is adopted, and parameters that affect output performance are fitted through the meta-learning small sample learning algorithm, support sets and query sets are built, and feature extraction networks and dual-branch loss functions are used for training to obtain a prediction model.

Benefits of technology

It realizes reasonable monitoring and prediction of output performance under the guidance of small sample simulation and experimental data, enhances the accuracy of the small sample output prediction method of the underwater universal energy harvesting device, and can effectively perform output early warning and power prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119783466A_ABST
    Figure CN119783466A_ABST
Patent Text Reader

Abstract

The invention provides a small sample learning output prediction method for underwater universal energy collection based on meta-learning, and the method comprises the steps: carrying out the collection of underwater energy through an underwater universal energy collection device, and obtaining the output power at different flow speeds; carrying out analogue simulation to obtain different output powers, forming a training set, and dividing the training set into a support set and a query set; inputting the data samples in the support set and the query set into a feature extraction network to obtain a depth feature representation corresponding to each piece of sample data; a cross entropy loss branch and a comparison loss branch are combined to form a double-branch loss function to train the feature extraction network, and a prediction model is obtained; and performing precision test on the prediction model to obtain a final prediction model. According to the method, the parameters influencing the output performance can be fitted into prediction output through small sample learning of meta-learning, reasonable monitoring of the output performance under the guidance of small sample simulation and experimental data is realized, and prediction and early warning of the output performance under the influence of different factors are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of energy collection, and in particular to an output prediction method for underwater universal energy collection. Background Art

[0002] As an innovative renewable energy technology, the underwater universal energy harvesting device can efficiently utilize the abundant and continuously flowing underwater ocean current energy for energy collection. This technology not only shows great potential in the field of marine energy development, but also indicates that it has broad application prospects in powering remote islands, powering underwater monitoring equipment, and promoting marine scientific research. However, despite its bright prospects, the complexity of the system cannot be ignored. The factors that affect the output of the underwater universal energy harvesting system are numerous and intertwined, and these factors will directly or indirectly have a significant impact on the output performance of the energy harvesting device.

[0003] Specifically, the size of the magnet, as a key component in the device, is directly related to the strength of the magnetic induction intensity, which in turn directly affects the efficiency of energy conversion and the stability of the output. In addition, the size, installation angle and number of the fan blades, as a key part of capturing the power of ocean currents and converting them into mechanical energy, will have an important impact on the angular velocity of rotation. These factors ultimately affect the energy output performance of the entire device through complex physical mechanisms, making the optimization of the device design a very challenging task.

[0004] Currently, the evaluation and testing of the output performance of this energy harvesting device mainly relies on computer simulation and laboratory experiments. Although these methods can simulate and verify the working principle of the device to a certain extent, due to the limitations of experimental conditions, such as the difficulty in replicating the deep-sea environment and the lack of real-time monitoring technology, it is impossible to fully and real-time monitor the internal state and external environmental changes of the device during actual operation. Therefore, the number of test samples collected is limited, and it is difficult to fully reflect the performance of the device under various working conditions.

[0005] What is even more difficult is that when trying to use deep learning networks to train limited data to predict and optimize device performance, the model is very likely to fall into the dilemma of overfitting due to insufficient sample size. Overfitting means that the model performs well on the training data, but cannot accurately predict when faced with new data, which greatly limits the application potential of deep learning technology in improving the performance of underwater universal energy harvesting devices. Therefore, how to effectively expand the test sample set, optimize the deep learning model, and develop more accurate real-time monitoring technology under existing conditions has become the key to promoting this technology towards practical application. Summary of the invention

[0006] In order to solve the technical problem that the output performance evaluation and testing methods of existing energy harvesting devices are limited in sample size and the output performance predictions under various working conditions are inaccurate, the present invention proposes a small sample learning output prediction system for underwater universal energy harvesting based on meta-learning, which can fit the parameters affecting the output performance to the required predicted output through a small sample learning algorithm of meta-learning, realize the reasonable monitoring of the output performance under the guidance of small sample simulation and experimental data, and realize the prediction and early warning of the output performance under the influence of different factors.

[0007] In order to achieve the above object, the technical solution of the present invention is implemented as follows: a small sample learning output prediction method for underwater universal energy collection based on meta-learning, the steps of which are as follows:

[0008] Step 1: Use an underwater universal energy harvesting device to collect underwater energy, obtain the actual coil magnet size and installation configuration parameters of different fan blades, and the output power obtained under different flow rates;

[0009] Step 2: Use finite element simulation to simulate the underwater universal energy harvesting device to obtain different output powers; the data obtained in step 1 and the data obtained in step 2 form a training set, and the training set is divided into a support set and a query set;

[0010] Step 3: Input the data samples in the support set and query set into the feature extraction network to obtain the deep feature representation corresponding to each sample data; train the feature extraction network with a dual-branch loss function composed of the cross entropy loss branch and the contrast loss branch to obtain a prediction model;

[0011] Step 4: Select a set of input parameters and the corresponding output power to test the accuracy of the prediction model. If the test passes, the final prediction model is obtained, otherwise return to step 2.

[0012] Preferably, the underwater universal energy collection device includes a sealed shell, an electric energy collection device is arranged in the sealed shell, at least one fan blade is evenly distributed around the outside of the sealed shell, the rear side of the sealed shell is rotatably connected to the connecting rod, and the upper part of the connecting rod is connected to the underwater environment monitoring device; the connecting rod includes an upper connecting rod, the lower end of the upper connecting rod is connected to the upper end of the middle connecting rod through a 360° rotating axis, the lower end of the middle connecting rod is connected to the upper end of the lower connecting rod through a 180° rotating axis, and the lower end of the lower connecting rod is connected to the rear end of the sealed shell through a rotating shaft.

[0013] Preferably, the 360° rotating shaft is a universal joint, and a rotating joint is provided at the end of the 180° rotating shaft to realize 180° rotation in the horizontal direction; the middle connecting rod is rotated 360° in the horizontal direction to cooperate with the fan blades to face the flow, and the connecting rod rotates automatically to an angle parallel to the direction of the water flow under the impetus of the water flow;

[0014] The installation configuration parameters of the fan blades include the shape and installation angle of the fan blades;

[0015] A speed measurement and position feedback device is provided on the rotating shaft at the rear side of the sealed housing. The speed measurement and position feedback device is a gyroscope, which can detect the rotation speed and position attitude of the sealed housing.

[0016] Preferably, the data collected in the training set include data on flow field influence and magnetic field influence, and the factors affecting the flow field include: blade installation angle, blade size, number of blades, flow velocity, and overall power generation device volume; the factors affecting the magnetic field include: magnet size, number of magnets, magnet thickness, magnet type, coil size, number of coils, coil wire diameter, and number of coil turns; the data on flow field influence and the data on magnetic field influence are classified, and the output power corresponding to each different factor is used as an output parameter to form a training set; the finite element simulation is to simulate conditions that cannot be easily changed under ordinary test conditions to obtain data on the impact on the output power.

[0017] Preferably, the method for dividing the training set into the support set and the query set is: train Randomly select categories from the data, and randomly select a data from each category to build a support set Among them, (x i ,y i ) is the randomly selected i-th sample data, C is the category set, and N is the number of categories; then q samples are randomly selected from each category of the remaining data to construct the query set in, Represents the i-th sample randomly selected from the remaining data.

[0018] Preferably, the sample data in the support set and the query set are input into the backbone network of the feature extraction network to obtain the deep feature representation corresponding to each sample data; the output prediction value of the regression task is obtained through a multi-layer perceptron, and the similarity between the output prediction value and the output power of the sample data is calculated. The feature extraction network is trained by a dual-branch loss function composed of a cross entropy loss branch and a contrast loss branch.

[0019] Preferably, the backbone network is a ResNet-12 network, and a GIE module is embedded in the residual learning branch of the ResNet-12 network; the backbone network includes four linear layers and basic blocks connected in sequence and arranged in parallel, the linear layer performs a linear transformation on the input features through a weight matrix, and the basic block generally includes a convolutional layer, a pooling layer and an activation function for feature extraction;

[0020] The basic block includes three convolutional layers with 3*3 convolution kernels connected in sequence, a GIE module, and a regularization layer. Regularization and ReLu activation functions are set in the three convolutional layers. The output of the first convolutional layer is added to the output of the regularization layer. The added result is processed by the ReLu activation function and then subjected to maximum pooling processing to gradually extract deep feature representation from the original data.

[0021] Preferably, the GIE module includes a two-dimensional discrete Fourier transform and a two-dimensional discrete inverse Fourier transform. The input features are transformed through a two-dimensional discrete Fourier transform and then multiplied with a weight matrix W and then subjected to a two-dimensional discrete inverse Fourier transform. After adjusting the weight matrix W in the frequency domain, the weighted frequency components are converted back to the spatial domain through an inverse Fourier transform, so that the network can better express complex patterns in the spatial domain.

[0022] Preferably, the dual-branch loss function is the cross entropy loss function, is the supervised contrast loss function, λ is the trade-off factor;

[0023] The method for constructing the dual-branch loss function is: Constructing the cross entropy loss function The features of the samples in each support set are averaged as the feature prototype of that class, and the category to which the query set belongs is determined by calculating the distance between the samples in the query set and the feature prototype of each class;

[0024] Construct a supervised contrast loss function: transform the prototype p of each class c As an anchor point to achieve contrastive learning, the multi-layer perceptron projects high-dimensional features into a low-dimensional space. The low-dimensional features are represented as Represents a low-dimensional mapping function; constructs a feature space to bring samples of the same category closer to their corresponding prototypes.

[0025] Preferably, the prototype p of the c-th sample is defined c for

[0026]

[0027] in, To support the c-th sample set in the central cluster, (x i ,y i ) is a randomly selected sample of the support set; f θ () represents the mapping relationship characteristics of different parameters to the output power of the underwater universal energy harvesting device;

[0028] For any query set sample It belongs to the prototype c The probability of the represented category is:

[0029]

[0030] in, is the data sample of the query set, p c′ The prototype of the feature. Represents data samples and prototype p c The cosine similarity of , where N is the number of categories in each meta-task;

[0031] Cross Entropy Loss Function for

[0032]

[0033] The supervised contrast loss function is:

[0034]

[0035] For any anchor point Query Focus and Anchors The samples with the same category are the positive sample set, and the samples with inconsistent categories are the negative sample set; It represents the specific loss function of a certain class or part in the supervised contrast loss function. represents the positive sample set, represents the low-dimensional features after mapping, Any anchor point And the low-dimensional features after mapping The cosine similarity between represents the negative sample set;

[0036] In the pre-training phase of the feature network, the momentum-based SGD optimizer is used to optimize the feature extraction network, and the learning rate decay adopts the cosine function; in the meta-training phase, the episode training mode is adopted. In each episode, from the training set D train We randomly extract categories from the dataset, and then randomly extract k samples from each category as the support set. We then randomly extract q samples from each category from the remaining samples as the query set to form a binary classification task of k samples. We use the momentum-based SGD optimizer, and the learning rate is halved after every 500 iterations.

[0037] By training on the MATLAB platform, the effects of different parameters on the output power can be obtained. Under the guidance of this trained model, the output performance of existing energy harvesting devices can be evaluated and tested, and the design of the device can be guided.

[0038] Compared with the prior art, the invention has the following beneficial effects: using a small sample classification method based on global information embedding, by constructing a global information embedding module (GIE) to learn the interaction relationship between samples at different positions in the frequency domain space, providing spatial attention information for the feature extraction network, it can improve the performance of small sample classification and recognition, enhance the ability of interaction learning in the frequency domain space, thereby increasing the accuracy of the small sample output prediction method of the underwater universal energy collection device; using the small sample learning data obtained in the laboratory to construct a high-precision and high-accuracy model, realize the reasonable monitoring of the output performance under the guidance of small sample simulation and experimental data, and realize the prediction and early warning of the output performance under the influence of different factors. In the application context of actual marine energy collection, the invention can effectively warn the output of the underwater universal energy collection device, and under the marine conditions of a specific sea area, it can predict the energy output power of the sea area, and if the output power difference is too large, it will cause an early warning. At the same time, under certain conditions of specific marine conditions, the internal structural parameters of the marine underwater universal power generation device can be designed according to the required output power. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0040] Figure 1 It is a schematic diagram of the processing flow of the present invention.

[0041] Figure 2 for Figure 1 The framework diagram of the GIE (Global Information Embedding) module network is shown.

[0042] Figure 3 It is a schematic structural diagram of the ocean current universal power generation device of the present invention.

[0043] Figure 4 It is a structural diagram of the backbone network of the present invention.

[0044] Figure 5 This is a result diagram of the finite element simulation of magnets of different sizes according to the present invention.

[0045] Figure 6 Schematic diagram of neural network training loss of the present invention.

[0046] In the figure, 1 is a sealing shell, 2 is a fan blade, 3 is a connecting rod, 31 is a 360° rotating axis, and 32 is a 180° rotating axis. DETAILED DESCRIPTION

[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0048] like Figure 1 As shown, a small sample learning output prediction method for underwater universal energy harvesting based on meta-learning includes the following steps:

[0049] Step 1: Use the underwater universal energy harvesting device to collect underwater energy, obtain the actual coil magnet size and the installation configuration parameters of different fan blades, and obtain different output powers at different flow rates.

[0050] The underwater universal energy collection device is a universal power generation device for ocean currents, which can collect energy from ocean currents at different angles and in different directions. The underwater universal energy collection device includes a sealed shell 1, in which an electric energy collection device is arranged, and at least one fan blade 2 is evenly distributed around the outer side of the sealed shell 1, and the rear side of the sealed shell 1 is rotatably connected to the connecting rod 3, and the upper part of the connecting rod 3 is connected to the buoy, underwater environment monitoring device and other equipment. Among them, the sealed shell 1 is mainly used to protect the electric energy collection device and prevent water from entering. The fan blade 2 is mainly used to drive the sealed shell 1 and the electric energy collection device to rotate under the action of water flow, and convert the kinetic energy of the water flow into the kinetic energy of rotation. The electric energy collection device is mainly used to convert the mechanical energy of the water flow into electrical energy.

[0051] Among them, the shape and installation angle of the fan blade 2 are both variable parameters as inputs of the network. The connecting rod 3 includes an upper connecting rod, the lower end of the upper connecting rod is connected to the upper end of the middle connecting rod through a 360° rotating shaft 31, the lower end of the middle connecting rod is connected to the upper end of the lower connecting rod through a 180° rotating shaft 32, and the lower end of the lower connecting rod is connected to the rear end of the sealed housing 1 through a rotating shaft. Among them, the middle connecting rod is used for 360° rotation in the horizontal direction, and the lower connecting rod is used for arbitrary hemispherical rotation below the middle connecting rod. Among them, the 360° rotating shaft 31 is a universal joint, and the 360° rotating shaft 31 is mainly used to control the underwater universal energy collection device to rotate in the horizontal direction to ensure that the underwater universal energy collection device faces the direction of the water flow. A rotating joint is provided at the end of the 180° rotating shaft 32 to achieve a 180° rotation in the horizontal direction. The middle connecting rod rotates 360° in the horizontal direction to cooperate with the fan blades to face the flow. Under the push of the water flow, the above-mentioned rotatable connecting rod rotates automatically to an angle parallel to the direction of the water flow, so that the two-degree-of-freedom connecting rod 3 can ensure that the fan blades always face the direction of the water flow.

[0052] The ocean current universal power generation device can be hung in any ocean environment through the connecting rod 3, and can also be hung under ocean detection devices such as buoys that require energy to collect ocean current energy.

[0053] A speed and posture feedback device is provided on the rotating shaft at the rear side of the sealed housing 1. The speed and posture feedback device is a gyroscope, which can detect the rotation speed and position of the sealed housing 1. By connecting the power output by the power generation device to the detection device, the output of the sphere can be self-powered, and no external power supply is required to ensure the sustainability of the equipment. At the same time, the rotation speed and posture are transmitted to the host computer through the data line.

[0054] The electric energy collection device adopts an eccentric pendulum power generation module with application publication number CN202310029667.3. There is a magnet on the eccentric pendulum and a coil under the eccentric pendulum. The size changes of the magnet on the eccentric pendulum and the coil in the disk are all based on this to change the physical properties. The ocean current universal power generation device can drive the rotation of the entire spherical shell through the fan blades 2 to unbalance the gravity of the eccentric pendulum, thereby cutting the magnetic flux lines to generate energy, and the rotation speed generated by different flow rates will affect the size of the energy output. However, due to the underwater application background of the device, the spherical shell cannot be disassembled at will, and theoretical guidance is required to cope with the design in different application scenarios, so a neural network is used for predictive output.

[0055] Step 2: Use finite element simulation to simulate the conditions that cannot be easily changed in the test environment to obtain different output powers; combine the data obtained in step 1 and the data obtained in step 2 into a training set, and divide the training set into a support set and a query set.

[0056] The collected data includes two categories (K), namely, data on flow field influence and magnetic field influence. The factors affecting the flow field are: blade installation angle, blade size, number of blades, flow velocity, and overall power generation device volume (affecting the moment of inertia). The factors affecting the magnetic field are: magnet size, number of magnets, magnet thickness, magnet type, coil size, number of coils, coil wire diameter, and number of coil turns. By classifying the flow field and magnetic field, the output power corresponding to each different factor is used as the output parameter to form the training set. Figure 4 The graph is obtained through finite element simulation by changing the size of the magnet under the same motion state, that is, the data on the effect of magnet size on output is obtained.

[0057] The training set is mainly obtained through two aspects: 1. actual experiment, 2. finite element simulation. The specific method is: in the actual experiment, the underwater universal energy collection device in step 1 is used to test the influencing parameters that can be obtained under the existing conditions to obtain their influence on the output power. At the same time, the conditions that cannot be easily changed under ordinary test conditions (such as flow field, number of fan blades, etc.) are simulated by finite element simulation to obtain the influence on the output power. The above-obtained parameters are used to generate two categories of training sets D train Then, from the training set D train Randomly select these two categories and randomly select a data from each category to build a support set Among them, (x i ,y i ) is the randomly selected i-th sample data, C is the category set, and N is the number of categories. Then q samples are randomly selected from each category from the remaining data to construct the query set in, Represents the i-th sample randomly selected from the remaining data.

[0058] Step 3: Input the data samples in the support set and query set into the feature extraction network to obtain the deep feature representation corresponding to each sample data; train the feature extraction network and multi-perceptron using a dual-branch loss function composed of the cross entropy loss branch and the contrast loss branch to obtain a prediction model.

[0059] The learning process can be divided into two stages: meta-training and meta-testing. For the N-way k-shot small sample classification task, i.e., a two-class classification task, k data are randomly selected from each category as the data set. The learning process of the learning framework in the meta-training stage is as follows: First, from the training set D train Randomly select N categories and randomly select k data from each category to build a support set Then randomly select q samples from each category from the remaining data to construct the query set Secondly, the sample data in the support set and query set are input into the backbone network f of the feature extraction network θ , and obtain the deep feature representation corresponding to each sample data. Finally, considering the stability and effectiveness of cross entropy loss on small batch data, and the superior performance of contrastive learning in feature learning, a dual-branch loss function building module is formed by combining the cross entropy loss branch and the contrastive loss branch.

[0060] Feature extraction network: Existing small sample learning methods usually use ResNet-12 as the backbone network to extract features from input samples to obtain deep embedded features. The present invention embeds the GIE framework in the backbone network and embeds the GIE module in its residual learning branch to construct a new backbone network GI-ResNet12, which can simultaneously learn the local structure and global relationship of the input samples. The backbone network adds the GIE module to the traditional ResNet-12 network, and the structure is as follows: Figure 6 The backbone network includes four linear layers and basic blocks connected in sequence in parallel. The linear layer is usually used for feature transformation and mapping. Its main function is to transform the input features linearly through the weight matrix to form output features. The basic block usually refers to the basic component unit of the network, which usually includes convolutional layers, pooling layers and activation functions, and is the core component for feature extraction.

[0061] The basic block is implemented as follows: including three convolutional layers with 3*3 convolution kernels connected in sequence, GIE modules, and regularization layers. The main function of the GIE module is to enhance global information so that the network can better capture the global context information of the input data; the main function of the regularization layer is to help accelerate training, avoid overfitting, and make the model more stable by normalizing the activation values. Regularization and ReLu activation functions are set in the convolutional layers. The role of regularization in the convolutional layer is mainly to help accelerate training and improve the performance of the model by standardizing the output of the neural network; the ReLU activation function enables the network to learn more complex patterns by providing nonlinear transformations, and accelerates training by avoiding gradient disappearance. The output of the first convolutional layer is added to the output of the regularization layer to improve the stability of training, accelerate the convergence process of the network, solve the problem of gradient disappearance, enhance the network's expression ability, improve generalization ability, and make the deep network more efficient and robust. The summed result is processed by the ReLu activation function and then processed by the maximum pooling. The ReLu activation function enables the network to learn complex nonlinear patterns, avoid gradient disappearance, and accelerate convergence. The maximum pooling process reduces the spatial dimension, enhances the ability to abstract features, improves the robustness of the model to transformations, and improves computational efficiency. Through these processes, the backbone network can gradually extract deep feature representations from the raw data, and these deep features can reflect the high-level semantic information of the input data.

[0062] like Figure 2As shown in the figure, the GIE module includes a two-dimensional discrete Fourier transform and a two-dimensional discrete inverse Fourier transform. The input feature F is transformed by a two-dimensional discrete Fourier transform and then multiplied by the weight matrix W, and then a two-dimensional discrete inverse Fourier transform is performed. After adjusting the weight matrix W in the frequency domain, the weighted frequency components are converted back to the spatial domain through the inverse Fourier transform, which allows the network to better express complex patterns in the spatial domain. By enhancing global information, the network can learn more recognizable and expressive features.

[0063] Through experimental and simulation methods, the mapping relationship between different parameters and the output power of the power generation device is obtained. The output prediction value of the regression task is obtained through the multi-layer perception mechanism; the similarity between two feature vectors is calculated using methods such as cosine similarity, Euclidean distance, and Manhattan distance.

[0064] Construction of the two-branch loss function: First, construct the cross entropy loss function. Take the average of the features of each class of support set samples as the feature prototype of that class, and determine the class to which the query set belongs by calculating the distance between the query set samples and each class of feature prototypes. Define the prototype p of the cth class sample c for

[0065]

[0066] in, To support the c-th sample set in the central cluster, (x i ,y i ) is a random sample of the support set. θ () represents the mapping relationship characteristics of different parameters to the output power of the power generation device.

[0067] For any query set sample It belongs to the prototype c The probability of the represented category is:

[0068]

[0069] in, is the data sample of the query set, p c′ The prototype of the feature. Represents data samples and prototype p c The cosine similarity of , N is the number of categories in each meta-task.

[0070] Defining cross entropy loss for

[0071]

[0072] Then, a supervised contrast loss function is constructed: the present invention converts the prototype p of each class into cAs an anchor point to achieve contrastive learning. Multilayer perceptron is used as a projection operator to project high-dimensional features into low-dimensional space. The low-dimensional features are represented as Represents a low-dimensional mapping function. Construct a feature space of the science department to bring samples of the same category closer to their corresponding prototypes. The supervised contrast loss is:

[0073]

[0074] For any anchor point It is stipulated that the samples in the query set that are consistent with their categories are the positive sample set, and the samples that are inconsistent are the negative sample set. It represents the specific loss of a certain class or part in the supervised contrast loss function. represents the positive sample set, represents the low-dimensional features after mapping, Any anchor point And the low-dimensional features after mapping The cosine similarity between Represents the set of negative samples.

[0075] The cross entropy loss and the supervised loss are linearly combined to obtain the loss function: is the cross entropy loss, is the supervised contrast loss and λ is the trade-off factor.

[0076] The pseudo code for the feature extraction step is:

[0077] Input: training set D train ={D1…D μ …D n}, where D = {S, Q} is a meta-task consisting of a support set and a query set. μ Represents any training set from 1 to n, where n is the number of tasks in the entire training set.

[0078] Output: Loss

[0079]

[0080] Among them, Xn represents different parameters that affect the output power of the device, which are obtained by simulation. θ (X) represents the mapping relationship characteristics of different parameters to the output power of the power generation device, which is obtained through simulation and experimental methods.

[0081] The network is trained using a two-stage training strategy of pre-training and meta-training. In the pre-training stage, the backbone network is pre-trained on a large-scale training set obtained through simulation and experiments, which can accelerate the training process and improve the model performance, especially on small data sets, to avoid overfitting problems and provide transfer learning capabilities. The network is optimized using a momentum-based SGD optimizer, where the momentum parameter is 0.9 and the weight decay coefficient is 5×10 -4 , the initial learning rate is 0.1, and the learning rate decay uses a cosine function, which can smoothly reduce the learning rate and avoid instability. Improve the convergence performance of training and help the network reach a better optimal solution. Reduce parameter oscillation and improve stability. Avoid local minimum values ​​and improve model effects; enhance the generalization ability of the model and reduce the risk of overfitting. In the meta-training stage, the episode training mode 50 is used. In each episode, from the training set D train The class is randomly selected from the training set, and then k samples are randomly selected from each class as the support set, and q samples are randomly selected from each class as the query set, forming a binary classification k-sample task. The network uses momentum-based SGD as the optimizer, with an initial learning rate of 0.001, and the learning rate is halved after every 500 iterations.

[0082] By training on the MATLAB platform, the effects of different parameters on the output power can be obtained. Under the guidance of this trained model, the output performance of existing energy harvesting devices can be evaluated and tested, and the design of the device can be guided.

[0083] Step 4: Select a set of input parameters and the corresponding output power to test the accuracy of the prediction model. If the test passes, the final prediction model is obtained, otherwise return to step 2.

[0084] After obtaining the specific prediction model, a set of input parameters and the corresponding output power are randomly obtained in the experiment, and the input parameters and output power are used as input and output respectively to test the accuracy of the trained model. Repeat the above steps, complete the training process when the accuracy is sufficient, and use the model as the final model at the output upper end of the universal power generation device to evaluate the output.

[0085] The model is applied in reverse, and the required output power is input to fit and calculate the device parameter size that can achieve this output power, which is used to guide the design of the device.

[0086] Training is performed through the MATLAB platform, such as Figure 5 As shown, it is shown that the model converges after 500 iterations.

[0087] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A small sample learning output prediction method for underwater universal energy harvesting based on meta-learning, characterized in that: The steps are as follows: Step 1: Use an underwater universal energy harvesting device to collect underwater energy, obtain the actual coil magnet size and installation configuration parameters of different fan blades, and the output power obtained under different flow rates; Step 2: Use finite element simulation to simulate the underwater universal energy harvesting device to obtain different output powers; the data obtained in step 1 and the data obtained in step 2 form a training set, and the training set is divided into a support set and a query set; Step 3: Input the data samples in the support set and query set into the feature extraction network to obtain the deep feature representation corresponding to each sample data; The feature extraction network is trained by combining the cross entropy loss branch and the contrast loss branch to obtain a prediction model. Step 4: Select a set of input parameters and the corresponding output power to test the accuracy of the prediction model. If the test passes, the final prediction model is obtained, otherwise return to step 2.

2. The small sample learning output prediction method for underwater universal energy collection based on meta-learning according to claim 1 is characterized in that: The underwater universal energy collection device comprises a sealed shell (1), an electric energy collection device is arranged inside the sealed shell (1), at least one fan blade (2) is evenly distributed around the outer side of the sealed shell (1), the rear side of the sealed shell (1) is rotatably connected to a connecting rod (3), and the upper part of the connecting rod (3) is connected to an underwater environment monitoring device; the connecting rod (3) comprises an upper connecting rod, the lower end of the upper connecting rod is connected to the upper end of a middle connecting rod via a 360° rotating shaft (31), the lower end of the middle connecting rod is connected to the upper end of a lower connecting rod via a 180° rotating shaft (32), and the lower end of the lower connecting rod is connected to the rear end of the sealed shell (1) via a rotating shaft.

3. The small sample learning output prediction method for underwater universal energy collection based on meta-learning according to claim 2 is characterized in that: The 360° rotating shaft (31) is a universal joint, and a rotating joint is provided at the end of the 180° rotating shaft (32) to achieve 180° rotation in the horizontal direction; the middle connecting rod is rotated 360° in the horizontal direction to cooperate with the fan blades to face the flow, and the fan blades rotate to an angle parallel to the direction of the water flow through the rotating connecting rod under the impetus of the water flow; The installation configuration parameters of the fan blades include the shape and installation angle of the fan blades; A speed measurement and position feedback device is provided on the rotating shaft at the rear side of the sealed housing (1); the speed measurement and position feedback device is a gyroscope and can detect the rotation speed and position and position of the sealed housing (1).

4. The small sample learning output prediction method for underwater universal energy collection based on meta-learning according to any one of claims 1 to 3, characterized in that: The data collected in the training set include data on flow field influence and magnetic field influence, and the factors affecting the flow field include: fan blade installation angle, fan blade size, number of fan blades, flow velocity, and overall power generation device volume; the factors affecting the magnetic field include: magnet size, number of magnets, magnet thickness, magnet type, coil size, number of coils, coil wire diameter, and number of coil turns; by classifying the data on flow field influence and the data on magnetic field influence, the output power corresponding to each different factor is used as the output parameter to form a training set; the finite element simulation is to simulate the conditions that cannot be easily changed under ordinary test conditions to obtain data on the impact on the output power.

5. The small sample learning output prediction method for underwater universal energy collection based on meta-learning according to claim 4 is characterized in that: The method of dividing the training set into the support set and the query set is: train Randomly select categories from the data, and randomly select a data from each category to build a support set Among them, (x i ,y i ) is the randomly selected i-th sample data, C is the category set, and N is the number of categories; then q samples are randomly selected from each category of the remaining data to construct the query set in, Represents the i-th sample randomly selected from the remaining data.

6. The small sample learning output prediction method for underwater universal energy collection based on meta-learning according to claim 5 is characterized in that: Input the sample data in the support set and query set into the backbone network of the feature extraction network to obtain the deep feature representation corresponding to each sample data; The output prediction value of the regression task is obtained through a multi-layer perceptron, and the similarity between the output prediction value and the output power of the sample data is calculated. The feature extraction network is trained by a dual-branch loss function composed of a cross entropy loss branch and a contrast loss branch.

7. The small sample learning output prediction method for underwater universal energy collection based on meta-learning according to claim 6 is characterized in that: The backbone network is a ResNet-12 network, and a GIE module is embedded in the residual learning branch of the ResNet-12 network; the backbone network includes four linear layers and basic blocks connected in sequence in a parallel arrangement, the linear layer performs a linear transformation on the input features through a weight matrix, and the basic block generally includes a convolutional layer, a pooling layer and an activation function for feature extraction; The basic block includes three convolutional layers with 3*3 convolution kernels connected in sequence, a GIE module, and a regularization layer. Regularization and ReLu activation functions are set in the three convolutional layers. The output of the first convolutional layer is added to the output of the regularization layer. The added result is processed by the ReLu activation function and then subjected to maximum pooling processing to gradually extract deep feature representation from the original data.

8. The small sample learning output prediction method for underwater universal energy collection based on meta-learning according to claim 7 is characterized in that: The GIE module includes a two-dimensional discrete Fourier transform and a two-dimensional discrete inverse Fourier transform. The input features are transformed by two-dimensional discrete Fourier transform and then multiplied by the weight matrix W and then subjected to a two-dimensional discrete inverse Fourier transform. After adjusting the weight matrix W in the frequency domain, the weighted frequency components are converted back to the spatial domain through an inverse Fourier transform, so that the network can better express complex patterns in the spatial domain.

9. The small sample learning output prediction method for underwater universal energy collection based on meta-learning according to any one of claims 6 to 8, characterized in that: The dual-branch loss function in, is the cross entropy loss function, is the supervised contrast loss function, λ is the trade-off factor; The method for constructing the dual-branch loss function is: Constructing the cross entropy loss function The features of the samples in each support set are averaged as the feature prototype of that class, and the category to which the query set belongs is determined by calculating the distance between the samples in the query set and the feature prototype of each class; Construct a supervised contrast loss function: transform the prototype p of each class c As an anchor point to achieve contrastive learning, the multi-layer perceptron projects high-dimensional features into a low-dimensional space. The low-dimensional features are represented as Represents a low-dimensional mapping function; constructs a feature space to bring samples of the same category closer to their corresponding prototypes.

10. The small sample learning output prediction method for underwater universal energy collection based on meta-learning according to claim 9 is characterized in that: Define the prototype p of the c-th sample c for in, To support the c-th sample set in the central cluster, (x i ,y i ) is a randomly selected sample of the support set; f θ () represents the mapping relationship characteristics of different parameters to the output power of the underwater universal energy harvesting device; For any query set sample It belongs to the prototype c The probability of the represented category is: in, is the data sample of the query set, p c′ The prototype of the feature; Represents data samples and prototype p c The cosine similarity of , where N is the number of categories in each meta-task; Cross Entropy Loss Function for The supervised contrast loss function is: For any anchor point Query Focus and Anchors The samples with the same category are the positive sample set, and the samples with inconsistent categories are the negative sample set; It represents the specific loss function of a certain class or part in the supervised contrast loss function. represents the positive sample set, represents the low-dimensional features after mapping, Any anchor point And the low-dimensional features after mapping The cosine similarity between represents the negative sample set; In the pre-training stage of the feature network, the momentum-based SGD optimizer is used to optimize the feature extraction network, and the learning rate decay adopts the cosine function; in the meta-training stage, the episode training mode is adopted; in each episode, from the training set D train Randomly extract categories from the training set, then randomly extract k samples from each category as the support set, and then randomly extract q samples from each category as the query set from the remaining samples to form a binary classification k-sample task. The momentum-based SGD optimizer is used, and the learning rate is halved after every 500 iterations. By training on the MATLAB platform, the effects of different parameters on the output power can be obtained. Under the guidance of this trained model, the output performance of existing energy harvesting devices can be evaluated and tested, and the design of the device can be guided.

Citation Information

Patent Citations

  • Spherical eccentric multidirectional energy collecting device

    CN116169849A