A method for screening power load characteristics based on adaptive whale optimization
By applying an adaptive whale optimization algorithm in the power load feature screening, the problem of lack of physical significance in feature extraction in the prior art is solved, and the accurate screening of power load features and the improvement of identification accuracy is achieved.
Patent Information
- Application Number
- CN202210280160.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-21
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2042-03-21
AI Technical Summary
During the feature extraction process, the existing power load identification method will process the original time-frequency domain feature signals, resulting in the extracted feature components lacking practical physical significance and making it difficult to accurately screen the power load characteristics.
The method based on the adaptive whale optimization algorithm is used to screen the joint features of the time and frequency domain of the power load, and the spatial location of whale individuals is continuously updated through the adaptive optimization algorithm to find the best set of screening features.
Accurate screening of power load characteristics is realized, redundant information of original time domain characteristics and frequency domain characteristics is reduced, the accuracy and speed of power load identification is improved, and the obtained features have practical physical significance.
Smart Images

Figure CN114662902B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and more specifically to a method for screening electric load characteristics based on adaptive whale optimization. Background Art
[0002] With the vigorous development of energy internet, the development of industrial internet and energy revolution has brought about tremendous changes in the power industry, and put forward new and higher requirements for the interaction and rebalancing of power supply and demand. In order to accurately evaluate the responsiveness of the demand side, it is necessary to first accurately identify the power load, which is an important prerequisite for understanding the power consumption and behavior of users.
[0003] At present, the power load identification method is mainly realized by the combination of time-frequency domain analysis, feature extraction and classifier, so how to select appropriate features is crucial. In the process of feature extraction, most of them use principal component analysis (PCA), factor analysis (FA) and linear discriminant analysis (LDA). However, these methods will process the original time-frequency domain feature signals when extracting features, and the extracted feature components have no actual physical meaning.
[0004] Therefore, how to provide a screening method for power load characteristics is an urgent problem that those skilled in the art need to solve. Summary of the invention
[0005] In view of this, the present invention provides a method for screening power load characteristics based on adaptive whale optimization to achieve accurate screening of power load characteristics.
[0006] In order to achieve the above object, the present invention adopts the following technical solution:
[0007] A method for screening electric load characteristics based on adaptive whale optimization, comprising:
[0008] S1: Collect the voltage, current, active power and reactive power of different types of power loads in a continuous sampling period;
[0009] S2: Extract the time domain features and frequency domain features of voltage, current, active power and reactive power respectively;
[0010] S3: Combine the time domain features and the frequency domain features to obtain the time domain and frequency domain joint features of the power load;
[0011] S4: Based on the adaptive whale optimization algorithm, the time domain and frequency domain joint features of the power load are screened to obtain the screening features of the power load.
[0012] Preferably, in S1, in the process of collecting the voltage, current, active power and reactive power of different types of power loads, the sampling frequency is set to 5 minutes / time, and the sampling period is 24 hours.
[0013] Preferably, in S2, the time domain features include: mean, root mean square value, root amplitude, absolute mean, skewness, kurtosis, variance, maximum value, minimum value, peak-to-peak value, dimensionless waveform index, dimensionless peak index, dimensionless pulse index, dimensionless margin index, dimensionless skewness index and dimensionless kurtosis index; the specific calculation formulas correspond to:
[0014]
[0015]
[0016]
[0017]
[0018]
[0019]
[0020]
[0021] Max=max{x1,x2,…,x i},i=1,2,…,N (8)
[0022] Min=min{x1,x2,…,x i},i=1,2,…,N (9)
[0023] PPV=Max-Min (10)
[0024]
[0025]
[0026]
[0027]
[0028]
[0029]
[0030] Among them, Mean represents mean, RMS represents root mean square value, SRA represents root amplitude, AM represents absolute mean, Skewness represents skewness, Kurtosis represents kurtosis, DX represents variance, Max represents maximum value, Min represents minimum value, PPV represents peak-to-peak value, WI represents dimensionless waveform index, PeakIndex represents dimensionless peak index, PulseIndex represents dimensionless pulse index, MI represents dimensionless margin index, SI represents dimensionless skewness index, KI represents dimensionless kurtosis index, x i It represents the electrical parameters collected by the original electrical signal at the i-th sampling point, and N represents the number of electrical signal samples in one cycle.
[0031] Preferably, in S2, the frequency domain features include: frequency mean, frequency standard deviation, frequency spectrum dispersion or concentration index, frequency center, frequency root mean square and main frequency band position index;
[0032] The frequency mean calculation formula is:
[0033]
[0034] The frequency standard deviation is calculated as:
[0035]
[0036] The frequency center calculation formula is:
[0037]
[0038] The calculation formula of the spectrum dispersion or concentration index is:
[0039]
[0040]
[0041]
[0042]
[0043]
[0044]
[0045]
[0046] The frequency RMS calculation formula is:
[0047]
[0048] The calculation formula of the main frequency band position index is:
[0049]
[0050]
[0051] Among them, f i is the ith frequency information, f is obtained by discrete Fourier transform (DFT) of the original time domain power signal x, N represents the number of electrical signal samples in one cycle; Ts is the sampling time interval, DCS1-DCS7 represent the first to seventh indicators of the degree of dispersion or concentration of the spectrum respectively, PCMFB1 and PCMFB2 represent the first and second indicators reflecting the position of the main frequency band.
[0052] Preferably, after extracting the time domain features and frequency domain features, the time domain features and frequency domain features of the voltage, current, active power and reactive power of each sample can be obtained, i.e., the time domain features of the voltage TimeFea_U, the frequency domain features of the voltage FreFea_U, the time domain features of the current TimeFea_I, the frequency domain features of the current FreFea_I, the time domain features of the active power TimeFea_P, the frequency domain features of the active power FreFea_P, the time domain features of the reactive power TimeFea_Q, and the frequency domain features of the reactive power FreFea_Q.
[0053] Preferably, in S3, the time domain characteristics of voltage TimeFea_U, the frequency domain characteristics of voltage FreFea_U, the time domain characteristics of current TimeFea_I, the frequency domain characteristics of current FreFea_I, the time domain characteristics of active power TimeFea_P, the frequency domain characteristics of active power FreFea_P, the time domain characteristics of reactive power TimeFea_Q, and the frequency domain characteristics of reactive power FreFea_Q are sorted and merged in sequence to obtain the time domain and frequency domain joint characteristics of the power load, which are recorded as Time&Fre_Fea.
[0054] Preferably, S4 includes:
[0055] S41: Define the fitness function:
[0056]
[0057] Among them, N correct is the number of correct predictions in the test set samples, N test is the total number of test set samples, E is the adaptability;
[0058] S42: randomly selecting a feature combination of the time domain and frequency domain joint features of the power load as the initial whale position, setting the parameters of the whale optimization algorithm, including the number of groups N, the maximum number of iterations T, the adaptive factor β, the probability p of selecting the shrinking and encircling mechanism and the spiral position update;
[0059] S43: Calculate the fitness value corresponding to each whale group individual according to formula (30) to find the best whale group individual X in the current group * , and save the result;
[0060] S44: When p < 0.5, if A < 1, the spatial position of the current whale group individual is updated according to formula (31):
[0061]
[0062] Among them, A and C are coefficient vectors, is the optimal spatial position of the current whale group individual, X t is the spatial position of the current whale group individual, and t is the number of current iterations;
[0063] A=(2a×ra)×E t ×β (32)
[0064] C=2r×E t ×β (33)
[0065] in, is a constant whose value decreases linearly from 2 to 0; r is a random vector whose value range is [0,1]; E t is the fitness function value of the current position; β is the adaptive factor, and its value range is (0,1);
[0066] If A ≥ 1, randomly select the whale group individual position X from the current group rand , and update the spatial position of the current whale group individuals according to formula (34):
[0067] X t+1 =X rand -A×|C×X rand -X t | (34)
[0068] Among them, X rand is a randomly selected position from the current whale group;
[0069] S45: When p≥0.5, the spatial position of the current whale group individual is updated according to formula (35):
[0070]
[0071] Where b is the logarithmic spiral shape constant, l is a random number between [-1,1];
[0072] S46: Calculate the classification error of the test set corresponding to each whale group individual as the fitness value, and find the best whale group individual X in the current group * , and save the result. At the same time, determine whether the termination condition is met, that is, the maximum number of iterations is reached or the fitness function is 0. If so, go to S47 to output the optimization result; otherwise, set t=t+1, update a, A, C, l and p at the same time, and repeat the above S44 to S46;
[0073] S47: Output the optimal whale group individual fitness value and spatial position X * , X * This is the best set of screening features.
[0074] Through the above technical solutions, it can be known that compared with the prior art, the present invention discloses a method for screening electric load characteristics based on adaptive whale optimization. On the basis of extracting the time domain characteristics and frequency domain characteristics of electric power data, the adaptive whale optimization algorithm is used to accurately screen the electric load characteristics, and the screening characteristics of the electric load are obtained, which reduces the redundant information of the original time domain characteristics and frequency domain characteristics, and improves the accuracy and speed of electric load identification. In addition, compared with dimensionality reduction methods such as principal component analysis, linear discriminant analysis PCA and LDA, the electric load characteristics screened by the whale optimization algorithm AWOA have practical physical significance. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] 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 or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0076] Figure 1 The accompanying drawing is a schematic flow chart of the method for screening power load characteristics based on adaptive whale optimization provided by the present invention. DETAILED DESCRIPTION
[0077] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0078] The embodiment of the present invention discloses a method for selecting power load characteristics based on adaptive whale optimization, such as Figure 1 ,include:
[0079] S1, collect the voltage Data_U, current Data_I, active power Data_P, and reactive power Data_Q of different types of power loads in a continuous sampling period;
[0080] S2, respectively extracting the time domain features and frequency domain features of voltage Data_U, current Data_I, active power Data_P, and reactive power Data_Q;
[0081] S3, merging the extracted time domain features and frequency domain features to obtain the time domain and frequency domain joint features of the power load, recorded as Time&Fre_Fea;
[0082] S4. Based on the Adaptive Whale Optimization Algorithm (AWOA), the power load joint feature Time&Fre_Fea is screened to obtain the screening feature of the power load, which is recorded as Selected_Fea.
[0083] Preferably, in step S1, when collecting the voltage, current, active power and reactive power of different types of power loads, the sampling frequency is set to 5 minutes / time and the sampling period is 24 hours, so that the dimension of the voltage, current, active power and reactive power data of each load sample obtained is 12×24=288.
[0084] Preferably, in step S2, in the process of extracting the time domain characteristics and frequency domain characteristics of voltage, current, active power and reactive power, the time domain characteristics include: mean, root mean square value, root amplitude, absolute mean value, skewness, kurtosis, variance, maximum value, minimum value, peak-to-peak value, dimensionless waveform index, dimensionless peak index, dimensionless pulse index, dimensionless margin index, dimensionless skewness index and dimensionless kurtosis index; the specific calculation formulas correspond to:
[0085]
[0086]
[0087]
[0088]
[0089]
[0090]
[0091]
[0092] Max=max{x1,x2,…,x i},i=1,2,…,N (8)
[0093] Min=min{x1,x2,…,x i},i=1,2,…,N (9)
[0094] PPV=Max-Min (10)
[0095]
[0096]
[0097]
[0098]
[0099]
[0100]
[0101] Frequency domain features include: frequency mean, frequency standard deviation, spectrum dispersion or concentration index, frequency center, frequency root mean square and main frequency band position index;
[0102] The frequency mean calculation formula is:
[0103]
[0104] The frequency standard deviation is calculated as:
[0105]
[0106] The frequency center calculation formula is:
[0107]
[0108] The calculation formula of the spectrum dispersion or concentration index is:
[0109]
[0110]
[0111]
[0112]
[0113]
[0114]
[0115]
[0116] The frequency RMS calculation formula is:
[0117]
[0118] The calculation formula of the main frequency band position index is:
[0119]
[0120]
[0121] After extracting the time domain features and frequency domain features, the time domain features and frequency domain features of the voltage, current, active power and reactive power of each sample can be obtained, namely, the time domain features of voltage TimeFea_U, the frequency domain features of voltage FreFea_U, the time domain features of current TimeFea_I, the frequency domain features of current FreFea_I, the time domain features of active power TimeFea_P, the frequency domain features of active power FreFea_P, the time domain features of reactive power TimeFea_Q, and the frequency domain features of reactive power FreFea_Q. In particular, the time domain features of electrical parameters contain 16 feature attributes, and the frequency domain features of electrical parameters contain 13 feature attributes.
[0122] Preferably, in step S3, the extracted time domain features and frequency domain features are merged in sequence, that is, the time domain features of voltage TimeFea_U, the frequency domain features of voltage FreFea_U, the time domain features of current TimeFea_I, the frequency domain features of current FreFea_I, the time domain features of active power TimeFea_P, the frequency domain features of active power FreFea_P, the time domain features of reactive power TimeFea_Q, the frequency domain features of reactive power FreFea_Q are merged in this order to obtain the time domain and frequency domain joint features of the power load, denoted as Time&Fre_Fea. Obviously, the dimension of the time domain and frequency domain joint features of the power load is (16+13)×4=116.
[0123] Preferably, in step S4, AWOA is used to perform feature screening on the joint features of the power load to obtain the screening features of the power load. The basic idea is to determine the parameters to be optimized based on the joint feature screening problem of the power load in time domain and frequency domain, that is, the joint features of the power load in time domain and frequency domain. The spatial position of each individual in the whale group contains a set of screening features. The fitness function is used to measure the quality of the individual's spatial position, and the whale foraging strategy is used to continuously update the individual position of the whale until the best whale spatial position is obtained, that is, the best set of screening features for the problem to be optimized is obtained. The following steps are included:
[0124] S41: Define the fitness function. Since AWOA is a process of solving the minimum value, the test set classification error of the power load identification model is used as the fitness function, that is, the objective function is:
[0125]
[0126] Among them, N correct is the number of correct predictions in the test set samples, N test is the total number of test set samples.
[0127] S42: AWOA parameter initialization. A feature combination is randomly selected from the joint feature data of the power load in the time domain and frequency domain as the initial whale position, and the parameters of AWOA are set, including the number of groups N, the maximum number of iterations T, the adaptive factor β, the probability p of selecting the shrinking and encircling mechanism and the spiral position update (p is a random number on [0,1], and the initial value is set by a random function).
[0128] S43: Calculate the fitness value corresponding to each whale group individual according to formula (30) to find the best whale group individual X in the current group * and save the result.
[0129] S44: When p<0.5, if A<1, the spatial position of the current whale group individual is updated according to formula (31).
[0130]
[0131] Among them, A and C are coefficient vectors, is the optimal spatial position of the current whale group individual, X t is the spatial position of the current whale group individual, and t is the number of current iterations.
[0132] In particular, the fitness function value of the current position is introduced in the calculation process of the coefficient vectors A and C to form an adaptive variable step-length shrinkage and encirclement mechanism, thereby realizing the adaptive update of the spatial position of the individual whales. The specific calculation method is as follows:
[0133] A=(2a×ra)×E t ×β (32)
[0134] C=2r×E t ×β (33)
[0135] in, is a constant whose value decreases linearly from 2 to 0; r is a random vector whose value range is [0,1]; E t is the fitness function value of the current position; β is the adaptive factor, and its value range is (0,1).
[0136] If A ≥ 1, randomly select the whale group individual position X from the current group rand , and update the spatial position of the current whale group individuals according to formula (34).
[0137] X t+1 =X rand -A×|C×X rand -X t | (34)
[0138] Among them, X rand is a randomly selected position from the current whale group.
[0139] S45: When p≥0.5, the spatial position of the current whale group individuals is updated according to formula (35).
[0140]
[0141] Where b is the logarithmic spiral shape constant, l is a random number between [-1,1];
[0142] S46: Calculate the classification error of the test set corresponding to each whale group individual as the fitness value, and find the best whale group individual X in the current group * At the same time, it is determined whether the termination condition is met, that is, the termination condition is: the maximum number of iterations is reached or the fitness function is 0. If it is met, it goes to S47 to output the optimization result; otherwise, it sets t=t+1, updates a, A, C, l and p at the same time, and repeats the above S44 to S46.
[0143] S47: Output the optimal whale group individual fitness value and spatial position X * , X * This is the best set of screening features.
[0144] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0145] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for screening power load characteristics based on adaptive whale optimization, characterized in that: include: S1: Collect the voltage, current, active power and reactive power of different types of power loads in a continuous sampling period; S2: Extract the time domain features and frequency domain features of voltage, current, active power and reactive power respectively; S3: Combine the time domain features and the frequency domain features to obtain the time domain and frequency domain joint features of the power load; S4: Based on the adaptive whale optimization algorithm, the time domain and frequency domain joint features of the power load are screened to obtain the screening features of the power load; S4 includes: S41: Define the fitness function: Among them, N correct is the number of correct predictions in the test set samples, N test is the total number of test set samples, E is the adaptability; S42: randomly selecting a feature combination of the time domain and frequency domain joint features of the power load as the initial whale position, setting the parameters of the whale optimization algorithm, including the number of groups N, the maximum number of iterations T, the adaptive factor β, the probability p of selecting the shrinking and encircling mechanism and the spiral position update; S43: Calculate the fitness value corresponding to each whale group individual according to formula (30) to find the best whale group individual X in the current group * , and save the result; S44: When p < 0.5, if A < 1, the spatial position of the current whale group individual is updated according to formula (31): Among them, A and C are coefficient vectors, is the optimal spatial position of the current whale group individual, X t is the spatial position of the current whale group individual, and t is the number of current iterations; A=(2a×r-a)×E t ×β (32) C=2r×E t ×β (33) in, is a constant whose value decreases linearly from 2 to 0; r is a random vector whose value range is [0,1]; E t is the fitness function value of the current position; β is the adaptive factor, and its value range is (0,1); If A ≥ 1, randomly select the whale group individual position X from the current group rand , and update the spatial position of the current whale group individuals according to formula (34): X t+1 =X rand -A×|C×X rand -X t | (34) Among them, X rand is a randomly selected position from the current whale group; S45: When p≥0.5, the spatial position of the current whale group individual is updated according to formula (35): Where b is the logarithmic spiral shape constant, and l is a random number between [-1,1]; S46: Calculate the classification error of the test set corresponding to each whale group individual as the fitness value, and find the best whale group individual X in the current group * , and save the result. At the same time, determine whether the termination condition is met, that is, the maximum number of iterations is reached or the fitness function is 0. If so, go to S47 to output the optimization result; otherwise, set t=t+1, update a, A, C, l and p at the same time, and repeat the above S44 to S46; S47: Output the optimal whale group individual fitness value and spatial position X * , X * This is the best set of screening features.
2. The method for screening electric load characteristics based on adaptive whale optimization according to claim 1 is characterized in that: In S1, when collecting the voltage, current, active power and reactive power of different types of power loads, the sampling frequency is set to 5 minutes / time and the sampling period is 24 hours.
3. The method for screening electric load characteristics based on adaptive whale optimization according to claim 1 is characterized in that: In S2, the time domain features include: mean, root mean square value, root amplitude, absolute mean, skewness, kurtosis, variance, maximum value, minimum value, peak-to-peak value, dimensionless waveform index, dimensionless peak index, dimensionless pulse index, dimensionless margin index, dimensionless skewness index and dimensionless kurtosis index; the specific calculation formulas correspond to: Max=max{x1,x2,…,x i },i=1,2,…,N (8) Min=min{x1,x2,…,x i },i=1,2,…,N (9) PPV=Max-Min (10) Among them, Mean represents mean, RMS represents root mean square value, SRA represents root amplitude, AM represents absolute mean, Skewness represents skewness, Kurtosis represents kurtosis, DX represents variance, Max represents maximum value, Min represents minimum value, PPV represents peak-to-peak value, WI represents dimensionless waveform index, PeakIndex represents dimensionless peak index, PulseIndex represents dimensionless pulse index, MI represents dimensionless margin index, SI represents dimensionless skewness index, KI represents dimensionless kurtosis index, x i It represents the electrical parameters collected by the original electrical signal at the i-th sampling point, and N represents the number of electrical signal samples in one cycle.
4. The method for screening electric load characteristics based on adaptive whale optimization according to claim 1 is characterized in that: In S2, the frequency domain features include: frequency mean, frequency standard deviation, spectrum dispersion or concentration index, frequency center, frequency root mean square and main frequency band position index; The frequency mean calculation formula is: The frequency standard deviation is calculated as: The frequency center calculation formula is: The calculation formula of the spectrum dispersion or concentration index is: The frequency RMS calculation formula is: The calculation formula of the main frequency band position index is: Among them, f i is the i-th frequency information, f i is the original time domain power signal x i Obtained by discrete Fourier transform, N represents the number of electrical signal samples in one cycle; Ts is the sampling time interval, DCS1-DCS7 represent the first to seventh indicators of the degree of dispersion or concentration of the spectrum, PCMFB1 and PCMFB2 represent the first and second indicators reflecting the position of the main frequency band.
5. The method for selecting power load characteristics based on adaptive whale optimization according to claim 4 is characterized in that: After extracting the time domain features and frequency domain features, the time domain features and frequency domain features of the voltage, current, active power and reactive power of each sample are obtained, including the time domain features of voltage TimeFea_U, the frequency domain features of voltage FreFea_U, the time domain features of current TimeFea_I, the frequency domain features of current FreFea_I, the time domain features of active power TimeFea_P, the frequency domain features of active power FreFea_P, the time domain features of reactive power TimeFea_Q, and the frequency domain features of reactive power FreFea_Q.
6. The method for selecting power load characteristics based on adaptive whale optimization according to claim 5, characterized in that: In S3, the time domain characteristics of voltage TimeFea_U, the frequency domain characteristics of voltage FreFea_U, the time domain characteristics of current TimeFea_I, the frequency domain characteristics of current FreFea_I, the time domain characteristics of active power TimeFea_P, the frequency domain characteristics of active power FreFea_P, the time domain characteristics of reactive power TimeFea_Q, and the frequency domain characteristics of reactive power FreFea_Q are sorted and merged in sequence to obtain the time domain and frequency domain joint characteristics of the power load, which are recorded as Time&Fre_Fea.
Citation Information
Patent Citations
Comprehensive load model parameter identification method and computer readable storage medium
CN111725804A
Rolling bearing fault diagnosis method based on multi-feature extraction and WOA-ELM
CN112613493A