An emergency power car electric quantity metering adaptive harmonic compensation method
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BAICHENG POWER SUPPLY CO OF STATE GRID JILIN ELECTRIC POWER CO LTD
- Filing Date
- 2026-07-03
- Publication Date
- 2026-08-04
AI Technical Summary
[0006]本发明要解决的技术问题是:在应急发电车接入、退出或带载切换形成的非稳定计量过程中,存在真实负荷阶跃与多源扰动引起的计量失真问题,以及异常暂态样本对长期补偿参数及累计电量连续性造成的干扰问题,为此我们提出一种应急发电车电量计量自适应谐波补偿方法
[0022] In this invention, voltage, current, frequency, phase, harmonic components, electrical quantity measurement data, temperature change, vibration disturbance status, and target operating condition status within a continuous metering window are synchronized inputs, reducing misjudgments of unstable power supply metering states by a single electrical parameter. The electrical parameter mutation index and disturbance synchronization index jointly characterize the mutation intensity and the synchronization relationship of multi-source disturbances, providing a discernible window basis for distinguishing between actual load changes and metering disturbances.
Smart Images

Figure CN122512434A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power metering technology, and in particular to an adaptive harmonic compensation method for power metering of emergency power generation vehicles. Background Technology
[0002] Emergency power generation vehicles are commonly used for temporary power supply, emergency repair power supply, and emergency disaster relief power supply scenarios. Their output side is typically equipped with voltage sampling, current sampling, frequency detection, phase detection, harmonic analysis, and cumulative power metering functions to obtain active power, reactive power, and cumulative power during emergency power supply. Existing power metering technologies generally acquire electrical parameters through voltage transformers, current transformers, metering chips, and data acquisition devices, and correct metering deviations using harmonic analysis, frequency tracking, phase compensation, temperature compensation, and error calibration. For fixed power grids, electricity meters, charging equipment, or grid-connected power supply scenarios, existing solutions often establish error analysis models based on steady-state voltage and current waveforms, harmonic content, DC components, interharmonic components, transformer ratio and angle differences, and ambient temperature changes, and then correct the metering results based on test points, compensation functions, or fitting models. For emergency power generation vehicle scenarios, existing technologies also collect the generator vehicle's voltage, frequency, and phase to meet power supply matching needs during connection, disconnection, and load operation.
[0003] The main problem with the existing technology used for metering the electricity of emergency power generation vehicles is not the inability to collect voltage, current, frequency, phase, and harmonic components, but rather that connection, disconnection, and load switching are unstable power supply processes, and changes in electrical parameters do not all correspond to the same metering meaning. When an emergency power generation vehicle connects to a load, voltage, frequency, phase, and harmonic components may fluctuate synchronously; when disconnecting from power supply, power release, contactor operation, and residual electrical parameter attenuation may cause short-term sampling deviations; during load switching, current and power steps may be actual load changes, or they may be superimposed with harmonic distortion, frequency fluctuations, phase shifts, temperature drift, and vibration disturbances, resulting in metering distortion. If the existing technology only processes the data according to steady-state harmonic compensation, frequency compensation, or temperature compensation, it is easy to treat actual load changes as a weakening of abnormal disturbances, and it is also easy to treat transient disturbances during switching as effective electricity accumulation. This leads to a lack of consistent criteria between the original electricity, compensated electricity, and collected electricity in emergency power supply tasks, thus affecting the accuracy of temporary power supply electricity collection.
[0004] CN120028596A discloses a grid-side power metering method and device that considers interharmonic components. It acquires grid-side voltage and current data, constructs a steady-state signal model to extract voltage and current waveforms, and uses a univariate linear regression method to compensate for the amplitude and phase of harmonic and interharmonic signals. The measured power is then corrected based on the fundamental energy, harmonic energy, and interharmonic energy. This document focuses on the impact of high-frequency harmonics and interharmonics on grid-side power measurement in new energy grid-connected scenarios, and can improve power correction capabilities for harmonic and interharmonic components. However, it only addresses component correction after modeling the grid-side steady-state or quasi-steady-state waveforms. It does not distinguish between the actual load step and transient disturbances during emergency generator connection, disconnection, and load switching, nor does it consider the impact of temperature drift and vibration disturbances occurring simultaneously with sudden changes in electrical parameters on temporary power collection.
[0005] CN113589216A discloses a method, device, and system for compensating for electricity meter errors based on DC and even harmonics. It obtains metering error data corresponding to different current test points by setting the error compensation current range and multiple current test points for the electricity meter under test. Based on the metering error data, it derives the relationship function between current and error and sets the error compensation strategy for the electricity meter accordingly. This document addresses the metering errors caused by transformer saturation, ratio difference, and angle difference changes under DC and even harmonic operating conditions, and can solve the error control problem of electricity meters under specific harmonic conditions. However, its compensation logic relies on the current range, test points, and error relationship function, primarily focusing on the metering accuracy of the electricity meter itself under DC and even harmonic operating conditions. It does not handle transient distortions caused by the alternating connection, disconnection, and load switching states during unstable power supply from emergency generators, nor does it provide a basis for distinguishing between actual load changes and metering disturbances. Summary of the Invention
[0006] The technical problem to be solved by this invention is that in the unstable metering process formed by the access, exit or load switching of emergency power generation vehicles, there is a metering distortion problem caused by real load step and multi-source disturbance, as well as the interference of abnormal transient samples on long-term compensation parameters and the continuity of cumulative power. To this end, we propose an adaptive harmonic compensation method for power metering of emergency power generation vehicles.
[0007] To achieve the above objectives, this application adopts the following technical solution: an adaptive harmonic compensation method for power metering of emergency generator vehicles, using a continuous metering window as the basic processing unit. First, it acquires the voltage, current, frequency, phase, harmonic components, and power metering data of the output side of the emergency generator vehicle. Simultaneously, it acquires the temperature change, vibration disturbance status, and target operating condition status. The target operating condition status is derived from the access status, exit status, and load switching status, and is used to constrain the subsequent window determination of the operating stage.
[0008] Within each continuous metering window, an electrical parameter mutation index is generated based on voltage, current, and power changes calculated from voltage and current. Then, using the peak value of the electrical parameter mutation as a time reference, it is determined whether harmonic disturbances, frequency disturbances, phase disturbances, temperature disturbances, and vibration disturbances occur synchronously with the mutation. The number of disturbance categories that meet the synchronization conditions is counted to obtain a disturbance synchronization index. After this processing, a simple current step will not be directly considered as an error window, and multi-source disturbances occurring synchronously with electrical parameter mutations can be identified individually.
[0009] Within the metering window corresponding to the target operating condition, if the electrical parameter mutation index reaches the first adaptive threshold and the disturbance synchronization index reaches the preset number of disturbance synchronization categories, the current metering window is determined as the metering error window; if the electrical parameter mutation index reaches the first adaptive threshold but the disturbance synchronization index does not reach the preset number of disturbance synchronization categories, the current metering window is determined as the real load tracking window; if the electrical parameter mutation index does not reach the first adaptive threshold, the current metering window is determined as the stable metering window.
[0010] Once the window type is determined, the method no longer uses the same compensation rule to process all windows. In the real load tracking window, the load step integral contribution is retained; in the metering error window, transient filtering compensation is performed and metering compensation is generated; the stable metering window is used for steady-state metering, threshold update candidates, and subsequent continuity verification. For metering error window samples, their update weight on long-term compensation parameters is reduced based on the disturbance synchronization index; when the disturbance synchronization index meets the preset strong disturbance condition, the update weight is reset to zero to prevent strong disturbance windows from changing the long-term compensation benchmark.
[0011] When a stable metering window is detected after the metering error window, the metering compensation amount of the previous metering error window is written back and corrected using the compensation residual and the continuity of the cumulative energy. The filter strength and window state confidence are adjusted synchronously based on the write-back residual. After the write-back correction is completed, the compensated active energy, reactive energy, and cumulative energy are output.
[0012] Preferably, in one implementation, the electrical parameter mutation index and the disturbance synchronization index are generated as follows: ; ; ;
[0013] in, For the first The electrical parameter mutation index for each metering window , , The first The effective values of voltage, current, and active power within each metering window. , , These are the voltage, current, and active power fluctuation benchmarks within the historical stable metering window, respectively. To prevent positive numbers with a denominator of zero; For the first The first measurement window Synchronous disturbance state of perturbation. For the first The moment when the electrical parameter abruptly peaks within a metering window. For the first When does the perturbation peak occur? To synchronize the determination of the time scale, For the first Normalized perturbation amplitude of the perturbation type For the corresponding perturbation threshold, , , , , These represent harmonic disturbances, frequency disturbances, phase disturbances, temperature disturbances, and vibration disturbances, respectively. For the first Disturbance synchronization index for each measurement window This is an indicator function; when the condition inside the parentheses is true, The value is 1 if it is not 1, otherwise the value is 0.
[0014] Furthermore, the first adaptive threshold is generated based on the mean, standard deviation, and quantile of the electrical parameter mutation index within the historical stable metering window, and is updated when the number of continuous stable metering windows reaches the preset update number. The number of preset disturbance synchronization categories is configured according to the target operating condition; the number of preset disturbance synchronization categories corresponding to the access and exit states is not less than 2, and the number of preset disturbance synchronization categories corresponding to the load switching state is not less than 3. The preset strong disturbance condition is determined to be met when the disturbance synchronization index is not less than the strong disturbance threshold and the vibration disturbance state is not less than the vibration impact threshold.
[0015] Specifically, the metering processing paths include a transient filtering compensation path, a real load tracking path, and a steady-state metering compensation path. The metering error window enters the transient filtering compensation path, the real load tracking window enters the real load tracking path, and the stable metering window enters the steady-state metering compensation path. In the real load tracking path, the load step integral contribution is determined by the current step amplitude, the power step amplitude, and the window duration; no transient suppression is performed on this contribution. Only local metering error compensation is applied to the harmonic components, frequency deviations, and phase shifts present within this path.
[0016] Furthermore, in the transient filtering compensation path, based on the degree of deviation of the sampling points within the metering error window from the power trend of adjacent stable metering windows, abnormal sampling points are marked and their weight in the energy integral is reduced; when the deviation reaches the replacement threshold, a replacement value is generated based on the power trends of adjacent sampling points, adjacent stable metering windows, and dynamic error estimation results. The metering compensation quantities include harmonic compensation components, frequency phase compensation components, temperature drift compensation components, and vibration confidence correction components.
[0017] Preferably, the long-term compensation parameters include harmonic compensation coefficient, frequency phase compensation coefficient, temperature drift compensation coefficient, sampling reliability parameter, and filter intensity parameter. The stable metering window samples correspond to the first update weight, the actual load tracking window samples correspond to the second update weight, and the metering error window samples correspond to the third update weight; the third update weight is less than the second update weight, and the second update weight is not greater than the first update weight.
[0018] When the The first metering window is the metering error window, and when a stable metering window is subsequently detected, the second stable metering window is determined based on the power trend of adjacent stable metering windows. The reference electricity consumption for each metering window is written back and corrected as follows: ; ;
[0019] in, To write back the residual, For the first The electricity quantity after transient filtering compensation for each metering error window. The reference energy quantity is determined based on the power trend of adjacent stable metering windows. To write back the corrected output power, The write-back factor is determined based on the continuity of accumulated electricity and the reliability of adjacent stable metering windows.
[0020] Furthermore, a dynamic error estimation model is used to generate dynamic error estimation results, and outputs metering compensation, power trend estimates, and reference power quantities based on these results. The model's inputs include harmonic state, frequency phase state, environmental disturbance state, window type, and historical compensation residuals. The model structure can employ a state-space model, a Kalman filter model, a recursive least squares model, a long short-term memory network, or a gated recurrent unit network.
[0021] The technical effects and advantages of this invention are as follows:
[0022] In this invention, voltage, current, frequency, phase, harmonic components, electrical quantity measurement data, temperature change, vibration disturbance status, and target operating condition status within a continuous metering window are synchronized inputs, reducing misjudgments of unstable power supply metering states by a single electrical parameter. The electrical parameter mutation index and disturbance synchronization index jointly characterize the mutation intensity and the synchronization relationship of multi-source disturbances, providing a discernible window basis for distinguishing between actual load changes and metering disturbances.
[0023] The three-window path processing retains the load step integral contribution in the actual load tracking window and performs transient filtering compensation on the metering error window, reducing the probability of the actual load step being falsely suppressed and the switching transient disturbances being falsely accumulated. Reducing or freezing the update weights of long-term compensation parameters in the metering error window can reduce the impact of abnormal transient samples on the compensation benchmark.
[0024] After subsequent stable metering windows participate in write-back corrections, the compensation residuals and cumulative power continuity are used to verify the output results of the previous metering error window, making it less likely for short-term compensation deviations to continue to propagate into the cumulative power. Overall, this invention improves the accuracy and stability of power metering during unstable power supply phases of emergency power generation vehicles. Attached Figure Description
[0025] The disclosure of this invention is illustrated with reference to the accompanying drawings. It should be understood that the drawings are for illustrative purposes only and are not intended to limit the scope of protection of this invention. In the drawings, the same reference numerals are used to refer to the same parts:
[0026] Figure 1 This is a flowchart of the method of the present invention;
[0027] Figure 2 This is a schematic diagram of the normalized disturbance index and measurement window division of the present invention;
[0028] Figure 3 This is a diagram illustrating the window path processing of the present invention. Detailed Implementation
[0029] It is readily understood that, based on the technical solution of this invention, those skilled in the art can propose various interchangeable structural methods and implementations without altering the essential spirit of the invention. Therefore, the following detailed embodiments and accompanying drawings are merely illustrative examples of the technical solution of this invention and should not be considered as the entirety of the invention or as limitations or restrictions on the technical solution of this invention.
[0030] This implementation method is used for power metering on the output side of an emergency power generation vehicle. Voltage and current sampling channels can be installed at the output end of the emergency power generation vehicle on-site. Temperature sampling points can be installed near the metering box, current transformer, or sampling circuit. Vibration sampling points can be installed at fixed locations on the vehicle chassis, metering box, or sampling circuit. Switch status, contactor operation signals, disconnection commands, load switching commands, and branch switching signals are used as auxiliary sources for the target operating condition status.
[0031] Voltage and current sampling data are used to calculate frequency, phase, harmonic components, active power, reactive power, active energy, reactive energy, and cumulative energy. Frequency and phase can be determined from the period, zero-crossing point, or phase-locked loop results of the fundamental component; harmonic components can be obtained from discrete Fourier analysis or equivalent harmonic analysis. Temperature changes are used to characterize the temperature drift near the metering loop, transformer, or sampling circuit, while vibration disturbances characterize the impact of vehicle operating vibrations on the sampling connection, transformer installation status, and metering loop contact status.
[0032] Furthermore, the continuous power supply process is divided into multiple metering windows. Window length is Each measurement window contains There are sampling points, with a sampling interval of . ,in It is a positive integer. Greater than 0. Each sampling channel is grouped into the same measurement window according to its timestamp. When the temperature sampling period is longer than the electrical parameter sampling period, the most recent valid temperature value can be held or adjacent temperature values can be linearly interpolated. When the vibration sampling frequency is higher than the electrical parameter sampling frequency, the root mean square value, peak value, or peak-to-peak value of the vibration within the window can be used as the vibration disturbance state. If a measurement window has a short-term missing sample value, adjacent valid sample values can be used for interpolation. If the continuous missing values exceed a preset missing ratio, the measurement window is marked as an incomplete data window and its participation in long-term compensation parameter updates is stopped.
[0033] like Figure 1 As shown, the method first acquires the basic data and target operating condition status within the continuous metering window. For the first... metering window The system acquires voltage, current, frequency, phase, harmonic components, and power metering data from the output side of the emergency generator vehicle, while also acquiring temperature changes, vibration disturbance status, and target operating conditions. The connection status can be determined by the connection command, output switch closing signal, contactor action signal, synchronization completion signal, and the trend of output current or power changing from a low value to a load value. The exit status can be determined by the exit command, output switch opening signal, contactor release signal, and the trend of output power decreasing towards zero power. The load switching status can be determined by the load switching command, branch switching signal, and a step change in the effective value of current or active power within the continuous metering window.
[0034] If multiple target operating conditions are simultaneously met within the same metering window, the target operating condition can be determined in the order of access status, exit status, and load switching status, or the main operating condition can be determined by combining actual control records. The target operating condition does not depend solely on switching quantities or changes in electrical parameters.
[0035] Subsequently, electrical parameter mutation indices and disturbance synchronization indices are generated. For the first... Each metering window calculates the effective voltage value. RMS value of current and average active power Based on voltage, current, and active power fluctuation benchmarks within historical stable metering windows, electrical parameter mutation indices are generated. ; ;
[0036] in, For the first The electrical parameter mutation index for each metering window , , The first The effective values of voltage, current, and active power within each metering window. , , These are the voltage, current, and active power fluctuation benchmarks within the historical stable metering window, respectively. It is a positive number.
[0037] In the measurement window Within a given timeframe, the sampling moment when the rate of change of voltage, current, or active power reaches its maximum value can be used as the moment when the electrical parameter abruptly peaks. The peak occurrence times of harmonic disturbances, frequency disturbances, phase disturbances, temperature disturbances, and vibration disturbances were determined respectively. And calculate the normalized perturbation amplitude. ; ; ;
[0038] in, For the first Synchronous disturbance state of perturbation. To synchronize the determination of the time scale, For the corresponding perturbation threshold, , , , , These represent harmonic disturbances, frequency disturbances, phase disturbances, temperature disturbances, and vibration disturbances, respectively. This is a disturbance synchronization indicator. This is an indicator function; when the condition inside the parentheses is true, The value is 1 if the value is not specified, and 0 otherwise. Harmonic disturbances can be determined by the change in total harmonic distortion, the change in the amplitude of the main harmonics, or the harmonic change rate; frequency disturbances can be determined by frequency deviation or frequency change rate; phase disturbances can be determined by phase shift or phase change rate; temperature disturbances can be determined by temperature change or temperature change rate; vibration disturbances can be determined by vibration peak value, vibration root mean square value, or vibration peak-to-peak value.
[0039] The first adaptive threshold can be based on the electrical parameter mutation index within the historical stable metering window. The mean, standard deviation, and quantiles are generated. Preferably, a first adaptive threshold is used. Generate using the following formula: ;
[0040] in, For historical stable measurement window The mean, For historical stable measurement window standard deviation It is a threshold coefficient and is not less than 0. For historical stable measurement window The preset quantile value, This is the lower limit of the first adaptive threshold. (Set by...) This avoids setting the first adaptive threshold too low when historically stable samples exhibit minimal fluctuations. Once the number of continuously stable measurement windows reaches the preset update count, the update... , , The first adaptive threshold is used; the measurement error window, the incomplete data window, and the window awaiting review do not participate in the threshold update.
[0041] Within the metering window corresponding to the target operating condition, when Not less than the first adaptive threshold and When the number of disturbance synchronization categories is not less than the preset number, the current measurement window is determined as the measurement error window; when Not less than the first adaptive threshold and When the number of disturbance synchronization categories is less than the preset number, the current metering window is determined as the actual load tracking window; when When the value is less than the first adaptive threshold, the current metering window is determined as a stable metering window. In the access and exit states, the number of preset disturbance synchronization categories can be set to no less than 2; in the load switching state, the number of preset disturbance synchronization categories can be set to no less than 3. If If the vibration disturbance state is not less than the strong disturbance threshold and the vibration impact threshold is not less than the vibration shock threshold, then the preset strong disturbance condition is determined to be met; the strong disturbance threshold is not greater than 5, so as to match the value range of the disturbance synchronization index.
[0042] Figure 2 The diagram illustrates the relationship between normalized disturbance indices and metering window divisions during an emergency power supply mission. To facilitate the display of window start and end points in the attached diagram, the electrical parameter mutation indices used for window determination can be normalized according to the stable metering window fluctuation benchmark, and different shaded areas represent the window types obtained after combining disturbance synchronization indices. Figure 2 In the diagram, the blue section corresponds to the metering error window, the yellow section corresponds to the actual load tracking window, and the red section corresponds to the exit from the metering error window. If the indicators in the access and exit sections exceed the start-up threshold and remain near the hold threshold, it indicates that the transient disturbance is continuous. Although the indicators rise in the actual load transition section, they enter the actual load tracking path after considering the target operating condition and the number of disturbance synchronization categories. This diagram is only used to illustrate the relationship between window division and thresholds and does not change the aforementioned rule of using both electrical parameter mutation indicators and disturbance synchronization indicators to determine the window type.
[0043] like Figure 3 As shown, once the window type is determined, the corresponding metering processing path is entered. The stable metering window accumulates electricity based on the original metering value or the metering value after steady-state compensation, and uses this as a candidate sample for subsequent threshold updates, power trend estimation, and continuity verification. The real load tracking window retains the load step integral contribution characterized by current and power step jumps, but does not perform transient suppression on this contribution; for harmonic components, frequency deviations, and phase shifts that exist simultaneously within this window but do not meet the metering error window judgment requirements, local metering error compensation is performed. ;
[0044] in, The active power of the actual load tracking window. To complete the first step after local measurement error compensation Active power at each sampling point The sampling interval is denoted as .
[0045] When the current metering window is a metering error window, the estimated power value of each sampling point within the window is generated based on the power trend of adjacent stable metering windows. If a stable metering window existed before the metering error window but no stable metering window has been detected since, the real-time estimated power value is first generated using the power mean, power slope, or dynamic error estimation result of the previous stable metering window; the correction is then performed after a subsequent stable metering window appears. ; ; ; ;
[0046] in, For the first The original active power of each sampling point To estimate the power value, The degree of deviation in power trend. This is the abnormal threshold. To replace the threshold and Greater than , As the weight of the electricity consumption points, This represents the active power after transient filtering. For the first The active power after transient filtering compensation for each metering error window. Indicates will Limited to the range The limiting function within, when Time to take ,when Time to take Otherwise take ;in Not greater than .when When the value is not less than the abnormal threshold, the corresponding sampling point is identified as an abnormal sampling point and its weight is reduced; when When not less than the replacement threshold, Take 0, equal Reactive power can be compensated using the same window integration method based on the reactive power sampling value.
[0047] The measurement compensation quantities within the measurement error window include harmonic compensation components, frequency phase compensation components, temperature drift compensation components, and vibration reliability correction components. The harmonic compensation components are generated based on harmonic content and harmonic variation rate; the frequency phase compensation components are generated based on frequency deviation and phase shift; and the temperature drift compensation components are generated based on temperature change. The vibration reliability correction components are used to correct the weights of abnormal sampling points, filter intensity, and long-term compensation parameter update weights. ;
[0048] in, For the first The filtering intensity of each measurement window, Based on the basic filter strength, , , , , These are the normalized disturbance amplitudes for harmonic disturbances, frequency disturbances, phase disturbances, temperature disturbances, and vibration disturbances, respectively. , , , , For the corresponding weights, and These are the lower and upper limits of the filter strength, respectively.
[0049] Long-term compensation parameters include harmonic compensation coefficient, frequency phase compensation coefficient, temperature drift compensation coefficient, sampling reliability parameter, and filter strength parameter. The stable metering window samples correspond to the first update weight, the actual load tracking window samples correspond to the second update weight, and the metering error window samples correspond to the third update weight. The third update weight is less than the second update weight, and the second update weight is not greater than the first update weight. ;
[0050] in, For the first Long-term compensation parameters before the next update. These are the updated long-term compensation parameters. For the first The updated weights corresponding to each measurement window To compensate for the residuals, This is the normalized perturbation feature vector of the measurement error window. When the measurement error window meets the preset strong perturbation condition, the corresponding weights will be updated. Set to zero; windows with incomplete data, windows awaiting review, and windows with prediction conflicts are not included in the long-term compensation parameter update.
[0051] Furthermore, the preset low weight is used to limit the update magnitude of the long-term compensation parameters by the measurement error window samples. This measurement error window can still provide compensation residual information, but its compensation residual is not used as the same parameter update basis as the stable measurement window. For the k-th measurement window, the update weights corresponding to the stable measurement window, the actual load tracking window, and the measurement error window are denoted as follows: , and The three satisfy the following relationship: ;
[0052] Preferably, the preset low weight corresponds to And the weights can be updated according to a preset ratio within the stable measurement window: ;
[0053] in, To stabilize the first updated weights corresponding to the samples in the econometric window, The second updated weights are the samples corresponding to the actual load tracking window. The third updated weight is the sample corresponding to the measurement error window. This is a low-weighting ratio coefficient. Specifically, when the disturbance synchronization index within the measurement error window only reaches the preset number of disturbance synchronization categories, A preset low-weight upper limit can be used; when the disturbance synchronization index continues to increase... Reduce to the preset level; when the disturbance synchronization index meets the preset strong disturbance condition, Set to 0. Therefore, abnormal transient samples during access, exit, or load switching will not change the harmonic compensation coefficient, frequency phase compensation coefficient, temperature drift compensation coefficient, sampling reliability parameter, and filter intensity parameter with a large step size, thereby reducing the bias effect of abnormal transient samples on long-term compensation parameters.
[0054] Furthermore, the first metering window is a metering error window, and when a stable metering window is detected after the metering error window, the reference charge of the first metering window is determined based on the power trend of adjacent stable metering windows. If there are stable metering windows before and after the metering error window, the reference charge can be determined by the interpolation result of the power average of the previous stable metering window and the power average of the subsequent stable metering window; ; ; ;
[0055] in, For reference battery level, For the first Reference power at each sampling point To write back the residual, To write back the corrected output power, This is the write-back coefficient. The value is determined based on the continuity of cumulative electricity consumption and the reliability of adjacent stable metering windows, and ranges from 0 to 1. As can be seen from the above formula, Equivalent to and The weighted result between; Within the specified range, write-back corrections will not produce overshoot exceeding the range of the two values. When the reliability of the subsequent stable metering window is high and the cumulative charge continuity deviation is large, the value can be increased. When the reliability of the subsequent stable measurement window is low, it can be reduced. Alternatively, write-back correction may be temporarily suspended. The actual load tracking window does not rely on the write-back residual to reduce the load step integral contribution.
[0056] Specifically, the window state confidence score is used to characterize the reliability of the current metering window's window type determination result and compensation result, and its value ranges from 0 to 1. The window state confidence score does not directly change the original sampled value, but is used to constrain subsequent filter intensity adjustments, long-term compensation parameter updates, and collection record identifiers. When the current metering window is determined to be a metering error window, an initial window state confidence score can be generated based on the deviation of the electrical parameter mutation index from the first adaptive threshold, the deviation of the disturbance synchronization index from the preset number of disturbance synchronization categories, and data integrity; wherein, the more obvious the deviation and the higher the data integrity, the higher the initial window state confidence score, and vice versa.
[0057] Furthermore, after the previous measurement error window completes the write-back correction in the subsequent stable measurement window, the normalized write-back residual is calculated using the following formula: ;
[0058] in, To normalize the rewrite residuals, To write back the residual, For reference battery level, It is a positive number. If and cumulative power continuity deviation If all values are less than the corresponding low deviation threshold, then the confidence level of the measurement error window is maintained or increased, and the current filter strength is maintained; if or If the error exceeds the corresponding high deviation threshold, the confidence level of the measurement error window is reduced, and the filtering strength of subsequent similar measurement error windows is increased; if... and If the value is between the low deviation threshold and the high deviation threshold, the window state confidence level is maintained or only slightly adjusted.
[0059] Preferably, the window state confidence is updated using the following formula: ;
[0060] in, The confidence level for writing back the window state before the correction. To write back the corrected window state confidence level To assess the reliability of adjacent stable measurement windows, , and These are non-negative weighting coefficients. This is used to limit the calculation results to the range of 0 to 1. Through the above processing, the metering error window with a large write-back residual will no longer serve as a high-confidence sample and affect subsequent compensation, while the metering error window with a small write-back residual and good continuity of cumulative electricity consumption retains high confidence, thereby improving the compensation stability in the continuous metering process.
[0061] The inputs to the dynamic error estimation model include harmonic state, frequency phase state, environmental disturbance state, window type, and historical compensation residuals. The outputs include metering compensation, power trend estimate, and reference power. When using a long short-term memory network, continuous... The state sequence of each measurement window is used as input; ;
[0062] in, For the first The input vector of each measurement window, Encode the window type. To compensate for historical residuals, the initial training samples can be formed from stable metering windows from historical emergency power supply tasks, manually verified metering error windows, and actual load tracking windows. During online operation, only samples from reliable compensation windows are added to the training sample set; metering error windows, incomplete data windows, and prediction conflict windows that meet preset strong disturbance conditions are not added to the training sample set. When computational resources are insufficient or the number of training samples is insufficient, a Kalman filter model or a recursive least squares model can be used, treating metering error as a state variable and harmonic state, frequency phase state, and environmental disturbance state as observation inputs, and updating the state estimate based on the write-back residuals of subsequent stable metering windows.
[0063] Based on the corrected metering compensation amount after write-back, the compensated active power, reactive power, and cumulative power are output. Power in the stable metering window is accumulated according to the original metering value or the metering value after steady-state compensation; power in the real load tracking window is accumulated after retaining the load step integral contribution; power in the metering error window is accumulated according to the output power after transient filtering compensation and write-back correction. Each metering window generates a corresponding collection record, which includes the emergency generator number, power supply task number, metering window number, window start and end time, target operating condition status, window type, disturbance synchronization index, filter strength, metering compensation amount, write-back residual, window status confidence level, pending verification flag, and non-repeatable compensation flag. When a window with a non-repeatable compensation flag participates in the cumulative power collection again, it directly reads the confirmed write-back correction result and does not repeat the transient filtering compensation.
[0064] Example: In an emergency power supply mission, the emergency generator vehicle sequentially goes through the connected state, load-operated state, load-switching state, and exit state. The system collects voltage, current, frequency, phase, harmonic components, temperature changes, and vibration disturbance status according to the metering window, and generates electrical parameter mutation index and disturbance synchronization index. At the moment of connection, if the electrical parameter mutation index reaches the first adaptive threshold, and harmonic disturbance, frequency disturbance, and phase disturbance occur synchronously with the electrical parameter mutation, then this window is determined as the metering error window, transient filtering compensation is performed, and long-term compensation parameter updates are restricted; during the load-switching process, if the current and power experience a step but the number of synchronous disturbance categories is insufficient, then this window is determined as the true load tracking window, and the load step integral contribution is retained; after exiting, when a stable metering window is detected, the previous metering error window is written back and corrected, and the corrected active power, reactive power, and cumulative power are written into the collection record.
[0065] Comparative Example 1: If the metering error window and the actual load tracking window are not distinguished, and strong filtering is uniformly applied to all current step or power step windows, the integral of the electricity corresponding to the increase in actual load during load switching will be weakened, and the compensated cumulative electricity will be lower than the actual electricity supplied. This processing can suppress some peak sampling values, but it cannot distinguish between changes in actual load and transient disturbances during switching.
[0066] Comparative Example 2: If the emergency generator power metering data is processed only according to the steady-state harmonic compensation method, without counting disturbance synchronization indicators or restricting the update of long-term compensation parameters according to window type, then abnormal transient samples during the access and exit process may participate in the update of long-term compensation parameters, causing the compensation benchmark of subsequent stable metering windows to shift.
[0067] Comparative Example 3: If only real-time transient filtering is performed in the metering error window without waiting for subsequent stable metering windows to write back and correct, the deviation between the real-time estimated power and the actual stable power may continue to be transmitted to the accumulated power, making it difficult to verify the continuity of the accumulated power after the task ends.
[0068] The technical scope of this invention is not limited to the content described above. Those skilled in the art can make various modifications and variations to the above embodiments without departing from the technical concept of this invention, and all such modifications and variations should fall within the protection scope of this invention.
Claims
1. An adaptive harmonic compensation method for power metering in emergency power generation vehicles, characterized in that, include: Acquire voltage, current, frequency, phase, harmonic components, power metering data, temperature change, vibration disturbance status, and connection, disconnection, and load switching status within the continuous metering window of the emergency generator vehicle's output side; Based on the voltage and current, an electrical parameter mutation index is generated. Based on the time synchronization degree of harmonic disturbances, frequency disturbances, phase disturbances, temperature disturbances, and vibration disturbances relative to the electrical parameter mutation index, the number of synchronization disturbance categories is counted, and a disturbance synchronization index is generated. Within the corresponding status window, the window is determined as a metering error window, a real load tracking window, or a stable metering window according to the relationship between the electrical parameter mutation index and the first adaptive threshold, and the disturbance synchronization index and the preset disturbance synchronization category. Among them, the mutation reaches the threshold and the synchronization meets the standard, which is the metering error window; the mutation reaches the threshold but the synchronization does not meet the standard, which is the real load tracking window; and the mutation does not reach the threshold, which is the stable metering window. The processing path is determined according to the window type, including: retaining the load step integral contribution in the real load tracking window, performing transient filtering compensation and generating the metering compensation amount in the metering error window, and restricting its sample to update the long-term compensation parameters; When a stable metering window is detected after the metering error window, the metering compensation amount is written back and corrected according to the compensation residual and the continuity of the cumulative electricity, and the compensated electricity result is output.
2. The adaptive harmonic compensation method for emergency power generation vehicle metering according to claim 1, characterized in that, The electrical parameter mutation index and the disturbance synchronization index are generated as follows: ; ; ; in, For the first The electrical parameter mutation index for each metering window , , The first The effective values of voltage and current within each metering window, and the average active power calculated from the voltage and current. , , These are the voltage, current, and active power fluctuation benchmarks within the historical stable metering window, respectively. It is a positive number; For the first The first measurement window Synchronous disturbance state of perturbation. For the first The moment when the electrical parameter abruptly peaks within a metering window. For the first When does the perturbation peak occur? To synchronize the determination of the time scale, For the first Normalized perturbation amplitude of the perturbation type For the corresponding perturbation threshold, , , , , These represent harmonic disturbances, frequency disturbances, phase disturbances, temperature disturbances, and vibration disturbances, respectively. For the first Disturbance synchronization index for each measurement window This is an indicator function.
3. The adaptive harmonic compensation method for emergency power generation vehicle metering according to claim 2, characterized in that, The corresponding status window is the metering window corresponding to the access status, exit status, or load switching status; the mutation threshold means that the electrical parameter mutation index is not less than the first adaptive threshold, and the synchronization standard means that the disturbance synchronization index is not less than the preset number of disturbance synchronization categories; the first adaptive threshold is generated based on the mean, standard deviation, and quantile of the electrical parameter mutation index within the historical stable metering window, and is updated when the number of continuous stable metering windows reaches the preset update number; the preset number of disturbance synchronization categories is configured according to the access status, exit status, or load switching status, wherein the preset number of disturbance synchronization categories corresponding to the access status and exit status is not less than 2, and the preset number of disturbance synchronization categories corresponding to the load switching status is not less than 3; when the disturbance synchronization index is not less than the strong disturbance threshold, and the vibration disturbance status is not less than the vibration impact threshold, the preset strong disturbance condition is determined to be met.
4. The adaptive harmonic compensation method for emergency power generation vehicle metering according to claim 1, characterized in that, The metering processing path includes a transient filtering compensation path, a real load tracking path, and a steady-state metering compensation path. After generating the window type of the current metering window, the metering error window is imported into the transient filtering compensation path, the real load tracking window is imported into the real load tracking path, and the stable metering window is imported into the steady-state metering compensation path according to the window type.
5. The adaptive harmonic compensation method for emergency power generation vehicle metering according to claim 4, characterized in that, In the true load tracking path, the load step integral contribution determined by the current step amplitude, power step amplitude, and window duration within the true load tracking window is retained. Transient suppression is not performed on the load step integral contribution, and local metering errors corresponding to harmonic components, frequency deviations, and phase shifts in the true load tracking window are compensated.
6. The adaptive harmonic compensation method for emergency power generation vehicle metering according to claim 4, characterized in that, In the transient filtering compensation path, based on the degree of deviation of the sampling points within the metering error window from the power trend of adjacent stable metering windows, sampling points with a deviation degree not less than the abnormal threshold are identified as abnormal sampling points, and the weight of the abnormal sampling points in the power integration is reduced. When the deviation is not less than the replacement threshold, a replacement value is generated based on the power trend and dynamic error estimation results of adjacent sampling points and adjacent stable metering windows, and the abnormal sampling point is updated with the replacement value.
7. The adaptive harmonic compensation method for emergency power generation vehicle metering according to claim 6, characterized in that, Within the measurement error window, the measurement compensation quantity includes a harmonic compensation component, a frequency phase compensation component, a temperature drift compensation component, and a vibration reliability correction component; wherein, the harmonic compensation component is generated based on the harmonic content and harmonic change rate, the frequency phase compensation component is generated based on the frequency deviation and phase shift, the temperature drift compensation component is generated based on the temperature change, and the vibration reliability correction component corrects the weight of abnormal sampling points and the update weight of long-term compensation parameters according to the vibration disturbance state.
8. The adaptive harmonic compensation method for emergency power generation vehicle metering according to claim 7, characterized in that, The long-term compensation parameters include harmonic compensation coefficient, frequency phase compensation coefficient, temperature drift compensation coefficient, sampling reliability parameter, and filter intensity parameter. The long-term compensation parameters are updated with weights according to the type of the current metering window. Specifically, stable metering window samples correspond to a first update weight, actual load tracking window samples correspond to a second update weight, and metering error window samples correspond to a third update weight. The third update weight is less than the second update weight, and the second update weight is not greater than the first update weight. The third update weight is not higher than a preset low weight. When the disturbance synchronization index is not less than the strong disturbance threshold, and the vibration disturbance state is not less than the vibration impact threshold, the third update weight is reset to zero.
9. The adaptive harmonic compensation method for emergency power generation vehicle metering according to claim 6, characterized in that, When the The first metering window is the metering error window, and when a stable metering window is detected after the first metering error window, the second stable metering window is determined based on the power trend of the adjacent stable metering windows. The reference electricity consumption for the first metering window, and the electricity consumption for the second metering window as follows: The compensated electricity consumption for each metering window is then written back for correction. ; ; in, To write back the residual, For the first The electricity quantity after transient filtering compensation for each metering error window. The reference energy quantity is determined based on the power trend of adjacent stable metering windows. To write back the corrected output power, The write-back coefficient is determined based on the continuity of cumulative electricity consumption and the reliability of adjacent stable metering windows; the compensated electricity consumption results include compensated active power consumption, reactive power consumption, and cumulative electricity consumption.
10. The adaptive harmonic compensation method for emergency power generation vehicle electricity metering according to claim 9, characterized in that, The dynamic error estimation result is generated using a dynamic error estimation model, and the metering compensation amount, power trend estimate, and reference power amount are output based on the dynamic error estimation result. The inputs to the dynamic error estimation model include harmonic state, frequency phase state, environmental disturbance state, window type, and historical compensation residual; the dynamic error estimation model adopts one of the following model structures: state-space model, Kalman filter model, recursive least squares model, long short-term memory network, and gated recurrent unit network.