Self-adaptive multi-dimensional adjustment metering box based on Internet of Things
Through the perceived acquisition, anti-aliasing filtering, noise feature extraction and timing alignment module of the adaptive multi-dimensional adjustment metering box, the measurement error and data asynchronous problems in high-dynamic industrial scenarios are solved, and accurate measurement and stable state estimation in high-noise environments are realized.
Patent Information
- Application Number
- CN202510534526.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-08-08
AI Technical Summary
In the high dynamic industrial scenarios, the prior art has problems such as measurement distortion caused by high fixed threshold error triggering rate, weak anti-aliasing ability and asynchronous multi-source data. Especially in high noise environments, frequent false alarms, soaring energy consumption and insufficiently sensitive to slow-changing trends. The multi-sampling scheme has a high risk of aliasing for high-frequency harmonics and transient shock signals.
The perception acquisition module is used to perform initial timing sampling and stored in the ring buffer. The multi-stage anti-aliasing filtering module performs spectrum energy ratio reconstructible FIR low-pass and band-stop switching filtering. The noise feature extraction module generates dynamic thresholds through spectral kurtitude analysis and conceptual drift detection. The timing alignment module corrects the timestamp through IEEE 1588PTP protocol. The cloud fusion optimization module uses extended Kalman filtering and particle swarm algorithm to optimize parameters.
Automatic calibration of thresholds in high noise environments is realized, which reduces false triggering and energy consumption, effectively suppresses high-frequency noise interference, ensures multi-channel data synchronization, and improves the robustness of device status estimation and measurement stability.
Smart Images

Figure CN120449090A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent monitoring of electric power equipment, and more particularly to an Internet of Things-based adaptive multi-dimensional regulating metering box. Background Art
[0002] The IoT-based adaptive multi-dimensional metering box integrates multimodal sensors such as current, voltage, and temperature, combined with edge computing and dynamic threshold algorithms, to achieve real-time monitoring of power equipment status and optimize energy consumption. Its core technologies include multi-source data fusion, adaptive sampling rate adjustment, and anti-interference filtering design, aiming to improve measurement accuracy and equipment anomaly warning capabilities under complex operating conditions.
[0003] Prior art, such as patent CN111147079B, discloses an adaptive and adjustable sampling frequency method based on a time detection window. This method deploys multiple sensors at the edge and dynamically calculates the sampling rate based on the ratio of change rates, balancing energy consumption and accuracy. By calculating the data change rate and cumulative change within the time detection window, the real-time sampling frequency is dynamically generated, implementing an adaptive sampling strategy that increases the frequency when data changes rapidly and decreases the frequency when data is stable. Regarding identification and early warning, patent CN117152529A, for example, uses the YOLOv4 model to identify overheating areas in equipment. It sets fixed thresholds based on historical data (e.g., a temperature threshold of ±5°C, a current fluctuation rate of 10%) and triggers an alarm when the monitored value exceeds the threshold. Existing solutions often incorporate a threshold trigger mechanism: when the rate of change exceeds a preset threshold, the system enters a high-precision, high-frequency mode and reports the data immediately; otherwise, it enters a low-power sleep state.
[0004] However, existing technologies have exposed several problems in highly dynamic scenarios. First, existing solutions often use fixed thresholds. In high-noise environments (such as electromagnetic interference in industrial sites), static thresholds can frequently trigger high-sampling mode, leading to false alarms and increased energy consumption. Furthermore, after long-term operation, the thresholds and actual data distribution can easily drift, making them insensitive to slowly changing trends and thus missing equipment aging or slow-changing faults. Second, existing technologies lack adequate anti-aliasing filtering or multi-sampling schemes. During short-term grid transitions (such as arc faults and load switching), there is a risk of aliasing high-frequency harmonics and transient impulse signals, resulting in significantly low or unstable measured power quality indicators (such as THD). Furthermore, when different types of sensors (current, voltage, temperature, vibration, etc.) perform adaptive sampling separately, their data streams often become desynchronized due to inconsistent sampling rates, clock drift, or network latency, causing fusion algorithms to make incorrect judgments based on misaligned data. Summary of the Invention
[0005] In view of the shortcomings of the existing technology, the present invention discloses an adaptive multi-dimensional adjustment metering box based on the Internet of Things, which aims to solve the problems raised in the background technology.
[0006] In order to achieve the above technical effects, the present invention adopts the following technical solutions:
[0007] An adaptive multi-dimensional regulating metering box based on the Internet of Things includes: a sensing and acquisition module for performing initial timing sampling of analog signals including current, voltage, temperature, and vibration and storing them in a ring buffer;
[0008] a multi-stage anti-aliasing filtering module, configured to perform reconfigurable FIR low-pass and band-stop switching filtering based on spectral energy ratio on the buffered data in the ring buffer, and output transient filtered data;
[0009] A noise feature extraction module is used to extract noise power and drift trend indicators based on the transient filtering data using spectral kurtosis analysis and concept drift detection algorithm;
[0010] A dynamic threshold calibration module, configured to generate a real-time sampling trigger threshold based on the noise power and transient filtering data using an exponentially weighted moving average and sliding window standard deviation algorithm, and adjust the threshold factor;
[0011] A timing alignment and adaptive sampling module is used to correct the timestamps of each channel using the IEEE 1588PTP protocol, compare the real-time threshold with the signal increment, and feed back the high / low sampling rate switching instruction to the perception acquisition module;
[0012] The cloud-based fusion optimization module is used to apply the extended Kalman filter algorithm to the time-aligned multi-channel sampling data to output the system state estimation, and to update the threshold window length and filter parameters through the particle swarm optimization algorithm, and remotely send them to the dynamic threshold calibration module and the multi-stage anti-aliasing filter module.
[0013] As a further technical solution of the present invention, the perception acquisition module implements gain adjustment on the current, voltage, temperature, and vibration analog signals through a multi-channel programmable gain amplifier to optimize the dynamic range, generates a pulse width modulated bit stream through a sampling modulator with high-rate oversampling, performs downsampling and anti-aliasing filtering through a digital extraction filter to output primary digital samples and write them into a circular buffer, and simultaneously extracts the statistical characteristics of the noise in the oversampling stage; if the noise variance or signal amplitude distribution exceeds a preset range, the gain coefficient adaptive reconfiguration is triggered; and a global timestamp is obtained through the IEEE 1588PTP interface, and the timestamp is coupled with the digital sample for storage to form a multi-channel synchronous sampling queue.
[0014] As a further technical solution of the present invention, the working principle of the multi-stage anti-aliasing filtering module is as follows: first, the frequency domain energy distribution of the current buffered data frame is calculated in real time based on the sliding window FFT algorithm. If the energy proportion of the frequency band higher than 0.8 times the Nyquist frequency exceeds the preset threshold, the band-stop filtering mode is triggered; otherwise, the low-pass filtering mode is enabled by default; in the mode switching process, a reconfigurable FIR filter architecture is adopted, and the pre-stored Hamming window optimization coefficient library is loaded through the FPGA hardware, wherein the low-pass filter coefficient is generated based on the equal ripple design method with a 63rd-order FIR kernel with a cutoff frequency of 0.6 times the Nyquist frequency, and the band-stop filter The wave coefficients are generated by the frequency domain sampling method with a 127-order kernel with a stopband range of 0.8 to 1.2 times the interference center frequency; multi-stage cascade processing is performed after the output of each filter stage, and the previous stage output data is split into 4 parallel sub-streams through the improved multi-phase decomposition method, which are respectively input into the secondary variable-order FIR unit for residual noise suppression. The secondary variable-order FIR unit dynamically adjusts the order according to the short-term zero-crossing rate of the previous stage output signal. If the zero-crossing rate is higher than the preset threshold, it switches to 32-order fine filtering, otherwise it uses 16-order fast filtering; finally, the data integrity is verified by the CRC-16 check unit and the transient filtered data is output.
[0015] As a further technical solution of the present invention, the working principle of the improved multiphase decomposition method is:
[0016] The input data stream is split into four parallel sub-channels based on time-indexed modulo-4 operations. Each channel is configured with an adjustable decimation factor. The data flow rate is monitored in real time through an FPGA hardware counter and the decimation factor is dynamically set to a power of 2 to match the current filtering mode.
[0017] In the sub-stream processing stage, a sliding window is used to calculate the short-term energy entropy of each channel. If the energy entropy of any channel exceeds 1.5 times the average of the adjacent channels, the channel data is migrated to an idle buffer channel in real time through a phase remapping mechanism to avoid spectral aliasing.
[0018] Phase pre-compensation of sub-stream data is performed through a multi-phase decomposition matrix, and weighting coefficients are dynamically generated based on the Hamming window function and the relative phase difference of the sub-streams;
[0019] The phase offset of the polyphase decomposition is dynamically adjusted according to the group delay parameter of the previous stage FIR filter through the group delay feedback loop, and the sub-sampling level synchronization calibration is achieved using the shift register;
[0020] The four sub-streams are reassembled in phase order by folding the addition tree and output to the CRC check unit to generate a complete data frame.
[0021] As a further technical solution of the present invention, the working method of the noise feature extraction module is:
[0022] The transient filtering data was divided into multi-scale frequency bands using a 1 / 3 binary tree partitioning strategy. 128 sub-bands were generated based on Morlet wavelet packet decomposition. Abnormal frequency bands with kurtosis values higher than background noise were screened out using the energy entropy threshold of the time-frequency matrix.
[0023] After performing fast Fourier transform on the selected frequency band, the power spectral density of each subband is calculated based on the sliding window, and the noise power baseline is generated using Hanning window weighting;
[0024] Drift detection is performed using a two-layer cascade method. The first layer compares the difference between the current window and the historical reference distribution using KL divergence. If the divergence values of three consecutive windows exceed the threshold, the second layer triggers incremental detection based on the Hoeffding inequality. After verifying the drift confidence, the reference distribution is updated;
[0025] The power spectrum series is trend-fitted using an autoregressive model. The model order is dynamically adjusted based on the root mean square error of the residual term. When the residual exceeds a sliding threshold, online parameter calibration is triggered.
[0026] The power spectrum eigenvector and the drift index are weighted and superimposed through the time series fusion engine, and encapsulated into a composite indicator set that includes the frequency domain energy ratio and the time domain trend slope.
[0027] As a further technical solution of the present invention, the dynamic threshold calibration module receives the noise power value output by the noise feature extraction module and the transient filtering data output by the multi-stage anti-aliasing filtering module, calculates the smoothed mean of the latest N sampling increment sequences using the exponentially weighted moving average algorithm, and applies the sliding window standard deviation algorithm to the same sequence in parallel to obtain the fluctuation amplitude; then, the standard deviation result is factor scaled based on the noise power, and the scaled standard deviation is superimposed with the EMA mean to generate the current sampling trigger threshold; if the noise power suddenly increases, the factor value is dynamically increased, otherwise the factor value is gradually reduced; after the threshold is generated, it is distributed to the adaptive sampling decision module in real time for determining the subsequent sampling rate switching trigger conditions.
[0028] As a further technical solution of the present invention, the working principle of the timing alignment and adaptive sampling module is as follows: first, based on the clock synchronization mechanism, the local clock of each acquisition channel is calibrated at the microsecond level, and the transmission path delay is measured in real time and the clock offset is compensated through the master-slave clock message interaction to generate a unified time reference signal; then, a sliding window dynamic comparison algorithm is adopted, with the reference channel as a reference, to calculate the time shift of other channel data and perform cross-channel data displacement alignment through the memory direct access controller; when the signal increment detection unit monitors that the instantaneous amplitude change rate of any channel exceeds the dynamic threshold, the incremental trend prediction model is used to analyze the rising slope of the signal in the continuous period. If the slope exceeds the preset critical value and lasts for three sampling cycles, a high-speed sampling instruction is sent to the perception acquisition module, and the pre-division coefficient of the clock divider is synchronously adjusted to increase the sampling frequency; otherwise, the sampling frequency is gradually reduced to the basic mode through the exponential decay model; after each mode switch, the clock phase correction amount is injected into each channel through the timestamp compensation mechanism.
[0029] As a further technical solution of the present invention, the working method of the cloud-based fusion optimization module is:
[0030] The system receives the multi-channel sampling data stream from the timing alignment module and uses a sliding window mechanism to extract the state vector containing the four-dimensional characteristics of current, voltage, temperature, and vibration. Based on the nonlinear system model, it constructs the state transfer equation and observation equation of the extended Kalman filter. It then performs local linearization of the system dynamics using the Jacobian matrix to generate the system state estimate and covariance matrix.
[0031] The root mean square error of the current filter residual sequence is used as the fitness function to initialize the multidimensional parameter space including the threshold window length, anti-aliasing cutoff frequency, and Kalman process noise coefficient. The particle velocity vector is dynamically adjusted through the inertia weight decay strategy. During the iteration process, the weighted combination of the group optimal solution and the individual historical optimal solution is calculated to update the parameter candidate set.
[0032] When the fitness value falls below the convergence threshold three times in a row, the parameter locking mechanism is triggered. The optimized window length is injected into the sliding window controller of the dynamic threshold calibration module, and the filter parameter group is encapsulated as a JSON instruction and sent asynchronously to the edge via the MQTT protocol.
[0033] The filtering performance of the multi-stage anti-aliasing filtering module after parameter update is verified by the online covariance matching algorithm. If the residual energy entropy exceeds the preset threshold, it rolls back to the previous stable parameter group.
[0034] Based on the above technical solutions, the positive beneficial effects of the present invention are:
[0035] 1. The present invention tracks the time-varying characteristics of noise power through an exponentially weighted moving average algorithm and superimposes the sliding window standard deviation to capture signal fluctuation characteristics in real time, thus solving the problem of frequent false triggering of fixed thresholds in high-noise environments. This mechanism enables the threshold to be automatically calibrated as the signal distribution offsets, which not only avoids energy consumption surges caused by electromagnetic interference, but also enhances sensitivity to low-frequency trends such as equipment aging and slow-changing faults through dynamic adjustment of the threshold factor, reducing the risk of missed detection.
[0036] 2. The multi-stage anti-aliasing filter module uses spectral energy ratio analysis to dynamically switch FIR filtering modes. Under steady-state conditions, low-pass filtering is enabled to suppress high-frequency noise, and when transient impact signals are detected, it automatically switches to band-stop filtering to eliminate interference in specific frequency bands. This design breaks through the adaptability limitations of traditional single filtering modes to short-term transient processes (such as arc faults), effectively suppresses the distortion of power quality indicators caused by high-frequency harmonic aliasing, and significantly improves the measurement stability of parameters such as THD.
[0037] 3. Sub-microsecond timestamp synchronization of multi-channel sensors based on the IEEE 1588PTP protocol, combined with a cross-channel comparison mechanism of signal increments and real-time thresholds, eliminates data misalignment caused by sampling rate switching and clock drift. This ensures strict alignment of heterogeneous sensor data such as vibration and temperature in the time domain, enabling the extended Kalman filter algorithm to achieve accurate state estimation based on temporally and spatially consistent data streams, avoiding misjudgment of device status due to data asynchrony.
[0038] 4. By remotely iteratively updating the filter parameters and threshold window length through the particle swarm algorithm, the system can continuously adapt to changes in the external environment and the attenuation of equipment status, solving the performance degradation problem caused by long-term operation of traditional local fixed parameters. At the same time, the extended Kalman filter's nonlinear fusion of multi-channel data further improves the robustness of state estimation, forming a closed-loop optimization mechanism to ensure the efficient operation of the meter box throughout its life cycle. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. Those skilled in the art can also derive other drawings based on these drawings without inventive work, among which:
[0040] Figure 1 This is an architecture diagram of an Internet of Things-based adaptive multi-dimensional adjustment metering box of the present invention;
[0041] Figure 2 This is a working principle diagram of the improved multiphase decomposition method of the present invention;
[0042] Figure 3 This is a diagram of the working method of the noise feature extraction module of the present invention. DETAILED DESCRIPTION
[0043] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0044] In implementation, Figure 1 As shown, an adaptive multi-dimensional regulating metering box based on the Internet of Things includes: a sensing and acquisition module for performing initial timing sampling of analog signals including current, voltage, temperature, and vibration and storing them in a ring buffer;
[0045] a multi-stage anti-aliasing filtering module, configured to perform reconfigurable FIR low-pass and band-stop switching filtering based on spectral energy ratio on the buffered data in the ring buffer, and output transient filtered data;
[0046] A noise feature extraction module is used to extract noise power and drift trend indicators based on the transient filtering data using spectral kurtosis analysis and concept drift detection algorithm;
[0047] A dynamic threshold calibration module, configured to generate a real-time sampling trigger threshold based on the noise power and transient filtering data using an exponentially weighted moving average and sliding window standard deviation algorithm, and adjust the threshold factor;
[0048] A timing alignment and adaptive sampling module is used to correct the timestamps of each channel using the IEEE 1588PTP protocol, compare the real-time threshold with the signal increment, and feed back the high / low sampling rate switching instruction to the perception acquisition module;
[0049] The cloud-based fusion optimization module is used to apply the extended Kalman filter algorithm to the time-aligned multi-channel sampling data to output the system state estimation, and to update the threshold window length and filter parameters through the particle swarm optimization algorithm, and remotely send them to the dynamic threshold calibration module and the multi-stage anti-aliasing filter module.
[0050] During implementation, the output of the perception acquisition module (initial sampling data in the ring buffer) is connected to the input of the multi-stage anti-aliasing filtering module to provide the original signal data stream; the output of the multi-stage anti-aliasing filtering module (transient filtering data) is connected to the input of the noise feature extraction module to transmit the filtered time domain signal; the output of the noise feature extraction module (noise power and drift trend index) is connected to the input of the dynamic threshold calibration module, and the input noise statistical characteristics are used for threshold calculation; the output of the dynamic threshold calibration module (real-time sampling trigger threshold and threshold factor) is connected to the input of the timing alignment and adaptive sampling module to transmit the dynamically adjusted Sampling decision parameters; the output end of the timing alignment and adaptive sampling module (high / low sampling rate instructions) is fed back to the input end of the perception acquisition module to form a closed-loop sampling control link; the output end of the timing alignment and adaptive sampling module (time-synchronized multi-channel sampling data) is connected to the input end of the cloud fusion optimization module, and the aligned data is uploaded for cloud processing; the output end of the cloud fusion optimization module (optimized threshold window length and filter parameters) is respectively connected to the input end of the dynamic threshold calibration module (updating sliding window parameters) and the input end of the multi-stage anti-aliasing filtering module (issuing reconfigurable FIR filter coefficients), forming a parameter closed-loop optimization link.
[0051] In the perception acquisition module implemented above, the perception acquisition module implements gain adjustment on the current, voltage, temperature, and vibration analog signals through a multi-channel programmable gain amplifier to optimize the dynamic range, generates a pulse width modulated bit stream through high-rate oversampling through a sampling modulator, performs downsampling and anti-aliasing filtering through a digital extraction filter to output primary digital samples and write them into a circular buffer, and simultaneously extracts the statistical characteristics of the noise in the oversampling stage; if the noise variance or signal amplitude distribution exceeds the preset range, the gain coefficient adaptive reconfiguration is triggered; and the global timestamp is obtained through the IEEE 1588PTP interface, and the timestamp is coupled with the digital sample for storage to form a multi-channel synchronous sampling queue.
[0052] Among them, multi-channel programmable gain amplifiers (PGAs) use multiple channels to adjust the gain of analog signals such as current, voltage, temperature, and vibration. Their core goal is to dynamically match the output range of different sensors with the input range of the ADC. The PGA uses digital control signals to adjust the feedback resistor network or switched capacitor array to achieve linear or exponential gain changes, thereby optimizing the signal dynamic range and suppressing quantization noise. For example, for small changes in current signals (e.g., μA levels), the PGA uses high-gain mode to amplify them to the ADC's effective quantization range. For wide voltage fluctuations (e.g., 0-10V), the PGA switches to low-gain mode to avoid saturation distortion. High-rate oversampling and Σ-Δ modulation: A Σ-Δ modulator converts the analog signal into a high-rate (e.g., 64×) oversampled bit stream. This technology utilizes noise shaping principles to push quantization noise energy to higher frequencies while simultaneously increasing effective resolution through oversampling. For example, a 16-bit ADC can achieve an effective number of bits exceeding 20 bits through 64× oversampling, significantly reducing the noise floor at low frequencies.
[0053] The modulator uses a high-order (such as third-order) loop filter combined with an integral-differential structure to suppress in-band noise and generates a single-bit or multi-bit digital stream through pulse width modulation (PWM).
[0054] A multi-stage cascaded digital decimation filter (such as a CIC filter + a half-band filter) is used to perform downsampling and anti-aliasing filtering. The CIC filter achieves integer downsampling through a combination of an integrator and a comb filter, while the half-band filter optimizes computational efficiency through polyphase decomposition, ultimately converting the oversampled bit stream into high-precision digital samples at a low sampling rate. At the same time, the filter coefficients are dynamically adjusted according to the signal frequency band. For example, in the case of power grid harmonic interference, a band-stop filter is used to suppress the 50Hz multiplier component.
[0055] Real-time monitoring of noise variance and signal amplitude distribution (e.g., kurtosis analysis) triggers dynamic adjustment of gain coefficients. When the noise variance exceeds a preset threshold, the system switches to low-gain mode to reduce noise amplification. When the signal amplitude distribution deviates from a preset range (e.g., exceeding 80% of full scale), the gain is reduced to avoid clipping. This process combines sliding window statistics with an exponentially weighted moving average algorithm to achieve a balance between fast response and steady-state optimization. A hardware timestamp engine (e.g., a built-in PTP module in an FPGA) is used to parse IEEE 1588 protocol messages and achieve sub-microsecond global clock synchronization. Local clock drift is calibrated using a phase-locked loop (PLL), and timestamps are embedded in the data frame header to achieve timing alignment for multi-channel sampling. For example, the synchronization error between current and vibration signals is controlled within ±100ns, ensuring timing consistency for cross-modal data fusion. Ring buffer and noise feature extraction: The ring buffer utilizes a dual-pointer circular overwrite mechanism combined with DMA direct memory access to achieve high data throughput. The noise statistical feature extraction module calculates the signal power spectral density (PSD) and kurtosis index based on a sliding window, identifies burst noise components (such as electromagnetic pulse interference) through FFT or wavelet transform, and provides a basis for parameter optimization for subsequent filtering modules.
[0056] In hardware deployment, the perception and acquisition module adopts a layered architecture design:
[0057] Front-end signal conditioning circuit: Multiple sensor signals are low-pass filtered by RC before being fed into a multi-channel PGA (such as the AD8251). Its gain is adjustable from 1 to 1000x, and the gain control word from the MCU is received via the SPI interface. For example, a temperature signal (PT100) uses a gain of 10x, while a vibration signal (MEMS accelerometer) uses a gain of 500x. An instrumentation amplifier (INA826) suppresses common-mode interference.
[0058] Σ-Δ ADC and modulator: An integrated 24-bit Σ-Δ ADC (such as the ADS1263) is used with a 64x oversampling ratio. The modulator outputs a 1MHz single-bit stream. The modulator clock is driven by a low-jitter TCXO (±0.1ppm) to ensure sampling clock stability.
[0059] Digital filtering and downsampling: A five-stage CIC filter (downsampling factor 32) and a three-stage half-band filter (total downsampling factor 64) are implemented within the FPGA, outputting 24-bit digital samples at an effective sampling rate of 1kHz. The filter coefficients use a symmetrical structure to optimize resource usage. For example, the CIC filter integrator is extended to 48 bits to prevent overflow.
[0060] Adaptive gain control: The MCU reads data from a ring buffer via DMA and calculates the noise variance (sliding window length 1000 points) and the signal peak-to-peak value every second. When the noise variance exceeds 0.1% FSR or the peak-to-peak value falls below 20% FSR, the PGA gain factor is dynamically adjusted using a table lookup method, with a response time of less than 10ms.
[0061] Time synchronization and data encapsulation: The DP83640 PHY chip implements the IEEE 1588PTPv2 protocol, achieving a synchronization accuracy of ±50ns. Timestamps are generated by FPGA hardware counters and coupled with digital samples via an AXI-Stream interface to form time-stamped data packets (formatted as [timestamp][channel ID][sample value]), which are then uploaded to the cloud platform via Gigabit Ethernet.
[0062] During implementation, the embedded firmware implements multi-tasking scheduling based on FreeRTOS:
[0063] Acquisition task: Configure the ADC sampling rate and gain parameters, and respond to the data ready signal through the interrupt service routine (ISR).
[0064] Filtering task: Implement the decimation filter pipeline in the FPGA logic and use a double buffering mechanism to avoid data conflicts.
[0065] Adaptive control task: Periodically execute the noise statistics and gain decision algorithm, and use exponential smoothing (α = 0.2) to suppress parameter mutations.
[0066] Synchronization tasks: Maintain the global clock through a PTP daemon (such as PTPd) and calibrate local clock offsets.
[0067] During implementation, the perception and acquisition module significantly improved weak signal detection and interference resistance through dynamic gain adjustment and oversampling technology, resolving the quantization distortion issue inherent in traditional fixed-gain models in high-dynamic-range scenarios. A hard synchronization mechanism based on IEEE 1588 eliminated multi-channel sampling timing deviations, ensuring spatiotemporal consistency across modal data. The collaborative design of a ring buffer and noise feature extraction enabled real-time data quality monitoring, providing highly reliable input for back-end processing modules. Compared to existing technologies, this approach comprehensively optimized the signal-to-noise ratio, synchronization accuracy, and adaptability of the signal chain.
[0068] In the multi-stage anti-aliasing filtering module implemented above, the working principle is as follows: first, the frequency domain energy distribution of the current buffered data frame is calculated in real time based on the sliding window FFT algorithm. If the energy proportion of the frequency band higher than 0.8 times the Nyquist frequency exceeds the preset threshold, the band-stop filtering mode is triggered; otherwise, the low-pass filtering mode is enabled by default; during the mode switching process, a reconfigurable FIR filter architecture is adopted, and the pre-stored Hamming window optimization coefficient library is loaded through the FPGA hardware, wherein the low-pass filter coefficient is generated based on the equal ripple design method with a 63rd-order FIR kernel with a cutoff frequency of 0.6 times the Nyquist frequency, and the band-stop filter coefficient is adopted. The frequency domain sampling method generates a 127-order kernel with a stopband range of 0.8 to 1.2 times the interference center frequency; after each level of filtering output, multi-stage cascade processing is performed, and the previous stage output data is split into 4 parallel sub-streams through the improved multi-phase decomposition method, and respectively input into the secondary variable order FIR unit for residual noise suppression. The secondary variable order FIR unit dynamically adjusts the order according to the short-term zero-crossing rate of the previous stage output signal. If the zero-crossing rate is higher than the preset threshold, it switches to 32-order fine filtering, otherwise it uses 16-order fast filtering; finally, the data integrity is verified by the CRC-16 check unit and the transient filtered data is output. Further, if Figure 2 As shown in Figure 2, the working principle of the improved multiphase decomposition method is:
[0069] The input data stream is split into four parallel sub-channels based on time-indexed modulo-4 operations. Each channel is configured with an adjustable decimation factor. The data flow rate is monitored in real time through an FPGA hardware counter and the decimation factor is dynamically set to a power of 2 to match the current filtering mode.
[0070] In the sub-stream processing stage, a sliding window is used to calculate the short-term energy entropy of each channel. If the energy entropy of any channel exceeds 1.5 times the average of the adjacent channels, the channel data is migrated to an idle buffer channel in real time through a phase remapping mechanism to avoid spectral aliasing.
[0071] Phase pre-compensation of sub-stream data is performed through a multi-phase decomposition matrix, and weighting coefficients are dynamically generated based on the Hamming window function and the relative phase difference of the sub-streams;
[0072] The phase offset of the polyphase decomposition is dynamically adjusted according to the group delay parameter of the previous stage FIR filter through the group delay feedback loop, and the sub-sampling level synchronization calibration is achieved using the shift register;
[0073] The four sub-streams are reassembled in phase order by folding the addition tree and output to the CRC check unit to generate a complete data frame.
[0074] The multi-stage anti-aliasing filter module first calculates the frequency-domain energy distribution of the ring buffer's data frames in real time using a sliding-window FFT algorithm. It then uses the short-time Fourier transform (STFT) to capture the signal's non-stationary characteristics in a joint time-frequency analysis. This, combined with a frequency band energy ratio threshold at 0.8 times the Nyquist frequency, triggers the switch between band-stop and low-pass filtering modes. Dynamic evaluation of the spectral energy ratio utilizes an integral operation based on the power spectral density (PSD). The presence of transient interference is determined by comparing the energy ratio of the high-frequency band (>0.8f_N) with that of the full frequency band. The reconfigurable FIR filter uses FPGA hardware to load a pre-stored optimized coefficient library. The low-pass filter coefficients are generated based on the equal-ripple design method (Parks-McClellan algorithm), achieving minimum-maximum error approximation at the passband cutoff frequency of 0.6f_N and a stopband attenuation of -60dB. The stopband filter coefficients are constructed using frequency-domain sampling, extending the stopband range to 1.2 times the bandwidth based on the interference center frequency. A high-order (127th-order) FIR core is used to improve the stopband rejection ratio to -80dB. Multi-stage processing utilizes an improved polyphase decomposition method, splitting the previous stage output data stream into four parallel sub-channels using a time-indexed modulo-4 operation. Each channel introduces an adjustable decimation factor (2^n) to adapt to the rate requirements of different filtering modes. Inter-channel anomaly detection is achieved through sliding window short-time energy entropy (STE) calculation. When the STE of a channel exceeds 1.5 times the mean of the adjacent channels, a phase remapping mechanism is triggered, dynamically migrating data to an idle buffer channel to prevent sub-band aliasing. The substream processing stage pre-compensates for phase differences using a polyphase decomposition matrix. Spectral leakage is optimized using the weighted coefficients of a Hamming window function. Phase offsets are adjusted in real time using a group delay feedback loop, and subsampling-level synchronization calibration is achieved using shift registers. The secondary variable-order FIR unit dynamically switches orders based on the short-term zero-crossing rate (ZCR). High ZCR signals (reflecting high-frequency transient components) trigger a 32nd-order fine filter to improve the stopband roll-off rate, while low ZCR signals use a 16th-order fast filter to reduce computational latency. Finally, a cyclic redundancy check (CRC-16) is performed on the reassembled data frames to ensure transmission integrity.
[0075] During implementation, the hardware deployment utilizes a multi-stage anti-aliasing filter module based on a Xilinx UltraScale+ FPGA platform. A ring buffer is constructed using dual-port block RAM with a depth of 1024 points and a data frame length of 256 points. The FFT computation module utilizes an IP core to implement a 4096-point sliding window FFT, using a Blackman-Harris window function to balance spectral resolution and sidelobe suppression. The spectral energy ratio threshold is set at 15%. When the high-frequency energy ratio exceeds the threshold, the FPGA state machine switches to bandstop filtering mode, loading a 127th-order bandstop FIR core from a pre-stored coefficient ROM. The stopband center frequency is dynamically updated by the interference frequency estimation module. The polyphase decomposition module utilizes four parallel processing chains, each with an independent decimation factor register (initial value 2). This register is dynamically adjusted to 1 or 4 by a flow rate monitoring counter based on the input data rate (typically 10 kSPS). A phase remapping mechanism is implemented using a crossbar switch matrix, redirecting abnormal channel data to a FIFO queue in a backup buffer to ensure data continuity. The phase pre-compensation coefficients of the polyphase decomposition matrix are generated by a table lookup method, and the amplitude-frequency response of the substream is corrected in combination with the Hamming window function. The secondary FIR unit is implemented using a configurable DSP Slice, and the order switching is controlled by the ZCR detection module. The ZCR threshold is set to 200 times / second. When the input signal ZCR exceeds the threshold, the DSP chain automatically expands to 32nd order, otherwise it remains at 16th order. The CRC check unit uses a parallel 16-bit generating polynomial 0x8005. The check result is packaged with the data frame and transmitted to the cloud via Gigabit Ethernet PHY. At the software level, a dynamic parameter configuration interface is embedded in the FPGA logic to support real-time updates of parameters such as the filter order and stopband frequency sent from the cloud, and interact with the ARM processor through the AXI-Lite bus to realize fault status reporting and mode switching log recording.
[0076] Compared with the existing technology, this multi-stage anti-aliasing filtering module significantly improves the anti-aliasing capability in high-dynamic industrial scenarios through the deep integration of dynamic spectrum sensing and reconfigurable filtering architecture, and solves the problem of poor adaptability of traditional fixed filtering mode to transient interference; the improved multi-phase decomposition and parallel processing mechanism effectively reduces the risk of spectrum aliasing caused by data stream asynchrony, and optimizes resource utilization through adaptive order adjustment; sub-sampling-level synchronous calibration based on group delay feedback ensures the time domain consistency of multi-channel data, provides high-fidelity input for back-end state estimation, and fundamentally improves the measurement accuracy and reliability of the overall system in complex electromagnetic environments.
[0077] In the noise feature extraction module implemented above, Figure 3 As shown, the specific working method is:
[0078] The transient filtering data was divided into multi-scale frequency bands using a 1 / 3 binary tree partitioning strategy. 128 sub-bands were generated based on Morlet wavelet packet decomposition. Abnormal frequency bands with kurtosis values higher than background noise were screened out using the energy entropy threshold of the time-frequency matrix.
[0079] The power spectral density of each subband is calculated based on a sliding window, and the noise power baseline is generated using Hanning window weighting;
[0080] Drift detection is performed using a two-layer cascade method. The first layer compares the difference between the current window and the historical reference distribution using KL divergence. If the divergence values of three consecutive windows exceed the threshold, the second layer triggers incremental detection based on the Hoeffding inequality. After verifying the drift confidence, the reference distribution is updated;
[0081] The power spectrum series is trend-fitted using an autoregressive model. The model order is dynamically adjusted based on the root mean square error of the residual term. When the residual exceeds a sliding threshold, online parameter calibration is triggered.
[0082] The power spectrum eigenvector and the drift index are weighted and superimposed through the time series fusion engine, and encapsulated into a composite indicator set that includes the frequency domain energy ratio and the time domain trend slope.
[0083] Specifically, the noise feature extraction module consists of four parts: multi-scale frequency band segmentation, dynamic power baseline modeling, concept drift verification, and trend adaptability. Multi-scale frequency band segmentation adopts a 1 / 3 binary tree segmentation strategy, and achieves recursive bisection of the frequency band through an orthogonal mirror filter bank. Combined with the time-frequency localization characteristics of Morlet wavelet packet decomposition, 128 sub-bands with constant Q factors are generated. The time-frequency matrix energy entropy threshold is used to screen out abnormal frequency bands with kurtosis values higher than the background noise. Its essence is to identify transient interference through the statistical outliers of the frequency band energy distribution. Dynamic power baseline modeling is based on the periodogram estimation method of windowed fast Fourier transform (FFT). It uses a sliding window to intercept time domain signal segments, suppresses spectral leakage through a Hanning window, calculates the sliding mean and variance of the power spectral density of each sub-band, and constructs a dynamic noise power baseline model. Its technical core is the statistical modeling of time-varying background noise based on maximum likelihood estimation. Concept drift detection uses a two-layer cascade mechanism. The first layer quantifies the difference between the current window power distribution and the historical reference distribution based on the Kullback-Leibler (KL) divergence, and determines whether a drift warning is triggered through hypothesis testing. The second layer constructs an incremental statistical tester based on the Hoeffding inequality to verify the drift confidence and update the reference distribution. Its core principle is non-parametric hypothesis testing under the Bayesian decision framework. Trend adaptability uses an autoregressive (AR) model to perform least squares fitting on the power spectrum sequence and dynamically adjust the model order using the root mean square error of the residual term. Its technical essence is model complexity optimization based on the Akaike Information Criterion (AIC), combined with a sliding threshold to trigger online parameter calibration, to achieve real-time tracking and compensation of noise trends. Finally, through the time series fusion engine, a weighted entropy fusion algorithm is used to map the frequency domain energy ratio and the time domain trend slope into a composite indicator set. Its principle relies on the feature space dimensionality reduction and nonlinear coupling mechanism of tensor decomposition.
[0084] During implementation, the module was integrated into the edge computing unit of the metering box, utilizing a multi-core heterogeneous architecture. The FPGA performs 1 / 3 binary tree segmentation and Morlet wavelet packet decomposition of the transient filter data, employing a 128-way parallel filter bank with a 100MHz clock frequency and 16-bit data width per channel. The DSP core performs FFT and power spectrum calculations, using a 512-point sliding window. Hanning window coefficients are pre-stored in ROM, and the power spectrum density output has an accuracy of 0.1dBm / Hz. The CPU runs the drift detection and AR modeling algorithms, with a KL divergence threshold of 0.15, a Hoeffding inequality confidence parameter δ = 0.05, an AR model order dynamic range of 3–12, and a residual sliding threshold set to 1.5 times the historical root mean square error. Electrically, the ADC module inputs the transient filter data to the FPGA's JESD204B interface at a sampling rate of 1MSPS. After processing, the data is transferred to the DSP core's L2 cache via the AXI-Stream bus. The CPU then retrieves the feature data via a PCIe Gen3 x4 link. In the software implementation, the wavelet packet decomposition layer is 7, generating 128 subbands with a frequency band overlap of ≤5%. The power spectral density is calculated using a fixed-point FFT acceleration library, with a computation cycle of less than 20μs. The drift detection module uses a 30-second historical reference distribution window with a 1-second update cycle. AR model parameters are iteratively solved using the QR decomposition method, with a residual monitoring period of 100ms. Real-time data flows are double-buffered to achieve zero-wait processing, and the final composite indicator set is encapsulated as an OPC UA protocol message and output via the EtherCAT bus.
[0085] During implementation, this module significantly improves the sensitivity and anti-interference ability of noise feature extraction through multi-scale frequency band segmentation and dynamic baseline modeling. The two-layer cascade drift detection mechanism effectively reduces the false trigger rate and enhances environmental adaptability. The autoregressive trend fitting and online calibration technology achieve real-time tracking accuracy of noise evolution. The composite indicator fusion method breaks through the limitations of traditional single-dimensional feature representation.
[0086] In the dynamic threshold calibration module implemented above, the dynamic threshold calibration module receives the noise power value output by the noise feature extraction module and the transient filtering data output by the multi-stage anti-aliasing filtering module, calculates the smoothed mean of the latest N sampling increment sequences using the exponentially weighted moving average algorithm, and applies the sliding window standard deviation algorithm to the same sequence in parallel to obtain the fluctuation amplitude; then, the standard deviation result is scaled by a factor based on the noise power, and the scaled standard deviation is superimposed with the EMA mean to generate the current sampling trigger threshold; if the noise power suddenly increases, the factor value is dynamically increased, otherwise the factor value is gradually reduced; after the threshold is generated, it is distributed to the adaptive sampling decision module in real time to determine the subsequent sampling rate switching trigger conditions.
[0087] The dynamic threshold calibration module dynamically smooths the incremental sampling sequence using an exponentially weighted moving average (EWMA) algorithm. This algorithm applies an exponentially decaying weight to historical data by introducing a time decay factor λ (typically 0.1-0.3), suppressing random noise while preserving slowly varying trends, thereby achieving stable tracking of the sensor signal baseline. A parallel sliding window standard deviation (SWSD) algorithm calculates the local variance of the same sequence using a fixed-length window (e.g., N = 60 sampling points). This algorithm quantifies transient fluctuations through discrete measurements. This is essentially a time-domain extension of the process capability index (Cp / Cpk) in statistical process control (SPC) theory. Noise power, a quantitative indicator of energy distribution in the frequency domain, is calculated by dividing the original signal into frequency bands using a Butterworth bandpass filter bank. This is then used to calibrate the electromagnetic interference intensity. The dynamic adjustment mechanism of the threshold factor α is based on the principle of nonlinear feedback control: when the noise power exceeds a preset threshold (e.g., -50dBm), α gradient-ascends to amplify the standard deviation contribution weight, improving the threshold's robustness to sudden interference. In low-noise environments, α is gradually reduced through a first-order inertia link, returning the system to a high-sensitivity state. The final trigger threshold is formed by the linear superposition of the EWMA mean and α*SWSD, forming a dynamic judgment boundary with statistical confidence interval characteristics. Its mathematical essence is the adaptive risk minimization model in Bayesian decision theory.
[0088] In implementation, the dynamic threshold calibration module is deployed on an edge computing node (such as an STM32H7 series MCU). It receives the frequency domain power spectrum data (quantized by a 12-bit ADC, sampling at a rate of 48kHz) output by the noise signature extraction module via an SPI interface. This data is then fused with the baseband signal (bandwidth 0-2kHz) output by the multi-stage anti-aliasing filtering module (a fourth-order Chebyshev filter chain built around the ADuM4160 isolator and the AD8606 op amp). At the software level, the EWMA attenuation factor λ is dynamically configured based on the sensor type: for slowly varying parameters such as temperature and humidity, λ = 0.05 is used to enable long-term trend tracking; for vibration signals, λ = 0.2 ensures a fast response. The sliding window length N is strictly matched to the physical sampling rate. For example, at a 1kHz sampling rate, setting N = 60 corresponds to a 60ms time window, ensuring coverage of integer multiples of the power frequency period. Noise power is calculated using FFT frames (256-point frame length, Hamming window, 50% overlap), and energy in the 1-5kHz frequency band is extracted at 125Hz resolution as an interference indicator. The threshold factor α is adjusted using incremental PID control with a proportional coefficient Kp = 0.3 and an integration time Ti = 10s, suppressing overshoot of ≤15% when subjected to step disturbances. The trigger threshold is updated every 10ms and broadcast to the adaptive sampling decision module (ADS8568ADC controller) via the CAN-FD bus. Its data packet contains a 32-bit floating-point threshold value and 8 position confidence flags. In terms of hardware, the digital power supply (DVDD) and the analog power supply (AVDD) must be strictly isolated during the PCB layout stage, and a Guard Ring structure must be set on the signal routing layer to reduce crosstalk noise.
[0089] By integrating time-frequency domain feature analysis with dynamic statistical modeling, this module significantly improves the environmental adaptability of the threshold discrimination link, overcomes the defect of traditional fixed threshold solutions that are susceptible to baseline drift and transient interference in complex electromagnetic fields, and avoids the waste of edge computing resources caused by oversampling. It provides underlying algorithm support for the reliable monitoring of multi-dimensional adjustment metering boxes in scenarios such as power grid harmonic pollution and equipment aging, and effectively balances the contradictory relationship between detection sensitivity and system energy consumption.
[0090] In the timing alignment and adaptive sampling module implemented above, the working principle of the timing alignment and adaptive sampling module is as follows: first, based on the clock synchronization mechanism, the local clock of each acquisition channel is calibrated at the microsecond level, and the transmission path delay is measured in real time through the master-slave clock message interaction and the clock offset is compensated to generate a unified time reference signal; then, a sliding window dynamic comparison algorithm is used to calculate the time shift of other channel data with the reference channel as a reference and perform cross-channel data displacement alignment through the memory direct access controller; when the signal increment detection unit detects that the instantaneous amplitude change rate of any channel exceeds the dynamic threshold, the incremental trend prediction model is used to analyze the rising slope of the signal in the continuous period. If the slope exceeds the preset critical value and lasts for three sampling cycles, a high-speed sampling instruction is sent to the perception acquisition module, and the pre-division coefficient of the clock divider is synchronously adjusted to increase the sampling frequency; otherwise, the sampling frequency is gradually reduced to the basic mode through the exponential decay model; after each mode switch, the clock phase correction amount is injected into each channel through the timestamp compensation mechanism
[0091] The timing alignment and adaptive sampling module leverages the precise clock synchronization mechanism of the IEEE 1588 PTP protocol. Through the exchange of Sync, Delay_Req, Follow_Up, and Delay_Resp messages within a master-slave clock architecture, it employs a two-way time transfer (TMT) method to calculate asymmetric delays along the transmission path. Clock offsets are compensated for using a minimum square error (LSE) optimization algorithm, achieving sub-microsecond synchronization of the local clocks of each acquisition channel. After unifying the time base, a sliding window dynamic comparison algorithm calculates the time offset between the reference channel and other channels using a cross-correlation function. Phase differences are extracted in the frequency domain using a discrete-time Fourier transform (DTFT). This algorithm, combined with a direct memory access (DMA) controller, performs circular shifts on data blocks, eliminating multi-channel data misalignment caused by clock drift or network jitter. The signal increment detection unit calculates the instantaneous amplitude change rate in real time using a forward difference operator. A dynamic threshold is implemented using an exponentially weighted moving average (EWMA) algorithm to track the signal baseline. The sliding window standard deviation (SWSTD) is superimposed to characterize the noise level, forming an adaptive trigger criterion. The incremental trend prediction model uses the least squares method to fit the rising slope of the signal in consecutive cycles, determines trend significance through residual analysis, and combines state machine logic to implement strict trigger conditions for three consecutive cycles exceeding the limit, avoiding misjudgment of transient interference. The sampling rate switching mechanism dynamically adjusts the pre-scaling coefficient of the clock divider through a phase-locked loop (PLL), increasing the sampling frequency to 4 times the base frequency in high-speed mode. At the same time, a phase compensation pulse is injected to correct the timestamp counter to ensure timing continuity after mode switching. The exponential decay model uses a first-order inertia link to achieve smooth sampling rate transitions. The decay rate is controlled by the transfer function pole configuration to avoid spectral leakage caused by sampling mutations.
[0092] In implementation, the master control unit uses an industrial-grade MCU (such as the TI Sitara AM64x) with integrated IEEE 1588 hardware timestamps. It forms a PTP domain with each acquisition node via a Gigabit Ethernet PHY (DP83867). The master clock periodically sends Sync messages, and the slave nodes capture timestamps and calculate path delays through hardware. The compensation value is written to the offset register of the local RTC module. A sliding window dynamic alignment algorithm is implemented in an FPGA (Xilinx Zynq UltraScale+), configured with a 1024-point dual-port RAM as a data buffer. The cross-correlation calculation is accelerated using the CORDIC algorithm, with the window length set to an integer multiple of the signal fundamental period (typically 20ms). A DMA controller interacts with the DDR4 memory via the AXI bus to perform cyclic shift alignment of data blocks, with a single alignment time of less than 5μs. The signal increment detection unit is implemented using a high-speed ADC (AD7606) and FPGA logic. The instantaneous amplitude change rate is output in real time via a differential operation circuit (sampling interval 1μs). Dynamic threshold parameters (α = 0.2, window length N = 50) are dynamically configured by the ARM core via the APB bus. The trend prediction model runs on the MCU, using fixed-point arithmetic to optimize the matrix inversion process of the least-squares method. The slope threshold is set to 10% / ms of the fundamental amplitude. Sampling rate switching is achieved by configuring the PLL divider ratio of the clock generator (Si5345) (1:1 to 1:4), which synchronously triggers a GPIO interrupt to notify the sensing and acquisition module to switch ADC operating modes. The timestamp compensation module is implemented using a phase accumulator within the FPGA, and the compensation value is written to the offset register of the timestamp counter with nanosecond accuracy. At the software level, the PTP protocol stack (PTPd) is deployed in the embedded system (FreeRTOS), and a priority-preemptive task is designed to handle sampling rate switching events to ensure real-time performance.
[0093] In the above implementation, the working method of the cloud fusion optimization module is:
[0094] The system receives the multi-channel sampling data stream from the timing alignment module and uses a sliding window mechanism to extract the state vector containing the four-dimensional characteristics of current, voltage, temperature, and vibration. Based on the nonlinear system model, it constructs the state transfer equation and observation equation of the extended Kalman filter. It then performs local linearization of the system dynamics using the Jacobian matrix to generate the system state estimate and covariance matrix.
[0095] The root mean square error of the current filter residual sequence is used as the fitness function to initialize the multidimensional parameter space including the threshold window length, anti-aliasing cutoff frequency, and Kalman process noise coefficient. The particle velocity vector is dynamically adjusted through the inertia weight decay strategy. During the iteration process, the weighted combination of the group optimal solution and the individual historical optimal solution is calculated to update the parameter candidate set.
[0096] When the fitness value falls below the convergence threshold three times in a row, the parameter locking mechanism is triggered. The optimized window length is injected into the sliding window controller of the dynamic threshold calibration module, and the filter parameter group is encapsulated as a JSON instruction and sent asynchronously to the edge via the MQTT protocol.
[0097] The filtering performance of the multi-stage anti-aliasing filter module after parameter update is verified by the online covariance matching algorithm. If the residual energy entropy exceeds the preset threshold, it will roll back to the previous stable parameter set.
[0098] The technical principle of the cloud-based fusion optimization module is based on a collaborative closed-loop mechanism combining nonlinear system state estimation with swarm intelligence optimization algorithms. It uses an extended Kalman filter (EKF) to achieve multi-dimensional data fusion, particle swarm optimization (PSO) dynamic parameter adjustment, and online performance verification to achieve adaptive parameter updates. Its core is to construct a high-dimensional state-space model of multi-channel signals (current, voltage, temperature, and vibration) aligned with edge timing, use the EKF to locally linearize the nonlinear system dynamics, and combine the PSO's global search capabilities to optimize anti-aliasing filtering and dynamic threshold parameters. Finally, a parameter self-correction closed-loop is formed through residual feedback.
[0099] In the extended Kalman filter, a sliding window is used to extract four-dimensional eigenvectors (such as the effective current value, voltage harmonic distortion, temperature gradient, and vibration spectrum peak) to construct the system state. A first-order Taylor expansion of the system model using the Jacobian matrix is performed for nonlinear state transition equations (such as the nonlinear relationship between equipment temperature rise and current). The partial derivative matrix is then calculated to update the state prediction covariance. The observation equation maps the state variables to the sensor output domain (such as the secondary signal of a voltage transformer). The prediction error and observation residual are weighted using the Kalman gain matrix. The state estimate is iteratively corrected and a posterior covariance matrix is output to quantify the estimation uncertainty.
[0100] The particle swarm optimization algorithm uses the root mean square error (RMSE) of the EKF filter residuals as its fitness function. A particle swarm is initialized in a multidimensional parameter space (threshold window length, anti-aliasing cutoff frequency, and process noise covariance coefficient), with each particle representing a set of candidate parameter combinations. An inertia weight decay strategy is employed to dynamically balance global exploration and local exploitation: a high inertia weight (e.g., 0.9) is set in the initial iterations to enhance global search, and later reduced to 0.4 to refine the local optimization. The particle velocity vector is updated by introducing a convex combination of the swarm's historical optimum and the individual's historical optimum, and a contraction factor is used to constrain the velocity bounds to avoid divergence. When the fitness value continuously falls below the convergence threshold, a parameter locking mechanism is triggered to select the optimal parameter set that minimizes the residual energy.
[0101] The parameter delivery and verification process encapsulates the optimized window length and filter cutoff frequency via JSON instructions, implementing asynchronous communication based on the MQTT protocol to accommodate low-bandwidth edge scenarios. An online covariance matching algorithm calculates the energy entropy of the residual sequence (reflecting the uniformity of the residual distribution) to determine whether filtering performance has degraded after parameter updates. If the residual energy entropy exceeds a threshold (e.g., a normalized entropy value > 0.8), indicating parameter mismatch leading to filter failure, a rollback mechanism is triggered to load the historically stable parameter set to ensure system robustness.
[0102] During implementation, the cloud-based fusion optimization module runs on a cloud computing platform (such as AWS IoT Greengrass), and the edge uploads time-aligned data to a cloud message queue (such as Kafka) via NB-IoT or LoRaWAN. The data processing layer uses Spark Streaming to consume data streams in real time. The sliding window length is set to 5 seconds by default (adjustable), with a window sliding step of 1 second. Within each window, four-dimensional feature vectors are extracted and state quantities (such as current harmonic content and RMS vibration acceleration) are constructed. The extended Kalman filter algorithm is implemented in the Flink computing engine. The state transition equation is modeled as a device thermodynamic-electrical coupling model (such as the exponential relationship between temperature and current). The Jacobian matrix automatically generates partial derivative expressions using a symbolic differentiation library (such as SymPy). The initial value of the process noise covariance is set to diag(0.01, 0.05, 0.1, 0.02).
[0103] Particle swarm optimization was executed in a separate container (Docker). The swarm size was set to 50, and the parameter space dimension was 4 (window length L∈[10,200], cutoff frequency fc∈[100 Hz,2 kHz], process noise coefficient Q∈[0.001,0.1], and observation noise coefficient R∈[0.01,1]). The inertia weight was initialized to 0.9 and linearly decayed to 0.4. The maximum number of iterations was 100, and the shrinkage factor was 0.729. The fitness function calculated the RMSE of the EKF residual within the window, and the optimal parameter combination was returned to the main process via the gRPC interface. After the parameters are locked, the window length L is encoded using the Protobuf protocol, and the filter parameter group is converted to JSON format (for example, {"fc":1500,"Q":0.02}). This is then published to the edge topic ( / edge / param_update) via an MQTT broker (such as EMQX). The edge device subscribes to the topic and parses the instructions, writing them to the FPGA registers via Modbus-TCP to update the buffer length of the sliding window controller and the FIR filter tap coefficients.
[0104] The online covariance matching algorithm is started after the parameters are updated, and the Shannon entropy of the residual sequence in the window is calculated: H = -∑(p i logp i), where p i The probability of bucketing the residual amplitude is denoted as H. When H > 0.8, it is considered an anomaly. The previous stable parameter set (e.g., L = 120, fc = 800Hz) is retrieved from the Redis cache and re-distributed to the edge. The rollback operation is recorded in a blockchain storage node (e.g., Hyperledger Fabric) to ensure audit traceability.
[0105] This cloud-based fusion optimization module significantly improves the accuracy of system state estimation and parameter adaptability under complex working conditions by extending the collaborative mechanism of Kalman filtering and particle swarm optimization, solving the problem of mismatch in traditional fixed parameter filtering in dynamic environments; the closed-loop verification and rollback mechanism based on residual energy entropy enhances the system's anti-interference ability and avoids chain failures caused by drastic parameter changes; asynchronous parameter delivery and lightweight protocol design ensure the real-time responsiveness of resource-constrained devices at the edge, and overall achieves highly reliable and low-latency cloud-based collaborative optimization, providing closed-loop decision-making support for equipment health management in industrial Internet of Things scenarios.
[0106] Although specific embodiments of the present invention have been described above, those skilled in the art will appreciate that these specific embodiments are merely illustrative, and that those skilled in the art may omit, substitute, and modify the details of the methods and systems described above without departing from the principles and spirit of the present invention. For example, combining the above method steps to perform substantially the same functions in substantially the same manner to achieve substantially the same results falls within the scope of the present invention. Accordingly, the scope of the present invention is limited solely by the appended claims.
Claims
1. An adaptive multi-dimensional adjustment metering box based on the Internet of Things; characterized by: include: The sensing and acquisition module is used to perform initial timing sampling of analog signals including current, voltage, temperature, and vibration and store them in a ring buffer; a multi-stage anti-aliasing filtering module, configured to perform reconfigurable FIR low-pass and band-stop switching filtering based on spectral energy ratio on the buffered data in the ring buffer, and output transient filtered data; A noise feature extraction module is used to extract noise power and drift trend indicators based on the transient filtering data using spectral kurtosis analysis and concept drift detection algorithm; A dynamic threshold calibration module, configured to generate a real-time sampling trigger threshold based on the noise power and transient filtering data using an exponentially weighted moving average and sliding window standard deviation algorithm, and adjust the threshold factor; A timing alignment and adaptive sampling module is used to correct the timestamps of each channel using the IEEE 1588PTP protocol, compare the real-time threshold with the signal increment, and switch the high / low sampling rate instruction to the perception acquisition module; The cloud-based fusion optimization module is used to apply the extended Kalman filter algorithm to the time-aligned multi-channel sampling data to output the system state estimation, and to update the threshold window length and filter parameters through the particle swarm optimization algorithm, and remotely send them to the dynamic threshold calibration module and the multi-stage anti-aliasing filter module.
2. The self-adaptive multi-dimensional regulating metering box based on the Internet of Things according to claim 1, characterized in that: The sensing acquisition module uses a multi-channel programmable gain amplifier to perform gain adjustment on current, voltage, temperature, and vibration analog signals to optimize the dynamic range. The sampling modulator generates a pulse width modulated bit stream by oversampling at a high rate. The digital decimation filter performs downsampling and anti-aliasing filtering to output primary digital samples and write them into a ring buffer. At the same time, the noise statistical characteristics of the oversampling stage are extracted. If the noise variance or signal amplitude distribution exceeds the preset range, the gain coefficient adaptive reconfiguration is triggered; and the global timestamp is obtained through the IEEE 1588PTP interface, and the timestamp is coupled and stored with the digital sample to form a multi-channel synchronous sampling queue.
3. The self-adaptive multi-dimensional regulating metering box based on the Internet of Things according to claim 1, characterized in that: The working principle of the multi-stage anti-aliasing filtering module is as follows: first, the frequency domain energy distribution of the current buffered data frame is calculated in real time based on the sliding window FFT algorithm. If the energy proportion of the frequency band higher than 0.8 times the Nyquist frequency exceeds the preset threshold, the band-stop filtering mode is triggered; otherwise, the low-pass filtering mode is enabled by default; during the mode switching process, a reconfigurable FIR filter architecture is adopted, and the pre-stored Hamming window optimization coefficient library is loaded through the FPGA hardware, wherein the low-pass filter coefficient is generated based on the equal ripple design method to generate a 63rd-order FIR kernel with a cutoff frequency of 0.6 times the Nyquist frequency, and the band-stop filter coefficient is generated using the frequency domain The sampling method generates a 127-order kernel with a stopband range of 0.8 to 1.2 times the interference center frequency; multi-stage cascade processing is performed after the output of each filter stage, and the previous stage output data is split into 4 parallel sub-streams through an improved multi-phase decomposition method, which are respectively input into a secondary variable-order FIR unit for residual noise suppression. The secondary variable-order FIR unit dynamically adjusts the order according to the short-term zero-crossing rate of the previous stage output signal. If the zero-crossing rate is higher than the preset threshold, it switches to 32-order fine filtering, otherwise it adopts 16-order fast filtering; finally, the transient filtered data is output after the data integrity is verified by the CRC-16 check unit.
4. The self-adaptive multi-dimensional regulating metering box based on the Internet of Things according to claim 3, characterized in that: The working principle of the improved multiphase decomposition method is: The input data stream is split into four parallel sub-channels based on time-indexed modulo-4 operations. Each channel is configured with an adjustable decimation factor. The data flow rate is monitored in real time through an FPGA hardware counter and the decimation factor is dynamically set to a power of 2 to match the current filtering mode. In the sub-stream processing stage, a sliding window is used to calculate the short-term energy entropy of each channel. If the energy entropy of any channel exceeds 1.5 times the average of the adjacent channels, the channel data is migrated to an idle buffer channel in real time through a phase remapping mechanism to avoid spectral aliasing. Phase pre-compensation of sub-stream data is performed through a multi-phase decomposition matrix, and weighting coefficients are dynamically generated based on the Hamming window function and the relative phase difference of the sub-streams; The phase offset of the polyphase decomposition is dynamically adjusted according to the group delay parameter of the previous stage FIR filter through the group delay feedback loop, and the sub-sampling level synchronization calibration is achieved using the shift register; The four sub-streams are reassembled in phase order by folding the addition tree and output to the CRC check unit to generate a complete data frame.
5. The self-adaptive multi-dimensional regulating metering box based on the Internet of Things according to claim 1 is characterized in that: The working method of the noise feature extraction module is: The transient filtering data was divided into multi-scale frequency bands using a 1 / 3 binary tree partitioning strategy. 128 sub-bands were generated based on Morlet wavelet packet decomposition. Abnormal frequency bands with kurtosis values higher than background noise were screened out using the energy entropy threshold of the time-frequency matrix. The power spectrum density of each sub-band is calculated based on the sliding window, and the noise power baseline is generated using the Hanning window weighting; Drift detection is performed using a two-layer cascade method. The first layer compares the difference between the current window and the historical reference distribution using KL divergence. If the divergence values of three consecutive windows exceed the threshold, the second layer triggers incremental detection based on the Hoeffding inequality. After verifying the drift confidence, the reference distribution is updated; The power spectrum series is trend-fitted using an autoregressive model. The model order is dynamically adjusted based on the root mean square error of the residual term. When the residual exceeds a sliding threshold, online parameter calibration is triggered. The power spectrum eigenvector and the drift index are weighted and superimposed through the time series fusion engine, and encapsulated into a composite indicator set that includes the frequency domain energy ratio and the time domain trend slope.
6. The self-adaptive multi-dimensional regulating metering box based on the Internet of Things according to claim 1, characterized in that: The dynamic threshold calibration module receives the noise power value output by the noise feature extraction module and the transient filtering data output by the multi-stage anti-aliasing filtering module, calculates the smoothed mean of the latest N sampling increment sequences using an exponentially weighted moving average algorithm, and concurrently applies a sliding window standard deviation algorithm to the same sequence to obtain the fluctuation amplitude; then, the standard deviation result is scaled by a factor based on the noise power, and the scaled standard deviation is superimposed on the EMA mean to generate the current sampling trigger threshold; If the noise power suddenly increases, the factor value is dynamically increased; otherwise, the factor value is gradually reduced; After the threshold is generated, it is distributed to the adaptive sampling decision module in real time to determine the subsequent sampling rate switching trigger conditions.
7. The self-adaptive multi-dimensional regulating metering box based on the Internet of Things according to claim 1, characterized in that: The timing alignment and adaptive sampling module works as follows: first, the local clock of each acquisition channel is calibrated for microsecond deviation based on the clock synchronization mechanism, and the transmission path delay is measured in real time through the master-slave clock message interaction and the clock offset is compensated to generate a unified time reference signal; Then, a sliding window dynamic comparison algorithm is used to calculate the time shift of the data of other channels with the reference channel as the reference, and the cross-channel data displacement alignment is performed through the memory direct access controller; When the signal increment detection unit detects that the instantaneous amplitude change rate of any channel exceeds the dynamic threshold, the incremental trend prediction model is used to analyze the rising slope of the signal in continuous cycles. If the slope exceeds the preset critical value and lasts for three sampling cycles, a high-speed sampling instruction is sent to the perception acquisition module, and the pre-division coefficient of the clock divider is synchronously adjusted to increase the sampling frequency; otherwise, the sampling frequency is gradually reduced to the basic mode through the exponential decay model; after each mode switch, the clock phase correction amount is injected into each channel through the timestamp compensation mechanism.
8. The self-adaptive multi-dimensional regulating metering box based on the Internet of Things according to claim 1, characterized in that: The working method of the cloud-based fusion optimization module is as follows: The system receives the multi-channel sampling data stream from the timing alignment module and uses a sliding window mechanism to extract the state vector containing the four-dimensional characteristics of current, voltage, temperature, and vibration. Based on the nonlinear system model, it constructs the state transfer equation and observation equation of the extended Kalman filter. It then performs local linearization of the system dynamics using the Jacobian matrix to generate the system state estimate and covariance matrix. The root mean square error of the current filter residual sequence is used as the fitness function to initialize a multidimensional parameter space including the threshold window length, anti-aliasing cutoff frequency, and Kalman process noise coefficient. The particle velocity vector is dynamically adjusted through the inertia weight decay strategy. During the iteration process, a weighted combination of the group optimal solution and the individual historical optimal solution is calculated to update the parameter candidate set. When the fitness value falls below the convergence threshold three times in a row, the parameter locking mechanism is triggered. The optimized window length is injected into the sliding window controller of the dynamic threshold calibration module, and the filter parameter group is encapsulated as a JSON instruction and sent asynchronously to the edge via the MQTT protocol. The filtering performance of the multi-stage anti-aliasing filtering module after parameter update is verified by the online covariance matching algorithm. If the residual energy entropy exceeds the preset threshold, it rolls back to the previous stable parameter group.
Citation Information
Cited By
Multi-mode cooperative control system and method for cable branch box
CN120979003A
Abnormality detection method, device and equipment of power equipment and storage medium
CN121009475A
Underground water deep sampling system and method
CN121090172A
Shaft pin type weighing sensor weighing method based on CAN
CN121185398A
Equipment state monitoring method based on time sequence synchronous compression mechanism
CN121256514A