Power system intelligent perception decision generation method based on case reasoning
Through multimodal feature modeling and improved graph convolutional networks and Transformer temporal attention modules, the complexity of traditional methods and the adaptability of machine learning methods for accessing a high proportion of renewable energy into power systems are solved, efficient, safe and reliable decision-making for power grid operation is achieved, and the real-time and interpretability of the power grid are improved.
Patent Information
- Application Number
- CN202510835938.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-20
- Publication Date
- 2025-09-26
AI Technical Summary
After a high proportion of renewable energy is connected to the power system, traditional methods have problems such as high modeling complexity and insufficient real-time performance. Machine learning methods have poor adaptability and weak interpretability in small sample scenarios. The existing CBR method has a single case representation dimension in power system applications, low similarity calculation efficiency, and lacks dynamic adaptability of the case correction mechanism.
Multimodal feature modeling, improved graph convolutional network and Transformer temporal attention module are adopted, combined with feature fusion strategy and dynamic mask mechanism, case retrieval is optimized through multi-head attention mechanism and sinusoidal position encoding, local sensitive hashing is introduced to accelerate similarity calculation, and an adaptive case correction mechanism is designed to improve the real-time and reliability of power grid operation.
It achieves efficient, safe and reliable decision-making for power grid operation, improves the case representation dimension and similarity calculation efficiency, enhances the dynamic adaptability and interpretability of the model, and ensures the stable operation of the power grid under scenarios with a high proportion of renewable energy access.
Smart Images

Figure CN120706940A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power system automation technology, and specifically to a method for intelligent perception and decision-making of power systems based on case reasoning, which is suitable for grid operation status perception, decision-making generation and safety control in scenarios with a high proportion of renewable energy access. Background Art
[0002] With the integration of a high proportion of renewable energy into the power system, grid operation is characterized by strong uncertainty, multiple timescales, and multi-physics coupling. Traditional optimization methods based on physical models suffer from high modeling complexity and insufficient real-time performance, while existing machine learning methods face challenges such as poor adaptability to small sample scenarios and weak interpretability. Case-based reasoning (CBR) technology provides a new technical approach to addressing these issues by reusing historical experience and implementing a dynamic correction mechanism. However, existing CBR methods in power system applications suffer from shortcomings such as a single case representation dimension, low similarity calculation efficiency, and a lack of dynamic adaptability in the case correction mechanism.
[0003] Full terms and abbreviations
[0004] CBR: Case-Based Reasoning
[0005] GCN: Graph Convolutional Network
[0006] VSM: Voltage Security Margin
[0007] TSM: Thermal Stability Margin
[0008] LSH: Locality Sensitive Hashing
[0009] MLP: Multi-Layer Perceptron Summary of the Invention
[0010] In order to solve the problems caused by the strong uncertainty, multi-time scale and multi-physics coupling characteristics of power grid operation after the integration of a high proportion of renewable energy, as well as the shortcomings of traditional methods and existing machine learning methods, a power system intelligent perception decision generation method based on case reasoning is provided to achieve efficient, safe and reliable operation of the power grid.
[0011] Technical Solution
[0012] To achieve the above object, the present invention adopts the following technical solutions:
[0013] 1 Case representation model
[0014] 1.1 Multimodal Feature Modeling
[0015] Define Case C i is a quintuple: C i = <X i ,S i ,A i ,R i ,T i >, the relevant instructions are as follows:
[0016] is the system state vector, which includes key state variables of power grid operation such as bus voltage, frequency, and power flow;
[0017] R i ∈[0,1]: Case effect score, which is a quantitative evaluation based on the execution results of the decision action (such as voltage qualification rate, network loss rate, etc.);
[0018] It is a multidimensional feature matrix (n×m), containing 5 categories of 220-dimensional features;
[0019] Decision-making action vector, including generator output adjustment, transformer tap adjustment and other operations;
[0020] A timestamp vector (accurate to milliseconds).
[0021] 1.1.1 Multidimensional Feature Matrix X i ∈R n×m
[0022] (1) Time series measurement data (m1 = 120 dimensions)
[0023] Busbar operating parameters:
[0024] Voltage amplitude (unit value, retain 4 decimal places);
[0025] Voltage phase angle (radians, range [-π,π]);
[0026] Frequency deviation (Hz, dynamic range ±0.5Hz);
[0027] Branch flow parameters:
[0028] Active power flow (MW, accuracy ±0.1MW);
[0029] Reactive power flow (Mvar, accuracy ±0.1Mvar);
[0030] Line current (kA, effective value);
[0031] Power generation side parameters:
[0032] Generator active output (MW, adjustment step 0.5MW);
[0033] Generator reactive power output (Mvar, adjustment step 0.5Mvar);
[0034] Transformer tap position (gear code, 0-30 levels);
[0035] Data collection specifications:
[0036] Sampling frequency: 50ms (compliant with IEC 61850-9-2 standard);
[0037] Preprocessing: Savitzky-Golay filter noise reduction, 3σ criterion to remove outliers; (2) Dynamic features (m2 = 40 dimensions)
[0038] New energy output fluctuation indicators:
[0039] Photovoltaic output fluctuation rate (σ pv =std(P pv (t-Δt:t)));
[0040] Wind power output fluctuation rate (σ wt =std(P wt (t-Δt:t)));
[0041] Energy storage SOC change rate
[0042] Load forecast error:
[0043] Active power prediction residual (ε p =P load_pred -P load_meas );
[0044] Reactive power prediction residual (ε q =Q load_pred -Q load_meas );
[0045] Transient stability index:
[0046] Generator power angle difference (Δδ=max(δ i )-min(δ i ));
[0047] Frequency change rate ( Unit: Hz / s);
[0048] (3) Environmental parameters (m3 = 15 dimensions)
[0049] Weather data:
[0050] Temperature (℃, accuracy ±0.1℃);
[0051] Relative humidity (%RH, accuracy ±2%);
[0052] Wind speed (m / s, 10-minute average);
[0053] Air pressure (hPa, corrected for standard atmospheric pressure);
[0054] Geographic information:
[0055] Altitude (m, affects air density);
[0056] Pollution level (IEC 60815 standard classification);
[0057] Device status:
[0058] Overhead line ice thickness (mm, based on image recognition);
[0059] Cable skin temperature (°C, distributed optical fiber temperature measurement);
[0060] (4) Structural features (m4 = 200 dimensions)
[0061] Improved adjacency matrix:
[0062]
[0063] Contains transformer ratio information A ij *=t ij ;
[0064] Dynamic update mechanism: When the line status changes (tripping / closing), the matrix is updated within 30ms; Key node coding:
[0065] Hub substation identifier (one-hot encoding, dimension 39 when n=39);
[0066] New energy collection point identification (binary encoding, supporting up to 8 clusters);
[0067] (5) Derived features (m5 = 25 dimensions)
[0068] Safety margin index:
[0069] Voltage safety margin Thermal stability margin
[0070] Economic indicators:
[0071] Power generation cost (yuan / MWh, based on unit quotation curve)
[0072] Network loss rate (%, real-time calculated value)
[0073] Reliability indicators:
[0074] System average power outage frequency (SAIFI, times / user-year)
[0075] System average outage duration (SAIDI, hours / user-year)
[0076] 1.1.2 Feature Fusion Strategy
[0077] Time alignment: All features are aligned to UTC timestamps, with a synchronization accuracy of ±1ms
[0078] Dimension expansion: Using feature embedding technology (Embedding Layer) to convert discrete features into continuous vectors
[0079] Normalization:
[0080] Numerical type: Z-score standardization (μ=0,σ=1)
[0081] Classification: One-Hot Encoding
[0082] Time series: Sliding window normalization (window size = 10 minutes)
[0083] 1.1.3 Feature Selection Mechanism
[0084] Feature screening based on mutual information (features with MI>0.3 are retained)
[0085] Recursive Feature Elimination (RFE) combined with LightGBM model dynamic feature update: recalculate feature importance every 15 minutes 1.2 Spatiotemporal Feature Extraction Network
[0086] 1.2.1 Layered Architecture Design
[0087] Construct a 4-layer spatiotemporal feature extraction network, including:
[0088] (1) Input layer (dimensionality matching)
[0089] (2) Spatial feature extraction layer (2-layer GCN)
[0090] (3) Temporal feature fusion layer (Transformer encoder)
[0091] (4) Output layer (feature integration)
[0092] 1.2.2 Improving Graph Convolutional Networks (GCN)
[0093] (1) Spatial feature extraction layer
[0094]
[0095] in:
[0096] is a symmetric normalized adjacency matrix I is the identity matrix (introducing self-connection)
[0097] σ uses the LeakyReLU activation function (α=0.2)
[0098] is the learnable weight matrix
[0099] Dropout regularization (p = 0.3) is used to prevent overfitting (2) Network parameter configuration
[0100]
[0101] 1.2.3 Transformer Temporal Attention Module
[0102] 1.2.3.1 Temporal Feature Fusion Layer
[0103] Transformer(X)=FFN(MultiHeadAttn(X)+X) Specific implementation:
[0104] (1) Multi-head attention mechanism:
[0105] Number of heads: 8 Dimensions of each head: 32
[0106] Position encoding: using Learnable Position Embedding residual connection: X+MultiHeadAttn(X)
[0107] Layer Normalization: `LayerNorm`
[0108] (2) Feedforward Neural Network:
[0109] Structure: 2 fully connected layers (256→64)
[0110] Activation function: GELU
[0111] Residual connection: FFN(X)+X
[0112] 1.2.3.2 Time Window Configuration
[0113] Historical time step: T = 100 (corresponding to 5 seconds of data)
[0114] Future prediction step: T = 20 (corresponding to 1 second prediction)
[0115] Sliding window step size: Δt = 10ms
[0116] 1.2.4 Dynamic Mask Mechanism Enhancement
[0117] (1) Node importance assessment
[0118] α i =sigmoid(MLP node (X i ))
[0119] MLP structure:
[0120] Input dimension: 64 (GCN output features)
[0121] Hidden layers: 2 layers (128 → 64)
[0122] Activation function: Swish
[0123] Output dimension: 1
[0124] (2) Dynamic mask application
[0125] H masked =H⊙M A
[0126] is a diagonal matrix
[0127] Mask update frequency: recalculate the mask every training epoch Visualization: generate heat through Grad-CAM Figure 1 .2.5 Feature Fusion Strategy
[0128] (1) Spatiotemporal feature splicing
[0129] H st =Concat(H spatial ,H temporal )
[0130] Spatial feature dimension: 64
[0131] Time feature dimension: 64
[0132] Dimension after fusion: 128
[0133] (2) Attention Weighted Fusion
[0134] H fused =α·H spatial +(1-α)H temporal α∈[0,1]
[0135] 1.2.6 Network Training Optimization
[0136] (1) Loss function
[0137] Cross entropy loss (classification task)
[0138] Mean squared error (regression task)
[0139] Contrastive loss (feature similarity learning)
[0140] (2) Optimizer
[0141] AdamW optimizer (weight decay = 0.01)
[0142] Learning rate scheduling: cosine annealing strategy
[0143] Gradient clipping: max norm =1.0
[0144] (3) Training configuration
[0145] Batch size: 32
[0146] Training period: 200 epochs
[0147] Validation set ratio: 20%
[0148] Early stopping mechanism: patience = 10
[0149] 1.2.7 Hardware Acceleration Implementation
[0150] (1) Parallel computing
[0151] Accelerating GCN with CUDA 11.4
[0152] Optimizing convolution operations using cuDNN
[0153] Distributed training: Horovod framework
[0154] (2) Model compression
[0155] Knowledge distillation (Teacher model: ResNet50)
[0156] Dynamic network pruning (based on L1 regularization)
[0157] Quantized deployment: FP16 half-precision inference
[0158] 1.3 Feature Enhancement Technology
[0159] 1.3.1 Data Normalization
[0160] When processing power grid-related time series data, different types of measurement data have different dimensions and numerical ranges. For example, bus voltage amplitude typically ranges from 0.9 to 1.1 per unit, while generator output can range from tens to hundreds of megawatts. This discrepancy in data scale can adversely affect subsequent machine learning model training, potentially causing certain features to dominate the model while others are neglected. Therefore, normalization of time series data is necessary.
[0161] This patent uses the Z score standardization method to process time series data. For a given set of time series data X = {x1, x2, ..., x n}, the calculation formula for Z score standardization is:
[0162]
[0163] Where μ is the mean of the data, and the calculation formula is σ is the standard deviation of the data, which is calculated as
[0164] In practical applications, the mean and standard deviation of various types of time-series measurement data, such as bus voltage amplitude, branch active / reactive power flows, and generator output, are calculated and then normalized according to the above formula. To ensure real-time and accurate data processing, a sliding window approach is used to dynamically update the data. For example, the sliding window size is set to 100 time steps. With each new time step, the mean and standard deviation of the data within the window are updated, and the new data is normalized.
[0165] In terms of the selection of sliding window size, comparative experiments are conducted to verify the impact of different window sizes on feature extraction effects:
[0166]
[0167] Experimental results show that when the window size is 100, the model achieves the lowest MAE (0.091) on the test set while maintaining reasonable computational efficiency. Therefore, choosing 100 time steps as the sliding window size can capture short-term dynamic characteristics while avoiding the introduction of excessive redundant information.
[0168] Through Z score standardization, all time series data are converted into standard normal distribution data with a mean of 0 and a standard deviation of 1, making different features numerically comparable, which helps to improve the training effect and generalization ability of machine learning models.
[0169] 1.3.2 Feature Dimensionality Reduction
[0170] During multimodal feature modeling, the extracted features may have very high dimensions, which not only increases computational costs and storage requirements but may also lead to overfitting of the model. Therefore, dimensionality reduction is necessary for high-dimensional features.
[0171] This patent uses principal component analysis (PCA) to compress high-dimensional features to less than 200 dimensions. PCA is an unsupervised linear dimensionality reduction technique. Its core idea is to project the original data onto a new set of orthogonal coordinate axes through a linear transformation, maximizing the variance of the data on these axes, thereby finding the main characteristic components of the data.
[0172] The specific implementation steps are as follows:
[0173] (1) Data centering: For the input high-dimensional feature matrix (where m is the number of samples and n is the feature dimension), calculate the mean of each feature Then subtract the corresponding mean from each feature of each sample to obtain the centered matrix X c .
[0174] (2) Calculate the covariance matrix: Calculate the centered matrix X c The covariance matrix of
[0175] (3) Eigenvalue decomposition: Perform eigenvalue decomposition on the covariance matrix C to obtain the eigenvalues λ1≥λ2≥…≥λ n and the corresponding eigenvectors v1,v2,…,v n .
[0176] (4) Select the principal component: According to the size of the eigenvalue, select the eigenvectors corresponding to the first k eigenvalues (k satisfies k<200) to form the projection matrix P = [v1,v2,…,v k ].
[0177] (5) Data projection: The centralized matrix X c Projected onto the projection matrix P, the reduced dimension feature matrix Y = X is obtained c P.
[0178] When determining the value of k, the cumulative variance contribution rate method is used. The cumulative variance contribution rate is defined as The k value is usually selected when the cumulative variance contribution rate reaches 90%-95%. PCA dimensionality reduction effectively reduces the feature dimension while retaining the main information of the data, improving the training efficiency and generalization ability of the model.
[0179] 1.3.3 Anomaly Detection
[0180] During power grid operation, the collected data may contain outliers due to sensor failures, communication interference, and other reasons. These outliers can have a serious impact on subsequent data analysis and decision-making. Therefore, it is necessary to detect anomalies in the data to identify and process bad data.
[0181] This patent uses the Isolation Forest algorithm for anomaly detection. The Isolation Forest algorithm is an unsupervised anomaly detection algorithm based on decision trees. Its core idea is to isolate data points by randomly selecting features and partition points. Outliers are generally easier to isolate and therefore have shorter path lengths.
[0182] The specific implementation steps are as follows:
[0183] (1) Isolation tree construction: Randomly select ψ samples from the original dataset (ψ is usually set to 256. Experimental verification shows that the anomaly detection accuracy tends to be stable when ψ>200) and construct an isolation tree. During the construction process, a feature and a partition point of the feature are randomly selected to divide the sample into two subsets. This process is repeated until each subset has only one sample or the preset tree depth is reached.
[0184] (2) Construct an isolation forest: Repeat step 1 to construct t isolated trees (t is usually 100, and Bootstrap sampling is used to ensure detection robustness) to form an isolation forest.
[0185] (3) Calculate the path length: For each sample, input it into each tree in the isolation forest, calculate its path length in each tree, and then take the average to obtain the average path length h(x) of the sample.
[0186] (4) Calculate the anomaly score: Calculate the anomaly score s(x, ψ) of the sample based on the average path length h(x). The calculation formula is:
[0187]
[0188] Among them, c(ψ) is a constant related to the sample size ψ, and the calculation formula is:
[0189]
[0190] H(i) is the harmonic series,
[0191] The anomaly score s(x,ψ) ranges from [0 to 1]. The closer the score is to 1, the more likely the sample is an outlier. We set an anomaly score threshold (0.6, determined based on the principle of maximizing the Youden index) and classify samples with an anomaly score greater than this threshold as outliers.
[0192] For detected outliers, the following processing methods are used:
[0193] Deletion: If the number of outliers is small and has little impact on the overall data, they can be directly deleted from the dataset.
[0194] Interpolation: If there are a large number of outliers, or if removing them would result in incomplete data, interpolation methods can be used. For example, for time series data, linear interpolation or spline interpolation can be used to estimate the reasonable value of the outlier based on the values of adjacent normal data points.
[0195] Anomaly detection through the isolation forest algorithm can effectively identify outliers in the data and process them reasonably, thereby improving the quality and reliability of the data and providing strong support for subsequent data analysis and decision-making.
[0196] 2 Case retrieval algorithm
[0197] 2.1 Hybrid Similarity Calculation Model
[0198] 2.1.1 Three-level search architecture design
[0199] Construct a three-level progressive search architecture. The technical parameters and implementation methods of each level are as follows:
[0200] (1) Coarse-grained matching layer
[0201] Technical implementation:
[0202] Use cosine similarity to quickly filter:
[0203]
[0204] Feature preprocessing:
[0205] L2 normalize the feature vector
[0206] Use Locality Sensitive Hashing (LSH) to build indexes
[0207] Hardware Acceleration:
[0208] GPU-accelerated search using the FAISS library
[0209] Building an inverted index to improve query efficiency
[0210] Screening threshold: retain the top 100 candidate cases
[0211] Innovations:
[0212] Introducing LSH-based approximate nearest neighbor search to reduce the retrieval time complexity from O(n) to O(log n)
[0213] Combined with the distribution characteristics of the power grid, the hash function parameters (k = 12, L = 20) are optimized and verified through experiments:
[0214] LSH hash parameter optimization experiment:
[0215]
[0216] Taking the recall rate and retrieval efficiency into consideration, the parameter combination of k=12, L=20 is selected. While ensuring a recall rate of 96.7%, the retrieval time only increases by 0.3ms.
[0217] (2) Fine-grained matching layer
[0218] Dynamic weight similarity formula:
[0219]
[0220] Parameter description:
[0221] Temporal attention weight α t :
[0222] Q, K, and V are the feature projection matrices of the query case and candidate case, respectively (dimension d = 64);
[0223] Use multi-head attention mechanism (8 heads) for parallel computing;
[0224] Position encoding uses Learnable Position Embedding;
[0225] Adaptive temperature parameter β: in
[0226] Dynamic adjustment based on query case feature variance;
[0227] Solve the problem that traditional fixed β value cannot adapt to different scenarios;
[0228] Technical implementation:
[0229] Implement the attention module using PyTorch;
[0230] Use AMP (automatic mixed precision) to accelerate calculations;
[0231] Introduce a cache mechanism to store historical calculation results;
[0232] (3) Constrained pruning layer
[0233] Constraints:
[0234] 1) Power balance constraint: P G -PL -Bθ=0 (linearized power flow equation);
[0235] 2) Voltage safety constraint: V min ≤V≤V max (amplitude constraint);
[0236] 3) Equipment capacity constraints: |I ij |≤I rated,ij (line current constraint);
[0237] Pruning strategy:
[0238] Rapidly verify constraints using DC power flow approximation;
[0239] Build fast detection indicators for constraint violations: Pruning is triggered when δ>0.05.
[0240] Optimization method:
[0241] Develop a fast constraint violation prediction model (LightGBM);
[0242] Pre-calculating the constrained feasible region reduces the amount of online calculations.
[0243] 2.1.2 Computational efficiency optimization
[0244] (1) Parallel computing architecture
[0245] Coarse-grained matching: GPU parallel computing (implemented by CUDA kernel);
[0246] Fine-grained matching: multi-threaded processing of time steps;
[0247] Constrained pruning: vectorized operations (SIMD instruction optimization).
[0248] (2) Memory optimization
[0249] Use zero copy technology (CUDA Zero Copy);
[0250] Use feature cache pool (caching the features of the last 1000 cases);
[0251] Dynamic memory allocation (automatically adjusted according to the size of the case library).
[0252] 2.2 Attention Mechanism Optimization
[0253] 1.2.2.1 Multi-Head Attention Structure Design and Principle
[0254] In the attention mechanism of the case retrieval algorithm, this patent uses a multi-head attention structure to enhance the model's ability to capture different feature subspaces. Specifically, eight parallel attention heads are set up, each of which independently learns different feature representations, enabling the input information to be processed and analyzed from multiple perspectives.
[0255] 1.2.2.1.1 Principle of Multi-Head Attention
[0256] The multi-head attention mechanism obtains multiple different subspace representations by linearly projecting the input query, key, and value. For each attention head, the calculation process is as follows:
[0257] (1) Linear projection
[0258] Assume the input query matrix is Q, the key matrix is K, and the value matrix is V, all with dimensions d model For the i-th attention head, the linear transformation matrix Projection, we get in The dimensions are all d model ×d k (here h=8 is the number of attention heads).
[0259] (2) Attention calculation
[0260] Calculate the attention score of the i-th attention head: in, Used to calculate the similarity between the query and the key, divided by This is to prevent the dot product result from being too large, causing the gradient to disappear or explode.
[0261] (3) Multi-head splicing
[0262] Concatenate the outputs of the 8 attention heads: MultiHead(Q,K,V)=Concat(Attention1,Attention2,…,Attention8)W O ;W O It is a dimension of h×d k ×d model The linear transformation matrix is used to map the concatenated result back to d model dimension.
[0263] 2.2.1.2 Advantages of Multi-Head Attention
[0264] Feature diversity: Different attention heads can focus on different aspects of the input sequence. For example, some attention heads may focus more on short-term changes in the time series, while others may focus more on long-term trends, thereby improving the model's ability to express complex features.
[0265] Information complementarity: The results of multiple attention heads complement each other, enabling the model to more comprehensively capture the relationship between input information and more accurately find similar cases in case retrieval.
[0266] 1.2.2.2 Position Encoding Technology
[0267] To preserve temporal order information within the attention mechanism, this patent employs a sinusoidal positional encoding method. In sequential data processing, the attention mechanism itself does not consider the positional information of the input elements. However, in case retrieval, temporal order is crucial for determining case similarity, so positional encoding is necessary to add positional information to the input sequence.
[0268] (1) Principle of sinusoidal position encoding
[0269] For the posth position and i-th dimension in the input sequence, the sinusoidal position encoding is calculated as follows:
[0270] When i is an even number:
[0271] When i is an odd number:
[0272] where d model is the input dimension of the model, and pos represents the position in the sequence.
[0273] (2) Advantages of sinusoidal position encoding
[0274] Relative position information: The periodicity of the sine and cosine functions makes the encodings of adjacent positions similar and can reflect relative positional relationships. This is very useful for capturing temporal patterns and dependencies in sequences. For example, in case retrieval, it can better determine the correlation between case features at different time points.
[0275] Scalability: Sinusoidal position coding is a fixed encoding method that does not depend on training data. Therefore, it can be easily applied to input sequences of different lengths and has good scalability.
[0276] 2.2.3 Cache Optimization and GPU Acceleration
[0277] To improve the computational efficiency of the attention mechanism, this patent uses GPUs to accelerate matrix operations and implements them using CUDA. During case retrieval, the attention mechanism involves a large number of matrix multiplication and addition operations, which are inefficient on CPUs. However, GPUs, with their powerful parallel computing capabilities, can significantly accelerate these operations.
[0278] 2.2.3.1 Cache Optimization Strategy
[0279] (1) Intermediate result cache: During the attention calculation process, some intermediate results (such as Q after linear projection) i , K i 、V i Matrices may be reused in multiple calculations. By caching these intermediate results, repeated calculations can be avoided and the amount of computation can be reduced. For example, when processing multiple query cases, if certain key and value matrices remain unchanged, the corresponding linear projection results can be cached and read directly from the cache the next time they are used.
[0280] (2) Memory management optimization: Rationally manage GPU memory to avoid memory fragmentation and over-allocation. Adopt a dynamic memory allocation strategy to dynamically allocate and release memory according to actual computing needs to ensure efficient use of GPU memory.
[0281] 2.2.3.2 CUDA Implementation Details
[0282] Parallel Computing Kernel Design: We designed specialized CUDA kernel functions for key operations in the attention mechanism, such as matrix multiplication and the softmax function, to fully leverage the GPU's thread parallelism. For example, matrix multiplication is broken down into multiple thread blocks and threads, with each thread responsible for computing one element in the matrix, enabling large-scale parallel computing.
[0283] Data transfer optimization: Reduce data transfer overhead between the CPU and GPU. During data preprocessing, try to load data into GPU memory all at once, and complete all computations on the GPU to avoid frequent data transfers. Furthermore, asynchronous data transfer technology allows data transfer and computation to proceed in parallel, further improving computational efficiency.
[0284] 3Case Correction Mechanism
[0285] 3.1 Physical Constraint Compensation Algorithm
[0286] 3.1.1 Correction formula analysis
[0287] The case correction formula used in this patent is:
[0288] A new =A ret +ΔA+λ·(Acons -A ret )
[0289] This formula has three key parts, each playing a different role in case modification:
[0290] (1) Historical decision inheritance item A ret : Directly reuse decision-making actions from similar historical cases, which retains the effective experience from past successful cases and provides a basic reference for new decisions.
[0291] (2) Similarity gradient adjustment term ΔA: Where η is the learning rate (0.01≤η≤0.1), and the adaptive adjustment strategy is: η=η0·e -γ·iter , where η0 is the initial learning rate, γ is the decay coefficient, and iter is the number of iterations. Through this adaptive adjustment, the learning rate will gradually decrease as the number of iterations increases, allowing the model to converge quickly in the early stages of training and more accurately adjust parameters in the later stages; is the gradient of similarity to action, calculated by automatic differentiation, which reflects the current query case C q Compared with the retrieved case C ret The rate of change of similarity between them with the decision action A; R ret -R q Drive decision-making towards better results based on case effect differences
[0292] (3) Constraint compensation term λ·(A cons -A ret ):
[0293] First, A cons is a quantity that is independent of λ and is obtained by solving the following constrained least squares problem: Power flow equation constraints, voltage safety constraints, equipment capacity constraints, among which A cons is the optimal adjustment direction to meet the constraints; and λ is the compensation coefficient, which ranges from 0≤λ≤1. It is dynamically determined by the fuzzy logic system according to the current system status (such as voltage safety margin VSM, thermal stability margin TSM, frequency deviation Δf, etc.). λ is used to adjust the historical decision A ret and constraint solution A cons When the constraints are loose (λ = 0), it mainly relies on historical experience; when the constraints are tight (λ = 1), the constrained solution is completely adopted.
[0294] 1.3.1.2 Gradient Calculation Optimization
[0295] (1) Similarity gradient analysis:
[0296]
[0297] Backpropagation is used to calculate the gradient. This method uses the chain rule to efficiently calculate the gradient of complex functions. At the same time, to prevent numerical instability, gradient truncation technology is used to limit the gradient value to a certain range.
[0298] (2) Computational acceleration:
[0299] Using the PyTorch automatic differentiation engine, it can automatically calculate the gradient of the function, avoiding the tedious process of manually deriving the gradient formula. In addition, the gradient caching technology is used to store the calculated gradient values, reducing repeated calculations and improving computational efficiency.
[0300] 3.1.3 Dynamic adjustment of compensation coefficient
[0301] A fuzzy inference system is designed to dynamically adjust the value of λ.
[0302] (1) Input variables:
[0303] Voltage safety margin (VSM∈[0,1])
[0304] Thermal stability margin (TSM∈[0,1])
[0305] Frequency deviation (Δf∈[-0.5,0.5]Hz)
[0306] (2) Output variable: λ∈[0,1]
[0307] (3) Fuzzy rules:
[0308] |Rule number|Condition combination|Conclusion|
[0309] |---|---|---|
[0310] |1|VSM low ∧TSM low ∧Δf large |λ=1|
[0311] |2|VSM high ∧TSM high ∧Δf small |λ=0|
[0312] |...|...|...|
[0313] 3.2 Constraint Processing Flow
[0314] 3.2.1 Constraint model construction
[0315] (1) Linearization of the power flow equation
[0316] The first-order Taylor expansion of the Newton-Raphson method is adopted: ΔP=BΔθ; where the matrix B is the imaginary part of the admittance matrix.
[0317] In order to improve the calculation accuracy, linearization error compensation is introduced: ∈=||ΔP-BΔθ||2; when ∈>0.01pu, the secondary iteration is triggered to ensure that the linear approximation of the power flow equation is accurate enough.
[0318] (2) Voltage safety constraints
[0319] Amplitude constraint: V min ≤V≤V max , ensure that the bus voltage amplitude is within a safe range, and avoid the normal operation of power grid equipment affected by excessively high or low voltage.
[0320] Phase angle constraint: |θ i -θ j |≤θ max , limiting the phase angle difference between busbars to prevent unstable situations such as power oscillation.
[0321] (3) Equipment capacity constraints
[0322] Line current: I ij ≤I rated,ij , ensure that the line current does not exceed its rated value to avoid overheating and damage to the line.
[0323] Transformer tap: t min ≤t≤t max , limit the adjustment range of the transformer tap and ensure the normal operation of the transformer.
[0324] 3.2.2 Optimization Problem Solving
[0325] Construct a quadratic programming (QP) model:
[0326]
[0327] sT G -P L -Bθ=0
[0328] V min ≤V≤V max
[0329] I ij ≤I rated,ij
[0330] Solution:
[0331] (1) Implementation of interior point method:
[0332] Barrier function: φ(A)=||AA ret || 2 -μ∑ln s i , where s iis the slack variable, μ is the barrier parameter. By introducing the barrier function, the constrained optimization problem is transformed into an unconstrained optimization problem.
[0333] Newton step length calculation: The Newton method is used to iteratively update the decision action A to gradually approach the optimal solution. At the same time, an adaptive μ update strategy is adopted to dynamically adjust the value of the barrier parameter according to the iterative process to improve the convergence speed.
[0334] (2) Constraint processing technology:
[0335] The active set strategy identifies the active constraints and quickly determines which constraints are active in each iteration, reducing unnecessary calculations.
[0336] The duality gap monitors convergence. By monitoring the size of the duality gap, it is determined whether the iteration has converged, thus ensuring the accuracy of the solution.
[0337] The penalty function processes the inequality constraints and converts them into penalty terms in the objective function, making the solution process more stable.
[0338] 3.2.3 Solution efficiency optimization
[0339] (1) Sparse matrix technology
[0340] Use AMD sparse matrix sorting algorithm to sort the matrix to reduce the amount of zero element calculation in matrix operations. Matrix decomposition uses LDLT decomposition, and its computational complexity is O(n 1.5 ), which can effectively improve the computing efficiency.
[0341] (2) Parallel computing
[0342] Multithreading is used to solve QP subproblems, fully utilizing the computing power of multi-core processors. GPUs are also used to accelerate matrix operations, leveraging the cuSOLVER library for efficient matrix operations, further improving computational speed.
[0343] (3) Real-time guarantee
[0344] Precompute the admittance matrix B to avoid repeated calculations in each iteration. Cache the constrained feasible region so it can be directly used in subsequent calculations, reducing the amount of computation. A fast hot start mechanism uses the results of the previous solution as the initial value for the current solution, accelerating convergence and ensuring real-time system response.
[0345] 4Case library optimization
[0346] 4.1 Incremental Clustering Strategy
[0347] 4.1.1 Principle and significance of update conditions
[0348] In the case library management process, as new cases are constantly generated, an effective strategy is needed to decide whether to add new cases to the case library or update existing cases. The incremental clustering strategy proposed in this patent achieves this goal by setting a similarity threshold τ.
[0349] When the new case C new and all cases C in case library D j The minimum similarity minC j∈D sim(C new ,C j ) is less than the threshold τ, indicating that the new case is significantly different from the existing case and has unique features and value, so it is added to the case library, that is, D←D∪{C new This helps expand the coverage of the case library and enrich the diversity of cases, thereby improving the applicability of the case library in solving different problems.
[0350] On the contrary, if the minimum similarity is not less than the threshold τ, it means that the new case is similar to a case in the case library. At this time, the weighted average method is used to calculate the similar case C. j Update, that is, C j ←μC j +(1-μ)C new Where μ is the aging factor, which controls the degree to which new cases update old cases. This updating method allows the cases in the case library to continuously evolve as new information is added, maintaining the timeliness and accuracy of the cases.
[0351] 4.1.2 Adaptive Adjustment of Similarity Threshold τ
[0352] Threshold adaptive adjustment formula: Where N is the size of the case library. When N < 5000, τ ≤ 0.85 to encourage case accumulation; when N > 10000, τ approaches 0.95 to control redundancy.
[0353] The similarity threshold τ ranges from 0.8 to 0.95 and is adaptively adjusted based on the size of the case library. When the case library is small, τ can be relatively small to quickly enrich its content and make it easier to add new cases. As the case library grows, τ should be gradually increased to avoid excessive redundancy and increased management costs caused by an overabundance of similar cases.
[0354] The specific adaptive adjustment algorithm can be designed based on the historical growth of the case library and actual application requirements. For example, a linear adjustment strategy can be used, where τ is increased by a fixed step size every time the case library size increases by a certain amount. Alternatively, a nonlinear adjustment strategy can be used, where τ is adjusted based on the logarithm or exponential relationship of the case library size.
[0355] 4.1.3 Analysis of the Effect and Value of Aging Factor μ
[0356] The aging factor μ ranges from 0.1 to 0.3 and plays an important role in the case update process. A larger μ value indicates that when updating cases, the weight of the old cases is increased, and the influence of the new cases on the old cases is reduced. Conversely, a smaller μ value indicates that the new cases have a greater impact on the old cases.
[0357] In practical applications, the appropriate μ value should be selected based on the timeliness and stability of the case. For cases with high timeliness and rapid changes, such as power system faults, μ can be relatively small to promptly reflect new fault characteristics and solutions. For cases with high stability and slow changes, such as classic design cases, μ can be relatively large to preserve the core characteristics of the case.
[0358] 4.2 Density Peak Clustering Optimization
[0359] 4.2.1 Principle of local density calculation
[0360] The core of the density peak clustering optimization method is to calculate the local density ρ of each case i The local density calculation formula used in this patent is ρ i =∑ j≠i χ(d ij -d c ), where d ij represents the distance between case i and case j, χ is an indicator function, when d ij -d c <0, χ(d ij -d c )=1; otherwise, χ(d ij -d c )=0.
[0361] The meaning of this formula is that for case i, the statistical distance between it and other cases is less than the cutoff distance d c The number of cases is the local density of case i. The local density reflects the distribution of cases around the case. Cases with higher density are usually located in the center of the cluster, while cases with lower density may be located at the edge of the cluster or isolated.
[0362] 4.2.2 Cutoff distance d c Determination and dynamic update
[0363] Cutoff distance d c Take the 90th percentile of all distances. This approach can balance the calculation of local density to a certain extent and avoid inaccurate local density calculations due to improper distance threshold settings.
[0364] In order to adapt to the dynamic changes of the case library, the cutoff distance d c A dynamic update strategy is adopted, and the distance distribution between cases will change as new cases are added and old cases are updated. c The accuracy of local density calculation can be guaranteed, thereby improving the clustering effect.
[0365] 4.2.3 Advantages of Density Peak Clustering Optimization
[0366] Compared with traditional clustering methods, the density peak clustering optimization method proposed in this patent has the following advantages:
[0367] (1) No need to pre-specify the number of clusters: Traditional clustering methods such as the K-Means algorithm require the number of clusters to be specified in advance, while the density peak clustering method can automatically determine the center and number of clusters based on the local density of the case, which is more flexible and adaptive.
[0368] (2) Robustness to noise and outliers: Since the calculation of local density is based on the neighborhood information around the case, the density peak clustering method is robust to noise and outliers and can effectively identify the true clustering structure.
[0369] 4.3 Case Aging Mechanism
[0370] 4.3.1 Introduction of time decay factor
[0371] In order to reflect the timeliness of the case, this patent introduces the time decay factor e -γΔt Where γ is the decay coefficient and Δt is the time interval from the creation of the case to the current moment. The original score of the case R i After time decay, the new score R' is obtained i =R i *e -γΔt .
[0372] The time decay factor reduces the score of older cases over time, allowing the case library to focus more on recent cases. This is crucial for time-sensitive areas such as market trend analysis and technological innovation. By introducing a time decay factor, we ensure that the cases in the case library always reflect the latest developments and trends.
[0373] 4.3.2 Selection of attenuation coefficient γ
[0374] The choice of decay coefficient γ depends on the specific application scenario and the timeliness of the case. If the case is highly time-sensitive, such as news reports or stock market analysis, γ can be relatively large to quickly decay the score of old cases. If the case is less time-sensitive, such as historical and cultural research or basic scientific theory, γ can be relatively small to preserve the value of old cases.
[0375] 4.3.3 Regularly delete cases with low similarity and low scores
[0376] In order to keep the case library streamlined and efficient, it is necessary to regularly delete cases with low similarity and low scores. This patent sets a deletion threshold of 0.5, meaning that when a case's similarity is lower than 0.5 and its score is also lower than 0.5 after time decay, the case will be deleted from the case library.
[0377] This deletion strategy can effectively clean up redundant and outdated cases in the case library, reduce the storage space of the case library, and improve the efficiency of case retrieval and management. At the same time, deleting low-quality cases also helps to improve the overall quality of the case library, making the case library more focused on representative and valuable cases.
[0378] 5. System Implementation Architecture
[0379] 5.1 Data Layer Design
[0380] 5.1.1 Hybrid Storage Architecture
[0381] Build a three-level distributed storage system:
[0382] (1) Real-time data storage:
[0383] Kafka message queue (throughput 100,000 TPS);
[0384] HBase columnar database (supports 10ms-level queries)
[0385] (2) Historical data storage:
[0386] HDFS distributed file system (block size 128MB, 3 replicas) Parquet columnar storage (compression rate 40%-70%)
[0387] (3) Metadata management:
[0388] Atlas metadata management system Ranger permission management (supports fine-grained RBAC)
[0389] 5.1.2 Data Collection and Preprocessing
[0390] (1) Multi-source data access:
[0391] IEC 61850 protocol (sampling rate 50ms)
[0392] Modbus RTU / ASCII protocol meteorological API interface (RESTful)
[0393] (2) Data cleaning process:
[0394] 1) Flume-based ETL pipeline
[0395] 2) Bad Data Detection (3σ Criterion + Isolation Forest)
[0396] 3). Data completion (linear interpolation + KNN interpolation)
[0397] 5.1.3 Storage Optimization Technology
[0398] (1) Separation of hot and cold data:
[0399] Hot data (last month): HBase
[0400] Cold data (historical data): HDFS+Spark
[0401] (2) Data compression:
[0402] Snappy compression (low CPU consumption)
[0403] Dynamic compression rate adjustment (based on data type)
[0404] 5.2 Algorithm Layer Design
[0405] 5.2.1 Feature Engineering Platform
[0406] (1) Feature generation:
[0407] Sliding window (window size: 1min, step size: 10s) Fourier transform (extract frequency features)
[0408] Statistical characteristics (mean / variance / skewness)
[0409] (2) Feature Management
[0410] Feast feature warehouse (supports version management)
[0411] Feature lineage tracking (DAG visualization)
[0412] 5.2.2 Model Training Framework
[0413] (1) Distributed training:
[0414] Horovod distributed training framework parameter server architecture (Parameter Server)
[0415] (2) Training optimization:
[0416] Mixed precision training (FP16+FP32)
[0417] Gradient Accumulation
[0418] (3) Model management:
[0419] MLflow model lifecycle management model version control (Git integration)
[0420] 5.2.3 Real-time Inference Engine
[0421] (1) Model optimization:
[0422] TensorRT 8.0 inference optimization (layer fusion + quantization) ONNX model conversion (supports cross-platform deployment)
[0423] (2) Deployment architecture:
[0424] TensorRT Serving deployment on a GPU cluster (NVIDIA A100, 8 cards / node)
[0425] (3) Reasoning Monitoring:
[0426] Prometheus+Grafana monitoring platform delay / throughput / error rate indicators
[0427] 5.3 Application Layer Design
[0428] 5.3.1 System Interface Specifications
[0429] (1) EMS system connection:
[0430] IEC 61970 CIM model transformation service bus (based on Apache Camel)
[0431] Message format: JSON / XML dual protocol support
[0432] (2) API interface:
[0433] RESTful API (Swagger documentation)
[0434] GRPC high-performance interface (throughput 10,000 TPS)
[0435] 5.3.2 Visualization and Interaction
[0436] (1) Front-end technology stack:
[0437] React+Ant DesignD3.js visualization library
[0438] (2) User interaction:
[0439] Drag-and-drop case management
[0440] Heat map feature analysis
[0441] Decision-making process retrospective
[0442] 5.4 System Reliability Design
[0443] 5.4.1 Fault Tolerance Mechanism
[0444] (1) Data layer:
[0445] HDFS replication mechanism (3 copies)
[0446] Kafka message persistence (acks=-1)
[0447] (2) Algorithm layer:
[0448] Task retry (3 retries)
[0449] Dynamic Resource Scheduling (YARN)
[0450] (3) Application layer:
[0451] Load Balancing (Nginx+Keepalived)
[0452] Circuit Breaker (Hystrix)
[0453] 5.4.2 Scalability Design
[0454] (1) Horizontal expansion:
[0455] Data layer: HDFS nodes are dynamically added
[0456] Algorithm layer: Spark executor dynamic scaling
[0457] Application layer: Docker container deployment
[0458] (2) Vertical expansion:
[0459] Dynamic allocation of GPU resources
[0460] Memory Optimization (Off-Heap Memory)
[0461] 5.5 Technical parameter configuration
[0462]
[0463] Beneficial effects
[0464] The present invention has many beneficial effects, which are as follows:
[0465] 1. Improve decision-making efficiency and accuracy
[0466] Rapid Response: Utilizing innovative methods such as multimodal feature modeling, spatiotemporal feature extraction networks, and case retrieval algorithms, the system can quickly and accurately retrieve cases most similar to the current grid status from a vast pool of cases, providing a strong basis for decision-making. For example, in a provincial-level power grid fault scenario, single-case retrieval time was reduced from 8.7ms to 1.2ms, and decision-making accuracy in complex fault scenarios reached 93.7%.
[0467] Precise Decision Support: Combining a physical constraint compensation algorithm with a case correction mechanism, the system dynamically corrects retrieved cases, ensuring that decisions are more aligned with the grid's actual operating conditions and safety constraints, effectively improving decision accuracy. For example, the constraint violation rate has been reduced from 18.7% to 2.1%, and the voltage recovery success rate has increased from 72.2% to 94.3%.
[0468] 2. Enhance grid security and stability
[0469] Safety constraint assurance: During the case correction process, the physical constraints of the power grid, such as power balance constraints, voltage safety constraints, and equipment capacity constraints, are fully considered to ensure that decision-making actions will not cause the grid operating status to violate these constraints, thereby ensuring the safe and stable operation of the power grid.
[0470] Risk warning and prevention: By extracting and analyzing the multi-dimensional features of power grid operation data, potential risks and abnormal situations can be discovered in a timely manner, providing support for risk warning and prevention of the power grid, and reducing the probability and impact of failures.
[0471] 3. Improve data utilization and management efficiency
[0472] Data integration and normalization: A four-dimensional feature matrix including time-series measurement data, dynamic characteristics, environmental parameters, structural characteristics, etc. was constructed to achieve comprehensive integration and normalized processing of power grid operation data, thereby improving data quality and availability.
[0473] Case library optimization and update: Using incremental clustering strategy and density peak clustering optimization method, the case library can be dynamically updated and optimized according to the continuous generation of new cases, keeping the case library streamlined and efficient, and improving the efficiency of case retrieval and management.
[0474] 4. Promote system expansion and adaptability
[0475] Adapting to renewable energy access: In response to the grid decision-making difficulties under the high proportion of renewable energy access, through innovations in methodology, algorithms and architecture, we have effectively solved the uncertainty caused by the volatility and intermittency of renewable energy output, and improved the system's adaptability to renewable energy access.
[0476] Improved system scalability: A three-level distributed architecture has been built to achieve a decoupled design of storage, computing, and applications. It supports horizontal and vertical expansion of the system and can meet the needs of power grids of different sizes and different application scenarios.
[0477] 5. Improve the level of engineering application
[0478] Engineering deployment and integration: The system implementation architecture is elaborated in detail, including the design of the data layer, algorithm layer, and application layer, as well as the docking specifications with the existing EMS system. This provides clear guidance for the actual engineering deployment and integration of the solution, improving the system's operability and practicality.
[0479] Enhanced reliability and fault tolerance: In terms of system reliability design, fault-tolerant mechanisms and scalability designs are adopted at the data layer, algorithm layer, and application layer, such as data replication mechanism, task retry, dynamic resource scheduling, load balancing, and circuit breaker mechanism, which improve the reliability and fault tolerance of the system and ensure the stable operation of the system in complex environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0480] Figure 1 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION
[0481] The present invention will be further described below in conjunction with specific embodiments:
[0482] 1 Application Scenario
[0483] A provincial power grid has over 1,200 nodes and a renewable energy penetration rate of 45%. During the high temperatures of the summer of 2024, the system frequently experienced voltage collapse failures caused by sudden drops in photovoltaic output. This example demonstrates how to apply the present invention to achieve rapid response and safety assurance in fault decision-making.
[0484] 2 System Architecture Deployment
[0485] Hardware configuration:
[0486] GPU cluster: 8 servers (NVIDIA A100×8)
[0487] Storage cluster: HDFS 32 nodes (total capacity 100PB)
[0488] Interface specification: IEC 61970 CIM standard for connecting to EMS system
[0489] Software stack:
[0490] Data layer: Kafka+HBase+Parquet
[0491] Algorithm layer: PyTorch+TensorRT+Spark
[0492] Application layer: React + TensorRT Serving
[0493] 3. Case Library Construction
[0494] Feature matrix X i (Dimensions 120×200):
[0495] Timing measurement: bus voltage (per unit value, 50ms sampling)
[0496] Dynamic characteristics: PV output fluctuation rate (σ_pv=0.35)
[0497] Environmental parameters: temperature 38°C, humidity 75% RH
[0498] Structural features: Improved adjacency matrix (including 35 line impedances)
[0499] Spatiotemporal feature extraction:
[0500] Graph Convolutional Network: 4-layer GCN (LeakyReLU activation)
[0501] Transformer module: 8 attention heads, sequence length T = 100
[0502] Dynamic mask: The node importance heat map shows that buses 17 and 22 are key nodes.
[0503] 4Case retrieval process
[0504] Three-level search:
[0505] 1. Coarse-grained matching: LSH hashing to filter the top 100 candidates (retrieval time 0.8ms)
[0506] 2. Fine-grained matching:
[0507]
[0508] α t Calculated by multi-head attention (time weight distribution: α = 0.15 when t = 50)
[0509] 3. Constraint pruning: Eliminate 12 cases that violate voltage constraints
[0510] Search results:
[0511] Most similar case C ret (Similarity 0.92): Voltage restoration plan for August 15, 2022
[0512] Historical Decision A ret : Adjust the output of generator G3 to 500MW
[0513] 5. Case Correction Process
[0514] Constraint compensation algorithm:
[0515] 1. Gradient adjustment items:
[0516]
[0517] Gradient direction: Increase G5 reactive output
[0518] 2. Constraint solution calculation:
[0519] A cons =argmin||AA ret || 2 stV≥0.95pu
[0520] Optimization result: Adjust the transformer T1 tap to level 28
[0521] 3. Dynamic compensation coefficient:
[0522] A fuzzy inference system is designed to dynamically adjust the value of λ.
[0523] (1) Input variables:
[0524] Voltage safety margin (VSM∈[0,1])
[0525] Thermal stability margin (TSM∈[0,1])
[0526] Frequency deviation (Δf∈[-0.5,0.5]Hz)
[0527] (2) Output variable: λ∈[0,1]
[0528] (3) Fuzzy logic rule table:
[0529]
[0530] Note: All rules use the Mamdani inference method, and the membership function is triangular distribution VSM = 0.08 (low) → λ = 0.85
[0531] Final decision: A new =0.15A ret +0.85A cons +ΔA
[0532] Correction results:
[0533] New decision: G3 output 480MW + G5 reactive power + 20Mvar + T1 tap 28 gears 6. Case library optimization
[0534] Incremental update:
[0535] New case similarity min=0.89<τ=0.9→New case
[0536] Case database size: increased from 12,345 to 12,346
[0537] Density peak clustering:
[0538] Cutoff distance d c =0.3 (90th percentile)
[0539] Clustering results: 12 case clusters were formed, and the newly added cases were clustered independently.
[0540] 7. Implementation effect verification
[0541] 7.1 Test Environment
[0542] Physical environment: Provincial power grid real-time simulation platform (including 1200+ nodes, 45% new energy penetration rate)
[0543] Hardware configuration: GPU cluster (NVIDIA A100×8), storage cluster (HDFS 32 nodes)
[0544] Software environment: Python 3.8, PyTorch 2.0, TensorRT 8.0
[0545] Test period: July 1, 2024 - August 31, 2024 (summer high temperature period)
[0546] 7.2 Sample Description
[0547]
[0548] 7.3 Statistical Methods
[0549] Data preprocessing: 3σ criterion to eliminate outliers
[0550] Significance test: two-sample t-test (α=0.05)
[0551] Confidence interval: 95% confidence level
[0552] 7.4 Comparative experimental data
[0553]
[0554] Note: Data are mean ± standard deviation, sample size n = 200
[0555] 8 Verification Methods
[0556] 1. Blind test experimental design:
[0557] Divide the dataset into a training set (data from 2018-2023, 80%) and a test set (data from 2024, 20%).
[0558] The test set contains 100 unseen failure scenarios (including complex situations such as extreme weather and equipment aging).
[0559] 2. Robustness test:
[0560] Inject 10% Gaussian noise (σ=0.05pu);
[0561] Test feature missing scenario (randomly missing 20% of feature dimensions).
[0562] 3. Scalability test:
[0563] The case database scales linearly from 10,000 to 100,000;
[0564] Measure the changing trends of retrieval time and memory usage.
[0565] The embodiments of the present invention are not limited to the above description. The case representation dimensions, retrieval strategies and correction parameters can be adjusted according to the actual power system operation scenario. Such improvements fall within the scope of protection of the present invention.
Claims
1. A method for generating intelligent perception decisions for power systems based on case-based reasoning, characterized in that: The following steps are involved: Build a case representation model and define the case as a five-tuple C i = <X i ,S i ,A i ,R i ,T i >, where X i is a multidimensional feature matrix containing time series measurement data, dynamic features, environmental parameters, structural features and derived features. i is the system state vector, A i is the decision action vector, R i Score the case effect, T i is a timestamp vector; and feature fusion and selection processing are performed on the multidimensional feature matrix. The fused features are processed using a spatiotemporal feature extraction network. The spatiotemporal feature extraction network includes an input layer, a spatial feature extraction layer, a temporal feature fusion layer, and an output layer connected in sequence. The spatial feature extraction layer uses an improved graph convolutional network, and the temporal feature fusion layer uses a Transformer encoder. A three-level progressive retrieval architecture is used for case retrieval, including a coarse-grained matching layer, a fine-grained matching layer, and a constraint pruning layer, which respectively implement rapid screening of candidate cases, dynamic weighted similarity calculation, and security constraint verification. The retrieved cases are modified based on the physical constraint compensation algorithm. New decisions are generated by superimposing the historical decision inheritance term, the similarity gradient adjustment term, and the constraint compensation term. The compensation coefficient is dynamically adjusted using the fuzzy logic system. Optimize the management of the case library and achieve adaptive updating and streamlining of the case library through incremental clustering strategies, density peak clustering optimization, and case aging mechanisms.
2. The method for generating intelligent perception decisions for power systems based on case-based reasoning according to claim 1, characterized in that: In the multidimensional feature matrix, the time series measurement data includes busbar operating parameters, branch power flow parameters and generation side parameters, with a sampling frequency of 50ms and preprocessed by Savitzky-Golay filtering and 3σ criterion; Dynamic characteristics include renewable energy output fluctuation indicators, load forecast errors, and transient stability indicators; environmental parameters include meteorological data, geographic information, and equipment status; Structural features include improved adjacency matrix and key node encoding; Derived characteristics include safety margins, economic and reliability indicators.
3. The method for generating intelligent perception decisions of power systems based on case-based reasoning according to claim 1, characterized in that: The spatial feature extraction formula of the improved graph convolutional network is: in is the symmetric normalized adjacency matrix, σ is the LeakyReLU activation function, and Dropout regularization is used.
4. The method for generating intelligent perception decisions for power systems based on case-based reasoning according to claim 1, characterized in that: In the three-level progressive retrieval architecture, the coarse-grained matching layer uses cosine similarity and local sensitive hashing (LSH) for fast retrieval, with LSH parameters k=12 and L=20; the fine-grained matching layer uses a dynamic weight similarity formula Where the temporal attention weight α t Calculated through multi-head attention mechanism, adaptive temperature parameters The constraint pruning layer performs pruning based on power balance, voltage safety, and equipment capacity constraints.
5. The method for generating intelligent perception decisions for power systems based on case-based reasoning according to claim 1, characterized in that: The correction formula of the physical constraint compensation algorithm is: new =A ret +ΔA+λ·(A cons -A ret ),in A cons In order to satisfy the optimal adjustment direction of the constraints, the constrained least squares problem is solved and λ is the compensation coefficient, which is dynamically determined by the fuzzy logic system according to the voltage safety margin, thermal stability margin and frequency deviation.
6. The method for generating intelligent perception decisions for power systems based on case-based reasoning according to claim 1, characterized in that: In the incremental clustering strategy, a new case is added when the minimum similarity between the new case and all cases in the case library is less than a threshold τ. Otherwise, a weighted average update is performed on similar cases. The threshold τ is adaptively adjusted according to the size of the case library. Where N is the size of the case library.
7. The method for generating intelligent perception decisions for power systems based on case-based reasoning according to claim 1, characterized in that: The system implementation architecture includes: The data layer uses a three-tier distributed storage system consisting of Kafka, HBase, and HDFS to support the storage and management of real-time and historical data. The algorithm layer, which includes a feature engineering platform, a model training framework, and a real-time inference engine, enables feature generation, distributed training, and efficient inference; The application layer provides interface specifications and visual interaction functions with the EMS system, supporting decision-making process backtracking and dynamic adjustment.
8. An intelligent decision-making device for a power system, characterized in that: include: Case representation module, used to build a five-tuple case model and perform feature processing; A spatiotemporal feature extraction module, which is used to improve the feature extraction of the combination of graph convolutional networks and Transformers; Case retrieval module, used to perform a three-level progressive retrieval process; A case correction module to generate new decisions based on physical constraint compensation; Case library management module, used to implement incremental optimization and aging processing of the case library.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method for generating intelligent perception decisions of a power system based on case reasoning according to any one of claims 1 to 7 are implemented.
10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the method for generating intelligent perception decisions of a power system based on case reasoning according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Green construction decision-making method for railway tunnel in mountainous area based on CBR
CN120910119A