Hydropower plant equipment intelligent operation auxiliary decision-making method and system based on big data analysis
Patent Information
- Application Number
- CN202611025546.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-10
- Publication Date
- 2026-08-18
AI Technical Summary
这种方式所生成的决策建议与设备当前的实际损伤程度脱节,容易导致在设备尚未发生明显故障时运行于持续损伤累积区间,或在设备状态良好时未能充分承担发电任务,进而影响机组全寿命周期的运行经济性与可靠性
[0006] This invention obtains dimensionless real-time degradation indices from the main shaft vibration time-domain signal through synchronous compression transformation and deep convolutional variational autoencoder, avoiding multi-source data correlation processing. The degradation indices, active power ratio, and guide vane opening ratio are used to generate a state vector through operating condition similarity learning, compactly expressing the implicit correlation between operating conditions and degradation degree. A positive excitation signal is generated using the difference between the target power ratio of the power generation plan and the active power ratio, while a negative suppression signal is generated through nonlinear enhancement based on the steepness of the degradation index change. These signals are combined to form a comprehensive reward signal, guiding subsequent decisions to adaptively balance power generation task completion with unit life protection. Offline, a strategy network is trained using deep deterministic strategy gradients to output continuous load allocation ratio values. Online, load ratio ranges in the vibration and cavitation zones are used for compliance filtering, correcting out-of-bounds ratios to the nearest safe ratio value to prevent output from falling into dangerous operating conditions. Simultaneously, a memory protection constraint is applied to the strategy network through an elastic weight consolidation algorithm, retaining historical damage avoidance behavior while following the time-varying characteristics of degradation, maintaining the long-term effectiveness of auxiliary decision-making instructions.
Smart Images

Figure CN122600316A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data analysis, and more specifically, to a method and system for intelligent operation auxiliary decision-making of hydropower plant equipment based on big data analysis. Background Technology
[0002] The intelligent operation auxiliary decision-making for hydropower plant equipment in this invention refers to a technical means of assessing the health status of the unit and generating control suggestions by analyzing various data generated during equipment operation. Currently, common auxiliary decision-making practices typically rely on whether the amplitude or intensity of vibration monitoring signals exceeds preset limits to determine if there are any abnormalities in the equipment. Once the signal exceeds the threshold, an alarm is issued or a shutdown protection is triggered. For load adjustment decisions, most rely on fixed allocation logic in operating procedures or the experience judgment of dispatchers, failing to effectively link the real-time degradation status of the equipment with the output control strategy. The decision suggestions generated in this way are disconnected from the actual degree of damage to the equipment, easily leading to operation in a continuous damage accumulation range before obvious failures occur, or failure to fully undertake power generation tasks when the equipment is in good condition, thus affecting the operational economy and reliability throughout the unit's entire life cycle. Summary of the Invention
[0003] In view of this, the present invention provides a method and system for intelligent operation auxiliary decision-making of hydropower plant equipment based on big data analysis.
[0004] According to one aspect of the present invention, a method for intelligent operation auxiliary decision-making of hydropower plant equipment based on big data analysis is provided, comprising: The time-domain signal collected by the vibration sensor of the main shaft of the hydropower unit is acquired. The time-domain signal is processed by synchronous compression transformation to generate a time-frequency representation. The time-frequency representation is input into a pre-obtained deep convolutional variational autoencoder to obtain the reconstruction probability distribution of the latent variable space. The reconstruction probability distribution is then mapped to a dimensionless real-time degradation index. The active power ratio of the hydropower unit in real time relative to the rated power, and the guide vane opening ratio relative to the maximum design opening are obtained. The real-time degradation index, active power ratio and guide vane opening ratio at the same moment are input into the pre-obtained state embedding mapping relationship to generate the state vector of the reinforcement learning environment. A dimensionless positive excitation signal is generated based on the gap between the target power ratio of the power generation plan and the active power ratio, and a dimensionless negative suppression signal is generated based on the steepness of the change of the real-time degradation index at continuous time. The positive excitation signal and the negative suppression signal are combined to form a dimensionless comprehensive reward signal. The policy network and value network are trained offline using deep deterministic policy gradients. The state vector is input into the policy network to obtain the continuous load allocation ratio value, and the state vector and the continuous load allocation ratio value are input into the value network to obtain the state-action evaluation value. The internal connection tendency of the value network and the internal connection tendency of the policy network are updated and adjusted by integrating the reward signal. The training process is repeated until the policy network converges. During online operation, the real-time generated state vector is input into the converged policy network to obtain the initial load allocation ratio value. The pre-stored sets of load ratio intervals for the vibration zone and the cavitation zone are called to perform compliance filtering on the initial load allocation ratio value. When the initial load allocation ratio value falls into the prohibited ratio interval in either set, it is corrected to the nearest safe load ratio value to obtain the final load allocation ratio command to adjust the output of the hydropower unit. At the same time, based on the newly generated state vector and the corresponding comprehensive reward signal, the internal connection tendency of the converged policy network is subject to memory protection constraints based on the importance of historical tasks, and the internal connection tendency outside the memory protection constraints is adaptively adjusted.
[0005] According to another aspect of the present invention, a computer system is provided, comprising: a processor; and a memory, wherein the memory stores computer-readable code that, when executed by the processor, causes the processor to perform the method described above.
[0006] This invention obtains dimensionless real-time degradation indices from the main shaft vibration time-domain signal through synchronous compression transformation and deep convolutional variational autoencoder, avoiding multi-source data correlation processing. The degradation indices, active power ratio, and guide vane opening ratio are used to generate a state vector through operating condition similarity learning, compactly expressing the implicit correlation between operating conditions and degradation degree. A positive excitation signal is generated using the difference between the target power ratio of the power generation plan and the active power ratio, while a negative suppression signal is generated through nonlinear enhancement based on the steepness of the degradation index change. These signals are combined to form a comprehensive reward signal, guiding subsequent decisions to adaptively balance power generation task completion with unit life protection. Offline, a strategy network is trained using deep deterministic strategy gradients to output continuous load allocation ratio values. Online, load ratio ranges in the vibration and cavitation zones are used for compliance filtering, correcting out-of-bounds ratios to the nearest safe ratio value to prevent output from falling into dangerous operating conditions. Simultaneously, a memory protection constraint is applied to the strategy network through an elastic weight consolidation algorithm, retaining historical damage avoidance behavior while following the time-varying characteristics of degradation, maintaining the long-term effectiveness of auxiliary decision-making instructions. Attached Figure Description
[0007] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present invention and, together with the specification, serve to explain the technical solutions of the present invention.
[0008] Figure 1 This is a schematic diagram of an application scenario provided by the present invention; Figure 2 This is a flowchart illustrating an intelligent operation auxiliary decision-making method for hydropower plant equipment based on big data analysis provided by the present invention. Figure 3 This is a schematic diagram of the structure of a computer system provided in an embodiment of the present invention. Detailed Implementation
[0009] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0010] To facilitate a clearer understanding of this invention, we will first introduce the application scenarios of the intelligent operation auxiliary decision-making method for hydropower plant equipment based on big data analysis, such as... Figure 1 As shown, the application scenario of the present invention includes a computer system 10 and one or more sensors. It is understood that sensor 1, sensor 2, sensor 3, ..., sensor n can all be connected to the computer system 10 via a network so that each sensor can interact with the computer system 10 via the network.
[0011] It is understood that computer system 10 can refer to equipment that executes the intelligent operation auxiliary decision-making method for hydropower plant equipment based on big data analysis provided in the embodiments of the present invention. Computer system 10 can be, for example, a server, a single physical server, or a server cluster or distributed system consisting of at least two physical servers. Specifically, the sensor can refer to a vibration sensor for the main shaft of a hydropower unit.
[0012] Further, please see Figure 2 The intelligent operation auxiliary decision-making method for hydropower plant equipment based on big data analysis provided in this embodiment of the invention may include the following steps: Step S100: Acquire the time-domain signal collected by the vibration sensor of the main shaft of the hydropower unit, perform synchronous compression transformation on the time-domain signal to generate a time-frequency representation, input the time-frequency representation into a pre-obtained deep convolutional variational autoencoder to obtain the reconstruction probability distribution of the latent variable space, and map the reconstruction probability distribution into a dimensionless real-time degradation index.
[0013] The vibration sensor for the main shaft of a hydroelectric generator set is a piezoelectric accelerometer or an eddy current displacement sensor installed on the guide bearing or thrust bearing back of the main shaft of the generator set. When the piezoelectric crystal inside the piezoelectric accelerometer is subjected to the dynamic load transmitted by the main shaft, charge accumulates on the electrode surface due to lattice distortion; the amount of charge is proportional to the instantaneous acceleration amplitude. The eddy current displacement sensor generates an alternating magnetic field in the coil through a high-frequency oscillating current. Eddy currents are induced on the surface of the main shaft journal in the magnetic field. The eddy currents react on the coil, changing its equivalent impedance. The amount of impedance change is approximately linearly related to the gap between the probe and the journal surface.
[0014] Regardless of the sensing principle, the sensor ultimately converts the mechanical vibration of the main shaft's radial runout or axial axial movement into a continuous time-series voltage waveform, which is the time-domain signal. The time-domain signal completely records the entire process of the vibration amplitude evolution over time, which includes rotational frequency components reflecting the hydraulic imbalance of the runner blades, subsynchronous frequency components caused by the widening of the guide bearing clearance, broadband random impact components caused by runner cavitation or wear, and main pole frequency vibration components caused by uneven electromagnetic tension.
[0015] Synchronous compression transform processing calculates the instantaneous frequency point by point on the initial time-frequency plane generated by wavelet transform and redistributes the wavelet coefficient magnitude along the frequency direction in a squeezing manner, so that the fuzzy energy originally distributed in multiple frequency intervals is gathered on the real instantaneous frequency ridge, and finally a time-frequency representation with high sharpness and lossless time domain resolution is generated.
[0016] The time-frequency representation is a two-dimensional matrix structure, where the row index corresponds to the time sampling point number, the column index corresponds to the frequency unit number, and the amplitude value of the matrix element represents the vibration energy density at that frequency at that moment. The higher the energy density, the stronger the dominance of that frequency component at the corresponding moment. The Deep Convolutional Variational Autoencoder (DCE) is a deep probabilistic generative model that uses a convolutional neural network as its encoding and decoding backbone. Its encoder consists of three tandem 2D convolutional layers and two fully connected layers. Each convolutional layer is followed by batch normalization and a linear unit activation function with leakage correction. The first convolutional layer uses multiple high-narrow convolutional kernels to capture the rapid energy fluctuations along the time axis and the harmonic structure along the frequency axis in the time-frequency representation. The second convolutional layer uses square convolutional kernels to further fuse the local textures of adjacent time-frequency slices. The third convolutional layer uses convolutional kernels with a stride greater than one to compress the spatial size of the feature map and increase the number of channels to a higher level. The decoder consists of two fully connected layers and three tandem 2D transposed convolutional layers. Batch normalization and linear unit activation with leakage correction are also configured before the transposed convolutional layers. The first transposed convolutional layer progressively upsamples the high-dimensional latent variables reshaped by the fully connected layers, and subsequent transposed convolutional layers progressively restore the size and details of the original time-frequency representation.
[0017] The reconstructed probability distribution in the latent variable space specifically refers to the negative log-likelihood expectation of the element-wise difference between the time-frequency representation obtained by sampling the posterior Gaussian distribution parameters of the latent variables output by the encoder and reconstructing them using the decoder, given a given input time-frequency representation. This value quantitatively characterizes the degree of fit of the current vibration signal under the health baseline probability model. A higher degree of fit indicates that the current vibration mode of the unit is closer to the statistical prototype of the healthy state. The dimensionless real-time degradation index is a single real value derived from the reconstructed probability distribution in the latent variable space through monotonically nonlinear scaling. The mapping function is constructed using piecewise linear interpolation, dividing the numerical range of the reconstructed probability distribution into multiple intervals, each bound to a different scaling slope. High-probability intervals are mapped to low-degradation indices, and low-probability intervals are mapped to high-degradation indices. The higher the value of the final dimensionless real-time degradation index, the more significant the deviation of the unit's current vibration characteristics from the inherent statistical pattern established during its historical healthy operation, thus reflecting the severity of the degradation of the main shaft system's mechanical performance.
[0018] Step S200: Obtain the ratio of real-time active power of the hydropower unit to its rated power, and the ratio of guide vane opening to its maximum design opening. Input the real-time degradation index, active power ratio, and guide vane opening ratio at the same moment into the pre-obtained state embedding mapping relationship to generate the state vector of the reinforcement learning environment.
[0019] In one implementation, step S200 may specifically include steps S210 to S260: Step S210: Extract the historical sequence of degradation index, the historical sequence of active power ratio, and the historical sequence of guide vane opening ratio from the historical operation records of the hydropower unit. Obtain multiple historical triplet segments according to the same time window. Each historical triplet segment contains the degradation index subsequence, the active power ratio subsequence, and the guide vane opening ratio subsequence within the same time window.
[0020] Historical operation records of hydropower units are stored in a relational database of the power plant's monitoring information system. The database uses a table structure with time-partitioned storage. Each record uses a unified timestamp as the primary key and is associated with data points or file references such as the unit's real-time active power, reactive power, guide vane opening, head, and main shaft vibration waveform data storage path. The time span of historical operation records typically covers several maintenance cycles, with the total number of records reaching hundreds of millions. The historical sequence of degradation indicators is generated by reading the main shaft vibration time-domain signal storage file corresponding to each sampling moment from all available records in the historical operation records. Then, the synchronous compression transformation processing described in step S100 is performed one by one to generate a time-frequency representation. The time-frequency representation is then fed into an encoder network of the same depth convolutional variational autoencoder for forward inference to obtain the reconstruction probability distribution of the latent variable space. This latent variable space is then linearly scaled and pruned to map into dimensionless real-time degradation indicators. Finally, the dimensionless real-time degradation indicators of all moments are arranged in ascending order of time to generate the sequence. The generation process of the historical sequence of degradation indicators is a one-time offline batch processing, accelerated by parallel reading of historical vibration waveform files and parallel inference of graphics processing units. The generated results are then timestamped and stored in a dedicated analysis data table. The historical sequence of active power ratio is generated by performing division operations on each active power measurement value stored in the historical operation records. The divisor is always the rated power of the unit, and the division results are retained as double-precision floating-point numbers and arranged in ascending order of time to form a sequence.
[0021] The historical sequence of guide vane opening ratio is generated by dividing each measured value of guide vane opening in the historical operation records by the maximum design opening, retaining double-precision results and sorting them by time. The time window is a predefined fixed-length window, the length of which is measured by the number of sampling points. This length is determined based on the time constant and operating condition change cycle of the hydropower unit's regulation process. It needs to include enough sampling points to reflect the statistical characteristics of the operating conditions within that period, but the span cannot be too large to cause significant drift in the operating conditions within the window. The truncation operation uses a sliding window method, with the window shifting along the time axis by a fixed step size, set to a fraction of the window length to ensure partial overlap between adjacent windows and increase sample density. Whenever the window stops at a certain position, all sampling points falling within that time range are simultaneously extracted from the historical sequences of degradation indicators, active power ratio, and guide vane opening ratio, based on the window's start and end timestamps, forming subsequences for degradation indicators, active power ratio, and guide vane opening ratio, respectively. The sampling times of these three subsequences undergo rigorous alignment interpolation preprocessing to ensure that the same index position corresponds to exactly the same time, thereby eliminating timescale misalignment caused by asynchronous data acquisition channels. The data from the three subsequences, along with the window timestamps, are encapsulated into a historical triplet fragment. The number of fragments depends on the total number of sliding windows and the total time span of the historical sequence.
[0022] Step S220: Perform a similarity analysis of operating conditions on any two historical triplet segments. When the difference between the average active power ratios of the two historical triplet segments does not exceed the preset ratio difference limit and the difference between the average guide vane opening ratios does not exceed the preset ratio difference limit, mark the two historical triplet segments as a pair of similar samples; otherwise, mark them as pairs of dissimilar samples. Collect a set of similar sample pairs and a set of dissimilar sample pairs.
[0023] In one implementation, step S220 may specifically include steps S221 to S226: Step S221: Perform mean statistics on the active power ratio subsequence and the guide vane opening ratio subsequence for each of the multiple historical triplet segments, and assign an active power ratio mean label and a guide vane opening ratio mean label to each historical triplet segment.
[0024] For a single historical triplet segment, all sampled values contained in its internal active power ratio subsequence are extracted. These sampled values are read one by one into an accumulator for summation. After summation, the sum is divided by the total number of sampled values in the subsequence, and the resulting arithmetic mean is used as the active power ratio mean label for that historical triplet segment. This label is a floating-point scalar. The guide vane opening ratio mean label is obtained by processing the guide vane opening ratio subsequence of the same historical triplet segment using the exact same cumulative averaging operation. The two mean labels are appended to the metadata field of the corresponding historical triplet segment, so that subsequent pairwise comparisons can be performed directly by reading the metadata without recalculation.
[0025] Step S222: Iterate through all pairs of historical triplet segments, extract the average active power ratio label of the first historical triplet segment and the average active power ratio label of the second historical triplet segment in the current combination, and calculate the difference in the average active power ratio between the two.
[0026] The traversal operation exhaustively searches for unique pairings of all historical triplet segments using a nested loop structure. The outer loop traverses from the first to the second-to-last segment, while the inner loop traverses from the position of the outer loop plus one to the last segment, ensuring that each pair of segments is accessed only once and has no self-pairing. For each pair, the active power ratio average label from the metadata of the first historical triplet segment is read, followed by the active power ratio average label from the second historical triplet segment. The two label values are subtracted, and the absolute value of the subtraction result is taken. This absolute value is the active power ratio average difference, reflecting the statistical deviation of the two windows in terms of load level.
[0027] Step S223: Extract the mean label of the guide vane opening ratio of the first historical triplet segment and the mean label of the guide vane opening ratio of the second historical triplet segment in the current combination, and calculate the difference in the mean opening ratio between the two.
[0028] Continuing with the current combination, read the average label of the guide vane opening ratio of the first historical triplet segment and the average label of the guide vane opening ratio of the second historical triplet segment, perform the subtraction and take the absolute value operation to obtain the difference in the average opening ratio, which reflects the degree of statistical deviation between the two windows in terms of hydraulic conductivity.
[0029] Step S224: Compare the average difference in active power ratio with the preset power ratio difference limit, and at the same time compare the average difference in opening ratio with the preset opening ratio difference limit.
[0030] The comparison operation employs two independent magnitude judgments. First, it performs a "less than or equal to" test on the average difference in the active power ratio and a preset power ratio difference limit, outputting a Boolean flag indicating whether the limit condition is met. Second, it performs a "less than or equal to" test on the average difference in the opening ratio and a preset opening ratio difference limit, outputting another independent Boolean flag. Both Boolean flags are independently stored in temporary variables for the current combination.
[0031] Step S225: If the average difference in the active power ratio does not exceed the power ratio difference limit and the average difference in the opening ratio does not exceed the opening ratio difference limit, then the two historical triplet segments of the current combination are identified as a sample pair of the same type and are included in the set of sample pairs of the same type.
[0032] The two historical triplet segments of the current combination are considered to have similar operating conditions if and only if both Boolean flags are true, i.e., the difference in the average active power ratio is within the power ratio difference limit and the difference in the average activation ratio is within the activation ratio difference limit. The units within their corresponding time windows are then in statistically indistinguishable operating states. Subsequently, a similar sample pair data structure is constructed in memory, recording the index or complete data copy of these two historical triplet segments within it. This similar sample pair is then appended to the end of the list of similar sample pairs.
[0033] Step S226: If the average difference in the active power ratio exceeds the power ratio difference limit or the average difference in the opening ratio exceeds the opening ratio difference limit, then the two historical triplet segments of the current combination are identified as an outlier sample pair and assigned to the outlier sample pair set.
[0034] When at least one of the following conditions is met: the difference in the average active power ratio is greater than the power ratio difference limit, or the difference in the average opening ratio is greater than the opening ratio difference limit, the two historical triplet segments are determined to have different operating conditions. Following the same construction and addition method as in step S225, the out-of-type sample pairs are stored in the out-of-type sample pair set.
[0035] Step S230: For each of the same sample pairs in the same sample pair set, send the two historical triplet fragments into the initial embedding mapping structure. The initial embedding mapping structure contains multiple nonlinear transformation layers connected in sequence. Each nonlinear transformation layer compresses the received triplet fragments and passes them to the next layer, finally outputting a fixed-length embedding representation vector.
[0036] The initial embedding mapping structure is a multilayer perceptron network whose parameters have not yet been trained. Its input interface receives a one-dimensional vector formed by temporally overlapping, unfolding, and concatenating three sub-sequences within a historical triplet segment. The concatenation method involves unfolding the degradation index sub-sequence, active power ratio sub-sequence, and guide vane opening ratio sub-sequence, respectively, taking all sampling points within a window and unfolding them temporally. Then, the three unfolded sequences are concatenated end-to-end to form a long vector, the total length of which is three times the number of sampling points in the window. The nonlinear transformation layer is the basic building block of the embedding mapping structure. Each layer contains, in sequence, a fully connected linear mapping, batch normalization, and nonlinear activation of a linear unit with leakage correction. The fully connected linear mapping is parameterized by a weight matrix and a bias vector. Multiplying the output vector of the previous layer by the weight matrix and adding the bias vector achieves affine compression from high dimension to low dimension. The batch normalization operation calculates the mean and standard deviation for each dimension of the fully connected mapping output within the current mini-batch sample range. The output value is then standardized by subtracting the mean and dividing by the standard deviation using this statistic. Finally, it is multiplied by a learnable scaling parameter and a learnable translation parameter is added to keep the distribution of the input of each layer stable during training.
[0037] The leakage-corrected linear unit processes each element of the batch-normalized output independently. Positive values pass directly, while negative values are multiplied by a preset small slope coefficient, ensuring the network retains a non-zero gradient in the negative half-region. Compression refers to the design of a progressively decreasing number of output neurons in each nonlinear transform layer. The output dimension of the first layer is set to a value significantly smaller than the input dimension. The output dimension of the second layer is further reduced to about half that of the first layer, and so on, until the final layer's output dimension is fixed at a preset embedding dimension. The choice of embedding dimension requires a trade-off between representational power and computational cost. This progressively shrinking structure forces the network to continuously discard redundant information and noise during forward propagation, retaining only the essential features most helpful in distinguishing operating conditions from degenerate states. The embedding representation vector is a one-dimensional real-valued vector output by the final nonlinear transform layer, whose dimension remains fixed under all historical triplet inputs.
[0038] Step S240: For each pair of samples of the same class, calculate the proximity of their two embedding representation vectors in the vector space. For each pair of samples of different classes, calculate the distance between their two embedding representation vectors in the vector space. Adjust the connection tendency of each nonlinear transformation layer inside the initial embedding mapping structure according to the proximity and distance, so that the embedding representation vectors of the same class of samples gradually approach each other and the embedding representation vectors of the different class of samples gradually move away from each other.
[0039] Proximity is measured using the Euclidean distance between two embedded representation vectors. The Euclidean distance is calculated by subtracting corresponding elements of the two vectors to obtain a difference vector, squaring each element of the difference vector, summing all squares, and then taking the square root of the sum. A smaller distance indicates that the two vectors are closer in the embedding space, and the corresponding triplets are more similar. Distance is also measured using the Euclidean distance, but in the opposite direction, aiming to increase the distance between the embedded representation vectors of dissimilar sample pairs, thus separating different scenarios in the embedding space. Connectivity tendency refers to the current value of each element of the fully connected weight matrix and each element of the bias vector in each nonlinear transformation layer. The adjustment process uses backpropagation of stochastic gradient descent driven by a contrastive loss function. The contrastive loss function consists of two parts, corresponding to the constraints on similar and dissimilar sample pairs, respectively. For similar sample pairs, a penalty is applied to the square of the Euclidean distance between the two embedding vectors. The loss function outputs a loss value proportional to the square of the distance for this type of sample pair, forcing the embedding distance of similar pairs to continuously shrink. When the distance approaches zero, the loss also approaches zero. For dissimilar sample pairs, a marginal loss is used. A predefined boundary threshold is used as the minimum distance that dissimilar pairs should satisfy. When the Euclidean distance between the two embedding vectors is less than this boundary threshold, the loss is equal to the square of the difference between the boundary threshold and the current distance, and the gradient backpropagation pushes the two vectors away in opposite directions. When the distance is greater than or equal to the boundary threshold, the loss is directly set to zero, and the gradient is also zero, no longer applying additional push to dissimilar pairs that have already moved far apart. The two losses are arithmetically averaged over a batch of samples to form the total contrastive loss. Then, the partial derivative of the total contrastive loss with respect to each connection bias parameter is calculated, and the loss gradient is propagated layer by layer from the last layer to the first layer using the chain rule. The weight matrix and bias vector of each layer are updated along the negative gradient direction with a preset learning rate. At the same time, weight decay regularization is applied to the weight matrix to prevent overfitting.
[0040] Step S250: Repeatedly use the set of similar sample pairs and the set of dissimilar sample pairs to adjust the connection tendency of the initial embedding mapping structure. When the closeness of the embedding representation vectors of similar sample pairs and the distance of the embedding representation vectors of dissimilar sample pairs reach the preset stability condition, stop the adjustment and take the embedding mapping structure at this time as the state embedding mapping relationship.
[0041] During repeated training, each iteration randomly selects a small batch of sample pairs from both the set of similar and dissimilar sample pairs. The batch sizes of similar and dissimilar sample pairs can be equal or unequal, and sampling is performed according to a preset ratio. The selected sample pairs are fed into the current embedding mapping structure for forward propagation, and the embedding representation vector of each segment is calculated. The contrastive loss is calculated as described in step S240, and then backpropagation is performed to calculate the gradient of each layer's parameters. The adaptive moment estimation optimizer adaptively adjusts the effective learning rate of each parameter based on the current gradient and historical gradient momentum, and updates all weights and biases along the negative gradient direction, completing one round of connection bias adjustment. The preset stability condition refers to the fact that, within multiple consecutive training cycles, the average Euclidean distance of similar sample pairs calculated on the dedicated monitoring sample set no longer decreases and the average Euclidean distance of dissimilar sample pairs no longer increases, or the absolute amplitude of their fluctuations converges to a very small range of change. The standard deviation of the sliding window is used as the measure of the amplitude of change. The state embedding mapping relationship is the fixed and preserved form of all network weight parameters and bias parameters, the moving mean and moving variance of the batch normalization layer, and the network topology structure contained in the embedding mapping structure at the convergence time.
[0042] In one implementation, step S250 may specifically include the following steps S251 to S256: Step S251: Obtain the pre-set proximity target value and distance target value. The proximity target value represents the farthest allowed boundary between two embedding representation vectors of the same type of sample pair, and the distance target value represents the closest allowed boundary between two embedding representation vectors of different type of sample pair.
[0043] The proximity target value is an upper limit of Euclidean distance determined empirically based on the cluster radius of similar operating condition points within the embedded space under steady-state operation of a healthy unit. This upper limit is selected with reference to the embedded space dimension and the expected cluster density, and its value must be less than the minimum distance between the centers of any two different operating conditions to avoid inter-class overlap. The distance target value is a lower limit of Euclidean distance ensuring sufficient separation between the centers of any two different operating conditions within the embedded space. This lower limit must consider the embedded space dimension, the total number of classes, and the marginal threshold setting in the contrast loss, and is typically set to a reasonable multiple greater than the proximity target value.
[0044] Step S252: In each round of adjustment, a batch of similar sample pairs are extracted from the set of similar sample pairs, and a batch of dissimilar sample pairs are extracted from the set of dissimilar sample pairs. The extracted sample pairs are input into the current embedding mapping structure to obtain the embedding representation vector corresponding to each sample pair.
[0045] The batch sampling strategy employs random sampling without replacement. Before the start of a training cycle, the sets of similar and dissimilar sample pairs are randomly shuffled. Then, non-repeating sample pairs are read sequentially according to the batch size. A training cycle is considered complete when all sample pairs have been sampled, and the batches are shuffled again for the next cycle. The batch size is reasonably set based on the GPU memory capacity and training stability requirements. For each sample pair of similar samples, the two historical triplet segments are independently fed into the same embedding mapping structure, sharing network parameters. Forward propagation calculates and outputs their respective embedding representation vectors. The sampling and processing of dissimilar sample pairs are completely identical, sharing the same embedding mapping structure.
[0046] Step S253: Calculate the average proximity between the embedding representation vectors of a batch of similar sample pairs, and calculate the average distance between the embedding representation vectors of a batch of dissimilar sample pairs.
[0047] For each pair of similar samples in the batch, calculate the Euclidean distance between the first and second embedding vectors. The Euclidean distance is calculated by taking the square root of the sum of the squares of the element-wise differences between the two vectors. Take the arithmetic mean of all the distance values to obtain the average proximity, which serves as an indicator of the cluster density of similar sample pairs in the embedding space. Perform the same Euclidean distance calculation on all pairs of dissimilar samples in the batch and take the average to obtain the average distance, which indicates the separation status of dissimilar sample pairs in the embedding space.
[0048] Step S254: When the average proximity does not meet the proximity target value, or the average distance does not meet the distance target value, determine the adjustment direction and adjustment intensity of the internal connection tendency of the current embedded mapping structure based on the difference between the average proximity and the proximity target value, and the difference between the average distance and the distance target value, and perform the adjustment.
[0049] The proximity condition checks whether the average proximity is less than or equal to the target proximity value; if satisfied, it indicates that similar samples are sufficiently close together. The distance condition checks whether the average distance is greater than or equal to the target distance value; if satisfied, it indicates that dissimilar samples are sufficiently separated. Failure to meet either condition immediately triggers parameter adjustments for this batch. The adjustment magnitude is calculated using the partial derivatives of the contrastive loss function with respect to the weights and biases of each fully connected layer. When constructing the contrastive loss, the loss term contributing to the average proximity is taken as the average proximity itself or its smoothed transformation. The gradient of this loss term with respect to the parameters of each layer is backpropagated to the weights of each layer via the embedding representation vector and intermediate layer activation values using the chain rule. The direction of the gradient is the direction that reduces the distance between similar pairs. The loss term contributing to the average distance is taken as a marginal loss form, i.e., penalizing the positive part of the difference between the expected lower limit of distance and the actual average distance. The gradient of this loss term with respect to the parameters of each layer is the direction that increases the distance between dissimilar pairs. The gradients of the two losses are superimposed at each layer to form the total adjustment gradient of the weights and biases of that layer. The adaptive moment estimation optimizer receives the total adjustment gradient, first calculates the first-order moment estimate and the second-order moment estimate with bias correction, then scales the first-order moment estimate element-wise with the reciprocal of the square root of the second-order moment estimate to obtain the adaptive learning rate for each parameter, and then multiplies it by the current learning rate hyperparameter to use as the actual parameter update step size. This step size is applied to the corresponding connectivity bias parameter to complete the batch adjustment.
[0050] Step S255: When the average proximity meets the proximity target value and the average distance meets the distance target value, it is determined that the preset stability condition has been reached, and the connection tendency adjustment of the embedded mapping structure is stopped.
[0051] When both conditions are true, it indicates that the embedding space has sufficient intra-class compactness and inter-class separability. Samples of the same class are effectively clustered into tight clusters in the embedding space, and samples of different classes are sufficiently pushed into dispersed regions that are far apart from each other. The training loss has been reduced to an acceptable level, and further training can no longer bring about further improvement in the representation quality. At this point, the iteration loop is terminated.
[0052] Step S256: Determine and save the embedding mapping structure at the time of stopping adjustment as a state embedding mapping relationship, which is used to generate state vectors for real-time triples in the online phase.
[0053] The saved content includes complete floating-point arrays of the fully connected weight matrices and bias vectors for each nonlinear transformation layer, the accumulated moving mean and moving variance vectors of the batch normalization layers on the training set, the negative slope coefficients of each linear unit with leakage correction, the number of network layers, and hyperparameter configurations such as the input and output dimensions of each layer. All parameters are serialized in binary format and written to a single model file, with the file header containing a version number and parameter layout description metadata. During online inference, the metadata and parameter arrays are read sequentially from the model file, deserialized in memory to reconstruct an embedding mapping structure completely consistent with that during training, and the evaluation mode is invoked to freeze all parameters, ensuring that forward propagation does not generate parameter updates.
[0054] Step S260: During online operation, the real-time degradation index, active power ratio, and guide vane opening ratio collected at the same time are combined into a real-time triplet. The input state of the real-time triplet is embedded into the mapping relationship. After being passed and transformed layer by layer through each nonlinear transformation layer inside the state embedding mapping relationship, a fixed-length vector is output as the state vector of the reinforcement learning environment.
[0055] The generation time of the real-time triplet is based on the data acquisition cycle of the monitoring system. This acquisition cycle is synchronized by the plant-wide satellite clock system to ensure that all data acquisition channels are aligned under a unified time scale. The dimensionless real-time degradation index output from the online inference in step S100 is written into the degradation index measurement points in the real-time database. At the beginning of each acquisition cycle, the power transmitter broadcasts the latest active power measurement value of the current cycle through the communication bus, and the guide vane opening sensor synchronously updates the guide vane opening measurement value of the current cycle. The active power ratio and the guide vane opening ratio are calculated by dividing the real-time value by their respective rated values. The three scalars are encapsulated into a real-time triplet under the same time scale. The real-time triplet is fed into the first nonlinear transformation layer of the state embedding mapping relationship via the input interface. The first layer fully connected weight matrix performs matrix multiplication with the real-time triplet vector, and the weighted result is added element-wise to the bias vector to obtain the first layer linear mapping vector. This vector is then fed into the batch normalization layer, where the moving average and moving variance stored offline are used to subtract the mean and divide the standard deviation from the linear mapping vector, and then multiplied by the scaling parameter stored offline and a translation parameter is added. The normalized vector is then nonlinearly activated element-wise through a linear unit with leakage correction to generate the first intermediate vector. The first intermediate vector is passed to the second nonlinear transformation layer, where the second layer fully connected weight matrix performs another linear mapping and bias addition on the first intermediate vector, and the same batch normalization and activation process generates a second intermediate vector with a lower dimension. This process continues, with each nonlinear transformation layer compressing the vector dimension until the final nonlinear transformation layer outputs a fixed-length embedding representation vector, which is the state vector of the reinforcement learning environment. The state vector is written to the shared memory region in real time, and can be read asynchronously by the policy network and value network running on the same computing node, serving as the environment perception input for the reinforcement learning agent in the current control cycle.
[0056] Step S300: Generate a dimensionless positive excitation signal based on the difference between the target power ratio of the power generation plan and the active power ratio, and generate a dimensionless negative suppression signal based on the steepness of the change of the real-time degradation index at continuous time. When the steepness of the change intensifies, the strength of the negative suppression signal is enhanced in a nonlinear manner. The positive excitation signal and the negative suppression signal are combined to form a dimensionless comprehensive reward signal.
[0057] In one implementation, step S300 may specifically include the following steps S310 to S360: Step S310: Receive the current active power ratio of the power generation plan from the dispatch command channel, compare the active power ratio with the active power ratio of the power generation plan, generate a positive excitation signal with increased amplitude when the gap between the two narrows, and generate a positive excitation signal with decreased amplitude when the gap between the two widens.
[0058] The dispatch command channel is a network communication link connecting the power grid dispatch master station and the remote control workstation of the power plant monitoring system. Its physical layer is based on a redundant industrial Ethernet architecture, the transport layer uses the Transmission Control Protocol (TCP), and the application layer protocol follows the IEC 60870-5-104 standard. The dispatch master station, acting as the control end, initiates the link connection and periodically sends remote control or remote adjustment application service data units (RCDs) containing fields such as timestamps, target power ratios, command validity periods, and checksums to the controlled stations on the power plant side. After receiving the link layer data frames, the power plant-side front-end communication server's network card reassembles them into complete application layer messages via the TCP stack. The parser extracts information objects one by one according to the IEC 60870-5-104 application service data unit structure, writes the extracted target power ratio of the power generation plan into the corresponding measurement point in the real-time database, and records the command reception timestamp. The comparison process is executed once per control cycle of the automatic generation controller, reading the active power ratio and the target power ratio of the power generation plan for the current cycle from the real-time database, and calculating the absolute value of the difference between the two as the tracking error. The positive excitation signal is generated by a monotonically decreasing function of the tracking error. This function reaches its maximum value when the tracking error is zero and approaches zero as the tracking error approaches its rated value. The function uses a Gaussian radial basis function, and its kernel width parameter is set according to the allowable load regulation dead zone. The dead zone corresponds to the power regulation insensitivity zone set in the automatic generator controller. When the tracking error falls within the dead zone, the positive excitation signal remains close to its maximum value; beyond the dead zone, the excitation signal smoothly decays as the error increases. When the tracking error decreases between two adjacent control cycles, it indicates that the unit output is approaching the target value, and the positive excitation signal increases accordingly, providing positive reinforcement to the strategy network. Conversely, if the error increases, it indicates that the unit output deviates from the dispatch command, and the positive excitation signal decreases accordingly, weakening the reward for this deviation.
[0059] Step S320: Perform time-by-time difference processing on the real-time degradation indicators of multiple consecutive moments within the most recent time window to obtain the change sequence of the degradation indicators between adjacent moments, and extract the steepness of the indicator change reflecting the steepness of the degradation trend from the change sequence.
[0060] The time window length is calculated by truncating the real-time degradation index sequence forward in units of control cycles. The window contains real-time degradation index values from several consecutive control cycles backward from the current time. Each time a control cycle is triggered, the window slides forward by one step. Time-by-time differencing involves performing a first-order backward differencing operation on the truncated sequence. This means subtracting the real-time degradation index value of the previous time step from the value of the next time step in ascending chronological order to obtain the degradation index increment within each adjacent time interval. All these increments are arranged chronologically to form a sequence of changes whose length is one less than the window length. The sign of each element in the sequence indicates whether the degradation index increases or decreases within that interval, and the absolute value indicates the magnitude of the change. The steepness of indicator changes is extracted by calculating the root mean square (RMS) value of the change series. The extraction process involves first squaring each increment value in the change series to obtain a squared series. All values in the squared series are then summed, and the sum is divided by the total number of elements in the change series to obtain the mean square value. Finally, the square root of this mean square value is taken to obtain the root mean square (RMS) value. This RMS value reflects the overall severity of the recent deviation of the degradation indicator from a stable trend. A larger RMS value indicates that the degradation indicator has experienced significant or frequent fluctuations recently, suggesting that the unit's health may be deteriorating at an accelerated pace.
[0061] Step S330: Compare the steepness of the indicator change with the pre-calibrated safe change limit. When the steepness of the indicator change does not exceed the safe change limit, generate a negative suppression signal with zero intensity.
[0062] The pre-defined safety variation limit is derived from the upper tolerance limit of the probability density distribution obtained by long-term statistical analysis of the root mean square (RMS) values of real-time degradation index changes during a historical period when the hydropower unit is confirmed to be fault-free and in excellent condition. The historical period of confirmed fault-free operation and excellent condition is determined by cross-referencing the unit's maintenance log, historical alarm records from online vibration monitoring, and periodic condition evaluation reports. The selected operating interval is characterized by no bearing vibration shutdown alarms, no bearing temperature exceeding limits, continuous excellent condition evaluation, and measured unit efficiency test values not lower than the design guarantee values. Histogram statistics are performed on the RMS values of all index changes calculated using the sliding window method in step S320 within this interval. The histogram is then converted into an empirical cumulative distribution function. The RMS value corresponding to a certain high percentile of the cumulative distribution function is taken as the safety variation limit. The statistical meaning of this limit is that the degradation fluctuation rate is below this limit for the vast majority of the time during healthy operation. The comparison operation is performed once in each control cycle. The root mean square value of the steepness of the indicator change calculated at the current moment is compared with the safe change limit. If the root mean square value is less than or equal to the safe change limit, it indicates that the current degradation rate is still within the normal fluctuation range of a healthy state and the unit is operating smoothly. At this time, the strength of the negative suppression signal is directly set to zero, and no life loss penalty is imposed.
[0063] Step S340: When the steepness of the indicator change exceeds the safe change limit, the strength of the negative suppression signal is determined according to the magnitude of the excess. The growth rate of the negative suppression signal strength increases segment by segment when the excess amplitude is located in different segments, so that the larger the excess amplitude, the faster the rise rate of the negative suppression signal strength.
[0064] In one implementation, step S340 may specifically include the following steps S341 to S346: Step S341: Obtain the normal fluctuation range of degradation indicators statistically obtained during the historical period of confirmed healthy operation of the hydropower unit, and determine the upper limit of the normal fluctuation range of degradation indicators as the safe change limit.
[0065] The historical periods for confirming healthy operation were jointly calibrated by querying the unit's maintenance log and condition monitoring historical data. The maintenance log recorded the time range and content of each planned maintenance and temporary troubleshooting operation, while the condition monitoring historical data recorded continuous measurement values of vibration, bearing temperature, oil temperature, and efficiency of each guide bearing. All continuous operating periods were selected from the completion of all maintenance until the next fault or alarm occurred, provided that vibration and bearing temperature did not trigger alarm thresholds throughout the entire period, and the unit efficiency test results were within the design guarantee range. For these periods, using the same time window length and sliding step size, the root mean square (RMS) values of all indicator changes were calculated according to the method described in step S320, and a full-sample statistical analysis was performed. Histogram binning was performed on this sequence, with the bin width set according to a certain proportion of the sequence standard deviation. The frequency within each bin was counted, and the cumulative distribution function value was calculated from low frequency to high frequency. The RMS value at which the cumulative distribution function reaches a preset high percentage was taken as the upper limit of the normal fluctuation range of the degradation indicator, recorded as the safe change limit, and saved to the parameter configuration file.
[0066] Step S342: Subtract the safety change limit from the steepness of the index change to obtain the excess amplitude. When the excess amplitude is positive, proceed to the negative suppression signal strength determination process. When the excess amplitude is zero or negative, determine that the negative suppression signal strength is zero.
[0067] Within each control cycle, the root mean square value of the steepness of the indicator change calculated in step S320 is subtracted from the safe change limit read in step S341 to obtain the excess amplitude. Next, a sign check is performed on the excess amplitude. If the excess amplitude is greater than zero, it indicates that the current degradation fluctuation rate has exceeded the limit, and the subsequent segmented penalty multiplier calculation process is activated. If the excess amplitude is less than or equal to zero, it indicates that the degradation rate is within the safe range, the penalty calculation process is skipped, and the negative suppression signal strength is directly assigned to zero.
[0068] Step S343: Pre-divide into multiple continuously increasing exceedance range segments, each exceedance range segment has a corresponding penalty enhancement multiplier, and the penalty enhancement multiplier corresponding to the later exceedance range segment is larger.
[0069] The exceedance range is divided according to multiples relative to the safe change limit. The division points are set based on the exceedance range distribution characteristics corresponding to degradation acceleration events observed in the unit's maintenance history. The first range covers the exceedance range from zero to a first preset multiple of the safe change limit, indicating a minor degradation exceedance. The second range covers the range from the first preset multiple to the second preset multiple, representing a moderate exceedance. The third range covers the entire range exceeding the second preset multiple, representing a severe exceedance. The penalty enhancement ratio bound to the first range is set to the base ratio. The penalty enhancement ratio bound to the second range is set to the base ratio multiplied by a first amplification factor. The penalty enhancement ratio bound to the third range is set to the base ratio multiplied by a larger second amplification factor. Subsequent ranges expand according to this incremental logic, with the amplification factor increasing segment by segment.
[0070] Step S344: Determine the excess amplitude segment into which the excess amplitude falls, extract the penalty enhancement ratio corresponding to the excess amplitude segment, and multiply the base suppression strength and the penalty enhancement ratio to obtain the negative suppression signal strength in the segment.
[0071] The judgment operation employs a segment-by-segment comparison method. Segment numbers are arranged in ascending order, and the excess amplitude is compared sequentially with the upper and lower limits of each segment. Once an interval where the excess amplitude falls between the lower and upper limits of a segment is found, the traversal stops, and that segment is marked as a hit excess amplitude segment. The base suppression strength is taken as the value of the safe change limit itself, ensuring that the penalty signal and the baseline scale of degradation exceedance are on the same order of magnitude. After extracting the penalty enhancement ratio bound to the hit segment, a multiplication operation is performed to multiply the base suppression strength by the penalty enhancement ratio; the product is the negative suppression signal strength contributed by that segment.
[0072] Step S345: When the amplitude exceeds multiple amplitude segments, the components of each segment are calculated according to their respective multiples and then summed to obtain the final negative suppression signal strength.
[0073] If the exceedance exceeds the upper limit of the first segment, the exceedance spans the entire range of the first segment and extends to higher segments. For the first segment, its complete span (upper limit minus lower limit) is taken as the segment component. This segment component is multiplied by the base suppression strength and then by the penalty enhancement factor of the first segment to obtain the first part of the penalty. The exceedance is subtracted from the upper limit of the first segment to obtain the remaining exceedance. The remaining exceedance is then further divided and penalized segment by segment in subsequent segments until the remaining exceedance is completely distributed across all covered segments. The calculated component penalty values for all segments are summed to generate the total negative suppression signal strength. This accumulation mechanism ensures that when the exceedance spans multiple segments, the more severe portion automatically applies a higher penalty factor, and the total penalty increases at an incremental rate.
[0074] Step S346: The strength of the negative suppression signal is used as the suppression force against unit life loss at the current moment and transmitted to the formation stage of the comprehensive reward signal.
[0075] The resulting negative suppression signal strength is a non-negative real number. When it is input into the comprehensive reward signal formation stage, its sign is inverted, and it participates in the calculation of the comprehensive reward signal as a negative component. In the process of trying to obtain higher positive incentives, the reinforcement learning agent will actively avoid operation strategies that would cause a significant acceleration in the real-time degradation index due to the existence of this negative penalty term. Thus, a behavioral preference for equipment life protection is embedded in the load adjustment decision space.
[0076] In another implementation, step S340 may include the following steps S3401 to S3406: Step S3401: Obtain the natural fluctuation records of degradation indicators of hydropower units during multiple historical healthy operating periods. After dividing the natural fluctuation records by time period, extract the statistical boundary of the fluctuation range of degradation indicators in each time period, and determine the maximum upper edge of the statistical boundary of each time period as the dynamic safety benchmark.
[0077] Multiple historical healthy operating periods cover the long-term healthy operating status of the unit under different head seasons, different sediment content levels, and different upstream water level combinations to ensure that the safety benchmark can cover the range of possible fluctuations under normal operating conditions. The natural fluctuation record is a sequence of the steepness of all index changes calculated according to the method in step S320 within each healthy operating period. For the natural fluctuation record within each period, histogram statistics and high percentile extraction are performed independently to obtain the upper edge of the statistical boundary corresponding to that period. The upper edge values of all periods are traversed, and the global maximum value is extracted by comparing values one by one. This maximum value is used as the dynamic safety benchmark. Since the dynamic safety benchmark takes the most lenient safety boundary under all healthy operating conditions, it has a natural adaptive tolerance for reasonable fluctuations in degradation indicators under different operating conditions.
[0078] Step S3402: Perform dual-channel trend decoupling processing on the real-time degradation index to separate the instantaneous steep component reflecting the short-term jitter amplitude and the cumulative trend component reflecting the continuous offset direction.
[0079] The dual-channel trend decoupling processing employs a complementary filtering architecture based on a first-order infinite impulse response filter. The real-time degradation index sequence is simultaneously fed into both a high-pass filter channel and a low-pass filter channel. The two channels share the same input sequence but have complementary filtering characteristics. The transfer function of the high-pass filter channel is in first-order high-pass form. Its difference equation includes the difference between the current input and the previous input, as well as the previous high-pass output multiplied by the high-pass filter coefficient. The high-pass filter coefficient determines the high-pass cutoff frequency; the closer the coefficient is to 1, the lower the cutoff frequency, resulting in a richer intake of high-frequency components. The output sequence is the instantaneously steep component, which is highly sensitive to short-term spikes and jitter but weakly responsive to slow drifts. The low-pass filter channel is implemented, for example, using an exponentially weighted moving average.
[0080] Step S3403: Compare the instantaneous steep component with the dynamic safety benchmark, and monitor the offset direction of the cumulative trend component. When the instantaneous steep component exceeds the dynamic safety benchmark and the cumulative trend component shifts in the degradation direction, generate an over-limit confirmation mark.
[0081] The offset direction is determined by the sign of the difference between the latest value of the cumulative trend component at the current moment and its first-order hysteresis value, where the first-order hysteresis value is the cumulative trend component value stored in the previous control cycle. A positive difference indicates that the cumulative trend component is increasing, meaning that the degradation index has a continuous upward drift trend, and this direction is defined as the degradation direction. When the absolute value of the instantaneous steep component exceeds the dynamic safety benchmark, and the offset direction is positive while the difference magnitude exceeds the preset minimum offset judgment threshold, an over-limit confirmation flag is generated. This flag indicates that there is not only a short-term severe jitter, but this jitter is superimposed on a continuous long-term deterioration trend. Both together confirm that the unit may be in a real accelerated degradation process rather than an occasional noise interference. At this time, initiating penalties can effectively suppress false penalties caused by false over-limits.
[0082] Step S3404: When an over-limit confirmation flag appears, calculate the instantaneous over-limit amount of the instantaneous steep component exceeding the dynamic safety benchmark, and perform trend amplification processing on the instantaneous over-limit amount according to the offset degree of the cumulative trend component to obtain the trend-corrected over-limit amount.
[0083] The instantaneous overshoot is obtained by subtracting the dynamic safety benchmark from the absolute value of the instantaneous steepness component; the difference is non-negative. The correction factor for trend amplification is determined by the offset of the cumulative trend component, which is quantified by dividing the first-order hysteresis difference of the current cumulative trend component by the dynamic safety benchmark. This ratio reflects the rate of deterioration of the long-term trend relative to the safety benchmark. The correction factor is a constant 1 plus the product of the offset and a preset amplification factor. The amplification factor controls the amplification of the instantaneous penalty for trend deterioration. The correction factor is always greater than or equal to 1, and the steeper the deterioration trend, the larger the correction factor. Multiplying the instantaneous overshoot by the correction factor yields the trend-corrected overshoot, so that the same instantaneous overshoot magnitude produces a larger effective overshoot when accompanied by more severe long-term trend deterioration, thereby triggering a stronger penalty and guiding the policy network to be more sensitive to early signals of long-term deterioration trends.
[0084] Step S3405: The trend correction excess amount is assigned to the corresponding excess amplitude segment according to the preset segment division rules, and the penalty enhancement ratio bound to the segment is extracted. The base suppression strength and the penalty enhancement ratio are multiplied to generate the negative suppression signal strength corresponding to the excess amplitude segment.
[0085] The segment division rules and penalty enhancement ratio settings are exactly the same as in step S343. The segment division boundaries and corresponding penalty enhancement ratios are pre-configured in the parameter file and loaded at runtime. The trend correction excess amount replaces the original excess amplitude, and the segment positioning and multiplication process is exactly the same as in step S344 to generate a negative suppression signal strength.
[0086] Step S3406: When the instantaneous steep component does not exceed the dynamic safety reference or the cumulative trend component does not shift in the degenerate direction, the negative suppression signal strength is maintained at zero, and the dynamic safety reference and cumulative trend component in the current state are temporarily stored for comparison and correction at subsequent times.
[0087] The temporary storage operation writes the dynamic safety baseline value used in the current control cycle and the latest calculated cumulative trend component value to their respective designated circular buffer locations, overwriting the values stored in the previous cycle. In the next control cycle, when calculating the offset direction and first-order hysteresis difference, the cumulative trend component value from the previous moment is directly read from this buffer location, completing the temporal correlation comparison. The temporary storage operation ensures that the limit-crossing judgment logic maintains state consistency across consecutive time steps, unaffected by intermediate network communication delays or data cache refreshes.
[0088] Step S350: The amplitude of the positive excitation signal is fused with the preset power generation task emphasis to obtain the positive excitation component after emphasis adjustment; the intensity of the negative suppression signal is fused with the preset lifetime protection emphasis to obtain the negative suppression component after emphasis adjustment.
[0089] The power generation task emphasis is a dimensionless weight value manually set by operators through a slider or numerical input box on the human-machine interface of the monitoring system, based on the current grid load tension and dispatch assessment priority. This weight value is continuously adjustable between 0 and 1; a higher value indicates that the current operating strategy places greater emphasis on the completion quality and assessment indicators of the power generation task. The lifespan protection emphasis is another dimensionless weight value set based on the unit's most recent offline or online status evaluation conclusion and the urgency of the maintenance plan. The status evaluation conclusion includes the health scores and comprehensive ratings of the unit's major components. The urgency of the maintenance plan is calculated as an urgency coefficient based on the remaining days or operating hours until the next planned maintenance. The lifespan protection emphasis also ranges from 0 to 1. Both emphasis values are weighted and normalized to ensure that their sum is always 1. That is, when operators increase the emphasis of one side, the other side is automatically reduced by an equal amount to ensure that the total weight of the strategy preference remains constant. The fusion operation is directly implemented by multiplication: the amplitude of the positive excitation signal generated in step S310 is multiplied by the power generation task emphasis, and the product is the positive excitation component after emphasis adjustment. The lower the emphasis, the more proportionally the component is reduced; the strength of the negative suppression signal generated in step S340 is multiplied by the lifetime protection emphasis, and the product is the negative suppression component after emphasis adjustment. The lower the emphasis, the more proportionally the component is weakened.
[0090] Step S360: Combine the adjusted positive excitation component and the adjusted negative inhibition component to obtain the dimensionless comprehensive reward signal for the current time step, and output it to the subsequent training or online adjustment process.
[0091] The merging process employs algebraic summation, directly adding the adjusted positive incentive components and the adjusted negative inhibition components numerically. Since the negative inhibition component is non-positive, the addition result represents the net effect of the positive incentive and negative inhibition. If the positive incentive dominates, the overall reward signal is positive; if the lifetime protection penalty dominates, the overall reward signal is negative. This overall reward signal, serving as the immediate reward for the current time step, is encapsulated as the immediate reward in the time difference error calculation and passed to the experience storage area and value function update stage of the deep deterministic policy gradient algorithm. This provides a supervisory benchmark for the time difference objective of the value network and, simultaneously, provides optimization directions for action evaluation in the gradient update of the policy network.
[0092] Step S400: Train the policy network and value network offline using deep deterministic policy gradients. Input the state vector into the policy network to obtain the continuous load allocation ratio value. Input the state vector and the continuous load allocation ratio value into the value network to obtain the state-action evaluation value. Update and adjust the internal connection tendency of the value network and the internal connection tendency of the policy network by integrating the reward signal. Repeat the training process until the policy network converges.
[0093] In one implementation, step S400 may specifically include steps S410 to S460: Step S410: The state vector is passed through multiple compression transformation layers arranged sequentially inside the policy network. Each compression transformation layer performs nonlinear synthesis processing on the input and then passes it to the next layer. The output of the last layer is mapped by proportional limitation to obtain the continuous load allocation ratio value, which represents the proportion of the unit's output to the rated power.
[0094] In one implementation, step S410 may specifically include steps S411 to S416: Step S411: Separate the degradation index component, active power ratio component, and guide vane opening ratio component from the state vector. Combine the active power ratio component and guide vane opening ratio component into an operating condition sub-vector, and treat the degradation index component as an independent degradation sub-vector.
[0095] The state vector is composed of the fixed-length embedded representation vector output in step S260. Although this embedded representation vector has undergone nonlinear compression through embedding mapping, its first three dimensions correspond sequentially to the degradation index embedded component, active power embedded component, and guide vane opening embedded component according to the construction protocol during offline training. The splitting operation directly reads these three scalar values from the state vector according to their index positions, assigning the first scalar to the degradation index component, the second scalar to the active power ratio component, and the third scalar to the guide vane opening ratio component. The operating condition sub-vector is a two-dimensional vector composed of the active power ratio component and the guide vane opening ratio component, which together reflect the current load-hydraulic condition combination of the unit. The independent degradation sub-vector is a one-dimensional vector containing only the degradation index component, carrying the core information of the current unit health degradation.
[0096] Step S412: Use the running condition sub-vector as the input of the first compression transformation layer, and at the same time pass the independent degradation sub-vector to the output position of each compression transformation layer through layer-by-layer bypass connection, so that degradation information is continuously injected during the layer-by-layer compression process.
[0097] The first compression transform layer receives the operating condition sub-vector as its sole input signal source. This two-dimensional vector, upon entering the first layer, undergoes a linear mapping through the first layer's fully connected weight matrix. Layer-by-layer bypass connections are a set of cross-layer identity mapping paths, pre-built during the policy network construction phase. Each compression transform layer is configured with an independent bypass connection. Structurally, each bypass connection is a branch directly derived from the network input port, faithfully copying the value of the independent degenerate sub-vector and transmitting it to the corresponding compression transform layer's output feature vector. At the end of each compression transform layer, the feature vector obtained through fully connected layers, batch normalization, and activation operations is concatenated with the independent degenerate sub-vector transmitted via the bypass connection in the dimensional direction. The concatenated vector simultaneously contains deeply abstracted operating condition features and untransformed original degradation magnitude information. Because the bypass connections exist independently in each layer, the degradation index component is unaffected by the weight compression of each layer, continuously injecting degradation-aware signals throughout the entire forward propagation depth of the policy network, preventing the degradation information from being gradually diluted or submerged as the network depth increases.
[0098] Step S413: In each compression transformation layer, linear mixing and nonlinear activation processing are performed on the working condition abstract features output by the previous layer to obtain the candidate features of the current layer. The candidate features are then combined bit by bit with the independent degradation sub-vectors after dimension adaptation to generate intermediate layer features carrying degradation perception signals.
[0099] Linear blending is achieved by performing matrix multiplication on the abstract feature vector from the previous compression transformation layer using the current layer's fully connected weight matrix, and then adding it element-wise to the current layer's bias vector. The number of columns in this fully connected weight matrix equals the dimension of the previous layer's output vector, the number of rows equals the preset output dimension of the current layer, and the length of the bias vector equals the output dimension. The result of the matrix multiplication and bias addition is a real vector with the same length as the output dimension. Then, a linear unit function with leakage correction is applied to each element of this vector; positive values remain unchanged, while negative values are scaled with a fixed small slope, generating candidate features for the current layer. Dimensional adaptation is a miniature fully connected layer located at the end of the side-channel connections. It contains only a single weight scalar and a single bias scalar. The input is a one-dimensional independent degenerate sub-vector, and the output is an adaptation vector with the same dimension as the candidate features of the current layer. Each element in the adaptation vector equals the independent degenerate sub-vector multiplied by the weight scalar plus the bias scalar, thus broadcasting the single degenerate scalar to the same dimension as the candidate features. The bitwise combination employs bitwise addition, adding the candidate feature vector and the dimension-adapted degenerate vector at each element position to generate intermediate layer features. Each dimension of this intermediate layer feature simultaneously encodes the high-order nonlinear features abstracted from the operating condition information by the compression transform layer, as well as the original degenerate magnitude bias directly injected by the bypass connection, forming a deeply coupled representation of operating conditions and degradation.
[0100] Step S414: Combine the intermediate layer features output from the final compression transform layer with the independent degenerate sub-vectors bit by bit again, and input the combination result into the boundary constraint unit. The boundary constraint unit reviews each received component for a limit value, and forces the components that exceed the preset upper limit to the preset upper limit value, and forces the components that are below the preset lower limit to the preset lower limit value, thus obtaining the decision condensation signal.
[0101] The intermediate layer feature output from the final compression transformation layer is the highest-order working condition degradation coupling feature vector obtained after all compression and abstraction of the network. At the output position of this vector, a degradation bias vector from the independent degradation sub-vectors, after dimension adaptation, is introduced again and added to the intermediate layer feature at the final layer, completing the final injection of degradation information into the final decision layer. The boundary constraint unit is a parameterless hard truncation function module with a preset upper limit of 1.0 and a preset lower limit of -1.0. The boundary constraint unit iterates through and examines each element of the received combined result vector: if the value of an element is greater than the upper limit of 1.0, the value of the element is forcibly rewritten to 1.0; if the value of an element is less than the lower limit of -1.0, the value of the element is forcibly rewritten to -1.0; if the value is between -1.0 and 1.0, the original value remains unchanged. The vector obtained after all elements have undergone limit checks is the decision condensation signal. Each element of this signal is constrained to a closed interval between -1.0 and 1.0, providing a bounded and numerically stable input for the subsequent scaling layer.
[0102] Step S415: The decision condensation signal is transmitted to the proportional mapping layer. The proportional mapping layer uses a monotonic continuous mapping relationship to transform the decision condensation signal to a preset load ratio value range, generating the original load ratio output value.
[0103] The proportional mapping layer internally implements a logistic function as a monotonically continuous mapping relationship. The input of the logistic function is a single real scalar obtained by weighted summation of each component of the decision condensation signal through a fully connected layer with a single output neuron and applying a bias. This fully connected layer contains a weight vector and a bias scalar. The length of the weight vector is equal to the dimension of the decision condensation signal, and the summation operation is the vector dot product plus the bias. The logistic function operates on this scalar, and its output range is the open interval from 0 to 1. The function curve is approximately linear near the zero input, and the asymptotes at both ends approach 0 and 1 but never touch them. The entire function is strictly monotonically increasing. The output of the logistic function is the original load proportion output value, which essentially represents the continuous estimate of the optimal load allocation ratio by the policy network under a given state vector.
[0104] Step S416: Perform saturation truncation processing on the original load ratio output value. When the original load ratio output value exceeds the upper boundary of the load ratio value range, replace it with the upper boundary value. When the original load ratio output value is lower than the lower boundary of the load ratio value range, replace it with the lower boundary value to obtain the continuous load distribution ratio value.
[0105] The load ratio range is set to an upper boundary of 1.0 and a lower boundary of 0.0, corresponding to the complete output range of the unit from no-load to full-load. Saturation cutoff is completed through two numerical comparison and replacement operations. First, the original load ratio output value is compared with 1.0, and the smaller value is taken as the first intermediate result. This step ensures that any output slightly exceeding 1.0 due to the numerical precision of the logistic function is pulled back to 1.0. Next, the first intermediate result is compared with 0.0, and the larger value is taken as the final continuous load allocation ratio value. This step ensures that any output below zero is raised to 0.0. After double-layer saturation cutoff protection, the continuous load allocation ratio value is strictly limited to a closed interval between 0 and 1, which is the deterministic action output by the strategy network under the current state vector. This action can be directly sent to the load command generation stage as a reference signal for unit power regulation.
[0106] Step S420: The state vector and the continuous load allocation ratio value are sent to the state processing channel and the action processing channel of the value network, respectively. The state processing channel condenses the state vector to obtain the state summary quantity, and the action processing channel expands and encodes the continuous load allocation ratio value to obtain the action summary quantity. The state summary quantity and the action summary quantity are combined and then output as the evaluation value of the current state-action combination through the value fusion section.
[0107] The value network employs a dual-channel heterogeneous input architecture to process heterogeneous state and action information separately. The state processing channel consists of two stacked fully connected hidden layers. The first hidden layer contains a predetermined number of neurons. Each neuron performs a weighted summation and bias on all elements of the input state vector, then activates the output via a leakage-corrected linear unit. The second hidden layer also contains a predetermined number of neurons, which again performs a fully connected mapping and leakage-corrected linear unit activation on the output of the first hidden layer. These two layers progressively condense the information from the state vector into a lower-dimensional but more semantically refined state summary. The dimensionality of the state summary corresponds to the progressively decreasing number of neurons in the first and second hidden layers. The action processing channel consists of a single fully connected hidden layer. Its input is a single scalar value representing the continuous load distribution ratio. This hidden layer contains a predetermined number of neurons. Each neuron performs a weighted summation and bias on this scalar value, then activates it via a leakage-corrected linear unit, expanding and encoding the single-dimensional action information into an action summary with the same dimension as the state summary. This allows the action information to be mapped from the scalar space to a semantic space of the same dimension as the state summary. The value fusion section first concatenates the state summary and action summary along the feature dimension to generate a fusion vector twice the length of the summary dimension. This fusion vector then passes through a fully connected fusion layer and a linear unit activation with leakage correction. The fusion layer contains a predetermined number of neurons to further model the nonlinear interaction between state and action. The output of the fusion layer is then fed into a fully connected output layer containing only a single neuron. The output layer has no activation function and directly produces a real scalar, which is the state-action evaluation value, representing the estimated long-term discounted cumulative return corresponding to executing the action of continuous load allocation ratio under the current state vector.
[0108] Step S430: Apply a continuous load distribution ratio value to the offline simulated unit environment to drive the simulated unit state update, generate the simulated state vector for the next moment, and calculate the real-time comprehensive reward signal for the current step according to the comprehensive reward signal formation method.
[0109] The offline simulation environment is a digital twin built around the numerical model of differential equations obtained from the historical operating characteristics of the hydropower unit. This environment integrates three main functional modules. The turbine steady-state output characteristic module stores the comprehensive characteristic curves of the turbine model in a discrete grid format. The row coordinates of the grid represent the guide vane opening ratio, the column coordinates represent the unit speed, and the grid node values are unit flow rate and unit torque. During environment updates, the unit speed is calculated based on the current simulated head and speed, and bilinear interpolation is performed along with the guide vane opening ratio. The corresponding unit flow rate and unit torque are then found in the grid and converted to turbine mechanical power using a similarity conversion formula. The mechanical power is multiplied by the generator efficiency to convert it into active power, and then divided by the rated power to obtain the active power ratio for the next time step. The first-order inertial servo module of the guide vane relay uses the continuous load allocation ratio output by the strategy network as the target opening command for the current control cycle. Combined with the measured opening and closing time constants of the relay, it performs exponential dynamic tracking of the current guide vane opening ratio using a first-order inertial element to calculate the guide vane opening ratio for the next moment. The degradation index recursive module uses an autoregressive moving average model with operating condition factors. The model inputs are the current degradation index, the change in active power ratio for the current step, and the change in guide vane opening ratio for the current step. The model parameters are obtained by identifying the historical degradation index sequence and the corresponding operating condition sequence through a least-squares system. The model recursive output is the real-time degradation index for the next moment. After receiving the continuous load allocation ratio output by the strategy network, the environment sequentially executes the state recursive calculations of the above three modules to update the active power ratio, guide vane opening ratio, and real-time degradation index for the next moment. The three updated values are fed into the same state embedding mapping relationship as in the online phase for forward inference to generate the simulated state vector for the next moment. Simultaneously, based on the target power ratio of the power generation plan and the updated active power ratio, and according to the complete comprehensive reward signal formation method described in step S300, the instantaneous comprehensive reward signal for the current step is calculated. This signal is returned to the reinforcement learning agent as environmental feedback along with the simulated state vector for the next moment.
[0110] Step S440: Encapsulate the current state vector, continuous load allocation ratio, instantaneous comprehensive reward signal and the simulated state vector of the next moment generated by this interaction into an experience record and store it in the experience storage area. When the number of records in the experience storage area exceeds the preset capacity, remove the earliest stored experience record.
[0111] The experience storage area is a fixed-capacity circular buffer queue, implemented as an array in physical memory, maintaining two integer index variables, a head pointer and a tail pointer, both initially pointing to the beginning of the array. The encapsulation operation creates an experience record data structure containing four members: the current state vector, the continuous load allocation ratio, the instantaneous comprehensive reward signal, and the simulation state vector for the next time step. The current state vector is a one-dimensional floating-point array of the same length as the output dimension of the state embedding mapping; the continuous load allocation ratio is a single floating-point number; the instantaneous comprehensive reward signal is a single floating-point number; and the simulation state vector for the next time step is also a one-dimensional floating-point array of the same dimension. Each time a new experience record is generated during online or offline simulation interaction, the values of the four members are sequentially copied to the array index position pointed to by the tail pointer to complete the write operation. Then, the tail pointer value is incremented by 1, and the preset capacity is taken modulo the tail pointer to point to the next writable position. If the tail pointer value after incrementing by one and taking the modulo equals the head pointer value, it means the buffer is full of records with the preset capacity. At this point, the head pointer is also incremented by one and modulo taken with the preset capacity. This means the oldest experience record in the queue originally pointed to by the head pointer is discarded, and the freed-up space is indirectly overwritten by new experience records. This circular overwriting mechanism ensures that the experience storage area always retains the most recently generated experience records with the preset capacity, maintaining the freshness and diversity of the samples.
[0112] Step S450: Extract a batch of experience records from the experience storage area, and use the batch of experience records to adjust the internal connection tendency of the value network, so that the evaluation value output by the value network is closer to the sum of the immediate comprehensive reward signal and the evaluation value of the subsequent state contained in the batch of experience records.
[0113] In one implementation, step S450 may specifically include the following steps S451 to S456: Step S451: Randomly select a batch of experience records from the experience storage area. Each experience record contains the current state vector, the continuous load allocation ratio value, the instantaneous comprehensive reward signal, and the simulated state vector at the next moment.
[0114] The random sampling operation uses a Mason slew pseudorandom number generator to generate a sequence of random integers that conform to a uniform distribution. Each random integer is mapped to a valid index range in the experience storage area through a modulo operation. If duplicate indices are generated, they are skipped and the sampling is supplemented until a number of distinct indices of the preset batch size are obtained. The corresponding experience record structure is read from the circular buffer array with these indices as offsets, and the four member data each form a batch tensor.
[0115] Step S452: Input the simulated state vector of the next moment in each experience record into the policy network to obtain the reference load allocation ratio value of the next moment. Input the simulated state vector and the reference load allocation ratio value of the next moment into the current value network to obtain the state action evaluation value of the next moment.
[0116] During this step, the policy network switches to evaluation mode, suspends the moving mean variance update of the batch normalization layer, and disables gradient calculation. The simulated state vector for the next time step of each experience record is fed into the policy network. Following the complete flow from steps S411 to S416, it propagates forward, sequentially undergoing splitting, bypass injection, layer-by-layer compression transformation, boundary constraints, and scaling mapping. Finally, it outputs the reference load allocation ratio for the next time step, which is the optimal action estimate for the simulated state under the current parameters. Subsequently, the simulated state vector for the next time step is paired with the reference load allocation ratio for the next time step, and both are fed into the target value network. Following the flow from step S420, the state vector is condensed into a state summary quantity through the state processing channel, and the reference load allocation ratio value is expanded into an action summary quantity through the action processing channel. The two are then converged and nonlinearly mapped layer by layer in the value fusion section. Finally, a single-output neuron outputs a scalar, which is the state-action evaluation value for the next time step, serving as the future reward estimate in the time-difference objective.
[0117] Step S453: Add the instantaneous comprehensive reward signal to the state action evaluation value of the next moment after decay processing to obtain the expected evaluation value corresponding to each experience record.
[0118] The attenuation process involves multiplying the next-moment state action evaluation value calculated in step S452 by a preset discount factor. After the multiplication, the instantaneous comprehensive reward signal stored in the experience record is added to the attenuated next-moment state action evaluation value using scalar addition. The result of this addition is the expected evaluation value. The expected evaluation value represents an unbiased estimate of the total discounted sum of the cumulative rewards obtained after executing the continuous load allocation ratio under the state vector, based on the current parameter estimation of the target value network.
[0119] Step S454: Input the current state vector and continuous load allocation ratio value from each experience record into the current value network to obtain the current state action evaluation value, and compare the deviation between the current state action evaluation value and the expected evaluation value.
[0120] The current state vector and continuous load allocation ratio values are extracted from the experience records and fed into the value network to be updated. The current state action evaluation value is calculated according to step S420. The deviation is calculated by subtracting the expected evaluation value obtained in step S453 from the current state action evaluation value; this difference is the time difference error. The sign and magnitude of the time difference error reflect the degree to which the value network overestimates or underestimates the current state action pair relative to the time difference target.
[0121] Step S455: Adjust the connection tendency of each processing channel and fusion segment within the value network according to the deviation, so that the adjusted value network reduces the deviation between the current state action evaluation value and the expected evaluation value for the same input and output.
[0122] The optimization objective is to minimize the mean of the squared temporal difference errors over this batch of experience records. The loss value is calculated as the arithmetic mean of the squared temporal difference errors of all experience records in this batch, multiplied by half. The partial derivatives of this loss value with respect to the weight matrices and bias vectors of the two fully connected hidden layers in the state processing channel, the weight matrix and bias vector of the single fully connected hidden layer in the action processing channel, and the weight matrix and bias vector of the fully connected fusion layer and the fully connected output layer in the value fusion segment are calculated using an automatic differentiation framework. The partial derivative calculation propagates layer by layer from the output layer to the input layer using the chain rule. At each fully connected layer, the gradient of the loss with respect to the output vector is calculated, and then multiplied by the Jacobian matrix of the output vector with respect to the weight and bias vectors to obtain the gradients of the weights and biases at that layer. After the gradients of all parameters are calculated, they are fed into the adaptive moment estimation optimizer. The optimizer calculates the adaptive learning rate independently for each parameter based on the moving average of the first and second moments of the current gradient value and the historical gradients, and adds the negative gradient of the weight decay regularization term to the gradient direction, ultimately generating the update amount for each parameter in this step. Each update value is multiplied by the current learning rate and then applied negatively to the corresponding connection bias parameter value, completing one value network update. After the update, forward propagation of the same batch of experience records reveals that the current state action evaluation value significantly converges to the expected evaluation value, and the temporal difference error is reduced.
[0123] Step S456: Repeat the above-mentioned tendency adjustment process for a batch of extracted experience records until the average deviation of the batch of experience records drops below the preset deviation limit.
[0124] Repeat steps S452 to S455 to perform the complete forward and backward propagation process, with each execution constituting one round of value network update. After each round of update, recalculate the time difference error of all samples in the current batch of experience records through forward propagation. Take the square root of the squared mean of these time difference errors to obtain the average deviation of the batch of experience records, i.e., the root mean square time difference error. When the root mean square time difference error drops below the preset deviation limit, stop adjusting the value network tendency of the batch of experience records, retain the updated value network parameters, and the current round of value network update ends.
[0125] Step S460: Adjust the internal connection tendency of the strategy network based on the same batch of experience records, so that the continuous load allocation ratio value output by the strategy network can obtain the improved evaluation value from the adjusted value network. Repeat the experience extraction and tendency adjustment process until the fluctuation range of the load allocation ratio value output by the strategy network in multiple consecutive evaluations is stable within the preset range.
[0126] The internal connectivity of the policy network is adjusted using a deterministic policy gradient theorem. For each record in the same batch of experience records, the current state vector is extracted and input into the current policy network. After forward propagation through steps S411 to S416, the continuous load allocation ratio under the current policy is output. This continuous load allocation ratio is paired with the same current state vector and input into the value network that was just updated in step S455. The value network then outputs the evaluation value through forward propagation. The optimization objective of the policy network is defined as the negative arithmetic mean of all evaluation values in the batch of experience records, i.e., maximizing the evaluation of the policy action by the value network. The partial derivatives of this objective value with respect to the fully connected weight matrix and bias vector of each compression transformation layer of the policy network, the weight scalar and bias scalar of the dimension adaptation layer in the layer-by-layer bypass connection, and the fully connected weight vector and bias scalar in the proportional mapping layer are calculated using an automatic differentiation framework. The gradient is also propagated back from the output of the value network through the state action evaluation value, the continuous load allocation ratio value, and the layer-by-layer intermediate features to the parameters of each layer of the policy network using the chain rule. The policy network parameters are updated along the negative gradient direction using the same adaptive moment estimator optimizer as the value network but with an independent learning rate. Each policy network update completes one round of actor-critic alternation. Subsequently, a new batch of experience records is randomly drawn from the experience store, and the alternating training process of value network and policy network updates is repeated. Policy network convergence is determined in a dedicated validation and evaluation phase: a fixed set of validation state vectors not seen during training is used. Every certain number of rounds, the policy network is switched to evaluation mode. Forward propagation is performed on each state vector in this validation set to obtain the corresponding continuous load allocation ratio. The standard deviation of these continuous load allocation ratios is calculated as the fluctuation amplitude. When this standard deviation remains below a preset fluctuation threshold for a predetermined number of consecutive evaluation rounds, the policy network is considered converged. The complete parameters of the current policy network are saved, and the offline training loop is terminated.
[0127] Step S500: During online operation, the real-time generated state vector is input into the converged strategy network to obtain the initial load allocation ratio value. The pre-stored sets of load ratio intervals in the vibration zone and the cavitation zone are called to perform compliance filtering on the initial load allocation ratio value. When the initial load allocation ratio value falls into the prohibited ratio interval in either set, it is corrected to the nearest safe load ratio value to obtain the final load allocation ratio command to adjust the output of the hydropower unit. At the same time, based on the newly generated state vector and the corresponding comprehensive reward signal, a memory protection constraint based on the importance of historical tasks is applied to the internal connection tendency of the converged strategy network, and the internal connection tendency outside the memory protection constraint is adaptively adjusted.
[0128] In one implementation, step S500 may specifically include the following steps S510 to S560: Step S510: Read the pre-calibrated set of load ratio intervals for the vibration zone and the set of load ratio intervals for the cavitation zone from the unit operation restriction file. The set of load ratio intervals for the vibration zone includes at least one continuous prohibited ratio range defined by the starting load ratio value and the ending load ratio value. The set of load ratio intervals for the cavitation zone includes at least one continuous prohibited ratio range defined by the starting load ratio value and the ending load ratio value.
[0129] The unit operation constraint file is a structured data table stored in the safety constraint database of the power plant monitoring information system. This table is partitioned by the head value as the primary key. Each record contains fields such as interval type identifier, starting load ratio value, ending load ratio value, and interval source description. The interval type identifier uses enumerated values to distinguish between vibration zones and cavitation zones. When the unit's automatic generator controller initializes or a change in head triggers a safety constraint overload, the read operation queries all records within the corresponding partition based on the current real-time head value. The returned record set is then parsed according to interval type. For vibration zone types, all starting and ending load ratio values are combined to form a list of vibration zone load ratio interval sets; for cavitation zone types, all combinations are combined to form a list of cavitation zone load ratio interval sets. Each list element is a structure containing two floating-point members: the starting load ratio value and the ending load ratio value.
[0130] Step S520: Input the real-time generated state vector into the converged policy network. After the transfer and proportional constraint mapping of each compression transformation layer within the converged policy network, the initial load allocation ratio value is generated.
[0131] The real-time generated state vector is output and written to shared memory in step S260 during each online control cycle. After offline training, all weights, biases, and batch-normalized sliding statistics of the converged policy network are fixed. During online inference, the state vector is read from shared memory and fed into the policy network, sequentially undergoing the following steps: state vector splitting (S411), initial input and layer-by-layer bypass degenerate injection of the operating condition sub-vector (S412), layer-by-layer compression transformation and degenerate bit combination (S413), final layer degenerate recombination and limit constraint amplitude limiting (S414), logistic scaling (S415), and saturation truncation (S416). The final output is a continuous scalar within a closed interval of 0 to 1, which is the initial load allocation ratio. Throughout the forward propagation process, the batch-normalized layer uses the offline-stored sliding mean and sliding variance for fixed standardization, without further online statistical updates.
[0132] Step S530: Compare the initial load distribution ratio value with each continuous prohibited ratio range in the set of load ratio intervals in the vibration zone, and determine whether the initial load distribution ratio value is greater than or equal to the starting load ratio value of the range and less than or equal to the ending load ratio value of the range.
[0133] The comparison is achieved by iterating through all structures in the list of vibration zone load ratio intervals. For each structure in the list, its initial load ratio value and final load ratio value members are read. A first numerical comparison is performed to determine if the initial load ratio value is greater than or equal to the initial load ratio value, with a Boolean result of true or false. A second numerical comparison is performed to determine if the initial load ratio value is less than or equal to the final load ratio value, with another Boolean result. The results of the two comparisons are then ANDed. If the result is true, it indicates that the initial load ratio value falls within the continuous prohibited ratio range. The global vibration zone hit flag is set to true, and the lower and upper bounds of the prohibited ratio range are recorded, while the iteration is interrupted. If no match is found after iterating through the entire list, the global vibration zone hit flag remains false.
[0134] Step S540: Compare the initial load allocation ratio value with each continuous prohibited ratio range in the cavitation zone load ratio interval set, and determine whether the initial load allocation ratio value is greater than or equal to the starting load ratio value of the range and less than or equal to the ending load ratio value of the range.
[0135] Using the same traversal loop and interval determination logic as step S530, the initial load allocation ratio values are checked one by one in the cavitation zone load ratio interval set list. If any continuous prohibited ratio range of cavitation zone is hit, the global cavitation zone hit flag is set to true and the boundary of the corresponding prohibited ratio range is recorded; otherwise, the flag is kept false.
[0136] Step S550: If the initial load allocation ratio does not fall within any continuous prohibited ratio range, the initial load allocation ratio is directly used as the effective load allocation ratio. If the initial load allocation ratio falls within any continuous prohibited ratio range, the load ratio value closest to the initial load allocation ratio value is found in the continuous interval of load ratio values outside the union of all continuous prohibited ratio ranges and used as the alternative load allocation ratio value. The alternative load allocation ratio value is then used as the effective load allocation ratio value.
[0137] The effective load allocation ratio is a compliant load instruction that meets the requirements of the operating procedures, generated after dual safety constraint checks in the vibration zone and cavitation zone. When both the vibration zone hit flag in step S530 and the cavitation zone hit flag in step S540 are false, it indicates that the initial load allocation ratio itself is within the safe operating zone, and it is directly assigned to the effective load allocation ratio. When either flag is true, it indicates that the initial load allocation ratio is within at least one prohibited ratio range, and projection correction needs to be performed.
[0138] In one implementation, step S550 may specifically include the following steps S551 to S556: Step S551: Merge all continuous prohibited proportion ranges in the set of load proportion intervals in the vibration zone and the set of load proportion intervals in the cavitation zone to obtain a total prohibited load proportion set. Take the complement of the total prohibited load proportion set on the load proportion value axis to obtain a set of safe load proportion segments consisting of at least one continuous safe proportion interval.
[0139] The merging operation combines all the pairs of continuous prohibited ratio ranges for vibration zones and cavitation zones recorded during the traversal in steps S530 and S540 into a unified prohibited interval list. The prohibited interval list is sorted in ascending order of the initial load ratio value of each interval. Then, the sorted intervals are traversed sequentially to check for overlaps or adjoining intervals. Overlapping or adjoining intervals are merged into larger intervals, ultimately outputting a non-overlapping, ascending-order list of prohibited load ratios. The complement of the prohibited load ratio set is taken on the closed interval from 0 to 1 on the load ratio value axis. That is, starting from 0.0, the open interval segment between the right endpoint of each prohibited interval and the left endpoint of the next prohibited interval, and the interval segment from the right endpoint of the last interval to 1.0 are taken sequentially. Each non-prohibited interval is a continuous safe ratio interval, and its left endpoint load ratio value and right endpoint load ratio value form a structure, all of which are stored in the safe load ratio segment set list.
[0140] Step S552: Extract the load ratio values at the left and right ends of each continuous safe load ratio interval in the set of safe load ratio intervals. The load ratio value at the left end is the minimum allowable load ratio value within the safe load ratio interval, and the load ratio value at the right end is the maximum allowable load ratio value within the safe load ratio interval.
[0141] Iterate through the list of safe load ratio segments, read the left endpoint member of each structure in the list and assign it to the left endpoint load ratio value, and read the right endpoint member and assign it to the right endpoint load ratio value. The left endpoint load ratio value and the right endpoint load ratio value together define the load ratio range within which the unit can operate safely.
[0142] Step S553: Determine the positional relationship between the initial load allocation ratio value and each continuous safety ratio interval, and determine the continuous safety ratio interval in which the initial load allocation ratio value is located or the nearest neighbor.
[0143] The determination of interval location relationships is accomplished by sequentially accessing each structure in the list of safe load ratio segments. For the currently accessed continuous safe load ratio interval, the initial load allocation ratio value is compared with the load ratio values at the left and right endpoints of the interval. If the initial load allocation ratio value is greater than or equal to the load ratio value at the left endpoint and less than or equal to the load ratio value at the right endpoint, the interval is marked as a accommodating interval, and the determination ends. If no accommodating interval is found after traversing all intervals, the shortest distance between the initial load allocation ratio value and each interval segment is calculated: for the case where the initial load allocation ratio value is to the left of an interval, the shortest distance equals the load ratio value at the left endpoint of the interval minus the initial load allocation ratio value; for the case where it is to the right, the shortest distance equals the initial load allocation ratio value minus the load ratio value at the right endpoint of the interval. The shortest distance is compared across all intervals, and the segment with the smallest distance is taken as the nearest neighbor continuous safe load ratio interval.
[0144] Step S554: If the initial load allocation ratio value is within a certain continuous safe ratio range, then the initial load allocation ratio value is directly used as the replacement load allocation ratio value.
[0145] When the tolerance range is found in step S553, it means that although the initial load allocation ratio value may have triggered the forbidden zone hit flag, the actual value is still within the safe zone. This corresponds to the case where the initial load allocation ratio value is near the boundary of the safe zone and has not been corrected. In this case, the alternative load allocation ratio value is directly set to the initial load allocation ratio value itself, without any modification.
[0146] Step S555: If the initial load allocation ratio value is outside all continuous safe ratio intervals, calculate the first distance from the initial load allocation ratio value to the load ratio value at the right end of the nearest safe ratio interval on the left, and the second distance to the load ratio value at the left end of the nearest safe ratio interval on the right.
[0147] The leftmost safe load ratio interval refers to the interval among all consecutive safe load ratio intervals where the load ratio at the right endpoint is less than the initial load allocation ratio and the load ratio at the right endpoint reaches its maximum value. The location method is to traverse the set of safe load ratio segments and maintain the current maximum right endpoint and its corresponding interval. The first distance is calculated by subtracting the load ratio at the right endpoint of this left interval from the initial load allocation ratio. The rightmost safe load ratio interval refers to the interval among all consecutive safe load ratio intervals where the load ratio at the left endpoint is greater than the initial load allocation ratio and the load ratio at the left endpoint reaches its minimum value. The location method is similar. The second distance is calculated by subtracting the initial load allocation ratio from the load ratio at the left endpoint of this right interval.
[0148] Step S556: Compare the first distance and the second distance, select the endpoint load ratio value with the smaller distance as the alternative load allocation ratio value, and output the alternative load allocation ratio value to the load command formation stage.
[0149] If the first distance is less than or equal to the second distance, the load ratio value at the right end of the nearest safe ratio interval on the left is selected as the alternative load allocation ratio value; if the second distance is less than the first distance, the load ratio value at the left end of the nearest safe ratio interval on the right is selected as the alternative load allocation ratio value. This selection logic ensures that the alternative load allocation ratio value is the safe load point on the boundary of the continuous safe ratio interval with the smallest geometric distance from the initial load allocation ratio value, thus preserving the decision-making tendency of the policy network to the greatest extent while ensuring compliance.
[0150] Step S560: Convert the effective load allocation ratio value into the corresponding power regulation command and send it to the unit speed control unit to drive the unit to adjust the guide vane opening to achieve output regulation.
[0151] The conversion of power regulation commands is completed in two steps. First, the effective load allocation ratio is multiplied by the unit's rated power; the product is the active power target value, expressed in watts or kilowatts. Second, the active power target value is packaged into a power regulation command message according to the communication protocol between the automatic generation controller and the speed control unit. This message includes the target active power setpoint, load regulation rate limit, and current timestamp. The communication protocol can be either the CANopen protocol based on the controller area network bus or the Profinet protocol based on industrial Ethernet; the physical transmission of the message is completed through a redundant fieldbus interface. After receiving the power regulation command, the programmable logic controller of the speed control unit performs closed-loop power regulation within the control cycle: it compares the received active power target value with the active power feedback value at the generator outlet to obtain the power deviation. The power deviation is calculated by the proportional-integral-derivative controller to generate the guide vane opening setpoint. The guide vane opening setpoint is compared with the current guide vane opening feedback value again. The guide vane position closed-loop proportional-integral controller outputs the drive current signal of the hydraulic servo valve. The servo valve controls the high-pressure oil to enter the servo motor opening or closing chamber, pushing the piston rod to move. Through the control loop and crank arm, the actual opening of the movable guide vane is changed, so that the actual output of the unit gradually approaches the active power target value corresponding to the effective load distribution ratio value, completing a complete load regulation closed loop.
[0152] As one implementation method, step S500 simultaneously applies a memory protection constraint based on the importance of historical tasks to the internal connection tendency of the converged policy network based on the newly generated online state vector and the corresponding comprehensive reward signal, and adaptively adjusts the internal connection tendency outside the memory protection constraint. Specifically, this may include the following steps S570 to S5120: Step S570: At the offline convergence time of the policy network, calculate the sensitivity of each connection tendency within the policy network to historical damage avoidance behavior. By applying a pre-set amplitude of tentative change to each connection tendency and observing the change response of the policy network output load allocation ratio, the ratio of the output change to the tentative change is taken as the historical sensitivity of the connection tendency.
[0153] Each connection tendency within the policy network specifically refers to all learnable parameters stored during offline convergence. This includes each element of the fully connected weight matrix within each compression transform layer, each element of the bias vector within each compression transform layer, the weight scalar and bias scalar of each layer-by-layer bypass connection's terminal dimension adaptation layer, and each element and bias scalar of the weight vector of the fully connected single-output neurons in the scaling layer. Historical damage avoidance behavior is quantified using a carefully constructed set of typical damage avoidance scenario state vectors during the later stages of offline training. The construction process for this set is as follows: In the final stage of offline training, all experience records with negative immediate comprehensive reward signals are selected from the experience storage area—that is, those state-action pairs whose comprehensive reward is negative due to large negative inhibition signals triggered by degradation acceleration. The state vectors from these experience records are extracted and clustered into several clusters in the state space using a clustering algorithm. From each cluster, a predetermined number of representative state vectors closest to the cluster center are selected to collectively constitute the typical damage avoidance scenario state vector set. This set covers typical high-penalty state regions that may lead to severe equipment lifespan loss. Sensitivity calculation employs a parameter-by-parameter finite-difference perturbation estimation method. For a specific connectivity tendency parameter to be estimated, all other parameters of the policy network are kept frozen, and a small positive perturbation is applied to this parameter. The absolute magnitude of the perturbation is a fixed small proportion of the parameter's current absolute value plus a small positive number to avoid division by zero. Each state vector in the typical damage avoidance scenario state vector set is sequentially input into the policy network before and after the perturbation, and the corresponding continuous load allocation ratio is calculated for each. For each state vector, the absolute value of the output after the perturbation minus the output before the perturbation is taken. The arithmetic mean of the absolute values of the output changes across all state vectors is then calculated to obtain the average output change of this parameter in the current damage scenario set. Dividing this average output change by the perturbation magnitude yields the historical sensitivity of this connectivity tendency to historical damage avoidance behavior. The complete process of single-parameter perturbation, output change calculation, and division operation is performed on each connection tendency to obtain a list of historical sensitivity values of the same size as the total number of policy network parameters. Each sensitivity value quantitatively reflects the degree of influence of changing the parameter on decision-making behavior under damage scenarios. The higher the sensitivity, the more critical the parameter is to maintaining the historical damage avoidance ability.
[0154] Step S580: Collect the state vector, effective load allocation ratio value, and comprehensive reward signal calculated based on the effective load allocation ratio value generated in real time during online operation to form an online experience sample.
[0155] During online operation, an online experience sample is automatically generated for each control cycle. The state vector in the sample comes from the reinforcement learning environment state vector generated at the beginning of the control cycle in step S260. The effective load allocation ratio value comes from the final load ratio instruction output after compliance filtering in step S550 during the control cycle. The comprehensive reward signal is generated online by step S300 after the unit has actually adjusted its output according to the effective load allocation ratio value and stabilized operation during the control cycle, based on the tracking error of the actual power generation plan target power ratio and the steepness of the real-time degradation index change. The calculation time is the data acquisition window before the start of the next control cycle. The three member data of each online experience sample are encapsulated into a sample structure after being appended with the current time stamp, and appended to the tail of the online experience buffer queue in the order of generation time. The online experience buffer queue is a fixed-length circular queue independent of the offline experience storage area. Its preset capacity is set according to the freshness and diversity of the samples required for online fine-tuning. When the queue is full, the oldest sample is overwritten.
[0156] Step S590: Input the online experience samples into the policy network for forward propagation to obtain the output bias of the current policy network on the online experience samples, and determine the adjustment intention of each connection tendency based on the output bias.
[0157] This step is triggered when the number of samples in the online experience buffer queue reaches the preset update batch size. For each online experience sample in the batch, its state vector is extracted, and forward propagation is performed using the currently running online policy network to output the online load allocation ratio. The difference between this online load allocation ratio and the effective load allocation ratio stored in the same sample is calculated, and the square of the difference is used to obtain the policy output deviation for that sample. The arithmetic mean of the policy output deviations of all samples in the batch is calculated to obtain the batch average deviation. The batch average deviation reflects the degree of deviation between the current policy network's decisions on recent online samples and the actual compliant actions executed online. The adjustment intention is defined as the negative gradient direction that reduces the batch average deviation. The partial derivative of the batch average deviation with respect to each connection tendency parameter of the policy network is calculated using an automatic differentiation framework. The automatic differentiation framework calculates the local gradient operation by operation in reverse along the forward propagation computation graph of the policy network, starting from the batch average deviation scalar, and accumulates it to each parameter node through the chain rule to obtain the partial derivative value of each parameter. The gradient vector composed of these partial derivative values is the original adjustment intention without any constraints. The online learning rate is set much smaller than the initial learning rate during offline training to prevent excessively large single update steps from damaging the existing policy structure.
[0158] Step S5100: For each connection tendency, combine the adjustment intention with the historical sensitivity of that connection tendency. If the historical sensitivity exceeds a preset sensitivity limit, reduce the magnitude of the adjustment intention. If the historical sensitivity does not exceed the preset sensitivity limit, maintain the magnitude of the adjustment intention, and generate a constrained adjustment amount.
[0159] The operation employs an element-wise sensitivity gating mechanism. The preset sensitivity threshold is determined based on the statistical distribution of all historical sensitivity values calculated in step S570. A high percentile of this distribution is taken as the threshold. Parameters above this threshold are considered key supporting parameters for damage avoidance behavior learned in the offline phase and require strong memory protection constraints. For each connection tendency parameter in the policy network, the corresponding historical sensitivity value is read from the historical sensitivity list stored in step S570. If the historical sensitivity value is greater than the preset sensitivity threshold, the parameter is determined to be a high-sensitivity parameter, and an elastic decay is applied: the ratio of the historical sensitivity value to the preset sensitivity threshold is calculated, and this ratio is mapped to an elastic decay coefficient between 0 and 1 through a preset nonlinear decay function. The decay function is designed so that the larger the ratio, the closer the decay coefficient is to zero; that is, the higher the sensitivity of the parameter, the more drastically its adjustment intention is suppressed. The original adjustment intention of the parameter calculated in step S590 is multiplied by this elastic decay coefficient, and the product is the reduced adjustment intention. If the historical sensitivity value is less than or equal to the preset sensitivity limit, the parameter is considered a low-sensitivity parameter, and its original adjustment intention remains unchanged, directly serving as the constrained adjustment intention. After traversing and attenuating all connectivity tendency parameters one by one, a complete constrained adjustment vector is obtained. In this vector, the elements corresponding to high-sensitivity parameters are significantly reduced, while the elements corresponding to low-sensitivity parameters retain their original values, thereby achieving differentiated update control of the memory protection region and the plasticity region in the parameter space.
[0160] Step S5110: Apply the constrained adjustment amount to each connection tendency of the policy network to complete a single online adjustment, so that the updated policy network retains the historical damage avoidance decision tendency while incorporating the unit degradation evolution information reflected by the new online samples.
[0161] The application operation involves multiplying the constrained adjustment vector generated in step S5100 element-wise by the online learning rate and then adding it in the negative direction to the current connection tendency parameter values of the policy network. After the update, the policy network can appropriately shift its load allocation decisions to adapt to the new characteristics brought about by the actual degradation evolution of the unit, based on recent operating conditions and degradation states similar to the new online samples. At the same time, for various typical damage avoidance scenarios encountered in the offline phase, the conservative load allocation behavior, which is highly consistent with that at offline convergence, is still maintained due to the strong protection of key parameters, and will not be catastrophically forgotten due to online fine-tuning.
[0162] Step S5120: During continuous online operation, whenever the number of newly accumulated online experience samples reaches the preset update batch size, the sensitivity combination and bias adjustment process is re-executed to ensure that the strategy network continuously follows the time-varying characteristics of unit degradation.
[0163] During online operation, step S580 continuously adds new online experience samples to the online experience buffer queue, with a dedicated counter tracking the number of new samples added since the last update. When the counter value reaches the preset update batch size, a complete online adjustment process is triggered: step S590 calculates the adjustment intention, step S5100 generates sensitivity combination and constraints, and step S5110 updates the parameters. After adjustment, the counter is reset to zero, and new samples are accumulated again, awaiting the next trigger. As the unit continues to operate for months or even across years, the statistical distribution of degradation indicators may gradually drift due to accumulated component wear, and the optimal load allocation strategy under the same operating conditions may also change accordingly. The above-mentioned cyclical triggering and adjustment mechanism ensures that the strategy network can continuously capture these slow time-varying degradation characteristics. Every update batch size sample performs a small adaptive migration of network parameters, smoothly following the degradation evolution process of the equipment throughout its entire life cycle within the framework of memory protection constraints, maintaining the effectiveness and security of the auxiliary decision-making strategy in the long term.
[0164] Please see details. Figure 3 This is a schematic diagram of the structure of a computer system provided in an embodiment of the present invention. Figure 3 As shown, the computer system 1000 described above may include: a processor 1001, a network interface 1004, and a memory 1005. Furthermore, the computer system 1000 may also include: a user interface 1003, and at least one communication bus 1002. The communication bus 1002 is used to implement communication between these components. The user interface 1003 may include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as at least one disk storage device. Optionally, the memory 1005 may also be at least one storage device located remotely from the aforementioned processor 1001. Figure 3 As shown, the memory 1005, which is a computer-readable storage medium, may include an operating system, a network communication module, a user interface module, and a device control application.
[0165] exist Figure 3In the computer system 1000 shown, the network interface 1004 provides network communication functions; the user interface 1003 is mainly used to provide an input interface; and the processor 1001 can be used to call the device control application stored in the memory 1005 to implement the methods provided in the above embodiments.
Claims
1. A method for intelligent operation auxiliary decision-making of hydropower plant equipment based on big data analysis, characterized in that, The method includes: The time-domain signal collected by the vibration sensor of the main shaft of the hydropower unit is acquired, and the time-domain signal is processed by synchronous compression transformation to generate a time-frequency representation. The time-frequency representation is input into a pre-obtained deep convolutional variational autoencoder to obtain the reconstruction probability distribution of the latent variable space, and the reconstruction probability distribution is mapped to a dimensionless real-time degradation index. The active power ratio of the hydropower unit in real time relative to the rated power, and the guide vane opening ratio relative to the maximum design opening are obtained. The real-time degradation index, the active power ratio and the guide vane opening ratio at the same moment are input into the pre-obtained state embedding mapping relationship to generate the state vector of the reinforcement learning environment. A dimensionless positive excitation signal is generated based on the difference between the target power ratio of the power generation plan and the active power ratio, and a dimensionless negative suppression signal is generated based on the steepness of the change of the real-time degradation index at continuous time. The positive excitation signal and the negative suppression signal are combined to form a dimensionless comprehensive reward signal. The policy network and value network are trained offline using deep deterministic policy gradients. The state vector is input into the policy network to obtain the continuous load allocation ratio value. The state vector and the continuous load allocation ratio value are input into the value network to obtain the state action evaluation value. The internal connection tendency of the value network and the internal connection tendency of the policy network are updated and adjusted through the comprehensive reward signal. The training process is repeated until the policy network converges. During online operation, the real-time generated state vector is input into the converged strategy network to obtain the initial load allocation ratio value. The pre-stored sets of load ratio intervals for the vibration zone and the cavitation zone are called to perform compliance filtering on the initial load allocation ratio value. When the initial load allocation ratio value falls into the prohibited ratio interval in either set, it is corrected to the nearest safe load ratio value to obtain the final load allocation ratio command to adjust the output of the hydropower unit. At the same time, based on the newly generated state vector and the corresponding comprehensive reward signal, a memory protection constraint based on the importance of historical tasks is applied to the internal connection tendency of the converged strategy network, and the internal connection tendency outside the memory protection constraint is adaptively adjusted.
2. The method according to claim 1, characterized in that, The process involves acquiring the ratio of real-time active power of the hydropower unit to its rated power, and the ratio of guide vane opening to its maximum design opening. The real-time degradation index, the active power ratio, and the guide vane opening ratio at the same moment are then input into a pre-obtained state embedding mapping relationship to generate a state vector for the reinforcement learning environment, including: Historical sequences of degradation indicators, active power ratios, and guide vane opening ratios were extracted from the historical operation records of hydropower units. Multiple historical triplet segments were obtained by extracting segments within the same time window. Each historical triplet segment contained a subsequence of degradation indicators, a subsequence of active power ratios, and a subsequence of guide vane opening ratios within the same time window. For any two historical triplet segments, a similarity analysis of operating conditions is performed. When the difference between the average active power ratios of the two historical triplet segments does not exceed the preset ratio difference limit and the difference between the average guide vane opening ratios does not exceed the preset ratio difference limit, the two historical triplet segments are marked as a pair of similar samples; otherwise, they are marked as a pair of dissimilar samples. The sets of similar sample pairs and dissimilar sample pairs are collected. The two historical triplet fragments of each of the same sample pairs in the set of same sample pairs are respectively fed into the initial embedding mapping structure. The initial embedding mapping structure contains multiple nonlinear transformation layers connected in sequence. Each nonlinear transformation layer compresses the received triplet fragments and passes them to the next layer, and finally outputs a fixed-length embedding representation vector. For each pair of samples of the same type, calculate the proximity of their two embedding representation vectors in the vector space. For each pair of samples of different types, calculate the distance between their two embedding representation vectors in the vector space. Adjust the connection tendency of each nonlinear transformation layer inside the initial embedding mapping structure according to the proximity and distance, so that the embedding representation vectors of the same type of sample pairs gradually approach each other and the embedding representation vectors of the different type of sample pairs gradually move away from each other. The initial embedding mapping structure is repeatedly adjusted by using the set of similar sample pairs and the set of dissimilar sample pairs. When the similarity of the embedding representation vectors of similar sample pairs and the dissimilarity of the embedding representation vectors of dissimilar sample pairs reach a preset stability condition, the adjustment is stopped, and the embedding mapping structure at this time is taken as the state embedding mapping relationship. During online operation, the real-time degradation index, the active power ratio, and the guide vane opening ratio collected at the same time are combined into a real-time triplet. The real-time triplet is input into the state embedding mapping relationship, and after being passed and transformed layer by layer through each nonlinear transformation layer inside the state embedding mapping relationship, a vector of fixed length is output as the state vector of the reinforcement learning environment.
3. The method according to claim 2, characterized in that, The operational condition similarity analysis of any two historical triplet segments is performed. If the difference between the average active power ratios of the two historical triplet segments does not exceed a preset ratio difference limit, and the difference between the average guide vane opening ratios does not exceed a preset ratio difference limit, then the two historical triplet segments are marked as a pair of similar samples; otherwise, they are marked as a pair of dissimilar samples, including: For each of the multiple historical triplet segments, the mean of the active power ratio subsequence and the mean of the guide vane opening ratio subsequence are calculated respectively, and each historical triplet segment is assigned an active power ratio mean label and a guide vane opening ratio mean label. Iterate through all pairs of historical triplet segments, extract the average active power ratio label of the first historical triplet segment and the average active power ratio label of the second historical triplet segment in the current combination, and calculate the difference in the average active power ratio between the two. Extract the mean label of the guide vane opening ratio of the first historical triplet segment and the mean label of the guide vane opening ratio of the second historical triplet segment in the current combination, and calculate the difference in the mean opening ratio between the two. The average difference in the active power ratio is compared with a preset power ratio difference limit, and the average difference in the opening ratio is compared with a preset opening ratio difference limit. If the average difference in the active power ratio does not exceed the power ratio difference limit and the average difference in the opening ratio does not exceed the opening ratio difference limit, then the two historical triplet segments of the current combination are determined as a sample pair of the same type and are assigned to the sample pair set of the same type. If the average difference in the active power ratio exceeds the power ratio difference limit or the average difference in the opening ratio exceeds the opening ratio difference limit, then the two historical triplet segments of the current combination are identified as an outlier sample pair and included in the outlier sample pair set.
4. The method according to claim 2, characterized in that, The repeated use of the set of similar sample pairs and the set of dissimilar sample pairs to adjust the connection bias of the initial embedding mapping structure, and the stopping of adjustment when the similarity of the embedding representation vectors of similar sample pairs and the dissimilarity of the embedding representation vectors of dissimilar sample pairs reach a preset stability condition, includes: Obtain pre-set target values for proximity and distance, wherein the target value for proximity represents the furthest allowed boundary between two embedding representation vectors of the same type of sample pair, and the target value for distance represents the closest allowed boundary between two embedding representation vectors of the opposite type of sample pair; In each round of adjustment, a batch of similar sample pairs is extracted from the set of similar sample pairs, and a batch of dissimilar sample pairs is extracted from the set of dissimilar sample pairs. The extracted sample pairs are input into the current embedding mapping structure to obtain the embedding representation vector corresponding to each sample pair. Calculate the average proximity between the embedding representation vectors of the batch of similar sample pairs, and calculate the average distance between the embedding representation vectors of the batch of dissimilar sample pairs; When the average proximity does not meet the proximity target value, or the average distance does not meet the distance target value, the adjustment direction and adjustment intensity of the internal connection tendency of the current embedded mapping structure are determined based on the difference between the average proximity and the proximity target value and the difference between the average distance and the distance target value, and the adjustment is performed. When the average proximity meets the proximity target value and the average distance meets the distance target value, it is determined that the preset stability condition has been reached, and the connection tendency adjustment of the embedded mapping structure is stopped. The embedded mapping structure at the point of cessation of adjustment is determined and saved as the state embedded mapping relationship, which is used to generate state vectors for real-time triples in the online phase.
5. The method according to claim 1, characterized in that, The process involves generating a dimensionless positive excitation signal based on the difference between the target power ratio of the power generation plan and the active power ratio, and generating a dimensionless negative suppression signal based on the steepness of the change in the real-time degradation index over continuous time intervals. When the steepness of the change intensifies, the intensity of the negative suppression signal increases non-linearly. The positive excitation signal and the negative suppression signal are then combined to form a dimensionless comprehensive reward signal, including: The system receives the target power ratio of the power generation plan currently in effect from the dispatch command channel, compares the active power ratio with the target power ratio of the power generation plan, and generates a positive excitation signal with increased amplitude when the gap between the two narrows, and generates a positive excitation signal with decreased amplitude when the gap between the two widens. The real-time degradation indexes at multiple consecutive moments within the most recent time window are subjected to time-by-time difference processing to obtain the sequence of changes in the degradation indexes between adjacent moments. The steepness of the index change reflecting the steepness of the degradation trend is extracted from the sequence of changes. The steepness of the change in the indicator is compared with a pre-defined safe change limit. When the steepness of the change in the indicator does not exceed the safe change limit, a negative suppression signal with zero intensity is generated. When the steepness of the change in the indicator exceeds the safety change limit, the strength of the negative suppression signal is determined according to the magnitude of the excess. The growth rate of the negative suppression signal strength increases segment by segment when the excess amplitude is located in different segments, so that the larger the excess amplitude, the faster the increase rate of the negative suppression signal strength. The amplitude of the positive excitation signal is fused with the preset power generation task emphasis to obtain the positive excitation component with emphasis adjustment, and the intensity of the negative suppression signal is fused with the preset lifetime protection emphasis to obtain the negative suppression component with emphasis adjustment. The positive incentive component and the negative inhibition component after emphasis adjustment are combined to obtain the dimensionless comprehensive reward signal at the current time step, which is then output to the subsequent training or online adjustment process.
6. The method according to claim 5, characterized in that, When the steepness of the change in the indicator exceeds the safety change limit, the strength of the negative suppression signal is determined based on the magnitude of the excess, including: Obtain the normal fluctuation range of degradation indicators statistically obtained during the historical period when the hydropower unit is confirmed to be in healthy operation, and determine the upper edge of the normal fluctuation range of the degradation indicators as the safe change limit; Subtract the safety change limit from the steepness of the indicator change to obtain the excess amplitude. When the excess amplitude is positive, the negative suppression signal strength determination process begins. When the excess amplitude is zero or negative, the negative suppression signal strength is determined to be zero. The system pre-divides into multiple continuously increasing exceedance ranges, each exceeding range range having a corresponding penalty enhancement multiplier, with the penalty enhancement multiplier being larger for later exceeding range ranges. Determine the excess amplitude segment into which the excess amplitude falls, extract the penalty enhancement ratio corresponding to the excess amplitude segment, and multiply the base suppression strength with the penalty enhancement ratio to obtain the negative suppression signal strength within the segment. When the excess amplitude spans multiple excess amplitude segments, the components of each segment are calculated according to their respective multiples and then summed to obtain the final negative suppression signal strength. The strength of the negative suppression signal is used as the suppression force against unit life loss at the current moment and is transmitted to the formation stage of the comprehensive reward signal.
7. The method according to claim 5, characterized in that, When the steepness of the indicator change exceeds the safety change limit, the strength of the negative suppression signal is determined based on the magnitude of the exceedance. The growth rate of the negative suppression signal strength increases progressively across different segments of the exceedance, including: Natural fluctuation records of degradation indicators of hydropower units during multiple historical healthy operating periods are obtained. The natural fluctuation records are divided into time periods, and the statistical boundaries of the fluctuation range of degradation indicators in each time period are extracted. The maximum upper edge of the statistical boundary of each time period is determined as the dynamic safety benchmark. The real-time degradation index is subjected to dual-channel trend decoupling processing to separate the instantaneous steep component reflecting the short-term jitter amplitude and the cumulative trend component reflecting the continuous offset direction. The instantaneous steep component is compared with the dynamic safety benchmark, and the offset direction of the cumulative trend component is monitored. When the instantaneous steep component exceeds the dynamic safety benchmark and the cumulative trend component shifts in the degradation direction, an over-limit confirmation flag is generated. In the event of the aforementioned limit-exceeding confirmation flag, the instantaneous excess amount of the instantaneous steep component exceeding the dynamic safety benchmark is calculated, and the instantaneous excess amount is subjected to trend amplification processing based on the offset degree of the cumulative trend component to obtain the trend-corrected excess amount. The trend correction excess is assigned to the corresponding excess amplitude segment according to the preset segment division rules, and the penalty enhancement ratio bound to the segment is extracted. The base suppression strength is multiplied by the penalty enhancement ratio to generate a negative suppression signal strength corresponding to the excess amplitude segment. When the instantaneous steepness component does not exceed the dynamic safety benchmark or the cumulative trend component does not shift in the degradation direction, the negative suppression signal strength is maintained at zero, and the dynamic safety benchmark and cumulative trend component in the current state are temporarily stored for comparison and correction at subsequent times.
8. The method according to claim 1, characterized in that, The process of offline training of the policy network and value network using deep deterministic policy gradients, inputting the state vector into the policy network to obtain a continuous load allocation ratio, inputting the state vector and the continuous load allocation ratio into the value network to obtain a state-action evaluation value, updating and adjusting the internal connectivity tendencies of the value network and the policy network using the comprehensive reward signal, and repeatedly executing the training process until the policy network converges includes: The state vector is passed through multiple compression transformation layers arranged sequentially inside the policy network. Each compression transformation layer performs nonlinear synthesis processing on the input and then passes it to the next layer. The output of the last layer is mapped by a proportional limit to obtain the continuous load allocation ratio value, which represents the proportion of the unit's output to the rated power. The state vector and the continuous load allocation ratio are respectively sent to the state processing channel and the action processing channel of the value network. The state processing channel condenses the state vector to obtain a state summary quantity, and the action processing channel expands and encodes the continuous load allocation ratio to obtain an action summary quantity. The state summary quantity and the action summary quantity are combined and then output as an evaluation value of the current state-action combination through the value fusion segment. The continuous load allocation ratio value is applied in the offline simulated unit environment to drive the simulated unit state update, generate the simulated state vector at the next moment, and calculate the instantaneous comprehensive reward signal of the current step according to the comprehensive reward signal formation method. The current state vector generated by this interaction, the continuous load allocation ratio value, the instantaneous comprehensive reward signal, and the simulated state vector at the next moment are encapsulated into an experience record and stored in the experience storage area. When the number of records in the experience storage area exceeds the preset capacity, the earliest stored experience record is removed. A batch of experience records is extracted from the experience storage area, and the internal connection tendency of the value network is adjusted using the batch of experience records, so that the evaluation value output by the value network is closer to the sum of the immediate comprehensive reward signal and the evaluation value of the subsequent state contained in the batch of experience records. The internal connection tendency of the strategy network is adjusted based on the same batch of experience records, so that the continuous load allocation ratio value output by the strategy network can obtain an improved evaluation value from the adjusted value network. The experience extraction and tendency adjustment process is repeated until the fluctuation range of the load allocation ratio value output by the strategy network in multiple consecutive evaluations is stable within a preset range.
9. The method according to claim 8, characterized in that, The process of passing the state vector through multiple compression transformation layers arranged sequentially within the policy network, where each compression transformation layer performs nonlinear synthesis processing on the input before passing it to the next layer, and the continuous load allocation ratio value is obtained from the output of the final layer through proportional limiting mapping, includes: Degradation index component, active power ratio component and guide vane opening ratio component are separated from the state vector. The active power ratio component and guide vane opening ratio component are merged into operating condition sub-vector, and the degradation index component is taken as an independent degradation sub-vector. The operating condition subvector is used as the input of the first compression transformation layer, and the independent degradation subvector is passed to the output position of each compression transformation layer through layer-by-layer bypass connection, so that degradation information is continuously injected during the layer-by-layer compression process. In each compression transformation layer, the working condition abstract features output by the previous layer are subjected to linear mixing and nonlinear activation processing to obtain the candidate features of the current layer. The candidate features are then combined bit by bit with the independent degradation sub-vectors after dimension adaptation to generate intermediate layer features carrying degradation perception signals. The intermediate layer features output from the final compression transform layer are combined bit by bit with the independent degenerate sub-vectors again. The combination result is input into the boundary constraint unit. The boundary constraint unit reviews each received component for a limit value. Components exceeding the preset upper limit are forcibly set to the preset upper limit value, and components below the preset lower limit are forcibly set to the preset lower limit value, thus obtaining the decision condensation signal. The decision condensation signal is transmitted to the proportional mapping layer, which uses a monotonic continuous mapping relationship to transform the decision condensation signal to a preset load ratio value range, thereby generating the original load ratio output value. The original load ratio output value is saturated and truncated. When the original load ratio output value exceeds the upper boundary of the load ratio value range, it is replaced by the upper boundary value. When the original load ratio output value is lower than the lower boundary of the load ratio value range, it is replaced by the lower boundary value, thus obtaining the continuous load distribution ratio value.
10. A computer system, characterized in that, include: processor; And a memory, wherein the memory stores computer-readable code that, when executed by the processor, causes the processor to perform the method as described in any one of claims 1 to 9.