An Improved Method for Detecting AC Distortion Coefficient
Through the method based on nonlinear optimization, the problem of large calculation error of the AC fundamental wave component in the traditional method is solved. The simplex descent method is used to calculate the fundamental wave signal value, achieving higher-precision AC distortion value detection and improving the detection accuracy. .
Patent Information
- Application Number
- CN202110675491.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-17
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2041-06-17
AI Technical Summary
Traditional AC distortion detection methods have large errors when calculating the amplitude and phase of the AC fundamental wave component, which affects detection accuracy and results in inaccurate detection of AC distortion values.
Using a method based on nonlinear optimization, the sum of square errors between the signal sampling value and the fundamental wave component is defined as a function of the amplitude and phase of the fundamental wave component. The optimization problem is solved through the simplex descent method, and the fundamental wave signal value is calculated and the AC Distortion value.
The accuracy of AC distortion value detection is improved. Through higher theoretical calculation accuracy, the AC distortion value can be accurately calculated, thereby improving detection accuracy.
Smart Images

Figure CN113406379B
Abstract
Description
Technical Field
[0001] The invention belongs to the field of electrical signal detection, and in particular relates to an improved method for detecting an alternating current distortion coefficient. Background Art
[0002] Ideally, AC power only contains a fundamental component of a fixed frequency, and its waveform should be a sine wave containing only a fixed fundamental frequency. However, during power transmission and use, electrical equipment often introduces higher-order harmonic components, causing the AC waveform to change, which is called AC distortion. This waveform change will reduce the quality of power supply and affect the performance indicators of electrical equipment. Therefore, the national military standards (GJB 181B-2012, GJB5189-2003) and aerospace industry standards (QJ_3233-2005) all require the detection of AC distortion. The existing standard algorithm for AC distortion detection is: sample the AC signal to be tested at a set sampling rate, and record the sampled signal as u i , a total of n sampling values are obtained. Assume that at each sampling point, the true value of the AC fundamental component signal is:
[0003]
[0004] Where Δt is the sampling time interval, frequency f is the fixed and known AC fundamental frequency, A is the amplitude of the AC fundamental component signal, and θ is the phase of the AC fundamental component signal. A and θ are unknown and need to be obtained from the original sampling data. Calculate the AC distortion value at each sampling point
[0005]
[0006] Calculate the distortion value of AC signal
[0007] Where T is the total sampling time and Δt is the sampling cycle time.
[0008] The core of AC distortion value detection calculation accuracy lies in accurately obtaining the fundamental component from the original sampling signal, so as to accurately calculate the difference u of each sampling point JJi And AC distortion value U JJ The frequency of the AC fundamental component is fixed and known, but its amplitude and phase are unknown and need to be calculated from the original sampled signal. Traditional methods usually calculate the amplitude through mean filtering and calculate the phase through zero crossing, which results in a relatively large calculation error of the AC fundamental signal, thus affecting the detection of the AC distortion value. Summary of the invention
[0009] The present invention aims to solve the above problems and provides a fundamental component calculation method based on nonlinear optimization, which is a new AC distortion value calculation method that can more accurately fit the amplitude and phase of the fundamental component from the original sampling data.
[0010] The improved method for detecting AC distortion coefficient of the present invention is characterized in that the sum of squares of errors between the signal sampling value and the fundamental wave component is defined as a function of the amplitude and phase of the fundamental wave component:
[0011]
[0012] The fundamental component should minimize the sum of squares of the error. The problem of solving the amplitude and phase of the AC fundamental component can be converted into the following optimization problem:
[0013]
[0014] The simplex descent method is used to solve the optimization problem. Calculate (A, θ) and substitute it into formula (1) and formula (2) to obtain the fundamental signal value of each sampling point. Then calculate the value of each sampling point Then calculate U by formula (3) JJ .
[0015] Furthermore, in the improved method for detecting AC distortion coefficient of the present invention, the simplex descent method is used to solve the optimization problem, and the solution process for calculating (A, θ) is:
[0016] 1) Calculate the initial value A0 of the AC fundamental wave signal amplitude:
[0017]
[0018] 2) Calculate the initial phase value θ0 of the AC fundamental signal by the zero-crossing method, that is, find the first sampling point i0 from the sampled signal so that u i0-1 <0andu i0 ≥0, let θ0=2πfΔti0;
[0019] 3) Construct three initial solutions, x1 = (A0, θ0), x2 = (1.01A0, θ0),
[0020]
[0021] Consider the total sum of squared sampling errors as a function of x, E(x), substitute x1, x2, and x3 into formula (4), and calculate the corresponding error values E(x1), E(x2), and E(x3);
[0022] 4) Select the solution corresponding to the maximum value and the solution corresponding to the minimum value in E(x1), E(x2), and E(x3), and record them as x maxand x min , the remaining solution is denoted as x norm ;
[0023] Calculate the central solution x max Relative to The symmetry point is Where t is a real number;
[0024] 5) Let t = 1, calculate the symmetric point And the error
[0025] In step 5), the following situations need to be considered:
[0026] f) If Then accept the symmetric point and use it to update x max ,Right now
[0027] g) If Then let t = 2 and calculate the symmetric point if Then Otherwise,
[0028] h) If Then let t = 0.5 and calculate the symmetric point if Then Otherwise, go to step e;
[0029] i) If Then let t = -0.5 and calculate the symmetric point if Then Otherwise, go to step e;
[0030] j) Let x max and x norm Towards x min Contraction, that is Right now
[0031] 6) After completing the calculation and update of step 5), if E(x max )-E(x min )<∈, where ∈ is the calculation accuracy threshold, then the iterative calculation is stopped and x min The amplitude A and phase θ in are taken as the solution of the optimization problem formula (5);
[0032] Otherwise, let x1 = x max , x2=x max , x3=x norm , repeat step 4);
[0033] 7) Substitute the calculated (A, θ) into formula (1) and formula (2) to obtain the fundamental signal value of each sampling point Then calculate the value of each sampling point Then calculate U by formula 3) JJ , the result is the AC distortion value.
[0034] The improved method for detecting AC distortion coefficients of the present invention is based on nonlinear optimization to fit and solve the AC fundamental wave component from the sampled data, and then calculate the AC distortion value based on this. Since the AC fundamental wave component fitting method based on nonlinear optimization has higher theoretical calculation accuracy, this method is an effective improvement method for the AC distortion value detection calculation method, and can calculate the AC distortion value more accurately, thereby improving the accuracy of AC distortion detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 The schematic diagram of the simple descent method of the present invention; wherein a is x max Updated to b is x max Updated to c is x max Updated to d is x max Updated to e is x max ,x norm Shrink to and
[0036] Figure 2 This is a schematic diagram of voltage sampling values according to an embodiment of the present invention. DETAILED DESCRIPTION
[0037] The improved method for detecting AC distortion coefficients of the present invention defines the sum of squares of errors between the signal sampling value and the fundamental component as a function of the amplitude and phase of the fundamental component:
[0038]
[0039] The fundamental component should minimize the sum of squares of the error. The problem of solving the amplitude and phase of the AC fundamental component can be converted into the following optimization problem:
[0040]
[0041] The simplex descent method is used to solve the optimization problem. The solution process for calculating (A, θ) is:
[0042] 1) Calculate the initial value A0 of the AC fundamental wave signal amplitude:
[0043]
[0044] 2) Calculate the initial phase value θ0 of the AC fundamental signal by the zero-crossing method, that is, find the first sampling point i0 from the sampled signal so that u i0-1 <0andu i0 ≥0, let θ0=2πfΔti0;
[0045] 3) Construct three initial solutions, x1 = (A0, θ0), x2 = (1.01A0, θ0),
[0046]
[0047] Consider the total sum of squared sampling errors as a function of x, E(x), substitute x1, x2, and x3 into formula (4), and calculate the corresponding error values E(x1), E(x2), and E(x3);
[0048] 4) Select the solution corresponding to the maximum value and the solution corresponding to the minimum value in E(x1), E(x2), and E(x3), and record them as x max and x min , the remaining solution is denoted as x norm ;
[0049] Calculate the central solution x max Relative to The symmetry point is Where t is a real number;
[0050] 5) Let t = 1, calculate the symmetric point And the error
[0051] In step 5), the following situations need to be considered:
[0052] k) If Then accept the symmetric point and use it to update x max ,Right now like Figure 1 As shown in a;
[0053] i) If Then let t = 2 and calculate the symmetric point if Then like Figure 1 As shown in b, otherwise
[0054] m) If Then let t = 0.5 and calculate the symmetric point if Then like Figure 1As shown in c, otherwise go to step e;
[0055] n) If Then let t = -0.5 and calculate the symmetric point if Then like Figure 1 As shown in step d, otherwise go to step e;
[0056] o) Let x max and x norm Towards x min Contraction, that is Right now like Figure 1 As shown in e;
[0057] 6) After completing the calculation and update of step 5), if E(x max )-E(x min )<∈, where ∈ is the calculation accuracy threshold, then the iterative calculation is stopped and x min The amplitude A and phase θ in are taken as the solution of the optimization problem formula (5);
[0058] Otherwise, let x1 = x max , x2=x max , x3=x norm , repeat step 4);
[0059] 7) Substitute the calculated (A, θ) into formula (1) and formula (2) to obtain the fundamental signal value of each sampling point Then calculate the value of each sampling point Then calculate U by formula 3) JJ , the result is the AC distortion value.
[0060] In this embodiment, the AC power to be tested is a 400Hz airborne medium frequency AC power with an amplitude of 115V, superimposed with white noise between -10V and 10V. The AC power is sampled continuously for 1s at a sampling rate of 1MHz. During the sampling process, the true phase of the fundamental component is 40°. Figure 2 The figure shows the first two cycles of the AC signal;
[0061] The calculation process of the improved method for detecting AC distortion coefficient according to the present invention is as follows:
[0062] 1) Calculate the initial amplitude and phase values: The initial value of the AC fundamental amplitude is calculated by formula (6) as A0 = 115.28. By searching for the first positive zero crossing point, the initial phase value is calculated as θ0 = 38.02.
[0063] 2) Establish the initial solution simplex: x1 = (115.28, 38.02), x2 = (116.43, 38.02), x3 = (115.28, 56.02).
[0064] 3) The error of calculating each vertex of the simplex is E(x1)=4543.55, E(x2)=4602.45, E(x3)=16556.01.
[0065] Since x3 has the largest error, the symmetric point of the solution with respect to (x1+x2) / 2 is calculated. Let t=1, the symmetric point is The error is because So let t = -0.5 and calculate the symmetric point as The error is because Accept this solution and set x3 = (115.56, 47.02).
[0066] 4) Let ∈ = 10 -6 Since E(x3)-E(x1)>∈, the iterative calculation is continued until the accuracy requirement is met. For this embodiment, after the iterative calculation is completed, the calculated amplitude A=114.984 and the phase θ=39.995 are highly close to the true value.
[0067] 5) Substitute (A,θ) = (114.984, 39.995) into formula (1) and formula (2) to obtain the fundamental signal value of each sampling point. Then calculate the value of each sampling point Then calculate U by formula (3) JJ =7.31, and the result is the AC distortion value of the AC signal in this example.
Claims
1. An improved method for detecting AC distortion coefficient, characterized in that: The sum of squares of the errors between the signal sampling value and the fundamental component is defined as a function of the amplitude and phase of the fundamental component: Where A is the amplitude of the AC fundamental component signal; θ is the phase of the AC fundamental component signal; n is the number of sampling values; Δt is the sampling time interval; f is the fixed and known AC fundamental frequency; the AC signal to be measured is sampled at the set sampling rate, and the sampled signal is u i ; The fundamental component should minimize the sum of squares of the error. The problem of solving the amplitude and phase of the AC fundamental component can be converted into the following optimization problem: The simplex descent method is used to solve the above optimization problem. The solution process for calculating (A, θ) is: 1) Calculate the initial value A0 of the AC fundamental wave signal amplitude: Where T is the total sampling time; 2) Calculate the initial phase value θ0 of the AC fundamental signal by the zero-crossing method, that is, find the first sampling point i0 from the sampled signal so that u i0-1 <0andu i0 ≥0, let θ0=2πfΔti0; 3) Construct three initial solutions, x1 = (A0, θ0), x2 = (1.01A0, θ0), Consider the total sum of squared sampling errors as a function of x, E(x), substitute x1, x2, and x3 into formula (4), and calculate the corresponding error values E(x1), E(x2), and E(x3); 4) Select the solution corresponding to the maximum value and the solution corresponding to the minimum value in E(x1), E(x2), and E(x3), and record them as x max and x min , the remaining solution is denoted as x norm ; Calculate the central solution x max Relative to The symmetry point is Where t is a real number; 5) Let t = 1, calculate the symmetric point And the error In step 5), the following situations need to be considered: a) If Then accept the symmetric point and use it to update x max ,Right now b) If Then let t = 2 and calculate the symmetric point if Then Otherwise, c) If Then let t = 0.5 and calculate the symmetric point if Then Otherwise, go to step e; d) If Then let t = -0.5 and calculate the symmetric point if Then Otherwise, go to step e; e) Let x max and x norm Towards x min Contraction, that is Right now 6) After completing the calculation and update of step 5), if E(x max )-E(x min )<∈, where ∈ is the calculation accuracy threshold, then the iterative calculation is stopped and x min The amplitude A and phase θ in are taken as the solution of the optimization problem formula (5); otherwise, let x1 = x max , x2=x max , x3=x norm , repeat step 4); 7) Substitute the calculated value (A,θ) into the formula Get the fundamental signal value of each sampling point Then calculate the AC distortion value at each sampling point Then by the formula Calculate the distortion value U of the AC signal JJ , the result is the AC distortion value.
