CN116031894B - Control method of active filter - Google Patents

Control method of active filter Download PDF

Info

Publication number
CN116031894B
CN116031894B CN202310319409.9A CN202310319409A CN116031894B CN 116031894 B CN116031894 B CN 116031894B CN 202310319409 A CN202310319409 A CN 202310319409A CN 116031894 B CN116031894 B CN 116031894B
Authority
CN
China
Prior art keywords
network
fundamental wave
signal
loss
harmonic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310319409.9A
Other languages
Chinese (zh)
Other versions
CN116031894A (en
Inventor
许跃宏
王颢雄
蔡志勇
胡石明
杨文�
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Daquan Energy Technology Co ltd
Original Assignee
Wuhan New Energy Institute Of Access Equipment & Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan New Energy Institute Of Access Equipment & Technology Co ltd filed Critical Wuhan New Energy Institute Of Access Equipment & Technology Co ltd
Priority to CN202310319409.9A priority Critical patent/CN116031894B/en
Publication of CN116031894A publication Critical patent/CN116031894A/en
Application granted granted Critical
Publication of CN116031894B publication Critical patent/CN116031894B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E40/00Technologies for an efficient electrical power generation, transmission or distribution
    • Y02E40/20Active power filtering [APF]

Landscapes

  • Supply And Distribution Of Alternating Current (AREA)

Abstract

The invention relates to a control method of an active filter, which comprises the following steps: acquiring an original signal in a power supply line; inputting the original signal into a network model of the active filter to output a voltage or current signal with harmonic interference filtered, wherein the network model of the active filter comprises a fundamental wave generation network in a generation countermeasure network; the network model of the active filter is obtained through training by the following method: acquiring a training data set, wherein the training data set comprises harmonic sample signals and corresponding fundamental wave signals; training the generated countermeasure network according to the training data set, and taking a fundamental wave generating network in the trained generated countermeasure network as a network model of the active filter. According to the scheme of the invention, the filtering effect of the existing active filter on harmonic components is effectively improved, and the harmonic hazard is reduced.

Description

Control method of active filter
Technical Field
The present invention relates generally to the field of active filter technology. More particularly, the present invention relates to a control method of an active filter.
Background
With the wide application of power electronic equipment, nonlinear loads in a power system are continuously increased, and harmonic pollution in a power grid is also increasingly serious. The harmonic wave can cause serious harm to the safety of the power system, and is mainly characterized in that the additional harmonic wave loss in the power system is increased, the normal operation of various electrical equipment is influenced, the relay protection and the misoperation of an automatic device are caused, the obvious interference to a nearby communication system is caused, and the like.
Active power filters have received extensive attention and attention as the most effective means of harmonic remediation. However, as the requirements of society on electric energy quality are higher and higher, the national harmonic restrictions on the power grid are also more and more strict, and conventional hysteresis control, PID control and other methods are difficult to meet the requirements, so that the application of an intelligent control method to an active filter has become a current research hotspot.
In Chinese patent publication No. CN113991674B entitled "three-phase active Filter for railway Power distribution System and non-quantitative hysteresis control method", an effect of harmonic filtering by current hysteresis control technique is disclosed. Specifically, by acquiring error current between load end current and reference current in each working period and determining hysteresis loop width adjustment quantity and switching frequency of corresponding time according to the error current, current tracking compensation is realized. However, in this way, the accuracy of current tracking is closely related to the magnitude of the hysteresis width, no accurate method is available at present to determine the hysteresis width, and meanwhile, the working frequency of the switching device is not fixed, and the influence of the adjustment is large, so that the current tracking effect is poor, and the filtering effect of current harmonic waves is poor.
Based on the method, how to improve the filtering effect of the existing active filter on harmonic components so as to reduce harmonic hazard has an important effect on improving the electric energy quality.
Disclosure of Invention
In order to solve one or more of the above technical problems, the invention proposes to filter harmonic components of an original signal in a power supply line by training a generation countermeasure network and utilizing a fundamental wave generation network therein, thereby effectively improving the quality of an electric energy signal in a power grid.
To this end, the present invention provides a control method of an active filter, comprising: acquiring an original signal in a power supply line; inputting the original signal into a network model of the active filter to output a voltage or current signal with harmonic interference filtered, wherein the network model of the active filter comprises a fundamental wave generation network in a generation countermeasure network; the network model of the active filter is obtained through training by the following method: acquiring a training data set, wherein the training data set comprises harmonic sample signals and corresponding fundamental wave signals; training the generated countermeasure network according to the training data set, and taking a fundamental wave generation network in the trained generated countermeasure network as a network model of the active filter; a loss function for the generating training against the network is determined based at least on a first loss function and a second loss function, the first loss function comprising:
Figure SMS_1
in the formula ,
Figure SMS_2
generating a loss function of a discrimination network in the reactance network, < ->
Figure SMS_3
and />
Figure SMS_4
The energy value of the fundamental wave in the spectrogram of the input ith harmonic sample signal and the energy value of the fundamental wave in the fundamental wave spectrogram corresponding to the spectrogram of the ith harmonic sample signal are respectively obtained; />
Figure SMS_5
N represents the number of all harmonic frequencies in the spectrogram of the ith harmonic sample signal, which is the energy corresponding to the jth frequency in the spectrogram of the ith harmonic sample signal,/th harmonic sample signal>
Figure SMS_6
Representing the sum of the energy of all harmonic frequencies in the spectrogram of the ith harmonic sample signal;
the second loss function includes:
Figure SMS_7
in the formula ,
Figure SMS_8
generating a loss function of the network for generating the fundamental wave in the countermeasure network,>
Figure SMS_9
is the mean square error between the spectrogram of the ith harmonic sample signal and the corresponding fundamental spectrogram.
In one embodiment, wherein the generating the countermeasure network further comprises discriminating a network, the training the generating the countermeasure network according to the training dataset comprises: inputting the harmonic wave sample signals into a fundamental wave generation network in the generation countermeasure network to obtain sample fundamental wave signals; inputting the sample fundamental wave signal into a discrimination network in the generation countermeasure network to obtain a first filtering result, and inputting a fundamental wave signal corresponding to the harmonic wave sample signal into the discrimination network to obtain a second filtering result; determining a generated countermeasure network loss from a sample fundamental wave signal, a fundamental wave signal corresponding to the sample fundamental wave signal, a first filtering result, and a second filtering result, and determining whether to adjust the generated countermeasure network based on the generated countermeasure network loss.
In one embodiment, the training the generated countermeasure network according to the training dataset includes: performing first-stage training on the generated countermeasure network model according to the harmonic sample signals and the corresponding fundamental wave signals in the training data set to obtain a first generated countermeasure network; the spectrogram output by the first generation reactance network in the training process is used as a harmonic sample signal in the second-stage training; and performing second-stage training on the generated countermeasure network according to the harmonic sample signal and the corresponding fundamental wave signal during the second-stage training so as to obtain a trained generated countermeasure network.
In one embodiment, wherein upon a first stage of training, the determining of the generated countermeasure network loss based on the sample fundamental signal, the fundamental signal corresponding to the sample fundamental signal, the first filtering result, and the second filtering result, and the determining of whether to adjust the generated countermeasure network based on the generated countermeasure network loss comprises: calculating first loss according to a first loss function of the discrimination network, and judging whether the first loss is smaller than a first target value or not; and adjusting the network parameters of the discrimination network and retraining in response to the first loss being greater than a first target value.
In one embodiment, the determining of the generation of the countermeasure network loss based on the sample fundamental signal, the fundamental signal corresponding to the sample fundamental signal, the first filtering result, and the second filtering result, and the determining of whether to adjust the generation of the countermeasure network based on the generation of the countermeasure network loss further includes: calculating second loss according to a second loss function of the fundamental wave generation network, and judging whether the second loss is smaller than a second target value or not; and in response to the second loss being greater than a second target value, adjusting network parameters of the fundamental wave generation network and retraining.
In one embodiment, wherein upon a second level of training, the determining of the generated countermeasure network loss based on the sample fundamental signal, the fundamental signal corresponding to the sample fundamental signal, the first filtering result, and the second filtering result, and the determining of whether to adjust the generated countermeasure network based on the generated countermeasure network loss comprises: calculating third loss according to a third loss function of the discrimination network, and judging whether the third loss is smaller than a third target value or not; and in response to the third loss being greater than a third target value, adjusting the network parameters of the discrimination network and retraining.
In one embodiment, the determining of the generation of the countermeasure network loss based on the sample fundamental signal, the fundamental signal corresponding to the sample fundamental signal, the first filtering result, and the second filtering result, and the determining of whether to adjust the generation of the countermeasure network based on the generation of the countermeasure network loss further includes: calculating a fourth loss according to a fourth loss function of the fundamental wave generation network, and judging whether the fourth loss is smaller than a fourth target value; and in response to the fourth loss being greater than a fourth target value, adjusting network parameters of the fundamental wave generation network and retraining.
In one embodiment, the third loss function includes:
Figure SMS_10
wherein ,
Figure SMS_11
for the second training, the loss function of the discrimination network, < >>
Figure SMS_12
And generating a mean square error between a kth spectrogram generated by the network for fundamental wave generation which has completed the first-stage training and a corresponding fundamental wave spectrogram.
In one embodiment, the fourth loss function includes
Figure SMS_13
wherein ,
Figure SMS_14
for the loss function of the fundamental wave generating network during the second-stage training, u is the ith harmonic wave in the kth spectrogram generated by the fundamental wave generating network after the first-stage training is completed, and r is the harmonic wave removing in the kth spectrogram generated by the fundamental wave generating network after the first-stage training is completed>
Figure SMS_15
Total number of other harmonics than +.>
Figure SMS_16
Gaussian weights corresponding to the u th harmonic in the k th spectrogram generated by the fundamental wave generation network after the first stage training is completed>
Figure SMS_17
The energy of the u-th harmonic in the k-th spectrogram generated for the fundamental wave generating network that has completed the first stage training.
In one embodiment, before inputting the original signal into the network model of the active filter, further comprising: and carrying out frequency domain transformation on the original signal to obtain a spectrogram corresponding to the original signal.
According to the scheme of the invention, the harmonic interference in the original signal of the power grid can be filtered through the network model of the active filter, so that a voltage or current signal with higher quality can be obtained. Furthermore, the fundamental wave generating network can filter out more intractable harmonic components through the two-stage training process, so that the filtering effect is effectively improved.
Drawings
The above, as well as additional purposes, features, and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description when read in conjunction with the accompanying drawings. In the drawings, embodiments of the invention are illustrated by way of example and not by way of limitation, and like reference numerals refer to similar or corresponding parts and in which:
fig. 1 is a flowchart schematically showing a control method of an active filter according to an embodiment of the present invention;
FIG. 2 is a schematic diagram schematically illustrating a training method of a network model of an active filter according to an embodiment of the invention;
FIG. 3 is a model block diagram schematically illustrating generation of an countermeasure network according to an embodiment of the present invention;
FIG. 4 is a schematic diagram schematically illustrating a training process to generate an countermeasure network in accordance with an embodiment of the invention;
FIG. 5 is a flow chart schematically illustrating a first stage of training according to an embodiment of the present invention;
fig. 6 is a flow chart schematically illustrating a second level of training according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
Fig. 1 is a flowchart schematically showing a control method of an active filter according to an embodiment of the present invention. Fig. 2 is a schematic diagram schematically illustrating a training method of a network model of an active filter according to an embodiment of the present invention.
As shown in fig. 1, the control method of the active filter in the present invention includes the steps of:
at step S101, an original signal in the power supply line is acquired. In some embodiments, the original signal in the power line may include a voltage signal or a current signal, which typically contains fundamental and multiple harmonics, affecting the quality of the power signal in the power line. The original signal may be subjected to frequency domain transformation to obtain a spectrogram corresponding to the original signal.
In the embodiment of the invention, a filtering process of harmonic interference in current is taken as an example, and the method in the invention is described in detail.
At step S102, the original signal is input to the network model of the active filter to output a voltage or current signal with harmonic interference filtered. The network model of the active filter includes a fundamental generation network in the generation countermeasure network. In some embodiments, a structure of a countermeasure network (GAN, generative Adversarial Networks, hereinafter abbreviated as GAN network) is constructed to filter out the harmonics of these specific frequencies, and since the frequencies of the harmonics are integer multiples of the fundamental wave, the harmonic components thereof can be determined accordingly, and the harmonics can be filtered out.
As shown in fig. 2, the network model of the active filter in the present invention is obtained by training the following method:
at step S201, a training data set is acquired. The training data set includes harmonic sample signals and corresponding fundamental signals. Taking a current signal as an example, performing frequency domain transformation on the current signal to be detected by a frequency transformation technology, and converting the current signal to be detected into a frequency domain so as to obtain a spectrogram (frequency decomposition chart) containing fundamental waves and harmonic waves. The frequency transformation technique may be fourier transformation, wavelet transformation, etc., and the abscissa of the obtained spectrogram is frequency, and the ordinate is energy corresponding to each frequency. In this way a large number of training data sets can be acquired.
At step S202, the generated countermeasure network is trained according to the training data set, and a fundamental wave generation network in the trained generated countermeasure network is used as a network model of the active filter.
The loss function for generating training against the network is determined based on at least the first loss function and the second loss function. In generating the countermeasure network, the discrimination network may be trained based on a first loss function and the fundamental wave generation network may be trained based on a second loss function. The first loss function includes:
Figure SMS_18
in the formula ,
Figure SMS_19
generating a loss function of a discrimination network in the reactance network, < ->
Figure SMS_20
and />
Figure SMS_21
The energy value of the fundamental wave in the spectrogram of the input ith harmonic sample signal and the energy value of the fundamental wave in the fundamental wave spectrogram corresponding to the spectrogram of the ith harmonic sample signal are respectively obtained; />
Figure SMS_22
The energy corresponding to the jth frequency in the spectrogram of the ith harmonic sample signal is n, and n represents the number of all harmonic frequencies in the spectrogram of the ith harmonic sample signal,/>
Figure SMS_23
Representing the sum of the energy of all harmonic frequencies in the spectrogram of the ith harmonic sample signal. />
The second loss function includes:
Figure SMS_24
in the formula ,
Figure SMS_25
generating a loss function of the network for generating the fundamental wave in the countermeasure network,>
Figure SMS_26
is the mean square error between the spectrogram of the ith harmonic sample signal and the corresponding fundamental spectrogram.
The basic network structure of a GAN network is shown in fig. 3. The GAN network includes two basic component models, namely a fundamental wave generation model and a discrimination model. The fundamental wave generation model has the task of generating an instance that looks natural and real, similar to the original data, i.e. of generating a corresponding fundamental wave signal from a signal containing harmonics, on the basis of which the filtering process of the active filter can be carried out from the fundamental wave generation network. The task of the discriminant model is to determine whether a given instance is natural or artificially counterfeit, which can be divided into a real instance and a counterfeit instance, i.e. the real instance originates from the dataset and the counterfeit instance originates from the generative model.
The generator based on the fundamental wave generating network tries to deceive the discriminator based on the discriminating network, the discriminator tries not to deceive by the generator, the generating of the fundamental wave generating network in the countermeasure network and the discriminating network are alternately optimized and trained, and both models can be improved, but the effect is finally improved to the fundamental wave generating model with the set requirement, the result generated by the fundamental wave generating model can reach the true and false indistinct steps, and the current signal only comprising the fundamental wave signal can be generated.
The above briefly describes the scheme in the present invention, and the process of forming the network model of the active filter in the present invention will be specifically described.
Fig. 4 is a schematic diagram schematically illustrating a training process of generating an countermeasure network according to an embodiment of the present invention.
As shown in fig. 4, at step S401, a harmonic sample signal is input into a fundamental wave generation network in a generation countermeasure network, resulting in a sample fundamental wave signal. Taking the network structure shown in fig. 3 as an example, the harmonic sample signal contains fundamental and harmonic interference. The fundamental wave generating network can extract fundamental wave signals from the harmonic wave sample signals so as to achieve the purpose of filtering.
At step S402, the sample fundamental wave signal is input to a discrimination network in the generation countermeasure network, and a first filtering result is obtained. The discrimination network shown in fig. 3 can determine whether the fundamental wave generation network can "spurious", that is, extract the corresponding fundamental wave signal.
At step S403, the fundamental wave signal corresponding to the harmonic sample signal is input to the discrimination network, and a second filtering result is obtained. The training data set may include a spectrogram corresponding to the harmonic sample signal and a fundamental component corresponding to the harmonic sample. The discrimination network can compare the fundamental wave signal with the sample fundamental wave signal so as to determine whether the fundamental wave generation network can extract accurate fundamental wave signals.
At step S404, it is determined to generate an countermeasure network loss from the sample fundamental wave signal, the fundamental wave signal corresponding to the sample fundamental wave signal, the first filtering result, and the second filtering result, and it is determined whether to adjust the generation countermeasure network according to the generation countermeasure network loss.
In some embodiments, the training process for generating the countermeasure network may include a two-stage training process. Specifically, first, a first-stage training is performed on the generated countermeasure network model according to harmonic sample signals and corresponding fundamental wave signals in the training data set, so as to obtain a first generated countermeasure network. And taking a spectrogram output by the first generation reactance network in the training process as a harmonic sample signal in the second-stage training.
And then, carrying out second-stage training on the generated countermeasure network according to the harmonic sample signals and the corresponding fundamental wave signals during the second-stage training so as to obtain a trained generated countermeasure network.
The training process of the two phases includes training of the fundamental wave generation network and training of the discrimination network. In the training process, the training process of the fundamental wave generating network and the training process of the judging network need to be alternately performed, namely the judging network is frozen when the fundamental wave generating network is trained, the generating network is frozen when the judging network is trained, and the fundamental wave generating network and the judging network are continuously optimized and updated through alternate training and countermeasure generation.
The two-stage training process will be described in detail below.
Fig. 5 is a flow chart schematically illustrating a first level of training according to an embodiment of the present invention. Fig. 6 is a flow chart schematically illustrating a second level of training according to an embodiment of the present invention.
Aiming at the data in the training data set, fundamental wave filtering harmonic waves are reserved, a spectrogram can be used as input of a generating network, an effective signal for filtering the harmonic waves (the spectrogram for filtering the harmonic waves is called a training spectrogram) is finally generated, a real example fed into the judging network is a reference spectrogram which is generated in advance and does not comprise the harmonic waves (namely, the spectrogram only comprises the fundamental wave, in the scheme, the fundamental wave spectrogram is fed into the judging network as a label, and a fake example fed into the judging network is the training spectrogram generated by the fundamental wave generating network.
It will be appreciated that the inputs in the GAN network may be either waveforms or spectrograms, with the outputs being spectrograms. Based on this, the waveform may be preprocessed to obtain a spectrogram before being input to the network. Because the input signal is usually the waveform of the signal, the original signal is directly input, and then the waveform is changed into a spectrogram and then the subsequent process is carried out, the purpose of the scheme can be realized.
Because of the limitation of the frequency conversion technology (such as selecting wavelet change to convert the waveform diagram to be detected, the selection of the corresponding wavelet basis and scale function and the like can also affect the quality of the converted spectrogram), the neural network model capable of completely filtering harmonic waves is difficult to directly train in the actual training process, and therefore, the two-stage training process is designed to realize the maximum filtering of the harmonic waves in the scheme.
In a first stage of training, a training data set is acquired. The training data set comprises a large number of current waves and fundamental waves corresponding to the current waves, and harmonics with different frequencies and energies can be applied to the current waves formed by different harmonics, so that the original training data set is expanded, wherein all the fundamental waves can be used as labels corresponding to the current waves with the same fundamental waves.
Converting the current waveform with the harmonic waves in the training data set into spectrograms, and sequentially inputting the spectrograms into a generating network, wherein the judging network can train based on the first loss function:
Figure SMS_27
at this time, the liquid crystal display device,
Figure SMS_28
discriminating a loss function of the network for the first phase, < >>
Figure SMS_29
and />
Figure SMS_30
The energy value of the fundamental wave in the spectrogram of the input ith harmonic sample signal and the energy value of the fundamental wave in the fundamental wave spectrogram corresponding to the spectrogram of the ith harmonic sample signal are respectively obtained; />
Figure SMS_31
N represents the number of all harmonic frequencies in the spectrogram of the ith harmonic sample signal, which is the energy corresponding to the jth frequency in the spectrogram of the ith harmonic sample signal,/th harmonic sample signal>
Figure SMS_32
Representing the sum of the energy of all harmonic frequencies in the spectrogram of the ith harmonic sample signal.
The fundamental wave generation network may be trained based on the second loss function described above:
Figure SMS_33
at this time, the liquid crystal display device,
Figure SMS_34
for the mean square error between the ith training spectrogram and the corresponding fundamental spectrogram +.>
Figure SMS_35
and />
Figure SMS_36
The energy value of the fundamental wave in the spectrogram of the input ith harmonic sample signal and the energy value of the fundamental wave in the fundamental wave spectrogram corresponding to the spectrogram of the ith harmonic sample signal are respectively obtained; />
Figure SMS_37
N represents the number of all harmonic frequencies in the spectrogram of the ith harmonic sample signal, which is the energy corresponding to the jth frequency in the spectrogram of the ith harmonic sample signal,/th harmonic sample signal>
Figure SMS_38
Representing the sum of the energy of all harmonic frequencies in the spectrogram of the ith harmonic sample signal.
As shown in fig. 5, at step S501, a first loss is calculated according to a first loss function of the discrimination network, and it is determined whether the first loss is smaller than a first target value.
At step S502, in response to the first loss being greater than a first target value, network parameters of the discrimination network are adjusted and retrained.
At step S503, a second loss is calculated from the second loss function of the fundamental wave generation network, and it is determined whether the second loss is a small second target value.
At step S504, in response to the second loss being greater than the second target value, network parameters of the fundamental generation network are adjusted and retrained.
The gradient training method is used for iterative training to lead the loss function L to be fir As the harmonics are difficult to completely remove, the first stage training is completed as long as the iterations are sufficient to reach the preset number of iterations, or the loss function is made smaller than the preset loss value.
After the first-stage training is completed, the GAN network obtained by the first-stage training is used for training again aiming at the spectrogram output by the first-stage fundamental wave generating network, because harmonic frequencies in the spectrogram output by the generating network are not completely eliminated, but a part of intractable frequencies which are difficult to eliminate are reserved, and the second-stage training can be used for carrying out reinforced filtering again aiming at the frequencies, and the training process is similar to the first-stage training, but the loss functions of the fundamental wave generating network and the judging network in the second-stage training process are modified, wherein the third loss function of the judging network comprises:
Figure SMS_39
wherein ,
Figure SMS_40
for the second training, the loss function of the discrimination network, < >>
Figure SMS_41
And generating a mean square error between a kth spectrogram generated by the network for fundamental wave generation which has completed the first-stage training and a corresponding fundamental wave spectrogram.
The fourth loss function of the fundamental wave generation network comprises
Figure SMS_42
wherein ,
Figure SMS_43
for the loss function of the fundamental wave generating network during the second-stage training, u is the ith harmonic wave in the kth spectrogram generated by the fundamental wave generating network after the first-stage training is completed, and r is the harmonic wave removing in the kth spectrogram generated by the fundamental wave generating network after the first-stage training is completed>
Figure SMS_44
Total number of other harmonics than +.>
Figure SMS_45
Gaussian weights corresponding to the u th harmonic in the k th spectrogram generated by the fundamental wave generation network after the first stage training is completed>
Figure SMS_46
The energy of the u-th harmonic in the k-th spectrogram generated for the fundamental wave generating network that has completed the first stage training.
As shown in fig. 6, at step S601, a third loss is calculated according to a third loss function of the discrimination network, and it is determined whether the third loss is smaller than a third target value.
At step S602, in response to the third loss being greater than the third target value, the network parameters of the discrimination network are adjusted and retrained. In the scheme, the purpose of the second-stage training is that the kth spectrogram generated by the fundamental wave generating network in the discrimination network and the corresponding fundamental wave spectrogram are completely consistent, namely no other harmonic wave exists at the moment, only the fundamental wave is reserved, and at the moment L _(sec-D) Is 0.
At step S603, a fourth loss is calculated from a fourth loss function of the fundamental wave generation network, and it is determined whether the fourth loss is a fractional fourth target value.
At step S604, in response to the fourth loss being greater than the fourth target value, network parameters of the fundamental generation network are adjusted and retrained. In the second stage training process, the kth spectrum generated by the fundamental wave generating network after the first stage training is neededThe energy of each harmonic frequency in the graph is used for finding the highest harmonic frequency as the target frequency
Figure SMS_47
And filtered out for this target frequency during the second stage training because the higher the energy of the harmonic frequency, the more difficult it is to cancel in the first stage training.
Since other harmonics are filtered to a certain extent when the harmonic frequency is filtered, the harmonic is adopted in the scheme
Figure SMS_48
Gaussian weights are distributed to the centers to construct +.>
Figure SMS_49
The loss function of other harmonics is filtered out for the main purpose and to some extent.
Through the iterative training in the second-stage training process, a GAN network model capable of filtering intractable harmonic waves at fixed points can be obtained, finally, a spectrogram of the output of the fundamental wave generating network after the second-stage training is used as the final output of the GAN network, and the output is subjected to inverse transformation (Fourier inverse transformation or wavelet inverse transformation) to obtain a corresponding waveform diagram, namely a current waveform diagram obtained after the harmonic waves are finally filtered. Therefore, the trained fundamental wave generating network can be used as a network model of the active filter, so that the harmonic interference in the original signal in the power supply line is filtered.
The use of the terms "first" or "second" and the like in this specification to refer to a numbered or ordinal term is for descriptive purposes only and is not to be construed as either indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present specification, the meaning of "plurality" means at least two, for example, two, three or more, etc., unless explicitly defined otherwise.
While various embodiments of the present invention have been shown and described herein, it will be obvious to those skilled in the art that such embodiments are provided by way of example only. Many modifications, changes, and substitutions will now occur to those skilled in the art without departing from the spirit and scope of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in practicing the invention. The appended claims are intended to define the scope of the invention and to cover such modular compositions, equivalents, or alternatives falling within the scope of the claims.

Claims (10)

1. A method for controlling an active filter, comprising:
acquiring an original signal in a power supply line;
inputting the original signal into a network model of the active filter to output a voltage or current signal with harmonic interference filtered, wherein the network model of the active filter comprises a fundamental wave generation network in a generation countermeasure network;
the network model of the active filter is obtained through training by the following method:
acquiring a training data set, wherein the training data set comprises harmonic sample signals and corresponding fundamental wave signals;
training the generated countermeasure network according to the training data set, and taking a fundamental wave generation network in the trained generated countermeasure network as a network model of the active filter;
a loss function for the generating training against the network is determined based at least on a first loss function and a second loss function, the first loss function comprising:
Figure QLYQS_1
in the formula ,
Figure QLYQS_2
generating a loss of a discrimination network in an reactance networkFunction (F)>
Figure QLYQS_3
and />
Figure QLYQS_4
The energy value of the fundamental wave in the spectrogram of the input ith harmonic sample signal and the energy value of the fundamental wave in the fundamental wave spectrogram corresponding to the spectrogram of the ith harmonic sample signal are respectively obtained; />
Figure QLYQS_5
N represents the number of all harmonic frequencies in the spectrogram of the ith harmonic sample signal, which is the energy corresponding to the jth frequency in the spectrogram of the ith harmonic sample signal,/th harmonic sample signal>
Figure QLYQS_6
Representing the sum of the energy of all harmonic frequencies in the spectrogram of the ith harmonic sample signal;
the second loss function includes:
Figure QLYQS_7
in the formula ,
Figure QLYQS_8
generating a loss function of the network for generating the fundamental wave in the countermeasure network,>
Figure QLYQS_9
is the mean square error between the spectrogram of the ith harmonic sample signal and the corresponding fundamental spectrogram.
2. The method of claim 1, wherein the generating an countermeasure network further comprises discriminating a network, the training the generating an countermeasure network from the training dataset comprising:
inputting the harmonic wave sample signals into a fundamental wave generation network in the generation countermeasure network to obtain sample fundamental wave signals;
inputting the sample fundamental wave signal into a discrimination network in the generation countermeasure network to obtain a first filtering result, and inputting a fundamental wave signal corresponding to the harmonic wave sample signal into the discrimination network to obtain a second filtering result;
determining a generated countermeasure network loss from a sample fundamental wave signal, a fundamental wave signal corresponding to the sample fundamental wave signal, a first filtering result, and a second filtering result, and determining whether to adjust the generated countermeasure network based on the generated countermeasure network loss.
3. The method of claim 2, wherein training the generated challenge network from the training data set comprises:
performing first-stage training on the generated countermeasure network model according to the harmonic sample signals and the corresponding fundamental wave signals in the training data set to obtain a first generated countermeasure network; the spectrogram output by the first generation reactance network in the training process is used as a harmonic sample signal in the second-stage training;
and performing second-stage training on the generated countermeasure network according to the harmonic sample signal and the corresponding fundamental wave signal during the second-stage training so as to obtain a trained generated countermeasure network.
4. A control method of an active filter according to claim 3, wherein at the time of the first stage training, the determining of the generation of the countermeasure network loss based on the sample fundamental wave signal, the fundamental wave signal corresponding to the sample fundamental wave signal, the first filtering result, and the second filtering result, and the determining of whether to adjust the generation of the countermeasure network based on the generation of the countermeasure network loss comprises:
calculating first loss according to a first loss function of the discrimination network, and judging whether the first loss is smaller than a first target value or not;
and adjusting the network parameters of the discrimination network and retraining in response to the first loss being greater than a first target value.
5. The method of controlling an active filter according to claim 4, wherein the determining of the generation of the countermeasure network loss based on a sample fundamental signal, a fundamental signal corresponding to the sample fundamental signal, a first filtering result, and a second filtering result, and determining whether to adjust the generation of the countermeasure network based on the generation of the countermeasure network loss further comprises:
calculating second loss according to a second loss function of the fundamental wave generation network, and judging whether the second loss is smaller than a second target value or not;
and in response to the second loss being greater than a second target value, adjusting network parameters of the fundamental wave generation network and retraining.
6. A control method of an active filter according to claim 3, wherein at the time of the second stage training, the determining of the generation of the countermeasure network loss based on the sample fundamental wave signal, the fundamental wave signal corresponding to the sample fundamental wave signal, the first filtering result, and the second filtering result, and the determining of whether to adjust the generation of the countermeasure network based on the generation of the countermeasure network loss includes:
calculating third loss according to a third loss function of the discrimination network, and judging whether the third loss is smaller than a third target value or not;
and in response to the third loss being greater than a third target value, adjusting the network parameters of the discrimination network and retraining.
7. The method of controlling an active filter according to claim 6, wherein the determining of the generation of the countermeasure network loss based on a sample fundamental signal, a fundamental signal corresponding to the sample fundamental signal, a first filtering result, and a second filtering result, and determining whether to adjust the generation of the countermeasure network based on the generation of the countermeasure network loss further comprises:
calculating a fourth loss according to a fourth loss function of the fundamental wave generation network, and judging whether the fourth loss is smaller than a fourth target value;
and in response to the fourth loss being greater than a fourth target value, adjusting network parameters of the fundamental wave generation network and retraining.
8. The method of controlling an active filter according to claim 6, wherein the third loss function includes:
Figure QLYQS_10
wherein ,
Figure QLYQS_11
for the second training, the loss function of the discrimination network, < >>
Figure QLYQS_12
And generating a mean square error between a kth spectrogram generated by the network for fundamental wave generation which has completed the first-stage training and a corresponding fundamental wave spectrogram.
9. The method of controlling an active filter according to claim 7, wherein the fourth loss function includes:
Figure QLYQS_13
/>
wherein ,
Figure QLYQS_14
for the loss function of the fundamental wave generating network during the second-stage training, u is the ith harmonic wave in the kth spectrogram generated by the fundamental wave generating network after the first-stage training is completed, and r is the harmonic wave removing in the kth spectrogram generated by the fundamental wave generating network after the first-stage training is completed>
Figure QLYQS_15
Total number of other harmonics than +.>
Figure QLYQS_16
Gaussian weights corresponding to the u th harmonic in the k th spectrogram generated by the fundamental wave generation network after the first stage training is completed>
Figure QLYQS_17
The energy of the u-th harmonic in the k-th spectrogram generated for the fundamental wave generating network that has completed the first stage training.
10. The method of controlling an active filter according to any one of claims 1 to 9, further comprising, before inputting the raw signal into a network model of the active filter:
and carrying out frequency domain transformation on the original signal to obtain a spectrogram corresponding to the original signal.
CN202310319409.9A 2023-03-29 2023-03-29 Control method of active filter Active CN116031894B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310319409.9A CN116031894B (en) 2023-03-29 2023-03-29 Control method of active filter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310319409.9A CN116031894B (en) 2023-03-29 2023-03-29 Control method of active filter

Publications (2)

Publication Number Publication Date
CN116031894A CN116031894A (en) 2023-04-28
CN116031894B true CN116031894B (en) 2023-06-02

Family

ID=86079830

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310319409.9A Active CN116031894B (en) 2023-03-29 2023-03-29 Control method of active filter

Country Status (1)

Country Link
CN (1) CN116031894B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108171266A (en) * 2017-12-25 2018-06-15 中国矿业大学 A kind of learning method of multiple target depth convolution production confrontation network model
CN110417351A (en) * 2019-08-01 2019-11-05 上海理工大学 Photovoltaic system DC side arc fault detection systems and detection method
CN110598806A (en) * 2019-07-29 2019-12-20 合肥工业大学 Handwritten digit generation method for generating countermeasure network based on parameter optimization
CN113052267A (en) * 2021-04-28 2021-06-29 电子科技大学 Unsupervised transmitter phase noise parameter extraction method based on generation countermeasure network
CN114372487A (en) * 2021-12-01 2022-04-19 燕山大学 Underwater sound target identification method based on multi-discriminant generation countermeasure network
CN114429156A (en) * 2022-01-21 2022-05-03 西安电子科技大学 Radar interference multi-domain feature countermeasure learning and detection identification method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108171266A (en) * 2017-12-25 2018-06-15 中国矿业大学 A kind of learning method of multiple target depth convolution production confrontation network model
CN110598806A (en) * 2019-07-29 2019-12-20 合肥工业大学 Handwritten digit generation method for generating countermeasure network based on parameter optimization
CN110417351A (en) * 2019-08-01 2019-11-05 上海理工大学 Photovoltaic system DC side arc fault detection systems and detection method
CN113052267A (en) * 2021-04-28 2021-06-29 电子科技大学 Unsupervised transmitter phase noise parameter extraction method based on generation countermeasure network
CN114372487A (en) * 2021-12-01 2022-04-19 燕山大学 Underwater sound target identification method based on multi-discriminant generation countermeasure network
CN114429156A (en) * 2022-01-21 2022-05-03 西安电子科技大学 Radar interference multi-domain feature countermeasure learning and detection identification method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Effect of Annotation and Loss Function on Epiphyte Identification using Conditional Generative Adversarial Network;S. Aswin;2021 International Conference on Advances in Electrical, Computing, Communication and Sustainable Technologies (ICAECT);全文 *
基于双向生成对抗网络的图像超分辨率算法;李思平;计算机应用与软件;第第38卷卷(第第11期期);全文 *

Also Published As

Publication number Publication date
CN116031894A (en) 2023-04-28

Similar Documents

Publication Publication Date Title
Chen et al. Intelligent transient overvoltages location in distribution systems using wavelet packet decomposition and general regression neural networks
Dash et al. A hybrid time–frequency approach based fuzzy logic system for power island detection in grid connected distributed generation
Escudero et al. Microgrid fault detection based on wavelet transformation and Park’s vector approach
CN107677931B (en) Fault rapid identification method based on DC waveform curvature change difference
CN101944776A (en) Low-frequency oscillation monitoring system of electrical network
CN111308260A (en) Electric energy quality monitoring and electric appliance fault analysis system based on wavelet neural network and working method thereof
Rivas et al. Adaptive current harmonic estimation under fault conditions for smart grid systems
Shair et al. Monitoring of subsynchronous oscillation in a series‐compensated wind power system using an adaptive extended Kalman filter
Chen et al. Estimation of High-Frequency Oscillation’s Magnitude and Frequency Based on Multi-Tone FIR Filter
Zhang et al. Application of partial direct-pole-placement and differential evolution algorithm to optimize controller and LCL filter design for grid-tied inverter
CN116031894B (en) Control method of active filter
Swain et al. Design of passive power filter for hybrid series active power filter using estimation, detection and classification method
Zadeh et al. A compensation scheme for CVT transient effects using artificial neural network
Ghanavati et al. Transfer function-based analysis of harmonic and interharmonic current summation in type-III wind power plants using DFIG sequence impedance modeling
Ahmed et al. Logistic regression based islanding detection for grid-connected inverter
Firouzjah et al. A predictive current control method for shunt active filter with windowing based wavelet transform in harmonic detection
Zhuangzhuang et al. Phasor Measurement Unit Measurement Data Processing Method Applied to a Two-Stage Identification Algorithm for Load Model Parameters
CN109309384B (en) Power quality adjusting method and power quality adjuster
CN206004312U (en) A kind of alternating current filter fling-cut system
Chandrakar et al. THD-Based Passive Islanding Detection Technique for Droop-Controlled Grid-Forming Inverters
CN113783587B (en) Noise self-adaption method and device in electricity consumption information data acquisition process
Andreev et al. Development and research of hybrid model of relay protection
Gurguiatu et al. Active power filter control strategy choosing by M-tool application
CN116956735A (en) Method and equipment for modeling secondary side disturbance voltage waveform of voltage transformer
Kuralkar et al. A Survey on the Investigation and Analysis for a Power System (Micro-Grid) with Stochastic Harmonic Distortion of Multiple Converters

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: 430202 No. 16, LiMiao Road, Canglong Island Science Park, Jiangxia District, Wuhan City, Hubei Province

Patentee after: Wuhan Daquan Energy Technology Co.,Ltd.

Country or region after: China

Address before: 430000 Canglong Island Science Park, Jiangxia District, Wuhan, Hubei Province

Patentee before: WUHAN NEW ENERGY INSTITUTE OF ACCESS EQUIPMENT & TECHNOLOGY Co.,Ltd.

Country or region before: China

CP03 Change of name, title or address