A single-phase sinusoidal signal parameter synchronous detection method

CN122983443APending Publication Date: 2026-10-27INSTRUMENTATION TECHNOLOGY (GUANGZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611099961.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-23
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0005]本申请提供一种单相正弦信号参数同步检测方法,旨在解决含直流偏置的单相正弦信号中直流分量、交流幅值和相位难以快速同步检测,且现有检测方式存在检测精度易受直流偏置影响、动态响应较慢或相位滞后的技术问题

Benefits of technology

[0021]本申请实施例提供一种单相正弦信号参数同步检测方法,以固定采样周期对被测单相正弦信号进行连续采样,得到依次采集的第一采样值、第二采样值和第三采样值,并根据信号频率与固定采样周期确定相邻采样值之间的固定相位差,使相邻采样值之间的变化关系能够由固定相位差对应的中间系数表征;在此基础上,由第二采样值与第一采样值作差得到第一采样差值,并由第三采样值与第二采样值作差得到第二采样差值,由于直流分量在相邻采样值中表现为共同叠加量,通过相邻采样差值能够消去直流分量对交流幅值和相位求解的影响,从而基于第一采样差值、第二采样差值和中间系数求解得到第一采样值对应采样时刻的第一正交投影量和第二正交投影量;进一步地,根据第一正交投影量和第二正交投影量确定交流幅值和相位,根据第一采样值和第一正交投影量确定直流分量,并在获取新的采样值后通过滑动更新持续更新直流分量、交流幅值和相位,因此,本申请能够在不依赖长时间窗口检测和滤波预处理的情况下,实现含直流分量的单相正弦信号参数同步更新,降低直流分量对交流幅值和相位检测准确性的影响,提高参数检测的动态响应速度,并避免滤波处理引入相位滞后的问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122983443A_ABST
    Figure CN122983443A_ABST
Patent Text Reader

Abstract

The application provides a single-phase sinusoidal signal parameter synchronous detection method, and relates to the field of electronic measurement and signal processing. The method comprises the following steps: continuously sampling a measured single-phase sinusoidal signal at a fixed sampling period to obtain a first sampling value, a second sampling value and a third sampling value; determining a fixed phase difference according to a signal frequency and the fixed sampling period, and determining an intermediate coefficient according to the fixed phase difference; solving a first orthogonal projection quantity and a second orthogonal projection quantity based on the first sampling difference value, the second sampling difference value and the intermediate coefficient; determining an alternating current amplitude and a phase according to the first orthogonal projection quantity and the second orthogonal projection quantity, determining a direct current component according to the first sampling value and the first orthogonal projection quantity, and synchronously updating through a new sampling value. The method provided by the application can eliminate the influence of the direct current component on the solution of the alternating current amplitude and the phase, and improve the real-time performance and the accuracy of parameter detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic measurement and signal processing technology, and in particular to a method for synchronous detection of single-phase sinusoidal signal parameters. Background Technology

[0002] In power electronic equipment, motor drive systems, industrial control systems, and power quality monitoring equipment, parameter detection of single-phase sinusoidal voltage or current signals is a crucial foundation for operational control, condition monitoring, and fault diagnosis. Typically, control or detection systems need to obtain parameters such as AC amplitude and phase from sampled signals, using these as the basis for synchronous control, protection actions, power calculations, or condition analysis. Therefore, the accuracy and real-time performance of single-phase sinusoidal signal parameter detection results directly affect the control precision and operational stability of related equipment.

[0003] In related technologies, single-phase sinusoidal signal parameter detection can typically be achieved through methods such as periodic sampling calculation, filtering, orthogonal transformation, frequency domain analysis, or rapid estimation. Periodic sampling calculation and frequency domain analysis methods usually rely on sampling data within a relatively long time window. When the signal state changes, the detection result update speed is relatively slow, making it difficult to meet the real-time detection requirements in highly dynamic control scenarios. Filtering can improve the influence of bias or interference in the signal to some extent, but the filtering process may introduce phase lag or amplitude changes, affecting the accuracy of subsequent phase synchronization and amplitude judgment. Although some rapid estimation methods have high response speed and low computational resource consumption, they are prone to detection deviations due to inconsistencies between the signal model and the actual signal when there are zero-point drift, bias errors, or DC superposition components in the actual sampling link.

[0004] Therefore, in single-phase sinusoidal signal parameter detection, the DC bias in the actual signal can easily affect the accuracy of AC amplitude and phase detection, the dynamic response of long-term window detection is slow, and the filtering process can easily introduce phase lag, which are problems that urgently need to be solved. Summary of the Invention

[0005] This application provides a method for synchronous detection of parameters of a single-phase sinusoidal signal, which aims to solve the problem that it is difficult to quickly and synchronously detect the DC component, AC amplitude and phase in a single-phase sinusoidal signal with DC bias, and that existing detection methods have technical problems such as the detection accuracy being easily affected by DC bias, slow dynamic response or phase lag.

[0006] In a first aspect, this application provides a method for synchronous detection of single-phase sinusoidal signal parameters, the method comprising: The single-phase sinusoidal signal under test is continuously sampled at a fixed sampling period to obtain the first sample value, the second sample value, and the third sample value acquired in sequence. Based on the signal frequency of the measured single-phase sinusoidal signal and the fixed sampling period, a fixed phase difference between adjacent sampled values ​​is determined; Based on the fixed phase difference, intermediate coefficients are determined, which are used to characterize the correspondence between adjacent sampling differences and the orthogonal projection of AC components; Based on the first sampling difference, the second sampling difference, and the intermediate coefficient, the first orthogonal projection and the second orthogonal projection of the AC component of the measured single-phase sinusoidal signal at the sampling time corresponding to the first sampling value are obtained. The first sampling difference is the difference between the second sampling value and the first sampling value, and the second sampling difference is the difference between the third sampling value and the second sampling value. The first sampling difference and the second sampling difference are used to eliminate the influence of the DC component in the measured single-phase sinusoidal signal. The AC amplitude and phase of the measured single-phase sinusoidal signal are determined based on the first orthogonal projection and the second orthogonal projection. The DC component of the measured single-phase sinusoidal signal is determined based on the first sampled value and the first orthogonal projection. A new sample value is acquired, and the first sample value, the second sample value, and the third sample value are updated with the second sample value, the third sample value, and the new sample value to synchronously update the DC component, AC amplitude, and phase of the measured single-phase sinusoidal signal.

[0007] In one possible design, the measured single-phase sinusoidal signal includes an AC component and a DC component; The signal frequency is a preset frequency, a system-given frequency, the output frequency of the frequency detection module, or the output frequency of the phase-locked loop module.

[0008] In one possible design, determining the fixed phase difference between adjacent sampled values ​​based on the signal frequency of the measured single-phase sinusoidal signal and the fixed sampling period includes: Based on the signal frequency, determine the angular frequency of the measured single-phase sinusoidal signal; The fixed phase difference is determined by multiplying the angular frequency by the fixed sampling period; Based on the fixed phase difference, determine the sine and cosine values ​​corresponding to the fixed phase difference.

[0009] In one possible design, determining the intermediate coefficients based on the fixed phase difference includes: The cosine value corresponding to the fixed phase difference is determined as the first fundamental coefficient, and the sine value corresponding to the fixed phase difference is determined as the second fundamental coefficient. Based on the first basic coefficient and the second basic coefficient, determine the first difference coefficient, the second difference coefficient, the third difference coefficient and the fourth difference coefficient; The discriminant of the denominator is determined based on the first difference coefficient, the second difference coefficient, the third difference coefficient, and the fourth difference coefficient. The intermediate coefficients include the first basic coefficient, the second basic coefficient, the first difference coefficient, the second difference coefficient, the third difference coefficient, the fourth difference coefficient, and the denominator discriminant.

[0010] In one possible design, the first difference coefficient m1 = C-1; The second difference coefficient n1 = S; The third difference coefficient m2 = 2C² - C - 1; The fourth difference coefficient n2 = S(2C-1); The discriminant in the denominator is Δ = m1·n2 - m2·n1; Wherein, C represents the first basic coefficient, and S represents the second basic coefficient.

[0011] In one possible design, the step of calculating the first orthogonal projection and the second orthogonal projection of the AC component of the measured single-phase sinusoidal signal at the sampling time corresponding to the first sample value, based on the first sampling difference, the second sampling difference, and the intermediate coefficient, includes: Based on the first difference coefficient and the second difference coefficient, a first linear relationship is established between the first sampling difference and the first orthogonal projection quantity and the second orthogonal projection quantity; Based on the third difference coefficient and the fourth difference coefficient, a second linear relationship is established between the second sampling difference and the first orthogonal projection quantity and the second orthogonal projection quantity; Based on the first linear relationship and the second linear relationship, the first orthogonal projection quantity and the second orthogonal projection quantity are obtained.

[0012] In one possible design, the first orthogonal projection X = (d1×n2 - d2×n1) / Δ The second orthogonal projection quantity Y=(m1×d2-m2×d1) / Δ

[0013] in, This represents the first sampling difference. This represents the second sampling difference.

[0014] In one possible design, determining the AC amplitude and phase of the measured single-phase sinusoidal signal based on the first orthogonal projection and the second orthogonal projection includes: The sum of squares is determined by the sum of the squares of the first orthogonal projection and the squares of the second orthogonal projection. The AC amplitude is determined based on the square root of the sum of squares. Perform a four-quadrant arctangent operation based on the first orthogonal projection and the second orthogonal projection to determine the phase of the sampling time corresponding to the first sampled value; The phase of the measured single-phase sinusoidal signal at the target sampling time is determined based on the phase of the first sampled value at the corresponding sampling time and the fixed phase difference.

[0015] In one possible design, determining the DC component of the measured single-phase sinusoidal signal based on the first sampled value and the first orthogonal projection includes: The difference between the first sampled value and the first orthogonal projection is determined as the DC component of the measured single-phase sinusoidal signal.

[0016] In one possible design, the method further includes: performing digital low-pass filtering or moving average processing on the continuously determined DC component and / or AC amplitude to obtain the filtered parameter detection result.

[0017] Secondly, this application provides a single-phase sinusoidal signal parameter synchronization detection device, comprising: a module for performing the aforementioned first aspect or various possible designs of the first aspect of the method embodiments.

[0018] Thirdly, this application provides an electronic device, including: a memory and at least one processor; The memory stores computer-executed instructions; The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the method described in the first aspect or various possible designs of the first aspect.

[0019] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed, implement the method described in the first aspect or various possible designs of the first aspect.

[0020] Fifthly, this application provides a computer program product, which includes computer program code that, when run on a computer, causes the computer to implement the method described in the first aspect or various possible designs of the first aspect.

[0021] This application provides a method for synchronous detection of single-phase sinusoidal signal parameters. The method continuously samples the single-phase sinusoidal signal under test at a fixed sampling period, obtaining sequentially acquired first, second, and third sample values. A fixed phase difference is determined between adjacent sample values ​​based on the signal frequency and the fixed sampling period, allowing the relationship between adjacent sample values ​​to be characterized by an intermediate coefficient corresponding to the fixed phase difference. Furthermore, a first sampling difference is obtained by subtracting the second and first sample values, and a second sampling difference is obtained by subtracting the third and second sample values. Since the DC component is a superposition in adjacent sample values, the influence of the DC component on the AC amplitude and phase calculation can be eliminated through the adjacent sampling difference, thereby ensuring the accuracy of the detection. The first orthogonal projection and the second orthogonal projection at the sampling time corresponding to the first sample value are obtained by solving the first sampling difference, the second sampling difference, and the intermediate coefficient. Further, the AC amplitude and phase are determined according to the first orthogonal projection and the second orthogonal projection, and the DC component is determined according to the first sample value and the first orthogonal projection. After acquiring a new sample value, the DC component, AC amplitude, and phase are continuously updated by sliding update. Therefore, this application can realize the synchronous update of single-phase sinusoidal signal parameters containing DC components without relying on long-term window detection and filtering preprocessing, reduce the impact of DC components on the accuracy of AC amplitude and phase detection, improve the dynamic response speed of parameter detection, and avoid the problem of phase lag introduced by filtering processing. Attached Figure Description

[0022] Figure 1 A flowchart illustrating a method for synchronous detection of single-phase sinusoidal signal parameters provided in an embodiment of this application; Figure 2 A schematic diagram showing the comparison of parameter detection effects of a single-phase sinusoidal signal containing a DC component, provided for an embodiment of this application; Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0024] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims and drawings of this application are intended to cover non-exclusive inclusion.

[0025] The term "embodiment" as used herein means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of the phrase "embodiment" in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0026] In this article, the term "and / or" simply describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists, A and B can exist simultaneously, and B exists. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0027] Furthermore, the terms "first," "second," etc., in the specification and claims of this application or in the aforementioned drawings are used to distinguish different objects rather than to describe a specific order, and may explicitly or implicitly include one or more of the features.

[0028] In the description of this application, unless otherwise stated, "multiple" and "at least two" mean two or more (including two), and similarly, "multiple groups" and "at least two groups" mean two or more (including two groups).

[0029] In the description of this application, it should be noted that, unless otherwise explicitly specified and limited, the terms "connected" and "linked" should be interpreted broadly. For example, "connected" or "linked" can refer not only to a physical connection, but also to an electrical connection or a signal connection. For instance, it can be a direct connection, i.e., a physical connection, or an indirect connection through at least one intermediate component, as long as the circuit is connected. It can also refer to the internal connection between two components. A signal connection can refer not only to a signal connection through a circuit, but also to a signal connection through a medium, such as radio waves. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.

[0030] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. It should be noted that, unless otherwise specified, different technical features in this application can be combined with each other.

[0031] Figure 1 This is a flowchart illustrating a method for synchronous detection of single-phase sinusoidal signal parameters provided in an embodiment of this application. Figure 1 As shown, the method includes S101 to S107, and S101 to S107 are described in detail below.

[0032] It should be noted that this method can be executed by a single-phase sinusoidal signal parameter synchronization detection device, which may include a sensor, a signal conditioning circuit, an analog-to-digital converter (ADC), and a digital signal processor (DSP). The sensor is used to acquire the measured voltage or current signal; the signal conditioning circuit is used to amplify, limit, adjust the bias, or perform anti-aliasing processing on the acquired signal; the ADC is used to convert the analog signal into digital sample values ​​according to a fixed sampling period; and the DSP is used to execute the subsequent parameter synchronization detection process. The DSP can be a microcontroller, an ARM processor, or a field-programmable gate array (FPGA), or other processing units with data processing capabilities.

[0033] S101. The single-phase sinusoidal signal under test is continuously sampled at a fixed sampling period to obtain the first sample value, the second sample value and the third sample value collected in sequence.

[0034] Specifically, the single-phase sinusoidal signal being measured can be a single-phase sinusoidal voltage signal or a single-phase sinusoidal current signal.

[0035] The single-phase sinusoidal signal parameter synchronization detection device triggers the analog-to-digital converter to continuously sample according to a fixed sampling period, and uses the three sampled values ​​obtained in sequence during the continuous sampling process as the first sampled value, the second sampled value, and the third sampled value. Since the sampling period is fixed, the first sampled value, the second sampled value, and the third sampled value correspond to three consecutive sampling moments, and the time interval between adjacent sampling moments is a fixed sampling period.

[0036] In one implementation, the digital signal processor can read the sampling results output by the analog-to-digital converter when a sampling interrupt is triggered, and save the sampled values ​​obtained from continuous sampling in a buffer.

[0037] For example, when the requirement of three sample values ​​is met for the first time, the earliest sample value is used as the first sample value, the subsequent sample value is used as the second sample value, and the last sample value is used as the third sample value. By caching only three consecutive sample values, a data foundation can be provided for subsequent parameter calculations, thereby avoiding reliance on a large amount of sample data from one or more complete cycles.

[0038] S102. Determine the fixed phase difference between adjacent sampled values ​​based on the signal frequency and fixed sampling period of the single-phase sinusoidal signal being measured.

[0039] Specifically, since the measured single-phase sinusoidal signal is a single-phase sinusoidal signal with a definite frequency, its angular frequency can be determined based on the signal frequency of the measured single-phase sinusoidal signal, and the fixed phase difference between adjacent sampled values ​​can be determined in combination with the fixed sampling period. The fixed phase difference is used to characterize the amount of change in the sinusoidal phase between two adjacent sampling times.

[0040] With a fixed sampling period and a determined signal frequency, the fixed phase difference between adjacent sampled values ​​remains constant. Therefore, a trigonometric function relationship between adjacent sampled values ​​can be established based on this fixed phase difference. In other words, the AC components corresponding to the sampling times of the first, second, and third sampled values ​​can be correlated through this fixed phase difference, thus providing a basis for subsequently solving for the orthogonal projection of the AC components.

[0041] S103. Determine the intermediate coefficients based on the fixed phase difference. The intermediate coefficients are used to characterize the correspondence between the difference between adjacent samples and the orthogonal projection of the AC component.

[0042] Specifically, after determining the fixed phase difference, intermediate coefficients can be determined based on the corresponding sine and cosine values. These intermediate coefficients describe the linear correspondence between the difference between adjacent sampled values ​​and the orthogonal projection of the AC components. Since the DC components in adjacent sampled values ​​are a superposition, they cancel each other out after the difference is made, and the remaining portion is related to the projection of the AC components in two orthogonal directions. Therefore, by determining the intermediate coefficients through the fixed phase difference, a correspondence can be established between the difference between adjacent sampled values ​​and the orthogonal projection of the AC components.

[0043] S104. Based on the first sampling difference, the second sampling difference, and the intermediate coefficient, the first orthogonal projection and the second orthogonal projection of the AC component of the measured single-phase sinusoidal signal at the sampling time corresponding to the first sampling value are obtained.

[0044] The first sampling difference is the difference between the second sampling value and the first sampling value, and the second sampling difference is the difference between the third sampling value and the second sampling value. The first sampling difference and the second sampling difference are used to eliminate the influence of the DC component in the measured single-phase sinusoidal signal.

[0045] Specifically, the single-phase sinusoidal signal parameter synchronization detection device determines the first sampling difference based on the difference between the second sample value and the first sample value, and determines the second sampling difference based on the difference between the third sample value and the second sample value.

[0046] Since the same DC component is superimposed in the first, second, and third sampled values, the DC component is eliminated as a common term when adjacent sampled values ​​are subtracted. The first and second sampled differences mainly reflect the changes in the AC component between adjacent sampling times.

[0047] In one implementation, the sampling time corresponding to the first sampled value can be t1, and the phase of the sampling time corresponding to the first sampled value can be θ1, where θ1 = ωt1 + φ, ω represents the angular frequency of the measured single-phase sinusoidal signal, and φ represents the initial phase. If the first, second, and third sampled values ​​are denoted as v1, v2, and v3 respectively, the fixed phase difference is denoted as Δθ, the cosine value corresponding to the fixed phase difference is denoted as C, and the sine value corresponding to the fixed phase difference is denoted as S, then the first sampled value can be expressed as v1 = Asinθ1 + D, the second sampled value can be expressed as v2 = Asin(θ1 + Δθ) + D, that is, v2 = A[Csinθ1 + Scosθ1] + D, and the third sampled value can be expressed as v3 = Asin(θ1 + 2Δθ) + D, that is, v3 = A[(2C² - 1)sinθ1 + 2SC cosθ1] + D. Where A represents the AC amplitude and D represents the DC component.

[0048] Based on this, by subtracting adjacent sample values, the DC component D that is superimposed in the first, second, and third sample values ​​can be eliminated.

[0049] Specifically, the first sampling difference d1 = v2 - v1, and the second sampling difference d2 = v3 - v2. If we let the first orthogonal projection X = Asinθ1 and the second orthogonal projection Y = Acosθ1, then the first sampling difference d1 can be expressed as d1 = (C-1)X + SY, and the second sampling difference d2 can be expressed as d2 = (2C² - C-1)X + S(2C-1)Y. Therefore, the first and second sampling differences can be converted into linear combinations of the first and second orthogonal projections, respectively, providing a basis for establishing the first and second linear relationships subsequently.

[0050] Furthermore, the first and second orthogonal projection quantities can be obtained based on the first sampling difference, the second sampling difference, and the intermediate coefficients. The first and second orthogonal projection quantities are used to jointly characterize the amplitude and phase state of the AC component of the measured single-phase sinusoidal signal at the sampling time corresponding to the first sampling value. The first orthogonal projection quantity can correspond to the instantaneous AC component at the sampling time corresponding to the first sampling value, and the second orthogonal projection quantity can correspond to the AC component information orthogonal to the instantaneous AC component.

[0051] By subtracting adjacent sampled values, the combined effect of the DC components is eliminated during the solution of the first and second orthogonal projections. This reduces the impact of the DC components on the AC amplitude and phase detection results, and eliminates the need for high-pass filtering or periodic averaging of the measured single-phase sinusoidal signal.

[0052] S105. Determine the AC amplitude and phase of the measured single-phase sinusoidal signal based on the first orthogonal projection and the second orthogonal projection.

[0053] Specifically, the first orthogonal projection and the second orthogonal projection can be used together to characterize the amplitude and phase state of the AC component at the sampling time corresponding to the first sample value, and thus the AC amplitude and phase can be determined accordingly. The specific process of determining the AC amplitude and phase may include amplitude calculation, four-quadrant arctangent operation, and phase recursion based on a fixed phase difference.

[0054] S106. Determine the DC component of the measured single-phase sinusoidal signal based on the first sampled value and the first orthogonal projection quantity.

[0055] Specifically, the first sampled value includes the AC instantaneous component and the DC component at the sampling time corresponding to the first sampled value. The first orthogonal projection quantity can characterize the AC instantaneous component. Therefore, the DC component can be determined based on the first sampled value and the first orthogonal projection quantity.

[0056] In this way, the DC component, AC amplitude, and phase can be determined synchronously based on the same set of continuous sampled values. It is not necessary to wait for the average value of the complete cycle or to set up an additional filter to separate the DC component in advance, thereby improving the real-time performance of DC component detection.

[0057] S107. Obtain new sample values, and update the first, second, and third sample values ​​with the second, third, and new sample values ​​to synchronously update the DC component, AC amplitude, and phase of the measured single-phase sinusoidal signal.

[0058] Specifically, after completing the calculation of the DC component, AC amplitude, and phase, the single-phase sinusoidal signal parameter synchronous detection device continues to acquire new sampled values ​​according to a fixed sampling period and performs a sliding update on the sampled value sequence. During the sliding update, the original second sampled value can be used as the updated first sampled value, the original third sampled value can be used as the updated second sampled value, and the new sampled value can be used as the updated third sampled value. Subsequently, based on the updated first, second, and third sampled values, the first and second sampled differences are re-determined, and the intermediate coefficient call, orthogonal projection solution, AC amplitude and phase determination, and DC component determination are continued.

[0059] Using the sliding update method described above, each time a new sample value is acquired, a new set of three consecutive sample values ​​is formed, and the DC component, AC amplitude, and phase of the measured single-phase sinusoidal signal are updated once based on this set of three consecutive sample values. Therefore, this method can achieve real-time tracking of single-phase sinusoidal signal parameters and is suitable for scenarios requiring rapid detection of single-phase sinusoidal signal parameters, such as power systems, motor drives, industrial control, and power quality analysis.

[0060] The single-phase sinusoidal signal parameter synchronization detection method provided in this application obtains a first sample value, a second sample value, and a third sample value through a fixed sampling period. A fixed phase difference is determined based on the signal frequency and the fixed sampling period. An intermediate coefficient is then determined based on the fixed phase difference, enabling a correspondence between adjacent sampling differences and the orthogonal projection of the AC component. Since the first and second sampling differences are obtained by subtracting adjacent sample values, the DC component is eliminated during the subtraction process. Therefore, the influence of the DC component on the calculation of AC amplitude and phase can be reduced without filtering preprocessing. Furthermore, after obtaining the first and second orthogonal projections based on the first and second sampling differences and the intermediate coefficient, the AC amplitude, phase, and DC component can be obtained synchronously and updated by sliding with new sample values.

[0061] Meanwhile, since this method only needs to cache the first, second, and third sampled values, and the intermediate coefficients can be pre-calculated and repeatedly called after the signal frequency and fixed sampling period are determined, it can reduce the amount of data caching and real-time calculation, making it suitable for implementation in processing platforms such as microcontrollers, ARM processors, or field-programmable gate arrays.

[0062] Therefore, this method can solve the problems that DC bias can easily affect the accuracy of AC amplitude and phase detection, the slow dynamic response of long-term window detection, and the phase lag that filtering can easily introduce, thereby improving the real-time performance, accuracy, and engineering applicability of single-phase sinusoidal signal parameter detection.

[0063] In one possible embodiment, the measured single-phase sinusoidal signal includes an AC component and a DC component.

[0064] Here, the AC component refers to the signal component that changes sinusoidally over time, and the DC component refers to the bias component superimposed on the AC component.

[0065] For example, the measured single-phase sinusoidal signal can be represented as a superposition of AC and DC components. The AC component reflects the periodic changes of the measured voltage or current signal, while the DC component can be introduced by factors such as sensor zero-point drift, signal conditioning circuit bias, sampling link error, or changes in the operating state of the measured system. By considering the DC component in the signal model, the subsequent parameter detection process can be applied to single-phase sinusoidal signals containing DC bias, rather than being limited to ideal pure AC sinusoidal signals.

[0066] The measured single-phase sinusoidal signal can be expressed as v(t) = Asin(ωt + φ) + D, where v(t) represents the instantaneous value of the measured single-phase sinusoidal signal at time t, A represents the AC amplitude, ω represents the angular frequency, φ represents the initial phase, and D represents the DC component. Based on the above expression, the measured single-phase sinusoidal signal can be understood as the superposition of the AC component Asin(ωt + φ) and the DC component D. Therefore, in the subsequent parameter detection process, the AC amplitude, phase, and DC component of the measured single-phase sinusoidal signal can be determined separately.

[0067] In one possible embodiment, the signal frequency is a preset frequency, a system-given frequency, the output frequency of the frequency detection module, or the output frequency of the phase-locked loop module.

[0068] The preset frequency can be a frequency pre-configured based on the rated operating frequency of the object under test, such as the rated frequency of a power frequency signal; the system given frequency can be a control frequency provided by a motor drive system, power electronic control system, or signal generation system; the output frequency of the frequency detection module can be the frequency obtained by frequency estimation of the measured single-phase sinusoidal signal; the output frequency of the phase-locked loop module can be the frequency obtained by phase or frequency tracking of the measured single-phase sinusoidal signal through a phase-locked loop. Obtaining the signal frequency through any of these methods provides a basis for subsequently determining the fixed phase difference.

[0069] It should be noted that the signal frequency is used to characterize the periodic variation characteristics of the measured single-phase sinusoidal signal. With a known fixed sampling period, obtaining the signal frequency allows for the determination of the phase change between adjacent sample values, thus establishing the AC component variation relationship between the first, second, and third sample values.

[0070] Through the above methods, this embodiment clarifies that the measured single-phase sinusoidal signal is not limited to a pure AC signal, but can include a DC component, thus adapting to detection scenarios with bias in actual sampling links. On the other hand, it expands the source of the signal frequency to a preset frequency, a system-given frequency, the output frequency of the frequency detection module, or the output frequency of the phase-locked loop module, making the method applicable to the synchronous detection of single-phase sinusoidal signal parameters in different application scenarios, thereby improving the applicability and engineering implementation flexibility of the method.

[0071] In some embodiments, the method steps shown in S102 can be implemented by S1021 to S1023, which are described in detail below. Through steps S1021 to S1023, the time sampling relationship of the measured single-phase sinusoidal signal can be converted into a phase recursion relationship, thereby providing a basis for subsequently determining intermediate coefficients and establishing the correspondence between adjacent sampling differences and the orthogonal projection of AC components.

[0072] S1021. Determine the angular frequency of the single-phase sinusoidal signal being measured based on the signal frequency.

[0073] Specifically, after obtaining the signal frequency of the single-phase sinusoidal signal being measured, the angular frequency of the single-phase sinusoidal signal can be determined based on the signal frequency. The signal frequency is used to characterize the number of periodic changes of the single-phase sinusoidal signal being measured per unit time, while the angular frequency is used to characterize how quickly the phase of the single-phase sinusoidal signal being measured changes with time.

[0074] In one implementation, if the signal frequency is f, the angular frequency ω can be determined using ω = 2πf. Therefore, the signal frequency, expressed in Hertz, can be converted into an angular frequency for phase calculations.

[0075] S1022. Determine the fixed phase difference based on the product of the angular frequency and the fixed sampling period.

[0076] Specifically, the fixed sampling period is used to characterize the time interval between two adjacent samples. Since the measured single-phase sinusoidal signal undergoes phase change according to the angular frequency, the amount of phase change of the measured single-phase sinusoidal signal within the fixed sampling period can be determined by the product of the angular frequency and the fixed sampling period.

[0077] For example, if the fixed sampling period is Ts, the fixed phase difference Δθ between adjacent sampled values ​​can be determined according to Δθ=ωTs. The first sampled value, the second sampled value, and the third sampled value are sampled values ​​collected sequentially, so there is the same fixed phase difference between the first sampled value and the second sampled value, and between the second sampled value and the third sampled value.

[0078] S1023. Determine the sine and cosine values ​​corresponding to the fixed phase difference based on the fixed phase difference.

[0079] Specifically, after determining a fixed phase difference, the sine and cosine values ​​corresponding to the fixed phase difference can be calculated.

[0080] For example, the cosine value corresponding to a fixed phase difference can be denoted as C, and the sine value corresponding to a fixed phase difference can be denoted as S, i.e., C=cosΔθ, S=sinΔθ. The sine and cosine values ​​are used to characterize the trigonometric function recursive relationship of the AC components between adjacent sampling times, so that the AC components corresponding to the sampling times of the second and third sampling values ​​can be represented based on the orthogonal projection of the sampling times of the first sampling value.

[0081] In some embodiments, when the signal frequency and fixed sampling period remain unchanged, the fixed phase difference and its corresponding sine and cosine values ​​can be calculated and stored during the initialization phase and can be directly called during subsequent parameter detection. When the signal frequency is updated, the angular frequency, fixed phase difference, and corresponding sine and cosine values ​​can be re-determined according to the updated signal frequency to ensure that the subsequent intermediate coefficients match the frequency state of the current measured single-phase sinusoidal signal.

[0082] Through the above steps, a fixed phase difference between adjacent sampled values ​​can be determined based on the signal frequency and fixed sampling period of the measured single-phase sinusoidal signal, and the corresponding sine and cosine values ​​can be further obtained. Since the subsequent intermediate coefficients are determined by the trigonometric function values ​​corresponding to the fixed phase difference, this step can provide a reliable phase relationship basis for the subsequent synchronous solution of the DC component, AC amplitude, and phase based on three consecutive sampled values.

[0083] In one possible embodiment, the method steps shown in S103 can be implemented by S1031 to S1033, which are described in detail below.

[0084] S1031. The cosine value corresponding to the fixed phase difference is determined as the first fundamental coefficient, and the sine value corresponding to the fixed phase difference is determined as the second fundamental coefficient.

[0085] Specifically, after determining the sine and cosine values ​​corresponding to a fixed phase difference, the cosine value corresponding to the fixed phase difference can be used as the first fundamental coefficient, and the sine value corresponding to the fixed phase difference can be used as the second fundamental coefficient. The first and second fundamental coefficients are used to characterize the phase recursion relationship of the AC components between adjacent sampling times. That is, when the orthogonal projection of the AC components at the sampling time corresponding to the first sample value is known, the changes in the AC components at the sampling times corresponding to the second and third sample values ​​can be described using the first and second fundamental coefficients.

[0086] S1032. Based on the first and second basic coefficients, determine the first difference coefficient, the second difference coefficient, the third difference coefficient, and the fourth difference coefficient.

[0087] Specifically, the first difference coefficient, the second difference coefficient, the third difference coefficient, and the fourth difference coefficient can be obtained by combining the first basic coefficient and the second basic coefficient. The above difference coefficients are used to characterize the linear correspondence between the first sampling difference and the second sampling difference and the first orthogonal projection quantity and the second orthogonal projection quantity, respectively, after subtracting adjacent sampled values.

[0088] The first and second difference coefficients can be used to describe the correspondence between the first sampling difference and the two orthogonal projection quantities, while the third and fourth difference coefficients can be used to describe the correspondence between the second sampling difference and the two orthogonal projection quantities.

[0089] S1033. Determine the discriminant of the denominator based on the first difference coefficient, the second difference coefficient, the third difference coefficient, and the fourth difference coefficient.

[0090] Specifically, after obtaining the first difference coefficient, the second difference coefficient, the third difference coefficient, and the fourth difference coefficient, the discriminant of the denominator can be determined based on the above difference coefficients.

[0091] The denominator discriminant is used to characterize whether the variable solution relationship consisting of the first sampling difference, the second sampling difference, and the difference coefficient can be used to solve the first orthogonal projection quantity and the second orthogonal projection quantity, and can be used as the denominator term when solving the first orthogonal projection quantity and the second orthogonal projection quantity in the future.

[0092] In practical applications, the denominator discriminant can be used to determine whether the fixed phase difference corresponding to the current fixed sampling period and signal frequency is suitable for variable solving, so as to avoid the denominator discriminant being zero or too small, which would affect the stability of the calculation.

[0093] In some embodiments, the intermediate coefficients may include a first fundamental coefficient, a second fundamental coefficient, a first difference coefficient, a second difference coefficient, a third difference coefficient, a fourth difference coefficient, and a denominator discriminant. These intermediate coefficients can be pre-calculated and stored after the fixed sampling period and signal frequency are determined, and can be directly retrieved each time a new sample value is acquired. When the signal frequency changes, the fixed phase difference can be re-determined, and the intermediate coefficients updated accordingly.

[0094] This embodiment can convert the trigonometric function relationship corresponding to a fixed phase difference into intermediate coefficients for sampling difference calculation, enabling the subsequent construction of variable solution relationships for the first and second orthogonal projection quantities based on the first and second sampling differences. Since the intermediate coefficients can be predetermined by the fixed phase difference, complex derivations are not required repeatedly during real-time detection, thereby reducing the computational load and improving the real-time performance and stability of synchronous detection of single-phase sinusoidal signal parameters.

[0095] In some embodiments, after determining the first and second base coefficients, each difference coefficient used to construct the sampling difference relationship can be further determined.

[0096] Specifically, the first fundamental coefficient C represents the cosine value corresponding to the fixed phase difference, and the second fundamental coefficient S represents the sine value corresponding to the fixed phase difference. Based on the trigonometric function recursion relationship between adjacent sampling times, the first difference coefficient m1 can be determined as C-1, and the second difference coefficient n1 can be determined as S, i.e., m1=C-1, n1=S. The first difference coefficient m1 and the second difference coefficient n1 are used to characterize the correspondence between the first sampling difference and the first orthogonal projection quantity and the second orthogonal projection quantity.

[0097] Furthermore, the third difference coefficient m2 can be determined as 2C²-C⁻¹ based on the first fundamental coefficient C, and the fourth difference coefficient n2 can be determined as S(2C⁻¹) based on the first fundamental coefficient C and the second fundamental coefficient S, i.e., m2=2C²-C⁻¹, n2=S(2C⁻¹). The third difference coefficient m2 and the fourth difference coefficient n2 are used to characterize the correspondence between the second sampling difference and the first and second orthogonal projection quantities. In other words, the first and second sampling differences are characterized by different combinations of difference coefficients, thereby forming a variable solution relationship for the first and second orthogonal projection quantities.

[0098] After obtaining the first difference coefficient m1, the second difference coefficient n1, the third difference coefficient m2, and the fourth difference coefficient n2, the discriminant Δ of the denominator can be determined according to Δ = m1·n2 - m2·n1. The discriminant Δ of the denominator is used as the basis for judgment and calculation when subsequently solving for the first and second orthogonal projection quantities. In the actual calculation process, it can be determined whether the discriminant Δ of the denominator meets the preset solution conditions before performing the orthogonal projection quantity solution, such as determining whether the discriminant Δ of the denominator is not zero, or whether its absolute value is greater than a preset threshold, to reduce the risk of calculation instability caused by the denominator being too small.

[0099] In this embodiment, the sine and cosine values ​​corresponding to the fixed phase difference can be converted into first difference coefficients, second difference coefficients, third difference coefficients, fourth difference coefficients, and a discriminant in the denominator. This allows the orthogonal projection of the AC component to be directly calculated based on the first sampling difference, the second sampling difference, and the aforementioned coefficients. Since these coefficients are only related to the fixed phase difference, they can be pre-calculated and repeatedly called when the signal frequency and fixed sampling period remain unchanged, thereby reducing the real-time calculation load during each parameter synchronization detection and improving detection efficiency.

[0100] In some embodiments, the method steps shown in S104 can be implemented by S1041 to S1043, which are described in detail below.

[0101] S1041. Based on the first difference coefficient and the second difference coefficient, establish a first linear relationship between the first sampling difference and the first orthogonal projection quantity and the second orthogonal projection quantity.

[0102] Specifically, the first sampling difference is the difference between the second sampling value and the first sampling value. Since both the first and second sampling values ​​contain the same DC component, the DC component can be eliminated by subtracting them, so that the first sampling difference mainly represents the change of the AC component between the sampling time corresponding to the first sampling value and the sampling time corresponding to the second sampling value.

[0103] The first and second difference coefficients are determined by the trigonometric function relationship corresponding to the fixed phase difference. Therefore, the first sampling difference can be expressed as a linear combination of the first orthogonal projection quantity and the second orthogonal projection quantity using the first and second difference coefficients.

[0104] For example, if the first sampling difference is denoted as d1, the first orthogonal projection is denoted as X, and the second orthogonal projection is denoted as Y, then the first linear relationship can be expressed as: d1=m1X+n1Y, where m1 is the first difference coefficient and n1 is the second difference coefficient.

[0105] S1042. Based on the third and fourth difference coefficients, establish a second linear relationship between the second sampling difference and the first and second orthogonal projection quantities.

[0106] Specifically, the second sampling difference is the difference between the third sampling value and the second sampling value. Similar to the first sampling difference, the second sampling difference can also eliminate the DC component in the measured single-phase sinusoidal signal and reflect the change in the AC component between the sampling time corresponding to the second sampling value and the sampling time corresponding to the third sampling value. Since the third sampling value is two fixed sampling periods away from the sampling time corresponding to the first sampling value, the correspondence between the second sampling difference and the first orthogonal projection quantity and the second orthogonal projection quantity can be characterized by the third difference coefficient and the fourth difference coefficient.

[0107] For example, if the second sampling difference is denoted as d2, then the second linear relationship can be expressed as: d2=m2X+n2Y, where m2 is the third difference coefficient and n2 is the fourth difference coefficient.

[0108] S1043. Based on the first linear relationship and the second linear relationship, the first orthogonal projection quantity and the second orthogonal projection quantity are obtained.

[0109] Specifically, the first linear relationship and the second linear relationship together constitute a bivariate linear solution relationship for the first orthogonal projection quantity and the second orthogonal projection quantity. Since the DC component has been eliminated by subtracting adjacent sample values ​​from the first and second sampling differences, the influence of the DC component on the amplitude and phase information of the AC component can be reduced when solving for the first and second orthogonal projection quantities. In one implementation, the first and second orthogonal projection quantities can be obtained analytically based on the coefficient matrices corresponding to the first and second linear relationships, and when the discriminant in the denominator satisfies the solution conditions.

[0110] The first orthogonal projection quantity characterizes the instantaneous projection component of the AC component of the measured single-phase sinusoidal signal at the sampling time corresponding to the first sampling value, while the second orthogonal projection quantity characterizes the projection component orthogonal to the first orthogonal projection quantity. Obtaining the first and second orthogonal projection quantities provides a computational basis for subsequently determining the AC amplitude, phase, and DC component.

[0111] In this embodiment, two linear relationships are established using the difference between two adjacent samples, and the two orthogonal projections of the AC component are directly solved from these two linear relationships. Since the difference between adjacent samples has eliminated the combined superposition effect of the DC component, this process can improve the accuracy of solving the AC amplitude and phase in a single-phase sinusoidal signal containing a DC component, while avoiding reliance on long-term window sampling or filtering preprocessing, which is beneficial to improving the real-time performance of parameter synchronous detection.

[0112] In some embodiments, after establishing the first linear relationship and the second linear relationship, the two linear relationships can be solved analytically to obtain the first orthogonal projection quantity and the second orthogonal projection quantity.

[0113] Specifically, the first orthogonal projection can be denoted as X, the second orthogonal projection as Y, the first sampling difference as d1, and the second sampling difference as d2. Since the first linear relationship can be expressed as d1 = m1X + n1Y, and the second linear relationship can be expressed as d2 = m2X + n2Y, X and Y can be solved based on the system of two linear equations in two variables formed by these two linear relationships.

[0114] In one implementation, the first orthogonal projection quantity X can be determined according to the formula X=(d1×n2-d2×n1) / Δ.

[0115] The second orthogonal projection quantity Y can be determined according to the formula Y=(m1×d2-m2×d1) / Δ.

[0116] By jointly solving the two linear relationships using the denominator discriminant, the AC change information contained in the first and second sampling differences can be converted into two orthogonal projections of the first sampling value at the sampling time.

[0117] It should be noted that when performing the above calculations, it is advisable to first determine whether the denominator discriminant Δ satisfies the solution conditions, such as Δ being non-zero or the absolute value of Δ being greater than a preset threshold. When Δ satisfies the solution conditions, the first orthogonal projection quantity and the second orthogonal projection quantity are calculated according to the above formula; when Δ does not satisfy the solution conditions, the fixed sampling period can be adjusted, the signal frequency updated, or the current calculation can be postponed to avoid unstable calculation results due to an excessively small denominator.

[0118] Using the above method, the first and second orthogonal projections of the AC component at the sampling time corresponding to the first sample value can be directly solved after the DC component has been eliminated by the difference between adjacent samples. This provides accurate intermediate calculation results for the subsequent synchronous determination of AC amplitude, phase and DC component, and helps to reduce the impact of long window sampling and filtering on the real-time performance of detection.

[0119] In some embodiments, the method steps shown in S105 can be implemented by S1051 to S1054, which are described in detail below.

[0120] S1051. Determine the sum of squares based on the sum of the squares of the first orthogonal projection and the squares of the second orthogonal projection.

[0121] Specifically, the first orthogonal projection and the second orthogonal projection can be understood as the components of the AC component of the measured single-phase sinusoidal signal in two orthogonal directions at the sampling time corresponding to the first sampling value. Since the components in the two orthogonal directions jointly characterize the amplitude and phase state of the AC component, the squares of the first orthogonal projection and the second orthogonal projection can be calculated separately and then added together to obtain the sum of squares.

[0122] For example, if the first orthogonal projection is X and the second orthogonal projection is Y, then the sum of squares can be X² + Y².

[0123] S1052. Determine the AC amplitude based on the square root of the sum of squares.

[0124] Specifically, after obtaining the sum of squares, the square root of the sum of squares can be calculated to obtain the AC amplitude of the measured single-phase sinusoidal signal.

[0125] For example, the AC amplitude A satisfies A=(X²+Y²)^(1 / 2). Since the first and second orthogonal projection quantities are obtained based on the first sampling difference, the second sampling difference, and intermediate coefficients, and the first and second sampling differences have eliminated the influence of the DC component, the interference of the DC component on the AC amplitude calculation result can be reduced when determining the AC amplitude based on the two orthogonal projection quantities.

[0126] S1053. Perform four-quadrant arctangent operation based on the first orthogonal projection and the second orthogonal projection to determine the phase of the sampling time corresponding to the first sampled value.

[0127] Specifically, the first and second orthogonal projections can be used not only to determine the AC amplitude but also to determine the phase of the sampling time corresponding to the first sampled value. Since ordinary arctangent operation may not be able to accurately distinguish the quadrant in which the phase is located, a four-quadrant arctangent operation can be used to determine the phase.

[0128] The parameter order of the four-quadrant arctangent operation can be consistent with the definition of the first and second orthogonal projection quantities, ensuring that the calculated phase corresponds to the AC component phase at the sampling time corresponding to the first sample value. This avoids phase detection deviations caused by inaccurate quadrant determination.

[0129] S1054. Determine the phase of the single-phase sinusoidal signal under test at the target sampling time based on the phase of the first sampled value at the corresponding sampling time and the fixed phase difference.

[0130] Specifically, after obtaining the phase of the sampling time corresponding to the first sampled value, the phase can be recursively derived based on the sampling period interval between the target sampling time and the sampling time corresponding to the first sampled value. Since the phase change between adjacent sampled values ​​is a fixed phase difference, when the target sampling time is one sampling period apart from the sampling time corresponding to the first sampled value, a fixed phase difference can be superimposed on the phase of the sampling time corresponding to the first sampled value; when the interval is multiple sampling periods, a corresponding number of fixed phase differences can be superimposed. Thus, the phase of the measured single-phase sinusoidal signal at the target sampling time can be obtained.

[0131] In one implementation, if the target sampling time is t, the sampling time corresponding to the first sampled value is t1, and the phase of the sampling time corresponding to the first sampled value is θ1, then the phase θ(t) of the target sampling time can be determined according to θ(t) = θ1 + 2πf(t - t1), where f represents the signal frequency of the measured single-phase sinusoidal signal. In practical applications, the phase of the target sampling time can also be obtained by superimposing a fixed number of phase differences onto θ1 based on the number of sampling periods between the target sampling time and the sampling time corresponding to the first sampled value.

[0132] In this embodiment, the AC amplitude and phase of the measured single-phase sinusoidal signal are determined synchronously based on the first and second orthogonal projection values. Since the first and second orthogonal projection values ​​are obtained after eliminating the influence of the DC component from the difference between adjacent samples, the determination process of the AC amplitude and phase can reduce the detection deviation caused by the DC component. At the same time, the phase can be recursively updated based on a fixed phase difference without relying on a data window of a complete cycle, which helps to improve the real-time performance of phase detection.

[0133] In some embodiments, the method steps shown in S106 include: determining the difference between the first sampled value and the first orthogonal projection as the DC component of the measured single-phase sinusoidal signal.

[0134] Specifically, the first sample value is the instantaneous sampling result of the measured single-phase sinusoidal signal at the sampling time corresponding to the first sample value. This instantaneous sampling result includes the AC instantaneous component and the DC component at that sampling time. The first quadrature projection quantity is the projection quantity of the AC component at the sampling time corresponding to the first sample value, obtained by solving the first sampling difference, the second sampling difference, and intermediate coefficients. This first quadrature projection quantity can characterize the AC instantaneous component at the sampling time corresponding to the first sample value. Therefore, given that the first quadrature projection quantity is determined, the portion of the first sample value belonging to the AC instantaneous component can be subtracted to obtain the DC component of the measured single-phase sinusoidal signal.

[0135] For example, if the first sampled value is denoted as v1 and the first orthogonal projection is denoted as X, then the DC component D of the measured single-phase sinusoidal signal can satisfy: D = v1 - X. That is, the first sampled value v1 can be regarded as the superposition result of the first orthogonal projection X and the DC component D. Subtracting the first orthogonal projection X from the first sampled value v1 will yield the DC component D.

[0136] In other embodiments, to reduce the impact of random sampling errors on the DC component detection results, the DC component can be determined by combining the first, second, and third sampled values. Specifically, the AC component estimates at the sampling times corresponding to the second and third sampled values ​​can be determined based on the first orthogonal projection, the second orthogonal projection, and a fixed phase difference. Then, the difference between the first sampled value and the first orthogonal projection is determined as the first DC estimate, the difference between the second sampled value and the AC component estimate at the sampling time corresponding to the second sampled value is determined as the second DC estimate, and the difference between the third sampled value and the AC component estimate at the sampling time corresponding to the third sampled value is determined as the third DC estimate. Finally, the DC component of the measured single-phase sinusoidal signal is determined based on the average or weighted average of the first, second, and third DC estimates. In this way, the impact of random errors in a single sampled value on the DC component detection results can be reduced while maintaining the three-point fast detection characteristics.

[0137] In this embodiment, the AC amplitude, phase, and DC component can be obtained synchronously based on the same set of continuous sampled values. It is not necessary to estimate the DC component by averaging the full cycle, nor is it necessary to use a filter to separate the DC component in advance. This helps to improve the real-time performance of DC component detection and reduce the lag effect of filtering on phase detection.

[0138] In one possible embodiment, the method further includes S108, which will be described in detail below.

[0139] S108. Perform digital low-pass filtering or moving average processing on the continuously determined DC component and / or AC amplitude to obtain the filtered parameter detection results.

[0140] Specifically, after determining the DC component and AC amplitude based on the updated first, second, and third sampled values ​​each time, the determined DC component and / or AC amplitude can be used as the current parameter detection result, and combined with the historical parameter detection results for digital low-pass filtering. For example, a first-order digital low-pass filtering method can be used, weighting the currently determined DC component with the filtered DC component from the previous time step according to preset filtering coefficients to obtain the filtered DC component; similarly, the currently determined AC amplitude can be weighted with the filtered AC amplitude from the previous time step according to preset filtering coefficients to obtain the filtered AC amplitude. The preset filtering coefficients can be set according to the detection response speed and output stability requirements.

[0141] In another implementation, a moving average can also be used.

[0142] Specifically, the DC component and / or AC amplitude, which are continuously determined within the most recent sampling periods, can be buffered, and the average of multiple DC components within the buffer window can be calculated to obtain the filtered DC component; and / or, the average of multiple AC amplitudes within the buffer window can be calculated to obtain the filtered AC amplitude. The length of the moving average window can be determined according to the actual noise level and real-time requirements. A smaller window length is beneficial for improving dynamic response speed, while a larger window length is beneficial for improving output stability.

[0143] It should be noted that digital low-pass filtering or moving average processing can be used as an optional smoothing process before parameter output, and does not change the basic calculation process described above, which simultaneously determines the DC component, AC amplitude, and phase based on the first sampling difference, the second sampling difference, and intermediate coefficients. In other words, the DC component and AC amplitude can be obtained first through analytical calculation corresponding to the three-point sampling, and then filtered or averaged for output according to the actual application requirements.

[0144] By employing the above methods, while maintaining the ability to quickly and synchronously detect single-phase sinusoidal signal parameters, parameter fluctuations caused by random noise, sampling jitter, or transient interference can be further suppressed, making the filtered parameter detection results more stable, thereby improving the engineering applicability of DC component and AC amplitude detection results.

[0145] In an exemplary embodiment, the measured single-phase sinusoidal signal can be expressed as v(t) = 311 sin(2π50t + π / 4) + 100, where the AC amplitude is 311V, the signal frequency is 50Hz, the initial phase is π / 4, and the DC component is 100V. If the sampling frequency is 1kHz, the fixed sampling period is 0.001s, and the fixed phase difference between adjacent sampled values ​​is Δθ = 2π × 50 × 0.001, which is approximately 0.31416 radians. Based on the fixed phase difference, the corresponding cosine value C ≈ 0.9511 and sine value S ≈ 0.3090 can be determined, and the first difference coefficient, second difference coefficient, third difference coefficient, fourth difference coefficient, and denominator discriminant can be further determined.

[0146] During continuous sampling, if the first sampled value v1≈319.84, the second sampled value v2≈256.37, and the third sampled value v3≈165.97 at a certain moment, then the first sampling difference d1=v2-v1≈-63.47, and the second sampling difference d2=v3-v2≈-90.40. Substituting the first and second sampling differences and intermediate coefficients into the solution relationship of the first and second orthogonal projection quantities, we can obtain the first orthogonal projection quantity X≈219.99 and the second orthogonal projection quantity Y≈219.99. Further, based on the first and second orthogonal projection quantities, we can obtain the AC amplitude A≈311.11V, and based on the first sampled value and the first orthogonal projection quantity, we can obtain the DC component D≈99.85V. Therefore, even when the measured single-phase sinusoidal signal contains a DC component, this method can still synchronously determine the AC amplitude, phase, and DC component based on three consecutive sampled values.

[0147] Figure 2 This is a schematic diagram illustrating the comparison of parameter detection effects for a single-phase sinusoidal signal containing a DC component, provided as an embodiment of this application. For example... Figure 2 As shown, when the measured single-phase sinusoidal signal contains a DC component, the detection method that does not consider the influence of the DC component is prone to deviation or fluctuation in the AC amplitude detection result. However, the single-phase sinusoidal signal parameter synchronous detection method provided in this application eliminates the combined superposition effect of the DC component by subtracting adjacent sample values, and solves the first orthogonal projection quantity and the second orthogonal projection quantity based on the first sampling difference, the second sampling difference and the intermediate coefficient, thereby being able to determine the AC amplitude, phase and DC component more stably in signal scenarios containing DC components.

[0148] This application also provides a single-phase sinusoidal signal parameter synchronization detection device, which can be used to execute the single-phase sinusoidal signal parameter synchronization detection method described in any of the above embodiments. The single-phase sinusoidal signal parameter synchronization detection device may include a sampling module, a fixed phase difference determination module, an intermediate coefficient determination module, an orthogonal projection quantity solution module, an amplitude and phase determination module, a DC component determination module, and a sampling update module.

[0149] The sampling module is used to continuously sample the single-phase sinusoidal signal under test at a fixed sampling period to obtain the first sample value, the second sample value, and the third sample value in sequence.

[0150] The fixed phase difference determination module is used to determine the fixed phase difference between adjacent sampled values ​​based on the signal frequency and fixed sampling period of the single-phase sinusoidal signal being measured.

[0151] The intermediate coefficient determination module is used to determine intermediate coefficients based on a fixed phase difference. These intermediate coefficients characterize the correspondence between adjacent sampling differences and the orthogonal projection of the AC components. Specifically, the intermediate coefficient determination module can determine the intermediate coefficients used to establish a linear relationship between the sampling differences based on the sine and cosine values ​​corresponding to the fixed phase difference.

[0152] The orthogonal projection quantity calculation module is used to calculate the first and second orthogonal projection quantities of the AC component of the measured single-phase sinusoidal signal at the sampling time corresponding to the first sampling value, based on the first sampling difference, the second sampling difference, and intermediate coefficients. The first sampling difference is the difference between the second and first sampling values, and the second sampling difference is the difference between the third and second sampling values.

[0153] The amplitude and phase determination module is used to determine the AC amplitude and phase of the measured single-phase sinusoidal signal based on the first orthogonal projection and the second orthogonal projection.

[0154] The DC component determination module is used to determine the DC component of the measured single-phase sinusoidal signal based on the first sampled value and the first orthogonal projection.

[0155] The sampling update module is used to acquire new sampling values ​​and update the first, second, and third sampling values ​​with the second, third, and new sampling values ​​to synchronously update the DC component, AC amplitude, and phase of the measured single-phase sinusoidal signal.

[0156] It should be noted that the above modules can be software functional modules housed in the same processor, or hardware functional modules implemented by a microcontroller, ARM processor, field-programmable gate array, digital signal processor, or a combination thereof. The division between the modules described above is only for illustrating the functional structure of the single-phase sinusoidal signal parameter synchronization detection device. In actual implementation, the function of one module can be implemented by multiple sub-modules, and the functions of multiple modules can also be integrated into the same processing unit.

[0157] The aforementioned single-phase sinusoidal signal parameter synchronous detection device, after the sampling module acquires three consecutive sample values, establishes a correspondence between the sampling difference and the orthogonal projection quantity using the fixed phase difference determination module and the intermediate coefficient determination module. The orthogonal projection quantity solving module uses adjacent sampling differences to eliminate the common influence of the DC component and obtains the first and second orthogonal projection quantities. The amplitude and phase determination module and the DC component determination module further synchronize to obtain the AC amplitude, phase, and DC component. The sampling update module then implements sliding updates using new sample values. Therefore, this device can achieve synchronous detection of single-phase sinusoidal signal parameters containing DC components without relying on long-term window detection and filtering preprocessing, improving the real-time performance and accuracy of the detection.

[0158] Figure 3This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 3 As shown, the electronic device 300 provided in this embodiment includes a memory 301 and a processor 302.

[0159] The memory 301 can be a separate physical unit, connected to the processor 302 via a bus 303. Alternatively, the memory 301 and processor 302 can be integrated and implemented in hardware. The memory 301 stores program instructions, which the processor 302 calls to execute the operations performed by the single-phase sinusoidal signal parameter synchronization detection device in any of the above method embodiments.

[0160] Optionally, when some or all of the methods in the above embodiments are implemented by software, the electronic device 300 may also include only the processor 302. A memory 301 for storing programs is located outside the electronic device 300, and the processor 302 is connected to the memory via circuitry / wires to read and execute the programs stored in the memory. The processor 302 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP. The processor 302 may further include hardware chips.

[0161] The aforementioned hardware chip can be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The aforementioned PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0162] The memory 301 may include volatile memory, such as random-access memory (RAM); the memory may also include non-volatile memory, such as flash memory, hard disk drive (HDD) or solid-state drive (SSD); the memory may also include a combination of the above types of memory.

[0163] For example, this application provides a chip including: an interface circuit and a logic circuit. The interface circuit is used to receive signals from other chips outside the chip and transmit them to the logic circuit, or to send signals from the logic circuit to other chips outside the chip. The logic circuit is used to perform the operations performed by the single-phase sinusoidal signal parameter synchronization detection device in the above method embodiments.

[0164] For example, this application provides a computer-readable storage medium storing computer program instructions thereon, which are executed by a processor of an electronic device to cause the electronic device to perform the operations performed by the single-phase sinusoidal signal parameter synchronization detection device in the above method embodiments.

[0165] For example, this application provides a computer program product that, when run on an electronic device, causes the electronic device to perform the operations performed by the single-phase sinusoidal signal parameter synchronization detection device in the above method embodiments.

[0166] The above are merely specific embodiments of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to these embodiments, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for synchronous detection of single-phase sinusoidal signal parameters, characterized in that, The method includes: The single-phase sinusoidal signal under test is continuously sampled at a fixed sampling period to obtain the first sample value, the second sample value, and the third sample value acquired in sequence. The fixed phase difference between adjacent sampled values ​​is determined based on the signal frequency and fixed sampling period of the single-phase sinusoidal signal being measured. Based on a fixed phase difference, intermediate coefficients are determined. These intermediate coefficients are used to characterize the correspondence between the difference between adjacent samples and the orthogonal projection of the AC component. Based on the first sampling difference, the second sampling difference, and the intermediate coefficient, the first orthogonal projection and the second orthogonal projection of the AC component of the measured single-phase sinusoidal signal at the sampling time corresponding to the first sampling value are obtained. The first sampling difference is the difference between the second sampling value and the first sampling value, and the second sampling difference is the difference between the third sampling value and the second sampling value. The first sampling difference and the second sampling difference are used to eliminate the influence of the DC component in the measured single-phase sinusoidal signal. The AC amplitude and phase of the measured single-phase sinusoidal signal are determined based on the first orthogonal projection and the second orthogonal projection. The DC component of the measured single-phase sinusoidal signal is determined based on the first sampled value and the first orthogonal projection. New sampled values ​​are acquired, and the first, second, and third sampled values ​​are updated with the second, third, and new sampled values ​​to synchronously update the DC component, AC amplitude, and phase of the measured single-phase sinusoidal signal.

2. The method according to claim 1, characterized in that, The measured single-phase sinusoidal signal includes an AC component and a DC component; The signal frequency is a preset frequency, a system-given frequency, the output frequency of the frequency detection module, or the output frequency of the phase-locked loop module.

3. The method according to claim 1, characterized in that, The step of determining the fixed phase difference between adjacent sampled values ​​based on the signal frequency of the measured single-phase sinusoidal signal and the fixed sampling period includes: Based on the signal frequency, determine the angular frequency of the measured single-phase sinusoidal signal; The fixed phase difference is determined by multiplying the angular frequency by the fixed sampling period; Based on the fixed phase difference, determine the sine and cosine values ​​corresponding to the fixed phase difference.

4. The method according to claim 3, characterized in that, The step of determining the intermediate coefficient based on the fixed phase difference includes: The cosine value corresponding to the fixed phase difference is determined as the first fundamental coefficient, and the sine value corresponding to the fixed phase difference is determined as the second fundamental coefficient. Based on the first basic coefficient and the second basic coefficient, determine the first difference coefficient, the second difference coefficient, the third difference coefficient and the fourth difference coefficient; The discriminant of the denominator is determined based on the first difference coefficient, the second difference coefficient, the third difference coefficient, and the fourth difference coefficient. The intermediate coefficients include the first basic coefficient, the second basic coefficient, the first difference coefficient, the second difference coefficient, the third difference coefficient, the fourth difference coefficient, and the denominator discriminant.

5. The method according to claim 4, characterized in that, The first difference coefficient m1 = C-1; The second difference coefficient n1 = S; The third difference coefficient m2 = 2C² - C - 1; The fourth difference coefficient n2 = S(2C-1); The discriminant in the denominator is Δ = m1·n2 - m2·n1; Wherein, C represents the first basic coefficient, and S represents the second basic coefficient.

6. The method according to claim 5, characterized in that, The step of calculating the first orthogonal projection and the second orthogonal projection of the AC component of the measured single-phase sinusoidal signal at the sampling time corresponding to the first sampling value, based on the first sampling difference, the second sampling difference, and the intermediate coefficient, includes: Based on the first difference coefficient and the second difference coefficient, a first linear relationship is established between the first sampling difference and the first orthogonal projection quantity and the second orthogonal projection quantity; Based on the third difference coefficient and the fourth difference coefficient, a second linear relationship is established between the second sampling difference and the first orthogonal projection quantity and the second orthogonal projection quantity; Based on the first linear relationship and the second linear relationship, the first orthogonal projection quantity and the second orthogonal projection quantity are obtained.

7. The method according to claim 6, characterized in that, The first orthogonal projection X = (d1×n2 - d2×n1) / Δ, and the second orthogonal projection Y = (m1×d2 - m2×d1) / Δ; in, This represents the first sampling difference. This represents the second sampling difference.

8. The method according to claim 1, characterized in that, The step of determining the AC amplitude and phase of the measured single-phase sinusoidal signal based on the first orthogonal projection and the second orthogonal projection includes: The sum of squares is determined by the sum of the squares of the first orthogonal projection and the squares of the second orthogonal projection. The AC amplitude is determined based on the square root of the sum of squares. Perform a four-quadrant arctangent operation based on the first orthogonal projection and the second orthogonal projection to determine the phase of the sampling time corresponding to the first sampled value; The phase of the measured single-phase sinusoidal signal at the target sampling time is determined based on the phase of the first sampled value at the corresponding sampling time and the fixed phase difference.

9. The method according to claim 1, characterized in that, Determining the DC component of the measured single-phase sinusoidal signal based on the first sampled value and the first orthogonal projection includes: The difference between the first sampled value and the first orthogonal projection is determined as the DC component of the measured single-phase sinusoidal signal.

10. The method according to any one of claims 1 to 9, characterized in that, The method further includes: The continuously determined DC component and / or AC amplitude are subjected to digital low-pass filtering or moving average processing to obtain the filtered parameter detection results.