CN111190043B - Method and device for acquiring alternating current signal parameters - Google Patents

Method and device for acquiring alternating current signal parameters Download PDF

Info

Publication number
CN111190043B
CN111190043B CN202010021970.5A CN202010021970A CN111190043B CN 111190043 B CN111190043 B CN 111190043B CN 202010021970 A CN202010021970 A CN 202010021970A CN 111190043 B CN111190043 B CN 111190043B
Authority
CN
China
Prior art keywords
frequency
fundamental
signal
sampling
array
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
CN202010021970.5A
Other languages
Chinese (zh)
Other versions
CN111190043A (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.)
Beijing Machinery Equipment Research Institute
Original Assignee
Beijing Machinery Equipment Research Institute
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 Beijing Machinery Equipment Research Institute filed Critical Beijing Machinery Equipment Research Institute
Priority to CN202010021970.5A priority Critical patent/CN111190043B/en
Publication of CN111190043A publication Critical patent/CN111190043A/en
Application granted granted Critical
Publication of CN111190043B publication Critical patent/CN111190043B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R19/00Arrangements for measuring currents or voltages or for indicating presence or sign thereof
    • G01R19/02Measuring effective values, i.e. root-mean-square values
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R23/00Arrangements for measuring frequencies; Arrangements for analysing frequency spectra
    • G01R23/02Arrangements for measuring frequency, e.g. pulse repetition rate; Arrangements for measuring period of current or voltage
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R25/00Arrangements for measuring phase angle between a voltage and a current or between voltages or currents

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Measuring Frequencies, Analyzing Spectra (AREA)

Abstract

The present specification provides a method and apparatus for obtaining ac signal parameters; the parameter comprises a fundamental signal frequency f; the method comprises the following steps: processing the AC signal with a hysteresis comparator circuit to obtain a first fundamental frequency fp(ii) a Sampling the alternating current signal to generate a sampling data set (AD)m}; and, for the set of sampled data { ADmPerforming discrete Fourier transform to generate a second fundamental frequency fs(ii) a According to the first fundamental frequency fpThe second fundamental frequency fsAnd the frequency difference between the two determines the fundamental signal frequency f. In the description, the inherent characteristics of the fundamental wave frequency are calculated by adopting the hysteresis comparison circuit processing and the discrete Fourier transform processing, and the actual fundamental wave signal frequency f can be determined more accurately by checking the processing modes in two modes.

Description

Method and device for acquiring alternating current signal parameters
Technical Field
The invention relates to the technical field of electric signal detection, in particular to a method and a device for acquiring alternating current signal parameters.
Background
In order to ensure output power and the like to meet load requirements, a closed-loop control system needs to be formed between a power source and a generator in a power supply system such as a diesel generator set. Taking a diesel generating set as an example, the diesel generating set detects an alternating current signal of a generator through a detection sensor, analyzes the alternating current signal by using a set controller, determines alternating current electrical parameters (including effective value, frequency and phase of voltage or current) of the generator, and adjusts output characteristics of a diesel engine according to the alternating current electrical parameters, wherein core parameters in the alternating current electrical parameters include frequency of a fundamental wave signal; the accuracy of the detected frequency has an important influence on the subsequent feedback control.
Currently, the following two methods are mainly used for calculating the frequency of the alternating current electrical parameter by the unit controller according to the alternating current signal: (1) the Fourier processing method comprises the following steps: after conditioning and digital sampling are carried out on the alternating current signal to generate sampling data, processing the sampling data by utilizing a Fourier transform method to obtain the frequency, effective value and phase of the alternating current; (2) methods for comparing AC signals, e.g. comparing AC with a specified threshold value, and determining the frequency of the fundamental signal by statistical comparison
However, both of the aforementioned methods have disadvantages: (1) the Fourier transform method has a barrier effect; in order to make the operation result reach a certain precision requirement, a sufficiently high sampling frequency and a sufficient number of sampling points need to be ensured; the increase of the sampling frequency and the number of sampling points can obviously increase the data processing time of the unit controller, and the real-time requirement is difficult to meet; in practical application, the Fourier transform method has errors; (2) the method for converting the alternating current signal into the square wave to calculate the frequency has higher requirement on the voltage signal by comparison, an effective square wave signal cannot be generated when the amplitude of the alternating current signal is lower, and meanwhile, the frequency of a fundamental wave signal obtained by operation has larger error when the alternating current signal is distorted due to higher harmonics.
Disclosure of Invention
In order to ensure the reliability of the actually tested ac signal parameters and avoid the problems of solutions in the prior art, the present specification provides a new method and apparatus for acquiring ac signal parameters.
The present specification provides a method of obtaining ac signal parameters, including fundamental signal frequency f; the method comprises the following steps:
processing the AC signal with a hysteresis comparator circuit to obtain a first fundamental frequency fp
Sampling the alternating current signal to generate a sampling data set (AD)m}; and, for the set of sampled data { ADm-performing a Discrete Fourier Transform (DFT),generating a second fundamental frequency fs
According to the first fundamental frequency fpThe second fundamental frequency fsAnd the frequency difference between the two determines the fundamental signal frequency f.
Optionally, according to the first fundamental frequency fpAnd the second fundamental frequency fsCalculating to obtain the fundamental wave signal f, including:
calculating the first fundamental frequency fpAnd the second fundamental frequency fsThe frequency difference of (a);
if the frequency difference is less than or equal to a preset difference, adopting the first fundamental frequency fpAs the fundamental signal frequency f;
if the frequency difference is larger than the preset difference, adopting the second fundamental frequency fsAs the fundamental signal frequency f; alternatively, the first and second electrodes may be,
using a formula
Figure GDA0003473585750000021
Calculating to obtain the frequency f of the fundamental wave signal; wherein: the preset difference value is determined according to the resolution of the frequency calculated by the discrete Fourier transform algorithm; omega, beta and alpha are all preset parameters.
Optionally, the alternating current signal is processed by a hysteresis comparison circuit to obtain a first fundamental frequency fpThe method comprises the following steps:
the sampling hysteresis comparison circuit processes the alternating current signal to generate a square wave signal;
acquiring n half periods of the square wave signal, and recording the duration t of the n continuous half periods;
calculating the first fundamental frequency f from n and tp
Optionally, the sample data { ADmThe number m of elements in the element is an integral power of 2;
for the sampling data { ADmPerforming discrete Fourier transform to generate a second fundamental frequency fsThe method comprises the following steps:
constructing a first complex array { AkAnd the sampled data set { AD }mSample data AD in (1)iAssigning to said first complex array { A }kThe real part of the first m elements in the array, the first complex array { A }kSetting the real parts of other elements and the imaginary parts of all the elements to be 0; k is not less than m and is an integer power of 2, i is 0, …, m-1;
for the first complex number array { AkThe elements in the array are bit-inverted to obtain a second array of complex numbers Bk};
Constructing a third complex array { Wk}; wherein the real part of the jth element in the third complex array is
Figure GDA0003473585750000031
The imaginary part of the jth element in the third complex number array is
Figure GDA0003473585750000032
j=1,…,k;
Using the third complex number array { WkFor the second complex number array { B }kPerforming butterfly loop iterative operation, and determining the second fundamental frequency fs
Optionally, the set of sampled data { ADmSample data AD in (1)iAssigning to said first complex array { A }kThe real parts of the preceding m elements in the } comprising:
for the sampling data ADiLow-pass filtering to obtain filtered sample data ADfi
AD the filtered sample datafiAssigning to said first complex array { A }kReal parts of the preceding m elements in the } are calculated.
Alternatively to this, the first and second parts may,
using the third complex number array { WkFor the second complex number array { B }kPerforming butterfly loop iterative operation, and determining the second fundamental frequency fsThe method comprises the following steps:
s0: judging whether o is smaller than m; if yes, go to S1; if not, executing S6;
s1: let p equal to 2o(ii) a And determining whether q is less than 2m(ii) a If yes, go to S2; if not, executing S3;
s2: judging whether r is smaller than p; if yes, go to S4; if not, execute SA 5;
s3: q is 0, o is o +1, and S0 is performed;
S4:
Figure GDA0003473585750000041
k +1, and S2 is performed;
s5: such that r is 0, q is q +2 xp;
s6: traverse the second complex number array { BkGet the maximum modulus | BmaxThe serial number x corresponding to |, adopts
Figure GDA0003473585750000042
Determining the second fundamental frequency fs
Wherein: the initial assignments of o, p and q are all 0; z is the sampling frequency.
Optionally, the parameters further include a fundamental wave signal effective value F and a fundamental wave signal phase angle θ; the method further comprises the following steps:
in the case where k is m
Figure GDA0003473585750000043
Obtaining the effective value F of the basic signal; in the case where k > m, use
Figure GDA0003473585750000044
Obtaining the effective value F of the fundamental wave signal; and the number of the first and second groups,
and the number of the first and second groups,
using a formula
Figure GDA0003473585750000045
And calculating the fundamental wave signal phase angle theta.
Optionally, the sampling frequency z of the sampling process is set according to the fundamental wave signal frequency f.
The present specification provides a further apparatus for obtaining ac signal parameters, including fundamental signal frequency f; the device comprises:
a hysteresis comparator circuit for processing the AC signal to obtain a first fundamental frequency fp
A sampling circuit for sampling the AC signal to generate a sampling data set { AD }m};
A sample data processing module for processing the sample data set { ADmPerforming discrete Fourier transform to generate a second fundamental frequency fs
A fundamental wave signal determination module for determining the first fundamental wave frequency fpAnd the second fundamental frequency fsAnd calculating to obtain the fundamental wave signal frequency f.
Optionally, the fundamental wave signal determining module includes:
a comparison unit for calculating the first fundamental frequency fpAnd the second fundamental frequency fsA difference of (d);
a selection unit for adopting the first fundamental frequency f when the frequency difference is less than or equal to a preset differencepAs the fundamental signal frequency f; and when the frequency difference value is larger than the preset difference value, adopting the second fundamental frequency fsAs the fundamental signal frequency f; alternatively, the first and second electrodes may be,
a calculation unit for employing a formula
Figure GDA0003473585750000051
Calculating to obtain the frequency f of the fundamental wave signal;
wherein: the preset difference value is preset according to the sampling frequency when the sampling data is generated, and omega, beta and alpha are preset parameters.
The present specification utilizes the second fundamental frequency f in consideration of the inherent characteristics of the fundamental frequency calculated by the hysteresis comparison circuit processing and the discrete Fourier transform processingsUsing the first fundamental frequency f as reference datapAs check data, and evaluating the difference between the two data to the actual fundamental wave signal frequencyAnd then determines a value as the fundamental wave signal frequency f for output. By the processing method, the actual fundamental wave signal frequency f can be determined more accurately by two modes of verification processing.
In the invention, the technical schemes can be combined with each other to realize more preferable combination schemes. Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and drawings.
Drawings
The drawings are only for purposes of illustrating particular embodiments and are not to be construed as limiting the invention, wherein like reference numerals are used to designate like parts throughout.
FIG. 1 is a flowchart of a method for obtaining AC signal parameters according to an embodiment; FIG. 2 is a circuit diagram of a hysteretic comparison circuit employed by one embodiment;
FIG. 3 is a flow chart of a method for determining communication parameters for a particular application;
FIG. 4 is a schematic structural diagram of an apparatus for acquiring parameters of an AC signal according to an embodiment;
reference numerals: LM 311-voltage comparator, R1, R2, R3, R4-resistance, C1, C2, C3, C4-capacitance, 11-hysteresis comparison circuit, 12-sampling circuit, 13-sampling data processing module, 14-fundamental wave signal determination module.
Detailed Description
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate preferred embodiments of the invention and together with the description, serve to explain the principles of the invention and not to limit the scope of the invention.
It should be noted that the various methods for acquiring the ac signal parameters mentioned in the following embodiments are implemented based on certain hardware circuits; in a specific application, the hardware circuit may include a hysteresis comparison circuit and an amplification circuit, a sampling circuit for sampling an ac signal, and a processing chip for processing a signal generated by the sampling circuit.
Fig. 1 is a flowchart of a method for acquiring parameters of an ac signal according to an embodiment. As shown in FIG. 1, in the illustrated embodiment, the method of obtaining AC signal parameters includes steps S101-S104. it should be noted that in steps S101-S104, the parameter of the AC signal is the fundamental signal frequency f.
S101: the sampling hysteresis comparison circuit processes the alternating current signal to obtain a first fundamental frequency fp
In step S101, the hysteresis comparison circuit directly samples the ac signal, counts the result obtained by the sampling process, and determines the frequency f of the first fundamental wave signalp
The first fundamental frequency f obtained by sampling is specific to the hysteresis comparator circuitpThe matching adaptability of the hysteresis comparison circuit is directly related to the voltage state of the alternating current signal and the characteristics of higher harmonics.
The hysteresis comparison circuit has the first fundamental frequency f under the condition of stable voltage and less higher harmonicspThe difference from the actual fundamental frequency can reach the accuracy of 0.1 Hz.
S102: sampling the AC signal to generate a sampled data set { AD }m}。
In step S102, the sampling analog-to-digital conversion circuit performs sampling processing on the ac signal to obtain a sampling data set { AD }m}. Sample data set { ADmThe sampled data in (1) is AD1,AD2,…,ADmAnd each data is distributed according to the sequence of sampling time.
To guarantee sampling data set { ADmThe ac signal can be characterized by sampling at a frequency much greater than the fundamental frequency in the ac signal. In practical application, the ratio of the sampling frequency to the fundamental frequency is at least 20: 1.
s103: for sample data group { ADmPerforming discrete Fourier transform to generate a second fundamental frequency fs
In step S103After a certain amount of sample data is obtained, i.e. a sample data set { ADmAfter the effective data in the data set reaches the preset quantity requirement, the sampling data set (AD) can be subjected to samplingmCarrying out discrete Fourier transform to generate a second fundamental frequency fs
Taking into account the characteristics of the discrete Fourier transform, it generates a second fundamental frequency fsWith the actual fundamental signal frequency f in the AC signalsThe difference characteristic of (a) is related to the sampling frequency of the sampling process performed on the sampling signal in step S102 and the data processing accuracy of the processing circuit.
It should be noted that the aforementioned first fundamental frequency fpAnd a second fundamental frequency fsThe data are data representing the frequency characteristics of fundamental wave signals, and the data attributes of the data are the same; of course, in practice, the first fundamental frequency fpIs influenced by the harmonic signals in the actual ac signal.
S104: according to the first fundamental frequency fpSecond fundamental frequency fsAnd the frequency difference between the two determines the fundamental signal frequency f.
As can be seen from the foregoing description, the first fundamental frequency f obtained by the hysteresis comparator circuitpA second fundamental frequency f generated by sampling digital samples and discrete Fourier transform in relation to the voltage amplitude of the AC signal and the characteristics of higher harmonicssThe reasons for errors in the two data are different depending on the sampling frequency, the number of sampling points, and the data processing accuracy of the processing circuit.
And the second fundamental frequency f obtained due to discrete Fourier transformsThe method has no relation with the characteristics of alternating current signal components except for the fundamental wave signal, so that the method does not generate large data fluctuation due to alternating current signal distortion and is only within a specific error range. It is because of the aforementioned characteristics of the second fundamental frequency that it has reference value.
The present embodiment takes into account the inherent characteristics measured in the two aforementioned ways, taking into account that the second fundamental frequency f can be utilizedsUsing the first fundamental frequency f as reference datapAs check data, and evaluating the two data by using the difference between the two dataThe difference characteristic of the individual measurement results from the actual fundamental signal frequency determines a value as the fundamental signal frequency f as output. By the processing method, the actual fundamental wave signal frequency f can be accurately determined by two verification processing modes, and the data measurement requirements of the alternating current circuit on different characteristics are met.
In a particular embodiment of the present description, the first fundamental frequency f is determined according topSecond fundamental frequency fsAnd the frequency difference between the two methods for determining the frequency f of the fundamental wave signal at least comprise a method A and a method B.
Method A includes steps S1041-S1044.
S1041: calculating the first fundamental frequency fpAnd a second fundamental frequency fsThe frequency difference of (a);
s1042: judging whether the frequency difference value is smaller than or equal to a preset difference value or not; if so, executing S1043; if not, go to S1044.
S1043: using a first fundamental frequency fpAs the fundamental signal frequency f.
S1044: using a second fundamental frequency fsAs the fundamental signal frequency f.
The preset difference determined in the foregoing step S1042 is determined according to the resolution of the frequency calculated by the discrete fourier transform algorithm. In one specific application of the embodiment of the present specification, the aforementioned preset difference value is set to be 2 Hz.
Method A according to the first fundamental frequency fpAnd a second fundamental frequency fsThe method for determining the frequency f of the fundamental wave signal is suitable for an alternating current circuit with single load characteristics and single higher harmonic wave type in the alternating current circuit, and a fixed preset difference value is set to be used as a basis for determining the frequency f of the fundamental wave signal in consideration of real-time effect output.
Method B
Method B adopts formula I according to first fundamental frequency fpAnd the second fundamental frequency calculating the fundamental signal frequency f.
Figure GDA0003473585750000091
In the formula I, omega, beta and alpha are preset parameters, and the three parameters are determined according to the characteristics of the alternating current circuit under different working conditions. Wherein omega is set between 0 and 0.5, beta is set between 0 and 1, and alpha is set between 0 and 3; in one embodiment of the present description, ω, β, and α are set to 0.015, 0.5, and 1.5, respectively.
Analyzing the first formula, the first formula adopts the second fundamental frequency fsAs reference data, the first fundamental frequency f is usedpAnd a second fundamental frequency fsAnd constructing correction data by using the frequency difference value between the two, and determining the frequency f of the fundamental wave signal by using the superposition of the correction data and the reference data. In addition, the corrected data acquisition process is obtained by adopting nonlinear function calculation, and nonlinear characteristics of various circuits in processing of alternating current signals are reflected.
In addition, combining formula one, method B can obtain the first fundamental frequency f according to the measurement under different conditionspAnd a second fundamental frequency fsThe correction data with different sizes are obtained, the characteristics of the actual alternating current signal in different states can be adapted, and the method can be suitable for the condition that the load characteristics of the alternating current circuit are complex.
In an analog simulation test, the frequency detection method of the method B is used to obtain data as shown in the following table.
Figure GDA0003473585750000101
The method A adopts a simpler method to determine the frequency f of the fundamental wave signal, and the method B adopts a more complex operation method to determine the frequency f of the fundamental wave signal; it should be noted that, based on the foregoing method idea, one skilled in the art can construct the first fundamental wave signal frequency f under different working conditionspVariation measurement characteristic and second fundamental wave signal frequency fsFormulation of the measured characteristic to achieve a frequency f according to the first fundamental wavepSecond fundamental frequency fsAnd calculating the frequency f of the fundamental wave signal according to the frequency difference of the fundamental wave signal and the frequency f of the fundamental wave signal.
In one specific application, the step S101 of obtaining the first fundamental frequency f is implementedpMay comprise steps S1011-S1012.
S1011: and processing the alternating current signal by adopting a hysteresis comparison circuit to generate a square wave signal.
In practical application, after the alternating current signal is conditioned into the square wave signal, the subsequent circuit can conveniently capture the square wave signal to realize frequency detection. The square wave signal has specific waveform characteristics, so that the method is convenient for determining the first fundamental wave frequency f by a statistical method such as pulse capture and the like in the follow-up processp
S1012: pulse capturing square wave signal to obtain first fundamental wave frequency fp
Specifically, step S1012 may capture n consecutive half cycles of the square wave signal, and record the duration t of the n consecutive half cycles; then, the first fundamental frequency f is calculated according to n and t by adopting a formula IIp
Figure GDA0003473585750000111
In a specific application, acquiring the n half periods of the square wave signal can be realized by identifying a rising edge or a falling edge of the square wave signal.
Of course, in other embodiments, the first fundamental frequency f may also be calculated by acquiring a plurality of consecutive rising edges (or a plurality of consecutive falling edges and corresponding durations) of the square wave signalp
Since the signal is processed in the form of a hysteresis comparator circuit to generate a square wave signal, the first fundamental frequency f can then be determined by a simple pulse capture methodp. The method does not need to consume more memory resources and time.
Fig. 2 is a circuit diagram of a hysteretic comparison circuit employed in one embodiment. As shown in fig. 2, the hysteresis comparison circuit includes a voltage comparator, a resistor R1, a resistor R2, a resistor R4, a resistor R4, a capacitor C1, a capacitor C2, a capacitor C3, and a capacitor C4.
In specific application, the voltage comparator in the embodiment adopts an LM311 comparator of a Texas instrument; the first pin of the voltage comparator is grounded, the second pin is grounded through a resistor R2, the second pin is also connected with the seventh pin of the voltage comparator through a resistor R3, and the third pin of the voltage comparator is connected with an alternating current signal source to be detected through a resistor R1 and is grounded through a capacitor C1; the fourth pin of the voltage comparator is connected with the negative pole of the direct current power supply and is grounded through a capacitor C2; the seventh pin of the voltage comparator is also connected to high level through a resistor R4 and to ground through a capacitor C4, and serves as an output terminal for outputting the shaped square wave signal.
In practical application, the resistance of the resistor R1 and the resistance of the resistor R2 are the same and can be both 10k Ω -100k Ω, the resistance of the resistor R3 can be in the range of 1 Ω -10k Ω, the resistance of the resistor R4 is in the range of 5k Ω -10k Ω, the capacitance of the capacitor C1 is 1nF-10nF, and the capacitance of the capacitor C4 is 1nF-10 nF. The effect that the aforesaid circuit reaches is: if the rated value of the alternating current signal is U1 and the minimum detectable voltage value is U2, the minimum detectable voltage value is U2
Figure GDA0003473585750000121
In one specific application, the resistance of the resistor R1 is 10k Ω, the resistance of the resistor R2 is 10k Ω, the resistance of the resistor R3 is 1k Ω, and the resistance of the resistor R4 is 5.1k Ω; the capacitance of capacitor C1 is 10nF, the capacitance of capacitor C2 gives you 0.1 muF, the capacitance of capacitor C3 is 0.1 muF, and the capacitance of capacitor C4 is 1 nF.
In other embodiments of the present description, the AC signal is processed to obtain the first fundamental frequency fpThe circuit of (2) may also be another type of detection circuit, as long as it is able to identify the half-cycle or full-cycle characteristic of the alternating signal, and the duration of the corresponding cycle, by statistical characteristics.
In the embodiment of the present specification, the fourier transform method adopted in step S103 may include steps S1031 to S1304.
S1031: constructing a first complex array { AkAnd sample the data set { AD }mSample data AD in (1)iAssign to the first complex number array { AkThe real part of the preceding element in (c);
the number k of complex elements in the first complex number array constructed in step S1031 is greater than or equal to the number m of sample data. It should be noted that m is an integer power of 2 and k is also an integer power of 2.
In practical application, if the number k of complex elements in the first complex array is greater than the number m of the sampled data, the real part of complex elements which are not assigned can be set to 0; further, the imaginary parts of all the elements are set to 0.
S1032: for the first complex number array { WkBit-inverting all elements of the complex array to obtain a second complex array Bk}。
The bit inversion interchanges the complex positions in the reverse binary order relationship.
S1033: constructing a third complex array { Wk}。
Third complex array { WkThe real part of the jth element in the lattice is
Figure GDA0003473585750000131
The imaginary part of the jth element in the third complex number array is
Figure GDA0003473585750000132
j=0,…,k-1。
S1034: using a third complex array { WkTo a second complex number array { B }kPerforming butterfly loop iterative operation, and determining a second fundamental frequency fs
In a specific application, the process of S1034 is implemented as steps S201-S208.
S201: judging whether o is smaller than m; if yes, go to S202; if not, executing S208;
s202: let p equal to 2oExecuting S203;
s203: judging whether q is less than 2m(ii) a If yes, executing S204; if not, executing S205;
s204: judging whether r is smaller than p; if yes, go to S206; if not, executing S207;
s205: q is 0, o is o +1, and S201 is performed;
S206:
Figure GDA0003473585750000133
k +1, and S204 is performed;
s207: so that r is 0 and q is q +2 × p, S203 is performed;
s208: traverse the second complex number array { BkGet the maximum modulus | BmaxThe serial number x corresponding to |, adopts
Figure GDA0003473585750000134
Determining the second fundamental frequency fs
Wherein: the initial assignments of o, p and q are all 0; z is the sampling frequency.
In one embodiment, the sampling data AD is processed in step S1031iAssign to the first complex number array { AkThe real part of the previous element in the data acquisition system can also perform low-pass filtering processing on the sampling data to obtain filtered sampling data ADfiThen, the filtered sampling data is ADfiAssign to the first complex number array { AkThe real part of the element in. The low-pass filtering processing can filter voltage burrs in the sampling signals and filter pulse interference in the sampling data in advance.
In some specific applications, the sampled data is ADiLow-pass filtering is carried out to obtain first-order low-pass filtering processing, and filtered sampling data AD is obtainedfiEquation three may be used.
Figure GDA0003473585750000141
Wherein x and y are both preset parameters; in one particular application, x is set to 0.56 and y is set to 0.44 for case-specific tuning optimization.
The ac signal parameters include a fundamental wave signal effective value F and a fundamental wave signal phase angle θ in addition to the aforementioned fundamental wave signal frequency F.
At the second fundamental frequency f obtained by the Fourier transformsIn the process of (2), can alsoThe effective value F of the fundamental wave signal is obtained by adopting a formula four, and the phase angle theta of the fundamental wave signal is obtained by adopting a formula five.
Figure GDA0003473585750000142
Figure GDA0003473585750000143
The fundamental wave signal effective value F and the fundamental wave signal phase angle θ substantially represent the characteristics of the fundamental wave signal, and therefore can reflect the characteristics of the fundamental wave signal in cooperation with the fundamental wave signal frequency F.
Of course, in other embodiments, the effective value F of the fundamental wave signal and the phase angle θ of the fundamental wave signal may be determined by other methods.
In addition, it should be noted that, since the acquired fundamental wave signal frequency is used for determining the sampling frequency and then for discrete fourier calculation, the second fundamental wave frequency f obtained through multiple operationssThe fundamental wave signal effective value F and the fundamental wave signal phase angle θ can also converge to a certain accuracy.
Further, in some embodiments of the present specification, the frequency of the sampling process again may be set according to the aforementioned fundamental wave signal frequency f; therefore, the sampling data subjected to sampling processing can better reflect the fundamental wave signal characteristic of the alternating current signal, and then the more accurate second fundamental wave frequency f can be obtained in the subsequent processing processsA fundamental wave signal effective value F and a fundamental wave signal phase angle theta.
FIG. 3 is a flow chart of a method for determining communication parameters for a particular application. As shown in fig. 3, the method provided by the present embodiment includes steps S301 to S308. It should be noted that the steps in the method provided by this embodiment are as described above.
S301: the sampling hysteresis comparison circuit 11 processes the alternating current signal to obtain a square wave signal;
s302: determining a first fundamental frequency f from a square-wave signalp
S303: sampling the AC signal to generate a sampled data set { AD }m}。
S304: for sample data group { ADmPerforming low-pass filtering on the sampled data in the frequency band, and then performing discrete Fourier transform to obtain a second fundamental frequency fsA fundamental wave signal effective value F and a fundamental wave signal phase angle theta.
S305: determining the first fundamental frequency fpAnd a second fundamental frequency fsWhether the frequency difference value of (a) is less than or equal to a preset difference value; if yes, executing S306; if not, S307 is executed.
S306: using a first fundamental frequency fpAs the fundamental wave signal frequency f, S308 is executed.
S307: using a second fundamental frequency fsAs the fundamental wave signal frequency, S308 is executed.
S308: and outputting the fundamental wave signal frequency F, the fundamental wave signal effective value F and the fundamental wave signal phase angle theta, and setting the sampling frequency of sampling the alternating current signal for a new time according to the fundamental wave signal frequency F.
In addition to providing the aforementioned means for acquiring an ac signal, embodiments of the present specification also provide a means for acquiring parameters of an ac signal. The inventive concept of the apparatus for acquiring ac signal parameters is the same as that of the method for acquiring ac signal parameters, so that the corresponding effects can be seen from the foregoing description, and only the apparatus for acquiring ac signal parameters will be described below.
Fig. 4 is a schematic structural diagram of an apparatus for acquiring parameters of an ac signal according to an embodiment. As shown in fig. 4, the apparatus for acquiring ac signal parameters in the present embodiment includes a hysteresis comparison circuit 11, a sampling circuit 12, a data processing module, and a fundamental wave signal determination module 14.
The hysteresis comparator circuit 11 is used for the AC signal to obtain the first fundamental frequency fp
The sampling circuit 12 is configured to sample the ac signal and generate a sampling data set { AD }m}。
The sampling data processing module is used for processing a sampling data group (AD)mIs carried outDiscrete Fourier transform to generate the second fundamental frequency fs
The fundamental wave signal determination module 14 is used for determining the fundamental wave frequency f according to the first fundamental wave frequencypAnd a second fundamental frequency fsAnd calculating to obtain the frequency f of the fundamental wave signal.
In one embodiment, the fundamental signal determination module 14 includes a comparison unit and a selection unit.
The comparison unit is used for calculating the first fundamental frequency fpAnd a second fundamental frequency fsDifference of (2)
The selection unit is used for adopting the first fundamental frequency f when the frequency difference value is less than or equal to the preset difference valuepAs the fundamental signal frequency f; and when the frequency difference value is larger than the preset difference value, adopting a second fundamental frequency fsAs the fundamental signal frequency f; the aforementioned preset difference value is determined according to the sampling frequency at the time of generating the sampling data.
In other embodiments, the data processing module includes a calculation unit that calculates the formula
Figure GDA0003473585750000161
And calculating to obtain the frequency f of the fundamental wave signal.
In some embodiments, the hysteresis comparator 11 may be the hysteresis comparator 11 mentioned above, or may be a schmitt hysteresis comparator 11.
In some embodiments, the sample data processing module 13 may determine the second fundamental frequency f using the aforementioned methodsThe fundamental wave signal effective value F and the fundamental wave signal phase angle θ can also be determined according to the aforementioned method.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are also included in the scope of the present invention.

Claims (8)

1. A method of obtaining ac signal parameters, wherein the parameters include fundamental signal frequency f; the method comprises the following steps:
processing the AC signal with a hysteresis comparator circuit to obtain a first fundamental frequency fp
Sampling the alternating current signal to generate a sampling data set (AD)m}; and, for the set of sampled data { ADmPerforming discrete Fourier transform to generate a second fundamental frequency fs(ii) a In particular, the amount of the solvent to be used,
the sample data { ADmThe number m of elements in the element is an integral power of 2;
for the sampling data { ADmPerforming discrete Fourier transform to generate a second fundamental frequency fsThe method comprises the following steps:
constructing a first complex array { AkAnd the sampled data set { AD }mSample data AD in (1)iAssigning to said first complex array { A }kThe real part of the first m elements in the array, the first complex array { A }kSetting the real parts of other elements and the imaginary parts of all the elements to be 0; k is not less than m and is an integer power of 2, i is 0, …, m-1;
for the first complex number array { AkThe elements in the array are bit-inverted to obtain a second array of complex numbers Bk};
Constructing a third complex array { Wk}; wherein the real part of the jth element in the third complex array is
Figure FDA0003473585740000011
The imaginary part of the jth element in the third complex number array is
Figure FDA0003473585740000012
Figure FDA0003473585740000013
Using the third complex number array { WkFor the second complex number array { B }kPerforming butterfly loop iterative operation, and determining the second fundamental frequency fs(ii) a The method specifically comprises the following steps:
s0: judging whether o is smaller than m; if yes, go to S1; if not, executing S7;
s1: let p equal 2 °;
s2: judging whether q is less than 2m(ii) a If yes, go to S3; if not, executing S4;
s3: judging whether r is smaller than p; if yes, go to S5; if not, executing S6;
s4: q is 0, o is o +1, and S0 is performed;
S5:
Figure FDA0003473585740000021
r +1, and S3 is performed;
s6: so that r is 0 and q is q +2 × p, S2 is performed;
s7: traverse the second complex array { B'kGet the maximum modulus value | B'maxThe serial number x corresponding to |, adopts
Figure FDA0003473585740000022
Determining the second fundamental frequency fs
Wherein: the initial assignments of o, p, q and r are all 0; z is the sampling frequency;
according to the first fundamental frequency fpThe second fundamental frequency fsAnd the frequency difference between the two determines the fundamental signal frequency f.
2. The method of claim 1, wherein the first fundamental frequency f is based onpAnd the second fundamental frequency fsCalculating to obtain the fundamental wave signal f, including:
calculating the first fundamental frequency fpAnd the second fundamental frequency fsThe frequency difference of (a);
if the frequency difference is less than or equal to a preset difference, adopting the first fundamental frequency fpAs the fundamental signal frequency f;
if the frequency difference is larger than the preset difference, adopting the second fundamental frequency fsAs the fundamental signal frequency f; alternatively, the first and second electrodes may be,
using a formula
Figure FDA0003473585740000023
Calculating to obtain the frequency f of the fundamental wave signal; wherein: the preset difference value is determined according to the resolution of the frequency calculated by the discrete Fourier transform algorithm; omega, beta and alpha are all preset parameters.
3. Method according to claim 1 or 2, characterized in that the ac signal is processed with a hysteresis comparator circuit to obtain the first fundamental frequency fpThe method comprises the following steps:
the sampling hysteresis comparison circuit processes the alternating current signal to generate a square wave signal;
acquiring n half periods of the square wave signal, and recording the duration t of the n continuous half periods;
calculating the first fundamental frequency f from n and tp
4. The method of claim 1, wherein the set of sampled data { AD } is stored in a memory of the devicemSample data AD in (1)iAssigning to said first complex array { A }kThe real parts of the preceding m elements in the } comprising:
for the sampling data ADiLow-pass filtering to obtain filtered sample data ADfi
AD the filtered sample datafiAssigning to said first complex array { A }kReal parts of the preceding m elements in the } are calculated.
5. The method of claim 1, wherein the parameters further include a fundamental signal effective value F and a fundamental signal phase angle θ; the method further comprises the following steps:
in the case where k is m
Figure FDA0003473585740000031
Obtaining theThe effective value F of the fundamental wave signal; in the case where k > m, use
Figure FDA0003473585740000032
Obtaining the effective value F of the fundamental wave signal;
by using
Figure FDA0003473585740000033
And calculating the fundamental wave signal phase angle theta.
6. Method according to claim 1 or 2, characterized in that the sampling frequency z of the sampling process is set again in dependence on the fundamental signal frequency f.
7. An apparatus for obtaining AC signal parameters, the parameters including fundamental signal frequency f; the device comprises:
a hysteresis comparator circuit for processing the AC signal to obtain a first fundamental frequency fp
A sampling circuit for sampling the AC signal to generate a sampling data set { AD }m};
A sample data processing module for processing the sample data set { ADmPerforming discrete Fourier transform to generate a second fundamental frequency fs(ii) a In particular, the amount of the solvent to be used,
the sample data { ADmThe number m of elements in the element is an integral power of 2;
for the sampling data { ADmPerforming discrete Fourier transform to generate a second fundamental frequency fsThe method comprises the following steps:
constructing a first complex array { AkAnd the sampled data set { AD }mSample data AD in (1)iAssigning to said first complex array { A }kThe real part of the first m elements in the array, the first complex array { A }kSetting the real parts of other elements and the imaginary parts of all the elements to be 0; k is not less than m and is an integer power of 2, i is 0, …, m-1;
for the first complex number array { AkWhat in (1)Bit-inverting the elements to obtain a second complex array { Bk};
Constructing a third complex array { Wk}; wherein the real part of the jth element in the third complex array is
Figure FDA0003473585740000041
The imaginary part of the jth element in the third complex number array is
Figure FDA0003473585740000042
Figure FDA0003473585740000043
Using the third complex number array { WkFor the second complex number array { B }kPerforming butterfly loop iterative operation, and determining the second fundamental frequency fs(ii) a The method specifically comprises the following steps:
s0: judging whether o is smaller than m; if yes, go to S1; if not, executing S7;
s1: let p equal 2 °;
s2: judging whether q is less than 2m(ii) a If yes, go to S3; if not, executing S4;
s3: judging whether r is smaller than p; if yes, go to S5; if not, executing S6;
s4: q is 0, o is o +1, and S0 is performed;
S5:
Figure FDA0003473585740000044
r +1, and S3 is performed;
s6: so that r is 0 and q is q +2 × p, S2 is performed;
s7: traverse the second complex array { B'kGet the maximum modulus value | B'maxThe serial number x corresponding to |, adopts
Figure FDA0003473585740000045
Determining the second fundamental frequency fs
Wherein: the initial assignments of o, p, q, and r are allIs 0; z is the sampling frequency; a fundamental wave signal determination module for determining the first fundamental wave frequency fpAnd the second fundamental frequency fsAnd calculating to obtain the fundamental wave signal frequency f.
8. The apparatus of claim 7, wherein the fundamental signal determination module comprises:
a comparison unit for calculating the first fundamental frequency fpAnd the second fundamental frequency fsA difference of (d);
a selection unit for adopting the first fundamental frequency f when the frequency difference is less than or equal to a preset differencepAs the fundamental signal frequency f; and when the frequency difference value is larger than the preset difference value, adopting the second fundamental frequency fsAs the fundamental signal frequency f; alternatively, the first and second electrodes may be,
a calculation unit for employing a formula
Figure FDA0003473585740000051
Calculating to obtain the frequency f of the fundamental wave signal;
wherein: the preset difference value is preset according to the sampling frequency when the sampling data is generated, and omega, beta and alpha are preset parameters.
CN202010021970.5A 2020-01-09 2020-01-09 Method and device for acquiring alternating current signal parameters Active CN111190043B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010021970.5A CN111190043B (en) 2020-01-09 2020-01-09 Method and device for acquiring alternating current signal parameters

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010021970.5A CN111190043B (en) 2020-01-09 2020-01-09 Method and device for acquiring alternating current signal parameters

Publications (2)

Publication Number Publication Date
CN111190043A CN111190043A (en) 2020-05-22
CN111190043B true CN111190043B (en) 2022-04-12

Family

ID=70706141

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010021970.5A Active CN111190043B (en) 2020-01-09 2020-01-09 Method and device for acquiring alternating current signal parameters

Country Status (1)

Country Link
CN (1) CN111190043B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113406379A (en) * 2021-06-17 2021-09-17 西安润鑫航空科技有限公司 Alternating current distortion coefficient detection improved algorithm
CN116840544A (en) * 2023-06-12 2023-10-03 北京科荣达航空科技股份有限公司 Method and device for acquiring effective value of alternating current signal

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5729124A (en) * 1994-03-14 1998-03-17 Industrial Technology Research Institute Estimation of signal frequency using fast walsh transform
CN103063913A (en) * 2012-12-07 2013-04-24 深圳市金宏威技术股份有限公司 Frequency tracking method for Fourier transform
CN105548697A (en) * 2015-12-09 2016-05-04 哈尔滨理工大学 Power system harmonic detection device and method
CN109669070A (en) * 2019-01-02 2019-04-23 中电和瑞科技有限公司 A kind of frequency measurement method and frequency measurement circuit
CN110488093A (en) * 2019-09-24 2019-11-22 国家电网有限公司 A kind of harmonic wave prior-warning device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6613979B2 (en) * 2016-03-15 2019-12-04 富士通株式会社 Frequency analysis device, frequency analysis method, and sensor module

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5729124A (en) * 1994-03-14 1998-03-17 Industrial Technology Research Institute Estimation of signal frequency using fast walsh transform
CN103063913A (en) * 2012-12-07 2013-04-24 深圳市金宏威技术股份有限公司 Frequency tracking method for Fourier transform
CN105548697A (en) * 2015-12-09 2016-05-04 哈尔滨理工大学 Power system harmonic detection device and method
CN109669070A (en) * 2019-01-02 2019-04-23 中电和瑞科技有限公司 A kind of frequency measurement method and frequency measurement circuit
CN110488093A (en) * 2019-09-24 2019-11-22 国家电网有限公司 A kind of harmonic wave prior-warning device

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
减小非同步采样误差措施的分析;杨昭芳等;《电源世界》;20071015(第10期);44,64-66 *
基于DSP的电网谐波分析仪的设计;梁玉红;《重庆科技学院学报(自然科学版)》;20100831;127-131 *
基于ZYNQ的谐波检测系统设计;夏国标;《华东交通大学学报》;20180831;89-96 *
考虑电网频率变化率的改进相位差校正法研究;林申力等;《机电工程》;20170420(第04期);386-393 *

Also Published As

Publication number Publication date
CN111190043A (en) 2020-05-22

Similar Documents

Publication Publication Date Title
CN111190043B (en) Method and device for acquiring alternating current signal parameters
WO2015085830A1 (en) Apparatus for testing dynamic characteristics of electronic energy meter
CN105572475B (en) A kind of high impedance measuring circuit and signal processing method
CN203287435U (en) A micro electrical network harmonic wave and inter-harmonic wave test apparatus based on an STM32F107VCT6
CN101907656B (en) Method for measuring phase difference of common-frequency signal with fixed phase drift
CN110618316A (en) Harmonic source identification method and device, terminal equipment and storage medium
TWI492182B (en) A method for identifying electric appliance loads
CN1480736A (en) Method for testing electronic component and its instrument
CN109557365B (en) Power grid voltage frequency and phase angle detection method and system and single-phase power grid detection system
CN108332845B (en) Noise measuring method and acoustic meter
CN108512474B (en) Motor current adjusting method and motor current adjusting device
Sudiharto et al. HARMONIC LOAD IDENTIFICATION BASED ON FAST FOURIER TRANSFORM AND LEVENBERG MARQUARDT BACKPROPAGATION.
CN1627087A (en) Electric power meter
CN103091561A (en) Device obtaining direct current signals from alternative current and direct current superposition signals and method thereof
CN109883465B (en) Encoder detection method
CN104634855A (en) Household appliance humidity detecting method and household appliance humidity detecting device
CN108982967A (en) A kind of network of ship parameter real time monitoring system and method
CN211263712U (en) Storage battery impedance testing device
CN114460369A (en) Ultrasonic product load characteristic display circuit, method, device and storage medium
CN107800434A (en) A kind of fast A/D C method of testings based on parameter extraction
JP2023507333A (en) Detecting the fundamental component of the current to gate energy consumption storage
CN108008171B (en) Circuit parameter detection circuit and electric energy meter
CN112649758A (en) Open-circuit fault detection method and device and computer equipment
CN113049872B (en) Electric signal zero detection method for multiple times of low-frequency current ripple suppression
CN110927504A (en) Analysis method, device and equipment of combined network based on LCR

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