A distributed power frequency detection method based on artificial neural network
Through the distributed power frequency detection method based on artificial neural network, the attention mechanism and multi-task learning framework are used to solve the problem of difficult estimation of frequency offset in distributed power frequency detection, and higher frequency detection accuracy and power supply are achieved Frequency stability.
Patent Information
- Application Number
- CN202411277090.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-09-12
AI Technical Summary
The prior art is difficult to accurately estimate the frequency offset in distributed power supply frequency detection, resulting in the inability to track the power supply frequency in real time, affecting the stability of the power supply.
Using a distributed power frequency detection method based on artificial neural network, the artificial neural network model based on attention mechanism is constructed, voltage signal characteristics are extracted, voltage feedback waveforms are generated, and the power tracking model is trained using a multi-task learning framework to achieve distributed Joint tracking and frequency regulation of power supply.
Improve frequency detection accuracy, enable more accurate estimate of the power supply frequency offset, and realize frequency stability and joint tracking control of distributed power supplies.
Smart Images

Figure CN118858754B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power supply frequency detection, and in particular to a distributed power supply frequency detection method based on artificial neural network. Background Art
[0002] Distributed power source refers to a power generation mode in which power generation equipment is distributed in different locations to form an overall power generation system. The external distributed power supply system distributes multiple small-capacity power generation modules in different parts outside the aircraft, and connects them through internal circuits to form an overall power supply system to improve energy efficiency and safety. The characteristics of external distributed power supply include power generation modules distributed in different external positions of the aircraft, such as at both ends of the wings and on both sides of the fuselage. These distributed power generation modules are connected through the aircraft's internal power grid system.
[0003] Artificial neural networks can effectively solve complex problems by simulating the structure and working mode of human brain neural networks. Artificial neural networks are composed of a large number of interconnected basic processing unit neurons. Each neuron has an activation function, which can weight and sum the input signal and generate an output signal. Artificial neural networks continuously adjust the connection weights between each neuron through learning algorithms, thereby realizing functions such as pattern recognition or classification.
[0004] By using artificial neural networks to detect the frequency of distributed power sources, the detection efficiency and accuracy can be improved by learning the physical laws of power sources. However, the existing technology has difficulty estimating the frequency offset when detecting the frequency of distributed power sources, and thus cannot accurately track the real-time frequency of the power source. Due to the lack of frequency offset information, the current frequency state of the power source cannot be accurately reflected, and it is difficult to perform targeted frequency adjustment control, thereby reducing the stability of the power source frequency. Summary of the invention
[0005] In view of the problems in the related art, the present invention proposes a distributed power supply frequency detection method based on an artificial neural network to overcome the above technical problems existing in the existing related art.
[0006] To this end, the specific technical solution adopted by the present invention is as follows:
[0007] A distributed power frequency detection method based on an artificial neural network, the distributed power frequency detection method based on an artificial neural network comprises the following steps:
[0008] S1. Using a sampling clock to synchronously collect voltage data of distributed power sources in each time period;
[0009] S2. Construct an artificial neural network model based on the attention mechanism, use multi-channel voltage data as the input of the artificial neural network model and extract voltage signal features;
[0010] S3, generating a voltage feedback waveform based on the voltage signal characteristics and performing segmented differential processing to identify the power supply frequency characteristics reflected by the voltage feedback waveform;
[0011] S4. Based on the power frequency characteristics, a multi-task learning framework is used to train the power tracking model, and then the power tracking model is deployed on the distributed power sources to achieve joint tracking of the distributed power sources;
[0012] S5. Feedback the joint tracking results to the control center to implement closed-loop control, and conduct joint frequency regulation on distributed power sources to predict the changing characteristics of power supply frequency.
[0013] Furthermore, constructing an artificial neural network model based on the attention mechanism, taking the multi-channel voltage data as the input of the artificial neural network model and extracting the voltage signal features includes the following steps:
[0014] S21, taking the collected multi-channel voltage data as voltage sequences respectively, and extracting low-frequency features from the voltage sequences using an artificial neural network;
[0015] S22, applying an embedding layer to perform feature encoding on the voltage data to obtain a voltage vector representation, and calculating the similarity between the voltage vector representations;
[0016] S23, performing hidden Markov clustering on the voltage vector representation after feature encoding, identifying the feature space structure of the voltage vector representation, and combining the similarity between the voltage vector representations as an embedding vector of the artificial neural network;
[0017] S24. Add attention mechanism to artificial neural network and cooperate with LSTM to process voltage sequence and learn the voltage change law in time dimension;
[0018] S25. According to the clustering results, a loss function is designed to optimize the artificial neural network model based on the attention mechanism, and the voltage signal characteristics of the voltage sequence in the feature space structure are extracted.
[0019] Furthermore, performing invisible Markov clustering on the voltage vector representation after feature encoding, identifying the feature space structure of the voltage vector representation, and combining the similarity between the voltage vector representations as the embedding vector of the artificial neural network includes the following steps:
[0020] S231, using the least square method to transform the voltage vector representation after feature encoding from a time series point to a line segment sequence, and establishing a hidden Markov model with the line segment sequence as a clustering object;
[0021] S232, segmenting the line segment sequence in time sequence and merging iteratively, merging two adjacent line segments with the smallest similarity error in each iteration until the similarity error is less than a preset error extreme value;
[0022] S233, clustering the line segments after time series segmentation, and merging the same clusters through a time series clustering algorithm based on temporality and similarity until a final cluster is obtained;
[0023] S234, taking the final cluster as the corresponding hidden state, and establishing a state transfer matrix based on the final cluster, introducing the non-parametric Bayesian model into the hidden Markov model, and calculating the distribution probability of the voltage vector after feature encoding in the hidden state;
[0024] S235. Utilize the Viterbi algorithm to obtain the optimal state sequence of the hidden Markov model, and use the optimal state sequence and the distribution probability as the embedding vector of the artificial neural network.
[0025] Furthermore, generating a voltage feedback waveform based on the voltage signal characteristics and performing segmented differential processing to identify the power supply frequency characteristics reflected by the voltage feedback waveform includes the following steps:
[0026] S31, based on the voltage signal characteristics and using filtering and interpolation technology to eliminate distortion and noise effects;
[0027] S32, re-adjusting the sampling waveform points based on the voltage signal characteristics, adding frequency offset labels to the sampling waveform points, jointly generating a simulated voltage feedback waveform, and performing comparative analysis of the original inversion waveform;
[0028] S33, using EMD to decompose the analog voltage feedback waveform into IMF components, and performing frequency analysis on each IMF component to estimate the frequency offset;
[0029] S34, fine-tuning the analog voltage feedback waveform according to the frequency offset estimation structure to achieve consistency between the analog voltage feedback waveform and the power supply frequency;
[0030] S35. Taking the fine-tuned voltage feedback waveform as input and its corresponding frequency offset as output, a residual module is added to the artificial neural network to learn the analog voltage feedback waveform, and the power supply frequency characteristics are inferred through feature analysis.
[0031] Furthermore, the power supply frequency characteristics include the periodic performance of the voltage signal, waveform morphology characteristics, waveform asymmetry characteristics, waveform change rate characteristics, harmonic component characteristics and waveform transient characteristics.
[0032] Furthermore, the analog voltage feedback waveform is decomposed into IMF components by using EMD, and frequency analysis is performed on each IMF component. The frequency offset estimation includes the following steps:
[0033] S331, obtaining the local extreme value of the analog voltage feedback waveform, and interpolating the maximum value and the minimum value using a spline function to obtain an upper envelope curve and a lower envelope curve of the analog voltage feedback waveform;
[0034] S332, adding the upper envelope curve and the lower envelope curve and calculating the average value to obtain a mean curve;
[0035] S333, obtaining a voltage feedback waveform signal and subtracting it from the mean curve to obtain a frequency difference signal, and respectively calculating the difference between the upper envelope curve and the lower envelope curve and the mean value;
[0036] S334, taking the ratio of the sum of squares of the average values to the sum of squares of the differences as the condition for ending the iteration, and comparing it with a preset threshold, if it is less than the preset threshold, the frequency difference signal is the desired IMF, otherwise, returning to step S333, and continuing to decompose the next group of IMF components for the remaining frequency difference signals;
[0037] S335. Perform steady-state frequency analysis on the frequency range represented by each IMF component, and estimate the frequency offset of each IMF component.
[0038] Furthermore, the expression of the mean curve is:
[0039] ;
[0040] The calculation formula of the frequency difference signal is:
[0041] ;
[0042] In the formula, express t The mean curve of the moment;
[0043] express t The upper envelope curve of the moment;
[0044] express t The lower envelope curve of the moment;
[0045] express t Voltage feedback waveform signal at the moment;
[0046] express t The frequency difference signal at time.
[0047] Further, performing steady-state frequency analysis on the frequency range represented by each IMF component and estimating the frequency offset of each IMF component includes the following steps:
[0048] S3351. Construct a steady-state frequency prediction algorithm by combining the voltage node admittance matrix elements immediately after the disturbance provided by wide-area measurement;
[0049] S3352, using a steady-state frequency prediction algorithm to perform incremental solution calculations to obtain an initial value solution;
[0050] S3353, using the Monte Carlo algorithm with the initial value solution as the center, randomly sampling within the frequency range to obtain an exact solution, and repeating step S3352 until convergence to obtain the final solution;
[0051] S3354, weighing and setting the random number generation interval of the Monte Carlo algorithm to minimize the value range of the final solution;
[0052] S3355. Calculate the steady-state frequency after the disturbance within the value range of the final solution, and estimate the frequency offset corresponding to the IMF component;
[0053] S3356. Correct the frequency offset based on the estimation result to obtain the corrected frequency value of the IMF component in the new state.
[0054] Furthermore, based on the power frequency characteristics, a power tracking model is trained using a multi-task learning framework, and then the power tracking model is deployed on distributed power sources respectively. The joint tracking of distributed power sources includes the following steps:
[0055] S41. Generate a power state representation vector space based on power frequency characteristics, and use a multi-task learning framework to simultaneously train multiple power tracking models;
[0056] S42, learning the frequency variation law of the distributed power supply by the power supply tracking model, and outputting the predicted distribution of the power supply frequency after training the power supply tracking model;
[0057] S43, distributing and deploying each power supply tracking model to a corresponding power supply node, and predicting the state distribution of each power supply node as a measurement classification center;
[0058] S44, using the Mahalanobis distance and the measurement classification center to perform rough association and fine association respectively, and judging the association results;
[0059] S45. Feedback the judgment result to the central node, and update the predicted distribution of the power supply frequency in real time to optimize the power supply tracking model.
[0060] Furthermore, using the Mahalanobis distance and the measurement classification center to respectively perform rough association and fine association, and judging the association result includes the following steps:
[0061] S441, using a tracking gate to scan the position of the distributed power source, and measuring the distance from the free point between the power source nodes to the distributed power source;
[0062] S442, determining the comprehensive correlation of each power supply node, and dividing the confidence region according to the comprehensive correlation;
[0063] S443, performing fusion estimation on the target state of the power supply node to obtain the target state prediction value and information covariance matrix at the next moment, and using the target state prediction value as the measurement classification center of the distributed power supply;
[0064] S444, calculating the Mahalanobis distance between all power supply nodes and the measurement classification center, and measuring the measurement value thereof with the target state prediction value;
[0065] S445 , using the tracking gate to perform coarse correlation and fine correlation, and comparing the measured value with a preset threshold to determine whether the measured value is a candidate valid measurement.
[0066] The beneficial effects of the present invention are:
[0067] 1. The present invention collects voltage data of distributed power sources as input of the artificial neural network model and constructs a neural network model based on the attention mechanism, which can help the model better capture the key features in the input signal and focus on certain parts of the input signal. Compared with traditional neural networks, the model based on the attention mechanism is more efficient in processing sequence input. In addition, hidden Markov clustering can identify the distribution structure of voltage vectors in the feature space, capture the intrinsic relationship between voltage features, and help extract the differences in features between different sequences.
[0068] 2. The present invention generates a voltage feedback waveform by extracting voltage signal characteristics, detects the power supply frequency in real time by identifying the periodic performance of the voltage feedback waveform, and uses the EMD method to decompose the analog voltage feedback waveform according to the characteristics of the data itself to obtain various IMF components, which can more truly reflect the waveform characteristics, and then perform frequency analysis on each IMF component separately to more accurately estimate its frequency offset. At the same time, correction is made according to the frequency offset of the IMF component to eliminate the frequency error of each component, making the frequency characteristics of the reconstruction result more accurate, thereby improving the frequency detection accuracy.
[0069] 3. The present invention defines the power supply tracking task as multiple related but different sub-tasks through a multi-task learning framework. During the multi-task learning process, the power supply tracking model will learn the general relationship between the frequency characteristics of different power supplies. After the power supply tracking joint model is trained, it will be divided and deployed to each distributed power supply node respectively. Each power supply node uses the power supply tracking model to perform frequency tracking based on the collected real-time voltage data, thereby realizing the joint tracking control and stabilization of the distributed power supply frequency. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0071] Figure 1 The present invention is a flowchart of a distributed power supply frequency detection method based on an artificial neural network according to an embodiment of the present invention. DETAILED DESCRIPTION
[0072] To further illustrate each embodiment, the present invention provides drawings, which are part of the disclosure of the present invention and are mainly used to illustrate the embodiments. They can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, ordinary technicians in this field should be able to understand other possible implementation methods and advantages of the present invention.
[0073] According to an embodiment of the present invention, a distributed power supply frequency detection method based on an artificial neural network is provided.
[0074] The present invention will now be further described with reference to the accompanying drawings and specific embodiments. Figure 1 As shown, according to the distributed power frequency detection method based on artificial neural network according to an embodiment of the present invention, the distributed power frequency detection method based on artificial neural network includes the following steps:
[0075] S1. Use the sampling clock to synchronously collect the voltage data of the distributed power supply in each time period.
[0076] It should be noted that the sampling clock is used to realize the synchronous collection of the voltage data of distributed power supplies. Specifically, in each time period, a unified sampling clock is used to synchronously collect the voltage data of each distributed power supply distributed in different positions to realize the synchronization of data in the time dimension; this can ensure that the time reference for the collection of voltage data of each distributed power supply is consistent, which is conducive to the subsequent analysis and processing of the collected data, such as extracting frequency information in the collected data; using a unified sampling clock to realize synchronous data collection can improve the accuracy of joint monitoring and control of distributed power supplies.
[0077] S2. Construct an artificial neural network model based on the attention mechanism, use multi-channel voltage data as the input of the artificial neural network model and extract voltage signal features.
[0078] The construction of an artificial neural network model based on an attention mechanism, taking multi-channel voltage data as input of the artificial neural network model and extracting voltage signal features comprises the following steps:
[0079] S21, taking the collected multi-channel voltage data as voltage sequences respectively, and extracting low-frequency features from the voltage sequences using an artificial neural network;
[0080] S22, applying an embedding layer to perform feature encoding on the voltage data to obtain a voltage vector representation, and calculating the similarity between the voltage vector representations;
[0081] S23. Perform hidden Markov clustering on the voltage vector representation after feature encoding to identify the feature space structure of the voltage vector representation, and combine the similarity between the voltage vector representations as the embedding vector of the artificial neural network.
[0082] It should be noted that the Hidden Markov Model (HMM) is a statistical model used to describe a hidden Markov process. It can be used to model the probability distribution of observation sequences, while considering the existence of implicit state transitions between observations. Clustering is an unsupervised learning method used to group samples with similar features. Therefore, the Hidden Markov Model is used to perform data clustering for unsupervised learning, that is, by establishing a Hidden Markov Model to capture the distribution structure of data in the feature space, and classify samples with similar features into the same category, so as to achieve automatic data clustering.
[0083] The step of performing invisible Markov clustering on the voltage vector representation after feature encoding, identifying the feature space structure of the voltage vector representation, and combining the similarity between the voltage vector representations as the embedding vector of the artificial neural network includes the following steps:
[0084] S231. Using the least square method, the voltage vector representation after feature encoding is converted from a time series point to a line segment sequence, and a hidden Markov model is established with the line segment sequence as a clustering object.
[0085] It should be noted that the least squares method is used to transform the voltage vector after feature encoding from the original time series point representation to the line segment sequence representation. The least squares method is a commonly used linear regression method, which can fit the changing trend of the voltage vector at different time points, thereby connecting discontinuous time series points into a continuous line segment sequence.
[0086] These line segment sequences generated by the least squares method are used as clustering objects, and a hidden Markov model is established for clustering. That is to say, the hidden Markov model does not directly cluster the original time series points, but first converts them into line segment sequence representations using the least squares method, and then establishes a hidden Markov model based on the line segment sequence to achieve the clustering task of unsupervised learning. This can better capture the distribution structure and intrinsic relationship of the voltage vector in the feature space, and is conducive to identifying different clustering patterns of the voltage sequence in the feature dimension.
[0087] S232, segmenting the line segment sequence in time sequence and merging iteratively, merging two adjacent line segments with the smallest similarity error in each iteration until the similarity error is less than a preset error extreme value.
[0088] It should be noted that the voltage vector represented by the time series point is transformed into a line segment sequence using the least squares method, and the obtained line segment sequence is segmented in time series to divide the line segment sequence into multiple line segment fragments; the line segment fragment merging operation is iteratively performed. Through the above process, line segment fragments with high similarity can be gradually merged, and finally the line segment clustering result representing the voltage change pattern is obtained. The iterative merging method can reduce the computational cost while ensuring the clustering quality.
[0089] S233, clustering the line segments after time series segmentation, and merging the same clusters through a time series clustering algorithm based on temporality and similarity until a final cluster is obtained;
[0090] S234, taking the final cluster as the corresponding hidden state, and establishing a state transfer matrix based on the final cluster, introducing the non-parametric Bayesian model into the hidden Markov model, and calculating the distribution probability of the voltage vector after feature encoding in the hidden state;
[0091] S235. Utilize the Viterbi algorithm to obtain the optimal state sequence of the hidden Markov model, and use the optimal state sequence and the distribution probability as the embedding vector of the artificial neural network.
[0092] It should be noted that the Viterbi algorithm is a dynamic programming algorithm used to solve the most likely state sequence in the hidden Markov model. It can effectively obtain the optimal state path of the hidden Markov model, and use the optimal state sequence together with the corresponding distribution probability as the neural network input. It can make full use of the state information obtained by hidden Markov clustering, which in turn helps subsequent artificial neural networks to perform better classification or prediction tasks.
[0093] S24. Add attention mechanism to artificial neural network and cooperate with LSTM to process voltage sequence and learn the voltage change law in time dimension.
[0094] It should be noted that by adding the attention mechanism to the artificial neural network and coordinating with LSTM to process the voltage sequence, the voltage variation rules in the time dimension are learned:
[0095] An LSTM network structure is constructed to process and learn sequence data, and the state sequence information features extracted by hidden Markov clustering are input into the LSTM network as the initial state.
[0096] The voltage series data is input into the LSTM network, and the LSTM will recursively process the sequence in time steps.
[0097] The attention mechanism module learns and generates the importance distribution of time steps based on the characteristics of different time steps in the sequence.
[0098] LSTM selectively focuses on and learns the features of different time steps of the sequence according to the attention distribution, and learns the voltage change law in the overall time dimension by recursively processing the entire sequence.
[0099] It should be noted that the LSTM (Long Short-Term Memory) network is a type of RNN that can learn long-term dependencies. Adding an attention mechanism allows the network to learn the importance of different time steps in the sequence and selectively focus on key time steps in the sequence, thereby better extracting sequence features.
[0100] As a recursive neural network, the LSTM network has the advantage that memory cells can learn and capture the time dependencies in sequences, and is suitable for processing and learning time series data such as voltage sequences.
[0101] The state information features extracted by hidden Markov clustering are integrated, the LSTM network learns the time variation law, and the attention mechanism emphasizes the key time steps, which can achieve a more in-depth and comprehensive learning and representation of the voltage sequence, which is beneficial to subsequent tasks such as classification prediction.
[0102] S25. According to the clustering results, a loss function is designed to optimize the artificial neural network model based on the attention mechanism, and the voltage signal characteristics of the voltage sequence in the feature space structure are extracted.
[0103] S3. Generate a voltage feedback waveform based on the voltage signal characteristics and perform segmented differential processing to identify the power supply frequency characteristics reflected by the voltage feedback waveform.
[0104] The step of generating a voltage feedback waveform based on the voltage signal characteristics and performing segmented differential processing to identify the power supply frequency characteristics reflected by the voltage feedback waveform includes the following steps:
[0105] S31. Eliminate distortion and noise effects based on voltage signal characteristics and using filtering and interpolation techniques.
[0106] It should be noted that the elimination of distortion and noise effects based on voltage signal characteristics and using filtering and interpolation technology includes:
[0107] According to the characteristics of the voltage signal, effective features such as voltage amplitude, frequency component, etc. are extracted, and the extracted characteristic signals are digitally filtered, such as low-pass filtering to remove high-frequency noise.
[0108] Interpolation processing is performed on the filtered characteristic signal, such as linear interpolation to fill in the missing data within the sampling interval.
[0109] The distortion and noise effects in the process of voltage signal acquisition and transmission are eliminated through filtering and interpolation techniques.
[0110] The clearer feature signals after filtering and interpolation are used for subsequent analysis and processing, such as feature extraction, classification and recognition, etc.
[0111] It should be noted that eliminating distortion and noise based on voltage signal characteristics and using filtering and interpolation techniques can effectively filter out noise and repair data loss, which helps to extract effective information and patterns of voltage signals and improve the accuracy of subsequent analysis. This method removes interference while retaining signal characteristics and is an effective way to optimize signal quality using signal processing technology.
[0112] S32, re-adjusting the sampling waveform points based on the voltage signal characteristics, adding frequency offset labels to the sampling waveform points, jointly generating a simulated voltage feedback waveform, and performing comparative analysis of the original inversion waveform;
[0113] S33. Decompose the analog voltage feedback waveform into IMF components using EMD, perform frequency analysis on each IMF component, and estimate the frequency offset.
[0114] It should be noted that the analog voltage feedback waveform is decomposed into a series of IMF (Intrinsic Mode Functions) components using EMD (Empirical Mode Decomposition), and then each IMF component is subjected to frequency analysis to estimate its frequency offset. EMD is an adaptive data decomposition method that can decompose non-stationary signals into several IMF components based on the characteristics of the data itself. Each IMF represents a main frequency component in the original signal. Its main steps include:
[0115] The analog voltage feedback waveform is taken as input and decomposed into multiple IMF components using the EMD algorithm.
[0116] Perform frequency analysis on each IMF component, such as fast Fourier transform (FFT) to obtain the main frequency information, and estimate the offset of its actual frequency compared with the theoretical main frequency of the IMF.
[0117] The frequency deviation patterns of each IMF component are analyzed to obtain the characteristic information of the frequency drift of the voltage feedback waveform.
[0118] It should be noted that using EMD to adaptively decompose the waveform, accurately extract each frequency component, and then accurately estimate its frequency offset, which helps to deeply study the frequency drift law of the voltage feedback waveform and provide a basis for subsequent compensation.
[0119] The method of decomposing the analog voltage feedback waveform into IMF components by using EMD, and performing frequency analysis on each IMF component to estimate the frequency offset comprises the following steps:
[0120] S331, obtaining the local extreme value of the analog voltage feedback waveform, and interpolating the maximum value and the minimum value using a spline function to obtain an upper envelope curve and a lower envelope curve of the analog voltage feedback waveform;
[0121] S332, adding the upper envelope curve and the lower envelope curve and calculating the average value to obtain a mean curve;
[0122] S333, obtaining a voltage feedback waveform signal and subtracting it from the mean curve to obtain a frequency difference signal, and respectively calculating the difference between the upper envelope curve and the lower envelope curve and the mean value;
[0123] S334, taking the ratio of the sum of squares of the average values to the sum of squares of the differences as the condition for ending the iteration, and comparing it with a preset threshold, if it is less than the preset threshold, the frequency difference signal is the desired IMF, otherwise, returning to step S333, and continuing to decompose the next group of IMF components for the remaining frequency difference signals;
[0124] S335. Perform steady-state frequency analysis on the frequency range represented by each IMF component, and estimate the frequency offset of each IMF component.
[0125] The expression of the mean curve is:
[0126] ;
[0127] The calculation formula of the frequency difference signal is:
[0128] ;
[0129] In the formula, express t The mean curve of the moment;
[0130] express t The upper envelope curve of the moment;
[0131] express t The lower envelope curve of the moment;
[0132] express t Voltage feedback waveform signal at the moment;
[0133] express t The frequency difference signal at time.
[0134] The step of performing steady-state frequency analysis on the frequency range represented by each IMF component and estimating the frequency offset of each IMF component comprises the following steps:
[0135] S3351. Construct a steady-state frequency prediction algorithm by combining the voltage node admittance matrix elements immediately after the disturbance provided by wide-area measurements.
[0136] It should be noted that the instantaneous voltage value of each node of the power supply after the disturbance occurs is obtained through the wide-area measurement system, and the electrical admittance matrix elements between the nodes in the power grid are constructed; the electrical admittance matrix reflects the relationship between the electric power flow between the nodes, and contains information such as the power supply topology and line parameters. The admittance matrix elements are used as input, combined with the steady-state frequency prediction algorithm, to predict the future frequency changes of the power supply; the prediction algorithm uses the instantaneous node voltage information after the disturbance provided by the wide-area measurement, extracts the power grid structure characteristics through the admittance matrix, and realizes steady-state frequency prediction. The prediction result provides a decision-making reference for power grid control, which helps to take compensation measures in advance and ensure the power supply frequency quality; overall, the wide-area measurement combines the wide-area measurement and power supply topology information well, describes the dynamic characteristics of the power grid through the admittance matrix, and realizes steady-state frequency prediction based on the real-time state of the power grid.
[0137] S3352, using a steady-state frequency prediction algorithm to perform incremental solution calculations to obtain an initial value solution;
[0138] S3353, using the Monte Carlo algorithm with the initial value solution as the center, randomly sampling within the frequency range to obtain an exact solution, and repeating step S3352 until convergence to obtain the final solution;
[0139] S3354. Balance the setting of the random number generation interval of the Monte Carlo algorithm to minimize the value range of the final solution.
[0140] It should be noted that the Monte Carlo algorithm is an algorithm that solves problems through random sampling simulation experiments. The main features of the Monte Carlo algorithm include: using a large number of random sampling to approximate the problem rather than solving the exact solution; it is suitable for complex problems, such as multidimensional integrals, optimization problems, and other problems that are difficult to solve using deterministic methods; the algorithm convergence speed increases with the increase in the number of samples; the probability of converging to the correct answer increases with the increase in the number of samples.
[0141] S3355. Calculate the steady-state frequency after the disturbance within the value range of the final solution, and estimate the frequency offset corresponding to the IMF component;
[0142] S3356. Correct the frequency offset based on the estimation result to obtain the corrected frequency value of the IMF component in the new state.
[0143] S34, fine-tuning the analog voltage feedback waveform according to the frequency offset estimation structure to achieve consistency between the analog voltage feedback waveform and the power supply frequency;
[0144] S35. Taking the fine-tuned voltage feedback waveform as input and its corresponding frequency offset as output, a residual module is added to the artificial neural network to learn the analog voltage feedback waveform, and the power supply frequency characteristics are inferred through feature analysis.
[0145] It should be noted that the voltage feedback waveform that has been fine-tuned after EMD decomposition and frequency analysis is used as input, and the corresponding frequency offset of each IMF component is used as output; a residual module is added to the artificial neural network model, and the input-output pair is used as a training sample, and the neural network is used to learn the mapping relationship between the voltage feedback waveform and the frequency offset; through learning, the network can fit and predict the frequency characteristics corresponding to the voltage feedback waveform, and at the same time, using the features learned by the network, the frequency characteristics of the power supply equipment that generates the waveform are inferred through feature analysis. The residual module can effectively improve the network's ability to fit complex functions, thereby making full use of the time-frequency features extracted by EMD decomposition. Modeling using deep learning technology can effectively learn and predict the voltage waveform frequency information, and further analyze the power supply frequency characteristics.
[0146] The power supply frequency characteristics include the periodic performance of the voltage signal, waveform morphology characteristics, waveform asymmetry characteristics, waveform change rate characteristics, harmonic component characteristics and waveform transient characteristics.
[0147] S4. Based on the power frequency characteristics, the power tracking model is trained using a multi-task learning framework, and then the power tracking model is deployed on distributed power sources to achieve joint tracking of distributed power sources.
[0148] The method of training a power tracking model based on power frequency characteristics using a multi-task learning framework and then deploying the power tracking model on distributed power sources to achieve joint tracking of distributed power sources includes the following steps:
[0149] S41. Generate a power state representation vector space based on the power frequency characteristics, and use a multi-task learning framework to simultaneously train multiple power tracking models.
[0150] It should be noted that generating a power state representation vector space based on power frequency characteristics and simultaneously training multiple power tracking models using a multi-task learning framework include:
[0151] Voltage signals are collected from different power supplies, and the frequency characteristic feature vectors of each power supply are obtained using the above analysis method.
[0152] An independent state vector space is established for each power supply, and the vector dimension is the frequency characteristic vector dimension. The frequency characteristic vector of each power supply is used as a basis vector in its state vector space to form a complete state vector space.
[0153] Construct multiple power tracking models. The input of each model is a voltage signal, and the output is the corresponding power state vector. Use a multi-task learning framework to train all tracking models simultaneously and share some model parameters.
[0154] Train part of the training data set and monitor the performance of each model on the validation set; update the shared parameters and specific parameters of each model based on error back propagation. After training, each tracking model can simultaneously predict the state vectors of different power sources in the power grid, and the prediction results provide support for power frequency control and optimization.
[0155] S42, learning the frequency variation law of the distributed power supply by the power supply tracking model, and outputting the predicted distribution of the power supply frequency after training the power supply tracking model;
[0156] S43, distributing and deploying each power supply tracking model to a corresponding power supply node, and predicting the state distribution of each power supply node as a measurement classification center;
[0157] S44. Use Mahalanobis distance and measurement classification center to perform rough association and fine association respectively, and judge the association results.
[0158] It should be noted that the Mahalanobis distance is a metric used to measure the distance between a sample and the center point of a cluster. It takes into account the correlation between features. When the correlation between features is strong, the Mahalanobis distance will be smaller than the corresponding Euclidean distance value. It can well describe the distance relationship between the sample point and the center of the cluster.
[0159] The method of using the Mahalanobis distance and the measurement classification center to respectively perform rough association and fine association, and judging the association result comprises the following steps:
[0160] S441, using a tracking gate to scan the position of the distributed power source, and measuring the distance from the free point between the power source nodes to the distributed power source;
[0161] S442, determining the comprehensive correlation of each power supply node, and dividing the confidence region according to the comprehensive correlation;
[0162] S443, performing fusion estimation on the target state of the power supply node to obtain the target state prediction value and information covariance matrix at the next moment, and using the target state prediction value as the measurement classification center of the distributed power supply;
[0163] S444, calculating the Mahalanobis distance between all power supply nodes and the measurement classification center, and measuring the measurement value thereof with the target state prediction value;
[0164] S445 , using the tracking gate to perform coarse correlation and fine correlation, and comparing the measured value with a preset threshold to determine whether the measured value is a candidate valid measurement.
[0165] It should be noted that the rough correlation and fine correlation are performed using the tracking gate, and the measurement value is compared with the preset threshold to determine whether the measurement value is a candidate valid measurement, including:
[0166] Set a coarse correlation tracking gate: Set a loose tracking threshold range based on the statistical distribution of previous measurement values.
[0167] Perform coarse correlation on the newly collected measurement values: If the measurement value falls within the coarse correlation tracking gate, proceed to the next step of fine correlation.
[0168] Set precise tracking gate: Set a tighter tracking threshold range based on the statistical distribution of previous valid measurements.
[0169] Perform fine correlation on the measured values that pass the coarse correlation: if the measured value falls within the fine correlation tracking gate, proceed to the next step of judgment.
[0170] Set the effective measurement judgment threshold: Set a threshold based on factors such as measurement noise, and compare the measurement value that passes the precise correlation with the judgment threshold.
[0171] If the measured value is greater than the judgment threshold, it is determined to be a candidate valid measured value. If the measured value is less than or equal to the judgment threshold, it is determined to be an invalid measured value and the candidate valid measured value is subsequently processed.
[0172] S45. Feedback the judgment result to the central node, and update the predicted distribution of the power supply frequency in real time to optimize the power supply tracking model.
[0173] S5. Feedback the joint tracking results to the control center to implement closed-loop control, and conduct joint frequency regulation on distributed power sources to predict the changing characteristics of power supply frequency.
[0174] It should be noted that by feeding back the joint tracking results to the control center to achieve closed-loop control, and conducting joint frequency regulation on distributed power sources, and predicting the changing characteristics of power frequency, the control accuracy and stability of the power grid frequency can be improved, and the coordination of power dispatch can be improved. The control center can scientifically arrange the load sharing of each power source according to the status of the entire network, predict and prevent possible abnormal fluctuations in power frequency in advance, and effectively utilize the frequency regulation potential of each power source through collaborative control to reduce the overall frequency regulation cost.
[0175] In summary, with the help of the above-mentioned technical scheme of the present invention, the present invention collects the voltage data of the distributed power supply as the input of the artificial neural network model, and constructs a neural network model based on the attention mechanism, which can help the model better capture the key features in the input signal and focus on certain parts of the input signal. Compared with the traditional neural network, the model based on the attention mechanism is more efficient in processing sequence input. In addition, the distribution structure of the voltage vector in the feature space can be identified through hidden Markov clustering, and the intrinsic relationship between the voltage features can be captured, which is helpful to extract the difference in features between different sequences; the present invention generates a voltage feedback waveform by extracting the voltage signal features, and detects the power supply frequency in real time by identifying the periodic performance of the voltage feedback waveform, and uses the EMD method to decompose the analog voltage feedback waveform according to the characteristics of the data itself. , obtaining each IMF component can more truly reflect the waveform characteristics, and then performing frequency analysis on each IMF component separately can more accurately estimate its frequency offset. At the same time, correction is performed according to the frequency offset of the IMF component, which can eliminate the frequency error of each component and make the frequency characteristics of the reconstruction result more accurate, thereby improving the frequency detection accuracy; the present invention defines the power supply tracking task as a plurality of related but different subtasks through a multi-task learning framework. During the multi-task learning process, the power supply tracking model will learn the general relationship between the frequency characteristics of different power supplies. After the power supply tracking joint model is trained, it will be divided and deployed to each distributed power supply node respectively. Each power supply node uses the power supply tracking model to perform frequency tracking according to the collected real-time voltage data, so as to realize the joint tracking control and stabilization of the distributed power supply frequency.
[0176] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A distributed power frequency detection method based on artificial neural network, It is characterized in that The distributed power frequency detection method based on artificial neural network includes the following steps: S1. Using a sampling clock to synchronously collect voltage data of distributed power sources in each time period; S2. Construct an artificial neural network model based on the attention mechanism, use multi-channel voltage data as the input of the artificial neural network model and extract voltage signal features; S3, generating a voltage feedback waveform based on the voltage signal characteristics and performing segmented differential processing to identify the power supply frequency characteristics reflected by the voltage feedback waveform; S4. Based on the power frequency characteristics, a multi-task learning framework is used to train the power tracking model, and then the power tracking model is deployed on the distributed power sources to achieve joint tracking of the distributed power sources; S5. Feedback the joint tracking results to the control center to implement closed-loop control, and conduct joint frequency regulation on distributed power sources to predict the changing characteristics of power supply frequency.
2. According to claim 1, a distributed power supply frequency detection method based on artificial neural network, It is characterized in that The construction of an artificial neural network model based on the attention mechanism, taking multiple voltage data as input of the artificial neural network model and extracting voltage signal features comprises the following steps: S21, taking the collected multi-channel voltage data as voltage sequences respectively, and extracting low-frequency features from the voltage sequences using an artificial neural network; S22, applying an embedding layer to perform feature encoding on the voltage data to obtain a voltage vector representation, and calculating the similarity between the voltage vector representations; S23, performing hidden Markov clustering on the voltage vector representation after feature encoding, identifying the feature space structure of the voltage vector representation, and combining the similarity between the voltage vector representations as an embedding vector of the artificial neural network; S24. Add attention mechanism to artificial neural network and cooperate with LSTM to process voltage sequence and learn the voltage change law in time dimension; S25. According to the clustering results, a loss function is designed to optimize the artificial neural network model based on the attention mechanism, and the voltage signal characteristics of the voltage sequence in the feature space structure are extracted.
3. According to claim 2, a distributed power frequency detection method based on artificial neural network, It is characterized in that The method of performing invisible Markov clustering on the voltage vector representation after feature encoding, identifying the feature space structure of the voltage vector representation, and combining the similarity between the voltage vector representations as the embedding vector of the artificial neural network includes the following steps: S231, using the least square method to transform the voltage vector representation after feature encoding from a time series point to a line segment sequence, and establishing a hidden Markov model with the line segment sequence as a clustering object; S232, segmenting the line segment sequence in time sequence and merging iteratively, merging two adjacent line segments with the smallest similarity error in each iteration until the similarity error is less than a preset error extreme value; S233, clustering the line segments after time series segmentation, and merging the same clusters through a time series clustering algorithm based on temporality and similarity until a final cluster is obtained; S234, taking the final cluster as the corresponding hidden state, and establishing a state transfer matrix based on the final cluster, introducing the non-parametric Bayesian model into the hidden Markov model, and calculating the distribution probability of the voltage vector after feature encoding in the hidden state; S235. Utilize the Viterbi algorithm to obtain the optimal state sequence of the hidden Markov model, and use the optimal state sequence and the distribution probability as the embedding vector of the artificial neural network.
4. According to claim 3, a distributed power frequency detection method based on artificial neural network, It is characterized in that The step of generating a voltage feedback waveform based on the voltage signal characteristics and performing segmented differential processing to identify the power supply frequency characteristics reflected by the voltage feedback waveform comprises the following steps: S31, based on the voltage signal characteristics and using filtering and interpolation technology to eliminate distortion and noise effects; S32, re-adjusting the sampling waveform points based on the voltage signal characteristics, adding frequency offset labels to the sampling waveform points, jointly generating a simulated voltage feedback waveform, and performing comparative analysis of the original inversion waveform; S33, using EMD to decompose the analog voltage feedback waveform into IMF components, and performing frequency analysis on each IMF component to estimate the frequency offset; S34, fine-tuning the analog voltage feedback waveform according to the frequency offset estimation structure to achieve consistency between the analog voltage feedback waveform and the power supply frequency; S35. Taking the fine-tuned voltage feedback waveform as input and its corresponding frequency offset as output, a residual module is added to the artificial neural network to learn the analog voltage feedback waveform, and the power supply frequency characteristics are inferred through feature analysis.
5. According to claim 4, a distributed power supply frequency detection method based on artificial neural network, It is characterized in that The power supply frequency characteristics include the periodic performance of the voltage signal, waveform shape characteristics, waveform asymmetry characteristics, waveform change rate characteristics, harmonic component characteristics and waveform transient characteristics.
6. A distributed power frequency detection method based on artificial neural network according to claim 5, It is characterized in that The method of using EMD to decompose the analog voltage feedback waveform into IMF components, and performing frequency analysis on each IMF component to estimate the frequency offset includes the following steps: S331, obtaining the local extreme value of the analog voltage feedback waveform, and interpolating the maximum value and the minimum value using a spline function to obtain an upper envelope curve and a lower envelope curve of the analog voltage feedback waveform; S332, adding the upper envelope curve and the lower envelope curve and calculating the average value to obtain a mean curve; S333, obtaining a voltage feedback waveform signal and subtracting it from the mean curve to obtain a frequency difference signal, and respectively calculating the difference between the upper envelope curve and the lower envelope curve and the mean value; S334, taking the ratio of the sum of squares of the average values to the sum of squares of the differences as the condition for ending the iteration, and comparing it with a preset threshold, if it is less than the preset threshold, the frequency difference signal is the desired IMF, otherwise, returning to step S333, and continuing to decompose the next group of IMF components for the remaining frequency difference signals; S335. Perform steady-state frequency analysis on the frequency range represented by each IMF component, and estimate the frequency offset of each IMF component.
7. A distributed power frequency detection method based on artificial neural network according to claim 6, It is characterized in that The expression of the mean curve is: ; The calculation formula of the frequency difference signal is: ; In the formula, express t The mean curve of the moment; express t The upper envelope curve of the moment; express t The lower envelope curve of the moment; express t Voltage feedback waveform signal at the moment; express t The frequency difference signal at time.
8. A distributed power frequency detection method based on artificial neural network according to claim 7, It is characterized in that The step of performing steady-state frequency analysis on the frequency range represented by each IMF component and estimating the frequency offset of each IMF component comprises the following steps: S3351. Construct a steady-state frequency prediction algorithm by combining the voltage node admittance matrix elements immediately after the disturbance provided by wide-area measurement; S3352, using a steady-state frequency prediction algorithm to perform incremental solution calculations to obtain an initial value solution; S3353, using the Monte Carlo algorithm with the initial value solution as the center, randomly sampling within the frequency range to obtain an exact solution, and repeating step S3352 until convergence to obtain the final solution; S3354, weighing and setting the random number generation interval of the Monte Carlo algorithm to minimize the value range of the final solution; S3355. Calculate the steady-state frequency after the disturbance within the value range of the final solution, and estimate the frequency offset corresponding to the IMF component; S3356. Correct the frequency offset based on the estimation result to obtain the corrected frequency value of the IMF component in the new state.
9. A distributed power frequency detection method based on artificial neural network according to claim 8, It is characterized in that The method of training a power tracking model using a multi-task learning framework based on power frequency characteristics, and then deploying the power tracking model on distributed power sources respectively to realize joint tracking of distributed power sources includes the following steps: S41. Generate a power state representation vector space based on power frequency characteristics, and use a multi-task learning framework to simultaneously train multiple power tracking models; S42, learning the frequency variation law of the distributed power supply by the power supply tracking model, and outputting the predicted distribution of the power supply frequency after training the power supply tracking model; S43, distributing and deploying each power supply tracking model to a corresponding power supply node, and predicting the state distribution of each power supply node as a measurement classification center; S44, using the Mahalanobis distance and the measurement classification center to perform rough association and fine association respectively, and judging the association results; S45. Feedback the judgment result to the central node, and update the predicted distribution of the power supply frequency in real time to optimize the power supply tracking model.
10. A distributed power frequency detection method based on artificial neural network according to claim 9, It is characterized in that The method of using the Mahalanobis distance and the measurement classification center to respectively perform rough association and fine association and judging the association result comprises the following steps: S441, using a tracking gate to scan the position of the distributed power source, and measuring the distance from the free point between the power source nodes to the distributed power source; S442, determining the comprehensive correlation of each power supply node, and dividing the confidence region according to the comprehensive correlation; S443, performing fusion estimation on the target state of the power supply node to obtain the target state prediction value and information covariance matrix at the next moment, and using the target state prediction value as the measurement classification center of the distributed power supply; S444, calculating the Mahalanobis distance between all power supply nodes and the measurement classification center, and measuring the measurement value thereof with the target state prediction value; S445 , using the tracking gate to perform coarse correlation and fine correlation, and comparing the measured value with a preset threshold to determine whether the measured value is a candidate valid measurement.
