Mode switching method, device and equipment of variable photo-thermal integrated Carnot cell and storage medium
By using a Transformer-LSTM deep learning model to predict solar radiation intensity and dynamically switch the mode of the integrated Carnot solar cell, the instability of the solar thermal system caused by solar radiation fluctuations is solved, and the system achieves stable and adjustable output and efficient energy utilization.
Patent Information
- Application Number
- CN202511386671.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-26
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2045-09-26
AI Technical Summary
Fluctuations in solar radiation lead to unstable output of solar thermal systems. Existing Carnot battery systems frequently switch erroneously or with delays, resulting in a mismatch between the heat storage medium and the working fluid, an imbalance between compressor power consumption and expander output, and the inability to fully utilize the cascaded heat.
The Transformer-LSTM deep learning prediction model is used to make predictions based on solar radiation intensity, meteorological data, and geographical data. The model dynamically adjusts the mode switching of the solar thermal integrated Carnot cell. The model is constructed 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 future radiation intensity. The energy storage-release link of the low temperature or high temperature cycle unit is switched according to the prediction value.
This system achieves stable and adjustable power output under fluctuating solar radiation conditions, improving system efficiency and optimizing energy distribution while reducing output power fluctuations.
Smart Images

Figure CN120879690A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of solar thermal energy storage technology, and in particular to a mode switching method, apparatus, device and storage medium for a variable solar thermal integrated Carnot battery. Background Technology
[0002] Solar thermal power generation is expected to undertake grid peak shaving and long-term energy storage tasks, but its output is directly affected by the intermittency and fluctuation of solar radiation. In order to provide stable and controllable power in complex scenarios with different irradiance intensities, day-night cycles, and variable load demands, there is an urgent need for a solar thermal integrated system that can dynamically adjust its operation mode based on real-time and predicted irradiance information to achieve energy cascade storage and efficient conversion.
[0003] Current practices generally adopt the "Carnot battery" approach, which arranges three compression-expansion cycles—low temperature, medium temperature, and high temperature—in parallel or series, and controls the flow of valves, compressors, and heat storage media using fixed thresholds or simple rules: when the measured irradiance is higher than the set upper limit, the high temperature cycle is switched on, converting excess solar energy into high-pressure steam and sensible heat from molten salt; when the measured irradiance is lower than the set lower limit, the cycle switches back to the medium and low temperature cycle, using the sensible heat from the heat transfer oil and the electrically driven compressor for energy storage / release; the entire switching logic is solidified in the controller by the operator's experience or a basic PID algorithm.
[0004] Because the random fluctuations in solar radiation are much faster than the response speed of fixed thresholds or simple rules, the system frequently experiences erroneous or delayed switching, leading to a mismatch in temperature and pressure between the heat storage medium and the working fluid. This results in an imbalance between compressor power consumption and expander output, and the cascaded heat cannot be fully utilized, ultimately manifesting as significant fluctuations in output power. Therefore, the instability of solar thermal system output caused by the volatility of solar radiation has become an urgent problem to be solved.
[0005] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention
[0006] The purpose of this application is to provide a mode switching method, apparatus, device and storage medium for a variable photothermal integrated Carnot cell, aiming to solve the technical problem of unstable output of the photothermal system caused by the fluctuation of solar radiation.
[0007] To achieve the above objectives, this application proposes a mode switching method for a variable photothermal integrated Carnot solar cell, the method comprising: Historical data and data to be predicted, including solar radiation intensity, meteorological data, geographical data and equipment operation data, are preprocessed to obtain historical fusion feature data and data to be predicted fusion feature data. A Transformer-LSTM deep learning prediction model is constructed based on the feature encoder module, position encoding module, multi-head self-attention mechanism module, feedforward network, LSTM feature enhancement module, and fully connected prediction layer. The Transformer-LSTM deep learning prediction model is trained based on the historical fusion feature data to obtain the target prediction model; The target prediction model is used to process the fused feature data to be predicted to obtain the predicted value of solar radiation intensity. When the predicted solar radiation intensity value is within the first preset intensity level, the energy storage-release link of the low-temperature cycle unit is activated; When the predicted solar radiation intensity value is within the second preset intensity level, the energy storage-release link of the high-temperature cycle unit is activated to complete the mode switch.
[0008] In one embodiment, the step of constructing a Transformer-LSTM deep learning prediction model based on the feature encoder module, position encoding module, multi-head self-attention mechanism module, feedforward network, LSTM feature enhancement module, and fully connected prediction layer includes: Initialize the model framework, defining the input and output dimensions; 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 dimension; A position encoding module is added to the output of the feature encoder module. The position encoding module generates time position markers through sine and cosine functions. A Transformer encoder layer is constructed at the output of the position encoding module. The Transformer encoder layer includes a multi-head self-attention mechanism module and a feedforward network. An LSTM feature enhancement module is added to the output of the Transformer encoder layer, and the LSTM feature enhancement module is configured as a long short-term memory network. A fully connected prediction layer is added to the output of the LSTM feature enhancement module, and the number of output neurons in the fully connected prediction layer is set to match the output dimension. The feature encoder module, the position encoding module, the Transformer encoder layer, the LSTM feature enhancement module, and the fully connected prediction layer are concatenated by residual connections and layer normalization operations to obtain the Transformer-LSTM deep learning prediction model.
[0009] In one embodiment, 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 step of processing the fused feature data to be predicted using the target prediction model to obtain the predicted value of solar radiation intensity includes: The feature encoder module performs a linear transformation on the fused feature data to be predicted to obtain dimension-aligned features. The position encoding module adds sine and cosine position markers to the dimension alignment features to obtain the position encoded features; The cross-variable dependencies of the positional encoding features are extracted through the multi-head self-attention mechanism module to obtain global dependency features; Enhanced features are obtained by performing a nonlinear mapping on the globally dependent features through the feedforward network. The LSTM feature enhancement module captures the temporal fluctuation pattern of the enhanced features to obtain short-term fluctuation features; The short-term fluctuation characteristics are mapped to predicted values of solar radiation intensity through the fully connected prediction layer.
[0010] In one embodiment, the step of adding sine and cosine position markers to the dimension alignment features through the position encoding module to obtain position-encoded features includes: A location index is generated based on the timestamps of the fused feature data to be predicted; Based on the position index, the sine and cosine components are calculated using sine and cosine functions; The sine component and the cosine component are concatenated into a position embedding vector; The location embedding vector is added to the dimension alignment feature by the location encoding module to obtain the location encoded feature.
[0011] In one embodiment, the step of extracting the intervariate dependencies of the positional encoding features through the multi-head self-attention mechanism module to obtain global dependency features includes: The multi-head self-attention mechanism module maps the positional encoding features into query vectors, key vectors, and value vectors. Based on the dot product operation between the query vector and the key vector, the scaled dot product attention weight is calculated in combination with the dimension of the key vector; The value vector is weighted and summed based on the scaled dot product attention weights to obtain the weighted features of each attention head in the multi-head self-attention mechanism module; The weighted features of all the attention heads are concatenated to obtain the concatenated result; A linear mapping is performed on the splicing result to obtain global dependency features.
[0012] In one embodiment, the step of training the Transformer-LSTM deep learning prediction model based on the historical fusion feature data to obtain the target prediction model includes: The historical fusion feature data is divided into a training set and a validation set; The training set is processed using a sliding window mechanism to obtain the input sequence and the predicted target sequence; The input sequence is fed into the Transformer-LSTM deep learning prediction model to obtain the prediction result; Calculate the mean squared error loss between the prediction result and the predicted target sequence; Based on the mean squared error loss, the parameters of the Transformer-LSTM deep learning prediction model are updated using an adaptive moment estimation algorithm; The validation loss is obtained by calculating the mean squared error loss using the validation set. If the verification loss does not meet the preset conditions, return to the step of inputting the input sequence into the Transformer-LSTM deep learning prediction model to obtain the prediction result, until the verification loss meets the preset conditions and the target prediction model is obtained.
[0013] In one embodiment, the step of preprocessing historical data and data to be predicted, including solar radiation intensity, meteorological data, geographical data, and equipment operation data, to obtain historical fused feature data and data to be predicted fused feature data includes: Anomaly detection and spatial interpolation are performed on historical data and data to be predicted, which include solar radiation intensity, meteorological data, geographical data and equipment operation data, respectively, to obtain historical continuous feature data and data to be predicted continuous feature data. The historical continuous feature data and the continuous feature data to be predicted are normalized to obtain historical normalized features and to-be predicted normalized features; Calculate the Pearson correlation coefficients between the historical normalized features and the predicted normalized features and solar radiation intensity to obtain the historical feature weighting factor and the predicted feature weighting factor. The normalized features are selected based on the historical feature weighting factor, the feature weighting factor to be predicted, and the preset weighting threshold to form a subset of historical high-weight features and a subset of feature weighting to be predicted. The historical high-weight feature subset and the high-weight feature subset to be predicted are concatenated into a three-dimensional tensor according to the time step to obtain the historical fused feature data and the fused feature data to be predicted.
[0014] Furthermore, to achieve the above objectives, this application also proposes a mode switching device for a variable photothermal integrated Carnot cell, the device comprising: The preprocessing module is used to preprocess historical data and data to be predicted, which include solar radiation intensity, meteorological data, geographical data and equipment operation data, to obtain historical fusion feature data and data to be predicted fusion feature data. The model building module is used to build a Transformer-LSTM deep learning prediction model based on the feature encoder module, position encoding module, multi-head self-attention mechanism module, feedforward network, LSTM feature enhancement module and fully connected prediction layer; The model training module is used to train the Transformer-LSTM deep learning prediction model based on the historical fusion feature data to obtain the target prediction model; The prediction module is used to process the fused feature data to be predicted through the target prediction model to obtain the predicted value of solar radiation intensity. The low-temperature mode module is used to activate the energy storage-release link of the medium-low temperature cycle unit when the predicted value of solar radiation intensity is within the first preset intensity level. The high-temperature mode module is used to activate the energy storage-release link of the high-temperature cycle unit and complete the mode switching when the predicted value of solar radiation intensity belongs to the second preset intensity level.
[0015] Furthermore, to achieve the above objectives, this application also proposes a mode switching device for a variable photothermal integrated Carnot cell, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the mode switching method for the variable photothermal integrated Carnot cell as described above.
[0016] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the mode switching method for the variable photothermal integrated Carnot cell as described above.
[0017] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the mode switching method for the variable photothermal integrated Carnot cell as described above.
[0018] One or more technical solutions proposed in this application have at least the following technical effects: The variable photothermal integrated Carnot solar cell system first preprocesses historical and predicted radiation, meteorological, geographical, and equipment data to form high signal-to-noise ratio historical and predicted fusion features, making the subsequent model input cleaner and more focused. Then, a Transformer-LSTM target prediction model is built and trained using a feature encoder, position encoder, multi-head self-attention, feedforward network, LSTM enhancement module, and fully connected layer. End-to-end learning is completed using the historical fusion features, and after convergence on the validation set, the model possesses a high-precision prediction capability for future radiation intensity. Finally, the target prediction model processes the real-time predicted fusion features to obtain the solar radiation intensity. The system calculates the solar radiation intensity prediction value. When the predicted value falls within the first preset intensity level, the system immediately activates the energy storage-release link of the low-temperature cycle unit. During the day, surplus electricity and low-to-medium temperature solar energy are used to heat and store the heat transfer oil. At night, the reverse flow drives the expander to generate electricity. When the predicted value falls within the second preset intensity level, the system switches to the high-temperature cycle unit. During the day, the high-pressure steam heat is stored in the molten salt. At night, the reheated steam drives the expander to do work, achieving efficient energy storage and release. This embodiment transforms the output uncertainty caused by solar radiation fluctuations into stable and adjustable electrical energy output through a closed loop of prediction-decision-execution, achieving optimal allocation of solar thermal resources and maximizing system efficiency. Attached Figure Description
[0019] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0020] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a flowchart illustrating the mode switching method of the variable photothermal integrated Carnot cell provided in Embodiment 1 of this application; Figure 2 This is a schematic diagram of the framework of the Transformer-LSTM deep learning prediction model provided in Embodiment 1 of the mode switching method for the variable photothermal integrated Carnot cell of this application. Figure 3 This is a schematic diagram of the structure of the variable photothermal integrated Carnot battery system provided in Embodiment 1 of the mode switching method of the variable photothermal integrated Carnot battery of this application; Figure 4 This is a flowchart illustrating the second embodiment of the mode switching method for the variable photothermal integrated Carnot cell of this application. Figure 5This is a schematic diagram of the module structure of the mode switching device for the variable photothermal integrated Carnot cell according to an embodiment of this application; Figure 6 This is a schematic diagram of the device structure of the hardware operating environment involved in the mode switching method of the variable photothermal integrated Carnot cell in the embodiments of this application.
[0022] Explanation of icon numbers: 1. Low-temperature evaporator; 2. Compressor I; 3. Heat exchanger I; 4. Throttling valve I; 5. Three-way valve I; 6. Medium-temperature evaporator; 7. Three-way valve II; 8. Compressor II; 9. Heat exchanger II; 10. Throttling 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 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.
[0023] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0024] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0025] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0026] It should be noted that the executing entity of this application embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device capable of realizing the above functions, such as a variable photothermal integrated Carnot battery system. The following uses a variable photothermal integrated Carnot battery system as an example to describe this embodiment and the following embodiments.
[0027] Based on this, embodiments of this application provide a mode switching method for a variable photothermal integrated Carnot solar cell, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the mode switching method for the variable photothermal integrated Carnot cell of this application.
[0028] In this embodiment, the mode switching method of the variable photothermal integrated Carnot cell includes steps S10~S60: Step S10: Preprocess the historical data and the data to be predicted, which include solar radiation intensity, meteorological data, geographical data and equipment operation data, to obtain historical fusion feature data and the data to be predicted fusion feature data.
[0029] It should be noted that solar radiation intensity refers to the solar radiation energy received per unit time and per unit area. Meteorological data refers to atmospheric state quantities related to solar radiation, including pressure, temperature, humidity, wind speed, precipitation, visibility, etc. Geographic data refers to fixed spatial information about the location of the station, including latitude and longitude, altitude, topographic shading angle, surface albedo, etc. Equipment operation data refers to the real-time operating conditions of the solar thermal system, including collector outlet temperature, tank temperature, valve opening, compressor power consumption, etc. Historical data refers to solar radiation intensity, meteorological, geographical, and equipment operation data continuously collected within past time windows. Data to be predicted refers to the latest meteorological, geographical, and equipment operation data corresponding to the need to predict solar radiation intensity at a future time or period. Historical fusion feature data refers to a high-dimensional joint feature vector formed by correlation screening and feature fusion of historical data, used to train the prediction model. Fusion feature data to be predicted refers to a high-dimensional joint feature vector obtained by transforming the data to be predicted according to the same fusion rules, used as input to the trained model for inference.
[0030] As an example, the step of preprocessing historical data and data to be predicted, which include solar radiation intensity, meteorological data, geographical data, and equipment operation data, to obtain historical fused feature data and data to be predicted fused feature data includes: performing anomaly detection and spatial interpolation on the historical data and data to be predicted, respectively, to obtain historical continuous feature data and data to be predicted continuous feature data; normalizing the historical continuous feature data and the data to be predicted continuous feature data to obtain historical normalized features and data to be predicted normalized features; calculating the Pearson correlation coefficient between the historical normalized features and the data to be predicted normalized features and solar radiation intensity to obtain historical feature weighting factors and data to be predicted feature weighting factors; selecting the normalized features according to the historical feature weighting factors, the data to be predicted feature weighting factors, and a preset weight threshold to form a historical high-weight feature subset and a data to be predicted high-weight feature subset; and concatenating the historical high-weight feature subset and the data to be predicted high-weight feature subset into a three-dimensional tensor according to the time step to obtain historical fused feature data and data to be predicted fused feature data.
[0031] Historical continuous feature data refers to a complete feature matrix that is free of missing values and spatiotemporally continuous, obtained by removing outliers and spatial interpolating the original multidimensional observation sequence within a historical period. Continuous feature data to be predicted refers to a complete feature matrix that is free of missing values, obtained by performing the same outlier removal and spatial interpolation on the original multidimensional observation sequence for a future period. Historical normalized features refer to a dimensionless feature matrix obtained by compressing historical continuous feature data to a fixed interval at a uniform scale. Normalized features to be predicted refer to a dimensionless feature matrix obtained by compressing continuous feature data to be predicted to a fixed interval at the same scale. The Pearson correlation coefficient is a dimensionless index that measures the degree of linear correlation between each feature variable and solar radiation intensity, ranging from -1 to 1. Historical feature weighting factors refer to the absolute value of the Pearson correlation coefficient between each feature variable in the historical normalized features and solar radiation intensity. Weighting factors for features to be predicted refer to the absolute value of the Pearson correlation coefficient between each feature variable in the normalized features to be predicted and solar radiation intensity. Preset weight thresholds refer to pre-set lower limits for the Pearson coefficient used to select highly correlated features. A historical high-weight feature subset refers to a submatrix formed by retaining only feature variables with weight factors higher than a preset threshold from historical normalized features. A high-weight feature subset to be predicted refers to a submatrix formed by retaining only feature variables with weight factors higher than a preset threshold from the normalized features to be predicted. A three-dimensional tensor is a three-dimensional data structure formed by stacking high-weight feature subsets according to sample, time step, and feature dimensions.
[0032] First, the variable photothermal integrated Carnot solar cell system calls its built-in anomaly detection module to traverse the data to be predicted and historical data, using 3 The system removes solar radiation-meteorological-geographical-equipment observation points exceeding three standard deviations and uses inverse distance weighted interpolation within the same minute-level grid to fill in missing values, ensuring that subsequent models are not affected by outliers or gaps. Then, the system performs min-max normalization column-by-column on the cleaned continuous feature matrix, linearly mapping each variable to the [0,1] interval to eliminate dimensional differences and prevent high-amplitude variables from masking small-scale but crucial meteorological factors in subsequent correlation calculations. Next, the system calculates the Pearson correlation coefficient between each normalized feature dimension and the corresponding solar radiation intensity in parallel, taking its absolute value as a weighting factor. Based on a preset threshold of 0.45, it automatically filters and retains highly correlated features, eliminating redundant dimensions to reduce model complexity and overfitting risk. Finally, the system concatenates the filtered historical and predicted high-weight feature subsets along the "sample × time step × feature" sequence into a unified three-dimensional tensor, using a sliding window of 24 steps and a step size of 1 step, as the direct input to the Transformer-LSTM prediction network, achieving seamless data format integration between historical training and future inference.
[0033] In one alternative implementation, the sliding window mechanism includes the following processing: using a fixed window length window, slicing historical data to construct a training tensor of shape (N - window - length_size + 1, window + length_size, number of variables), and separating the input sequence and the target sequence from the tensor.
[0034] Step S20: Construct a Transformer-LSTM deep learning prediction model based on the feature encoder module, position encoding module, multi-head self-attention mechanism module, feedforward network, LSTM feature enhancement module, and fully connected prediction layer.
[0035] It should be noted that the feature encoder module refers to a network layer that uniformly transforms the input multidimensional temporal features into the high-dimensional representation space of the model through a learnable linear mapping. The position encoding module refers to an additive encoding structure that uses sine and cosine functions to generate a unique position vector for each time step in the sequence and superimposes it onto the feature vector. The multi-head self-attention mechanism module refers to an attention subnetwork that computes multiple sets of query-key-value attention weights in parallel to capture global dependencies between variables. The feedforward network refers to a point-based fully connected mapping layer that performs two linear transformations and adds non-linear activation to the attention output. The LSTM (Long Short-Term Memory) feature enhancement module refers to a Long Short-Term Memory network located after the Transformer encoding, used to further extract local temporal dynamic features. The fully connected prediction layer refers to the output layer that linearly maps the enhanced hidden states to the final predicted value of solar radiation intensity. The Transformer-LSTM deep learning prediction model refers to an end-to-end temporal regression network composed of the above six modules stacked in the order of encoding-enhancement-prediction.
[0036] Please refer to Figure 2 , Figure 2This diagram illustrates the framework of the Transformer-LSTM deep learning prediction model provided in Embodiment 1 of the mode switching method for the variable photothermal integrated Carnot battery of this application. The model consists of an input layer, an encoder, a decoder, and an output layer. The input data first passes through an input embedding layer, converting the raw data into an embedded representation that the model can process. Subsequently, positional encoding is added to provide positional information for each element in the sequence, which is crucial for the model to understand the temporal structure of the sequence. The encoder consists of multiple identical stacked layers, each including a multi-head attention mechanism, a feedforward network (FFN), residual connections, and layer normalization (Add & Norm), used to extract features from the input data and capture dependencies within the sequence. The decoder includes an LSTM (Long Short-Term Memory) layer to capture the temporal dynamics of the sequence, and a feedforward network and residual connection layer normalization structure for further processing the decoder output. Finally, the decoder's output is transformed into the final predicted output through a linear layer and a normalized exponential layer (Softmax layer). This structure enables the entire model to achieve a deep understanding and effective prediction of the input sequence, particularly excelling when dealing with time-dependent data.
[0037] As an example, the steps of constructing a Transformer-LSTM deep learning prediction model based on 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 include: initializing the model framework and defining the input and output dimensions; adding a feature encoder module to the model framework and configuring a linear transformation layer in the feature encoder module to match the input dimensions; adding a position encoding module at the output of the feature encoder module, wherein the position encoding module generates time position markers through sine and cosine functions; and constructing a Transformer encoder layer at the output of the position encoding module. The Transformer encoder layer includes a multi-head self-attention mechanism module and a feedforward network. An LSTM feature enhancement module is added to the output of the Transformer encoder layer, and the LSTM feature enhancement module is configured as a long short-term memory network. A fully connected prediction layer is added to the output of the LSTM feature enhancement module, and the number of output neurons in the fully connected prediction layer is set to match the output dimension. The feature encoder module, the position encoding module, the Transformer encoder layer, the LSTM feature enhancement module, and the fully connected prediction layer are concatenated through residual connections and layer normalization operations to obtain the Transformer-LSTM deep learning prediction model.
[0038] The model framework refers to a blank network skeleton pre-built by the variable photothermal integrated Carnot battery system, capable of accommodating various functional sub-modules and sequentially assembled. The input dimension refers to the size of the last dimension of the multi-dimensional temporal feature tensor fed into the model at one time, equal to the total number of features after fusion. The output dimension refers to the total number of time steps for the predicted solar radiation intensity value that the model ultimately needs to output. The linear transformation layer is a fully connected mapping layer composed of a weight matrix and a bias vector, used to transform an input vector of arbitrary dimension into the target dimension. The sine and cosine functions are periodic pairs of sin and cosine functions, used to generate a unique position vector for each position in the sequence that changes smoothly with position. The temporal position marker is a vector value directly calculated by the sine and cosine functions, added to the original features to express the chronological order of time steps. The Transformer encoder layer is a sub-network unit composed of multi-head self-attention and a feedforward network, used to extract long-range dependency features between variables. The Long Short-Term Memory (LSTM) network is a recurrent structure containing input gates, forget gates, and output gates, used to capture the short- to medium-term temporal dynamics of the sequence. The number of output neurons refers to the number of columns in 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 solar radiation intensity points to be predicted.
[0039] First, the variable photothermal integrated Carnot battery system calls its internal configurator during model initialization, explicitly passing in the parameters "fusion feature dimension = 40" and "prediction step size = 24" to create an empty network container and lock the tensor shape, avoiding memory waste caused by later dynamic rearrangement. Second, the system sequentially inserts the following into the container: ① A feature encoder module, whose linear layer weights are uniformly initialized using Xavier, mapping the 40-dimensional input to a 256-dimensional latent space in one go, ensuring sufficient interaction of subsequent multi-head attention in high dimensions; ② A position encoding module, generating sin-cos position vectors according to sequence length and adding them element-wise, enabling the model to distinguish between early and late irradiation differences; ③ Two Transformer encoder layers, each layer first performing multi-head attention (8 heads, dropout 0.1) and then feedforward (256→1024→256, GELU), with residuals and layer normalization ensuring gradient stability; ④ A single-layer unidirectional LSTM (256 hidden, 1 The system extracts short-term fluctuations within 24 steps on top of the global dependencies to improve the response to rapid cloud cover; the fully connected prediction layer (256→24) is initialized with zero bias weights and directly outputs the predicted solar radiation values for the next 24 steps; finally, the system packages the above modules into an nn.Sequential object according to the residual-normalized link and saves it as a .pt file for reuse in subsequent training and inference.
[0040] Step S30: Train the Transformer-LSTM deep learning prediction model based on the historical fusion feature data to obtain the target prediction model.
[0041] It should be noted that the target prediction model refers to a Transformer-LSTM network that has been fully trained and converged using historical fusion feature data, and has the ability to make high-precision predictions of future solar radiation intensity.
[0042] As an example, the step of training the Transformer-LSTM deep learning prediction model based on the historical fusion feature data to obtain the target prediction model includes: dividing the historical fusion feature data into a training set and a validation set; processing the training set using 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 squared error loss between the prediction result and the prediction target sequence; updating the parameters of the Transformer-LSTM deep learning prediction model using an adaptive moment estimation algorithm based on the mean squared error loss; calculating the mean squared error loss using the validation set to obtain a validation loss; and when the validation loss does not meet 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 meets the preset condition, thus obtaining the target prediction model.
[0043] The input sequence refers to the continuous multi-step observation tensor used as model input from the historical fused feature data truncated by the sliding window. The prediction target sequence refers to the ground truth tensor of future solar radiation intensity immediately following the input sequence within the same sliding window. The prediction result refers to the tensor of estimated future solar radiation intensity values output by the Transformer-LSTM model based on the input sequence. The validation loss refers to the mean squared error loss value calculated on the validation set. The preset condition is that the early stopping criterion is met if the validation loss no longer decreases or falls below a set threshold for several consecutive rounds.
[0044] First, the variable photothermal integrated Carnot solar cell system randomly shuffles all historical fused feature data at an 8:2 ratio, using the first 80% as the training set and the last 20% as the validation set, with a fixed random seed to ensure reproducibility. Second, the system initiates a 24-step input-24-step output sliding window on the training set, with a step size of 1, generating input tensors of shape [N-47, 24, 40] and target tensors of shape [N-47, 24, 1]. Simultaneously, the validation set generates corresponding validation inputs and targets with the same window parameters, ensuring consistent training and validation distributions. Then, the input tensors are fed into the Transformer-LSTM model in batches of 64. After forward propagation to obtain the predicted values, the MSE loss is obtained by averaging the squared differences between the predicted and target tensors element-wise. The Adam optimizer is used during backpropagation with an initial learning rate of 1e-3. =0.9 ( This refers to the exponential decay rate of the first-order momentum (mean gradient) in the Adam optimizer. =0.999 ( This refers to the exponential decay rate of the second-order momentum (mean squared gradient) in the Adam optimizer. The model weights are updated synchronously after each update step to ensure a smooth gradient decrease. Finally, after each training round, the system performs a complete forward calculation using the validation set to obtain the validation loss. If the validation loss does not decrease for five consecutive rounds or its absolute value is below 1e-4, early stopping is triggered, and the current weight file is saved as "target_model.pt" as the final target prediction model, avoiding overfitting and ensuring generalization performance.
[0045] Step S40: The target prediction model is used to process the fused feature data to be predicted to obtain the predicted value of solar radiation intensity.
[0046] It should be noted that the predicted solar radiation intensity refers to the continuous numerical sequence of solar radiation power per unit area at future times, output by the target prediction model based on the fused feature data to be predicted.
[0047] Understandably, the variable photothermal integrated Carnot solar cell system will collect the fused feature data to be predicted in real time and, after undergoing the same fusion and normalization process, send it all at once into the pre-trained target prediction model. After model processing, the system will output a sequence of predicted solar radiation intensity values.
[0048] Please refer to Figure 3 , Figure 3 This is a schematic diagram of the variable solar thermal integrated Carnot battery system provided in Embodiment 1 of the mode switching method of the variable solar thermal integrated Carnot battery of this application. The diagram details the complex structure of the variable solar thermal integrated Carnot battery system and the connection relationships between its components. The system obtains energy from solar radiation, initially collects heat energy through the PTC collector 20, and then distributes it to three circulation units at different temperature levels. In the low-temperature circulation unit, the working fluid first evaporates in the low-temperature evaporator 1, then is compressed by the compressor I2, undergoes heat exchange through the heat exchanger I3, and after being depressurized by the throttling valve I4, enters the three-way valve I5.
[0049] The intermediate-temperature circulation unit receives the working fluid from the three-way valve II7, compresses it through the compressor II8, exchanges heat through the heat exchanger II9, reduces its pressure through the throttle valve II10, and then flows into the intermediate-temperature storage tank 11. In the intermediate-temperature storage tank 11, the working fluid exchanges heat with the heat transfer oil from the low-temperature storage tank I14 from the heat exchanger III13, then performs work through the expander I16, and finally completes the circulation through the regenerator 17 and the cooler 18, and is finally completed by the pump 19.
[0050] The high-temperature circulation unit directly obtains high-temperature heat energy from the PTC collector 20, compresses it through the compressor Ⅲ 21, exchanges heat through the heat exchanger Ⅳ 22, and stores it in the high-pressure storage tank 23. When energy release is required, the working fluid exchanges heat with the molten salt in the high-temperature storage tank 28 through the heat exchanger ⤔ 25, and then enters the expander Ⅱ 26 to do work, ultimately converting the heat energy into electrical energy.
[0051] The system also includes multiple valves, such as valve I12, valve II15, valve III24, valve IV27, and valve V29, to control the flow of the working fluid and ensure that the system can intelligently switch operating modes and optimize energy storage and release under different solar radiation intensity levels.
[0052] Specifically, the medium-temperature evaporator 6 is connected to the PTC collector 20 on the medium side, and its working fluid outlet is connected to the inlet of the three-way valve II 7, forming a closed-loop medium-temperature circulation system. The low-temperature storage tank II 30 and the high-temperature storage tank 28 are connected via valve V 29, ensuring that molten salt can flow between the two tanks during high-temperature circulation, achieving efficient storage and utilization of thermal energy. This design allows the system to dynamically adjust its operating strategy under different solar radiation intensities, thereby improving overall energy efficiency and system flexibility.
[0053] Step S50: When the predicted solar radiation intensity value is within the first preset intensity level, the energy storage-release link of the low-temperature cycle unit is activated.
[0054] It should be noted that the first preset intensity level refers to the upper limit of the solar radiation intensity range preset by the system. When the predicted value is lower than this upper limit, it is judged as Class B irradiation. The medium and low temperature circulation unit refers to the working fluid circulation subsystem composed of a low temperature evaporator, compressor I, heat exchanger I, throttle valve I, medium temperature evaporator, compressor II, heat exchanger II, throttle valve II, heat transfer 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 compressor I2, heat exchanger I3 (working fluid side), and throttle valve I4 to form a low temperature circulation closed loop. In the medium-temperature circulation unit, the medium-temperature evaporator 6 is connected to the PTC collector 20 on the medium side, and its working fluid outlet is connected to the inlet of the three-way valve II 7. The outlet of the three-way valve II 7 is connected in series with the compressor II 8, the working fluid side of the heat exchanger II 9, the throttle valve II 10, the three-way valve I 5, and the working fluid side of the medium-temperature evaporator 6 to form a medium-temperature circulation closed loop. The other outlet of the three-way valve I 5 is connected to the other inlet of the three-way valve II 7 via 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 fluid 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 fluid 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 fluid, the medium-temperature circulation unit uses R1233zd(e) as the working fluid, and the substances in the medium-temperature storage tank 11 and the low-temperature storage tank I14 are heat transfer oil.
[0055] The energy storage-release link refers to the complete energy conversion path in which excess electrical energy and solar thermal energy are used together during the day to drive a compressor to compress the working fluid and exchange heat with heat transfer oil for heat storage, and then the heat is released through the heat transfer oil at night to drive an expander to generate electricity.
[0056] Understandably, during the day when solar radiation intensity is at level B, the low-temperature circulation unit is activated, valve II15 is opened, and valve I12 is closed. The generator set, operating at higher power than electricity, drives compressors I2 and II8. The working fluid after throttling valve II10 absorbs heat from the low-temperature circulation working fluid and from the PTC collector 20 in heat exchanger I3 and the medium-temperature evaporator 6, respectively. After compression, the heat is absorbed by the heat transfer oil in the low-temperature storage tank I14, ending the energy storage process. Solar and electrical energy are converted into stored thermal energy. During peak nighttime electricity consumption, valve I12 is opened and valve II15 is closed. The working fluid absorbs heat from the molten salt in heat exchanger III13 and then enters expander I16 to perform work, ending the energy release process. Thermal energy is converted into electrical energy for output.
[0057] Step S60: When the predicted solar radiation intensity value is within the second preset intensity level, the energy storage-release link of the high-temperature cycle unit is activated to complete the mode switch.
[0058] It should be noted that the second preset intensity level refers to the high threshold range of solar radiation intensity preset by the system. When the predicted value is higher than the lower limit of this range, it is judged as Class A irradiation. The high-temperature circulation unit refers to the steam-molten salt combined cycle subsystem composed of a PTC collector, compressor III, heat exchanger IV, high-pressure storage tank, valve III, heat exchanger V, expander II, valve IV, high-temperature storage tank, low-temperature storage tank II, and molten salt circuit. In the high-temperature circulation unit, PTC collector 20 is connected in series with compressor III 21, heat exchanger IV 22 (working fluid side), high-pressure storage tank 23, valve III 24, heat exchanger V 25 (working fluid side), and expander II 26; valve IV 27 is connected in series with heat exchanger IV 22 (medium side), high-temperature storage tank 28, valve V 29, and low-temperature storage tank II 30. The high-pressure storage tank in the high-temperature circulation unit contains steam, and the substances in high-temperature storage tank 28 and low-temperature storage tank II 30 are molten salt.
[0059] Understandably, when the solar radiation intensity is Class A during the day, the high-temperature circulation unit is activated, valve IV27 is opened, and valves III24 and V29 are closed. The excess power from the generator set drives compressor III21. The high-temperature, high-pressure steam absorbs heat from the molten salt in the low-temperature storage tank II30 in the heat exchanger IV22 and then enters the high-pressure storage tank 23 for storage. The energy storage process ends, and solar and electrical energy are converted into pressure and thermal energy for storage. During peak electricity consumption at night, valves III24 and V29 are opened, and valve IV27 is closed. The steam in the high-pressure storage tank 23 absorbs heat from the molten salt and then enters the expander II26 to do work. The energy release process ends, and thermal and pressure energy are converted into electrical energy for output.
[0060] This embodiment provides a mode switching method for a variable photothermal integrated Carnot solar cell. The system first preprocesses historical and predicted radiation, meteorological, geographical, and equipment data to form high signal-to-noise ratio historical and predicted fusion features, resulting in cleaner and more focused inputs for subsequent models. Then, a Transformer-LSTM target prediction model is constructed and trained using a feature encoder, position encoder, multi-head self-attention, feedforward network, LSTM enhancement module, and fully connected layer. End-to-end learning is completed using the historical fusion features, and after convergence on the validation set, the model possesses a high-precision prediction capability for future radiation intensity. Finally, the target prediction model is used to process the actual data. The system uses predictive fusion characteristics to obtain a predicted value for solar radiation intensity. When the predicted value falls within the first preset intensity level, the system immediately activates the energy storage-release link of the low-temperature cycle unit. During the day, surplus electricity and low-to-medium temperature solar energy are used to heat and store heat in the thermal oil. At night, the reverse flow drives the expander to generate electricity. When the predicted value falls within the second preset intensity level, the system switches to the high-temperature cycle unit. During the day, the high-pressure steam heat is stored in the molten salt. At night, the reheated steam drives the expander to perform work, achieving efficient energy storage and release. This embodiment transforms the output uncertainty caused by solar radiation fluctuations into a stable and adjustable electrical output through a closed loop of prediction-decision-execution, achieving optimal allocation of solar thermal resources and maximizing system efficiency.
[0061] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in Embodiment 1 above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 4 , Figure 4 This is a flowchart illustrating the second embodiment of the mode switching method for the variable photothermal integrated Carnot solar cell of this application. 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. Step S40 of the mode switching method for the variable photothermal integrated Carnot solar cell includes steps S41 to S46: Step S41: The feature encoder module performs a linear transformation on the fused feature data to be predicted to obtain dimension-aligned features.
[0062] It should be noted that dimension-aligned features refer to the tensor representation of the fused feature data to be predicted, which, after being linearly mapped by the feature encoder module, has the same hidden dimensions as the Transformer-LSTM model.
[0063] Understandably, the variable photothermal integrated Carnot cell system feeds the fused feature data to be predicted in shape (batch, 24, 40) into the feature encoder module, calls its internal 256×40 weight matrix to perform matrix multiplication and add bias in one go, expands the last dimension from 40 to 256, and outputs a tensor of (batch, 24, 256), achieving direct alignment with the hidden dimensions of subsequent multi-head attention and LSTM layers.
[0064] Step S42: Add sine and cosine position markers to the dimension alignment feature through the position encoding module to obtain the position encoded feature.
[0065] It should be noted that sine and cosine position markers refer to fixed vectors generated by sine and cosine functions that uniquely correspond to the position in the sequence, used to explicitly inject temporal sequence information. Positional encoding features refer to new feature tensors containing temporal position information obtained by adding the sine and cosine position markers element-wise to the dimension-aligned features.
[0066] As an example, the step of adding sine and cosine position markers to the dimension alignment feature through the position encoding module to obtain the position encoded feature includes: generating a position index based on the timestamp of the fused feature data to be predicted; calculating the sine and cosine components using sine and cosine functions according to the position index; concatenating the sine and cosine components into a position embedding vector; and adding the position embedding vector to the dimension alignment feature through the position encoding module to obtain the position encoded feature.
[0067] The location index is a sequence of integers extracted from the timestamps of the fused feature data to be predicted, incrementing from 0 in chronological order, used to mark the absolute position of each time step. The sine component is a one-dimensional numerical sequence calculated by substituting the location index into a sine function at different frequencies, used to encode the odd-dimensional information of the location. The cosine component is a one-dimensional numerical sequence calculated by substituting the location index into a cosine function at different frequencies, used to encode the even-dimensional information of the location. The location embedding vector is a vector of the same dimension as the feature, formed by alternately concatenating the sine and cosine components according to their dimensions, used to directly superimpose it into the feature to express the temporal order.
[0068] First, the variable photothermal integrated Carnot solar cell system reads the timestamp field from the fused feature data to be predicted, generates consecutive integer indices from 0 to 23 at minute-level resolution, and copies them to the GPU memory buffer. Second, the system calls PyTorch's built-in `torch.arange` to construct a 256-dimensional frequency vector `2*i / d_model`. The indices and frequency vectors are input into `torch.sin` and `torch.cos` respectively, and two sets of tensors [24, 256] are calculated in parallel at once. Then, they are alternately concatenated along the last dimension to form a position embedding vector of [24, 256] to ensure the classic position encoding form of even indices corresponding to cosine and odd indices corresponding to sine. Finally, the system expands the vector to [batch, 24, 256] by batch dimension through a broadcast mechanism, and then adds it element-wise with the dimension-aligned features to obtain the position encoded features, which are immediately sent to the subsequent Transformer layer. This allows the model to perceive the time sequence without introducing learnable parameters, thereby improving the modeling accuracy of irradiation fluctuation sequences.
[0069] Step S43: Extract the cross-variable dependencies of the positional encoding features through the multi-head self-attention mechanism module to obtain global dependency features.
[0070] It should be noted that intervariate dependency refers to the strength of the interaction between different meteorological or equipment variables in the location coding features over time. Global dependency features refer to a unified representation tensor extracted through a multi-head self-attention mechanism, which contains information on the interdependencies of all variables over a long time series.
[0071] As an example, the step of extracting the cross-variable dependencies of the positional encoding features through the multi-head self-attention mechanism module to obtain global dependency features includes: mapping the positional encoding features into query vectors, key vectors, and value vectors through 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, combined with the dimension of the key vector; performing a weighted summation on the value vectors based on the scaled dot product attention weights to obtain the weighted features of each attention head in the multi-head self-attention mechanism module; concatenating the weighted features of all attention heads to obtain a concatenated result; and performing a linear mapping on the concatenated result to obtain global dependency features.
[0072] The query vector Q is a vector matrix obtained by linear transformation of positional encoding features and used for similarity comparison with other positional features. The key vector K is a vector matrix obtained by another linear transformation of the same positional encoding features and used for similarity comparison of the query vector. The value vector V is a vector matrix obtained by a third linear transformation of positional encoding features, carrying actual feature information and being weighted and aggregated. The scaling dot product attention weight is calculated by dividing the dot product of the query vector and the key vector by the dimension of the key vector. The probability distribution matrix representing the correlation strength between each location, obtained by normalizing the square root of the matrix using Softmax, is calculated as follows: Weighted features refer to the feature matrix output by each attention head after performing position-by-position weighted summation on the value vector using the aforementioned attention weights. The concatenation result is the long vector matrix formed by concatenating the weighted features of all attention heads end-to-end along their last dimension.
[0073] The variable photothermal integrated Carnot battery system feeds position-encoded features of shape [batch, 24, 256] in parallel into eight attention heads. Each head uses an independent 256×32 weight matrix to linearly map Q, K, and V at once, with all three matrices having a size of [batch, 24, 32]. Subsequently, the dot product of the transposes of Q and K is calculated in the current GPU stream to obtain the original score of [batch, 24, 24]. After scaling by √32, softmax is performed along the last dimension to generate attention weights. These weights are then batch-multiplied with V to output weighted features of [batch, 24, 32]. The weighted features from the eight heads are concatenated into a tensor of [batch, 24, 256] in the last dimension, and then mapped through a 256×256 linear layer to finally output global dependency features, which are then directly fed into the next layer, allowing long-range correlations between different variables to be captured at once.
[0074] Step S44: The global dependency features are nonlinearly mapped through the feedforward network to obtain enhanced features.
[0075] It should be noted that the enhanced feature refers to the high-order nonlinear representation tensor of the global dependent features after two linear transformations and GELU activation by the feedforward network, which still has the dimension [batch, 24, 256].
[0076] Understandably, the variable photothermal integrated Carnot cell system feeds globally dependent features of shape [batch, 24, 256] into a feedforward network: first, it is raised to 1024 dimensions through a 256×1024 linear layer, then nonlinearity is introduced by GELU activation, and then it is reduced back to the original dimension through a 1024×256 linear layer. After residual connection, layer normalization is performed, and a higher-order representation of the same size is output as an enhancement feature, thereby improving the model's ability to express complex irradiance fluctuations without changing the number of time steps.
[0077] Step S45: The temporal fluctuation pattern of the enhanced features is captured by the LSTM feature enhancement module to obtain short-term fluctuation features.
[0078] It should be noted that the temporal fluctuation pattern refers to the short-term rise and fall and transient change patterns exhibited by the enhanced features over 24 consecutive time steps, 12 steps in the past and 12 steps in the future. The short-term fluctuation feature refers to the high-dimensional hidden state tensor output by the LSTM feature enhancement module for these 24 local windows, which is used to accurately capture subtle changes in solar radiation during this period.
[0079] In one embodiment, the step of capturing the temporal fluctuation pattern of the enhanced features through the LSTM feature enhancement module to obtain short-term fluctuation features includes: inputting the enhanced features and the previous hidden state into a forget gate to generate forget weights; inputting the enhanced features and the previous hidden state into an input gate to generate input weights and candidate cell states; updating the cell states according to the forget weights, the input weights, and the candidate cell states; inputting the enhanced features and the previous hidden state into an output gate to generate output weights; generating the current hidden state according to the output weights and the updated cell states, and using the current hidden state as the short-term fluctuation feature.
[0080] The previous hidden state refers to the short-term memory vector output by the LSTM at the previous time step, with the same dimension as the model's hidden layers. The forget gate is a learnable gating structure in the LSTM that determines how much information from the previous time step to retain or discard through sigmoid activation. The forget weights are element-wise coefficient vectors (0-1) output by the forget gate, used for dimensional filtering of the cell state. The input gate is a learnable gating structure in the LSTM that determines how much current input information to add through a combination of sigmoid and tanh. The input weights are the 0-1 vector output by the sigmoid part of the input gate, and the candidate cell state is the vector of new information to be written, generated by the tanh part of the input gate. The cell state is a memory vector that is propagated along time steps within the LSTM and can retain information for a long time. The output gate is a learnable gating structure in the LSTM that determines how much information to output from the updated cell state as the hidden state through sigmoid activation. The output weights are the 0-1 vector output by the output gate, used for dimensional filtering of the cell state to generate the hidden state. The current hidden state refers to the vector that the LSTM outputs at the current time step, carrying short-term fluctuation characteristics, and is sent to the next layer or the next time step.
[0081] First, the variable photothermal integrated Carnot solar cell system concatenates the enhanced feature vector of the current time step with the 256-dimensional hidden state of the previous time step into a 512-dimensional input, which is then fed into three independent fully connected layers: the forget gate outputs a 256-dimensional sigmoid value, and the input gate outputs a 256-dimensional sigmoid value and a 256-dimensional tanh candidate vector, ensuring that each gate perceives the latest information in real time and suppresses gradient vanishing. Second, the system multiplies the forget weights element-wise with the old cell state, and then multiplies the input weights element-wise with the candidate vectors and adds the two together to update the cell state. This "multiplicative filtering + additive writing" mechanism preserves long-term trends while injecting the latest fluctuations. Finally, the system concatenates the enhanced features with the old hidden state again and passes the output gate to obtain a 256-dimensional sigmoid output weight, which is then multiplied element-wise with the new cell state activated by tanh to generate the current 256-dimensional hidden state. This current 256-dimensional hidden state is directly fed into the fully connected prediction layer as a short-term fluctuation feature, thus accurately capturing transient changes within 24 steps without increasing the number of parameters.
[0082] Step S46: The short-term fluctuation characteristics are mapped to predicted solar radiation intensity values through the fully connected prediction layer.
[0083] Understandably, the variable photothermal integrated Carnot solar cell system first takes the short-term fluctuation characteristics of shape [batch, 24, 256] along the time dimension to obtain [batch, 256], and then sends it to the fully connected prediction layer: the weight matrix of this layer is 256×24 in size, the bias vector is 24-dimensional, and a tensor of [batch, 24] is obtained by adding the bias through a matrix multiplication. Each element directly corresponds to the predicted value of solar radiation intensity in the next 24 time steps, thus completing the mapping.
[0084] This embodiment first uses a feature encoder module to linearly transform the input fused feature data to be predicted, increasing the feature dimension to 256 dimensions, consistent with the model's internal dimensions, achieving dimension alignment and providing a unified feature space for subsequent modules. Then, a position encoding module adds sine and cosine position markers to the dimension-aligned features, generating position-encoded features. This enables the model to perceive positional information in the time series, enhancing its ability to model temporal dependencies. Next, a multi-head self-attention mechanism module processes the position-encoded features, extracting cross-variable dependencies between different variables to obtain global dependency features, effectively capturing long-distance feature associations. A feedforward network further performs nonlinear mapping on the global dependency features to obtain enhanced features, improving the model's ability to express complex feature relationships. An LSTM feature enhancement module captures the temporal fluctuation patterns in the enhanced features, obtaining short-term fluctuation features, strengthening the capture of short-term dynamic changes. Finally, a fully connected prediction layer maps the short-term fluctuation features to predicted solar radiation intensity values, directly outputting the predicted solar radiation intensity for the next 24 steps, providing accurate predictive support for the system's operational decisions.
[0085] This application also provides a mode switching device for a variable photothermal integrated Carnot cell; please refer to [reference needed]. Figure 5 The mode switching device for the variable photothermal integrated Carnot cell includes: Preprocessing module 10 is used to preprocess historical data and data to be predicted, which include solar radiation intensity, meteorological data, geographical data and equipment operation data, to obtain historical fusion feature data and data to be predicted fusion feature data. Model building module 20 is used to build a Transformer-LSTM deep learning prediction model based on the feature encoder module, position encoding module, multi-head self-attention mechanism module, feedforward network, LSTM feature enhancement module and fully connected prediction layer; Model training module 30 is used to train the Transformer-LSTM deep learning prediction model based on the historical fusion feature data to obtain the target prediction model; Prediction module 40 is used to process the fused feature data to be predicted through the target prediction model to obtain the predicted value of solar radiation intensity; The low-temperature mode module 50 is used to activate the energy storage-release link of the low-temperature cycle unit when the predicted value of solar radiation intensity is within the first preset intensity level. The high-temperature mode module 60 is used to activate the energy storage-release link of the high-temperature cycle unit and complete the mode switching when the predicted value of solar radiation intensity belongs to the second preset intensity level.
[0086] The mode switching device for the variable photothermal integrated Carnot solar cell provided in this application, employing the mode switching method of the variable photothermal integrated Carnot solar cell in the above embodiments, can solve the technical problem of unstable output of the photothermal system caused by fluctuations in solar radiation. Compared with the prior art, the beneficial effects of the mode switching device for the variable photothermal integrated Carnot solar cell provided in this application are the same as the beneficial effects of the mode switching method of the variable photothermal integrated Carnot solar cell provided in the above embodiments, and other technical features in the mode switching device for the variable photothermal integrated Carnot solar cell are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0087] This application provides a mode switching device for a variable photothermal integrated Carnot cell. The mode switching device for a variable photothermal integrated Carnot cell includes: at least one processor; and a memory communicatively connected to 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 perform the mode switching method for the variable photothermal integrated Carnot cell in the first embodiment described above.
[0088] The following is for reference. Figure 6 This document illustrates a schematic diagram of a mode-switching device suitable for implementing the variable photothermal integrated Carnot battery of the embodiments of this application. The mode-switching device for the variable photothermal integrated Carnot battery in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The illustrated mode-switching device for a variable photothermal integrated Carnot cell is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0089] like Figure 6As 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.
[0090] 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.
[0091] The mode switching device for the variable photothermal integrated Carnot solar cell provided in this application, employing the mode switching method of the variable photothermal integrated Carnot solar cell in the above embodiments, can solve the technical problem of unstable output of the photothermal system caused by fluctuations in solar radiation. Compared with the prior art, the beneficial effects of the mode switching device for the variable photothermal integrated Carnot solar cell provided in this application are the same as the beneficial effects of the mode switching method of the variable photothermal integrated Carnot solar cell provided in the above embodiments, and other technical features in the mode switching device for the variable photothermal integrated Carnot solar cell are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.
[0092] It should be understood that the various parts disclosed in this application can be implemented using 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 suitable manner in one or more embodiments or examples.
[0093] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0094] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the mode switching method of the variable photothermal integrated Carnot cell in the above embodiments.
[0095] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, RAM (Random Access Memory), ROM (Read Only Memory), EPROM (Erasable Programmable Read Only Memory or Flash Memory), optical fibers, CD-ROM (CD-Read Only Memory), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0096] The aforementioned computer-readable storage medium may be included in the mode switching device of the variable photothermal integrated Carnot cell; or it may exist independently and not assembled into the mode switching device of the variable photothermal integrated Carnot cell.
[0097] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by the mode switching device of the variable solar thermal integrated Carnot battery, the mode switching device performs the following actions: preprocesses historical data and data to be predicted, including solar radiation intensity, meteorological data, geographical data, and equipment operation data, to obtain historical fused feature data and data to be predicted fused feature data; constructs a Transformer-LSTM deep learning prediction model based on a feature encoder module, a location encoding module, a multi-head self-attention mechanism module, a feedforward network, an LSTM feature enhancement module, and a fully connected prediction layer; trains the Transformer-LSTM deep learning prediction model based on the historical fused feature data to obtain a target prediction model; processes the data to be predicted fused feature data using the target prediction model to obtain a predicted solar radiation intensity value; when the predicted solar radiation intensity value belongs to a first preset intensity level, it activates the energy storage-release link of the low-temperature cycling unit; when the predicted solar radiation intensity value belongs to a second preset intensity level, it activates the energy storage-release link of the high-temperature cycling unit, completing the mode switching.
[0098] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including LAN (Local Area Network) or WAN (Wide Area Network)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0099] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0100] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0101] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the mode switching method of the above-described variable solar-thermal integrated Carnot cell, which can solve the technical problem of unstable output of the solar-thermal system caused by fluctuations in solar radiation. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the mode switching method of the variable solar-thermal integrated Carnot cell provided in the above embodiments, and will not be repeated here.
[0102] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the mode switching method for the variable photothermal integrated Carnot cell as described above.
[0103] The computer program product provided in this application can solve the technical problem of unstable output of the solar thermal system caused by the fluctuation of solar radiation. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as the beneficial effects of the mode switching method of the variable solar thermal integrated Carnot cell provided in the above embodiments, and will not be repeated here.
[0104] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A mode switching method for a variable photothermal integrated Carnot solar cell, characterized in that, The method includes: Historical data and data to be predicted, including solar radiation intensity, meteorological data, geographical data and equipment operation data, are preprocessed to obtain historical fusion feature data and data to be predicted fusion feature data. A Transformer-LSTM deep learning prediction model is constructed based on the feature encoder module, position encoding module, multi-head self-attention mechanism module, feedforward network, LSTM feature enhancement module, and fully connected prediction layer. The Transformer-LSTM deep learning prediction model is trained based on the historical fusion feature data to obtain the target prediction model; The target prediction model is used to process the fused feature data to be predicted to obtain the predicted value of solar radiation intensity. When the predicted solar radiation intensity value is within the first preset intensity level, the energy storage-release link of the low-temperature cycle unit is activated; When the predicted solar radiation intensity value is within the second preset intensity level, the energy storage-release link of the high-temperature cycle unit is activated to complete the mode switch.
2. The method as described in claim 1, characterized in that, The steps for constructing the Transformer-LSTM deep learning prediction model based on the feature encoder module, position encoding module, multi-head self-attention mechanism module, feedforward network, LSTM feature enhancement module, and fully connected prediction layer include: Initialize the model framework, defining the input and output dimensions; 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 dimension; A position encoding module is added to the output of the feature encoder module. The position encoding module generates time position markers through sine and cosine functions. A Transformer encoder layer is constructed at the output of the position encoding module. The Transformer encoder layer includes a multi-head self-attention mechanism module and a feedforward network. An LSTM feature enhancement module is added to the output of the Transformer encoder layer, and the LSTM feature enhancement module is configured as a long short-term memory network. A fully connected prediction layer is added to the output of the LSTM feature enhancement module, and the number of output neurons in the fully connected prediction layer is set to match the output dimension. The feature encoder module, the position encoding module, the Transformer encoder layer, the LSTM feature enhancement module, and the fully connected prediction layer are concatenated by residual connections and layer normalization operations to obtain the Transformer-LSTM deep learning prediction model.
3. The method as described in claim 1, characterized in that, 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 step of processing the fused feature data to be predicted using the target prediction model to obtain the predicted value of solar radiation intensity includes: The feature encoder module performs a linear transformation on the fused feature data to be predicted to obtain dimension-aligned features. The position encoding module adds sine and cosine position markers to the dimension alignment features to obtain the position encoded features; The cross-variable dependencies of the positional encoding features are extracted through the multi-head self-attention mechanism module to obtain global dependency features; Enhanced features are obtained by performing a nonlinear mapping on the globally dependent features through the feedforward network. The LSTM feature enhancement module captures the temporal fluctuation pattern of the enhanced features to obtain short-term fluctuation features; The short-term fluctuation characteristics are mapped to predicted values of solar radiation intensity through the fully connected prediction layer.
4. The method as described in claim 3, characterized in that, The step of adding sine and cosine position markers to the dimension alignment features through the position encoding module to obtain position encoded features includes: A location index is generated based on the timestamps of the fused feature data to be predicted; Based on the position index, the sine and cosine components are calculated using sine and cosine functions; The sine component and the cosine component are concatenated into a position embedding vector; The location embedding vector is added to the dimension alignment feature by the location encoding module to obtain the location encoded feature.
5. The method as described in claim 3, characterized in that, The step of extracting the intervariate dependencies of the position-encoded features through the multi-head self-attention mechanism module to obtain global dependency features includes: The multi-head self-attention mechanism module maps the positional encoding features into query vectors, key vectors, and value vectors. Based on the dot product operation between the query vector and the key vector, the scaled dot product attention weight is calculated in combination with the dimension of the key vector; The value vector is weighted and summed based on the scaled dot product attention weights to obtain the weighted features of each attention head in the multi-head self-attention mechanism module; The weighted features of all the attention heads are concatenated to obtain the concatenated result; A linear mapping is performed on the splicing result to obtain global dependency features.
6. The method as described in claim 1, characterized in that, The step of training the Transformer-LSTM deep learning prediction model based on the historical fusion feature data to obtain the target prediction model includes: The historical fusion feature data is divided into a training set and a validation set; The training set is processed using a sliding window mechanism to obtain the input sequence and the predicted target sequence; The input sequence is fed into the Transformer-LSTM deep learning prediction model to obtain the prediction result; Calculate the mean squared error loss between the prediction result and the predicted target sequence; Based on the mean squared error loss, the parameters of the Transformer-LSTM deep learning prediction model are updated using an adaptive moment estimation algorithm; The validation loss is obtained by calculating the mean squared error loss using the validation set. If the verification loss does not meet the preset conditions, return to the step of inputting the input sequence into the Transformer-LSTM deep learning prediction model to obtain the prediction result, until the verification loss meets the preset conditions and the target prediction model is obtained.
7. The method according to any one of claims 1 to 6, characterized in that, The step of preprocessing historical data and data to be predicted, which include solar radiation intensity, meteorological data, geographical data, and equipment operation data, to obtain historical fused feature data and data to be predicted fused feature data includes: Anomaly detection and spatial interpolation are performed on historical data and data to be predicted, which include solar radiation intensity, meteorological data, geographical data and equipment operation data, respectively, to obtain historical continuous feature data and data to be predicted continuous feature data. The historical continuous feature data and the continuous feature data to be predicted are normalized to obtain historical normalized features and to-be predicted normalized features; Calculate the Pearson correlation coefficients between the historical normalized features and the predicted normalized features and solar radiation intensity to obtain the historical feature weighting factor and the predicted feature weighting factor. The normalized features are selected based on the historical feature weighting factor, the feature weighting factor to be predicted, and the preset weighting threshold to form a subset of historical high-weight features and a subset of feature weighting to be predicted. The historical high-weight feature subset and the high-weight feature subset to be predicted are concatenated into a three-dimensional tensor according to the time step to obtain the historical fused feature data and the fused feature data to be predicted.
8. A mode switching device for a variable photothermal integrated Carnot cell, characterized in that, The device includes: The preprocessing module is used to preprocess historical data and data to be predicted, which include solar radiation intensity, meteorological data, geographical data and equipment operation data, to obtain historical fusion feature data and data to be predicted fusion feature data. The model building module is used to build a Transformer-LSTM deep learning prediction model based on the feature encoder module, position encoding module, multi-head self-attention mechanism module, feedforward network, LSTM feature enhancement module and fully connected prediction layer; The model training module is used to train the Transformer-LSTM deep learning prediction model based on the historical fusion feature data to obtain the target prediction model; The prediction module is used to process the fused feature data to be predicted through the target prediction model to obtain the predicted value of solar radiation intensity. The low-temperature mode module is used to activate the energy storage-release link of the medium-low temperature cycle unit when the predicted value of solar radiation intensity is within the first preset intensity level. The high-temperature mode module is used to activate the energy storage-release link of the high-temperature cycle unit and complete the mode switching when the predicted value of solar radiation intensity belongs to the second preset intensity level.
9. A mode switching device for a variable photothermal integrated Carnot cell, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the mode switching method for a variable photothermal integrated Carnot cell as described in any one of claims 1 to 7.
10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the mode switching method of the variable photothermal integrated Carnot cell as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Photothermal comprehensive utilization system based on artificial intelligence
CN120084058A
Solar photo-thermal power generation and supply system
CN120300938A
Waste heat-demand two-stage optimization design method for multi-energy combined supply Carnot battery system
CN120597543A
Catalytic cracking unit key index modeling method based on time sequence feature extraction
WO2024021536A1
Cited By
Ionosphere parameter and short wave frequency band prediction method and electronic equipment
CN121997196A