Method, device and equipment for mode switching of variable optothermal integrated carnot cell and storage medium
By constructing a Transformer-LSTM deep learning prediction model, the instability of the solar thermal system caused by the fluctuation of solar radiation was solved, and high-precision prediction of solar radiation intensity and dynamic mode switching were achieved, thereby improving the stability and energy utilization efficiency of the solar thermal system.
Patent Information
- Application Number
- CN202511386671.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-26
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2045-09-26
AI Technical Summary
The fluctuation of solar radiation leads to unstable output of solar thermal systems. Existing technologies cannot effectively cope with the random fluctuations of solar radiation, resulting in frequent erroneous or delayed switching of the system, mismatch between the heat storage medium and the working fluid, imbalance between compressor power consumption and expander output, and failure to fully utilize the cascade heat.
A Transformer-LSTM deep learning prediction model is used to preprocess solar radiation intensity, meteorological data, and geographical data. A mode switching method for variable photothermal integrated Carnot cells is constructed. The model is trained through feature encoder, position encoder, multi-head self-attention mechanism, LSTM feature enhancement module and fully connected prediction layer to achieve high-precision prediction of solar radiation intensity. The energy storage-release link of the medium-low temperature or high temperature cycling unit is dynamically switched according to the predicted value.
It achieves high-precision prediction of solar radiation fluctuations, with stable and adjustable system output, realizing optimal allocation of solar thermal resources and maximizing system efficiency, reducing output power fluctuations, and improving system flexibility and energy utilization efficiency.
Smart Images

Figure CN120879690B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of photo-thermal energy storage, in particular to a mode switching method and device of a variable photo-thermal integrated Carnot cell, equipment and a storage medium. BACKGROUND
[0002] Solar thermal power generation is expected to undertake the tasks of grid peak shaving and long-period energy storage, but its output is directly affected by the intermittency and volatility of solar radiation. In order to provide stable and controllable electric energy in complex scenarios of different irradiance, day and night alternation and variable load demand, it is urgent to develop a photo-thermal integrated system that can dynamically adjust the operation mode according to real-time and predicted irradiance information, and realize energy cascade storage and efficient conversion.
[0003] The existing method generally adopts the "Carnot cell" approach, which arranges three sets of compression-expansion cycles of low temperature, medium temperature and high temperature in parallel or series, and controls the flow direction of valves, compressors and heat storage medium with fixed thresholds or simple rules: when the measured irradiance is higher than the set upper limit, the high-temperature cycle is switched in, and the excess solar energy is converted into high-pressure steam and molten salt sensible heat; when the measured irradiance is lower than the set lower limit, the medium and low-temperature cycles are returned, and the heat storage / release energy is realized by using the sensible heat of heat transfer oil and the electrically driven compressor; the switching logic of the whole set is fixed in the controller by the experience of the operating personnel or the basic PID algorithm.
[0004] Due to the random fluctuation of solar radiation being much faster than the response speed of fixed thresholds or simple rules, the system is frequently mis-switched or delayed, the heat storage medium and working medium are not matched in temperature and pressure, the compressor power consumption and expander output are unbalanced, and the cascade heat cannot be fully utilized, resulting in a large fluctuation of output power. Therefore, the fluctuation of solar radiation leading to unstable output of the photo-thermal system becomes a problem to be solved.
[0005] The above content is only used to assist in understanding the technical solutions of the present application, and does not mean that the above content is prior art. SUMMARY
[0006] The present application aims to provide a mode switching method, device, equipment and storage medium of a variable photo-thermal integrated Carnot cell, which aims to solve the technical problem of unstable output of the photo-thermal system caused by the fluctuation of solar radiation.
[0007] To achieve the above-mentioned purpose, the present application provides a mode switching method of a variable photo-thermal integrated Carnot cell, which comprises:
[0008] The historical data and the to-be-predicted data containing solar radiation intensity, meteorological data, geographical data and equipment operation data are preprocessed to obtain historical fusion feature data and to-be-predicted fusion feature data;
[0009] The Transformer-LSTM deep learning prediction model is constructed according to a feature encoder module, a position encoding module, a multi-head self-attention mechanism module, a feedforward network, an LSTM feature enhancement module and a fully connected prediction layer.
[0010] The Transformer-LSTM deep learning prediction model is trained according to the historical fusion feature data, and a target prediction model is obtained.
[0011] The target prediction model is used to process the to-be-predicted fusion feature data, and a solar radiation intensity prediction value is obtained.
[0012] When the solar radiation intensity prediction value belongs to a first preset intensity level, an energy storage-energy release link of a low-temperature cycle unit is started.
[0013] When the solar radiation intensity prediction value belongs to a second preset intensity level, an energy storage-energy release link of a high-temperature cycle unit is started, and mode switching is completed.
[0014] In an embodiment, the step of constructing the Transformer-LSTM deep learning prediction model according to the feature encoder module, the position encoding module, the multi-head self-attention mechanism module, the feedforward network, the LSTM feature enhancement module and the fully connected prediction layer comprises:
[0015] A model framework is initialized, and input dimensions and output dimensions are defined.
[0016] A feature encoder module is added to the model framework, and a linear transformation layer is configured in the feature encoder module to match the input dimensions.
[0017] A position encoding module is added at an output end of the feature encoder module, and the position encoding module generates time position markers through a sine and cosine function.
[0018] A Transformer encoder layer is constructed at an output end of the position encoding module, and the Transformer encoder layer comprises a multi-head self-attention mechanism module and a feedforward network.
[0019] An LSTM feature enhancement module is added at an output end of the Transformer encoder layer, and the LSTM feature enhancement module is configured as a long short-term memory network.
[0020] A fully connected prediction layer is added at an output end of the LSTM feature enhancement module, and the number of output neurons in the fully connected prediction layer is set to match the output dimensions.
[0021] The feature encoder module, the position encoding module, the Transformer encoder layer, the LSTM feature enhancement module and the fully connected prediction layer are connected in series through a residual connection and a layer normalization operation to obtain a Transformer-LSTM deep learning prediction model.
[0022] In an embodiment, the target prediction model comprises a feature encoder module, a position encoding module, a multi-head self-attention mechanism module, a feedforward network, an LSTM feature enhancement module and a fully connected prediction layer.
[0023] The step of processing the to-be-predicted fusion feature data through the target prediction model to obtain a solar radiation intensity prediction value comprises:
[0024] The to-be-predicted fusion feature data is linearly transformed through the feature encoder module to obtain dimension-aligned features.
[0025] The dimension-aligned features are added with sine-cosine position markers through the position encoding module to obtain position encoding features.
[0026] The cross-variable dependency relationship of the position encoding features is extracted through the multi-head self-attention mechanism module to obtain global dependency features.
[0027] The global dependency features are non-linearly mapped through the feedforward network to obtain enhanced features.
[0028] The time-series fluctuation law of the enhanced features is captured through the LSTM feature enhancement module to obtain short-term fluctuation features.
[0029] The short-term fluctuation features are mapped into solar radiation intensity prediction values through the fully connected prediction layer.
[0030] In an embodiment, the step of adding sine-cosine position markers to the dimension-aligned features through the position encoding module to obtain position encoding features comprises:
[0031] A position index is generated based on the timestamp of the to-be-predicted fusion feature data.
[0032] According to the position index, a sine component and a cosine component are calculated through a sine function and a cosine function.
[0033] The sine component and the cosine component are spliced into a position embedding vector.
[0034] The position embedding vector is added to the dimension-aligned features through the position encoding module to obtain position encoding features.
[0035] In an embodiment, the step of extracting the cross-variable dependency relationship of the position encoding feature through the multi-head self-attention mechanism module includes:
[0036] mapping the position encoding feature into a query vector, a key vector and a value vector through the multi-head self-attention mechanism module;
[0037] calculating a scaled dot-product attention weight based on a dot product operation of the query vector and the key vector, in combination with a dimension of the key vector;
[0038] performing weighted summation on the value vector based on the scaled dot-product attention weight, to obtain a weighted feature of each attention head in the multi-head self-attention mechanism module;
[0039] concatenating the weighted features of all the attention heads to obtain a concatenation result;
[0040] performing linear mapping on the concatenation result to obtain a global dependency feature.
[0041] In an embodiment, the step of training the Transformer-LSTM deep learning prediction model according to the historical fusion feature data to obtain a target prediction model includes:
[0042] dividing the historical fusion feature data into a training set and a validation set;
[0043] processing the training set through a sliding window mechanism to obtain an input sequence and a prediction target sequence;
[0044] inputting the input sequence into the Transformer-LSTM deep learning prediction model to obtain a prediction result;
[0045] calculating a mean squared error loss between the prediction result and the prediction target sequence;
[0046] updating parameters of the Transformer-LSTM deep learning prediction model through an adaptive moment estimation algorithm according to the mean squared error loss;
[0047] calculating the mean squared error loss using the validation set to obtain a validation loss;
[0048] when the validation loss does not satisfy a preset condition, returning to the step of inputting the input sequence into the Transformer-LSTM deep learning prediction model to obtain a prediction result, until the validation loss satisfies the preset condition to obtain a target prediction model.
[0049] In an embodiment, the step of preprocessing the historical data and the to-be-predicted data comprising solar radiation intensity, meteorological data, geographical data and equipment operation data to obtain historical fusion feature data and to-be-predicted fusion feature data comprises:
[0050] respectively performing anomaly detection and spatial interpolation processing on the historical data and the to-be-predicted data comprising solar radiation intensity, meteorological data, geographical data and equipment operation data to obtain historical continuous feature data and to-be-predicted continuous feature data;
[0051] normalizing the historical continuous feature data and the to-be-predicted continuous feature data to obtain historical normalized features and to-be-predicted normalized features;
[0052] calculating the Pearson correlation coefficients of the historical normalized features and the to-be-predicted normalized features and the solar radiation intensity to obtain historical feature weight factors and to-be-predicted feature weight factors;
[0053] selecting the normalized features according to the historical feature weight factors, the to-be-predicted feature weight factors and a preset weight threshold to form a historical high-weight feature subset and a to-be-predicted high-weight feature subset;
[0054] splicing the historical high-weight feature subset and the to-be-predicted high-weight feature subset into a three-dimensional tensor according to time steps to obtain historical fusion feature data and to-be-predicted fusion feature data.
[0055] In addition, to achieve the above-mentioned purpose, the application also proposes a mode switching device of a variable photothermal integrated Carnot cell, the device comprises:
[0056] a preprocessing module configured to preprocess historical data and to-be-predicted data comprising solar radiation intensity, meteorological data, geographical data and equipment operation data to obtain historical fusion feature data and to-be-predicted fusion feature data;
[0057] a model construction module configured to construct a Transformer-LSTM deep learning prediction model according to a feature encoder module, a position encoding module, a multi-head self-attention mechanism module, a feedforward network, an LSTM feature enhancement module and a fully connected prediction layer;
[0058] a model training module configured to train the Transformer-LSTM deep learning prediction model according to the historical fusion feature data to obtain a target prediction model;
[0059] a prediction module configured to process the to-be-predicted fusion feature data by the target prediction model to obtain a solar radiation intensity prediction value;
[0060] a low-temperature mode module, configured to start the energy storage and release link of the low-temperature cycle unit when the predicted value of the solar radiation intensity belongs to the first preset intensity level;
[0061] a high-temperature mode module, configured to start the energy storage and release link of the high-temperature cycle unit when the predicted value of the solar radiation intensity belongs to the second preset intensity level, to complete the mode switching.
[0062] In addition, to achieve the above-mentioned purpose, the present application further provides a mode switching device of a variable opto-thermal integrated Carnot cell, which comprises a memory, a processor and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the mode switching method of the variable opto-thermal integrated Carnot cell as described above.
[0063] In addition, to achieve the above-mentioned purpose, the present application further provides a storage medium, which is a computer readable storage medium, and the storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the mode switching method of the variable opto-thermal integrated Carnot cell as described above.
[0064] In addition, to achieve the above-mentioned purpose, the present application further provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the steps of the mode switching method of the variable opto-thermal integrated Carnot cell as described above.
[0065] The one or more technical solutions provided by the present application have at least the following technical effects:
[0066] The variable photo-thermal integrated Carnot cell system first preprocesses historical and to-be-predicted radiation, meteorological, geographical, and equipment data to form high signal-to-noise ratio historical fusion features and to-be-predicted fusion features, so that the subsequent model input is cleaner and more focused; then a Transformer-LSTM target prediction model is constructed and trained by using a feature encoder, a position encoding, a multi-head self-attention, a feedforward network, an LSTM enhancement module, and a full connection layer, end-to-end learning is completed by using the historical fusion features, the model has high-precision prediction capability for future radiation intensity after converging on the validation set; then the target prediction model is used to process real-time to-be-predicted fusion features to obtain a solar radiation intensity prediction value; when the prediction value falls into a first preset intensity level, the system immediately starts the energy storage-energy release link of the low-medium temperature circulating unit, and the heat conducting oil is heated and stored by using the surplus electricity and low-medium temperature solar energy during the day, and the expansion machine is driven to generate electricity at night; when the prediction value falls into a second preset intensity level, the system switches to the high temperature circulating unit, and the high pressure steam heat is stored in the molten salt during the day, and the expansion machine is driven by the reheated steam at night to realize efficient energy storage and release; through the closed loop of prediction-decision-execution, the output uncertainty caused by the fluctuation of solar radiation is converted into stable and adjustable electric energy output, and the optimal allocation of photo-thermal resources and the maximization of system efficiency are realized. BRIEF DESCRIPTION OF DRAWINGS
[0067] The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the application.
[0068] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings required to be used in the embodiments or prior art description will be briefly introduced. Obviously, those skilled in the art can obtain other drawings according to these drawings without any creative effort.
[0069] Figure 1 A flowchart is provided for the mode switching method of the variable photo-thermal integrated Carnot cell of Embodiment One of the present application.
[0070] Figure 2 A framework diagram of a Transformer-LSTM deep learning prediction model is provided for the mode switching method of the variable photo-thermal integrated Carnot cell of Embodiment One of the present application.
[0071] Figure 3 A structure diagram of a variable photo-thermal integrated Carnot cell system is provided for the mode switching method of the variable photo-thermal integrated Carnot cell of Embodiment One of the present application.
[0072] Figure 4 A flowchart is provided for the mode switching method of the variable photo-thermal integrated Carnot cell of Embodiment Two of the present application.
[0073] Figure 5 A module structure schematic diagram of a mode switching device of a variable optothermal integrated Carnot cell according to an embodiment of the present application;
[0074] Figure 6 A device structure schematic diagram of a hardware running environment involved in a mode switching method of a variable optothermal integrated Carnot cell according to an embodiment of the present application.
[0075] Explanation of reference numerals:
[0076] 1, low temperature evaporator; 2, compressor I; 3, heat exchanger I; 4, throttle valve I; 5, three-way valve I; 6, medium temperature evaporator; 7, three-way valve II; 8, compressor II; 9, heat exchanger II; 10, throttle valve II; 11, medium temperature storage tank; 12, valve I; 13, heat exchanger III; 14, low temperature storage tank I; 15, valve II; 16, expander I; 17, regenerator; 18, cooler; 19, pump; 20, PTC heat collector; 21, compressor III; 22, heat exchanger IV; 23, high pressure storage tank; 24, valve III; 25, heat exchanger V; 26, expander II; 27, valve IV; 28, high temperature storage tank; 29, valve V; 30, low temperature storage tank II.
[0077] The purposes, functional features and advantages of the present application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0078] It should be understood that the specific embodiments described herein are merely intended to explain the technical solutions of the present application, and are not intended to limit the present application.
[0079] In order to better understand the technical solutions of the present application, the following will be described in detail in conjunction with the drawings and specific embodiments of the specification.
[0080] It should be noted that the execution subject of the embodiments of the present application can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a variable optothermal integrated Carnot cell system, etc. The embodiments of the present application will be described below taking the variable optothermal integrated Carnot cell system as an example.
[0081] Based on this, the present application provides a mode switching method of a variable optothermal integrated Carnot cell, which will be described in detail below with reference to the drawings. Figure 1 , Figure 1 A flowchart of a first embodiment of a mode switching method of a variable optothermal integrated Carnot cell according to the present application.
[0082] In the present embodiment, the mode switching method of the variable optothermal integrated Carnot cell comprises steps S10-S60:
[0083] Step S10, the historical data and the to-be-predicted data containing solar radiation intensity, meteorological data, geographical data and equipment operation data are preprocessed to obtain historical fusion feature data and to-be-predicted fusion feature data.
[0084] It should be noted that the solar radiation intensity refers to the solar radiation energy received per unit time and per unit area. The meteorological data refers to the atmospheric state quantity related to the solar radiation, including pressure, temperature, humidity, wind speed, precipitation, visibility and the like. The geographical data refers to the fixed spatial information of the location where the station is located, including latitude, longitude, altitude, terrain shielding angle, surface albedo and the like. The equipment operation data refers to the real-time operation condition of the solar-thermal system, including collector outlet temperature, storage tank temperature, valve opening, compressor power consumption and the like. The historical data refers to the solar radiation intensity, meteorological, geographical and equipment operation data continuously collected in the past time window. The to-be-predicted data refers to the latest meteorological, geographical and equipment operation data corresponding to the prediction of the solar radiation intensity at a future time or period. The historical fusion feature data refers to the high-dimensional joint feature vector formed by using the historical data after correlation screening and feature fusion, which is used to train the prediction model. The to-be-predicted fusion feature data refers to the high-dimensional joint feature vector obtained by converting the to-be-predicted data by the same fusion rule, which is used to input the trained model for reasoning.
[0085] As an example, the step of preprocessing the historical data and the to-be-predicted data containing solar radiation intensity, meteorological data, geographical data and equipment operation data to obtain historical fusion feature data and to-be-predicted fusion feature data includes: performing anomaly detection and spatial interpolation processing on the historical data and the to-be-predicted data containing solar radiation intensity, meteorological data, geographical data and equipment operation data respectively to obtain historical continuous feature data and to-be-predicted continuous feature data; normalizing the historical continuous feature data and the to-be-predicted continuous feature data to obtain historical normalized features and to-be-predicted normalized features; calculating the Pearson correlation coefficient of the historical normalized features and the to-be-predicted normalized features and the solar radiation intensity to obtain historical feature weight factors and to-be-predicted feature weight factors; selecting the normalized features according to the historical feature weight factors, the to-be-predicted feature weight factors and a preset weight threshold to form a historical high-weight feature subset and a to-be-predicted high-weight feature subset; and splicing the historical high-weight feature subset and the to-be-predicted high-weight feature subset into a three-dimensional tensor according to the time step to obtain the historical fusion feature data and the to-be-predicted fusion feature data.
[0086] The historical continuous feature data refers to a complete feature matrix obtained after abnormal value elimination and spatial interpolation on the original multi-dimensional observation sequence in the historical period, without missing and with space-time continuity. The to-be-predicted continuous feature data refers to a complete feature matrix obtained after the same abnormal elimination and spatial interpolation on the original multi-dimensional observation sequence in the future period, without missing. The historical normalized feature refers to a dimensionless feature matrix obtained after compressing the historical continuous feature data to a fixed interval according to a unified scale. The to-be-predicted normalized feature refers to a dimensionless feature matrix obtained after compressing the to-be-predicted continuous feature data to a fixed interval according to the same scale. The Pearson correlation coefficient refers to a dimensionless index for measuring the linear correlation degree between each feature variable and the solar radiation intensity, with a value range of -1 to 1. The historical feature weight factor refers to the absolute value of the Pearson correlation coefficient of each feature variable in the historical normalized feature and the solar radiation intensity. The to-be-predicted feature weight factor refers to the absolute value of the Pearson correlation coefficient of each feature variable in the to-be-predicted normalized feature and the solar radiation intensity. The preset weight threshold refers to a preset lower limit value of the Pearson coefficient for screening high-correlation features. The historical high-weight feature subset refers to a sub-matrix formed by retaining only the feature variables with weight factors higher than the preset threshold from the historical normalized feature. The to-be-predicted high-weight feature subset refers to a sub-matrix formed by retaining only the feature variables with weight factors higher than the preset threshold from the to-be-predicted normalized feature. The three-dimensional tensor refers to a three-dimensional data structure formed by stacking the high-weight feature subset according to the sample, time step and feature dimensions.
[0087] Firstly, the variable optothermal integrated Carnot cell system calls the built-in anomaly detection module to traverse the to-be-predicted data and the historical data, and uses the Pearson correlation coefficient to calculate the correlation between each feature variable and the solar radiation intensity. The system performs minimum-maximum normalization on the cleaned continuous feature matrix column by column, linearly maps each variable to the [0, 1] interval, eliminates the dimension difference, and prevents high-amplitude variables from masking small-scale but key meteorological factors in subsequent correlation calculations. Then, the system calculates the Pearson correlation coefficient of each dimension of the normalized feature and the corresponding time solar radiation intensity in parallel, takes the absolute value as the weight factor, and automatically selects and retains high-correlation features according to the preset threshold of 0.45, and eliminates redundant dimensions to reduce the model complexity and overfitting risk. Finally, the system concatenates the filtered historical and to-be-predicted high-weight feature subsets along the "sample x time step x feature" order into a unified shape three-dimensional tensor with a sliding window length of 24 steps and a step size of 1 step, as the direct input of the Transformer-LSTM prediction network, realizing seamless data format connection between historical training and future reasoning.
[0088] In an alternative embodiment, the sliding window mechanism comprises the following processing: slicing the historical data with a fixed window length window, constructing a training tensor with shape (N - window - length_size + 1, window +length_size, variable number) and separating the input sequence and the target sequence from the tensor.
[0089] Step S20, constructing a Transformer-LSTM deep learning prediction model according to the feature encoder module, the position encoding module, the multi-head self-attention mechanism module, the feedforward network, the LSTM feature enhancement module and the fully connected prediction layer.
[0090] It should be noted that the feature encoder module refers to a network layer that uniformly converts the input multi-dimensional time series features to a high-dimensional representation space in the model through a learnable linear mapping. The position encoding module refers to an additive encoding structure that generates a unique position vector for each time step in the sequence using the sine and cosine functions and superimposes it on the feature vector. The multi-head self-attention mechanism module refers to an attention subnetwork that calculates multiple sets of query-key-value attention weights in parallel to capture global dependencies between variables. The feedforward network refers to a pointwise fully connected mapping layer that performs two linear transformations on the attention output and adds a nonlinear activation. The LSTM feature enhancement module refers to a long short-term memory network located after the Transformer encoding, which is used to further extract local time dynamic features. The fully connected prediction layer refers to an output layer that linearly maps the enhanced hidden state to the final solar radiation intensity prediction value. The Transformer-LSTM deep learning prediction model refers to an end-to-end time series regression network stacked in the order of encoding-enhancement-prediction by the above six types of modules.
[0091] Please refer to Figure 2 , Figure 2The framework diagram of the Transformer-LSTM deep learning prediction model provided for the mode switching method embodiment one of the variable photothermal integrated Carnot cell of the present application is composed of an input layer (Input), an encoder (Encoder), a decoder (Decoder), and an output layer (Output). The input data is first processed by the input embedding (Input Embedding) layer to convert the original data into an embedded representation that can be processed by the model. Then, positional encoding (Positional Encoding) is added to provide the position information of each element in the sequence, which is crucial for the model to understand the time structure of the sequence. The encoder part is stacked by multiple identical layers, each of which includes a multi-head attention mechanism (Multi-Head Attention) and a feedforward network (FFN), as well as a residual connection and layer normalization (Add&Norm), to extract the features of the input data and capture the dependencies within the sequence. The decoder part includes an LSTM (Long Short-Term Memory) layer to capture the temporal dynamic characteristics of the sequence, as well as a feedforward network and a residual connection layer normalization structure to further process the output of the decoder. Finally, the output of the decoder is converted into the final prediction output through a linear layer (Linear) and a normalized exponential layer (Softmax layer). The entire model achieves in-depth understanding and effective prediction of the input sequence through this structure, especially when dealing with data with time dependence.
[0092] As an example, the steps of constructing the Transformer-LSTM deep learning prediction model according to the feature encoder module, the position encoding module, the multi-head self-attention mechanism module, the feedforward network, the LSTM feature enhancement module, and the fully connected prediction layer include: initializing a model framework, defining an input dimension and an output dimension; adding a feature encoder module in the model framework, configuring a linear transformation layer in the feature encoder module to match the input dimension; adding a position encoding module at the output end of the feature encoder module, the position encoding module generating a time position marker through a sine and cosine function; constructing a Transformer encoder layer at the output end of the position encoding module, the Transformer encoder layer including a multi-head self-attention mechanism module and a feedforward network; adding an LSTM feature enhancement module at the output end of the Transformer encoder layer, the LSTM feature enhancement module being configured as a long short-term memory network; adding a fully connected prediction layer at the output end of the LSTM feature enhancement module, setting the number of output neurons in the fully connected prediction layer to match the output dimension; and connecting the feature encoder module, the position encoding module, the Transformer encoder layer, the LSTM feature enhancement module, and the fully connected prediction layer in series through a residual connection and a layer normalization operation to obtain the Transformer-LSTM deep learning prediction model.
[0093] The model framework refers to a blank network skeleton preset by the variable photo-thermal integrated Carnot cell system, which can accommodate various functional sub-modules and is spliced in order. The input dimension refers to the size of the last dimension of the multi-dimensional time series feature tensor sent into the model at one time, which is equal to the total number of fused features. The output dimension refers to the total number of time steps of the solar radiation intensity prediction value that the model finally needs to output. The linear transformation layer refers to a fully connected mapping layer composed of a weight matrix and a bias vector, which is used to convert an input vector of any dimension into a target dimension. The sine and cosine function refers to a pair of periodic sin and cos functions, which is used to generate a unique and smoothly changing position vector for each position in the sequence. The time position marker refers to a vector value directly calculated by the sine and cosine function, which is added to the original features to express the sequence information of the time steps. The Transformer encoder layer refers to a sub-network unit composed of a multi-head self-attention and a feedforward network, which is used to extract long-range dependence features between variables. The long short-term memory network refers to a recurrent structure containing an input gate, a forgetting gate, and an output gate, which is used to capture short-term to medium-term time dynamics in the sequence. The number of output neurons refers to the number of columns of the weight matrix of the last layer of the fully connected prediction layer, which is the same as the output dimension and corresponds to the number of points of the solar radiation intensity to be predicted.
[0094] First, the variable photothermal integrated Carnot cell system calls the internal configurator in the model initialization stage, explicitly passes in the two parameters "fusion feature dimension = 40" and "prediction step = 24", creates an empty network container and locks the tensor shape, avoiding the waste of video memory caused by dynamic rearrangement in the later stage. Second, the system sequentially inserts into the container: ① the feature encoder module, whose linear layer weight is initialized with Xavier uniform, mapping 40-dimensional input to 256-dimensional hidden space at a time, ensuring that the subsequent multi-head attention can interact fully in high dimensions; ② the position encoding module, which generates sin-cos position vectors according to the sequence length and adds them element by element, allowing the model to distinguish early and late radiation differences; ③ two layers of Transformer encoder, each layer first multi-head attention (8 heads, dropout0.1) and then feedforward (256→1024→256, GELU), residual and layer normalization ensure gradient stability; ④ a one-way LSTM (256 hidden, 1 layer), which extracts short-term fluctuations within 24 steps in addition to global dependencies, improving the response to rapid cloud cover; ⑤ a fully connected prediction layer (256→24), with zero bias initialization, directly outputting the future 24-step solar radiation prediction value; Finally, the system packs the above modules into a nn.Sequential object at a time according to the residual-normalization link and saves it as a.pt file for subsequent training and inference reuse.
[0095] Step S30, training the Transformer-LSTM deep learning prediction model according to the historical fusion feature data to obtain a target prediction model.
[0096] It should be noted that the target prediction model refers to the Transformer-LSTM network that is fully trained and converged by the historical fusion feature data, and has the ability to predict the future solar radiation intensity with high precision.
[0097] As an example, the step of training the Transformer-LSTM deep learning prediction model according to the historical fusion feature data to obtain a target prediction model comprises: dividing the historical fusion feature data into a training set and a validation set; processing the training set through a sliding window mechanism to obtain an input sequence and a prediction target sequence; inputting the input sequence into the Transformer-LSTM deep learning prediction model to obtain a prediction result; calculating the mean square error loss between the prediction result and the prediction target sequence; updating the parameters of the Transformer-LSTM deep learning prediction model through the self-adaptive moment estimation algorithm according to the mean square error loss; calculating the mean square error loss using the validation set to obtain a validation loss; when the validation loss does not satisfy a preset condition, returning to the step of inputting the input sequence into the Transformer-LSTM deep learning prediction model to obtain a prediction result until the validation loss satisfies the preset condition to obtain a target prediction model.
[0098] The input sequence refers to a continuous multi-step observation tensor in the historical fusion feature data intercepted by the sliding window for model input. The prediction target sequence refers to the future multi-step true value tensor of solar radiation intensity to be predicted after the input sequence in the same sliding window. The prediction result refers to the future multi-step estimated value tensor of solar radiation intensity output by the Transformer-LSTM model based on the input sequence. The validation loss refers to the mean square error loss value calculated on the validation set. The preset condition refers to that the validation loss does not decrease continuously for several rounds or decreases to below a set threshold, which is considered to satisfy the early stopping criterion.
[0099] Firstly, the variable optothermal integrated Carnot cell system randomly shuffles all the historical fusion feature data in a ratio of 8:2, with the first 80% as the training set and the last 20% as the validation set, and the random seed is fixed to ensure the reproducibility of the results. Secondly, the system starts a sliding window with 24-step input-24-step output on the training set, with a step size of 1, generating an input tensor of shape [N-47, 24, 40] and a target tensor of shape [N-47, 24, 1], and generating the corresponding validation input and validation target with the same window parameters to ensure consistent distribution of training and validation; then the input tensor is sent into the Transformer-LSTM model in batches of size 64, and the prediction value is obtained by forward calculation, and the MSE loss is obtained by element-wise difference and square averaging between the prediction value and the target tensor. During backpropagation, the Adam optimizer is used with an initial learning rate of 1e-3, =0.9 (is the exponential decay rate of the first momentum (mean of gradients) in the Adam optimizer), =0.999 (is the exponential decay rate of the second momentum (mean of squared gradients) in the Adam optimizer), =0.9 (is the exponential decay rate of the first momentum (mean of gradients) in the Adam optimizer), is referred to as the exponential decay rate of the second momentum (mean square of gradient) in Adam optimizer, and the model weight is updated synchronously after each update step to make the gradient smooth and decrease. Finally, after completing a round of training, the system performs a complete forward calculation on the validation set to obtain the validation loss. If the validation loss does not decrease for 5 consecutive rounds or the absolute value is lower than 1e-4, early stopping is triggered, and the current weight file is saved as "target_model.pt" as the final target prediction model to avoid overfitting and ensure generalization performance.
[0100] In step S40, the target prediction model is used to process the to-be-predicted fusion feature data to obtain a solar radiation intensity prediction value.
[0101] It should be noted that the solar radiation intensity prediction value refers to a continuous numerical sequence of unit area solar radiation power at a future time output by the target prediction model based on the to-be-predicted fusion feature data.
[0102] It can be understood that the variable opto-thermal integrated Carnot cell system sends the to-be-predicted fusion feature data obtained through the same fusion and normalization process to the trained target prediction model in one time, and outputs a sequence of solar radiation intensity prediction values after model processing.
[0103] Please refer to Figure 3 , Figure 3 The variable opto-thermal integrated Carnot cell system structure schematic diagram provided by the first embodiment of the mode switching method of the variable opto-thermal integrated Carnot cell of the present application shows the complex structure of the variable opto-thermal integrated Carnot cell system and the connection relationship between the components in detail. The system obtains energy from solar radiation, collects heat energy through the PTC heat collector 20, and then divides the flow to three different temperature level circulating units. In the low-temperature circulating unit, the working medium is first evaporated in the low-temperature evaporator 1, then compressed by the compressor I 2, heat exchanged by the heat exchanger I 3, and then enters the three-way valve I 5 after pressure reduction by the throttle valve I 4.
[0104] The medium-temperature circulating unit receives the working medium from the three-way valve II 7, compresses it by the compressor II 8, heat exchanges it by the heat exchanger II 9, reduces its pressure by the throttle valve II 10, and then flows into the medium-temperature storage tank 11. The working medium exchanges heat with the heat-conducting oil in the low-temperature storage tank I 14 from the heat exchanger III 13 in the medium-temperature storage tank 11, and then does work by the expander I 116, and finally completes the cycle by the pump 19 through the regenerator 17 and the cooler 18.
[0105] The high-temperature circulating unit directly obtains high-temperature heat energy from the PTC heat collector 20, compresses it by the compressor III 21, heat exchanges it by the heat exchanger IV 22, and stores it in the high-pressure storage tank 23. When energy needs to be released, the working medium exchanges heat with the molten salt in the high-temperature storage tank 28 through the heat exchanger V 25, and then enters the expander II 26 to do work, finally converting the heat energy into electrical energy.
[0106] The system also includes a plurality of valves, such as valve I 12, valve II 15, valve III 24, valve IV 27, valve V 29, for controlling the flow direction of the working medium, ensuring that the system can intelligently switch operating modes under different solar radiation intensity levels, optimizing energy storage and release.
[0107] In particular, the medium side of the medium temperature evaporator 6 is connected to the PTC collector 20, and the working medium side outlet is connected to the inlet of the three-way valve II 7, forming a medium temperature circulation closed loop. The low temperature storage tank II 30 is connected to the high temperature storage tank 28 through the valve V 29, ensuring that in the high temperature cycle, the molten salt can flow between the two storage tanks to realize the effective storage and utilization of heat energy. Such design allows the system to dynamically adjust its operating strategy under different solar radiation intensities, thereby improving the overall energy utilization efficiency and flexibility of the system.
[0108] Step S50, when the solar radiation intensity prediction value belongs to the first preset intensity level, the energy storage and release link of the medium and low temperature circulation unit is started.
[0109] It should be noted that the first preset intensity level refers to the upper limit of the solar radiation intensity interval set by the system in advance, and when the prediction value is lower than the upper limit, it is determined to be B-level irradiation. The medium and low temperature circulation unit refers to the working medium circulation subsystem composed of the low temperature evaporator, compressor I, heat exchanger I, throttle valve I, medium temperature evaporator, compressor II, heat exchanger II, throttle valve II, heat conducting oil storage tank and related valves, including the low temperature circulation unit and the medium temperature circulation unit. The low temperature circulation unit refers to the low temperature evaporator 1 connected in series with the compressor I 2, the working medium side of the heat exchanger I 3, and the throttle valve I 4, forming a low temperature circulation closed loop. In the medium temperature circulation unit, the medium side of the medium temperature evaporator 6 is connected to the PTC collector 20, and the working medium side outlet is connected to the inlet of the three-way valve II 7, and the outlet of the three-way valve II 7 is connected in series with the compressor II 8, the working medium side of the heat exchanger II 9, the throttle valve II 10, the three-way valve I 5 and the working medium side of the medium temperature evaporator 6, forming a medium temperature circulation closed loop, and the other outlet of the three-way valve I 5 is connected to the other inlet of the three-way valve II 7 through the medium side of the heat exchanger I 3; the medium side of the heat exchanger II 9 is connected in series with the medium temperature storage tank 11, the valve I 12, the working medium side of the heat exchanger III 13, the low temperature storage tank I 14 and the valve II 15; the medium side of the heat exchanger III 13 is connected in series with the expander I 16, the working medium side of the regenerator 17, the cooler 18, the pump 19 and the medium side of the regenerator 17. The low temperature circulation unit uses R1234ze(e) as the working medium, the medium temperature circulation unit uses R1233zd(e) as the working medium, and the substances in the medium temperature storage tank 11 and the low temperature storage tank I 14 are heat conducting oil.
[0110] The energy storage and release link refers to the complete energy conversion path that uses excess electricity and solar heat to drive the compressor to compress the working medium and exchange heat with the heat conducting oil during the day, and then releases heat through the heat conducting oil to drive the expander to generate electricity at night.
[0111] It can be understood that when the solar radiation intensity is B level in the daytime, the medium-low temperature circulating unit is started, the valve II 15 is opened, the valve I 12 is closed, the generator set is used to drive the compressor I 2 and the compressor II 8 more than the electric power, and the working medium after the throttling valve II 10 absorbs the heat of the low temperature circulating working medium in the heat exchanger I 3 and the heat from the PTC heat collector 20, and then is compressed, is absorbed by the heat conducting oil in the low temperature storage tank I 14, the energy storage process is ended, and the solar energy and the electric energy are converted into the heat energy storage. In the night peak, the valve I 12 is opened, the valve II 15 is closed, the working medium absorbs the heat of the molten salt in the heat exchanger III 13, and then enters the expander I 16 to do work, the energy release process is ended, and the heat energy is converted into the electric energy output.
[0112] Step S60, when the solar radiation intensity prediction value belongs to the second preset intensity level, the energy storage-energy release link of the high temperature circulating unit is started, and the mode switching is completed.
[0113] It should be noted that the second preset intensity level refers to a high threshold interval of the solar radiation intensity preset by the system, and when the prediction value is higher than the lower limit of the interval, it is determined as A level irradiation. The high temperature circulating unit refers to a steam-molten salt combined cycle subsystem composed of a PTC heat collector, a compressor III, a heat exchanger IV, a high pressure storage tank, a valve III, a heat exchanger V, an expander II, a valve IV, a high temperature storage tank and a low temperature storage tank II, and a molten salt circuit. In the high temperature circulating unit, the PTC heat collector 20 is connected in series with the compressor III 21, the working medium side of the heat exchanger IV 22, the high pressure storage tank 23, the valve III 24, the working medium side of the heat exchanger V 25 and the expander II 26; the valve IV 27 is connected in series with the medium side of the heat exchanger IV 22, the high temperature storage tank 28, the valve V 29 and the low temperature storage tank II 30. In the high temperature circulating unit, the high pressure storage tank is filled with steam, and the substances in the high temperature storage tank 28 and the low temperature storage tank II 30 are molten salt.
[0114] It can be understood that when the solar radiation intensity is A level in the daytime, the high temperature circulating unit is started, the valve IV 27 is opened, the valve III 24 and the valve V 29 are closed, the compressor III 21 is driven by the generator set more than the electric power, the high temperature and high pressure steam is absorbed by the molten salt in the low temperature storage tank II 30 in the heat exchanger IV 22, and then enters the high pressure storage tank 23 for storage, the energy storage process is ended, the solar energy and the electric energy are converted into the pressure energy and the heat energy storage, in the night peak, the valve III 24 and the valve V 29 are opened, the valve IV 27 is closed, the steam in the high pressure storage tank 23 absorbs the heat of the molten salt, and then enters the expander II 26 to do work, the energy release process is ended, and the heat energy and the pressure energy are converted into the electric energy output.
[0115] The embodiment provides a mode switching method of a variable photothermal integrated Carnot cell.
[0116] Based on the first embodiment of the present application, the same or similar contents as the above-mentioned embodiment one can be referred to the above introduction, and the subsequent will not be described in detail. On this basis, please refer to Figure 4 , Figure 4 The flowchart of the second embodiment of the mode switching method of the variable photothermal integrated Carnot cell of the present application is shown in the figure. The target prediction model comprises a feature encoder module, a position encoding module, a multi-head self-attention mechanism module, a feedforward network, an LSTM feature enhancement module and a fully connected prediction layer. The steps S40 of the mode switching method of the variable photothermal integrated Carnot cell comprise steps S41-S46.
[0117] In step S41, the feature encoder module is used for linear transformation of the to-be-predicted fusion feature data to obtain a dimension alignment feature.
[0118] It should be noted that the dimension alignment feature refers to a tensor representation consistent with the internal hidden dimension of the Transformer-LSTM model after the to-be-predicted fusion feature data is linearly mapped by the feature encoder module.
[0119] It can be understood that the variable photothermal integrated Carnot cell system inputs the to-be-predicted fused feature data in the shape of (batch, 24, 40) into the feature encoder module, calls the internal 256x40 weight matrix to complete matrix multiplication at one time and adds a bias, expands the last dimension from 40 to 256, outputs a tensor of (batch, 24, 256), and realizes direct alignment with the subsequent multi-head attention and LSTM layer hidden dimension.
[0120] In step S42, the dimension alignment feature is added with a sine-cosine position mark by the position encoding module to obtain a position encoding feature.
[0121] It should be noted that the sine-cosine position mark refers to a fixed vector uniquely corresponding to a sequence position generated by a sine function and a cosine function, and is used to explicitly inject time sequence information. The position encoding feature refers to a new feature tensor with time position information obtained by adding the sine-cosine position mark to the dimension alignment feature element by element.
[0122] As an example, the step of adding the sine-cosine position mark to the dimension alignment feature by the position encoding module to obtain the position encoding feature includes: generating a position index based on a timestamp of the to-be-predicted fused feature data; calculating a sine component and a cosine component by a sine function and a cosine function according to the position index; splicing the sine component and the cosine component into a position embedding vector; and adding the position embedding vector to the dimension alignment feature by the position encoding module to obtain the position encoding feature.
[0123] The position index refers to an integer sequence starting from 0 and increasing in time sequence extracted from the timestamp corresponding to the to-be-predicted fused feature data, and is used to mark the absolute position of each time step. The sine component refers to a one-dimensional numerical sequence calculated by substituting the position index into a sine function at different frequencies, and is used to encode the odd-dimensional information of the position. The cosine component refers to a one-dimensional numerical sequence calculated by substituting the position index into a cosine function at different frequencies, and is used to encode the even-dimensional information of the position. The position embedding vector refers to a vector with the same dimension as the dimension alignment feature obtained by alternately splicing the sine component and the cosine component by dimension, and is used to directly superimpose into the feature to express the time sequence.
[0124] Firstly, the variable opto-thermal integrated Carnot cell system reads the timestamp field in the fusion feature data to be predicted, generates a continuous integer index from 0 to 23 at a minute level resolution, and copies it to the GPU memory buffer. Secondly, the system calls the built-in `torch.arange` of PyTorch to build a 256-dimensional frequency vector `2*i / d_model`, inputs the index and the frequency vector into `torch.sin` and `torch.cos` respectively, and calculates two groups of [24, 256] tensors in parallel at one time. Then, the position embedding vector of [24, 256] is obtained by alternately splicing along the last dimension, so as to ensure the classic position encoding form that even indexes correspond to cosine and odd indexes correspond to sine. Finally, the system expands the vector to [batch, 24, 256] by the broadcast mechanism, and then element-wise adds the dimension alignment feature to obtain the position encoding feature and immediately sends it to the subsequent Transformer layer, so that the model can perceive the time sequence without introducing learnable parameters, and the modeling accuracy of the irradiation fluctuation sequence is improved.
[0125] In step S43, the cross-variable dependency relationship of the position encoding feature is extracted by the multi-head self-attention mechanism module to obtain a global dependency feature.
[0126] It should be noted that the cross-variable dependency relationship refers to the mutual influence strength between different meteorological or device variables in the position encoding feature over time. The global dependency feature refers to a unified representation tensor containing mutual dependency information of all variables in a long time sequence range extracted by the multi-head self-attention mechanism.
[0127] As an example, the step of extracting the cross-variable dependency relationship of the position encoding feature by the multi-head self-attention mechanism module to obtain a global dependency feature includes: mapping the position encoding feature into a query vector, a key vector and a value vector by the multi-head self-attention mechanism module; calculating scaled dot-product attention weights based on the dot product operation of the query vector and the key vector, in combination with the dimension of the key vector; performing weighted summation on the value vector based on the scaled dot-product attention weights to obtain the weighted feature of each attention head in the multi-head self-attention mechanism module; splicing the weighted features of all the attention heads to obtain a splicing result; and performing linear mapping on the splicing result to obtain the global dependency feature.
[0128] The query vector Q refers to a vector matrix obtained by linear transformation of the position encoding feature, used for comparing similarity with other position features. The key vector K refers to a vector matrix obtained by another linear transformation of the same position encoding feature, used for being compared with the query vector for similarity. The value vector V refers to a vector matrix obtained by a third linear transformation of the position encoding feature, carrying actual feature information and being weighted and aggregated. The scaled dot-product attention weight refers to a probability distribution matrix representing the correlation strength between positions obtained by dot product of the query vector and the key vector, divided by the square root of the dimension of the key vector, and then normalized by Softmax.
[0129]
[0130] The weighted feature refers to a feature matrix output by each attention head after position-by-position weighted summation of the value vector using the above attention weight. The splicing result refers to a long vector matrix formed by connecting the heads of the weighted features of all attention heads in the last dimension.
[0131] The variable opto-thermal integrated Carnot cell system parallelly sends the position encoding feature with a shape of [batch, 24, 256] into 8 attention heads, each head linearly maps Q, K and V using an independent 256x32 weight matrix at one time, and the sizes of the three matrices are all [batch, 24, 32]; then the dot product of Q and the transpose of K is calculated in the current GPU stream to obtain [batch, 24, 24] original scores, and after scaling by √32, softmax is performed along the last dimension to generate attention weights; the weights are multiplied with V in batch matrix multiplication to output [batch, 24, 32] weighted features; the weighted features of the 8 heads are spliced into [batch, 24, 256] tensors in the last dimension, and then mapped through a 256x256 linear layer, finally outputting the global dependence feature and directly sending it to the next layer, so that the long-range correlation between different variables is captured at one time.
[0132] In step S44, the global dependence feature is nonlinearly mapped by the feedforward network to obtain an enhanced feature.
[0133] It should be noted that the enhanced feature refers to a high-order nonlinear representation tensor with a dimension of [batch, 24, 256] output by twice linear transformation of the global dependence feature and GELU activation through the feedforward network.
[0134] It can be understood that the variable photothermal integrated Carnot cell system sends a global dependence feature with a shape of [batch, 24, 256] into a feedforward network: first, it is raised to 1024 dimensions through a 256x1024 linear layer, immediately introduces nonlinearity through GELU activation, then it is reduced back to the original dimension through a 1024x256 linear layer, does layer normalization after residual connection, and outputs a high-order representation with the same size as the enhanced feature, so as to improve the expression ability of the model to complex irradiation fluctuations without changing the time step.
[0135] In step S45, the time sequence fluctuation rule of the enhanced feature is captured through the LSTM feature enhancement module, and a short-term fluctuation feature is obtained.
[0136] It should be noted that the time sequence fluctuation rule refers to the short-term rise and fall and transient change pattern of the enhanced feature in the past and future 12 steps, that is, 24 continuous time steps. The short-term fluctuation feature refers to the high-dimensional hidden state tensor output by the LSTM feature enhancement module for the 24-step local window, which is used to accurately capture the subtle changes of solar radiation in this period.
[0137] In an embodiment, the step of capturing the time sequence fluctuation rule of the enhanced feature through the LSTM feature enhancement module to obtain a short-term fluctuation feature includes: inputting the enhanced feature and a previous time hidden state into a forgetting gate to generate a forgetting weight; inputting the enhanced feature and the previous time hidden state into an input gate to generate an input weight and a candidate cell state; updating a cell state according to the forgetting weight, the input weight and the candidate cell state; inputting the enhanced feature and the previous time hidden state into an output gate to generate an output weight; generating a current hidden state according to the output weight and the updated cell state, and taking the current hidden state as a short-term fluctuation feature.
[0138] The previous moment hidden state refers to a short-term memory vector output by the LSTM at the previous time step, which has the same dimension as the model hidden layer. The forget gate refers to a learnable gating structure in the LSTM that determines how much information from the previous moment is retained or discarded through sigmoid activation. The forget weight refers to an element-level coefficient vector output by the forget gate, with values ranging from 0 to 1, used to filter the cell state dimension by dimension. The input gate refers to a learnable gating structure in the LSTM that determines how much new input information is added through the cooperation of sigmoid and tanh. The input weight refers to a 0-1 vector output by the sigmoid part of the input gate, and the candidate cell state refers to a new information vector generated by the tanh part of the input gate. The cell state refers to a memory vector that can be long-term saved and passed along time steps inside the LSTM. The output gate refers to a learnable gating structure in the LSTM that determines how much information is output from the updated cell state as the hidden state through sigmoid activation. The output weight refers to a 0-1 vector output by the output gate, used to filter the cell state dimension by dimension to produce the hidden state. The current hidden state refers to the final output of the LSTM at the current time step, which carries short-term fluctuation features and is sent to the next layer or the next moment.
[0139] First, the variable optothermal integrated Carnot cell system concatenates the enhanced feature vector at the current time step with the 256-dimensional hidden state at the previous moment by channel to form a 512-dimensional input, which is sent to three independent fully connected layers: the forget gate outputs a 256-dimensional sigmoid value, the input gate outputs a 256-dimensional sigmoid value and a 256-dimensional tanh candidate vector, ensuring that each gate can perceive the latest information in real time and suppress gradient disappearance. Second, the system multiplies the forget weight and the old cell state element by element, and then multiplies the input weight and the candidate vector element by element, and adds them together to update the cell state. This "multiplication filtering + addition writing" mechanism not only preserves long-term trends but also injects the latest fluctuations. Finally, the system concatenates the enhanced features and the old hidden state again through the output gate to get a 256-dimensional sigmoid output weight, which is multiplied element by element with the new cell state activated by tanh to generate a 256-dimensional current hidden state, which is directly sent to the fully connected prediction layer as a short-term fluctuation feature, thereby accurately capturing the transient changes within 24 steps without increasing the number of parameters.
[0140] In step S46, the short-term fluctuation feature is mapped to a solar radiation intensity prediction value through the fully connected prediction layer.
[0141] It can be understood that the variable opto-thermal integrated Carnot cell system will first take the short-term fluctuation feature with a shape of [batch, 24, 256] along the time dimension to take the last step to obtain [batch, 256], and then send it to the fully connected prediction layer: the weight matrix size of the layer is 256x24, the bias vector is 24-dimensional, and the tensor of [batch, 24] is obtained by one matrix multiplication and bias, and each element directly corresponds to the prediction value of the solar radiation intensity in the future 24 time steps, completing the mapping.
[0142] The embodiment first linearly transforms the input predicted fusion feature data through the feature encoder module, raises the feature dimension to 256 dimensions consistent with the model internally, realizes dimension alignment, and provides a unified feature space for subsequent module processing. Subsequently, the position encoding module adds sine and cosine position markers to the dimension-aligned features to generate position encoding features, so that the model can perceive the position information in the time series and enhance the modeling capability of the time dependence. Then, the multi-head self-attention mechanism module processes the position encoding features, extracts the cross-variable dependence relationship between different variables, obtains global dependence features, and effectively captures long-distance feature correlation. The feedforward network further nonlinearly maps the global dependence features to obtain enhanced features, improving the model's expression ability for complex feature relationships. The LSTM feature enhancement module captures the time series fluctuation rules in the enhanced features to obtain short-term fluctuation features, strengthening the capture of short-term dynamic changes. Finally, the fully connected prediction layer maps the short-term fluctuation features to the solar radiation intensity prediction value, directly outputs the solar radiation intensity prediction results in the future 24 steps, and provides accurate prediction support for the system's operation decision.
[0143] The application also provides a mode switching device of a variable opto-thermal integrated Carnot cell, please refer to Figure 5 , the mode switching device of the variable opto-thermal integrated Carnot cell comprises:
[0144] The preprocessing module 10 is used for preprocessing the historical data and the to-be-predicted data containing the solar radiation intensity, the meteorological data, the geographical data and the equipment operation data to obtain the historical fusion feature data and the to-be-predicted fusion feature data.
[0145] The model construction module 20 is used for constructing a Transformer-LSTM deep learning prediction model according to the feature encoder module, the position encoding module, the multi-head self-attention mechanism module, the feedforward network, the LSTM feature enhancement module and the fully connected prediction layer.
[0146] The model training module 30 is used for training the Transformer-LSTM deep learning prediction model according to the historical fusion feature data to obtain a target prediction model.
[0147] The prediction module 40 is configured to process the to-be-predicted fusion feature data by using the target prediction model to obtain a solar radiation intensity prediction value.
[0148] The low-temperature mode module 50 is configured to start the energy storage and release link of the low-temperature cycle unit when the solar radiation intensity prediction value belongs to the first preset intensity level.
[0149] The high-temperature mode module 60 is configured to start the energy storage and release link of the high-temperature cycle unit when the solar radiation intensity prediction value belongs to the second preset intensity level, and complete the mode switching.
[0150] The mode switching device of the variable photothermal integrated Carnot cell provided in the present application adopts the mode switching method of the variable photothermal integrated Carnot cell in the above embodiment, and can solve the technical problem of unstable output of the photothermal system caused by the fluctuation of solar radiation. Compared with the prior art, the mode switching device of the variable photothermal integrated Carnot cell provided in the present application has the same beneficial effects as the mode switching method of the variable photothermal integrated Carnot cell provided in the above embodiment, and other technical features in the mode switching device of the variable photothermal integrated Carnot cell are the same as the features disclosed in the above embodiment, which will not be described here.
[0151] The present application provides a variable photothermal integrated Carnot cell mode switching device, which comprises at least one processor and a memory in communication connection with the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the mode switching method of the variable photothermal integrated Carnot cell in the above embodiment one.
[0152] Reference will now be made to the following description Figure 6 which shows a structural schematic diagram of the variable photothermal integrated Carnot cell mode switching device suitable for realizing the embodiments of the present application. The variable photothermal integrated Carnot cell mode switching device in the embodiments of the present application can include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistant), PADs (Portable Application Description), PMPs (Portable Media Player), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. Figure 6 The variable photothermal integrated Carnot cell mode switching device shown is only an example, and should not bring any limitation to the functions and use range of the embodiments of the present application.
[0153] like Figure 6 As shown, the mode switching device for the variable photothermal integrated Carnot battery may include a processing unit 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in ROM (Read Only Memory) 1002 or a program loaded from storage device 1003 into RAM (Random Access Memory) 1004. RAM 1004 also stores various programs and data required for the operation of the mode switching device for the variable photothermal integrated Carnot battery. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via bus 1005. Input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, LCDs (Liquid Crystal Displays), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the mode-switching device of the variable photothermal integrated Carnot battery to communicate wirelessly or wiredly with other devices to exchange data. Although the figure shows a mode-switching device of the variable photothermal integrated Carnot battery with various systems, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems can be implemented alternatively.
[0154] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0155] The mode switching device of the variable optothermal integrated Carnot cell provided in the application adopts the mode switching method of the variable optothermal integrated Carnot cell in the above embodiment, and can solve the technical problem that the output of the optothermal system is unstable due to the fluctuation of solar radiation. Compared with the prior art, the mode switching device of the variable optothermal integrated Carnot cell provided in the application has the same beneficial effects as the mode switching method of the variable optothermal integrated Carnot cell provided in the above embodiment, and other technical features in the mode switching device of the variable optothermal integrated Carnot cell are the same as the features disclosed in the above embodiment, which will not be repeated here.
[0156] It should be understood that parts of the present application can be realized by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0157] The above describes only specific embodiments of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
[0158] The present application provides a computer readable storage medium having stored thereon computer readable program instructions (i.e. computer programs) for executing the mode switching method of the variable optothermal integrated Carnot cell in the above embodiment.
[0159] The computer readable storage medium provided in the application may be, for example, a U disk, but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, system or device, or any combination of the above. More specific examples of the computer readable storage medium may include, but are not limited to, an electrical connection with one or more conductive wires, a portable computer disk, a hard disk, a RAM (Random Access Memory), a ROM (Read Only Memory), an EPROM (Erasable Programmable Read Only Memory or flash memory), an optical fiber, a CD-ROM (CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present embodiment, the computer readable storage medium may be any tangible medium containing or storing a program that can be used or combined with an instruction execution system, system or device. The program code contained on the computer readable storage medium can be transmitted by any suitable medium, including but not limited to electrical wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0160] The above computer readable storage medium may be included in the mode switching device of the variable photo-thermal integrated Carnot cell, or may exist separately without being assembled into the mode switching device of the variable photo-thermal integrated Carnot cell.
[0161] The above computer readable storage medium carries one or more programs, which, when executed by the mode switching device of the variable photo-thermal integrated Carnot cell, cause the mode switching device of the variable photo-thermal integrated Carnot cell to: preprocess historical data and to-be-predicted data containing solar radiation intensity, meteorological data, geographical data and device operation data, to obtain historical fusion feature data and to-be-predicted fusion feature data; construct a Transformer-LSTM deep learning prediction model according to a feature encoder module, a position encoding module, a multi-head self-attention mechanism module, a feedforward network, an LSTM feature enhancement module and a fully connected prediction layer; train the Transformer-LSTM deep learning prediction model according to the historical fusion feature data to obtain a target prediction model; process the to-be-predicted fusion feature data through the target prediction model to obtain a solar radiation intensity prediction value; when the solar radiation intensity prediction value belongs to a first preset intensity level, start the energy storage-energy release link of the medium-low temperature circulating unit; when the solar radiation intensity prediction value belongs to a second preset intensity level, start the energy storage-energy release link of the high temperature circulating unit, and complete the mode switching.
[0162] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0163] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of present application. In this regard, each block in the flow diagrams or block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and / or flow diagrams, and combinations thereof, can be implemented by special purpose hardware-based systems that perform the specified functions or operations, or combinations of special purpose hardware and computer instructions.
[0164] The modules involved in the embodiments of the present application can be implemented in software or hardware. In some cases, the names of the modules do not constitute a limitation on the modules themselves.
[0165] The readable storage medium provided by the present application is a computer readable storage medium, which stores computer readable program instructions (i.e. computer programs) for executing the mode switching method of the variable photo-thermal integrated Carnot cell, and can solve the technical problem of unstable output of a photo-thermal system caused by solar radiation fluctuation. Compared with the prior art, the computer readable storage medium provided by the present application has the same beneficial effects as the mode switching method of the variable photo-thermal integrated Carnot cell provided by the above embodiments, and will not be described here.
[0166] The application also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the mode switching method of the variable optothermal integrated Carnot cell as described above.
[0167] The computer program product provided by the application can solve the technical problem of unstable output of the optothermal system caused by the fluctuation of solar radiation. Compared with the prior art, the beneficial effects of the computer program product provided by the application are the same as those of the mode switching method of the variable optothermal integrated Carnot cell provided by the above-mentioned embodiments, and are not described here.
[0168] The above only describes some embodiments of the application, and does not limit the patent scope of the application. Any equivalent structural transformation made by using the content of the specification and drawings, or direct / indirect application in other related technical fields within the technical concept of the application is included in the patent protection scope of the application.
Claims
1. A method for mode switching of a variable opto-thermal integrated Carnot cell, characterized by, The method comprises: Preprocessing historical data and to-be-predicted data comprising solar radiation intensity, meteorological data, geographical data and equipment operation data to obtain historical fusion feature data and to-be-predicted fusion feature data; A Transformer-LSTM deep learning prediction model is constructed according to a feature encoder module, a position encoding module, a multi-head self-attention mechanism module, a feedforward network, an LSTM feature enhancement module and a fully connected prediction layer; The Transformer-LSTM deep learning prediction model is trained according to the historical fusion feature data to obtain a target prediction model; The to-be-predicted fusion feature data is processed by the target prediction model to obtain a solar radiation intensity prediction value; When the solar radiation intensity prediction value belongs to a first preset intensity level, an energy storage-energy release link of a medium-low temperature circulation unit is started, the first preset intensity level refers to a system-previously-set upper limit of a solar radiation intensity interval, when the solar radiation intensity prediction value is lower than the upper limit of the solar radiation intensity interval, it is determined as B-level irradiation, the medium-low temperature circulation unit comprises a low temperature circulation unit and a medium temperature circulation unit, the low temperature circulation unit refers to a low temperature evaporator, a compressor I, a heat exchanger I working medium side and a throttle valve I which are connected in series to form a low temperature circulation closed loop, in the medium temperature circulation unit, a medium temperature evaporator medium side is connected with a PTC heat collector, an outlet of a working medium side is connected with an inlet of a three-way valve II, an outlet of the three-way valve II is connected with a compressor II, a heat exchanger II working medium side, a throttle valve II, a three-way valve I and the medium temperature evaporator working medium side in series to form a medium temperature circulation closed loop, another outlet of the three-way valve I is connected with another inlet of the three-way valve II through a medium side of the heat exchanger I, a medium side of the heat exchanger II is connected with a medium temperature storage tank, a valve I, a working medium side of a heat exchanger III, a low temperature storage tank I and a valve II in series, a medium side of the heat exchanger III is connected with an expander I, a working medium side of a regenerator, a cooler, a pump and a medium side of the regenerator in series; When the solar radiation intensity prediction value belongs to a second preset intensity level, an energy storage-energy release link of a high temperature circulation unit is started to complete mode switching, the second preset intensity level refers to a system-previously-set lower limit of a high threshold value interval of solar radiation intensity, when the solar radiation intensity prediction value is higher than the lower limit of the high threshold value interval of solar radiation intensity, it is determined as A-level irradiation, the high temperature circulation unit refers to a steam-molten salt combined circulation subsystem composed of a PTC heat collector, a compressor III, a heat exchanger IV, a high pressure storage tank, a valve III, a heat exchanger V, an expander II, a valve IV, a high temperature storage tank and a low temperature storage tank II, a molten salt loop, in the high temperature circulation unit, the PTC heat collector is connected with the compressor III, a working medium side of the heat exchanger IV, the high pressure storage tank, the valve III, a working medium side of the heat exchanger V and the expander II in series, the valve IV is connected with a medium side of the heat exchanger IV, the high temperature storage tank, a valve V and the low temperature storage tank II in series.
2. The method of claim 1, wherein, The steps of constructing the Transformer-LSTM deep learning prediction model according to the feature encoder module, the position encoding module, the multi-head self-attention mechanism module, the feedforward network, the LSTM feature enhancement module and the fully connected prediction layer include: Initializing a model framework, defining input dimensions and output dimensions; Adding a feature encoder module in the model framework, configuring a linear transformation layer in the feature encoder module to match the input dimensions; Adding a position encoding module at the output end of the feature encoder module, the position encoding module generating time position markers through a sine and cosine function; Constructing a Transformer encoder layer at the output end of the position encoding module, the Transformer encoder layer including a multi-head self-attention mechanism module and a feedforward network; Adding an LSTM feature enhancement module at the output end of the Transformer encoder layer, the LSTM feature enhancement module being configured as a long short-term memory network; Adding a fully connected prediction layer at the output end of the LSTM feature enhancement module, setting the number of output neurons in the fully connected prediction layer to match the output dimensions; Obtaining a Transformer-LSTM deep learning prediction model by connecting the feature encoder module, the position encoding module, the Transformer encoder layer, the LSTM feature enhancement module and the fully connected prediction layer in series through a residual connection and a layer normalization operation.
3. The method of claim 1, wherein, The target prediction model includes a feature encoder module, a position encoding module, a multi-head self-attention mechanism module, a feedforward network, an LSTM feature enhancement module and a fully connected prediction layer; The steps of processing the to-be-predicted fusion feature data through the target prediction model to obtain a solar radiation intensity prediction value include: Performing linear transformation on the to-be-predicted fusion feature data through the feature encoder module to obtain dimension-aligned features; Adding sine and cosine position markers to the dimension-aligned features through the position encoding module to obtain position encoding features; Extracting cross-variable dependency relationships of the position encoding features through the multi-head self-attention mechanism module to obtain global dependency features; Performing nonlinear mapping on the global dependency features through the feedforward network to obtain enhanced features; Capturing time series fluctuation rules of the enhanced features through the LSTM feature enhancement module to obtain short-term fluctuation features; Mapping the short-term fluctuation features to a solar radiation intensity prediction value through the fully connected prediction layer.
4. The method of claim 3, wherein, The steps of adding sine and cosine position markers to the dimension-aligned features through the position encoding module to obtain position encoding features include: Generating a position index based on the timestamp of the to-be-predicted fusion feature data; Calculating a sine component and a cosine component through a sine and cosine function according to the position index; Concatenating the sine component and the cosine component into a position embedding vector; Adding the position embedding vector to the dimension-aligned features through the position encoding module to obtain position encoding features.
5. The method of claim 3, wherein, The step of extracting the cross-variable dependency relationship of the position encoding feature through the multi-head self-attention mechanism module includes: Mapping the position encoding feature into a query vector, a key vector, and a value vector through the multi-head self-attention mechanism module; Calculating a scaled dot-product attention weight based on a dot product operation of the query vector and the key vector, in combination with a dimension of the key vector; Performing weighted summation on the value vector based on the scaled dot-product attention weight to obtain a weighted feature of each attention head in the multi-head self-attention mechanism module; Concatenating the weighted features of all the attention heads to obtain a concatenation result; Performing linear mapping on the concatenation result to obtain a global dependency feature.
6. The method of claim 1, wherein, The step of training the Transformer-LSTM deep learning prediction model according to the historical fusion feature data to obtain a target prediction model includes: Dividing the historical fusion feature data into a training set and a validation set; Processing the training set through a sliding window mechanism to obtain an input sequence and a prediction target sequence; Inputting the input sequence into the Transformer-LSTM deep learning prediction model to obtain a prediction result; Calculating a mean squared error loss between the prediction result and the prediction target sequence; Updating parameters of the Transformer-LSTM deep learning prediction model through an adaptive moment estimation algorithm according to the mean squared error loss; Using the validation set to calculate the mean squared error loss to obtain a validation loss; When the validation loss does not satisfy a preset condition, returning to the step of inputting the input sequence into the Transformer-LSTM deep learning prediction model to obtain a prediction result until the validation loss satisfies the preset condition to obtain a target prediction model.
7. The method of any one of claims 1 to 6, wherein, The step of preprocessing historical data and to-be-predicted data containing solar radiation intensity, meteorological data, geographical data, and equipment operation data to obtain historical fusion feature data and to-be-predicted fusion feature data includes: Performing anomaly detection and spatial interpolation processing on the historical data and the to-be-predicted data containing solar radiation intensity, meteorological data, geographical data, and equipment operation data to obtain historical continuous feature data and to-be-predicted continuous feature data; Normalizing the historical continuous feature data and the to-be-predicted continuous feature data to obtain historical normalized features and to-be-predicted normalized features; Calculating a Pearson correlation coefficient of the historical normalized features and the to-be-predicted normalized features and solar radiation intensity to obtain a historical feature weight factor and a to-be-predicted feature weight factor; Selecting the normalized features according to the historical feature weight factor, the to-be-predicted feature weight factor, and a preset weight threshold to form a historical high-weight feature subset and a to-be-predicted high-weight feature subset; Concatenating the historical high-weight feature subset and the to-be-predicted high-weight feature subset into three-dimensional tensors according to time steps to obtain historical fusion feature data and to-be-predicted fusion feature data.
8. A mode switching device for a variable optothermal integrated Carnot cell, characterized by The device includes: The preprocessing module is configured to preprocess historical data and to-be-predicted data containing solar radiation intensity, meteorological data, geographical data and equipment operation data to obtain historical fusion feature data and to-be-predicted fusion feature data. The model construction module is configured to construct a Transformer-LSTM deep learning prediction model according to the feature encoder module, the position encoding module, the multi-head self-attention mechanism module, the feedforward network, the LSTM feature enhancement module and the fully connected prediction layer. The model training module is configured to train the Transformer-LSTM deep learning prediction model according to the historical fusion feature data to obtain a target prediction model. The prediction module is configured to process the to-be-predicted fusion feature data through the target prediction model to obtain a solar radiation intensity prediction value. The low-temperature mode module is configured to start an energy storage-energy release link of a low-temperature circulation unit when the solar radiation intensity prediction value belongs to a first preset intensity level, the first preset intensity level refers to an upper limit of a solar radiation intensity interval preset by the system, and the low-temperature circulation unit includes a low-temperature circulation unit and a medium-temperature circulation unit, the low-temperature circulation unit refers to a low-temperature closed loop formed by a low-temperature evaporator, a compressor I, a heat exchanger I, a working medium side, a throttling valve I and a medium-temperature circulation unit, the medium-temperature circulation unit refers to a medium-temperature closed loop formed by a medium-temperature evaporator, a PTC heat collector, a three-way valve II, a compressor II, a heat exchanger II, a working medium side, a throttling valve II, a three-way valve I, the medium-temperature evaporator and a working medium side, the three-way valve I is connected to the three-way valve II through the heat exchanger I and the medium-temperature evaporator, the heat exchanger II is connected to a medium-temperature storage tank, a valve I, a heat exchanger III, a low-temperature storage tank I and a valve II in sequence, and the heat exchanger III is connected to an expander I, a working medium side of a regenerator, a cooler, a pump and a working medium side of the regenerator in sequence. The high-temperature mode module is configured to start an energy storage-energy release link of a high-temperature circulation unit to complete mode switching when the solar radiation intensity prediction value belongs to a second preset intensity level, the second preset intensity level refers to a lower limit of a high threshold value interval of solar radiation intensity preset by the system, the high-temperature circulation unit refers to a steam-molten salt combined circulation subsystem composed of a PTC heat collector, a compressor III, a heat exchanger IV, a high-pressure storage tank, a valve III, a heat exchanger V, an expander II, a valve IV, a high-temperature storage tank and a low-temperature storage tank II and a molten salt loop, and the PTC heat collector is connected to the compressor III, a working medium side of the heat exchanger IV, the high-pressure storage tank, the valve III, a working medium side of the heat exchanger V and the expander II in sequence, the valve IV is connected to the heat exchanger IV, the high-temperature storage tank, a valve V and the low-temperature storage tank II in sequence.
9. A mode switching device for a variable optothermal integrated Carnot cell, characterized by The device comprises a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the mode switching method of the variable optothermal integrated Carnot cell according to any one of claims 1 to 7.
10. A storage medium, characterized by The storage medium is a computer readable storage medium, and the storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the mode switching method of the variable optothermal integrated Carnot cell according to any one of claims 1 to 7.