An adaptive signal harmonic measurement system and measurement method
Through the adaptive signal harmonic measurement system, the programmable gain amplification circuit and interpolation algorithm are used to solve the measurement difficulties caused by changes in signal frequency and amplitude, achieve accurate measurement of unknown signals, and reduce hardware costs and spectrum leakage risks.
Patent Information
- Application Number
- CN202210548194.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-18
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2042-05-18
AI Technical Summary
Existing signal harmonic measurement methods are difficult to adapt to signals with changing frequencies and amplitudes, resulting in reduced measurement accuracy, spectrum leakage and high hardware costs.
An adaptive signal harmonic measurement system is adopted, including a voltage-controlled amplification module, a low-pass filter module, a signal inversion module, a voltage following module, a proportional operation module and a processor. By adjusting the amplification factor and interpolation algorithm, the signal amplitude and sum can be adaptively adjusted. Sampling frequency to achieve accurate measurement of unknown signals.
When the signal amplitude and frequency change, the signal amplitude is automatically adjusted to reduce sampling frequency requirements, reduce hardware costs, improve measurement accuracy, avoid spectrum leakage, and facilitate harmonic measurement of unknown signals.
Smart Images

Figure CN114966202B
Abstract
Description
[Technical field]
[0001] The invention belongs to the technical field of electrical signal harmonic measurement, and in particular relates to an adaptive signal harmonic measurement system and a measurement method. [Background technology]
[0002] In the field of harmonic measurement, spectrum leakage will cause the spectrum lines in the spectrum to affect each other, resulting in false spectrum lines of unequal amplitudes. This phenomenon is an important factor in reducing the accuracy of harmonic parameter calculation. To prevent the occurrence of spectrum leakage, hardware sampling equipment must meet strict synchronous sampling conditions. However, different measurement signals have different frequency ranges, and their power frequencies generally change continuously within a certain range. It is difficult for ordinary hardware equipment to perform stable synchronous sampling, and spectrum leakage will inevitably occur. The high-precision harmonic measurement equipment currently used in engineering, such as power quality testers, can dynamically adjust the hardware sampling frequency according to the changing power frequency, but the hardware of this type of equipment is complex and the cost of use is high. Therefore, correcting the calculation results under asynchronous sampling through software algorithms and reducing hardware costs are hot topics in the field of harmonic measurement.
[0003] Discrete Fourier Transform (DFT) is a classic spectrum analysis method. It can achieve spectrum separation while having a high signal-to-noise ratio gain. It is often used to detect fundamental and harmonic characteristic information of power systems. The time domain windowing function and frequency domain spectrum line interpolation methods are usually used to improve the accuracy of the DFT algorithm. Over the years, the window function has evolved from the Hannning window to the Nuttull window, and the number of weighted spectrum lines of the interpolation method has increased from one to two or even three. Therefore, the sidelobe level of the window function continues to decrease, the number of interpolated spectrum lines continues to increase, the spectrum leakage and fence effect of the algorithm are suppressed, and the accuracy of the algorithm is improved.
[0004] For example, patent CN113640579B in the prior art discloses a harmonic measurement method, electronic device and storage medium based on double spectral line transformation, which is mainly aimed at power grid systems with power frequency constantly changing in the range of 49.5Hz to 50.5Hz. Harmonic measurement has the problem of component drowning when spectrum leakage is serious, but the algorithm is too complicated and the system calculation amount is large; and it cannot automatically adapt to the harmonic measurement of signals in various frequency bands.
[0005] For example, patent CN111308199A discloses a dual-line interpolation DFT harmonic analysis method, system and medium based on spectral resolution adaptation, which solves the problem of insufficient calculation accuracy of existing algorithms when spectral interference and broadband noise exist, and suppresses the spectral interference of the fundamental wave on the harmonic calculation by spectral resolution adaptation, and obtains the whole harmonic by frequency doubling inverse, which effectively avoids the error caused by the interpolation calculation of harmonics. The signal frequency varies in the range of 45-55Hz. Although this method adaptively calculates the number of sampling points that meet the frequency resolution requirements according to the coarse frequency of the fundamental wave of the harmonic signal and realizes the adaptive adjustment of the number of sampling points, it cannot adaptively adjust the harmonic measurement of other signals in different frequency ranges; and the algorithm is too complicated, the system calculation amount is large, and it cannot automatically adapt to the harmonic measurement of signals in various frequency bands.
[0006] In summary, most existing signal harmonic measurement methods are aimed at known signals, requiring the frequency of the measured signal to be fixed and the amplitude variation range to be small. It is difficult to measure unknown signals with varying frequency and amplitude. The harmonic measurement methods in the prior art have the following disadvantages for measuring unknown signals:
[0007] 1) The amplification factor of the signal processing circuit is fixed and cannot be adjusted automatically. It is impossible to accurately measure small signals and cannot reduce large signals, resulting in distortion of large signals after amplification. It is difficult to measure when the amplitude of the measured signal changes greatly.
[0008] 2) When the amplitude of the measured signal is small, the measurement accuracy decreases. When the amplitude is large, the signal will be distorted and harmonic measurement cannot be performed.
[0009] 3) The sampling frequency is fixed and cannot measure signals with changing frequencies;
[0010] 4) When the frequency of the measured signal is increased, the sampling frequency requirement is higher. It is difficult to obtain an accurate sampling frequency through frequency division. Inaccurate sampling frequency will cause spectrum leakage in the FFT change result and inaccurate harmonic measurement. To achieve an accurate sampling frequency, a high hardware cost is required.
[0011] Therefore, it is necessary to provide a new adaptive signal harmonic measurement system and measurement method to solve the above problems. [Summary of the invention]
[0012] The main purpose of the present invention is to provide an adaptive signal harmonic measurement system, which can adaptively adjust the signal amplitude when the amplitude and frequency of the measured signal change, reduce the sampling frequency requirement through an interpolation algorithm, and conveniently perform harmonic measurement on unknown signals within the measurement range.
[0013] The present invention achieves the above-mentioned purpose through the following technical scheme: an adaptive signal harmonic measurement system, which includes a voltage-controlled amplifier module, a low-pass filter module, a signal inversion module, a voltage follower module, a proportional operation module, a PWM signal and a processor with a built-in post-stage sampling operation program module; a measurement signal is input into the voltage-controlled amplifier module, and after being amplified by a multiple, an AC voltage signal Ui is output to the proportional operation module; wherein the amplification multiple of the voltage-controlled amplifier module is controlled by a voltage signal, and the voltage signal is generated by the PWM signal after passing through the low-pass filter module and the signal inversion module; the voltage follower module generates a DC voltage signal Udc, which is input into the proportional operation module, and the proportional operation module performs setting operations on the AC voltage signal Ui and the DC voltage signal Udc and outputs them to the processor, and the harmonic value is calculated by the post-stage sampling operation program module.
[0014] Further, the voltage-controlled amplification module includes a variable gain amplifier U2;
[0015] The measurement signal is input into the voltage-controlled amplifier module from pin 1 of U2, and the PWM signal is input into pin 3 of U2 after passing through the low-pass filter module and the signal inversion module; pin 1 of U2 is electrically connected to pin 8 and a capacitor C3 is provided on the connecting line, pin 8 and pin 2 of U2 are grounded, and the AC voltage signal Ui is output at pin 5.
[0016] Further, the low-pass filter module includes an operational amplifier U1A;
[0017] The PWM signal is input to U1A pin 3 after passing through resistors R3 and R4, pin 2 of U1A is electrically connected to pin 1, a grounding branch is provided between resistors R3 and R4, and capacitor C1 is provided on the grounding branch; another grounding branch is provided between resistor R4 and U1A pin 3, and capacitor C2 is provided on the grounding branch; the PWM signal is converted into a DC voltage after passing through the low-pass filter module and is output at pin 1 of U1A.
[0018] Further, the signal inversion module includes an operational amplifier U1B;
[0019] The positive DC signal output by the low-pass filter module is input to U1B pin 6 through resistor R2, and pin 5 of U1B is grounded after passing through a resistor R5. Pin 6 of U1B is electrically connected to pin 7 and a resistor R1 is provided on the connecting line; the positive DC signal output by the low-pass filter module is formed into a negative DC signal through the signal inversion module and output at pin 7 of U1B.
[0020] Further, the voltage follower module includes an operational amplifier U3B;
[0021] Pin 6 of U3B is electrically connected to pin 7, a voltage signal divided by resistors R10 and R11 is input to pin 5, a power signal with a set voltage value is input to the input side of resistor R10, and the output side of resistor R10 is divided into two paths, one path is input to resistor R11 and then grounded, and the other path is connected to pin 5 of U3B; the voltage follower module outputs the DC voltage signal Udc to the proportional operation module at pin 7 of the operational amplifier U3B.
[0022] Further, the proportional operation module includes an operational amplifier U3A;
[0023] Pin 2 of U3A is electrically connected to pin 1, and a resistor R6 is provided on the connecting line. A grounding branch is also provided at the end of pin 2, and a resistor R7 is provided on the grounding branch; a grounding branch is also provided at the end of pin 1 of U3A, and a diode D1 is provided on the grounding branch; the DC voltage signal Udc output by the voltage follower module is connected to the pin 3 end of the operational amplifier U3A after passing through a resistor R9, and the AC voltage signal Ui output by the voltage-controlled amplifier module is connected to the pin 3 end of the operational amplifier U3A after passing through a resistor R8, and the proportional operation module forms a sampling signal output port at the pin 1 end of U3A, inputs the sampling signal into the processor, and calculates the harmonic value through the post-stage sampling operation program module.
[0024] Another object of the present invention is to provide an adaptive signal harmonic measurement method, which is based on the above-mentioned adaptive signal harmonic measurement system for measurement, and the measurement method comprises the following steps:
[0025] S1) According to the frequency range of the measured signal, the minimum frequency is obtained as F1;
[0026] S2) setting the sampling frequency to F2, which is an integer multiple of F1, and calculating the number of sampling points N=F2 / F1;
[0027] S3) sampling the signal according to the sampling frequency F2 to obtain a sampling signal formed by N point data;
[0028] S4) calculating the amplitude of the sampled signal;
[0029] S5) determining whether the signal amplitude calculated in step S4) is within a set range, if yes, executing step S6), if no, adjusting the amplification factor of the voltage-controlled amplifier module by adjusting the duty cycle of the PWM signal so that the calculated signal amplitude is within the set range, and then executing step S6);
[0030] S6) collecting N point data again and converting them into voltage values, finding the target value M closest to it according to N, wherein the target value M is 2 to the power of n, and inserting MN data evenly and at equal intervals into the N point data, wherein the inserted data value is equal to the average of the two previous and next data values, to obtain M point data;
[0031] S7) converting the M point data into voltage values and performing FFT transformation to obtain a spectrum, and finding the fundamental frequency according to the spectrum data;
[0032] S8) obtaining the harmonic frequency from the fundamental frequency, extracting the harmonic value from the spectrum data according to the harmonic frequency, and completing the harmonic measurement.
[0033] Further, in the step S5), adjusting the duty cycle of the PWM signal includes: calculating the adjusted amplification factor Anew=(U0 / U)×Aold, wherein U0 is the target amplitude, U is the current signal amplitude, and Aold is the current signal amplification factor; and calculating the PWM duty cycle Duty according to the adjusted amplification factor Anew as:
[0034]
[0035] Among them, V cc is the system voltage, A is the maximum gain of the voltage-controlled amplifier module, and the unit is DB.
[0036] Furthermore, in the step S5), adjusting the duty cycle of the PWM signal includes: setting a minimum step size, adjusting the duty cycle of the PWM with the minimum step size, and after each adjustment, sampling and calculating the amplitude again and determining whether it is within the set range, and repeating this cycle until the calculated signal amplitude reaches the set range, then stopping adjusting the duty cycle of the PWM.
[0037] Furthermore, the minimum step distance is 0.1%.
[0038] Compared with the prior art, the adaptive signal harmonic measurement system and method of the present invention have the following beneficial effects: it can adaptively measure signal harmonics, and can adaptively adjust the signal amplitude when the amplitude and frequency of the measured signal change, and reduce the sampling frequency requirement through the interpolation algorithm, so as to conveniently measure the harmonics of unknown signals within the measurement range. Specifically,
[0039] 1) In order to solve the problem that the signal amplitude has a large variation range and is difficult to measure, this method proposes a programmable gain amplifier circuit and a corresponding amplitude adjustment algorithm. The system automatically adjusts the amplification factor according to the amplitude of the measured signal, increases the amplification factor for small signals, and reduces the amplification factor for large signals; the amplitude of the measured signal is adjusted to within the set range to ensure the accuracy of subsequent calculations;
[0040] 2) In order to solve the problem of difficulty in measuring signal frequency changes, this method proposes a data interpolation algorithm. After the system measures the signal frequency, it interpolates the measured data without adjusting the sampling rate according to the frequency. This solves the spectrum leakage problem caused by inaccurate sampling frequency after the signal frequency is increased.
Brief Description of the Drawings
[0041] Figure 1 is a schematic diagram of a programmable gain amplifier circuit in an embodiment of the present invention;
[0042] Figure 2 is a flow chart of a harmonic measurement method according to an embodiment of the present invention;
[0043] Figure 3 A control flow chart of signal amplitude adjustment in an embodiment of the present invention;
[0044] Figure 4 4 is a control flow chart of a data interpolation algorithm in an embodiment of the present invention. [Specific implementation method]
[0045] Example:
[0046] Please refer to Figure 1 The present embodiment is an adaptive signal harmonic measurement system, which includes a voltage-controlled amplifier module, a low-pass filter module, a signal inversion module, a voltage follower module, a proportional operation module, a PWM signal and a processor with a built-in post-stage sampling operation program module; the measurement signal is input into the voltage-controlled amplifier module, and after being amplified by a multiple, an AC voltage signal Ui is output to the proportional operation module; wherein the amplification multiple of the voltage-controlled amplifier module is controlled by a voltage signal, and the voltage signal is generated by the PWM signal through the low-pass filter module and the signal inversion module; the voltage follower module generates a DC voltage signal Udc, which is input into the proportional operation module, and the proportional operation module performs setting operation on the AC voltage signal Ui and the DC voltage signal Udc and outputs them to the processor, and the harmonic value is calculated by the post-stage sampling operation program module.
[0047] The voltage-controlled amplifier module includes a variable gain amplifier U2, and the measurement signal is input into the voltage-controlled amplifier module from the SIGNAL_INPUT port (i.e., U2 pin 1). The amplification factor of the voltage-controlled amplifier module is controlled by the voltage on U2 pin 3, and the voltage on pin 3 is generated by the PWM signal through the low-pass filter module and the signal inversion module. Pin 1 of U2 is electrically connected to pin 8 and a capacitor C3 is provided on the connection line. Pin 8 and pin 2 of U2 are grounded, and an AC voltage signal Ui is output at pin 5.
[0048] The low-pass filter module includes an operational amplifier U1A, and the PWM signal is input to U1A pin 3 after passing through two resistors R3 and R4. Pin 2 of the operational amplifier U1A is electrically connected to pin 1. A grounding branch is provided between resistors R3 and R4, and a capacitor C1 is provided on the grounding branch; another grounding branch is provided between resistor R4 and U1A pin 3, and a capacitor C2 is provided on the grounding branch. The control voltage can be adjusted by controlling the duty cycle of the PWM signal. The PWM signal is converted into a DC voltage after passing through the low-pass filter module and output at the pin 1 end.
[0049] Since the control voltage of the variable gain amplifier U2 is a negative voltage, it is necessary to convert the positive voltage into a negative voltage through a signal inversion module. The signal inversion module includes an operational amplifier U1B, and the positive DC signal output by the low-pass filter module is input to U1B pin 6 through a resistor R2. The pin 5 end of the operational amplifier U1B is connected to the ground after passing through a resistor R5. U1B pin 6 is electrically connected to pin 7 and a resistor R1 is provided on the connecting line. The positive DC signal output by the low-pass filter module is converted into a negative DC signal through the signal inversion module, and is output to pin 3 of the variable gain amplifier U2 at the pin 7 end.
[0050] The voltage follower module includes an operational amplifier U3B, pin 6 of U3B is electrically connected to pin 7, a voltage signal divided by resistors R10 and R11 is input to pin 5, a power signal with a set voltage value is input to the input side of resistor R10, and the output side of resistor R10 is divided into two paths, one path is input to resistor R11 and then grounded, and the other path is connected to pin 5 of U3B; the voltage follower module outputs a DC voltage signal Udc to the proportional operation module at pin 7 of the operational amplifier U3B.
[0051] The proportional operation module includes an operational amplifier U3A. Pin 2 of U3A is electrically connected to pin 1, and a resistor R6 is provided on the connection line. A grounding branch is also provided at the end of pin 2, and a resistor R7 is provided on the grounding branch. A grounding branch is also provided at the end of pin 1 of the operational amplifier U3A, and a diode D1 is provided on the grounding branch. The DC voltage signal Udc output by the voltage follower module is connected to the pin 3 end of the operational amplifier U3A after passing through a resistor R9, and the AC voltage signal Ui output by the voltage-controlled amplifier module is connected to the pin 3 end of the operational amplifier U3A after passing through a resistor R8. The proportional operation module forms a sampling signal output port, SIG_OUT port, at the pin 1 end of U3A, and inputs it into the processor, and the harmonic value is calculated by the post-stage sampling operation program module. The output end of the proportional operation module is connected to a clamping diode D1, which can prevent the SIG_OUT port from outputting a negative voltage when there is no measurement signal input, which affects the post-stage processor.
[0052] Since the processor at the back end only supports positive voltage, the proportional operation module is responsible for superimposing the AC signal and the DC voltage. In this embodiment, the operation formula implemented by the proportional operation module is SIG_OUT=3.1Ui+Udc, wherein the coefficient 3.1 is determined according to the set voltage range and is realized by designing the size of resistors R8 and R9; Udc is a 1.6V DC voltage, which is determined according to the set voltage range and is realized by designing the power supply size of resistors R10, R11 and the input resistor R10.
[0053] Please refer to Figure 2-Figure 4 Based on the adaptive signal harmonic measurement system described in this embodiment, the signal harmonic measurement method thereof includes the following steps:
[0054] S1) according to the frequency range of the measured signal, further obtaining a minimum frequency F1, which is the minimum value of the frequency range; for example, the frequency range is 1k~100kHz, and the minimum frequency F1 is 1kHz;
[0055] S2) Setting the sampling frequency to F2, which is an integer multiple of F1, to obtain the number of sampling points N = F2 / F1, N ≥ 100, preferably 1000. The more sampling points, the more accurate the measurement, but the larger the sampling frequency F2 of the system, the higher the cost; therefore, the sampling frequency can be flexibly determined according to actual conditions or needs, and then the number of sampling points can be determined; for example, the sampling frequency is 1MHz, and the number of sampling points is 1000;
[0056] S3) completing the set number of signal samplings according to the set sampling frequency, and obtaining a sampling signal formed by N point data; 1000 point data just covers an integer number of cycles of the measurement signal, and according to the sampling theorem, it can be known that the spectrum resolution after FFT transformation is exactly 1kHz;
[0057] S4) calculating the amplitude of the sampling signal; converting the point data into a voltage value, the amplitude being equal to the square sum of the voltage values corresponding to all the point data divided by N, and then multiplying the square root by a universal coefficient, the universal coefficient being determined according to the signal type of the measurement signal, and belonging to the prior art, and therefore, not further described in this embodiment;
[0058] S5) determining whether the signal amplitude calculated in step S4) is within a set range, which can be flexibly set according to the power supply voltage of the sampling circuit, and is generally slightly smaller than the power supply voltage of the sampling circuit; if so, executing step S6); if not, adjusting the amplification factor of the voltage-controlled amplification module so that the calculated signal amplitude is within the set range;
[0059] S6) collect N point data again and convert them into voltage values, and find the target value M closest to it according to N, the target value M is 2 to the power of n, for example, the 2 to the power of n closest to 1000 is 1024, then M=1024, insert (MN) data at equal intervals in the N point data, for example, if 24 data need to be inserted, then insert one data after every 40 data, and the inserted data value is equal to the average of the two previous and next data values, and obtain M point data; in this way, the original data can be fitted as much as possible; the interpolated data is 1024 points, which is equivalent to collecting 1024 point data within 1ms, and the spectrum resolution after FFT transformation is still 1kHz, so there will be no spectrum leakage problem for the analysis of 1kHz signal; if 1024 points are collected using a sampling rate of 1MHz, the spectrum resolution after transformation is 976Hz, so there will be leakage problem in the spectrum for the 1kHz measurement signal;
[0060] S7) converting the M point data into voltage values and performing FFT transformation to obtain a spectrum, and finding the fundamental frequency according to the spectrum data;
[0061] S8) obtaining the harmonic frequency from the fundamental frequency, extracting the harmonic value from the spectrum data according to the harmonic frequency, and completing the harmonic measurement.
[0062] In the step S5), the amplification factor of the voltage-controlled amplifier module is adjusted, which is mainly achieved by adjusting the duty cycle of the PWM signal. There are two ways:
[0063] Method 1: Calculate the adjusted amplification factor Anew = (U0 / U) × Aold, where U0 is the target amplitude, U is the current signal amplitude, and Aold is the current signal amplification factor; calculate the PWM duty cycle Duty based on the amplification factor:
[0064]
[0065] Among them, V cc is the system voltage, A is the maximum gain of the variable gain amplifier U2, and the unit is DB.
[0066] Method 2: Adjust the PWM duty cycle by the minimum step: Set the minimum step to 0.1%, and adjust the PWM duty cycle by 0.1%. After each adjustment, collect N point data again, calculate the amplitude and determine whether it is within the set range. Repeat this cycle until the calculated signal amplitude reaches the set range, then stop adjusting the PWM duty cycle. Adjusting the PWM duty cycle by 0.1% each time can prevent the adjustment amplitude from being too large.
[0067] The present embodiment provides an adaptive signal harmonic measurement system and method, which reduces the limitation of harmonic measurement, lowers the frequency and amplitude requirements of the measured signal, and can measure signals with frequency and amplitude changes within a range. Through the programmable gain amplifier circuit composed of a voltage-controlled amplifier module, a low-pass filter module, a signal inversion module, a voltage follower module, a proportional operation module and a PWM signal, in conjunction with the amplitude adjustment algorithm of the post-stage sampling operation program module inside the processor, a signal of any amplitude within a range can be adjusted to a suitable amplitude for sampling, and the measurement accuracy will not be reduced due to the signal amplitude being too large or too small; for the measurement of higher frequency signals, the use of an interpolation algorithm can reduce the requirements for the sampling frequency. For example, when measuring the 4th harmonic of a 100kHz signal, the sampling frequency needs to be greater than 800k, and the number of calculation points of the FFT needs to be 512, 1024, etc., which is the nth power of 2. The traditional method needs to set the sampling frequency to 1.024MHz or 2.048MHz, etc., and these sampling frequencies have high hardware requirements when implemented; after adopting the interpolation algorithm proposed by the method, the requirements can be achieved using a 1MHz sampling frequency, and after collecting 1000 points of data, the data can be interpolated and padded to 1024 points. The hardware implementation of the 1MHz sampling rate is relatively easy, which reduces the hardware design cost.
[0068] The present embodiment provides an adaptive signal harmonic measurement system and method, which can adaptively measure signal harmonics, and can adaptively adjust the signal amplitude when the amplitude and frequency of the measured signal change, and reduce the sampling frequency requirement through the interpolation algorithm, so as to conveniently measure the harmonics of unknown signals within the measurement range. Specifically,
[0069] 1) In order to solve the problem that the signal amplitude has a large variation range and is difficult to measure, this method proposes a programmable gain amplifier circuit and a corresponding amplitude adjustment algorithm. The system automatically adjusts the amplification factor according to the amplitude of the measured signal, increases the amplification factor for small signals, and reduces the amplification factor for large signals; the amplitude of the measured signal is adjusted to within the set range to ensure the accuracy of subsequent calculations;
[0070] 2) In order to solve the problem of difficulty in measuring signal frequency changes, this method proposes a data interpolation algorithm. After the system measures the signal frequency, it interpolates the measured data without adjusting the sampling rate according to the frequency. This solves the spectrum leakage problem caused by inaccurate sampling frequency after the signal frequency is increased.
[0071] The above are only some embodiments of the present invention. For those skilled in the art, several modifications and improvements can be made without departing from the creative concept of the present invention, which all belong to the protection scope of the present invention.
Claims
1. An adaptive signal harmonic measurement system, characterized in that: It includes a voltage-controlled amplifier module, a low-pass filter module, a signal inversion module, a voltage follower module, a proportional operation module, a PWM signal and a processor with a built-in post-stage sampling operation program module; a measurement signal is input into the voltage-controlled amplifier module, and after being amplified by a multiple, an AC voltage signal Ui is output to the proportional operation module; wherein the amplification multiple of the voltage-controlled amplifier module is controlled by a voltage signal, and the voltage signal is generated by the PWM signal after passing through the low-pass filter module and the signal inversion module; the voltage follower module generates a DC voltage signal Udc which is input into the proportional operation module, and the proportional operation module performs setting operation on the AC voltage signal Ui and the DC voltage signal Udc and then outputs them to the processor, and the harmonic value is calculated by the post-stage sampling operation program module; The amplification factor of the voltage-controlled amplifier module is adjusted by adjusting the duty cycle of the PWM signal. Adjusting the duty cycle of the PWM signal includes: calculating the adjusted amplification factor Anew=(U0 / U)×Aold, where U0 is the target amplitude, U is the current signal amplitude, and Aold is the current signal amplification factor; and calculating the PWM duty cycle Duty according to the adjusted amplification factor Anew: ; Among them, V cc is the system voltage, A is the maximum gain of the voltage-controlled amplifier module, and the unit is DB.
2. The adaptive signal harmonic measurement system according to claim 1, characterized in that: The voltage-controlled amplifier module includes a variable gain amplifier U2; The measurement signal is input into the voltage-controlled amplifier module from pin 1 of U2, and the PWM signal is input into pin 3 of U2 after passing through the low-pass filter module and the signal inversion module; pin 1 of U2 is electrically connected to pin 8 and a capacitor C3 is provided on the connecting line, pin 8 and pin 2 of U2 are grounded, and the AC voltage signal Ui is output at pin 5.
3. The adaptive signal harmonic measurement system according to claim 1, characterized in that: The low-pass filter module includes an operational amplifier U1A; The PWM signal is input to U1A pin 3 after passing through resistors R3 and R4, pin 2 of U1A is electrically connected to pin 1, a grounding branch is provided between resistors R3 and R4, and capacitor C1 is provided on the grounding branch; another grounding branch is provided between resistor R4 and U1A pin 3, and capacitor C2 is provided on the grounding branch; the PWM signal is converted into a DC voltage after passing through the low-pass filter module and is output at pin 1 of U1A.
4. The adaptive signal harmonic measurement system according to claim 1, characterized in that: The signal inversion module includes an operational amplifier U1B; The positive DC signal output by the low-pass filter module is input to U1B pin 6 through resistor R2, and pin 5 of U1B is grounded after passing through a resistor R5. Pin 6 of U1B is electrically connected to pin 7 and a resistor R1 is provided on the connecting line; the positive DC signal output by the low-pass filter module is formed into a negative DC signal through the signal inversion module and output at pin 7 of U1B.
5. The adaptive signal harmonic measurement system according to claim 1, characterized in that: The voltage follower module includes an operational amplifier U3B; Pin 6 of U3B is electrically connected to pin 7, a voltage signal divided by resistors R10 and R11 is input to pin 5, a power signal with a set voltage value is input to the input side of resistor R10, and the output side of resistor R10 is divided into two paths, one path is input to resistor R11 and then grounded, and the other path is connected to pin 5 of U3B; the voltage follower module outputs the DC voltage signal Udc to the proportional operation module at pin 7 of the operational amplifier U3B.
6. The adaptive signal harmonic measurement system according to claim 1, characterized in that: The proportional operation module includes an operational amplifier U3A; Pin 2 of U3A is electrically connected to pin 1, and a resistor R6 is provided on the connecting line. A grounding branch is also provided at the end of pin 2, and a resistor R7 is provided on the grounding branch; a grounding branch is also provided at the end of pin 1 of U3A, and a diode D1 is provided on the grounding branch; the DC voltage signal Udc output by the voltage follower module is connected to the pin 3 end of the operational amplifier U3A after passing through a resistor R9, and the AC voltage signal Ui output by the voltage-controlled amplifier module is connected to the pin 3 end of the operational amplifier U3A after passing through a resistor R8, and the proportional operation module forms a sampling signal output port at the pin 1 end of U3A, inputs the sampling signal into the processor, and calculates the harmonic value through the post-stage sampling operation program module.
7. An adaptive signal harmonic measurement method, characterized in that: The measurement is performed based on the adaptive signal harmonic measurement system according to claim 1, and the measurement method comprises the following steps: S1) According to the frequency range of the measured signal, the minimum frequency is F1; S2) Set the sampling frequency to F2, which is an integer multiple of F1, and calculate the number of sampling points N = F2 / F1; S3) sampling the signal according to the sampling frequency F2 to obtain a sampling signal formed by N point data; S4) Calculate the amplitude of the sampled signal; S5) determining whether the signal amplitude calculated in step S4) is within a set range, if so, executing step S6), if not, adjusting the amplification factor of the voltage-controlled amplifier module by adjusting the duty cycle of the PWM signal so that the calculated signal amplitude is within the set range, and then executing step S6); S6) collect N point data again and convert them into voltage values, find the target value M closest to it according to N, the target value M is 2 to the power of n, insert MN data evenly at equal intervals in the N point data, the inserted data value is equal to the average of the two previous and next data values, and obtain M point data; S7) converting the M point data into voltage values and performing FFT transformation to obtain a spectrum, and finding the fundamental frequency according to the spectrum data; S8) The harmonic frequency is obtained from the fundamental frequency, and the harmonic value is extracted from the spectrum data according to the harmonic frequency to complete the harmonic measurement.
8. The adaptive signal harmonic measurement method according to claim 7, characterized in that: In the step S5), adjusting the duty cycle of the PWM signal includes: setting a minimum step size, adjusting the duty cycle of the PWM with the minimum step size, and after each adjustment, sampling and calculating the amplitude again and determining whether it is within the set range, and repeating this cycle until the calculated signal amplitude reaches the set range, then stopping adjusting the duty cycle of the PWM.
9. The adaptive signal harmonic measurement method according to claim 8, characterized in that: The minimum step size is 0.1%.
Citation Information
Patent Citations
Double-spectral-line interpolation DFT harmonic analysis method and system based on spectral resolution self-adaption and medium
CN111308199A
Harmonic measurement methods, electronic devices, and storage media based on dual spectral line transformation
CN113640579B
System and method for controlling electric energy quality stability of power distribution network
CN102468653A
An operational amplifier automatic gain control benefit circuit and a control system
CN109698678A
Self-adaptive signal processing system and method of clip-on ammeter
CN115932355A
