An alternating voltage effective value measurement method, device and medium

CN122882800APending Publication Date: 2026-10-09SHANGHAI CIVIL AVIATION POWER SYSTEM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611391956.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-09
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

二者性能需求相互矛盾,给机载嵌入式RMS测量算法带来较大挑战

Benefits of technology

1、构建以有效值相对变化率为反馈的Sigmoid自适应滤波闭环,均方滤波与输出平滑滤波复用同一自适应滤波系数实现全链路联动调节,瞬态工况下两级滤波同步提速,稳态工况下同步增强平滑抑制能力,彻底消除输出端响应瓶颈,上电响应速度相较传统固定系数方案提升10.9倍,同时显著降低稳态测量误差,提升抗低频脉冲干扰能力;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122882800A_ABST
    Figure CN122882800A_ABST
Patent Text Reader

Abstract

The application discloses an AC voltage effective value measurement method, device and medium, adopts online adaptive measurement, offline multi-target parameter calibration and embedded mapping cooperative design, forms an integrated AC effective value measurement scheme. The online adaptive measurement generates a unified adaptive filter coefficient according to the relative change rate of the final smoothed effective value, and synchronously applies the coefficient to the mean square filter and the output smoothing filter. The offline multi-target parameter calibration faces the complete measurement link, determines the parameter group such as the differential cumulative coefficient, the filter coefficient boundary, the working condition threshold and the mapping steepness under the power-on, steady-state and power-off working conditions. The embedded mapping module solves the adaptive coefficient by piecewise linear approximation, and reduces the real-time calculation overhead of the embedded platform. The three parts respectively constrain the system online dynamic performance, the parameter performance boundary and the hardware real-time implementation condition, cooperatively consider the steady-state measurement accuracy, the transient response characteristic and the hardware resource occupation, and realize the comprehensive optimal balance of the three.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power electronic measurement and signal processing technology, specifically to a method, device, and medium for measuring the effective value of AC voltage. Background Technology

[0002] In aviation power management systems, such as the Bus Power Control Unit (BPCU), the RMS (Real Mean Square) value of AC voltage is a core parameter for power quality monitoring, power-on / off logic determination, and load management. Aviation AC power supplies typically use 115V-level variable frequency AC power, with operating frequencies covering 400Hz-800Hz. Due to embedded hardware resource constraints, the actual sampling rate is typically 5kHz, corresponding to a 200μs sampling period. Airborne scenarios present two mutually restrictive hard requirements for RMS measurement: firstly, a high-precision steady-state requirement, where the RMS measurement deviation needs to be less than 0.1V under stable voltage conditions to ensure reliable power quality assessment; secondly, a fast transient response requirement, where the RMS needs to track the real voltage rapidly within 10ms during power-on and power-off step changes to ensure real-time power switching and protection logic. These conflicting performance requirements pose a significant challenge to airborne embedded RMS measurement algorithms.

[0003] Currently, commonly used AC RMS measurement schemes for embedded platforms mainly include integer-cycle integration, fixed-coefficient IIR filtering, sliding-window FFT, and existing adaptive filtering methods. Each of these schemes has inherent drawbacks. (1) Integer period integration method Theoretically, the root mean square (RMS) of an AC signal obtained by square integration over one or more complete cycles has high accuracy. However, this algorithm heavily relies on zero-crossing detection or a phase-locked loop (PLL) to obtain the signal period. Aviation power supplies are 400Hz-800Hz frequency conversion systems, and period detection itself has a convergence delay. Furthermore, the presence of harmonics and noise interference can cause zero-crossing drift, leading to inaccurate selection of the integration window. In practical engineering, the total delay after measurement stabilization can reach tens of milliseconds, which cannot meet the aviation system's requirement for rapid power-on / off determination on the order of 10ms.

[0004] (2) Fixed coefficient IIR filtering method A fixed-coefficient infinite impulse response (IIR) low-pass filter is used to filter the squared term of the signal, and then the square root is taken to obtain the RMS result. This algorithm has low computational complexity and good real-time performance, making it the most commonly used implementation scheme in aerospace embedded engineering. However, this scheme has inherent contradictions: once the filter coefficients are determined, steady-state accuracy and transient response speed cannot be simultaneously achieved; when a smaller filter coefficient is selected, the steady-state measurement noise is low and the accuracy is high, but the power-on and power-off responses are slow, with a typical power-on response time exceeding 30ms; selecting a larger filter coefficient can speed up transient tracking, but the steady-state output ripple is large, and the measurement error is worsened, making it difficult to simultaneously meet the two performance indicators required for aerospace applications.

[0005] (3) Sliding window FFT method The effective value is calculated by extracting the fundamental component using Fast Fourier Transform (FFT). This method offers high measurement accuracy but incurs significant computational overhead, requiring substantial storage space for data caching and FFT operations, resulting in high hardware resource consumption. This makes it unsuitable for resource-constrained airborne embedded platforms like BPCUs. Furthermore, the fixed window length introduces an inherent trade-off between response speed and frequency resolution.

[0006] (4) Existing adaptive RMS measurement methods Existing literature proposes adaptive schemes that switch filter coefficients based on the degree of signal change. Most of these schemes employ hard threshold judgment and two-level switching, which have several engineering shortcomings: First, the abrupt change in filter coefficients between the two levels directly causes sudden changes and oscillations in the RMS output, affecting the stability of the power supply judgment logic. Second, the threshold and level coefficients rely entirely on manual trial and error based on engineering experience, lacking a systematic global optimization method. Third, most schemes only perform adaptive adjustment for the mean square filtering calculation process, while the subsequent output smoothing stage still uses fixed coefficients. This makes the subsequent smoothing stage a bottleneck in the response speed of the entire signal link, limiting the overall dynamic performance. Fourth, some advanced adaptive schemes use exponential functions to achieve continuous coefficient mapping, but the computational complexity of exponential operations is high, making it difficult to achieve high sampling rate real-time operation on embedded platforms with limited computing power.

[0007] In summary, existing technologies cannot simultaneously meet the comprehensive requirements of steady-state high precision, transient fast response, and low computational resource overhead in aviation frequency conversion AC power supply scenarios. They also have problems such as output oscillation during hard threshold switching, fixed coefficient speed bottlenecks within the link, reliance on manual debugging of hyperparameters, and difficulty in airborne deployment of complex mapping operations. Therefore, there is an urgent need to develop an adaptive AC effective value detection solution that is compatible with airborne embedded devices such as aviation BPCUs. Summary of the Invention

[0008] The purpose of this invention is to solve the problems existing in the background art.

[0009] To address the above problems, this invention discloses a method for measuring the effective value of AC voltage, comprising: When using the measurement platform for online measurement, the original AC voltage signal output at the current sampling time is acquired, and the first-order differential signal of the original AC voltage signal is de-DC biased by using the differential accumulation coefficient to obtain the AC component signal at the current time. The relative rate of change of the effective value is obtained from the effective voltage values ​​between the most recent adjacent historical sampling times. The relative rate of change of the effective value indicates the degree of drastic change in the operating condition of the effective voltage value. The adaptive filter coefficients are obtained by mapping the relative rate of change of the effective values. Using the adaptive filtering coefficients and the historical mean square filter output from the previous sampling time, the AC component signal at the current sampling time is subjected to adaptive mean square filtering to obtain the mean square filter output at the current sampling time. By reusing the adaptive filtering coefficients and the effective voltage value at the previous sampling time, the coarsely estimated effective value obtained by taking the square root of the mean square filter output at the current sampling time is subjected to adaptive smoothing filtering to obtain the effective voltage value at the current sampling time.

[0010] Preferably, the step of mapping the relative rate of change of the effective values ​​to obtain the adaptive filter coefficients includes: When the computing power of the measurement platform is within the first computing power range, the difference between the relative change rate of the effective value and the Sigmoid condition judgment threshold is continuously mapped to the steady-state minimum filter coefficient and the transient maximum filter coefficient using the Sigmoid mapping function to obtain the adaptive filter coefficient. When the computing power of the measurement platform falls within the second computing power range, the Sigmoid mapping function is fitted using a three-segment linear approximation function, and the adaptive filtering coefficients are obtained based on the three-segment linear approximation function. When the computing power of the measurement platform falls within the third computing power range, a ternary step function is used to fit the Sigmoid mapping function, and the adaptive filtering coefficients are obtained based on the ternary step function. Wherein, the computing power supported by the first computing power range is greater than the computing power supported by the second computing power range, and the computing power supported by the second computing power range is greater than the computing power supported by the third computing power range.

[0011] Preferably, the method for measuring the effective value of AC voltage further includes: The hyperparameter set is calibrated offline using the measurement platform. For the complete measurement link corresponding to the online measurement of the measurement platform, the hyperparameter set is determined under power-on, steady-state, and power-off conditions. The hyperparameter set includes the following hyperparameters: The differential cumulative coefficient, the Sigmoid condition determination threshold, the steady-state minimum filter coefficient and the transient maximum filter coefficient, and the steepness parameter in the Sigmoid mapping function.

[0012] Preferably, the offline calibration of the hyperparameter set using the measurement platform, for the complete measurement link corresponding to the online measurement of the measurement platform, determines the hyperparameter set under power-on, steady-state, and power-off conditions, including: Obtain the parameter search space for each hyperparameter; A multi-objective fitness function is constructed based on the steady-state accuracy, power-on transient response, and power-off transient response of the AC voltage measured by the measurement platform. The multi-objective fitness function is composed of a weighted sum of the steady-state mean square error, the power-on response time, and the power-off response time. With the goal of minimizing the value of the multi-objective fitness function, a genetic algorithm is executed to iteratively search for the optimal parameter value from the parameter search space of each hyperparameter, which is then used as the final target value for each hyperparameter.

[0013] Preferably, the step of using the minimum value of the multi-objective fitness function as the optimization objective, performing an iterative search using a genetic algorithm to obtain the optimal parameter values ​​from the parameter search space of each hyperparameter, and using these optimal values ​​as the final target values ​​for each hyperparameter, includes: The following operations are executed sequentially: population initialization, fitness assessment, individual selection, parameter crossover, and parameter mutation. After the iteration termination condition is met, the target value used for each hyperparameter is output.

[0014] Preferably, the fitness assessment further includes: The population initialization process yields multiple sets of parameter values ​​corresponding to the hyperparameter set within the population. For each set of parameter values, simulation evaluation was performed using power-on simulation conditions, steady-state simulation conditions, and power-off simulation conditions, respectively. Based on the simulation results, the steady-state mean square error, power-on response time, and power-off response time corresponding to each set of parameter values ​​are calculated, and then substituted into the multi-objective fitness function to calculate the multi-objective fitness function value corresponding to each set of parameter values.

[0015] Preferably, the step of using the Sigmoid mapping function to continuously map the difference between the relative rate of change of the effective value and the Sigmoid condition judgment threshold to the steady-state minimum filter coefficient and the transient maximum filter coefficient to obtain adaptive filter coefficients further includes: When the adaptive filter coefficient approaches the steady-state minimum filter coefficient, it indicates that the original AC voltage signal at the current moment is in a steady state. When the adaptive filter coefficient approaches the transient maximum filter coefficient, it indicates that the original AC voltage signal at the current moment has undergone a transient jump.

[0016] The present invention also discloses an AC voltage RMS measurement device, comprising an ADC sampling module, a storage module, and a processing module; the ADC sampling module is used to acquire raw AC voltage signals; the storage module is used to store computer programs / instructions and data required during the execution of the computer programs / instructions; the processing module executes the AC voltage RMS measurement method described above based on the stored computer programs / instructions.

[0017] The present invention also discloses a computer-readable storage medium including a computer program / instructions, which, when executed by a processor, implement the AC voltage RMS measurement method as described above.

[0018] The present invention also discloses a computer program product, which includes a computer program / instruction. When the computer program / instruction is loaded and executed by a processor, it implements the AC voltage RMS measurement method as described above.

[0019] The AC voltage RMS measurement method, apparatus, and medium provided by this invention have the following advantages compared with the prior art: 1. Construct a Sigmoid adaptive filter closed loop with feedback based on the relative change rate of the effective value. The mean square filter and the output smoothing filter reuse the same adaptive filter coefficient to achieve full-link linkage adjustment. Under transient conditions, the two-stage filter is accelerated synchronously, and under steady-state conditions, the smoothing and suppression capabilities are enhanced synchronously, completely eliminating the output response bottleneck. The power-on response speed is 10.9 times faster than the traditional fixed coefficient scheme, while significantly reducing steady-state measurement errors and improving the ability to resist low-frequency pulse interference. 2. Using the relative change rate of the effective value as the feedback quantity has the characteristic of amplitude normalization, and the same set of hyperparameters can be adapted to AC measurement scenarios with different rated voltage levels. 3. The Sigmoid mapping makes the filter coefficients naturally bounded and have a smooth, continuous transition, ensuring the stable operation of the IIR filter and avoiding sudden oscillations in the output. 4. By constructing a multi-objective fitness function through a genetic algorithm, the system achieves global automatic optimization of hyperparameters, eliminating the limitations of manual parameter tuning and ensuring reproducible and reliable parameter results. It provides two alternative implementations: three-segment linear approximation mapping and three-valued ladder mapping, avoiding the original Sigmoid exponent operation, significantly reducing the operation clock cycle, and having low memory usage, making it compatible with resource-constrained embedded hardware such as MCUs and DSPs. Attached Figure Description

[0020] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments: Figure 1 This is a schematic diagram of the steps of the AC voltage RMS measurement method provided by the present invention; Figure 2 This is a flowchart of the AC voltage RMS measurement method provided by the present invention; Figure 3 This is a schematic diagram of the adaptive filter coefficient mapping characteristic curve based on Sigmoid provided in an embodiment of the present invention; Figure 4 This is a schematic diagram comparing the standard Sigmoid function with the three-segment linear approximation function provided in this embodiment of the invention; Figure 5 This is a schematic diagram of the piecewise linear approximation error distribution provided in an embodiment of the present invention; Figure 6 This is a diagram comparing the computational complexity of the three Sigmoid implementation schemes provided by this invention. Figure 7 This is a schematic diagram comparing the RAM response provided by the embodiment of the present invention with the RAM response provided by the conventional method. Detailed Implementation

[0021] The following specific embodiments illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. Although the description of the present invention is presented in conjunction with preferred embodiments, this does not mean that the features of the invention are limited to these embodiments. On the contrary, the purpose of describing the invention in conjunction with embodiments is to cover other options or modifications that may be derived based on the claims of the present invention. To provide a deep understanding of the invention, many specific details will be included in the following description. The invention may also be implemented without using these details. Furthermore, to avoid confusion or obscuring the focus of the invention, some specific details will be omitted in the description. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of the present invention can be combined with each other.

[0022] In the description of this embodiment, it should be noted that the terms "upper", "lower", "inner", "bottom", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship that the product of the invention is usually placed in during use. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limiting the present invention.

[0023] The terms “first”, “second”, etc., are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.

[0024] In the description of this embodiment, it should also be noted that, unless otherwise explicitly specified and limited, the terms "provided with," "set up," "connected," and "linked" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this embodiment based on the specific circumstances.

[0025] To address the core contradiction in existing AC voltage RMS measurement technologies—the inherent trade-off between steady-state accuracy and transient response—and to overcome shortcomings such as output oscillations caused by abrupt changes in adaptive filter coefficients, response bottlenecks due to partial adaptive operation, reliance on manual experience for hyperparameter optimization, and excessive computational demands of complex adaptive methods, this paper refers to... Figure 1 The diagram shows a flowchart of a method for measuring the effective value of AC voltage according to this embodiment. Figure 2 A flowchart of the AC voltage RMS measurement method of the present invention is shown, in conjunction with... Figure 2 As shown, the original AC voltage signal sequentially passes through differential DC, adaptive mean square IIR filtering, square root operation, and adaptive smoothing output filtering to output the effective voltage value at the current sampling time. The effective voltage value at the current sampling time is fed back to calculate the relative rate of change of the effective value, and the adaptive filtering coefficient is solved by the Sigmoid function. The coefficient is then fed back to control the coefficients of the adaptive mean square IIR filtering and the adaptive smoothing output filtering.

[0026] The following is combined Figure 1 The specific steps of this method are described in detail below. This method includes the following steps: S1. When using the measurement platform for online measurement, acquire the original AC voltage signal output at the current sampling time, and remove the DC bias from the first-order differential signal of the original AC voltage signal using the differential accumulation coefficient to obtain the AC component signal at the current time. Specifically, this step is used to eliminate the DC bias and low-frequency temperature drift components introduced by ADC sampling, retaining the effective AC signal of the aviation 400Hz-800Hz frequency conversion; and acquire the original AC voltage signal collected by the ADC. , The sampled value at the i-th sampling time; for the original AC voltage signal The differential signal is obtained by performing a first-order difference operation. : In the formula, This is the original AC voltage signal acquired at the previous sampling time.

[0027] The differential signal is subjected to IIR cumulative filtering to obtain an AC signal with DC bias removed. : ;in, This is the cumulative differential coefficient; This is the filtered AC signal output from the previous sampling time. Save the original AC voltage signal from this iteration. Remove DC bias from AC signal As the historical state for the next iteration; S2. The relative rate of change of the effective voltage value is obtained based on the effective voltage values ​​between the two most recent adjacent historical sampling times. This relative rate of change indicates the degree of drastic change in the operating conditions of the effective voltage value. Specifically, the historical smoothed effective voltage values ​​that have been output and stored from the previous two sampling times are read. , And calculate the relative rate of change of the effective value. : ;in, To prevent the possibility of decimals being zero, in this embodiment... The value is 0.0001, used to prevent the denominator from being 0; This is the final smoothed effective value output at the previous sampling time. This is the final smoothed effective value output at the sampling time two steps prior. and These are the historical state variables stored in the output smoothing IIR stage; This step constitutes the closed-loop feedback sensing link of the entire adaptive algorithm, generating adaptive filter coefficients for the subsequent step S3. Providing the basis for the judgment, this step has three key design features: (1) The smoothed effective value output in step S5 As a feedback source, rather than the original AC voltage signal As a feedback source.

[0028] The original AC voltage signal in step S1 As the AC voltage is an alternating waveform, the instantaneous sampling value fluctuates significantly between positive and negative peaks due to the inherent periodicity of the measured AC voltage. Therefore, the changes in the instantaneous sampling value cannot represent the true dynamic trend of the effective value of the measured AC voltage. If the original AC voltage signal is used directly... Providing feedback can easily lead to false triggering of adaptive logic and changes in adaptive filter coefficients. Frequent erroneous jumps.

[0029] Those skilled in the art will understand that this embodiment uses the smoothed effective value obtained after the output smoothing filter in step S5. As a source of feedback, This is a slowly varying DC output quantity, whose numerical changes can accurately reflect the macroscopic state changes of the measured original AC voltage's effective value, such as voltage up-up, voltage down-out, and load step changes. It also includes adaptive filter coefficients. The regulation provides reliable and effective decision input.

[0030] (2) Use relative rate of change, rather than absolute change, as the feedback quantity.

[0031] This embodiment uses the relative rate of change in step S2. This means that the difference in variation is divided by the historical effective value, exhibiting amplitude normalization characteristics. For AC voltages under test with different rated levels, such as 115V and 134V in aviation frequency converter power supplies, voltage step disturbances of the same proportion will produce relative change rates of similar magnitude. .

[0032] Therefore, the algorithms can share the same set of hyperparameters. It can be adapted to various AC measurement scenarios with different rated voltages without the need for readjustment or modification, thus improving the algorithm's versatility across operating conditions.

[0033] (3) Prevention and removal of small quantities The basis for selecting (epsilon) in engineering.

[0034] Set the fractional value to zero On the one hand, it is used to avoid the denominator A division-by-zero exception occurs when the result is 0; on the other hand... The value of will directly affect the power-on startup phase. The output characteristics. If too small is selected... ,For example During the power-on initialization phase, The value is close to 0. Even the slightest fluctuation can lead to the calculation of an exceptionally large one. This will cause the adaptive filter coefficients output in step S3 to... Premature saturation Compressed adaptive filter coefficients Effective adjustment of dynamic range.

[0035] This embodiment selects =0.0001, which can both avoid the risk of division by zero and allow for adjustments during the initial power-on phase. Perform appropriate numerical suppression to ensure the adaptive filter coefficients It has a complete and usable adjustment range.

[0036] S3. Map the relative rate of change of the effective value to obtain the adaptive filter coefficients. Specifically, this embodiment provides multiple Sigmoid mapping implementations for different hardware computing power conditions, adapting to various measurement platforms ranging from those with ample computing power to those with highly limited resources. The first computing power range refers to hardware platforms with ample computing power, capable of supporting complete Sigmoid function computation; the second computing power range refers to embedded platforms with moderate computing power; and the third computing power range refers to low-end MCU and DSP platforms with highly limited resources. Specifically, the computing power supported by the first computing power range is greater than that supported by the second computing power range, and the computing power supported by the second computing power range is greater than that supported by the third computing power range.

[0037] In some embodiments, when the computing power of the measurement platform is within the first computing power range, the difference between the relative change rate of the effective value and the Sigmoid condition judgment threshold is continuously mapped to the steady-state minimum filter coefficient and the transient maximum filter coefficient using the Sigmoid mapping function to obtain the adaptive filter coefficient.

[0038] Specifically, the adaptive filter coefficients are calculated based on the Sigmoid function: the relative rate of change of the effective values ​​is used. Input the Sigmoid mapping function to obtain the adaptive filter coefficients. ;in, = This is the standard Sigmoid function; The minimum steady-state filter coefficient determines the upper limit of steady-state measurement accuracy, with a typical value range of 0.01 to 0.05. The transient maximum filter coefficient determines the transient tracking response speed, with a typical value range of 0.10 to 0.20; The threshold value for determining the Sigmoid condition is used to distinguish between steady-state and transient conditions, with a typical value range of 0.01 to 0.05. This is the steepness parameter in the Sigmoid mapping function, used to control the width of the transition region of the coefficients, with a typical value range of 50 to 200; 0 < < <1; Those skilled in the art will understand that this step is the closed-loop feedback decision-making stage of the entire adaptive AC signal RMS detection method, outputting adaptive filter coefficients. They are supplied to steps S4 and S5 respectively.

[0039] This embodiment uses the Sigmoid function as the mapping function, which has the following three technical advantages: (1) The output range is naturally bounded, ensuring the stable operation of the IIR filter.

[0040] Sigmoid function The output is strictly in the (0,1) interval. After the above linear transformation, the adaptive filter coefficients... Constrained by ( , Within the specified range. By mathematically constraining the boundary of the filter coefficients, the IIR filter is prevented from experiencing coefficient out-of-bounds issues, ensuring the stability of the filtering operation without requiring additional hardware or software limiting protection logic.

[0041] (2) Continuous and smooth transition, suppressing output abrupt changes and oscillations.

[0042] Reference Figure 3As shown, compared with the hard-threshold two-gear switching method, the Sigmoid function presents S-shaped curve characteristics. In the transition region near the switching threshold T, the coefficient changes smoothly along the S-shaped curve, which can realize the adaptive filtering coefficient continuous smooth transition of, corresponding to Figure 3 the smooth transition region in, which can eliminate the effective value output mutation and oscillation caused by the step jump of the coefficient.

[0043] When the measured AC signal is in a stable state, <T (T=0.0146), automatically approaches , the algorithm enters a high-precision steady-state operation mode; when the measured AC signal changes drastically, >T, automatically approaches , the algorithm switches to a fast-response transient operation mode.

[0044] (3) The four hyperparameters have clear physical meanings, and their parameter influences are approximately orthogonal, which is convenient for parameter adjustment and optimization.

[0045] Hyperparameter , , T and k correspond to different performance dimensions respectively: , respectively define the upper performance limits of two extreme operation modes: the high-precision steady-state region and the fast-response transient region; T controls the trigger sensitivity of operation mode switching; k controls the steepness of the smooth transition region. The influences of each hyperparameter on the algorithm performance are independent of each other, which is not only convenient for manual debugging by engineers, but also adapts to multi-objective offline optimization of genetic algorithm, and is convenient for obtaining the optimal hyperparameter combination adapted to airborne hardware working conditions through the optimization algorithm. In practical engineering, a set of optimal specific values adapted to the target hardware can be obtained through offline optimization by genetic algorithm, and this set of optimal hyperparameters is assigned to this step S3 to participate in real-time calculation.

[0046] In some embodiments, when the computing power of the measurement platform falls within the second computing power range, a three-segment linear approximation function is used to fit the Sigmoid mapping function, and the adaptive filtering coefficient is obtained based on the three-segment linear approximation function.

[0047] Specifically, with reference to Figure 4 shown, the three-segment linear approximation function is used to replace the standard Sigmoid function in step S3 , so as to obtain the adaptive filtering coefficient through fitting; specifically, the standard Sigmoid function has the expression: , this function contains an exponential In embedded platforms with moderate computing power (such as DSPs and MCUs), exponential operations require tens to hundreds of processor clock cycles, resulting in high computational overhead and reducing the real-time processing speed of the algorithm. This is detrimental to the deployment and operation of this measurement method on resource-constrained MCU and DSP hardware platforms. To address this issue, this invention further provides a three-segment linear approximation function implementation scheme for the Sigmoid function, using simple comparison and multiplication-addition operations to replace exponential operations, thereby reducing computational overhead while maintaining acceptable approximation error.

[0048] The expressions for the three linear approximation functions are as follows: , where c is the saturation boundary parameter; For example, in this embodiment, when the saturation boundary parameter c=3.0, the left saturation point =0.0474, right saturation point =0.9526, Slope m in the linear region = (0.9526 - 0.0474) / 6 = 0.1509.

[0049] This three-segment linear approximation function requires only two value comparison operations and one multiplication-addition operation, completely eliminating the original exponential operation and significantly reducing the clock cycle consumption on embedded devices. Within the entire input domain, the maximum approximation error of this scheme is approximately 0.0913, with the maximum error occurring at both ends of the transition region, i.e., X is approximately ±1.5. This three-segment linear approximation function significantly reduces the processor's computational burden while sacrificing a small amount of computational accuracy, enabling real-time deployment of the algorithm on resource-constrained MCU and DSP low-end hardware platforms.

[0050] In some embodiments, when the computing power of the measurement platform falls within the third computing power range, a ternary step function is used to fit the Sigmoid mapping function, and the adaptive filtering coefficients are obtained based on the ternary step function.

[0051] Specifically, refer to Figure 5 As shown, for low-end MCU and DSP platforms with highly limited computing power, the continuous mapping characteristic of the Sigmoid function can be further discarded, and a ternary step-map function can be used to replace the standard Sigmoid function in step S3. The adaptive filter coefficients are directly output based on the three-valued ladder mapping function. Alternative This completely eliminates multiplication operations and minimizes computational overhead; the three-valued echelon mapping function is: ,in, , The threshold for determining the rate of change at two levels can be derived based on the hyperparameters output by the aforementioned genetic algorithm.

[0052] In this embodiment, the threshold value is: =0.0004, =0.0296. This ternary step map scheme requires only two degree value comparison operations, completely eliminating exponentiation and multiplication operations.

[0053] This scheme sacrifices the continuous and smooth transition characteristics of the original Sigmoid function, and produces a step change in output in the transition interval corresponding to the two thresholds, resulting in a step effect. It is suitable for engineering scenarios where the smoothness of the output signal is not critical, but the computational overhead of the processor is extremely sensitive.

[0054] To illustrate the low-resource advantage of the mapping scheme adopted in this invention on embedded platforms, Table 1 compares the core operation types and typical MCU execution clock cycles of three implementation schemes: standard Sigmoid, three-segment linear approximation function, and three-valued ladder mapping.

[0055] Table 1: Comparison of Embedded Computational Load for Different Implementation Schemes Figure 6 The computational complexity of three implementation schemes on a typical MCU is compared: standard Sigmoid (exp + division, approximately 200 clock cycles), three-segment linear approximation (2 comparisons + 1 multiply-accumulate operation, approximately 8 clock cycles), and ternary ladder mapping (2 comparisons, approximately 3 clock cycles). The three-segment linear approximation scheme reduces the computational load by 96% while maintaining good approximation accuracy, fully meeting the requirements of embedded real-time operation.

[0056] Direct computation of the Sigmoid mapping function incurs significant overhead on resource-constrained embedded processors, requiring tens to hundreds of clock cycles and potentially impacting real-time system performance. This embodiment employs the aforementioned hierarchical mapping strategy to fully leverage the adjustment advantages of continuous Sigmoid mapping on high-performance platforms while reducing computation time through approximate fitting on mid- to low-end embedded platforms. This ensures real-time measurement of AC RMS values, achieving a balance between steady-state accuracy and transient response under varying hardware conditions.

[0057] S4. Using the adaptive filter coefficients and the historical mean square filter output from the previous sampling time, perform adaptive mean square filtering on the AC component signal at the current sampling time to obtain the mean square filter output at the current sampling time. Specifically, this involves using the adaptive filter coefficients output in step S3... This is applied to the mean square filter calculation process, specifically to the AC signal output from step S1 after DC removal. Perform an IIR low-pass filter operation on the square of the result to obtain the mean square filter output. : In the formula, This is the mean square filter output from the previous sampling time, representing the historical state variables stored internally by this IIR filter. After completing this round of calculations, the result obtained from this calculation is saved. This serves as the historical state for the next iteration.

[0058] This step is the execution stage of the adaptive closed-loop feedback, involving adaptive filter coefficients. As recursive weighting coefficients for this IIR filter, the real-time adjustment filter allocates weights between "trusting the current sampled value" and "maintaining historical accumulated values": when tend When, the filter increases the current sampling rate. The weighting is adjusted to quickly accept new sampling information and achieve transient tracking capability under the original AC voltage change condition, i.e., fast tracking; when tend At this time, the filter is dominated by historical accumulated information, which can effectively suppress single-point fluctuations in sampling and achieve a smooth filtering effect under steady state, i.e., slow tracking.

[0059] By continuously and adaptively adjusting this weight, a direct implementation mechanism is provided for this application to balance steady-state measurement accuracy and transient response speed.

[0060] Combining steps s2, s3, and S4, a complete closed-loop control architecture is formed: closed-loop feedback sensing stage (step S2) → closed-loop feedback decision stage (step S3) → closed-loop feedback execution stage (step S4). The smoothed effective value output in subsequent step S5 is then fed back to step S2 as the closed-loop input. This closed loop operates in real time with each ADC sampling time as the computation cycle. In this embodiment, the sampling interval is 200μs, which does not introduce additional algorithm delay.

[0061] The mean square filter output calculated in this step The output is sent to step S5 to obtain a rough estimate of the effective value.

[0062] S5. Reusing the adaptive filter coefficients and the voltage RMS value from the previous sampling time, adaptively smooth the coarsely estimated RMS value obtained by taking the square root of the mean square filter output at the current sampling time to obtain the voltage RMS value at the current sampling time. Specifically, the mean square filter output... Perform the square root operation to obtain a rough estimate of the effective value. More specifically, this step receives the mean square filtered output from step S4. This output is the filtered result of the square component of the measured AC signal after the adaptive IIR mean square filtering process in step S4, which physically represents the mean square value of the measured AC signal. Based on the mathematical correspondence between the effective value and the mean square value, performing a square root operation on this mean square filter output yields a coarse estimate of the effective value of the measured AC signal. .

[0063] The rough estimate of the effective value calculated here The initial RMS value is a coarse estimate without secondary smoothing. Because the original AC voltage signal itself contains noise interference, and the pre-filtering stage cannot completely remove all high-frequency interference components, this coarse estimate will still retain a certain degree of high-frequency noise fluctuation, resulting in slight fluctuations in the output value. This coarse estimate is not suitable for direct output as the final RMS measurement result and needs to be fed into subsequent step S5. Step S5 performs adaptive smoothing filtering at the output end to further suppress noise fluctuations and improve the stability of the measurement result.

[0064] For practical implementation scenarios of airborne embedded software engineering, the specific implementation approach for square root calculation can be flexibly selected based on the differences in airborne processor hardware resources. It can either directly call the processor's built-in hardware square root instruction to complete the calculation, relying on hardware instructions to achieve high-speed square root solving; or it can use software approximation algorithms such as Newton's iteration to complete the square root calculation through software iterative computation. This application does not limit the specific implementation algorithm for square root calculation. Those skilled in the art can select an appropriate square root implementation method as needed, considering the actual hardware computing power, computation latency, calculation accuracy, and other engineering constraints of the airborne equipment.

[0065] The coarsely estimated effective value obtained in this step will be used as an input signal for subsequent adaptive smoothing filtering.

[0066] Adaptive smoothing output filtering: Reusing the same adaptive filtering coefficients obtained in step S3 The adaptive filter coefficients are used in the output smoothing filter calculation process, and the mean square filter calculation process and the output smoothing filter calculation process share the same adaptive filter coefficients. ; for the coarsely estimated effective value Perform smoothing filtering to obtain the final smoothed effective value of the output at this sampling time. : In the formula, The historical smoothed effective value stored at the previous sampling time is the historical state variable stored internally by this IIR filter.

[0067] At the end of the iteration, update the historical state variable. Assign to ,Will Assign to This is used for step S2 at the next sampling time; The steps S1-S5 are executed repeatedly, with one complete operation performed at each ADC sampling time, and the effective voltage value at the current sampling time is output.

[0068] Specifically, the coarsely estimated effective value output from step S5 is received. And reuse the same adaptive filter coefficients used in step S3 and step S4. An adaptive smoothing filter operation is performed at the output end to obtain the smoothed effective value. : Calculated This is the final output measurement result of the AC voltage RMS value; simultaneously, It will be stored as a closed-loop feedback source for step S2 to calculate the relative rate of change of the effective value. This closes the entire adaptive control loop. After the calculation is complete, the data is updated and saved. , The internal state variables prepare data for step S2 at the next sampling time.

[0069] This step is the key technical feature that distinguishes this application from the prior art: Traditional adaptive RMS measurement schemes typically only adaptively adjust the filter coefficients in the mean square filtering calculation process, i.e., step S4. The subsequent output smoothing filtering calculation process still uses a fixed small coefficient, such as 0.01 to 0.02. This fixed small coefficient output smoothing stage becomes a bottleneck for the transient response of the entire signal chain: even if the mean square filter in the preceding stage S4 has quickly tracked the transient changes in the applied voltage, the subsequent output smoothing stage, limited by the fixed small coefficient, will still perform slow smoothing of the output result, slowing down the overall system response speed and preventing the fast tracking capability of the preceding stage from being transmitted to the final output.

[0070] In this application, the mean square IIR filtering in step S4 and the output smoothing filtering in step S5 share the same adaptive filter coefficient. This enables end-to-end adaptive adjustment.

[0071] When the measured voltage experiences transient conditions such as power-on, power-off, or sudden load changes... tend At the same time, the two-stage filtering in steps S4 and S5 simultaneously increases the weight of the current sample, and the two stages simultaneously accelerate the tracking speed, so that the transient response capability can be completely transferred to the final output; When the measured voltage enters a steady-state condition tend At that time, the two-stage filtering in steps S4 and S5 simultaneously increases the weight of historical data, and both stages simultaneously enter a highly accurate working mode with strong smoothing.

[0072] By synchronously linking the two-stage filtering coefficients, the response bottleneck caused by the output smoothing stage is completely eliminated, truly achieving a balance between transient response speed and steady-state measurement accuracy.

[0073] After all steps S1-S5 of the calculation at this sampling time, the final valid value is output. And wait for the next ADC sampling moment to arrive, and repeat the entire process from step S1 to step S5.

[0074] In some embodiments, the mean square filtering calculation process and the output smoothing filtering calculation process share the same adaptive filtering coefficients. When the relative rate of change of the effective value increases, indicating a transient change in the signal, the adaptive filter coefficients... The synchronous increase ensures that the mean square filtering calculation process and the output smoothing filtering calculation process simultaneously improve the filtering response speed; when the relative rate of change of the effective value decreases, indicating that the signal is in a steady state, the adaptive filtering coefficients... The mean square filtering calculation process and the output smoothing filtering calculation process are reduced synchronously, thereby simultaneously improving the smoothness of the filtering. Specifically, the mean square filtering calculation process in step S4 and the output smoothing filtering calculation process in step S5 share the same adaptive filtering coefficient. .

[0075] When the relative rate of change of the effective value calculated in step S2 The increase indicates that when the measured AC signal undergoes transient changes such as power-on, power-off, or load abrupt changes, the adaptive filter coefficient obtained through step S3 is synchronously increased. The increased adaptive filter coefficient simultaneously acts on the mean square filter calculation process and the output smoothing filter calculation process, so that the two filtering stages synchronously increase the weight of the newly sampled data, synchronously improve the filtering response speed, and ensure that the fast tracking capability of the front stage is completely transmitted to the final output.

[0076] When the relative rate of change of the effective value The reduction indicates that when the measured AC signal is in a steady-state condition, the adaptive filter coefficient decreases synchronously; the weight of historical accumulated data is increased synchronously in the mean square filter calculation process and the output smoothing filter calculation process, thereby improving the smoothness of the filter, suppressing measurement noise and single-point fluctuations, and obtaining higher steady-state measurement accuracy.

[0077] By synchronously reusing the same adaptive filter coefficients through a two-stage filtering process, the output smoothing filter calculation process is prevented from becoming a bottleneck in the system response, thus achieving synergistic optimization of transient response performance and steady-state measurement accuracy.

[0078] In some embodiments, the measurement platform is used to perform offline calibration of the hyperparameter set. For the complete measurement link corresponding to the online measurement of the measurement platform, the hyperparameter set is determined under power-on, steady-state, and power-off conditions. The hyperparameter set includes the following hyperparameters: The differential cumulative coefficient, the Sigmoid condition determination threshold, the steady-state minimum filter coefficient and the transient maximum filter coefficient, and the steepness parameter in the Sigmoid mapping function.

[0079] In some embodiments, the offline calibration of the hyperparameter set using the measurement platform, for the complete measurement link corresponding to the online measurement of the measurement platform, determines the hyperparameter set under power-on, steady-state, and power-off conditions, including: Obtain the parameter search space for each hyperparameter; A multi-objective fitness function is constructed based on the steady-state accuracy, power-on transient response, and power-off transient response of the AC voltage measured by the measurement platform. The multi-objective fitness function is composed of a weighted sum of the steady-state mean square error, the power-on response time, and the power-off response time. With the goal of minimizing the value of the multi-objective fitness function, a genetic algorithm is executed to iteratively search for the optimal parameter value from the parameter search space of each hyperparameter, which is then used as the final target value for each hyperparameter.

[0080] The process sequentially executes population initialization, fitness evaluation, individual selection, parameter crossover, and parameter mutation operations; after reaching the iteration termination condition, the target value used for each hyperparameter is output.

[0081] The fitness assessment includes obtaining multiple sets of parameter values ​​corresponding to the hyperparameter sets within the population through the population initialization; For each set of parameter values, simulation evaluation was performed using power-on simulation conditions, steady-state simulation conditions, and power-off simulation conditions, respectively. Based on the simulation results, the steady-state mean square error, power-on response time, and power-off response time corresponding to each set of parameter values ​​are calculated, and then substituted into the multi-objective fitness function to calculate the multi-objective fitness function value corresponding to each set of parameter values.

[0082] Specifically, this application also includes using a genetic algorithm to optimize hyperparameters. The hyperparameter determination step, which performs multi-objective automatic optimization, is used to obtain a set of optimal hyperparameters for step S3, thereby achieving the best overall performance in terms of steady-state measurement accuracy, power-on response speed, and power-off response speed. This hyperparameter determination step includes sub-steps Q1-Q4: Q1. Defining the parameter search space for hyperparameters: For the five hyperparameters to be optimized, their respective numerical search intervals are limited as follows: , , , , ; The search space described above is defined by combining the physical mechanism of the algorithm with engineering experience. The genetic algorithm only completes the parameter search within this interval, avoiding the generation of invalid parameter individuals without physical meaning, narrowing the optimization range, and improving the optimization convergence efficiency.

[0083] Q2. Construct a multi-objective fitness function F based on the steady-state accuracy, power-on transient response, and power-off transient response of the original AC voltage: A multi-objective fitness function F is constructed to comprehensively evaluate the overall performance of each candidate hyperparameter group in three dimensions: steady-state accuracy, power-on dynamic response, and power-off dynamic response. ;in, The mean square error of the measured effective value relative to the theoretical true value in the steady-state interval is called the steady-state mean square error, which characterizes the steady-state measurement accuracy of the algorithm. Power-on response time is the time it takes for the effective value measurement to reach the predetermined threshold of the rated voltage from 0 for the first time, characterizing the tracking speed during the power-on setup phase. Power-down response time is the time it takes for the effective value of the measured voltage to drop from the rated voltage to the power-down threshold, representing the tracking speed under voltage drop conditions. , , These are the weighting coefficients for steady-state mean square error, power-on response time, and power-off response time, respectively, configured according to the emphasis placed on each performance indicator in the project.

[0084] Simulation evaluation of each set of candidate parameters is performed using power-on, steady-state, and power-off simulation conditions. The steady-state mean square error, power-on response time, and power-off response time corresponding to each set of parameter values ​​are calculated. These values ​​are then substituted into the multi-objective fitness function to calculate the multi-objective fitness function value corresponding to each set of parameter values. Specifically, for each set of hyperparameters within the population, a simulation condition signal encompassing the complete process of power-on establishment, steady-state operation, and voltage power-off is input. The aforementioned complete measurement procedure S1-S5 is run to calculate... , , The three performance indicators are pre-normalized to eliminate dimensional differences between different physical quantities. Then, they are substituted into the multi-objective fitness function to complete the weighted summation and calculate the multi-objective fitness function value corresponding to each set of parameter values.

[0085] Q3. Execute the genetic algorithm iterative search, sequentially performing population initialization, fitness evaluation, individual selection, parameter crossover, and parameter mutation operations. Upon reaching the iteration termination condition, output the optimal hyperparameter set. Specifically, the genetic algorithm executes the following steps sequentially: Population initialization: Within the parameter search space defined by Q1, N sets of hyperparameter combinations are randomly generated to form the initial population for the genetic algorithm; Fitness assessment: For each individual in the population, the complete simulation assessment process of Q2 is executed to calculate the fitness function F corresponding to the individual; Individual selection: Use tournament selection or roulette wheel selection strategies to prioritize retaining individuals with better fitness and eliminate individuals with poor performance; Parameter crossover: For the excellent individuals selected through screening, the hyperparameters are mixed and recombinated to generate a new generation of candidate parameter individuals; Parameter mutation: Apply small-amplitude random perturbations to the hyperparameters of some individuals to expand the parameter search range and prevent the optimization process from getting stuck in local optima; Iteration termination judgment: The iterative search is terminated when the number of iterations reaches the preset maximum number of iterations, or when the fitness of the population meets the convergence condition.

[0086] Q4. Output the optimal hyperparameter set After the iteration terminates, the set of hyperparameters with the best overall performance is output from the final population, and the set of optimal hyperparameters is assigned to step S3 for real-time measurement and calculation of the effective value of the AC signal.

[0087] As a specific example, under the application conditions of a 115V / 800Hz AC signal and a 5kHz sampling rate, after 5000 generations of genetic algorithm iterative search and engineering verification, a set of optimal hyperparameter values ​​were obtained: =0.0254, =0.1346, =0.0146, =200.0, =0.9999.

[0088] Those skilled in the art can adjust the search space, weighting coefficients, and iteration number according to the actual operating conditions such as the measured voltage amplitude, signal frequency, and sampling rate to obtain the optimal hyperparameters suitable for different application scenarios.

[0089] In some embodiments, this application further includes an ADC sampling module, a storage module, and a processing module; the ADC sampling module is used to acquire the AC signal under test to obtain the raw AC voltage signal. The storage module is used to save all historical state variables required for each round of iteration. , , , , The processing module executes all the calculation steps of the AC voltage RMS measurement method described above, and outputs the smoothed AC RMS value at each sampling time. .

[0090] In some embodiments, this application also includes a computer program / instructions that, when executed by a processor, implement the AC voltage RMS measurement method as described above.

[0091] Experimental verification and performance analysis 1. Simulation Experiments and Performance Verification This application verifies the algorithm's performance through extensive simulation experiments. All the performance test data below are based on the optimal hyperparameters obtained through genetic algorithm optimization: =0.0254, =0.1346, =0.0146, =200.0, =0.9999.

[0092] The baseline comparison uses a fixed-coefficient IIR filter RMS measurement scheme commonly used in engineering fields. Baseline parameter configuration: =0.999, , .

[0093] 1.1 Power-on response speed is significantly improved The test conditions were 115V / 800Hz AC signal, sampling rate 5kHz, and power-on detection threshold 80V. The power-on response time of the traditional fixed coefficient method and the method of this application were tested respectively. The test results are shown in Table 2.

[0094] Table 2: Comparison of Response Performance under Power-On Conditions In the traditional fixed-coefficient scheme, the mean square filter coefficient of 0.02 and the output smoothing filter coefficient of 0.01 are both fixed small values, resulting in slow filtering and tracking speed when a power-on step signal arrives.

[0095] This invention utilizes a sigmoid adaptive adjustment mechanism. When a drastic change in the effective value is detected due to power-on, the filter coefficients in the mean square filter calculation process and the output smoothing filter calculation process are automatically and synchronously increased to [a specific value]. =0.1346, achieving full-link synchronous accelerated tracking, and shortening the power-on response time to 2.8ms.

[0096] Figure 7 The diagram shows a comparison of the effective value response of this invention and the traditional fixed-coefficient method during power-up. The horizontal axis is set to zero at the moment of power-up, and the vertical axis represents the effective value output. This invention utilizes a sigmoid adaptive mechanism, which automatically and synchronously increases the coefficients of the mean square filter and the smoothing filter during the power-up transient. The effective value reaches the power-up detection threshold (80V, indicated by the dashed line) within 2.8ms, while the traditional fixed-coefficient method requires 30.4ms, representing a 10.9-fold improvement in response speed. Both curves eventually converge to the rated value of around 115V, verifying that the method of this invention achieves rapid response without sacrificing steady-state accuracy.

[0097] 1.2 Steady-state accuracy is significantly improved Under the condition of a pure AC signal input of 115V / 800Hz, the steady-state observation interval was selected from 0.1s to 0.35s. The steady-state performance of the traditional fixed coefficient method and the method of this application optimized by GA genetic algorithm were tested respectively. The test results are shown in Table 3.

[0098] Table 3: Comparison of Steady-State Test Performance under 115V / 800Hz Pure AC Signal Under the test conditions of superimposed 10Hz / 5V low-frequency pulse interference and continuous operation for 10s, the anti-interference steady-state performance of the traditional fixed coefficient method and the method of this application optimized by GA genetic algorithm were tested. The test results are shown in Table 4.

[0099] Table 4: Comparison of Steady-State Performance under Low-Frequency Pulse Interference Conditions As can be seen from the above test results, this application can achieve smaller measurement errors and fluctuations under both pure signal and low-frequency pulse interference conditions, and its steady-state measurement accuracy is better than that of the traditional fixed-coefficient IIR filtering scheme.

[0100] 1.3 The computational complexity is controllable, making it suitable for embedded deployment. By adopting a three-segment linear approximation scheme, the computational load of the core adaptive calculation is reduced from 100-300 clock cycles for the exp() function to 5-10 clock cycles, a reduction of approximately 95%, fully meeting the real-time processing requirements at a 5kHz sampling rate (200µs cycle). The complete pipeline of the algorithm sequentially executes differential operations, adaptive mean square filtering, square root operations, and adaptive smoothing output, completing one full processing cycle within each sampling period. It requires no large data buffers, has extremely low memory usage, and is suitable for resource-constrained MCU and DSP embedded platforms.

[0101] 1.4 Automated Parameter Optimization This application uses a genetic algorithm to perform global hyperparameter optimization, overcoming the shortcomings of traditional schemes that rely on engineers' experience to repeatedly manually adjust parameters, and shortening the algorithm development iteration cycle. The optimization process is reproducible and the results are verifiable. In simulation experiments, the genetic algorithm can converge to a relatively stable optimal solution in about 1000 generations. When it is terminated after 5000 generations, the fitness function no longer changes significantly, proving that the optimization output parameters are reliable.

[0102] 1.5 Explanation of the Inherent Trade-offs Between Fast Tracking and Impulse Interference It should be noted that the fast tracking characteristic of this method is limited when dealing with impulse noise. The acoustic interference exhibits a "double-edged sword" effect: when superimposed with a pulse interference of 100V amplitude and 10-point width, the traditional fixed-coefficient method, due to its consistently small filter coefficient, results in a peak suppression ratio (PSR) of 3.098. The method of this invention, by automatically increasing the filter coefficient after detecting a signal abrupt change to accelerate tracking, also accelerates the tracking of pulse interference, achieving a PSR of 1.961. This is an inherent trade-off between fast response and anti-pulse interference capability, stemming from the inherent characteristic of adaptive mechanisms that make it difficult to distinguish between signal abrupt changes and pulse interference.

[0103] In practical engineering applications, this problem can be mitigated in the following ways: 1. Add amplitude limiting protection logic to the algorithm output to clamp the output when the single-step change exceeds the physical reasonable range; 2. Introduce a rate-of-change duration criterion in the Sigmoid adaptive coefficient calculation, only when... The coefficient is increased only when multiple consecutive sampling times exceed the threshold; a single spike does not trigger acceleration.

[0104] The above-mentioned improvement scheme does not change the core algorithm structure of the present invention and can be used as an optional enhancement measure during engineering implementation.

[0105] Those skilled in the art should understand that the above description, in conjunction with specific embodiments, provides a further detailed explanation of the present invention, and should not be construed as limiting the specific implementation of the invention to these descriptions. Those skilled in the art can make various changes in form and detail, including some simple deductions or substitutions, without departing from the spirit and scope of the present invention.

Claims

1. A method for measuring the effective value of AC voltage, characterized in that, include: When using the measurement platform for online measurement, the original AC voltage signal output at the current sampling time is acquired, and the first-order differential signal of the original AC voltage signal is de-DC biased by using the differential accumulation coefficient to obtain the AC component signal at the current time. The relative rate of change of the effective value is obtained from the effective voltage values ​​between the most recent adjacent historical sampling times. The relative rate of change of the effective value indicates the degree of drastic change in the operating condition of the effective voltage value. The adaptive filter coefficients are obtained by mapping the relative rate of change of the effective values. Using the adaptive filtering coefficients and the historical mean square filter output from the previous sampling time, the AC component signal at the current sampling time is subjected to adaptive mean square filtering to obtain the mean square filter output at the current sampling time. By reusing the adaptive filtering coefficients and the effective voltage value at the previous sampling time, the coarsely estimated effective value obtained by taking the square root of the mean square filter output at the current sampling time is subjected to adaptive smoothing filtering to obtain the effective voltage value at the current sampling time.

2. The method for measuring the effective value of AC voltage according to claim 1, characterized in that, The step of mapping the relative rate of change of the effective value to obtain the adaptive filter coefficients includes: When the computing power of the measurement platform is within the first computing power range, the difference between the relative change rate of the effective value and the Sigmoid condition judgment threshold is continuously mapped to the steady-state minimum filter coefficient and the transient maximum filter coefficient using the Sigmoid mapping function to obtain the adaptive filter coefficient. When the computing power of the measurement platform falls within the second computing power range, the Sigmoid mapping function is fitted using a three-segment linear approximation function, and the adaptive filtering coefficients are obtained based on the three-segment linear approximation function. When the computing power of the measurement platform falls within the third computing power range, a ternary step function is used to fit the Sigmoid mapping function, and the adaptive filtering coefficients are obtained based on the ternary step function. Wherein, the computing power supported by the first computing power range is greater than the computing power supported by the second computing power range, and the computing power supported by the second computing power range is greater than the computing power supported by the third computing power range.

3. The method for measuring the effective value of AC voltage according to claim 2, characterized in that, Also includes: The hyperparameter set is calibrated offline using the measurement platform. For the complete measurement link corresponding to the online measurement of the measurement platform, the hyperparameter set is determined under power-on, steady-state, and power-off conditions. The hyperparameter set includes the following hyperparameters: The differential cumulative coefficient, the Sigmoid condition determination threshold, the steady-state minimum filter coefficient and the transient maximum filter coefficient, and the steepness parameter in the Sigmoid mapping function.

4. The method for measuring the effective value of AC voltage according to claim 3, characterized in that, The offline calibration of the hyperparameter set using the measurement platform, for the complete measurement link corresponding to the online measurement of the measurement platform, determines the hyperparameter set under power-on, steady-state, and power-off conditions, including: Obtain the parameter search space for each hyperparameter; A multi-objective fitness function is constructed based on the steady-state accuracy, power-on transient response, and power-off transient response of the AC voltage measured by the measurement platform. The multi-objective fitness function is composed of a weighted sum of the steady-state mean square error, the power-on response time, and the power-off response time. With the minimum value of the multi-objective fitness function as the optimization objective, a genetic algorithm is executed for iterative search to obtain the optimal parameter value from the parameter search space of each hyperparameter, which is then used as the final target value for each hyperparameter.

5. The method for measuring the effective value of AC voltage according to claim 4, characterized in that, The optimization objective is to minimize the value of the multi-objective fitness function. An iterative search using a genetic algorithm is performed to obtain the optimal parameter values ​​from the parameter search space of each hyperparameter, which are then used as the final target values ​​for each hyperparameter. This includes: The following operations are executed sequentially: population initialization, fitness assessment, individual selection, parameter crossover, and parameter mutation. After the iteration termination condition is met, the target value used for each hyperparameter is output.

6. The method for measuring the effective value of AC voltage according to claim 5, characterized in that, The fitness assessment includes: The population initialization process yields multiple sets of parameter values ​​corresponding to the hyperparameter set within the population. For each set of parameter values, simulation evaluation was performed using power-on simulation conditions, steady-state simulation conditions, and power-off simulation conditions, respectively. Based on the simulation results, the steady-state mean square error, power-on response time, and power-off response time corresponding to each set of parameter values ​​are calculated, and then substituted into the multi-objective fitness function to calculate the multi-objective fitness function value corresponding to each set of parameter values.

7. The method for measuring the effective value of AC voltage according to claim 2, characterized in that, The method of using the Sigmoid mapping function to continuously map the difference between the relative rate of change of the effective value and the Sigmoid condition judgment threshold to the steady-state minimum filter coefficient and the transient maximum filter coefficient to obtain adaptive filter coefficients also includes: When the adaptive filter coefficient approaches the steady-state minimum filter coefficient, it indicates that the original AC voltage signal at the current moment is in a steady state. When the adaptive filter coefficient approaches the transient maximum filter coefficient, it indicates that the original AC voltage signal at the current moment has undergone a transient jump.

8. A device for measuring the effective value of AC voltage, characterized in that, It includes an ADC sampling module, a storage module, and a processing module; the ADC sampling module is used to acquire raw AC voltage signals; the storage module is used to store computer programs / instructions and data required during the execution of the computer programs / instructions; the processing module executes the AC voltage RMS measurement method as described in any one of claims 1-7 based on the stored computer programs / instructions.

9. A computer-readable storage medium, characterized in that, It includes a computer program / instruction, which, when executed by a processor, implements the AC voltage RMS measurement method as described in any one of claims 1-7.

10. A computer program product, characterized in that, The computer program product includes a computer program / instruction, which, when loaded and executed by a processor, implements the AC voltage RMS measurement method according to any one of claims 1-7.