A power usage situation prompting and safety early warning monitoring method and system

By using multi-source data fusion and joint optimization technology from low-frequency metering channels and high-frequency harmonic channels, a structured state-space sequence model is constructed, which solves the accuracy and stability problems of power quality monitoring and prediction in existing technologies, and realizes high-precision prediction and real-time early warning of power usage trends and harmonic index changes.

CN121308320BActive Publication Date: 2026-05-01BEIJING CARBON SUO NEW ENERGY INFORMATION SERVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING CARBON SUO NEW ENERGY INFORMATION SERVICE CO LTD
Filing Date
2025-09-22
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing power quality monitoring and prediction technologies have limitations when processing multi-channel fusion of high-frequency harmonics and low-frequency metering data. They cannot fully utilize time-series correlation characteristics, have low prediction accuracy, and lack frequency domain consistency constraints and multi-task collaborative optimization, making it difficult to meet the needs of high-precision power quality management and safety early warning in complex operating environments.

Method used

By fusing multi-source data from low-frequency metering channels and high-frequency harmonic channels, parametric spectrum estimation, rotating harmonic state construction, gating fusion mechanism, and joint optimization techniques for time-domain and frequency-domain consistency, a structured state-space sequence model is constructed to achieve harmonic feature extraction, model-driven prediction, and real-time early warning.

Benefits of technology

It achieves high-precision prediction of electricity usage trends and harmonic index changes, and can promptly trigger early warnings when the prediction results exceed the safety threshold, thereby enhancing the real-time performance and reliability of power quality monitoring and providing a safe and stable guarantee for power grid operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121308320B_ABST
    Figure CN121308320B_ABST
Patent Text Reader

Abstract

The application discloses a kind of electric quantity use situation prompt and safety early warning monitoring method and system, comprising: acquisition low-frequency metering and high-frequency harmonic channel data, generate analysis window signal;Parameterized spectrum estimation obtains harmonic order, frequency, amplitude, phase and filters effective component;Rotary harmonic state sequence is constructed, and total harmonic distortion and sub-band energy are calculated;With low-frequency data and harmonic index as exogenous input, structured state space model is constructed, and multiple-step prediction and hidden state are output;Gated fusion state sequence and hidden state, limit parameter search range;Construct joint optimization target, end-to-end training and solidify model structure and parameter;Model deployment generates electric quantity and harmonic trend prediction, trigger prompt and early warning and output to visual terminal.The application realizes the accurate prediction of electric quantity use trend and harmonic index and over-limit safety early warning by fusing multi-channel sampling, harmonic state modeling and structured state space prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power quality monitoring and prediction technology, and in particular to a method and system for power usage status alerts and safety warnings. Background Technology

[0002] Current power quality monitoring and prediction technologies primarily rely on collecting and analyzing voltage and current waveforms during power grid operation. Signal processing methods such as Fourier transform, wavelet analysis, and spectral estimation are used to extract characteristic parameters such as harmonic frequency, amplitude, and phase, and these parameters are then used to assess power quality indicators such as total harmonic distortion (THD) and zonal harmonic energy. In terms of prediction, traditional methods often employ statistical modeling-based autoregressive moving average models, Kalman filter models, and support vector regression models to fit historical monitoring data and extrapolate trends. However, these methods have limitations when handling multi-channel fusion of high-frequency harmonics and low-frequency metering data, failing to fully utilize the temporal correlation features at different sampling frequencies, and exhibiting low prediction accuracy in scenarios where harmonic components change significantly over time. In recent years, some studies have introduced deep learning models such as recurrent neural networks and temporal convolutional networks to improve nonlinear modeling capabilities. However, in harmonic-driven power quality prediction, problems remain, including insufficient utilization of exogenous input features and a lack of specific optimization of model structures for the time-varying characteristics of harmonics.

[0003] In the harmonic parameter extraction stage, existing technologies mostly treat harmonic analysis as a separate signal processing step, lacking deep coupling with the prediction model. This results in harmonic features failing to dynamically drive prediction during the model's hidden state update process. Regarding prediction result optimization, existing methods primarily rely on a single time-domain error minimization objective, lacking frequency-domain consistency constraints and multi-task collaborative optimization mechanisms. This leads to discrepancies between the predicted results and actual measurements in terms of spectral characteristics. For the prior range constraints of harmonic parameters and feature-driven state-space updates, existing technologies have not yet established an effective joint optimization framework. The models have limited performance in handling harmonic feature changes, prediction uncertainty analysis, and real-time monitoring and early warning. Consequently, in complex operating environments, existing harmonic state monitoring and multi-step prediction methods struggle to meet the requirements of high-precision power quality management and safety early warning in terms of accuracy, stability, and robustness.

[0004] Therefore, how to provide a method and system for monitoring and alerting power usage and safety warnings is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] One objective of this invention is to propose a method and system for monitoring and alerting power usage status and providing safety warnings. This invention fully utilizes multi-source data fusion from low-frequency metering channels and high-frequency harmonic channels, parameterized spectrum estimation, rotating harmonic state construction, gating fusion mechanism, and joint optimization technology for consistency between the time and frequency domains. It details the complete process from harmonic feature extraction and model-driven prediction to joint constraint optimization and real-time warning, and has advantages such as high prediction accuracy, strong spectral feature preservation, good adaptability to harmonic time-varying characteristics, and high reliability of monitoring and warning in complex power grid environments.

[0006] A method for monitoring and alerting battery usage according to an embodiment of the present invention includes:

[0007] Collect sampling data from the low-frequency metering channel and the high-frequency harmonic channel. Preprocess the high-frequency harmonic channel sampling data to obtain the high-frequency harmonic analysis window signal.

[0008] Based on the high-frequency harmonic analysis window signal, parameterized spectrum estimation is performed to obtain a set of harmonic parameters including harmonic order, harmonic frequency, harmonic amplitude, and harmonic phase, and effective harmonic components are screened.

[0009] A rotating harmonic state sequence is constructed based on the harmonic parameter set. Time smoothing is performed on adjacent analysis windows to calculate total harmonic distortion and zonal harmonic energy.

[0010] Using low-frequency metering channel sampling data, total harmonic distortion, and zonal harmonic energy as exogenous inputs, an improved structured state-space sequence model is constructed, and the future multi-step prediction results and model hidden states are output.

[0011] Gated fusion of rotating harmonic state sequences and model latent states is performed, time-domain consistency constraints and frequency-domain consistency constraints are applied to future multi-step prediction results, and a search space is generated that limits the harmonic parameter set by the prior range of harmonic frequency and the prior range of harmonic amplitude.

[0012] Based on the prediction results of future multi-step predictions and the actual measurement sequence, the prediction error is calculated. Combining the time domain consistency constraints and frequency domain consistency constraints, as well as the rotating harmonic state sequence and the model hidden state, a joint optimization objective is constructed. End-to-end training is performed and the structured state space sequence model structure and fusion layer parameters are solidified.

[0013] The structured state-space sequence model is deployed to the monitoring platform to generate power consumption trend prediction results, harmonic index change trends and uncertainty parameters, and compare them with preset safety thresholds. When the limit is exceeded, prompts and warnings are triggered and output to the visualization terminal.

[0014] Optionally, the low-frequency metering channel sampling data specifically includes the effective value of voltage, the effective value of current, active power, reactive power and power factor, and the high-frequency harmonic channel sampling data specifically includes the voltage waveform, current waveform and spectral components sampled at high frequency, wherein the low-frequency sampling frequency is 1Hz to 5Hz and the high-frequency sampling frequency is 5kHz to 20kHz.

[0015] Optionally, the preprocessing of the high-frequency harmonic channel sampling data to obtain the high-frequency harmonic analysis window signal specifically refers to sequentially performing noise reduction, DC component removal, bandpass filtering, and segmentation and windowing processing on the high-frequency harmonic channel sampling data according to a set window length.

[0016] Optionally, the parametric spectrum estimation based on the high-frequency harmonic analysis window signal is performed to obtain a set of harmonic parameters including harmonic order, harmonic frequency, harmonic amplitude, and harmonic phase, and effective harmonic components are screened, including:

[0017] The high-frequency harmonic analysis window signal is decomposed in the frequency domain to extract the candidate harmonic components. The harmonic order, harmonic frequency, harmonic amplitude and harmonic phase of each candidate harmonic component are calculated to form the first set of harmonic parameters.

[0018] The trend change information in the low-frequency metering channel sampling data is coupled across channels with the high-frequency harmonic component set composed of harmonic components in the first harmonic parameter set. The frequency and amplitude of the high-frequency harmonic components are offset and corrected by the trend change information to obtain the corrected second harmonic parameter set.

[0019] While generating the second set of harmonic parameters, the changing trend of harmonic parameters in adjacent historical analysis windows is analyzed, and the initial values ​​of harmonic parameters in the current analysis window are predicted. The prediction results are used as the initial values ​​of the second set of harmonic parameters, which narrows the parameter search range and speeds up the estimation convergence.

[0020] Iterative optimization is performed using the predicted and initialized set of second harmonic parameters to make fine estimates of the harmonic order, harmonic frequency, harmonic amplitude, and harmonic phase of each harmonic component.

[0021] For each harmonic component in the iteratively optimized second harmonic parameter set, a comprehensive confidence index based on signal-to-noise ratio, spectral fitting residual, and consistency of temporal smoothing between adjacent windows is calculated.

[0022] The effective harmonic components that meet the confidence threshold are dynamically selected, and low-confidence or abnormal harmonic components are removed to obtain the third harmonic parameter set. The third harmonic parameter set is then output as the final effective harmonic parameter set.

[0023] Optionally, the step of constructing a rotating harmonic state sequence based on a set of harmonic parameters, performing time smoothing on adjacent analysis windows, and calculating total harmonic distortion and zonal harmonic energy includes:

[0024] Based on the set of harmonic parameters, the harmonic order, harmonic frequency, harmonic amplitude and harmonic phase of each harmonic component are arranged in chronological order to generate a rotating harmonic state sequence for the corresponding analysis window. The rotating harmonic state sequences of the continuous analysis window are sequentially spliced ​​to obtain a set of rotating harmonic state sequences covering the target time range.

[0025] In the set of rotating harmonic state sequences, time smoothing is performed on the rotating harmonic state sequences between adjacent analysis windows to generate smoothed rotating harmonic state sequences;

[0026] Total harmonic distortion (THD) is calculated based on a smoothed rotating harmonic state sequence. The THD is generated by using the fundamental amplitude as the denominator and the square root of the sum of the squares of the amplitudes of each harmonic as the numerator.

[0027] Based on the smoothed rotating harmonic state sequence, the harmonic components are divided into zones according to the harmonic order range, generating a harmonic amplitude sequence corresponding to each zone. The zone harmonic energy is calculated based on the harmonic amplitude sequence. The zone harmonic energy is generated by summing the squares of the harmonic amplitudes within each zone. The total harmonic distortion and the zone harmonic energy are recorded in time series.

[0028] Optionally, the step of using low-frequency metering channel sampling data, total harmonic distortion, and zonal harmonic energy as exogenous inputs to construct an improved structured state-space sequence model, and outputting future multi-step prediction results and model hidden states, includes:

[0029] Based on low-frequency metering channel sampling data and total harmonic distortion and zonal harmonic energy as exogenous inputs, an improved structured state-space sequence model is constructed, which includes a harmonic state transition module, a harmonic gated decoding module, and a multi-task output module.

[0030] In the harmonic state transition module, time-varying state transition parameters and exogenous input mapping parameters are generated using the exogenous input vector and the initial hidden state of the model as variables to update the hidden state of the model. The exogenous input vector is composed of the low-frequency metering channel sampling data and the total harmonic distortion and the zonal harmonic energy at the corresponding time step. The initial hidden state of the model is calculated by the initial state mapping unit using the feature vector of the low-frequency metering channel sampling data at the first analysis time step and the total harmonic distortion and the zonal harmonic energy at the corresponding time step.

[0031] In the harmonic gated decoding module, the updated model hidden state is connected with the total harmonic distortion and the zonal harmonic energy feature vectors and then input into the gated function to generate gated coefficients. Based on the gated coefficients, the updated model hidden state is gated and modulated to obtain the gated and modulated hidden state representation.

[0032] In the multi-task output module, the hidden state representation and the exogenous input vector are input together for processing to generate multi-step prediction results for the future, and the predicted values ​​corresponding to each prediction time step are output respectively. Each prediction time step corresponds to an independent readout parameter, and the number of prediction steps is determined by the preset prediction range.

[0033] The gating coefficients, time-varying state transition parameters, and exogenous input mapping parameters are recorded, and the prediction results for future multiple steps and the updated model hidden states are output and cached in chronological order.

[0034] Optionally, the gating fusion of the rotating harmonic state sequence and the model latent state, the imposition of time-domain consistency constraints and frequency-domain consistency constraints on the future multi-step prediction results, and the generation of a search space that defines the harmonic parameter set by the prior range of harmonic frequency and the prior range of harmonic amplitude include:

[0035] The generated gating coefficients are used to perform element-wise weighted fusion of the model's hidden states to form a gated fused hidden state representation.

[0036] The current prediction sequence is extracted from the multi-step prediction results in the future. At the same time, the corresponding harmonic amplitude, harmonic frequency and harmonic phase parameters are extracted from the rotating harmonic state sequence at the current moment. The reference current sequence is synthesized in the time domain, and the sum of the squared differences between the current prediction sequence and the reference current sequence in multiple future time steps is calculated to obtain the time domain consistency constraint.

[0037] Discrete Fourier transforms are performed on the current prediction sequence and the reference current sequence respectively to obtain the prediction spectrum and the reference spectrum. Within the frequency neighborhood range centered on each target harmonic frequency and determined by the preset frequency neighborhood width, the sum of the absolute values ​​of the differences between the prediction spectrum and the reference spectrum is calculated to obtain the frequency domain consistency constraint.

[0038] Based on the gated fusion hidden state representation, harmonic frequency prior values ​​and harmonic amplitude prior values ​​are generated, and a center value and positive and negative range are set for each harmonic frequency prior value and harmonic amplitude prior value to form frequency prior interval and amplitude prior interval, thus limiting the search space of the harmonic parameter set;

[0039] The gating coefficients, gating fusion hidden state representations, time-domain consistency constraints, frequency-domain consistency constraints, frequency prior intervals, and amplitude prior intervals are recorded and saved together with the future multi-step prediction results.

[0040] A power usage reminder and safety warning monitoring system according to an embodiment of the present invention includes the following modules:

[0041] The acquisition and preprocessing module is used to acquire sampling data from the low-frequency metering channel and the high-frequency harmonic channel, and to preprocess the sampling data from the high-frequency harmonic channel to generate a high-frequency harmonic analysis window signal.

[0042] The harmonic parameter module is used to perform parametric spectrum estimation based on the high-frequency harmonic analysis window signal and to filter effective harmonic components.

[0043] The state sequence construction module is used to generate a rotating harmonic state sequence based on the harmonic parameter set, perform time smoothing on adjacent analysis windows, and calculate the total harmonic distortion and zonal harmonic energy.

[0044] The state-space modeling module is used to build an improved structured state-space sequence model and output the prediction results for future multiple steps and the model's hidden states.

[0045] The fusion constraint module is used to gating the fusion of the rotating harmonic state sequence and the model's hidden state, and to apply time-domain consistency and frequency-domain consistency constraints to the future multi-step prediction results.

[0046] The joint optimization module is used to calculate the prediction error based on the future multi-step prediction results and the actual measurement sequence, construct the joint optimization objective, and solidify the structured state-space sequence model structure and fusion layer parameters.

[0047] The monitoring and early warning module is used to deploy the structured state-space sequence model to the monitoring platform, trigger prompts and early warnings, and output them to the visualization terminal.

[0048] The beneficial effects of this invention are:

[0049] This invention achieves collaborative modeling of low-frequency metering data and high-frequency harmonic characteristics by introducing a structured state-space sequence model and a multi-source fusion method driven by rotating harmonic states. This allows for the accurate depiction of the dynamic evolution of harmonics while capturing trends in power quality changes. Combined with a gated fusion mechanism, the invention effectively integrates the model's latent states and harmonic feature information, ensuring the prediction results remain continuous in the time domain and retain the main harmonic component characteristics in the frequency domain, thus improving the accuracy and stability of multi-step prediction.

[0050] By employing a joint optimization strategy, prediction error, time-domain consistency constraints, and frequency-domain consistency constraints are incorporated into a unified optimization framework. This enables the model to simultaneously consider the fitting effects in both the time and frequency domains during training, thereby improving its adaptability to the time-varying characteristics of power grid harmonics.

[0051] This invention not only provides high-precision predictions of power consumption trends and harmonic index changes, but also triggers timely warnings when the prediction results exceed safety thresholds, enhancing the real-time performance and reliability of power quality monitoring and providing strong protection for the safe and stable operation of the power grid. Attached Figure Description

[0052] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0053] Figure 1 This is a flowchart of a power usage status prompt and safety warning monitoring method proposed in this invention;

[0054] Figure 2 This is a schematic diagram of the structure of a power usage status prompt and safety early warning monitoring system proposed in this invention. Detailed Implementation

[0055] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0056] refer to Figure 1 A method for monitoring and alerting battery usage status and providing safety warnings, comprising:

[0057] Collect sampling data from the low-frequency metering channel and the high-frequency harmonic channel. Preprocess the high-frequency harmonic channel sampling data to obtain the high-frequency harmonic analysis window signal.

[0058] Based on the high-frequency harmonic analysis window signal, parameterized spectrum estimation is performed to obtain a set of harmonic parameters including harmonic order, harmonic frequency, harmonic amplitude, and harmonic phase, and effective harmonic components are screened.

[0059] A rotating harmonic state sequence is constructed based on the harmonic parameter set. Time smoothing is performed on adjacent analysis windows to calculate total harmonic distortion and zonal harmonic energy.

[0060] Using low-frequency metering channel sampling data, total harmonic distortion, and zonal harmonic energy as exogenous inputs, an improved structured state-space sequence model is constructed, and the future multi-step prediction results and model hidden states are output.

[0061] Gated fusion of rotating harmonic state sequences and model latent states is performed, time-domain consistency constraints and frequency-domain consistency constraints are applied to future multi-step prediction results, and a search space is generated that limits the harmonic parameter set by the prior range of harmonic frequency and the prior range of harmonic amplitude.

[0062] Based on the prediction results of future multi-step predictions and the actual measurement sequence, the prediction error is calculated. Combining the time domain consistency constraints and frequency domain consistency constraints, as well as the rotating harmonic state sequence and the model hidden state, a joint optimization objective is constructed. End-to-end training is performed and the structured state space sequence model structure and fusion layer parameters are solidified.

[0063] The structured state-space sequence model is deployed to the monitoring platform to generate power consumption trend prediction results, harmonic index change trends and uncertainty parameters, and compare them with preset safety thresholds. When the limit is exceeded, prompts and warnings are triggered and output to the visualization terminal.

[0064] In this embodiment, the low-frequency metering channel sampling data specifically includes the effective value of voltage, the effective value of current, active power, reactive power, and power factor. The high-frequency harmonic channel sampling data specifically includes the voltage waveform, current waveform, and spectral components sampled at high frequencies. The low-frequency sampling frequency is 1Hz to 5Hz, and the high-frequency sampling frequency is 5kHz to 20kHz.

[0065] In this embodiment, the preprocessing of the high-frequency harmonic channel sampling data to obtain the high-frequency harmonic analysis window signal specifically refers to performing noise reduction, DC component removal, bandpass filtering, and segmentation and windowing processing on the high-frequency harmonic channel sampling data according to a set window length in sequence.

[0066] In this embodiment, the step of performing parameterized spectrum estimation based on the high-frequency harmonic analysis window signal to obtain a set of harmonic parameters including harmonic order, harmonic frequency, harmonic amplitude, and harmonic phase, and filtering effective harmonic components, includes:

[0067] The high-frequency harmonic analysis window signal is decomposed in the frequency domain to extract candidate harmonic components. The harmonic order, harmonic frequency, harmonic amplitude, and harmonic phase of each candidate harmonic component are calculated to form the first set of harmonic parameters. The harmonic order is obtained by rounding down the ratio of the harmonic frequency to the fundamental frequency. The harmonic frequency is obtained by multiplying the harmonic order by the fundamental frequency. The harmonic amplitude is obtained by taking the modulus of the frequency domain amplitude-frequency characteristic of the candidate harmonic component. The harmonic phase is obtained by taking the arctangent of the frequency domain phase-frequency characteristic of the candidate harmonic component.

[0068] The trend change information in the low-frequency metering channel sampling data is coupled across channels with the high-frequency harmonic component set composed of harmonic components in the first harmonic parameter set. The frequency and amplitude of the high-frequency harmonic components are offset and corrected by the trend change information to obtain the corrected second harmonic parameter set.

[0069] While generating the second set of harmonic parameters, the changing trends of harmonic parameters within adjacent historical analysis windows are analyzed, and the initial values ​​of harmonic parameters in the current analysis window are predicted. The prediction results are used as the initial values ​​of the second set of harmonic parameters, narrowing the parameter search range and accelerating the estimation convergence speed. Specifically:

[0070] When generating the second harmonic parameter set, the frequency, amplitude, and phase estimation results of each harmonic component within adjacent historical analysis windows are first extracted, the changing trends are calculated, and the initial values ​​of the harmonic parameters in the current analysis window are predicted using linear extrapolation. The frequency and amplitude are predicted using the differential trends of the previous two windows, while the phase is calculated based on the phase and frequency of the previous window and processed modulo 2π. The prediction results are used as the initial values ​​for the second harmonic parameter set, effectively narrowing the parameter search range and reducing invalid calculations.

[0071] Frequency prediction:

[0072] ;

[0073] Amplitude prediction:

[0074] ;

[0075] Phase prediction:

[0076] ;

[0077] in, , , These represent the current analysis window. Inner Initialization results of the frequency, amplitude, and phase of each harmonic component. , These are the frequency estimates for the previous window and the two previous windows, respectively. , These are the amplitude estimates for the previous window and the two windows prior, respectively. This is the phase estimate from the previous window. This is the length of the high-frequency analysis window. For high frequency sampling rate, , These are the trend weighting coefficients for frequency and amplitude prediction, respectively. Operations are used to maintain phase in Continuity of intervals;

[0078] By extracting the estimated frequency, amplitude, and phase of each harmonic component within adjacent historical analysis windows and calculating their changing trends, the algorithm predicts the initial values ​​of harmonic parameters for the current analysis window using linear extrapolation. This improves initialization accuracy and computational efficiency. Frequency and amplitude predictions rely on the changing trends of the previous two windows, effectively capturing dynamic changes in harmonic characteristics. Phase prediction combines the phase and frequency calculation results from the previous window and maintains phase continuity within a reasonable range through modulo operations, avoiding estimation errors caused by phase jumps. This reduces the deviation between initial and true values, narrows the range of subsequent parameter searches, and reduces unnecessary computation, thereby accelerating the convergence speed of the estimation process. By introducing a trend weight coefficient to adjust the prediction sensitivity, the algorithm maintains high stability and accuracy under different dynamic conditions, improving the real-time performance and reliability of harmonic analysis and prediction.

[0079] Iterative optimization is performed using the predicted and initialized set of second harmonic parameters to finely estimate the harmonic order, harmonic frequency, harmonic amplitude, and harmonic phase of each harmonic component. Specifically:

[0080] The harmonic order is fine-tuned based on the difference between the predicted and measured values, and the order correction is achieved by minimizing the frequency domain error function.

[0081] High-resolution spectral analysis methods are used to refine the calculation of harmonic frequencies, thereby improving the accuracy of frequency estimation.

[0082] By combining weighted least squares fitting, harmonic amplitude and harmonic phase are jointly optimized to reduce amplitude and phase estimation errors.

[0083] For each harmonic component in the iteratively optimized second harmonic parameter set, a comprehensive confidence index based on signal-to-noise ratio, spectral fitting residual, and consistency of temporal smoothing between adjacent windows is calculated. The comprehensive confidence index is: Among them, the comprehensive confidence index serves as a scoring standard for determining the validity of harmonic components, directly determining whether a harmonic component enters the third harmonic parameter set:

[0084] ;

[0085] in, Indicates the first Signal-to-noise ratio of each harmonic component Indicates the first The spectral fitting residuals of each harmonic component Indicates the first A measure of the inconsistency in time smoothing between each harmonic component and adjacent analysis windows. These are the weighting coefficients. , , These are the maximum values ​​of the corresponding indicators in all harmonic components, used for normalization.

[0086] The effective harmonic components that meet the confidence threshold are dynamically selected, and low-confidence or abnormal harmonic components are removed to obtain the third harmonic parameter set. The third harmonic parameter set is then output as the final effective harmonic parameter set.

[0087] This invention achieves high-precision and high-efficiency estimation of harmonic parameter sets by introducing a dual mechanism of cross-channel coupling correction and trend prediction initialization. When generating the second harmonic parameter set, trend information from the low-frequency metering channel is used to offset the frequency and amplitude of high-frequency harmonic components, effectively suppressing parameter estimation deviations caused by measurement noise, transient fluctuations, or sampling drift, thus improving parameter stability and anti-interference capability. Linear extrapolation prediction is performed using parameter change trends from adjacent historical analysis windows, and the predicted results are used as initial values, narrowing the parameter search range, reducing invalid iterative calculations, accelerating the convergence speed of the iterative optimization process, and reducing the computational load. In the parameter optimization stage, high-resolution spectral analysis and weighted least squares fitting are combined to improve the estimation accuracy of harmonic frequency, amplitude, and phase. A comprehensive confidence index based on signal-to-noise ratio, spectral fitting residuals, and time smoothing consistency is introduced to dynamically screen harmonic components, ensuring the retention of effective information while eliminating abnormal or low-confidence components, thereby improving the accuracy and reliability of the final harmonic parameter set.

[0088] In this embodiment, the step of constructing a rotating harmonic state sequence based on the harmonic parameter set, performing time smoothing on adjacent analysis windows, and calculating total harmonic distortion and zonal harmonic energy includes:

[0089] Based on the set of harmonic parameters, the harmonic order, harmonic frequency, harmonic amplitude and harmonic phase of each harmonic component are arranged in chronological order to generate a rotating harmonic state sequence for the corresponding analysis window. The rotating harmonic state sequences of the continuous analysis window are sequentially spliced ​​to obtain a set of rotating harmonic state sequences covering the target time range.

[0090] In the set of rotating harmonic state sequences, time smoothing is performed on the rotating harmonic state sequences between adjacent analysis windows to generate smoothed rotating harmonic state sequences;

[0091] Total harmonic distortion (THD) is calculated based on a smoothed rotating harmonic state sequence. The THD is generated by using the fundamental amplitude as the denominator and the square root of the sum of the squares of the amplitudes of each harmonic as the numerator.

[0092] Based on the smoothed rotating harmonic state sequence, the harmonic components are divided into zones according to the harmonic order range, generating a harmonic amplitude sequence corresponding to each zone. The zone harmonic energy is calculated based on the harmonic amplitude sequence by summing the squares of the harmonic amplitudes within each zone. The total harmonic distortion and the zone harmonic energy are recorded in time sequence. Specifically, the calculation of zone harmonic energy based on the harmonic amplitude sequence refers to summing the squares of the amplitudes of all harmonic components within the same harmonic order range to reflect the total energy of the harmonics in that frequency band.

[0093] This invention achieves a continuous and stable expression of harmonic characteristics by constructing a rotating harmonic state sequence and performing time smoothing. In the harmonic state construction stage, the harmonic order, frequency, amplitude, and phase are organized into a rotating sequence in chronological order, and continuous analysis windows are sequentially spliced ​​together. This effectively preserves the temporal evolution characteristics of harmonic parameters and avoids the one-sidedness of single-window analysis. By performing time smoothing on adjacent window state sequences, the impact of instantaneous disturbances and random noise on harmonic characteristics can be suppressed, making the harmonic variation trend smoother and more realistic. The total harmonic distortion is calculated based on the smoothed state sequence, and fundamental amplitude normalization is used to ensure comparability and stability under different operating conditions. By dividing harmonics into bands according to their order range and calculating the harmonic energy of each band, the impact of harmonics in different frequency bands on the system can be accurately analyzed. This helps to locate high-risk frequency bands and carry out targeted mitigation. While preserving the dynamic characteristics of harmonics, it improves the stability, interpretability, and analytical accuracy of harmonic indicators, providing a reliable quantitative basis for power quality monitoring, fault diagnosis, and predictive maintenance. It has strong engineering practical value and promotion potential.

[0094] In this embodiment, the step of using low-frequency metering channel sampling data, total harmonic distortion, and zonal harmonic energy as exogenous inputs to construct an improved structured state-space sequence model, and outputting future multi-step prediction results and model hidden states, includes:

[0095] Based on low-frequency metering channel sampling data and total harmonic distortion and zonal harmonic energy as exogenous inputs, an improved structured state-space sequence model is constructed, which includes a harmonic state transition module, a harmonic gated decoding module, and a multi-task output module.

[0096] In the harmonic state transition module, time-varying state transition parameters and exogenous input mapping parameters are generated using the exogenous input vector and the initial hidden state of the model as variables to update the model's hidden state. The exogenous input vector is composed of low-frequency metering channel sampling data, total harmonic distortion, and zonal harmonic energy at the corresponding time step. The initial hidden state of the model is calculated by the initial state mapping unit using the feature vector of the low-frequency metering channel sampling data at the first analysis time step, along with the total harmonic distortion and zonal harmonic energy at the corresponding time step. The specific steps for updating the model's hidden state are as follows:

[0097] The exogenous input vector and the current model hidden state are input together into the state transition function to generate the time-varying state transition parameters and exogenous input mapping parameters for the corresponding time step;

[0098] The hidden state of the previous time step is transformed according to the time-varying state transition parameters. At the same time, the current exogenous input vector is mapped using the exogenous input mapping parameters. The results of the two are superimposed to obtain the intermediate update value of the hidden state.

[0099] The intermediate update values ​​of the hidden state are sequentially subjected to nonlinear activation and normalization processing to obtain the updated model hidden state.

[0100] In the harmonic gated decoding module, the updated model hidden state is concatenated with the total harmonic distortion and the zonal harmonic energy feature vectors and then input into the gate function to generate gate coefficients. Based on the gate coefficients, the updated model hidden state is gated and modulated to obtain the gated and modulated hidden state representation. The gate function is a function that outputs gate coefficients with values ​​ranging from 0 to 1 by weighted summation of the input feature vectors and applying nonlinear activation operations.

[0101] In the multi-task output module, the hidden state representation and the exogenous input vector are processed together to generate multi-step prediction results, and the predicted values ​​corresponding to each prediction time step are output separately. Each prediction time step corresponds to an independent readout parameter, and the number of prediction steps is determined by a preset prediction range. The specific steps of processing the hidden state representation and the exogenous input vector together are as follows:

[0102] The hidden state representation is concatenated with the exogenous input vector along the feature dimension to form a joint feature representation;

[0103] The joint feature representation is sequentially input into a fully connected mapping layer and a nonlinear activation layer to extract the deep features required for prediction.

[0104] The extracted deep features are input into the independent readout layer corresponding to each prediction time step, and the predicted value of each time step is output.

[0105] The gating coefficients, time-varying state transition parameters, and exogenous input mapping parameters are recorded, and the prediction results for future multiple steps and the updated model hidden states are output and cached in chronological order.

[0106] This invention integrates low-frequency metering channel sampling data with total harmonic distortion (THD) and zonal harmonic energy as exogenous inputs to construct an improved structured state-space sequence model with time-varying state transition capabilities, gating modulation capabilities, and multi-task output capabilities. This enables joint modeling of harmonic state changes and power usage trends. The harmonic state transition module dynamically adjusts state transition parameters based on the exogenous input, making the model adaptive to different operating conditions and harmonic characteristics. The harmonic gating decoding module adjusts the latent state contribution according to the importance of harmonic features, effectively suppressing irrelevant or noise interference. The multi-task output module improves the accuracy and stability of short-term and medium-to-long-term predictions by jointly predicting the results of multiple time steps. The recording of gating coefficients, state transition parameters, and exogenous input mapping parameters provides interpretability support for subsequent analysis, improving the prediction model's accuracy in characterizing harmonic time series features and its adaptability to non-stationary signals, achieving high-precision, multi-step, and interpretable harmonic trend prediction.

[0107] In this embodiment, the gating fusion of the rotating harmonic state sequence and the model's latent state, the imposition of temporal and frequency domain consistency constraints on future multi-step prediction results, and the generation of a search space that defines the harmonic parameter set by the prior range of harmonic frequency and the prior range of harmonic amplitude include:

[0108] The generated gating coefficients are used to perform element-wise weighted fusion of the model's hidden states to form a gated fused hidden state representation.

[0109] The current prediction sequence is extracted from the multi-step prediction results in the future. At the same time, the corresponding harmonic amplitude, harmonic frequency and harmonic phase parameters are extracted from the rotating harmonic state sequence at the current moment. The reference current sequence is synthesized in the time domain, and the sum of the squared differences between the current prediction sequence and the reference current sequence in multiple future time steps is calculated to obtain the time domain consistency constraint.

[0110] Discrete Fourier transforms are performed on the current prediction sequence and the reference current sequence respectively to obtain the prediction spectrum and the reference spectrum. Within the frequency neighborhood range centered on each target harmonic frequency and determined by the preset frequency neighborhood width, the sum of the absolute values ​​of the differences between the prediction spectrum and the reference spectrum is calculated to obtain the frequency domain consistency constraint, where the frequency neighborhood width is a preset positive numerical parameter.

[0111] Based on the gated fusion hidden state representation, harmonic frequency prior values ​​and harmonic amplitude prior values ​​are generated, and a center value and positive and negative range are set for each harmonic frequency prior value and harmonic amplitude prior value to form frequency prior interval and amplitude prior interval, thus limiting the search space of the harmonic parameter set;

[0112] The gating coefficients, gating fusion hidden state representations, time-domain consistency constraints, frequency-domain consistency constraints, frequency prior intervals, and amplitude prior intervals are recorded and saved together with the future multi-step prediction results.

[0113] This invention achieves multi-dimensional precise constraints and search space optimization for prediction results by introducing dual consistency constraints in the time and frequency domains, combined with prior intervals for harmonic parameters generated by gated fusion hidden states. The gated fusion hidden state representation fully utilizes gating coefficients at the feature level to weight and strengthen useful information and suppress irrelevant features, enhancing the hidden state's ability to express harmonic dynamics. The time-domain consistency constraint ensures a high degree of matching between the predicted current sequence and the reference waveform synthesized from harmonic parameters in terms of time waveform, contributing to improved waveform fidelity. The frequency-domain consistency constraint performs local frequency neighborhood matching between the prediction and the reference in terms of spectral structure, effectively suppressing frequency drift and harmonic energy distribution deviations. Utilizing prior intervals for harmonic frequencies and amplitudes generated by hidden states to limit the search range not only narrows the solution space for subsequent parameter estimation and reduces invalid computations but also significantly accelerates convergence and improves the stability of global optimization. This invention balances prediction accuracy with computational efficiency and model robustness, enhancing the reliability and interpretability of harmonic analysis and prediction.

[0114] In this embodiment, the step of calculating the prediction error based on the multi-step prediction results and the actual measurement sequence, combining time-domain consistency constraints and frequency-domain consistency constraints, as well as the rotating harmonic state sequence and the model's hidden state, constructing a joint optimization objective, performing end-to-end training, and solidifying the structured state-space sequence model structure and fusion layer parameters includes:

[0115] Based on the multi-step prediction results and the actual measurement sequence, the prediction error is calculated. Combining time-domain consistency constraints, frequency-domain consistency constraints, rotating harmonic state sequence constraints, and model hidden state constraints, a joint optimization objective function is constructed. :

[0116] ;

[0117] in, These are the weighting coefficients. For prediction error, For time-domain consistency constraints, For frequency domain consistency constraints, It serves as a comprehensive measure of rotating harmonic state sequence constraints and model hidden state constraints;

[0118] The joint optimization objective function is solved iteratively using a gradient-based optimization algorithm, and the parameters of the structured state-space sequence model are updated in each iteration.

[0119] When the joint optimization process reaches the convergence condition or the preset upper limit of the number of iterations, the parameters of the final optimized structured state-space sequence model are output.

[0120] In this embodiment, the step of deploying the structured state-space sequence model to the monitoring platform, generating electricity usage trend prediction results, harmonic index change trends and uncertainty parameters, comparing them with preset safety thresholds, triggering prompts and warnings when limits are exceeded, and outputting them to the visualization terminal includes:

[0121] The solidified structured state-space sequence model is deployed to the monitoring platform, which receives real-time sampling data from the low-frequency metering channel and high-frequency harmonic channel from the acquisition and preprocessing module, and generates a sequence of electricity usage trend prediction results for the corresponding time period. ,in, For the predicted first Step active power value;

[0122] The trend of harmonic index changes was calculated based on the electricity usage trend prediction result sequence, where the total harmonic distortion rate was... :

[0123] ;

[0124] in, For the predicted first RMS value of subharmonic voltage This is the effective value of the fundamental voltage. This represents the upper limit of the harmonic order.

[0125] Calculate the uncertainty parameters in the prediction results :

[0126] ;

[0127] in, For the first Second sampled predicted value, The sample mean of the predicted values ​​from M samplings. Number of samples;

[0128] Combine the electricity usage trend forecast results, harmonic index change trends, and uncertainty parameters with the preset safety threshold. , , Compare them separately, and when there is... or or When the prediction step is completed, a prompt and warning mechanism is triggered.

[0129] The triggered prompts and warnings will be output through a visual terminal, including the predicted time period, predicted value, threshold, type and level of exceeding limits, and the corresponding data will be recorded in the monitoring platform database.

[0130] refer to Figure 2 A power usage status reminder and safety warning monitoring system, comprising the following modules:

[0131] The acquisition and preprocessing module is used to acquire sampling data from the low-frequency metering channel and the high-frequency harmonic channel, and to preprocess the sampling data from the high-frequency harmonic channel to generate a high-frequency harmonic analysis window signal.

[0132] The harmonic parameter module is used to perform parametric spectrum estimation based on the high-frequency harmonic analysis window signal and to filter effective harmonic components.

[0133] The state sequence construction module is used to generate a rotating harmonic state sequence based on the harmonic parameter set, perform time smoothing on adjacent analysis windows, and calculate the total harmonic distortion and zonal harmonic energy.

[0134] The state-space modeling module is used to build an improved structured state-space sequence model and output the prediction results for future multiple steps and the model's hidden states.

[0135] The fusion constraint module is used to gating the fusion of the rotating harmonic state sequence and the model's hidden state, and to apply time-domain consistency and frequency-domain consistency constraints to the future multi-step prediction results.

[0136] The joint optimization module is used to calculate the prediction error based on the future multi-step prediction results and the actual measurement sequence, construct the joint optimization objective, and solidify the structured state-space sequence model structure and fusion layer parameters.

[0137] The monitoring and early warning module is used to deploy the structured state-space sequence model to the monitoring platform, trigger prompts and early warnings, and output them to the visualization terminal.

[0138] Example 1:

[0139] To verify the feasibility of this invention in practice, it was applied to power distribution room A in an industrial park. The park's typical load consists of multiple CNC machine tools, injection molding machines, and two high-power variable frequency calendering machines. Load fluctuations are significant during weekday morning and evening peak hours, and the start-up and shutdown of high-frequency electrical equipment leads to an increase in harmonic levels. Previously, the traditional single-channel time-series forecasting method used in the park could only extrapolate load trends based on low-frequency metering data, failing to detect rapid changes in harmonic components in a timely manner. This often resulted in large prediction errors in total harmonic distortion (THD), delayed warnings, and even missed warnings, especially during production switching periods on Wednesday and Friday afternoons, when harmonic exceedance events were more concentrated. To address this pain point, this invention, based on low-frequency metering channel sampling data and high-frequency harmonic channel sampling data, constructs a complete process from harmonic parameterized spectrum estimation to rotating harmonic state sequences, and then to an improved structured state-space sequence model. This aims to accurately capture the time-varying characteristics of harmonics and issue early risk warnings while ensuring the accuracy of power trend prediction.

[0140] In the field deployment, the low-frequency metering channel samples at 1Hz to acquire the RMS values ​​of voltage, current, active power, reactive power, and power factor. The high-frequency harmonic channel samples at 5120Hz to acquire the raw waveforms of voltage and current. After denoising, DC removal, bandpass, and windowing preprocessing, a high-frequency harmonic analysis window signal is formed. The parameterized spectrum estimation process outputs a set of harmonic parameters including harmonic order, harmonic frequency, harmonic amplitude, and harmonic phase. To avoid noise interference, components with amplitudes lower than 0.05% of the fundamental amplitude are removed. Smoothing is performed using time-adjacent windows to obtain the rotating harmonic state sequence, and the total harmonic distortion and zonal harmonic energy are calculated. These two types of harmonic indicators and the low-frequency metering channel sampling data serve as exogenous inputs, jointly driving the improved structured state-space sequence model. In the gating fusion, the model weightedly integrates the rotating harmonic state sequence with the model's hidden state, simultaneously generating predicted values ​​of multi-step power trends and harmonic indicators for the next 30 minutes on the output side, and providing uncertainty parameters for threshold comparison and graded early warning.

[0141] To verify the beneficial effects, historical data from March to May 2025 was used for training, and data from June was used for online validation. The comparison caliber was a traditional LSTM baseline model with the same site, period, and sampling configuration. Evaluation metrics included THD prediction error (absolute error, in %), power trend prediction error (MAPE, in %), and the lead time and accuracy of early warning triggering.

[0142] Table 1 Summary of Monitoring and Forecast Samples for Site A in Industrial Park (June 2025)

[0143]

[0144] As shown in Table 1, the proposed method demonstrates stable prediction accuracy for Total Harmonic Distortion (THD) and electricity consumption across different dates and time periods. For example, on June 5, 2025, from 08:00 to 08:30, the actual THD was 4.6%, while the predicted value was 4.5%. The proposed method exhibited a THD error of only 0.1% and an MAPE (Mean Absolute Percentage Error) of 0.6%, without triggering any warnings. Similarly, under various operating conditions, such as June 7 and June 15, the THD error was consistently kept below 0.1%, and the MAPE was below 0.6%, indicating that the model possesses high prediction accuracy and stability within the normal load range.

[0145] During two high-load periods (1450kW and 1600kW) on June 12th (14:00–14:30) and June 18th (15:30–16:00), the actual THD reached 5.1% and 6.3% respectively, both exceeding the safety threshold, thus triggering a warning. Despite this, the THD error of this method under high-load conditions remained between 0.1% and 0.2%, and the MAPE was controlled within 1.0%, demonstrating strong predictive robustness even under extreme operating conditions.

[0146] Overall, out of the eight data sets, six were in a non-warning state, with prediction errors remaining at an extremely low level. In the two sets of records that triggered warnings, the deviation between the prediction results and the actual values ​​was also very small. This fully demonstrates that the method can maintain high-precision prediction even under uncertain environments and can trigger harmonic anomaly alarms in a timely manner. This helps to carry out early intervention for power safety and is not only suitable for daily power quality monitoring, but also has practical value in peak load and harmonic anomaly scenarios.

[0147] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for monitoring and alerting battery usage and providing safety warnings, characterized in that, include: Collect sampling data from the low-frequency metering channel and the high-frequency harmonic channel. Preprocess the high-frequency harmonic channel sampling data to obtain the high-frequency harmonic analysis window signal. Based on the high-frequency harmonic analysis window signal, parameterized spectrum estimation is performed to obtain a set of harmonic parameters including harmonic order, harmonic frequency, harmonic amplitude, and harmonic phase, and effective harmonic components are screened. A rotating harmonic state sequence is constructed based on the harmonic parameter set. Time smoothing is performed on adjacent analysis windows to calculate total harmonic distortion and zonal harmonic energy. Using low-frequency metering channel sampling data, total harmonic distortion (THD), and zone-specific harmonic energy as exogenous inputs, an improved structured state-space sequence model is constructed. This improved model includes a harmonic state transition module, a harmonic gating decoding module, and a multi-task output module. In the harmonic state transition module, time-varying state transition parameters and exogenous input mapping parameters are generated using the exogenous input vector and the model's initial hidden state as variables to update the model's hidden state. In the harmonic gating decoding module, the updated model hidden state is concatenated with the THD and zone-specific harmonic energy feature vectors and input to a gating function to generate gating coefficients. Based on these gating coefficients, the updated model hidden state is gated and modulated to obtain a gated and modulated hidden state representation. In the multi-task output module, the hidden state representation and the exogenous input vector are processed together to generate multi-step prediction results. The predicted values ​​for each prediction time step are output, along with the multi-step prediction results and the model's hidden state. Gated fusion of rotating harmonic state sequences and model latent states is performed, time-domain consistency constraints and frequency-domain consistency constraints are applied to future multi-step prediction results, and a search space is generated that limits the harmonic parameter set by the prior range of harmonic frequency and the prior range of harmonic amplitude. Based on the prediction results of future multi-step predictions and the actual measurement sequence, the prediction error is calculated. Combining the time domain consistency constraints and frequency domain consistency constraints, as well as the rotating harmonic state sequence and the model hidden state, a joint optimization objective is constructed. End-to-end training is performed and the structured state space sequence model structure and fusion layer parameters are solidified. The structured state-space sequence model is deployed to the monitoring platform to generate power consumption trend prediction results, harmonic index change trends and uncertainty parameters, and compare them with preset safety thresholds. When the limit is exceeded, prompts and warnings are triggered and output to the visualization terminal.

2. The method for monitoring and alerting power usage status and providing safety warnings according to claim 1, characterized in that, The low-frequency metering channel sampling data specifically includes the effective value of voltage, the effective value of current, active power, reactive power, and power factor. The high-frequency harmonic channel sampling data specifically includes the voltage waveform, current waveform, and spectral components sampled at high frequencies. The low-frequency sampling frequency is 1Hz to 5Hz, and the high-frequency sampling frequency is 5kHz to 20kHz.

3. The method for monitoring and alerting power usage status and providing safety warnings according to claim 1, characterized in that, The preprocessing of the high-frequency harmonic channel sampling data to obtain the high-frequency harmonic analysis window signal specifically refers to sequentially performing noise reduction, DC component removal, bandpass filtering, and segmentation and windowing processing on the high-frequency harmonic channel sampling data according to the set window length.

4. The method for monitoring and alerting power usage status and providing safety warnings according to claim 1, characterized in that, The parameterized spectrum estimation based on the high-frequency harmonic analysis window signal is performed to obtain a set of harmonic parameters including harmonic order, harmonic frequency, harmonic amplitude, and harmonic phase, and to filter effective harmonic components, including: The high-frequency harmonic analysis window signal is decomposed in the frequency domain to extract the candidate harmonic components. The harmonic order, harmonic frequency, harmonic amplitude and harmonic phase of each candidate harmonic component are calculated to form the first set of harmonic parameters. The trend change information in the low-frequency metering channel sampling data is coupled across channels with the high-frequency harmonic component set composed of harmonic components in the first harmonic parameter set. The frequency and amplitude of the high-frequency harmonic components are offset and corrected by the trend change information to obtain the corrected second harmonic parameter set. While generating the second set of harmonic parameters, the changing trend of harmonic parameters in adjacent historical analysis windows is analyzed, and the initial values ​​of harmonic parameters in the current analysis window are predicted. The prediction results are used as the initial values ​​of the second set of harmonic parameters, which narrows the parameter search range and speeds up the estimation convergence. Iterative optimization is performed using the predicted and initialized set of second harmonic parameters to make fine estimates of the harmonic order, harmonic frequency, harmonic amplitude, and harmonic phase of each harmonic component. For each harmonic component in the iteratively optimized second harmonic parameter set, a comprehensive confidence index based on signal-to-noise ratio, spectral fitting residual, and consistency of temporal smoothing between adjacent windows is calculated. The effective harmonic components that meet the confidence threshold are dynamically selected, and low-confidence or abnormal harmonic components are removed to obtain the third harmonic parameter set. The third harmonic parameter set is then output as the final effective harmonic parameter set.

5. The method for monitoring and alerting power usage as claimed in claim 1, characterized in that, The process involves constructing a rotating harmonic state sequence based on a set of harmonic parameters, performing time smoothing on adjacent analysis windows, and calculating total harmonic distortion and zonal harmonic energy, including: Based on the set of harmonic parameters, the harmonic order, harmonic frequency, harmonic amplitude and harmonic phase of each harmonic component are arranged in chronological order to generate a rotating harmonic state sequence corresponding to the analysis window. The rotating harmonic state sequences are then sequentially spliced ​​to obtain a set of rotating harmonic state sequences covering the target time range. In the set of rotating harmonic state sequences, time smoothing is performed on the rotating harmonic state sequences between adjacent analysis windows to generate smoothed rotating harmonic state sequences; Total harmonic distortion (THD) is calculated based on a smoothed rotating harmonic state sequence. The THD is generated by using the fundamental amplitude as the denominator and the square root of the sum of the squares of the amplitudes of each harmonic as the numerator. Based on the smoothed rotating harmonic state sequence, the harmonic components are divided into zones according to the harmonic order range, generating a harmonic amplitude sequence corresponding to each zone. The zone harmonic energy is calculated based on the harmonic amplitude sequence. The zone harmonic energy is generated by summing the squares of the harmonic amplitudes within each zone. The total harmonic distortion and the zone harmonic energy are recorded in time series.

6. The method for monitoring and alerting power usage as claimed in claim 1, characterized in that, The method uses low-frequency metering channel sampling data, total harmonic distortion, and zonal harmonic energy as exogenous inputs to construct an improved structured state-space sequence model, outputting future multi-step prediction results and model hidden states, including: Based on low-frequency metering channel sampling data and total harmonic distortion (THD) and band harmonic energy as exogenous inputs, the exogenous input vector is composed of the low-frequency metering channel sampling data and THD and band harmonic energy at the corresponding time steps. The initial hidden state of the model is calculated by the feature vector of the low-frequency metering channel sampling data at the first analysis time step and the THD and band harmonic energy at the corresponding time step through the initial state mapping unit. An improved structured state space sequence model is constructed. The improved structured state space sequence model includes a harmonic state transition module, a harmonic gating decoding module, and a multi-task output module, which outputs the prediction results of future multiple steps and the updated model hidden state, and caches them in time order.

7. The method for monitoring and alerting power usage as claimed in claim 1, characterized in that, The process of gating and fusing the rotating harmonic state sequence with the model's latent states, applying time-domain and frequency-domain consistency constraints to the future multi-step prediction results, and generating a search space that defines the harmonic parameter set by the prior ranges of harmonic frequency and amplitude includes: The generated gating coefficients are used to perform element-wise weighted fusion of the model's hidden states to form a gated fused hidden state representation. The current prediction sequence is extracted from the multi-step prediction results in the future. At the same time, the corresponding harmonic amplitude, harmonic frequency and harmonic phase parameters are extracted from the rotating harmonic state sequence at the current moment. The reference current sequence is synthesized in the time domain, and the sum of the squared differences between the current prediction sequence and the reference current sequence in multiple future time steps is calculated to obtain the time domain consistency constraint. Discrete Fourier transforms are performed on the current prediction sequence and the reference current sequence respectively to obtain the prediction spectrum and the reference spectrum. Within the frequency neighborhood range centered on each target harmonic frequency and determined by the preset frequency neighborhood width, the sum of the absolute values ​​of the differences between the prediction spectrum and the reference spectrum is calculated to obtain the frequency domain consistency constraint. Based on the gated fusion hidden state representation, harmonic frequency prior values ​​and harmonic amplitude prior values ​​are generated, and a center value and positive and negative range are set for each harmonic frequency prior value and harmonic amplitude prior value to form frequency prior interval and amplitude prior interval, thus limiting the search space of the harmonic parameter set; The gating coefficients, gating fusion hidden state representations, time-domain consistency constraints, frequency-domain consistency constraints, frequency prior intervals, and amplitude prior intervals are recorded and saved together with the future multi-step prediction results.

8. A power usage status reminder and safety warning monitoring system, used to implement the power usage status reminder and safety warning monitoring method according to any one of claims 1 to 7, characterized in that, Includes the following modules: The acquisition and preprocessing module is used to acquire sampling data from the low-frequency metering channel and the high-frequency harmonic channel, and to preprocess the sampling data from the high-frequency harmonic channel to generate a high-frequency harmonic analysis window signal. The harmonic parameter module is used to perform parametric spectrum estimation based on the high-frequency harmonic analysis window signal and to filter effective harmonic components. The state sequence construction module is used to generate a rotating harmonic state sequence based on the harmonic parameter set, perform time smoothing on adjacent analysis windows, and calculate the total harmonic distortion and zonal harmonic energy. The state-space modeling module is used to build an improved structured state-space sequence model and output the prediction results for future multiple steps and the model's hidden states. The fusion constraint module is used to gating the fusion of the rotating harmonic state sequence and the model's hidden state, and to apply time-domain consistency and frequency-domain consistency constraints to the future multi-step prediction results. The joint optimization module is used to calculate the prediction error based on the future multi-step prediction results and the actual measurement sequence, construct the joint optimization objective, and solidify the structured state-space sequence model structure and fusion layer parameters. The monitoring and early warning module is used to deploy the structured state-space sequence model to the monitoring platform, trigger prompts and early warnings, and output them to the visualization terminal.

Citation Information

Patent Citations

  • Time series data trend prediction method, system and related device

    CN113761022A

  • Multi-dimensional time sequence photovoltaic grid-connected harmonic current prediction control method

    CN119496136A