Carbon analysis data processing method based on time sequence perception
Patent Information
- Application Number
- CN202611118477.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-27
- Publication Date
- 2026-10-30
AI Technical Summary
[0057]本发明将采集节点侧的时间戳预补偿、数据处理中心侧的时域粗对齐、频域参数分离和误差回传更新按顺序执行,使多节点能碳数据不只依赖数据到达后的中心端对齐,而是在采集节点侧和数据处理中心侧分别进行时间误差处理。在源端,分布式能碳数据采集节点利用晶振漂移预测补偿模型和预补偿可信度生成预补偿时间戳,使晶振核心工作温度、电源纹波幅值、数据发送队列深度等影响本地时钟漂移的物理因素参与时间标记修正过程,从而减少本地时钟累积漂移对后续对齐处理的影响。在中心端,数据处理中心基于预补偿时间戳确定全网基准时间戳和通道时间偏移向量,并进一步得到连续时延估计值,使各通道电能质量高速采样序列形成可用于频域处理的时域对齐基础。随后,数据处理中心通过特征频率点筛选和能碳多通道特征关联矩阵的奇异值分解,将残余时延对应的时频耦合线性相位斜率项与物理时钟频率偏差相关的恒定相位截距分离,减少二者在相位观测结果中的相互影响,并据此生成经同步校准的电能质量采样序列。最后,方案不将综合能碳指标报告、碳排放量核算误差或通道融合残差直接作为模型反馈,而是基于解耦得到的时频耦合线性相位斜率项和恒定相位截距生成经非时钟因素筛除约束后的物理时钟同步估计误差,并仅在满足回传更新条件时回传至对应节点更新晶振漂移预测补偿模型,该处理减少传感器测量波动、低速能碳因子更新滞后、网络传输抖动和异常相位观测进入端侧模型更新过程的情况,使分布式能碳数据采集节点能够根据本地晶振漂移修正时间戳,并使电能质量高速采样序列与能碳因子低速参数序列按同一时间窗口绑定。
Smart Images

Figure CN123012408A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and more specifically to a time-series-aware energy and carbon analysis data processing method. Background Technology
[0002] In distributed energy and carbon monitoring systems, multiple acquisition nodes are typically deployed in different buildings, power distribution circuits, or energy equipment. Each node needs to collect power quality parameters such as voltage and current, and combine them with fuel consumption, carbon emission factors, and oxidation conversion factors to form energy and carbon analysis data. Because each acquisition node operates its own local clock, the crystal oscillator within the node is subject to physical drift due to operating temperature, power supply ripple, device aging, and network transmission queue status. This can lead to local timestamp discrepancies in data blocks generated by different nodes even when collected at similar actual physical times. Existing processing methods often align the data at the central end based on timestamps, sliding windows, or interpolation. These methods primarily address existing data misalignments but lack compensation for crystal oscillator drift trends at the data source. Furthermore, during multi-channel calibration at the central end, residual delays at subsampling points, channel propagation differences, frequency domain phase slope, and clock frequency deviations can couple in the phase observation results. If only simple time offset estimation or ordinary regression processing is used, residual delays and frequency offsets can easily interfere with each other, affecting the synchronization consistency of the high-speed multi-channel power quality sampling sequence. Furthermore, the low-speed parameters of the carbon emission factor and the high-speed sampling sequence of power quality have different data update cycles. If the synchronization error of the high-speed waveform and the binding error of the low-speed factor are not distinguished, the lag in the update of the carbon emission factor, the fluctuation of fuel consumption statistics, or the residual error of the fusion of high-level carbon emission indicators may be used as clock drift feedback signals, thereby affecting the update direction of the edge-side drift compensation model. Therefore, the distributed carbon emission data synchronous acquisition and processing system needs to correct the local timestamp at the acquisition node based on the crystal oscillator status, and generate a transmittable clock error at the data processing center based on the time-domain and frequency-domain processing results, so that the carbon emission data of multiple nodes can be processed in the same time window. Summary of the Invention
[0003] This invention provides a time-aware energy and carbon analysis data processing method. The technical problem to be solved by this invention is how to perform source-end pre-compensation for the physical drift of the local crystal oscillator of independent acquisition nodes in a distributed energy and carbon data acquisition scenario, and form a reliable backhaul error after decoupling the residual delay from the physical clock frequency deviation in the data processing center, thereby reducing the synchronization deviation of multi-channel energy and carbon data caused by clock drift, subsampling point delay and abnormal feedback.
[0004] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:
[0005] A time-aware energy carbon analysis data processing method includes: distributed energy carbon data acquisition nodes acquiring power quality parameters and energy carbon factor parameters, generating a high-speed power quality sampling sequence and a low-speed energy carbon factor parameter sequence, generating an original local timestamp based on a local crystal oscillator clock source, and generating a pre-compensation timestamp using a crystal oscillator drift prediction compensation model and pre-compensation reliability; a data processing center determining a network-wide reference timestamp and a channel time offset vector based on the pre-compensation timestamp, and performing a first-level time-domain coarse alignment on the high-speed power quality sampling sequence based on the channel time offset vector to obtain a continuous delay estimate; the data processing center then performs a continuous delay estimate based on the estimated time offset. The estimated value is used to select characteristic frequency points in the frequency domain and construct a multi-channel characteristic correlation matrix for energy and carbon. Singular value decomposition is performed on the multi-channel characteristic correlation matrix for energy and carbon to obtain a time-frequency coupled linear phase slope term and a constant phase intercept, and a synchronously calibrated power quality sampling sequence is output. The data processing center generates a physical clock synchronization estimation error after removing constraints from non-clock factors based on the time-frequency coupled linear phase slope term and the constant phase intercept, and when the backhaul update condition is met, the physical clock synchronization estimation error after removing constraints from non-clock factors is backhauled to the corresponding distributed energy and carbon data acquisition node to update the crystal oscillator drift prediction compensation model.
[0006] In one aspect of the present invention, the process by which the distributed energy carbon data acquisition node acquires power quality parameters and energy carbon factor parameters, and generates a high-speed power quality sampling sequence and a low-speed energy carbon factor parameter sequence includes:
[0007] Voltage and current analog signals are collected using an electrical energy parameter sensor, fuel consumption is collected using a fuel consumption sensor, and carbon emission factor and oxidation conversion factor are obtained using an energy carbon factor acquisition unit.
[0008] The voltage analog signal and the current analog signal are sequentially subjected to analog signal conditioning, analog anti-aliasing filtering, analog-to-digital conversion and digital filtering to obtain the power quality high-speed sampling sequence.
[0009] The fuel consumption, carbon emission factor, and oxidation conversion factor are bound according to the time window corresponding to the current data block to obtain the low-speed parameter sequence of the energy carbon factor;
[0010] The high-speed power quality sampling sequence participates in time-domain coarse alignment, continuous delay estimation, frequency-domain characteristic frequency point screening, singular value decomposition, and synchronous calibration processing. The low-speed parameter sequence of energy carbon factor does not participate in frequency-domain phase decoupling processing and is bound and fused according to data block identifier and time window number after the synchronously calibrated power quality sampling sequence is generated.
[0011] In one aspect of the present invention, the process of generating a pre-compensation timestamp using a crystal oscillator drift prediction compensation model and pre-compensation confidence includes:
[0012] The edge microcontroller of the distributed energy and carbon data acquisition node reads the crystal core operating temperature, power supply ripple amplitude, data transmission queue depth, and physical clock synchronization estimation error after non-clock factor filtering constraints returned from the previous data aggregation and update cycle, and forms a local physical state feature vector.
[0013] The local physical state feature vector is input into the crystal oscillator drift prediction and compensation model in a fixed field order. The hidden layer state saved in the previous data aggregation and update cycle is read, and the total cumulative drift time in the next data aggregation and update cycle is calculated according to the stored model parameters.
[0014] The pre-compensation confidence level is generated based on the deviation between the total cumulative drift time in the previous data aggregation and update cycle and the physical clock synchronization estimation error after non-clock factor screening constraints.
[0015] The pre-compensated timestamp is obtained by adjusting the deduction of the total accumulated drift time from the original local timestamp using the pre-compensation confidence level.
[0016] The high-speed power quality sampling sequence, the low-speed energy carbon factor parameter sequence, the data block identifier, the node physical address identifier, and the pre-compensation timestamp are encapsulated into an uplink data packet and sent to the data processing center.
[0017] In one aspect of the present invention, the process by which the data processing center determines the network-wide reference timestamp and channel time offset vector based on the pre-compensated timestamp, and performs a first-level coarse time-domain alignment on the high-speed power quality sampling sequence based on the channel time offset vector to obtain continuous delay estimates includes:
[0018] The data processing center parses the pre-compensation timestamp, node physical address identifier, and data block identifier in each uplink data packet, and reorders the uplink data packets within the same data aggregation update cycle in ascending order according to the pre-compensation timestamp.
[0019] The pre-compensation timestamp with the smallest value is selected as the network-wide reference timestamp, and the time difference between the pre-compensation timestamps of the remaining channels and the network-wide reference timestamp is calculated to generate the channel time offset vector.
[0020] The time difference in the channel time offset vector is converted into an integer quantized sampling point offset, and the power quality high-speed sampling sequence of the corresponding channel is shifted by integer sampling points based on the integer quantized sampling point offset. The missing boundary samples after the shift are filled in by adjacent data blocks or marked as invalid, thus completing the first-level coarse alignment in the time domain.
[0021] Discrete cross-correlation calculations are performed on the high-speed sampling sequences of power quality of the channel under test and the reference channel power quality after the first-level coarse time-domain alignment. The cross-correlation main peak index and its adjacent cross-correlation amplitude are extracted, and the fractional sampling point offset is obtained by continuous quadratic parabolic fitting.
[0022] The integer quantization sampling point offset is combined with the fractional sampling point offset to obtain the continuous delay estimate.
[0023] In one aspect of the present invention, the process by which the data processing center, based on the continuous time delay estimate, selects characteristic frequency points in the frequency domain and constructs a multi-channel characteristic correlation matrix for carbon energy includes:
[0024] Windowing and fast Fourier transform are applied to the high-speed power quality sampling sequences of each channel after the first-stage coarse alignment in the time domain to obtain the complex spectrum corresponding to each channel;
[0025] Candidate feature frequency points are selected within the effective analysis bandwidth, and signal-to-noise ratio (SNR) filtering is performed on the candidate feature frequency points to eliminate candidate feature frequency points whose local SNR is lower than the feature frequency point SNR threshold.
[0026] Phase linearity filtering is performed on the candidate feature frequency points that pass the signal-to-noise ratio screening. Candidate feature frequency points with phase linearity scores lower than the phase linearity threshold are removed to obtain the feature frequency points used to construct the matrix.
[0027] The relative phase difference between the channel under test and the reference channel is calculated at the characteristic frequency points, and the multi-channel relative phase difference vector corresponding to the channel under test is generated in order of frequency from low to high.
[0028] Using the physical angular frequency corresponding to each of the aforementioned characteristic frequency points as the first column element and the constant term as the second column element, construct the energy-carbon multi-channel feature correlation matrix corresponding to the channel under test.
[0029] In one aspect of the present invention, the process of performing singular value decomposition on the energy-carbon multichannel characteristic correlation matrix to obtain the time-frequency coupled linear phase slope term and constant phase intercept includes:
[0030] Singular value decomposition is performed on the energy carbon multichannel feature correlation matrix to obtain a left orthogonal matrix, a diagonal singular value matrix and a right orthogonal matrix, and the singular value condition number is calculated based on the maximum singular value and the minimum effective singular value.
[0031] When the singular value condition number is not greater than the condition number threshold, a generalized pseudo-inverse matrix is constructed based on the left orthogonal matrix, the diagonal singular value matrix, and the right orthogonal matrix. The generalized pseudo-inverse matrix is then used to project and solve the multi-channel relative phase difference vector to obtain the time-frequency coupled linear phase slope term and the constant phase intercept.
[0032] When the singular value condition number is greater than the condition number threshold, the selection priority of candidate feature frequency points with low phase linearity scores is reduced, the energy carbon multi-channel feature correlation matrix is reconstructed, and singular value decomposition is re-executed.
[0033] The time-frequency coupled linear phase slope term is used to calculate the residual time delay shift, and the constant phase intercept is used to extract the physical clock relative frequency deviation based on the intercept change between adjacent data blocks.
[0034] In one aspect of the invention, the process of outputting a synchronously calibrated power quality sampling sequence includes:
[0035] The time-frequency coupled linear phase slope term is converted into the residual time delay shift, and an all-pass phase shift compensation factor is constructed in the frequency domain based on the residual time delay shift.
[0036] The full-pass phase shift compensation factor is used to perform frequency domain phase shift compensation on the complex spectrum of each channel to reduce the residual subsampling point delay after the first-stage time-domain coarse alignment;
[0037] The physical clock relative frequency deviation is calculated based on the constant phase intercept change of adjacent data blocks, and the sampling time within the data block is linearly recalibrated based on the physical clock relative frequency deviation.
[0038] The inverse fast Fourier transform is performed on the frequency domain phase-shift compensated signal, and interpolation resampling is performed according to the sampling time after linear recalibration to obtain the synchronously calibrated power quality sampling sequence.
[0039] The synchronously calibrated power quality sampling sequence is bound to the low-speed parameter sequence of the energy carbon factor according to the data block identifier and time window number.
[0040] In one aspect of the present invention, the process by which the data processing center generates the physical clock synchronization estimation error after removing constraints by non-clock factors based on the time-frequency coupled linear phase slope term and the constant phase intercept includes:
[0041] The time-frequency coupled linear phase slope term is converted into a residual time delay shift;
[0042] The physical clock relative frequency deviation is obtained based on the constant phase intercept change of adjacent data blocks, and the time drift formed by the cumulative frequency deviation is obtained based on the physical clock relative frequency deviation and the data aggregation update cycle duration.
[0043] The residual time delay shift is added to the time drift to generate the physical clock synchronization estimation error after the non-clock factor filtering constraint is removed;
[0044] The physical clock synchronization estimation error after the non-clock factor screening constraint is not directly derived from the comprehensive energy carbon index report, carbon emission accounting error or channel fusion residual, but rather from the decoupling result of the time-frequency coupled linear phase slope term and the constant phase intercept.
[0045] In one aspect of the present invention, when the backhaul update condition is met, the process of backhauling the physical clock synchronization estimation error after non-clock factor filtering constraints to the corresponding distributed energy and carbon data acquisition node to update the crystal oscillator drift prediction compensation model includes:
[0046] The data processing center calculates the phase fitting residual, the singular value condition number, and the rate of change of continuous periodic error;
[0047] When the phase fitting residual is not greater than the phase fitting residual threshold, the number of singular value conditions is not greater than the condition number threshold, and the rate of change of continuous periodic error is not greater than the rate of change of error threshold, it is determined that the backhaul update condition is satisfied.
[0048] When the backhaul update conditions are met, the data processing center encapsulates the physical clock synchronization estimation error, channel identifier, data aggregation update cycle identifier, phase fitting residual, singular value condition number and check field after non-clock factor filtering constraints into downlink control signaling, and backhauls it to the corresponding distributed energy and carbon data acquisition node.
[0049] After the edge microcontroller of the distributed energy and carbon data acquisition node verifies the downlink control signaling, it subtracts the total cumulative drift time predicted at the beginning of the current data aggregation and update cycle from the physical clock synchronization estimation error after the non-clock factor filtering constraint is returned to obtain the signed prediction error.
[0050] The edge microcontroller reads the signed prediction error, the hidden layer representation vector, and the current output layer weight matrix, calculates the single-step update amount for each weight item in the output layer weight matrix, the single-step update amount is jointly determined by the signed prediction error, the corresponding hidden layer representation component, the parameter incremental update learning rate constant, and the orthogonal regularization decay coefficient, and updates the output layer weight matrix of the crystal oscillator drift prediction compensation model according to the single-step update amount;
[0051] When the backhaul update conditions are not met, the data processing center only uses the physical clock synchronization estimation error after the non-clock factor filtering constraint is removed for the center-end calibration record of the current data block, and does not trigger the update of the output layer weight matrix.
[0052] In one aspect of the present invention, after the synchronously calibrated power quality sampling sequence enters the energy carbon index fusion calculation module, the energy carbon index fusion calculation module reads the synchronously calibrated power quality sampling sequence and the energy carbon factor low-speed parameter sequence according to the same time window.
[0053] The energy and carbon index fusion calculation module calculates the power quality assessment index based on the synchronously calibrated power quality sampling sequence, calculates the carbon emissions based on the energy and carbon factor low-speed parameter sequence, and generates synchronous quality weights based on the synchronous reliability score.
[0054] The synchronization reliability score is determined by the phase fitting residual, the singular value condition number, and the continuous periodic error rate of change.
[0055] The energy carbon index fusion calculation module fuses multi-channel data according to the synchronization quality weight and outputs a comprehensive energy carbon index report that includes power quality assessment and carbon emission calculation. When the energy carbon index fusion calculation module also obtains the energy intensity benchmark corresponding to the current time window, the comprehensive energy carbon index report also includes energy intensity analysis results.
[0056] Compared with the prior art, the present invention has the following beneficial effects:
[0057] This invention executes timestamp pre-compensation at the acquisition node side, coarse time-domain alignment at the data processing center side, frequency-domain parameter separation, and error backpropagation update sequentially. This ensures that multi-node energy carbon data does not solely rely on alignment at the central end after data arrival, but rather that time error processing is performed separately at both the acquisition node side and the data processing center side. At the source end, the distributed energy carbon data acquisition node generates a pre-compensated timestamp using a crystal oscillator drift prediction and compensation model and pre-compensation reliability. This incorporates physical factors affecting local clock drift, such as crystal core operating temperature, power supply ripple amplitude, and data transmission queue depth, into the timestamp correction process, thereby reducing the impact of accumulated local clock drift on subsequent alignment processing. At the central end, the data processing center determines the network-wide reference timestamp and channel time offset vector based on the pre-compensated timestamp, and further obtains continuous delay estimates, enabling the high-speed power quality sampling sequences of each channel to form a time-domain alignment basis that can be used for frequency-domain processing. Subsequently, the data processing center separates the time-frequency coupled linear phase slope term corresponding to the residual delay from the constant phase intercept related to the physical clock frequency deviation through characteristic frequency point screening and singular value decomposition of the multi-channel characteristic correlation matrix of energy and carbon. This reduces the mutual influence between the two in the phase observation results, and generates a synchronously calibrated power quality sampling sequence accordingly. Finally, the scheme does not directly use the comprehensive energy and carbon index report, carbon emission calculation error, or channel fusion residual as model feedback. Instead, it generates a physical clock synchronization estimation error after removing constraints from non-clock factors based on the decoupled time-frequency coupled linear phase slope term and constant phase intercept. This error is only fed back to the corresponding node to update the crystal oscillator drift prediction compensation model when the backhaul update conditions are met. This process reduces the occurrence of sensor measurement fluctuations, low-speed energy and carbon factor update lags, network transmission jitter, and abnormal phase observations entering the end-side model update process. This allows distributed energy and carbon data acquisition nodes to correct timestamps according to local crystal oscillator drift and binds the high-speed power quality sampling sequence and the low-speed energy and carbon factor parameter sequence within the same time window. Attached Figure Description
[0058] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained from these drawings without creative effort.
[0059] Figure 1 This is a flowchart of the time-aware energy and carbon analysis data processing method of the present invention.
[0060] Figure 2 This is a flowchart of the sub-steps in step 1 of the time-aware energy and carbon analysis data processing method of the present invention.
[0061] Figure 3This is a flowchart of a sub-step in step 2 of the time-aware energy and carbon analysis data processing method of the present invention.
[0062] Figure 4 This is a flowchart of a sub-step in step 3 of the time-aware energy and carbon analysis data processing method of the present invention.
[0063] Figure 5 This is a flowchart of the sub-step of step 4 in the time-aware energy and carbon analysis data processing method of the present invention.
[0064] Figure 6 This is a framework diagram of the time-aware energy and carbon analysis data processing system of the present invention.
[0065] Figure 7 This is a high-level data flow diagram of the time-aware energy and carbon analysis data processing system of the present invention.
[0066] Figure 8 This is a time-series interaction diagram of the time-series-aware energy and carbon analysis data processing system of the present invention. Detailed Implementation
[0067] The present invention will be further described below with reference to embodiments. The described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the content described in this specification, those skilled in the art can make equivalent substitutions for the sampling rate, data block length, number of characteristic frequency points, filter order, communication interface type, memory type, nominal clock frequency of the local crystal oscillator clock source, data aggregation update cycle, threshold calibration method, and network transmission protocol without departing from the technical concept of the present invention.
[0068] like Figure 1 As shown, this embodiment discloses a time-series-aware energy and carbon analysis data processing method, wherein the method specifically includes:
[0069] S1. Distributed energy and carbon data acquisition nodes acquire power quality parameters and energy and carbon factor parameters, generate high-speed power quality sampling sequences and low-speed energy and carbon factor parameter sequences, generate original local timestamps based on local crystal oscillator clock sources, and generate pre-compensation timestamps using crystal oscillator drift prediction compensation models and pre-compensation reliability.
[0070] S2. The data processing center determines the network-wide reference timestamp and channel time offset vector based on the pre-compensated timestamp, and performs the first-level time-domain coarse alignment on the high-speed power quality sampling sequence based on the channel time offset vector to obtain the continuous delay estimate.
[0071] S3. Based on the continuous time delay estimate, the data processing center selects characteristic frequency points in the frequency domain and constructs a multi-channel energy carbon feature correlation matrix. It performs singular value decomposition on the multi-channel energy carbon feature correlation matrix to obtain the time-frequency coupled linear phase slope term and constant phase intercept, and outputs a synchronously calibrated power quality sampling sequence.
[0072] S4. The data processing center generates a physical clock synchronization estimation error after removing constraints from non-clock factors based on the time-frequency coupled linear phase slope term and the constant phase intercept. When the backhaul update condition is met, the physical clock synchronization estimation error after removing constraints from non-clock factors is backhauled to the corresponding distributed energy and carbon data acquisition node to update the crystal oscillator drift prediction compensation model.
[0073] In this embodiment, it should be noted that in S1, the distributed energy and carbon data acquisition node does not simply add a regular timestamp to the acquired data, but rather performs source-end pre-compensation on the original local timestamp using the physical drift state of the local crystal oscillator clock source before the data packet is sent. The distributed energy and carbon data acquisition node internally includes an energy parameter sensor, a fuel consumption sensor, an energy and carbon factor acquisition unit, an analog signal conditioning circuit, an analog anti-aliasing filter, an analog-to-digital converter, an edge computing unit, a local crystal oscillator clock source, an edge microcontroller, a runtime memory, a non-volatile memory, and a network communication interface. The energy parameter sensor acquires analog voltage and current signals, the fuel consumption sensor acquires fuel consumption, and the energy and carbon factor acquisition unit acquires carbon emission factors and oxidation conversion factors from a local factor database or a factor configuration table issued by a data processing center. The analog voltage and current signals are processed through analog signal conditioning, analog anti-aliasing filtering, analog-to-digital conversion, and digital filtering to form a high-speed energy quality sampling sequence. The fuel consumption, carbon emission factors, and oxidation conversion factors are arranged according to the time window corresponding to the data block to form a low-speed energy and carbon factor parameter sequence. The high-speed power quality sampling sequence is used for subsequent time-domain coarse alignment, continuous delay estimation, frequency-domain characteristic frequency point screening, singular value decomposition, and synchronization calibration. The low-speed energy carbon factor parameter sequence does not participate in the frequency-domain phase decoupling process; instead, it is bound and fused according to data block identifiers and time window numbers after the synchronously calibrated power quality sampling sequence is generated. This process clearly defines the boundaries between high-speed waveform synchronization processing and low-speed energy carbon factor binding processing, preventing the feedback of low-speed energy carbon factor update lag errors to the crystal oscillator drift prediction and compensation model.
[0074] In S2, the data processing center receives uplink data packets from multiple distributed energy and carbon data acquisition nodes and generates a network-wide reference timestamp and a channel time offset vector based on the pre-compensated timestamps in each uplink data packet. Due to differences in network paths, transmission queue states, and local clock drift among the distributed energy and carbon data acquisition nodes, data packets arriving at the data processing center within the same data aggregation update cycle may not maintain the same acquisition time order. Instead of directly using the data packet arrival time as the alignment basis, the data processing center parses the pre-compensated timestamps and reorders the data packets within the same data aggregation update cycle in ascending order according to the pre-compensated timestamps. The pre-compensated timestamp with the smallest value is determined as the network-wide reference timestamp. The difference between the pre-compensated timestamps of the remaining channels and the network-wide reference timestamp forms the channel time offset vector. This channel time offset vector is further converted into an integer quantized sampling point offset and used to perform integer sampling point shifting on the corresponding channel's high-speed power quality sampling sequence, thereby completing the first-stage coarse time-domain alignment. The output of this stage is not the final calibration result but provides an input sequence with a small residual time difference for subsequent continuous delay estimation and frequency domain parameter decoupling. To obtain a residual offset of less than one sampling period, the data processing center performs discrete cross-correlation calculations on the high-speed sampling sequence of the power quality of the channel under test and the high-speed sampling sequence of the power quality of the reference channel after the first-level coarse alignment in the time domain. It extracts the cross-correlation main peak index and its adjacent cross-correlation amplitude, obtains the fractional sampling point offset by fitting a continuous quadratic parabola, and then combines the integer quantized sampling point offset with the fractional sampling point offset to obtain a continuous time delay estimate.
[0075] In S3, the data processing center enters the frequency domain processing stage based on the continuous delay estimate output from S2. This stage first performs windowing and Fast Fourier Transform on the high-speed power quality sampling sequences of each channel after the first-stage coarse alignment in the time domain, obtaining the complex spectrum of each channel. Then, the data processing center selects candidate characteristic frequency points within the effective analysis bandwidth and performs signal-to-noise ratio (SNR) and phase linearity (PLL) filtering on these candidate frequency points. SNR filtering is used to eliminate frequency points with strong local noise, and PLL filtering is used to eliminate frequency points that do not conform to the linear phase law of the residual delay. The characteristic frequency points obtained through dual-condition filtering are used to calculate the relative phase difference between the channel under test and the reference channel, and to construct a multi-channel relative phase difference vector. The data processing center constructs a multi-channel energy carbon characteristic correlation matrix with the physical angular frequency corresponding to each characteristic frequency point as the first column element and the constant term as the second column element. Subsequently, the data processing center performs singular value decomposition on the multi-channel energy carbon characteristic correlation matrix and calculates the singular value condition number. When the singular value condition number meets the condition number threshold requirement, the data processing center constructs a generalized pseudo-inverse matrix using the singular value decomposition results and projects the multi-channel relative phase difference vector to obtain a time-frequency coupled linear phase slope term and a constant phase intercept. The time-frequency coupled linear phase slope term is used to calculate the residual time delay shift, and the constant phase intercept is used to extract the physical clock relative frequency deviation based on the intercept change between adjacent data blocks. Through this processing, the effects of residual time delay and physical clock frequency deviation are processed separately, providing a parameter source for generating a synchronously calibrated power quality sampling sequence and subsequent error backpropagation.
[0076] In S4, the data processing center does not directly use the comprehensive energy and carbon index report, carbon emission calculation error, or channel fusion residual as the update basis for the crystal oscillator drift prediction compensation model. Instead, it uses the time-frequency coupled linear phase slope term and constant phase intercept obtained in S3 to generate the physical clock synchronization estimation error after non-clock factor constraints are removed. The time-frequency coupled linear phase slope term is converted into a residual time delay shift. The change in adjacent data blocks of the constant phase intercept is used to obtain the relative frequency deviation of the physical clock, and combined with the data aggregation update cycle duration, the time drift formed by the accumulation of frequency deviation is obtained. The residual time delay shift and the time drift are added to obtain the physical clock synchronization estimation error after non-clock factor constraints are removed. This error enters the synchronization quality threshold judgment process. The synchronization quality threshold judgment process reads the phase fitting residual, the singular value condition number, and the continuous period error change rate. When all three judgment quantities meet the threshold conditions, the data processing center encapsulates the physical clock synchronization estimation error after non-clock factor constraints is removed into downlink control signaling and sends it back to the corresponding distributed energy and carbon data acquisition node. When any judgment quantity fails to meet the threshold condition, the data processing center only uses the error in the center-end calibration record of the current data block, without triggering the weight update of the crystal oscillator drift prediction compensation model. Through this processing, the center-end calibration of the current data block and the model update of the distributed energy and carbon data acquisition nodes are distinguished, reducing the impact of abnormal phase observations and abnormal data packets on the end-side model.
[0077] like Figure 2 As shown, in one specific embodiment, S1 includes:
[0078] S11. The distributed energy and carbon data acquisition node uses an energy parameter sensor to acquire voltage and current analog signals, uses a fuel consumption sensor to acquire fuel consumption, and uses an energy and carbon factor acquisition unit to acquire carbon emission factors and oxidation conversion factors.
[0079] S12. The analog signal conditioning circuit isolates, amplifies, scales, and corrects the voltage analog signal and the current analog signal, so that the conditioned voltage analog signal and the current analog signal fall within the input range of the analog-to-digital converter.
[0080] S13. An analog anti-aliasing filter performs low-pass filtering on the conditioned analog voltage signal and the analog current signal before the analog-to-digital converter to suppress analog frequency components higher than the Nyquist frequency from entering the analog-to-digital converter.
[0081] S14. Driven by a local crystal oscillator clock source, the analog-to-digital converter performs uniform sampling and quantization of the voltage analog signal and the current analog signal after analog anti-aliasing filtering at a sampling rate of 20kHz to generate a voltage discrete-time sequence and a current discrete-time sequence.
[0082] S15. The edge computing unit inputs the voltage discrete-time sequence and the current discrete-time sequence into the digital filtering module, and extracts the fundamental component, harmonic component and interharmonic component through the finite-length unit impulse response filter to generate the power quality high-speed sampling sequence.
[0083] S16. The edge computing unit binds the fuel consumption, the carbon emission factor, and the oxidation conversion factor according to the time window corresponding to the current data block to generate the low-speed parameter sequence of the energy carbon factor.
[0084] S17. The edge microcontroller reads the crystal core operating temperature, power supply ripple amplitude, data transmission queue depth, and the physical clock synchronization estimation error after non-clock factor filtering constraints returned from the previous data aggregation update cycle, and forms a local physical state feature vector.
[0085] S18. The edge microcontroller inputs the normalized local physical state feature vector into the crystal oscillator drift prediction and compensation model, and calculates the total cumulative drift time in the next data aggregation and update cycle according to the existing model parameters.
[0086] S19. The edge microcontroller generates a pre-compensation confidence level based on the prediction error of the previous data aggregation update cycle, and uses the pre-compensation confidence level to adjust the deduction of the total accumulated drift time from the original local timestamp to obtain the pre-compensation timestamp.
[0087] S110, The edge microcontroller encapsulates the high-speed power quality sampling sequence, the low-speed energy carbon factor parameter sequence, the data block identifier, the node physical address identifier, and the pre-compensation timestamp into an uplink data packet, and sends it to the data processing center through the network communication interface.
[0088] In this embodiment, it should be noted that, for S11, the power parameter sensor is used to acquire voltage and current analog signals. These signals are continuous-time analog quantities that can reflect the power quality status of the circuit where the distributed energy carbon data acquisition node is located. The fuel consumption sensor is used to acquire fuel consumption data, which is used for subsequent carbon emission calculation. The energy carbon factor acquisition unit is used to acquire carbon emission factors and oxidation conversion factors. These carbon emission factors and oxidation conversion factors are not high-frequency physical quantities directly measured by analog sensors, but are provided by a local factor database, a factor configuration table issued by the data processing center, or an external management system interface. The energy carbon factor acquisition unit checks the factor configuration table version number and effective time window in each data aggregation update cycle and writes the factor value corresponding to the current data block into the energy carbon factor low-speed parameter sequence. Thus, the sources of the power quality high-speed sampling sequence and the energy carbon factor low-speed parameter sequence are separately defined, and subsequent processing will not mistakenly treat the carbon emission factor as a high-frequency phase signal.
[0089] For S12, the analog signal conditioning circuit is located between the power parameter sensor and the analog-to-digital converter (ADC) to regulate the voltage and current analog signals to within the ADC's allowable input range. This conditioning process includes isolation amplification, amplitude scaling, and bias correction. Isolation amplification reduces the impact of strong primary-side electrical signals on the edge computing unit; amplitude scaling ensures the signal peak does not exceed the ADC's input upper limit; and bias correction enables the bipolar AC signal to be sampled by the single-supply ADC. The gain parameters of the analog signal conditioning circuit are obtained through pre-commissioning calibration. Specifically, using traceable standard voltage and current sources, calibration signals are input at 50%, 100%, and 120% of the rated voltage, respectively. The ratio between the ADC input amplitude and the standard input amplitude is recorded, and a set of gain parameters with the smallest error is used as the conditioning gain. These gain parameters are written into the configuration area of the distributed energy and carbon data acquisition node.
[0090] For S13, the analog anti-aliasing filter is placed before the analog-to-digital converter (ADC) to suppress analog frequency components higher than the Nyquist frequency from entering the sampling link. Since the ADC has a sampling rate of 20kHz, corresponding to a Nyquist frequency of 10kHz, the analog anti-aliasing filter can set the passband cutoff frequency to 8kHz and the stopband start frequency to 10kHz. The passband cutoff frequency and the stopband start frequency are derived from the sampling rate and power quality analysis frequency band requirements. Specifically, before system commissioning, common load waveforms and standard harmonic signals are input into the acquisition link. The fundamental amplitude error, harmonic amplitude error, and high-frequency aliasing residue after sampling are compared under different analog anti-aliasing filter parameters. A set of parameters that can retain the target analysis frequency band and suppress high-frequency components before sampling is selected. This parameter can be adjusted according to the load type, but it should meet the requirement that the stopband start frequency is not higher than the Nyquist frequency.
[0091] For S14, the analog-to-digital converter (ADC) is driven by the local crystal oscillator clock source. The nominal clock frequency of the local crystal oscillator clock source can be selected as 100MHz, and the sampling rate of the ADC can be obtained by frequency division. In this embodiment, the sampling rate is 20kHz, one data block contains 4096 sampling points, and the time length of one data block is 0.2048s. The data block time length is different from the data aggregation update cycle. The data block time length is used to determine the granularity of block-by-block sampling and block-by-block timestamp latching, and the data aggregation update cycle is used to determine the cycle of central-end error generation and edge-side model update. A 10s data aggregation update cycle can contain multiple complete data blocks. The data aggregation update cycle is determined based on the edge-side buffer capacity, network upload latency, and central-end error feedback frequency. Specifically, during the system trial operation phase, data block cache usage, network transmission completion rate, singular value decomposition time at the central end, and edge model update stability were tested under candidate periods of 1s, 5s, 10s, and 30s. The shortest stable period that could complete data aggregation, central end calibration, and downlink control signaling backhaul before the start of the next period was selected as the data aggregation update period. For example, if there is occasional packet backlog in the 5s period, but central end processing and backhaul can be completed within 8s in the 10s period, then the data aggregation update period can be set to 10s. This parameter is derived from real-time processing capabilities and energy-carbon synchronization requirements. Specifically, by testing cache usage, fast Fourier transform processing time, and network transmission latency under different data block lengths on the edge computing unit, the data block length that can be stably processed under the current hardware computing power was selected.
[0092] For S15, the digital filtering module extracts digital components from the sampled discrete-time voltage and current sequences. The finite-length unit impulse response filter can adopt a 128th-order window function structure, where the low-pass branch passband cutoff frequency is set to 2.5kHz, the stopband start frequency is set to 3kHz, and the stopband attenuation is not less than 60dB. The digital filtering module is not used to eliminate aliasing that has already occurred before sampling, but rather to extract the fundamental, harmonic, and interharmonic components from the sampled discrete sequence. The filter order, passband cutoff frequency, stopband start frequency, and stopband attenuation are derived from the frequency response calibration before commissioning. Specifically, using a standard signal source, 50Hz fundamental, 2nd to 50th harmonic, and interharmonic test signals are input respectively. The amplitude and phase errors of filters of different orders are compared. Under the premise of meeting the real-time processing time of the edge computing unit, a set of filter parameters whose amplitude and phase errors both meet the preset accuracy requirements are selected.
[0093] For S16, the low-speed parameter sequence of the energy carbon factor consists of fuel consumption, carbon emission factor, and oxidation conversion factor. The fuel consumption is read according to the sampling period of the fuel consumption sensor, and the carbon emission factor and oxidation conversion factor are read according to the effective time window of the factor configuration table. For a high-speed power quality sampling data block, the edge computing unit determines the corresponding time window based on the pre-compensation timestamp and the data block duration, and binds the fuel consumption, carbon emission factor, and oxidation conversion factor within the same time window to that data block. If the factor configuration table undergoes a version switch within the data block time window, the energy carbon factor acquisition unit segments the window according to the effective time in the configuration table and records the factor values corresponding to different effective time periods. Thus, the time validity of the low-speed parameters corresponds to the high-speed sampling sequence.
[0094] The low-speed energy carbon factor parameter sequence is a set of low-frequency management parameters bound to the high-speed power quality sampling sequence according to the data block time window. Its general technical object is the low-speed energy carbon parameter record used for carbon emission accounting. The input data includes fuel consumption, carbon emission factor, oxidation conversion factor, factor configuration table version number and effective time window. The generation method is to determine the time window based on the pre-compensation timestamp of the current data block and the data block length, and then read the effective fuel consumption and factor values within the time window. The output result is a parameter record with data block identifier and time window number. The unit or type is determined by the specific parameters. Among them, fuel consumption can be in mass unit or volume unit, and carbon emission factor and oxidation conversion factor adopt the numerical type given in the configuration table. The usage stage is the binding and fusion stage after the synchronously calibrated power quality sampling sequence is generated. The technical function is to enable the low-speed energy carbon factor to participate in carbon emission accounting according to the effective time window, without participating in frequency domain phase decoupling.
[0095] For S17, the local physical state feature vector is used to describe the drift formation conditions of the local crystal oscillator clock source. The crystal core operating temperature is read by a digital temperature sensor located near the crystal oscillator, the power supply ripple amplitude is read by the power management chip or analog-to-digital converter channel, the data transmission queue depth is read by the underlying driver of the network communication interface, and the physical clock synchronization estimation error after non-clock factor filtering constraints, transmitted back from the previous data aggregation update cycle, is provided by downlink control signaling. All four types of variables are normalized before entering the crystal oscillator drift prediction and compensation model. The upper and lower limits of normalization are derived from pre-commissioning environmental tests, power supply disturbance tests, and network load tests. Specifically, the crystal core operating temperature range can be set to -20℃ to 85℃, and the power supply ripple amplitude range can be determined based on the power module design specifications and on-site measurement data. The power supply ripple amplitude range is determined based on the power module specifications and on-site trial operation sampling data. Specifically, first, the upper limit of the ripple design of the power module of the distributed energy carbon data acquisition node is read. Then, the power ripple amplitude is collected under no-load, rated load, full network load transmission, and high and low temperature environments. After removing isolated spikes caused by the instantaneous communication startup, the ripple amplitude distribution is statistically analyzed. The minimum observed value of the ripple amplitude under normal operating conditions is used as the lower limit of normalization, and the 95th percentile value under normal operating conditions or the upper limit of the power module design is used as the upper limit of normalization. For example, if the power ripple amplitude is mainly distributed between 8mV and 42mV during field trial operation, and the upper limit of the power module design is 50mV, then 0mV to 50mV can be set as the normalized range of the power ripple amplitude. The data transmission queue depth range can be determined according to the network communication interface buffer capacity. The physical clock synchronization estimation error range after filtering out constraints by non-clock factors can be determined according to the maximum drift specification of the local crystal oscillator clock source and the data aggregation update cycle.
[0096] The local physical state feature vector is a fixed-length data vector formed before inputting the crystal oscillator drift prediction and compensation model. Its general technical object is the edge-side state data characterizing the local clock drift formation conditions. The input data includes the crystal core operating temperature, power supply ripple amplitude, data transmission queue depth, and the physical clock synchronization estimation error returned from the previous data aggregation update cycle. The generation method is to read the above data in a fixed field order and normalize them according to the upper and lower limits of the range respectively. The output result is a set of dimensionless normalized values for the crystal oscillator drift prediction and compensation model to read. The usage stage is the source-end pre-compensation timestamp generation stage. The technical function is to enable temperature, power supply disturbance, communication queuing status, and the clock error of the previous cycle to participate in drift prediction. For example, if the operating temperature range of the crystal oscillator core is -20℃ to 85℃, and the current temperature is 58℃, the current temperature will be converted into a normalized temperature component within this range; if the data transmission queue depth range is 0 bytes to 65536 bytes, and the current queue depth is 32000 bytes, it will be converted into a normalized queue component, and combined with other components in a fixed order to form a local physical state feature vector.
[0097] For S18, the crystal oscillator drift prediction and compensation model is a time-series computing unit deployed on the distributed energy and carbon data acquisition node side. Its input is the normalized local physical state feature vector, and its output is the total cumulative drift time in the next data aggregation and update cycle. The crystal oscillator drift prediction and compensation model includes an input buffer, a hidden layer state storage area, a gated hidden layer parameter area, and an output layer weight matrix area. At the beginning of each data aggregation and update cycle, the edge microcontroller first writes the crystal core operating temperature, power supply ripple amplitude, data transmission queue depth, and the physical clock synchronization estimation error (after removing constraints from non-clock factors) returned from the previous data aggregation and update cycle into the input buffer according to a fixed field order. Then, it reads the hidden layer state saved in the previous data aggregation and update cycle from the hidden layer state storage area. Subsequently, based on the weights, biases, and limiting parameters already saved in the gated hidden layer parameter area, it performs weighting, bias superposition, and limiting activation processing on the current input component and the previous hidden layer state, respectively, to obtain the current hidden layer representation vector. Then, it reads the current output layer weight matrix from the output layer weight matrix area and maps the current hidden layer representation vector to a normalized drift prediction value. Finally, according to the drift time range calibrated before commissioning, it converts the normalized drift prediction value into the total cumulative drift time and saves the current hidden layer representation vector as the previous hidden layer state for the next data aggregation and update cycle. The initial parameters of the model are derived from pre-commissioning calibration data. Specifically, the distributed energy and carbon data acquisition nodes are placed in a temperature-controlled environment and a power supply disturbance environment. Multiple temperature ranges, power ripple levels, and network transmission queue load levels are set. An external reference timing device is used to record the real clock drift within each data aggregation and update cycle. The local physical state characteristics and real clock drift obtained from a limited number of acquisitions are used as calibration samples. In the offline calibration device, the calibration samples are read in the order of the input fields. The error between the predicted drift and the real clock drift is calculated for each group, and the gated hidden layer parameters and the output layer weight matrix are adjusted in the direction of error reduction. When the average drift error of the validation samples does not exceed the engineering allowable value, the corresponding parameters are written to non-volatile memory. For example, 200 sets of samples are collected at -10℃, 25℃, 58℃, and 75℃ respectively. When the average drift error of the validation samples is less than 30ns, these parameters are used as the initial model parameters.
[0098] For S19, the pre-compensation reliability is used to adjust the impact of the total accumulated drift time on the original local timestamp. When the prediction error of the previous data aggregation update cycle is small, the edge microcontroller sets the pre-compensation reliability to a higher value; when the prediction error of the previous data aggregation update cycle is large, the edge microcontroller sets the pre-compensation reliability to a lower value to reduce the deduction of the total accumulated drift time on the original local timestamp. The error limiting benchmark value of the pre-compensation reliability is derived from the drift statistics data before commissioning. Specifically, under different temperature gradients, different power supply ripple amplitudes, and different network transmission queue depths, the prediction error distribution of the crystal oscillator drift prediction compensation model is statistically analyzed, and the 95th percentile value of the prediction error under normal operating conditions or the upper limit of the engineering allowable error is used as the error limiting benchmark value. If higher synchronization accuracy is required on-site, a lower error limiting benchmark value can be used.
[0099] The pre-compensation confidence level ranges from 0 to 1. Its input data includes the total cumulative drift time output by the crystal oscillator drift prediction compensation model in the previous data aggregation update cycle, the physical clock synchronization estimation error returned by the data processing center, and the error limiting benchmark value. The generation method involves first calculating the absolute deviation between the total cumulative drift time and the returned error, then comparing this absolute deviation with the error limiting benchmark value, and converting it into pre-compensation confidence level according to a monotonically decreasing rule where a smaller deviation results in higher confidence. The output is a dimensionless coefficient used to adjust the timestamp deduction. It is used during the pre-compensation timestamp generation stage. Its technical function is to prevent the timestamp from being corrected based on the entire predicted drift amount when the model prediction error is large. For example, if the deviation between the predicted drift amount and the returned error in the previous cycle is 5 ns, and the error limiting benchmark value is 50 ns, then the deviation is only one-tenth of the benchmark value, resulting in a pre-compensation confidence level of approximately 0.9048. If the deviation increases to 50 ns, the pre-compensation confidence level decreases, and the edge microcontroller correspondingly reduces the deduction of the original local timestamp.
[0100] The pre-compensation timestamp is generated according to the following formula:
[0101]
[0102] in, This represents the pre-compensation timestamp of the r-th data block within the q-th data aggregation and update cycle of the m-th distributed energy and carbon data acquisition node. This represents the original local timestamp of the r-th data block of the m-th distributed energy and carbon data acquisition node within the q-th data aggregation and update cycle. This represents the pre-compensation ratio coefficient. This represents the pre-compensation reliability of the m-th distributed energy and carbon data acquisition node during the q-th data aggregation and update cycle. This represents the total cumulative drift time predicted by the m-th distributed energy and carbon data acquisition node at the beginning of the q-th data aggregation and update cycle.
[0103] The pre-compensation proportional coefficient is derived from the calibration of control variables before commissioning. Specifically, multiple temperature ranges are set in the high and low temperature environment chamber, multiple power ripple amplitudes are set on the controllable power supply platform, and multiple data transmission queue depths are set on the network simulation platform. The post-compensation timestamp residuals under different pre-compensation proportional coefficients are recorded respectively. A set of coefficients with small average residuals under normal operating conditions and without continuous overcompensation is selected as the pre-compensation proportional coefficient. One selectable value is 0.78. The source of the pre-compensation reliability is the prediction error statistics within the previous data aggregation and update cycle. Its calculation logic is controlled by the error limit benchmark value, which is determined by the pre-commissioning drift statistics and the on-site synchronization accuracy requirements.
[0104] For S110, the uplink data packet includes a high-speed power quality sampling sequence, a low-speed energy carbon factor parameter sequence, a data block identifier, a node physical address identifier, and a pre-compensation timestamp. The data block identifier is used by the data processing center to determine whether the data from each channel belongs to the same time window. The node physical address identifier is used to transmit the physical clock synchronization estimation error generated at the center, after removing constraints from non-clock factors, back to the corresponding node. The pre-compensation timestamp is used by the center to generate a network-wide reference timestamp and a channel time offset vector. The uplink data packet can be sent via Ethernet, Industrial Ethernet, or other communication links that support data block transmission. The choice of network transmission protocol does not affect the synchronization error prediction and compensation logic of this embodiment, as long as the data processing center can parse the above fields.
[0105] In some optional embodiments, regarding S1, assuming a distributed energy and carbon data acquisition node operates in a summer industrial park environment, the crystal oscillator core operating temperature is 58°C, the data transmission queue depth is 32,000 bytes, and the total cumulative drift time output by the crystal oscillator drift prediction and compensation model in the next data aggregation update cycle is 285.6 ns. In the previous data aggregation update cycle, the deviation between the physical clock synchronization estimation error returned by the central end after non-clock factor filtering constraints and the predicted total cumulative drift time is 5 ns, the error limit benchmark value is 50 ns, and the pre-compensation confidence can be calculated based on this deviation to be approximately 0.9048. If the pre-compensation ratio coefficient is 0.78, then the timestamp deduction is approximately 201.56 ns. If the original local timestamp is 12.000000800s, then the pre-compensation timestamp is 12.00000059844s. In this embodiment, the pre-compensation timestamp is affected by the total accumulated drift time, the pre-compensation ratio coefficient, and the pre-compensation reliability. It is not simply the original local timestamp that is subtracted from the full value of the total accumulated drift time.
[0106] like Figure 3 As shown, in one specific embodiment, S2 includes:
[0107] S21. The data processing center receives uplink data packets sent by each distributed energy and carbon data acquisition node, and parses the pre-compensation timestamp, node physical address identifier, and data block identifier in each uplink data packet.
[0108] S22. The data processing center reorders the uplink data packets within the same data aggregation and update cycle in ascending order according to the pre-compensation timestamp, and selects the pre-compensation timestamp with the smallest value as the network-wide reference timestamp.
[0109] S23. The data processing center calculates the time difference between the pre-compensation timestamp of each channel and the network-wide reference timestamp, and generates a channel time offset vector.
[0110] S24. The data processing center converts each time difference in the channel time offset vector into an integer quantized sampling point offset, and performs integer sampling point translation on the power quality high-speed sampling sequence of the corresponding channel based on the integer quantized sampling point offset. The missing boundary samples after translation are filled in by adjacent data blocks or marked as invalid, thus completing the first-level coarse alignment in the time domain.
[0111] S25. The data processing center performs discrete cross-correlation calculation on the high-speed sampling sequence of power quality of the channel under test after the first-level time-domain coarse alignment and the high-speed sampling sequence of power quality of the reference channel, extracts the cross-correlation main peak index and its adjacent cross-correlation amplitude, and obtains the fractional sampling point offset by continuous quadratic parabolic fitting.
[0112] S26. The data processing center combines the integer quantization sampling point offset with the fractional sampling point offset to obtain a continuous delay estimate, and uses the continuous delay estimate as the initial delay constraint for subsequent frequency domain phase compensation.
[0113] In this embodiment, it should be noted that, for S21, the data processing center receives uplink data packets from multiple distributed energy and carbon data acquisition nodes through a high-speed network interface. Since each uplink data packet may traverse different network paths or experience different queuing times in network switching equipment, the arrival time at the data processing center alone cannot reflect the actual acquisition time. The data processing center parses the pre-compensation timestamp, node physical address identifier, and data block identifier from the uplink data packets. The pre-compensation timestamp is used for sorting and coarse alignment, the node physical address identifier is used for subsequent error feedback, and the data block identifier is used to determine whether multiple channel data belong to the same data aggregation and update cycle. If the data block identifier is missing, duplicated, or discontinuous, the data processing center marks the corresponding channel as a transient low-confidence channel and suspends the use of that channel's data for updating the crystal oscillator drift prediction compensation model.
[0114] For S22, the data processing center only reorders data packets with matching data block identifiers within the same data aggregation update cycle in ascending order. The sorting is based on the pre-compensation timestamp, not the uplink data packet arrival time. The pre-compensation timestamp with the smallest value is determined as the network-wide reference timestamp. This network-wide reference timestamp is used to form a unified timeline starting point for the entire network. The network-wide reference timestamp is not fixed to a single physical node, but is determined by the sorting results of the pre-compensation timestamps of each channel within the same data aggregation update cycle. In this way, even if a node experiences a delay in arrival due to network queuing or significant transmission latency, its pre-compensation timestamp can still participate in the sorting.
[0115] Before selecting the network-wide baseline timestamp, the data processing center first performs a validity screening on data packets within the same data aggregation and update cycle. The screening includes checking for continuous data block identifiers, matching node physical address identifiers, whether the pre-compensation timestamp falls within the allowed time range of the current data aggregation and update cycle, and whether the change in pre-compensation timestamps between adjacent cycles exceeds the allowable jump variable. Only data packets that pass the validity screening participate in the selection of the network-wide baseline timestamp. If the pre-compensation timestamp of a certain channel is earlier than other channels but simultaneously has discontinuous data block identifiers or timestamp jumps, then that channel will not be used as the source of the network-wide baseline timestamp and will be marked as a transient low-reliability channel. For example: the allowed time range of the current data aggregation and update cycle is 10.000000000s to 20.000000000s; if a certain channel's pre-compensation timestamp is 9.999200000s and its data block identifier is discontinuous with the previous cycle, then that channel will not participate in the selection of the network-wide baseline timestamp.
[0116] For S23, the channel time offset vector is composed of the time difference between the pre-compensated timestamp of each channel and the reference timestamp of the entire network. This vector preserves the time offset relationship between each channel and the reference channel. The channel time offset vector is the direct input for the first-level coarse alignment in the time domain and also provides an initial range for subsequent continuous delay estimation. When generating the channel time offset vector, the data processing center also records the node physical address identifier corresponding to each time difference, so that the subsequent continuous delay estimation value, the time-frequency coupled linear phase slope term, the constant phase intercept, and the physical clock synchronization estimation error after filtering out constraints from non-clock factors can correspond to the specific distributed energy and carbon data acquisition node.
[0117] For S24, the integer quantization sampling point offset is calculated from the time difference in the channel time offset vector and the analog-to-digital converter sampling rate. Since the sampling sequence is stored as discrete sampling points, the coarse alignment stage first performs integer sampling point-level translation processing. If the pre-compensation timestamp of the channel under test is later than the network reference timestamp, the power quality high-speed sampling sequence of the channel under test is translated in the time advance direction by the corresponding integer sampling point number; if the pre-compensation timestamp of the channel under test is earlier than the network reference timestamp, the power quality high-speed sampling sequence of the channel under test is translated in the time delay direction by the corresponding integer sampling point number. Missing samples at the beginning or end of the block after translation are filled in by adjacent data blocks. If they cannot be filled in, they are marked as invalid boundary samples and do not participate in the cross-correlation main peak calculation. For example, if the sampling rate is 20kHz and the channel time difference is 40μs, which is converted to 0.8 sampling points and rounded to 1 sampling point, the data processing center first translates 1 sampling point and then marks the newly added sample position at the boundary as an invalid sample.
[0118] For S25, the discrete cross-correlation calculation is used to extract residual offsets of less than one sampling period from the sequence after the first-level time-domain coarse alignment. The data processing center selects one sorted high-speed power quality sampling sequence as the reference channel sequence, or it can select the channel with the highest historical synchronization reliability score as the reference channel sequence. The rules for determining the reference channel are obtained through configuration before commissioning. Specifically, during the initial operation phase of the system, the phase fitting residuals, singular value condition numbers, and continuous period error change rates of each channel in multiple data aggregation and update cycles are compared, and the channel with a higher synchronization reliability score and higher data packet integrity rate is selected as the reference channel. If the reference channel becomes a transient low-reliability channel in the current cycle, the data processing center can switch to the candidate reference channel of the previous cycle.
[0119] The envelope validity threshold used to initiate discrete cross-correlation calculations is obtained based on a finite number of historical calibration data. Specifically, in a laboratory environment, standard voltage and current signals at 1%, 5%, 10%, 50%, 100%, and 120% of their rated ranges are input to the acquisition link. The root mean square (RMS) amplitudes of the first-stage time-domain coarse-aligned sequence are statistically analyzed under different input amplitudes. The RMS amplitude of the sampling link noise floor is recorded when the input is shorted or connected to a zero-input standard condition. Three times the RMS amplitude of the noise floor or the lowest RMS amplitude that can stably form the main peak of cross-correlation is used as the envelope validity threshold. If the RMS amplitude of the current data block is lower than the envelope validity threshold, the data processing center suspends the discrete cross-correlation calculation for that data block and uses the continuous delay estimate of the previous valid data block on that channel. For example, if the root mean square amplitude of the sampling link noise floor under zero-input conditions is 0.05% of the full scale, then the envelope validity threshold can be taken as 0.15% of the full scale; if the root mean square amplitude of the current data block is lower than this threshold, then the data block will not participate in the extraction of the main cross-correlation peak.
[0120] For S26, the continuous delay estimate is obtained by combining the integer quantization sampling point offset and the fractional sampling point offset. This continuous delay estimate serves as the initial delay constraint for subsequent frequency domain phase compensation, rather than being directly used as the final clock error feedback. This is because the continuous delay estimate may still contain channel propagation path differences, local noise, and cross-correlation peak localization errors. Subsequent step S3 requires further extraction of the residual delay shift and the relative frequency deviation of the physical clock through characteristic frequency point screening, the multi-channel characteristic correlation matrix of the energy carbon matrix, and singular value decomposition.
[0121] In some optional embodiments, regarding S2, it is assumed that the sampling rate is 20kHz, corresponding to a sampling period of 50μs. The pre-compensation timestamp for channel 1 is 10.000000000s, and the pre-compensation timestamp for channel 2 is 10.000040000s, with a time difference of 40μs between channel 2 and channel 1. The data processing center multiplies this time difference by the sampling rate to obtain an unrounded sampling point offset of 0.8 sampling points. If the rounded integer quantization sampling point offset is 1 sampling point, the data processing center first performs an integer shift of 1 sampling point on channel 2 and pads or invalidates boundary samples. Subsequently, the data processing center calculates a fractional sampling point offset of −0.2 sampling points through discrete cross-correlation. The combination of these two results in a continuous delay estimate of 0.8 sampling points, corresponding to a time of 40μs. In this embodiment, a positive offset indicates that the channel under test lags behind the reference channel, and a negative offset indicates that the channel under test is ahead of the reference channel.
[0122] like Figure 4 As shown, in one specific embodiment, S3 includes:
[0123] S31. The data processing center performs windowing processing and fast Fourier transform on the power quality high-speed sampling sequence of each channel after the first-level time-domain coarse alignment to obtain the complex spectrum corresponding to each channel.
[0124] S32. The data processing center selects candidate feature frequency points within the effective analysis bandwidth, calculates the local signal-to-noise ratio of each candidate feature frequency point, and removes candidate feature frequency points whose local signal-to-noise ratio is lower than the feature frequency point signal-to-noise ratio threshold.
[0125] S33. The data processing center calculates the phase linearity score for the candidate feature frequency points selected by the signal-to-noise ratio, and removes the candidate feature frequency points whose phase linearity scores are lower than the phase linearity threshold to obtain the feature frequency points used to construct the matrix.
[0126] S34. The data processing center generates a multi-channel relative phase difference vector based on the relative phase difference between the channel under test and the reference channel at the characteristic frequency point.
[0127] S35. The data processing center constructs a multi-channel feature correlation matrix of energy and carbon, using the physical angular frequency corresponding to each of the characteristic frequency points as the first column element and the constant term as the second column element.
[0128] S36. The data processing center performs singular value decomposition on the energy carbon multi-channel feature correlation matrix to obtain a left orthogonal matrix, a diagonal singular value matrix and a right orthogonal matrix, and calculates the singular value condition number.
[0129] S37. When the singular value condition number is not greater than the condition number threshold, the data processing center constructs a generalized pseudo-inverse matrix based on the left orthogonal matrix, the diagonal singular value matrix and the right orthogonal matrix, and uses the generalized pseudo-inverse matrix to project and solve the multi-channel relative phase difference vector to obtain the time-frequency coupled linear phase slope term and constant phase intercept.
[0130] S38. When the singular value condition number is greater than the condition number threshold, the data processing center reduces the selection priority of candidate feature frequency points with low phase linearity scores, reconstructs the energy carbon multi-channel feature correlation matrix, and re-executes singular value decomposition.
[0131] S39. The data processing center converts the time-frequency coupled linear phase slope term into a residual time delay shift, and constructs an all-pass phase shift compensation factor in the frequency domain based on the residual time delay shift, and performs frequency domain phase shift compensation on the complex spectrum of the power quality high-speed sampling sequence of each channel.
[0132] S310. The data processing center calculates the physical clock relative frequency deviation based on the constant phase intercept change of adjacent data blocks, performs linear recalibration on the sampling time within the data block based on the physical clock relative frequency deviation, performs inverse fast Fourier transform and interpolation resampling on the signal after frequency domain phase shift compensation, and outputs a synchronously calibrated power quality sampling sequence.
[0133] After the continuous delay estimate enters the frequency domain processing stage, it is not directly used as the final synchronization error output, but rather as the initial constraint for phase unwrapping and feature frequency point selection. The data processing center estimates the phase change range of the channel under test relative to the reference channel at each candidate feature frequency point based on the continuous delay estimate, and uses this estimated phase change range as the basis for phase unwrapping direction and phase jump identification when calculating the relative phase difference. If the relative phase difference of a candidate feature frequency point continuously deviates from the estimated phase change range corresponding to the continuous delay estimate, the candidate feature frequency point is downgraded in selection priority or enters phase linearity screening. For example, when the continuous delay estimate obtained after the first-level coarse time-domain alignment is 40 μs, the data processing center uses the frequency-related phase trend corresponding to this delay as an initial reference to check whether the phase difference of the candidate frequency point changes around this trend, thereby reducing the misselection of feature frequency points caused by incorrect phase unwrapping direction.
[0134] In this embodiment, it should be noted that, for S31, the windowing process is used to reduce the impact of data block boundary truncation on frequency domain phase difference extraction. The window function type can be a Hanning window, a Hamming window, or other window functions suitable for power quality analysis. The window function type is derived from the frequency domain leakage test before commissioning. Specifically, a standard sinusoidal signal with a frequency close to the analysis frequency boundary is input to the acquisition link, and the main lobe width, side lobe attenuation, and phase estimation stability under different window functions are compared. A window function that meets the requirements for frequency domain phase difference extraction is selected. The length of the Fast Fourier Transform can be consistent with the data block length, or zero-padding can be performed to improve the frequency grid subdivision when computational resources allow.
[0135] The effective analysis bandwidth and the number of candidate feature frequency points are determined based on the power quality analysis frequency band and the data block frequency resolution. The input data for the effective analysis bandwidth includes the analog-to-digital converter sampling rate, data block length, passband range of the digital filter module, and the fundamental, harmonic, and interharmonic frequency ranges to be analyzed. The generation method involves first determining the Fast Fourier Transform frequency resolution based on the sampling rate and data block length, then eliminating DC components, boundary frequencies close to the Nyquist frequency, and frequencies falling into significant interference bands. The output is a set of candidate feature frequency points that can participate in phase difference extraction. The usage stage is the frequency domain feature frequency point screening stage. This technique aims to avoid the impact of low-frequency drift, boundary leakage, and high-frequency aliasing on phase fitting. For example, with a sampling rate of 20kHz and a data block length of 4096 sampling points, the frequency resolution is approximately 4.8828Hz. If the power quality analysis focuses on the 50Hz to 2500Hz range, 100 candidate feature frequency points can be initially selected within this range based on frequency intervals and amplitude stability, and then further filtered using the signal-to-noise ratio.
[0136] For S32, the characteristic frequency point signal-to-noise ratio (SNR) threshold is used to filter out frequency points with high local noise. This threshold is obtained based on a limited number of historical calibration data. Specifically, different interference intensities are set in the electromagnetic interference channel simulator, a standard power quality test signal is input to the acquisition link, and the correspondence between the local SNR and the phase estimation variance at each frequency point is recorded. Using the constraint that the root mean square error of the frequency deviation estimation does not exceed 0.2 Hz, the lowest local SNR that meets this constraint is selected as the characteristic frequency point SNR threshold. One selectable value is 12 dB. If the electromagnetic interference intensity is high on-site, this threshold can be increased by repeating the above calibration. The source of this threshold is the electromagnetic interference channel simulation test and the statistical results of the phase estimation error.
[0137] For S33, the phase linearity score is used to determine whether candidate feature frequency points conform to the linear phase law caused by residual time delay. The phase linearity threshold is obtained based on a stable synchronous reference experiment. Specifically, multiple distributed energy carbon data acquisition nodes are driven using a shared reference clock source. Under known channel delay conditions, multiple sets of high-speed power quality sampling sequences are acquired. The residual between the relative phase difference of each candidate frequency point and the linear phase fitting result is calculated, and then the phase linearity score distribution is statistically analyzed. The lowest score that ensures the subsequent singular value condition number is stably lower than the condition number threshold, and the phase fitting residual does not exceed the phase fitting residual threshold, is taken as the phase linearity threshold. One selectable value is 0.85. This threshold is derived from stable synchronous reference experiments, phase residual statistics, and matrix condition number statistics.
[0138] The input data for the phase linearity score includes the relative phase difference, corresponding physical angular frequency, and reference channel identifier of the candidate feature frequency point and its adjacent frequency points. The score is generated by selecting a local frequency neighborhood from the frequency points that have passed the signal-to-noise ratio screening, linearly fitting the relationship between the relative phase difference and the physical angular frequency, calculating the residual of the candidate frequency point's phase value relative to this local linear fitting result, and converting the residual to a score of 0 to 1 according to the upper limit of the residual calibrated before commissioning. The output result is the phase linearity score of the candidate feature frequency point. The usage stage is the secondary screening stage of the feature frequency points, and its technical function is to eliminate unstable frequency points caused by local interference, harmonic distortion, or phase jumps. For example, if the root mean square of the phase residual in the neighborhood of a candidate frequency point is 0.01 rad and the upper limit of the calibrated residual is 0.08 rad, then the candidate frequency point can obtain a high phase linearity score; if the root mean square of the residual is close to or exceeds 0.08 rad, then the candidate frequency point is downgraded or eliminated.
[0139] For S34, the multi-channel relative phase difference vector consists of the relative phase difference between the channel under test and the reference channel at the characteristic frequency point. This relative phase difference is not the original phase value, but rather the difference between the complex spectral phase of the channel under test and the complex spectral phase of the reference channel. The data processing center performs phase unrolling processing on the relative phase difference to avoid abrupt changes caused by phase crossing boundaries. The threshold for phase unrolling processing is derived from a phase continuity test. Specifically, under known continuous time delay variations, multiple sets of phase data are collected, the normal range of phase changes between adjacent frequency points is recorded, and differences exceeding the normal range and approaching phase period jumps are identified as phase unrolling trigger conditions.
[0140] The multi-channel relative phase difference vector is generated separately for each channel under test during calculation. For the m-th channel under test, the data processing center reads the complex spectral phase of the channel under test and the reference channel at the same characteristic frequency point, calculates the phase difference between them, and performs phase expansion processing. The phase differences at each characteristic frequency point are arranged from low to high frequency to form the relative phase difference vector corresponding to the channel under test. The output result is the phase observation data used to solve the time-frequency coupled linear phase slope term and constant phase intercept of the channel under test. The usage stage is the data construction stage before matrix solving. Its technical function is to convert the clock deviations of different channels into solvable phase parameters. For example, if the reference channel is channel one and the channel under test is channel two, 80 expanded phase differences are obtained at 80 characteristic frequency points, forming an 80-dimensional relative phase difference vector corresponding to channel two.
[0141] For S35, the first column of the energy-carbon multi-channel characteristic correlation matrix is the physical angular frequency, and the second column is a constant term. The first column is used to solve for the linear slope of the phase change with frequency, and the second column is used to solve for the constant phase intercept. The time-frequency coupled linear phase slope term corresponds to the residual time delay shift, and the constant phase intercept corresponds to the basic term of the clock phase offset within the data block. This matrix structure is used to solve for the residual time delay related parameters and the phase intercept parameters based on the phase difference at the characteristic frequency points, and to provide separable parameters for subsequent error backpropagation.
[0142] The energy-carbon multi-channel feature correlation matrix is a time-frequency phase parameter solution matrix constructed for high-speed sampling sequences of multi-channel power quality in energy-carbon data acquisition scenarios. Its general technical object is a matrix data structure used for solving linear phase parameters. Input data includes selected feature frequency points, the physical angular frequency corresponding to each feature frequency point, and constant terms. The generation method involves writing the physical angular frequency into the first column and the constant terms into the second column in ascending order of frequency. Each channel under test is paired with its corresponding multi-channel relative phase difference vector. The output result is a matrix used for singular value decomposition and generalized pseudo-inverse projection. It is used in the frequency domain clock error decoupling stage, and its technical function is to separate the slope term (phase changes with frequency) from the intercept term (frequency-independent). The term "energy-carbon" in the matrix name is used to limit the application scenario and data source and does not indicate that carbon emission factors directly participate in the matrix construction.
[0143] For S36, the singular value decomposition is used to determine whether the multi-channel characteristic correlation matrix of the carbon matrix is suitable for stable solution. The singular value condition number is determined by the maximum singular value and the minimum effective singular value, reflecting the ill-conditioning degree of the matrix. The condition number threshold is obtained based on numerical stability calibration. Specifically, sample matrices are constructed under different numbers of characteristic frequency points, different frequency point distribution ranges, and different phase noise levels, and the solution errors of the time-frequency coupled linear phase slope term and constant phase intercept are compared under different singular value condition numbers. When the singular value condition number exceeds a certain value, the solution error increases with the trend of noise amplification, and this value is determined as the condition number threshold. One selectable value is 1000. The source of this threshold is matrix ill-conditioning simulation, phase noise injection test, and parameter solution error statistics.
[0144] For S37, when the singular value condition number is not greater than the condition number threshold, the data processing center uses the singular value decomposition results to construct a generalized pseudo-inverse matrix and performs projection solving on the multi-channel relative phase difference vector. The projection solution outputs two parameters: a time-frequency coupled linear phase slope term and a constant phase intercept. The dimension of the time-frequency coupled linear phase slope term corresponds to time and can be converted into a residual time delay shift; the change in adjacent data blocks of the constant phase intercept can be used to extract the relative frequency deviation of the physical clock. The output of this processing directly serves as one of the sources of the physical clock synchronization estimation error after the constraints are filtered out by non-clock factors in S4.
[0145] For S38, when the singular value condition number exceeds the condition number threshold, it indicates that the distribution of the currently selected feature frequency points or the phase quality may lead to instability in the matrix solution. The data processing center will not directly use the matrix solution result, but will instead reduce the selection priority of candidate feature frequency points with lower phase linearity scores, reconstruct the energy-carbon multi-channel feature correlation matrix, and re-execute singular value decomposition. If the singular value condition number still exceeds the condition number threshold after multiple reconstructions, the data processing center will mark the corresponding channel as a transient low-confidence channel and will not use the parameters of the current period of this channel to update the crystal oscillator drift prediction and compensation model.
[0146] The number of consecutive reconstructions is determined based on the real-time computing power of the central terminal and the number of feature frequency points. Specifically, before commissioning, the total time consumed by singular value decomposition, the number of feature frequency points retained, and the stability of parameter solving are tested under different reconstruction counts. The maximum number of reconstructions that will not cause processing timeouts within the current data aggregation and update cycle is selected as the upper limit of the reconstruction count. For example, when the time consumed by rebuilding the energy-carbon multi-channel feature correlation matrix and performing singular value decomposition is approximately 6ms, and the central terminal reserves 30ms for reconstruction processing time for a single channel, the upper limit of consecutive reconstructions can be set to 5 times. If the singular value condition number still exceeds the condition number threshold after the 5th reconstruction, the channel is marked as a transient low-confidence channel.
[0147] For S39, the residual delay shift is calculated from the time-frequency coupled linear phase slope term. The data processing center constructs a frequency-domain all-pass phase shift compensation factor based on the residual delay shift and performs frequency-domain phase shift compensation on the complex spectrum of each channel. Frequency-domain phase shift compensation is used to handle the subsampling point delay remaining after the first-stage time-domain coarse alignment. Since the subsampling point delay cannot be processed by integer sampling point shifting, the data processing center uses frequency-domain all-pass phase shift compensation to adjust the phase while maintaining the spectral amplitude unchanged.
[0148] For S310, the relative frequency deviation of the physical clock is obtained from the constant phase intercept change of adjacent data blocks. This relative frequency deviation is used for linear recalibration of the sampling times within the data block. The data processing center performs an inverse fast Fourier transform on the frequency-domain phase-shift compensated signal to obtain a real-valued time-domain sequence, and then performs interpolation resampling according to the linearly recalibrated sampling times to obtain a synchronously calibrated power quality sampling sequence. This processing reduces the sampling time offset caused by the local crystal oscillator clock source frequency deviation within the data block. The synchronously calibrated power quality sampling sequence is then bound to the low-speed parameter sequence of the energy carbon factor according to the data block identifier and time window number, providing input for the fusion calculation of energy carbon indicators.
[0149] In some optional embodiments, regarding S3, the data processing center initially selects 100 candidate feature frequency points within the effective analysis bandwidth. After signal-to-noise ratio (SNR) filtering, 86 candidate feature frequency points are retained. After phase linearity filtering, 80 feature frequency points are retained. The data processing center uses these 80 feature frequency points to construct an energy-carbon multi-channel feature correlation matrix and performs singular value decomposition (SVD). If the calculated singular value condition number is 420, which is lower than the condition number threshold of 1000, the data processing center uses the matrix to solve for the time-frequency coupled linear phase slope term and the constant phase intercept. If the singular value condition number is 1500, the data processing center removes several candidate frequency points with low phase linearity scores and reconstructs the energy-carbon multi-channel feature correlation matrix until the singular value condition number meets the condition number threshold requirement or the channel is marked as a transient low-confidence channel.
[0150] like Figure 5 As shown, in one specific embodiment, S4 includes:
[0151] S41. The error generation and feedback module reads the residual time delay shift amount calculated by the time-frequency coupled linear phase slope term on the data processing center side.
[0152] S42. The error generation and feedback module reads the physical clock relative frequency deviation obtained from the change between the constant phase intercept blocks, and calculates the time drift amount formed by the accumulation of frequency deviation based on the data aggregation update cycle duration.
[0153] S43. The error generation and feedback module adds the residual time delay shift and the time drift to generate a physical clock synchronization estimation error after the constraints have been removed by non-clock factors.
[0154] S44. The synchronization quality judgment module reads the phase fitting residual, the number of singular values and the rate of change of continuous period error, and judges whether the physical clock synchronization estimation error after the non-clock factor screening constraint meets the back-up update condition.
[0155] S45. When the physical clock synchronization estimation error after non-clock factor screening constraints meets the backhaul update condition, the data processing center encapsulates the physical clock synchronization estimation error after non-clock factor screening constraints, channel identifier, data aggregation update cycle identifier, phase fitting residual, singular value condition number and check field into downlink control signaling.
[0156] S46. The data processing center transmits the downlink control signaling back to the corresponding distributed energy and carbon data acquisition node.
[0157] S47. The edge microcontroller of the distributed energy and carbon data acquisition node receives the downlink control signaling and verifies the channel identifier, data aggregation update cycle identifier, and verification field.
[0158] S48. After the verification is passed, the edge microcontroller subtracts the total cumulative drift time predicted at the beginning of the current data aggregation update cycle from the physical clock synchronization estimation error in the downlink control signaling after the constraints have been removed by non-clock factors, and obtains the signed prediction error.
[0159] S49. The edge microcontroller reads the signed prediction error, the hidden layer representation vector, and the current output layer weight matrix, and calculates the single-step update amount of the output layer weight matrix.
[0160] S410. The edge microcontroller updates the output layer weight matrix of the crystal oscillator drift prediction compensation model according to the single-step update amount, and writes the updated output layer weight matrix into the running memory.
[0161] S411. When the updated output layer weight matrix passes the stability check within multiple consecutive data aggregation update cycles, the edge microcontroller writes the updated output layer weight matrix into the non-volatile memory according to a preset persistence period.
[0162] S412. When the physical clock synchronization estimation error after the non-clock factor screening constraint does not meet the backhaul update condition, the data processing center only uses it for the center-end calibration record of the current data block and does not trigger the update of the output layer weight matrix of the crystal oscillator drift prediction compensation model.
[0163] In this embodiment, it should be noted that, for S41, the time-frequency coupled linear phase slope term is obtained from the energy-carbon multi-channel characteristic correlation matrix and singular value decomposition in S3, and is used to represent the linear trend of phase change with physical angular frequency. Since residual time delay will cause frequency-related phase shifts at different frequency points, the time-frequency coupled linear phase slope term can be converted into a residual time delay shift. This residual time delay shift is different from the continuous time delay estimate obtained in S2. The continuous time delay estimate in S2 comes from time-domain cross-correlation, while the residual time delay shift in S41 comes from the frequency-domain phase slope term.
[0164] For S42, the constant phase intercept represents a phase offset term within the same data block that is independent of the physical angular frequency. The change in the constant phase intercept between adjacent data blocks can be used to reflect the inter-block phase change caused by the relative frequency deviation of the physical clock. The data processing center obtains the relative frequency deviation of the physical clock based on the change in the constant phase intercept between adjacent data blocks and the data aggregation update cycle duration. It then multiplies this relative frequency deviation by the data aggregation update cycle duration to obtain the time drift caused by the accumulated frequency deviation.
[0165] The input data for the physical clock relative frequency deviation consists of the constant phase intercept, reference frequency point or fundamental frequency, and data aggregation update cycle duration obtained from two adjacent data blocks of the same channel under test. The generation method involves first calculating the constant phase intercept change between adjacent data blocks, then converting this phase change into an equivalent time change, and finally dividing the equivalent time change by the data aggregation update cycle duration to obtain the dimensionless physical clock relative frequency deviation. The output result is used to calculate the time drift caused by the cumulative frequency deviation. It is used in the center-end error estimation stage, and its technical function is to convert the inter-block phase change into the frequency deviation of the local clock relative to the reference channel. For example, if the constant phase intercept change between adjacent data blocks of a channel under test corresponds to an equivalent time change of 320 ns after conversion, and the data aggregation update cycle duration is 10 s, then the physical clock relative frequency deviation is 0.000000032.
[0166] For S43, the physical clock synchronization estimation error after non-clock factor filtering constraints is generated according to the following formula:
[0167]
[0168] in, This represents the physical clock synchronization estimation error of the m-th channel within the q-th data aggregation and update cycle after removing constraints due to non-clock factors. This represents the residual time delay shift calculated by the time-frequency coupled linear phase slope term for the m-th channel during the q-th data aggregation update cycle. This represents the relative frequency deviation of the physical clock for the m-th channel during the q-th data aggregation update cycle. This indicates the duration of the data aggregation and update cycle.
[0169] The physical clock synchronization estimation error, after being constrained by non-clock factors, does not directly originate from the integrated energy and carbon index report, carbon emission calculation errors, or channel fusion residuals. Instead, it is determined by the time drift resulting from the accumulation of residual delay shift and frequency deviation. The integrated energy and carbon index report is a high-level business output; carbon emission calculation errors may be affected by factor update lags and fuel statistics fluctuations, while channel fusion residuals may be affected by sensor noise and network packet loss. The above data is not directly used as feedback error in the crystal oscillator drift prediction compensation model to reduce the influx of non-clock factors into the model update process.
[0170] For S44, the synchronization quality judgment unit controls the feedback update conditions through three judgment quantities. The phase fitting residual is used to determine whether the phase difference at the characteristic frequency point conforms to a linear phase relationship; the singular value condition number is used to determine whether the energy-carbon multi-channel characteristic correlation matrix is suitable for stable solution; and the continuous periodic error change rate is used to determine whether there is a sudden change in the physical clock synchronization estimation error after the constraints have been removed by non-clock factors. The phase fitting residual threshold, condition number threshold, and error change rate threshold are all obtained from pre-commissioning calibration and statistical analysis of a finite number of historical data.
[0171] The phase fitting residual threshold is based on stable synchronous reference experiments and field noise data. Specifically, a shared reference clock source drives multiple distributed energy and carbon data acquisition nodes to collect multiple sets of high-speed power quality sampling sequences under different load and electromagnetic interference conditions. The residual distribution between the relative phase difference of characteristic frequency points and the linear fitting result is calculated. The 95th percentile of the root mean square of the residual under normal operating conditions or the upper limit of the allowable phase error in engineering is used as the phase fitting residual threshold. A selectable value is 0.02 rad. If the current phase fitting residual exceeds this threshold, it indicates that the phase observation quality of the current period is insufficient, and the data processing center does not trigger an end-side model update.
[0172] The error change rate threshold is obtained based on historical clock error changes within continuous data aggregation and update cycles. Specifically, before system commissioning or during trial operation, the physical clock synchronization estimation error of each distributed energy and carbon data acquisition node is recorded within multiple consecutive data aggregation and update cycles after constraints have been removed due to non-clock factors. The ratio of the error difference between adjacent cycles to the duration of the data aggregation and update cycle is calculated, and the error change rate distribution under normal operating conditions is statistically analyzed. The 95th percentile of the error change rate under normal operating conditions or the upper limit of the allowable variation under engineering conditions is used as the error change rate threshold. One selectable value is 5 ns / s. If the current continuous cycle error change rate exceeds this threshold, the current feedback error is not used to update the output layer weight matrix.
[0173] For S45 and S46, the downlink control signaling includes the physical clock synchronization estimation error after non-clock factor filtering constraints, a channel identifier, a data aggregation update cycle identifier, a phase fitting residual, a singular value condition number, and a check field. The channel identifier is used to determine the distributed energy and carbon data acquisition node corresponding to the error; the data aggregation update cycle identifier is used to prevent the reuse of old cycle errors; and the check field is used to detect whether the downlink control signaling has been corrupted by transmission errors. Only when the channel identifier matches, the data aggregation update cycle identifier is consecutive, and the check field passes, does the edge microcontroller read the error for subsequent processing.
[0174] For S47 and S48, the signed prediction error is obtained by subtracting the total cumulative drift time predicted at the beginning of the current data aggregation update cycle from the physical clock synchronization estimation error returned after removing constraints due to non-clock factors. If the signed prediction error is positive, it indicates that the current model's predicted drift is greater than the synchronization estimation error returned from the central end; if the signed prediction error is negative, it indicates that the current model's predicted drift is less than the synchronization estimation error returned from the central end. This sign is used to determine the adjustment direction of the output layer weight matrix.
[0175] For S49 and S410, the input data for the single-step update amount includes the signed prediction error, the hidden layer representation vector, the current output layer weight matrix, the parameter incremental update learning rate constant, and the orthogonal regularization decay coefficient. The edge microcontroller reads the hidden layer representation component corresponding to each weight item in the output layer weight matrix, uses the product of the signed prediction error and the corresponding hidden layer representation component as the update principal term, and superimposes constraint terms related to the current weight value and the orthogonal regularization decay coefficient. The single-step update amplitude is then limited by the parameter incremental update learning rate constant. The output is the single-step update amount corresponding to each weight item in the output layer weight matrix. It is used in the edge incremental update stage after the backpropagation update condition is met. Its technical function is to ensure that the model only makes limited adjustments based on feedback errors related to local clock drift. For example, if a hidden layer representation component is 0.42 and the signed prediction error is 0.85ns, the update principal term for that weight item is determined by both. If the backpropagation update condition is not met in the current period, the update amount is not generated, and the output layer weight matrix remains unchanged.
[0176] The incremental update learning rate constant is obtained based on the stability calibration of the edge-side model update. Specifically, before commissioning, using collected temperature, power supply ripple, network load, and actual drift samples, the update amplitude of the output layer weight matrix, the convergence speed of the prediction error, and the continuous period error fluctuation are tested under different learning rate constants. A set of learning rate constants that can reduce the prediction error without causing large fluctuations in the pre-compensation timestamps of adjacent periods is selected. One selectable value is 0.001. The orthogonal regularization decay coefficient is obtained based on the correlation test of the hidden layer representation vector. Specifically, it involves statistically analyzing the correlation between the hidden layer representation components. If the correlation between different components is strong, the orthogonal regularization decay coefficient is increased to limit the output layer weight matrix from over-reliance on a single representation component; if the correlation is low, a smaller decay coefficient is used. One selectable value is 0.0001.
[0177] For S411, the updated output layer weight matrix is first written to the runtime memory, rather than immediately to the non-volatile memory after each update. This reduces the impact of frequent writes on the lifespan of the non-volatile memory and allows for a rollback to the previous stable parameter after an abnormal update. The stability verification includes ensuring that the phase fitting residual does not exceed a phase fitting residual threshold, the singular value condition number does not exceed a condition number threshold, and the continuous period error change rate does not exceed an error change rate threshold within multiple consecutive data aggregation update cycles. The number of consecutive data aggregation update cycles is determined based on the error stabilization time after the model update. Specifically, before commissioning, the output layer weight matrix update process is simulated using historical sampling data. The number of data aggregation update cycles required for the phase fitting residual, singular value condition number, and continuous period error change rate to stabilize after each update is calculated, and the higher quantile of the number of cycles required for stabilization under normal operating conditions is used as the number of stability verification cycles. For example, if most model updates stabilize within 3 data aggregation update cycles, while a few temperature abrupt changes require 5 data aggregation update cycles, then the stability check cycle count can be set to 5 data aggregation update cycles. Only when the threshold condition is met for 5 consecutive cycles will the data be written to non-volatile memory. The edge microcontroller will only write the updated output layer weight matrix to non-volatile memory according to a preset persistence period when the stability check is passed.
[0178] The preset persistence period is determined based on the write lifetime of the non-volatile memory, the frequency of model parameter changes, and power outage recovery requirements. Specifically, before system commissioning, the erase / write lifetime index of the non-volatile memory is read, the change amplitude of the output layer weight matrix under normal operating conditions within continuous data aggregation and update cycles is statistically analyzed, and the pre-compensation timestamp deviation after power outage recovery is tested under different persistence periods. The period that can reduce frequent writes without affecting model recovery after power outages is selected as the preset persistence period. For example, when the data aggregation and update cycle is 10s, the output layer weight matrix passes the stability check in 6 consecutive cycles, and the non-volatile memory is not suitable for writing every cycle, the preset persistence period can be set to 60s, that is, the non-volatile memory is written to at most once every 6 data aggregation and update cycles.
[0179] For S412, when any judgment quantity does not meet the threshold condition, the data processing center does not transmit the current cycle error back for model update. The data processing center can still save the physical clock synchronization estimation error of the current cycle after filtering out constraints from non-clock factors, for use in the central calibration record, synchronization quality score, and abnormal state analysis of the current data block, but does not trigger the update of the end-side output layer weight matrix.
[0180] In some optional embodiments, regarding S4, assuming that the residual time delay shift calculated from the time-frequency coupled linear phase slope term within the current data aggregation and update cycle for a certain channel under test is −0.85ns, the physical clock relative frequency deviation obtained from the variation between constant phase intercept blocks is 0.000000032, and the data aggregation and update cycle duration is 10s, then the time drift caused by the cumulative frequency deviation is 320ns, and the physical clock synchronization estimation error after filtering out constraints from non-clock factors is 319.15ns. If the current phase fitting residual is 0.006rad, the singular value condition number is 420, and the continuous period error change rate is 0.3ns / s, which do not exceed the corresponding thresholds, then the data processing center determines that the backhaul update condition is met and backhauls the error to the corresponding distributed energy and carbon data acquisition node. If the current phase fitting residual increases to 0.04rad, exceeding the phase fitting residual threshold of 0.02rad, then the end-side model update is not triggered.
[0181] In one specific implementation, the energy-carbon index fusion calculation module reads the synchronously calibrated power quality sampling sequence and the energy-carbon factor low-speed parameter sequence within the same time window, and generates a comprehensive energy-carbon index report. The synchronously calibrated power quality sampling sequence is used to calculate power quality assessment indicators, and the energy-carbon factor low-speed parameter sequence is used to calculate carbon emissions. The synchronization reliability score is jointly determined by the phase fitting residual, the singular value condition number, and the continuous period error change rate. The energy-carbon index fusion calculation module generates synchronization quality weights based on the synchronization reliability score and fuses multi-channel data based on these synchronization quality weights.
[0182] The input data for the power quality assessment index consists of synchronously calibrated voltage sampling sequences, current sampling sequences, sampling rates, data block identifiers, and channel identifiers within the same time window. The index is generated by performing effective value statistics, frequency deviation statistics, harmonic amplitude statistics, and abnormal fluctuation markers on the voltage and current sampling sequences within the same time window. The output results include one or more of the following: effective voltage value, effective current value, frequency deviation, harmonic content, voltage sag marker, or voltage imbalance. The index is used during the comprehensive energy and carbon index report generation stage. Its technical function is to provide bindable electrical parameter results for energy consumption status and power quality status within the same time window. The input data for carbon emissions includes fuel consumption, carbon emission factor, oxidation conversion factor, and time window number. The generation method involves reading valid fuel consumption and factor values from the factor configuration table according to the time window, and obtaining the carbon emissions corresponding to that time window based on the product relationship of fuel consumption, carbon emission factor, and oxidation conversion factor. The output is a carbon emission record with a time window number and node identifier. It is used during the comprehensive energy carbon index report generation stage. Its technical function is to integrate the low-speed energy carbon factor with the synchronized power quality sampling sequence within the same time window. An example data point is: fuel consumption of 120m³ / h within a certain time window. 3 The carbon emission factor is 2.15 kg / m³. 3 With an oxidation conversion factor of 0.99, the carbon emissions for this time window can be calculated using the input values mentioned above, and written into the comprehensive energy carbon index report together with the power quality assessment index for the same time window.
[0183] The input data for the synchronization reliability score includes phase fitting residual, singular value condition number, continuous period error rate of change, and the corresponding thresholds for these three quantities. The score is generated by comparing the proximity of each input quantity to its threshold, mapping smaller phase fitting residual, smaller singular value condition number, and smaller continuous period error rate of change to higher individual scores. The synchronization reliability score is then generated according to preset weights or by taking the minimum value. The output is a dimensionless score from 0 to 1. It is used in the energy and carbon index fusion calculation stage, and its technical function is to reduce the weight of channels with lower synchronization quality in multi-channel fusion. For example, if a channel has a phase fitting residual of 0.006 rad, a threshold of 0.02 rad, a singular value condition number of 420, a threshold of 1000, and a continuous period error rate of change of 0.3 ns / s, a threshold of 5 ns / s, then the synchronization reliability score of this channel is higher than that of channels with an excessive singular value condition number. The energy and carbon index fusion calculation module assigns a higher synchronization quality weight to this channel.
[0184] The baseline data required for the energy intensity analysis is provided by the park's energy and carbon management platform, building management system, or production management system. This baseline data includes the building area, output, equipment runtime, or other configured energy-normalized objects corresponding to the current time window. The data type is a low-speed management parameter with a time window number. It is generated by binding the time window number with a synchronously calibrated power quality sampling sequence and an energy and carbon factor low-speed parameter sequence. The output is baseline data used to calculate energy consumption per unit area, energy consumption per unit output, or energy consumption per unit runtime. It is used during the comprehensive energy and carbon index report generation stage, and its technical function is to provide calculable input for energy intensity analysis. For example, a building area of 12,000 m² within a certain time window. 2 If the window energy consumption is 3600kWh, the energy carbon index fusion calculation module can generate energy consumption per unit building area; if the system is not connected to the above benchmark, the comprehensive energy carbon index report will not output energy intensity analysis items.
[0185] like Figures 6-8As shown in one specific embodiment, the present invention also discloses a time-aware energy and carbon analysis data processing system, the system comprising distributed energy and carbon data acquisition nodes and a data processing center. The distributed energy and carbon data acquisition nodes include an energy parameter sensor, a fuel consumption sensor, an energy and carbon factor acquisition unit, an analog signal conditioning circuit, an analog anti-aliasing filter, an analog-to-digital converter, an edge computing unit, a local crystal clock source, an edge microcontroller, a runtime memory, a non-volatile memory, and a network communication interface. The local crystal oscillator clock source is a local clock reference set within the distributed energy and carbon data acquisition node. Its general technical object is a crystal oscillator, temperature-compensated crystal oscillator, or other clock device capable of providing clock pulses to the analog-to-digital converter and edge microcontroller. Input data includes the crystal oscillator output, frequency division configuration, and timestamp latching request. Generation is achieved by dividing or counting the crystal oscillator output to form a sampling trigger signal and a local count value. Output is the analog-to-digital converter sampling clock and the original local timestamp, in units or types of clock frequency and time count value. It is used in the sampling stages of voltage analog signals and current analog signals, as well as the data block timestamp generation stage. Its technical function is to provide a local time reference for the distributed energy and carbon data acquisition node. An example value is: the nominal frequency of the local crystal oscillator clock source is 100MHz, which, after frequency division, provides a 20kHz sampling trigger signal to the analog-to-digital converter, and latches the current local count value as the original local timestamp when each data block is formed.
[0186] The data processing center includes a central aggregation and coarse alignment module, a time-frequency decoupling and precision calibration module, a synchronization quality judgment module, an error generation and feedback module, and an energy and carbon index fusion calculation module.
[0187] The power parameter sensor is used to acquire analog voltage and current signals. The fuel consumption sensor is used to acquire fuel consumption. The carbon factor acquisition unit is used to acquire carbon emission factors and oxidation conversion factors from a local factor database, a factor configuration table issued by a data processing center, or an external management system interface. The analog signal conditioning circuit is used to perform isolation amplification, amplitude scaling, and bias correction on the analog voltage and current signals. The analog anti-aliasing filter is used to suppress analog frequency components higher than the Nyquist frequency before analog-to-digital conversion. The analog-to-digital converter is used to uniformly sample and quantize the analog voltage and current signals under the drive of a local crystal oscillator clock source. The edge computing unit is used to perform digital filtering and generate a high-speed power quality sampling sequence and a low-speed carbon factor parameter sequence. The local crystal oscillator clock source is used to generate the original local timestamp. The edge microcontroller is used to read the local physical state feature vector, run the crystal drift prediction and compensation model, generate the total cumulative drift time, pre-compensation confidence level, and pre-compensation timestamp, and complete the uplink data packet encapsulation and transmission.
[0188] The central aggregation and coarse alignment module is deployed in the data processing center. It is used to receive uplink data packets sent by each distributed energy and carbon data acquisition node, and parse the pre-compensation timestamp, node physical address identifier, and data block identifier; to reorder the data packets in ascending order according to the pre-compensation timestamp and determine the network-wide reference timestamp; to calculate the channel time offset vector; to complete the first-level time-domain coarse alignment based on the channel time offset vector; and to extract continuous delay estimates by using discrete cross-correlation function and continuous quadratic parabola fitting.
[0189] The time-frequency decoupling and precision calibration module is deployed in the data processing center. It is used to perform fast Fourier transform on the high-speed power quality sampling sequence after the first-level time-domain coarse alignment; to perform signal-to-noise ratio and phase linearity screening on candidate feature frequency points; to construct multi-channel relative phase difference vectors and energy-carbon multi-channel feature correlation matrices; to output time-frequency coupled linear phase slope terms and constant phase intercepts through singular value decomposition, singular value condition number determination, and generalized pseudo-inverse projection decoupling; and to perform frequency domain phase shift compensation based on the time-frequency coupled linear phase slope terms, and to perform linear recalibration of the sampling time within the data block based on the constant phase intercept change, outputting a synchronously calibrated power quality sampling sequence.
[0190] The synchronization quality judgment module is deployed in the data processing center and is used to calculate the phase fitting residual, singular value condition number and continuous period error change rate; to determine whether the physical clock synchronization estimation error after non-clock factor screening meets the backhaul update condition; and to block the update of the output layer weight matrix of the crystal oscillator drift prediction compensation model when the backhaul update condition is not met.
[0191] The error generation and feedback modules are distributed across the data processing center and the distributed energy and carbon data acquisition nodes. At the data processing center, these modules convert the time-frequency coupled linear phase slope term into a residual time delay shift, convert constant phase intercept changes into physical clock relative frequency deviations, generate a physical clock synchronization estimation error (after removing constraints due to non-clock factors) based on the residual time delay shift and the physical clock relative frequency deviation, and encapsulate the physical clock synchronization estimation error (after removing constraints due to non-clock factors) that meets the feedback update conditions into downlink control signaling. At the distributed energy and carbon data acquisition nodes, these modules receive and verify the downlink control signaling, calculate the signed prediction error and the single-step update of the output layer weight matrix, and update the output layer weight matrix of the crystal oscillator drift prediction compensation model.
[0192] The energy-carbon index fusion calculation module is deployed in the data processing center. It is used to associate the synchronously calibrated power quality sampling sequence and the low-speed parameter sequence of the energy-carbon factor according to the same time window; to calculate the power quality assessment index based on the synchronously calibrated power quality sampling sequence; to calculate the carbon emissions based on the low-speed parameter sequence of the energy-carbon factor; and to generate synchronization quality weights by combining the synchronization reliability scores of each channel, and output a comprehensive energy-carbon index report that includes power quality assessment and carbon emission calculation. When the energy-carbon index fusion calculation module also obtains the energy consumption intensity benchmark corresponding to the current time window, the comprehensive energy-carbon index report also includes energy consumption intensity analysis results.
[0193] In a specific application scenario of an integrated energy and carbon monitoring system in an industrial park, the system comprises four distributed energy and carbon data acquisition nodes deployed in four buildings, and one data processing center deployed within the park's energy and carbon management platform. The four distributed energy and carbon data acquisition nodes are physically connected to the data processing center via fiber optic Ethernet links. During peak production periods in the industrial park, electricity load fluctuates, and the local crystal oscillator clock sources within each distributed energy and carbon data acquisition node experience varying degrees of frequency drift due to temperature, power supply ripple, and communication load.
[0194] During the data acquisition and edge pre-compensation phase, each distributed energy and carbon data acquisition node collects analog voltage and current signals for the corresponding building through power parameter sensors, fuel consumption data for boiler rooms or gas equipment through fuel consumption sensors, and carbon emission factors and oxidation conversion factors corresponding to fuel types through the energy and carbon factor acquisition unit. The analog voltage and current signals are processed by analog signal conditioning circuits and analog anti-aliasing filters, and then digitized by an analog-to-digital converter at a sampling rate of 20kHz. The edge computing unit extracts the fundamental, harmonic, and interharmonic components through a digital filtering module to form a high-speed power quality sampling sequence. The edge microcontroller reads the crystal oscillator core operating temperature, power supply ripple amplitude, data transmission queue depth, and the physical clock synchronization estimation error (after removing constraints from non-clock factors) returned from the previous data aggregation update cycle, forming a local physical state feature vector. Subsequently, the crystal oscillator drift prediction compensation model outputs the total cumulative drift time for the next data aggregation update cycle. The edge microcontroller then subtracts the original local timestamp based on the pre-compensation reliability to generate a pre-compensation timestamp.
[0195] In the coarse time-domain alignment stage at the central end, the data processing center receives uplink data packets concurrently uploaded by four distributed energy and carbon data acquisition nodes, reorders them in ascending order according to the pre-compensated timestamps, and selects the pre-compensated timestamp with the smallest value as the network-wide reference timestamp. For the remaining channels, the data processing center calculates the corresponding time difference and converts it into integer quantized sampling point offsets at a sampling rate of 20kHz. After the first-stage coarse time-domain alignment is completed, the data processing center continues to use discrete cross-correlation functions and continuous quadratic parabolic fitting to extract fractional sampling point offsets, thereby obtaining continuous delay estimates. The input to this stage is the high-speed power quality sampling sequence and pre-compensated timestamps of each channel, and the output is the high-speed power quality sampling sequence with coarse alignment and sub-sampling point delay estimation results, with the data streams before and after remaining closed.
[0196] During the time-frequency parameter decoupling stage at the central end, the data processing center selects candidate characteristic frequency points within the effective analysis bandwidth and performs signal-to-noise ratio (SNR) and phase linearity (PLL) screening on these candidate frequency points. Based on the characteristic frequency points selected through dual-condition screening, the data processing center constructs a multi-channel relative phase difference vector and a multi-channel characteristic correlation matrix for energy and carbon. Through singular value decomposition, singular value condition number determination, and generalized pseudo-inverse projection, the data processing center decouples and obtains the time-frequency coupled linear phase slope term and the constant phase intercept. The time-frequency coupled linear phase slope term is converted into a residual time delay shift and used to construct a frequency domain all-pass phase shift compensation factor; the change in adjacent data blocks with the constant phase intercept is used to calculate the relative frequency deviation of the physical clock and further used for linear recalibration of the sampling times within the data block. The resulting synchronously calibrated power quality sampling sequence is used for subsequent energy and carbon index fusion.
[0197] During the error propagation and edge update phase, the error generation and propagation module reads the residual delay shift and the relative frequency deviation of the physical clock, and calculates the physical clock synchronization estimation error after non-clock factor filtering constraints. The synchronization quality judgment module simultaneously calculates the phase fitting residual, singular value condition number, and continuous period error change rate. Only when all three judgment quantities meet the preset threshold conditions will the data processing center encapsulate the physical clock synchronization estimation error after non-clock factor filtering constraints into downlink control signaling and propagate it back to the corresponding distributed energy and carbon data acquisition node. After receiving and verifying the downlink control signaling, the edge microcontroller calculates the signed prediction error and single-step update amount, and updates the output layer weight matrix in the runtime memory. When the updated output layer weight matrix passes the stability check for multiple consecutive data aggregation update cycles, the edge microcontroller writes it to the non-volatile memory according to the preset persistence period.
[0198] In this embodiment, if the data processing center detects that a certain channel has data packet loss, discontinuous data block identification, unstable cross-correlation peak, low phase linearity score, or singular value condition number exceeding the condition number threshold within the current data aggregation and update cycle, the data processing center will not use the abnormal data within the current data aggregation and update cycle of this channel to update the crystal oscillator drift prediction and compensation model. Instead, it will mark this channel as a transient low-confidence channel. For transient low-confidence channels, the energy carbon index fusion calculation module reduces the synchronization quality weight of the corresponding channel, and the error generation and feedback module uses the physical clock synchronization estimation error of the previous valid data aggregation and update cycle of this channel after removing constraints from non-clock factors, until the channel recovers continuous valid data blocks and stable phase decoupling results.
[0199] In this embodiment, the synchronously calibrated power quality sampling sequence refers to the sampling sequence obtained after source-end timestamp pre-compensation, center-end time-domain coarse alignment, frequency-domain phase shift compensation, and sampling time recalibration. The physical clock synchronization estimation error after non-clock factor filtering constraints does not refer to the direct measurement value of the actual physical error, but rather to the estimation based on the time-frequency coupling linear phase slope term and constant phase intercept change, and does not directly use the integrated energy carbon index report, carbon emission accounting error, or channel fusion residual as the source of the feedback error. Through this limitation, this embodiment processes timestamp alignment, low-speed factor binding, and high-level index feedback separately, so that synchronization error compensation acts on the local crystal oscillator drift link of the distributed energy carbon data acquisition node.
[0200] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A time-series-aware energy and carbon analysis data processing method, characterized in that, include: Distributed energy and carbon data acquisition nodes acquire power quality parameters and energy and carbon factor parameters, generate high-speed power quality sampling sequences and low-speed energy and carbon factor parameter sequences, generate original local timestamps based on local crystal oscillator clock sources, and generate pre-compensation timestamps using crystal oscillator drift prediction compensation models and pre-compensation reliability. The data processing center determines the network-wide reference timestamp and channel time offset vector based on the pre-compensated timestamp, and performs a first-level time-domain coarse alignment on the high-speed power quality sampling sequence based on the channel time offset vector to obtain a continuous delay estimate. Based on the continuous delay estimate, the data processing center selects characteristic frequency points in the frequency domain and constructs a multi-channel energy carbon feature correlation matrix. It then performs singular value decomposition on the multi-channel energy carbon feature correlation matrix to obtain a time-frequency coupled linear phase slope term and a constant phase intercept, and outputs a synchronously calibrated power quality sampling sequence. The data processing center generates a physical clock synchronization estimation error after removing constraints from non-clock factors based on the time-frequency coupled linear phase slope term and the constant phase intercept. When the backhaul update condition is met, the physical clock synchronization estimation error after removing constraints from non-clock factors is backhauled to the corresponding distributed energy and carbon data acquisition node to update the crystal oscillator drift prediction compensation model.
2. The energy and carbon analysis data processing method based on time-series awareness according to claim 1, characterized in that, The process by which the distributed energy carbon data acquisition node acquires power quality parameters and energy carbon factor parameters, and generates a high-speed power quality sampling sequence and a low-speed energy carbon factor parameter sequence includes: Voltage and current analog signals are collected using an electrical energy parameter sensor, fuel consumption is collected using a fuel consumption sensor, and carbon emission factor and oxidation conversion factor are obtained using an energy carbon factor acquisition unit. The voltage analog signal and the current analog signal are sequentially subjected to analog signal conditioning, analog anti-aliasing filtering, analog-to-digital conversion and digital filtering to obtain the power quality high-speed sampling sequence. The fuel consumption, carbon emission factor, and oxidation conversion factor are bound according to the time window corresponding to the current data block to obtain the low-speed parameter sequence of the energy carbon factor; The high-speed power quality sampling sequence participates in time-domain coarse alignment, continuous delay estimation, frequency-domain characteristic frequency point screening, singular value decomposition, and synchronous calibration processing. The low-speed parameter sequence of energy carbon factor does not participate in frequency-domain phase decoupling processing and is bound and fused according to data block identifier and time window number after the synchronously calibrated power quality sampling sequence is generated.
3. The energy and carbon analysis data processing method based on time-series awareness according to claim 1, characterized in that, The process of generating a pre-compensation timestamp using a crystal oscillator drift prediction compensation model and pre-compensation confidence includes: The edge microcontroller of the distributed energy and carbon data acquisition node reads the crystal core operating temperature, power supply ripple amplitude, data transmission queue depth, and physical clock synchronization estimation error after non-clock factor filtering constraints returned from the previous data aggregation and update cycle, and forms a local physical state feature vector. The local physical state feature vector is input into the crystal oscillator drift prediction and compensation model in a fixed field order. The hidden layer state saved in the previous data aggregation and update cycle is read, and the total cumulative drift time in the next data aggregation and update cycle is calculated according to the stored model parameters. The pre-compensation confidence level is generated based on the deviation between the total cumulative drift time in the previous data aggregation and update cycle and the physical clock synchronization estimation error after non-clock factor screening constraints. The pre-compensated timestamp is obtained by adjusting the reduction of the total accumulated drift time to the original local timestamp using the pre-compensation confidence level. The high-speed power quality sampling sequence, the low-speed energy carbon factor parameter sequence, the data block identifier, the node physical address identifier, and the pre-compensation timestamp are encapsulated into an uplink data packet and sent to the data processing center.
4. The energy and carbon analysis data processing method based on time-series awareness according to claim 1, characterized in that, The data processing center determines the network-wide reference timestamp and channel time offset vector based on the pre-compensated timestamp, and performs a first-level coarse time-domain alignment on the high-speed power quality sampling sequence based on the channel time offset vector to obtain continuous delay estimates. The process includes: The data processing center parses the pre-compensation timestamp, node physical address identifier, and data block identifier in each uplink data packet, and reorders the uplink data packets within the same data aggregation update cycle in ascending order according to the pre-compensation timestamp. The pre-compensation timestamp with the smallest value is selected as the network-wide reference timestamp, and the time difference between the pre-compensation timestamps of the remaining channels and the network-wide reference timestamp is calculated to generate the channel time offset vector. The time difference in the channel time offset vector is converted into an integer quantized sampling point offset, and the power quality high-speed sampling sequence of the corresponding channel is shifted by integer sampling points based on the integer quantized sampling point offset. The missing boundary samples after the shift are filled in by adjacent data blocks or marked as invalid, thus completing the first-level coarse alignment in the time domain. Discrete cross-correlation calculations are performed on the high-speed sampling sequences of power quality of the channel under test and the reference channel power quality after the first-level coarse time-domain alignment. The cross-correlation main peak index and its adjacent cross-correlation amplitude are extracted, and the fractional sampling point offset is obtained by continuous quadratic parabolic fitting. The integer quantization sampling point offset is combined with the fractional sampling point offset to obtain the continuous delay estimate.
5. The energy and carbon analysis data processing method based on time-series awareness according to claim 1, characterized in that, The process by which the data processing center, based on the continuous time delay estimate, selects characteristic frequency points in the frequency domain and constructs a multi-channel feature correlation matrix for energy and carbon includes: Windowing and fast Fourier transform are applied to the high-speed power quality sampling sequences of each channel after the first-stage coarse alignment in the time domain to obtain the complex spectrum corresponding to each channel; Candidate feature frequency points are selected within the effective analysis bandwidth, and signal-to-noise ratio (SNR) filtering is performed on the candidate feature frequency points to eliminate candidate feature frequency points whose local SNR is lower than the feature frequency point SNR threshold. Phase linearity filtering is performed on the candidate feature frequency points that pass the signal-to-noise ratio screening. Candidate feature frequency points with phase linearity scores lower than the phase linearity threshold are removed to obtain the feature frequency points used to construct the matrix. The relative phase difference between the channel under test and the reference channel is calculated at the characteristic frequency points, and the multi-channel relative phase difference vector corresponding to the channel under test is generated in order of frequency from low to high. Using the physical angular frequency corresponding to each of the aforementioned characteristic frequency points as the first column element and the constant term as the second column element, construct the energy-carbon multi-channel feature correlation matrix corresponding to the channel under test.
6. The energy and carbon analysis data processing method based on time-series awareness according to claim 5, characterized in that, The process of performing singular value decomposition on the energy-carbon multi-channel characteristic correlation matrix to obtain the time-frequency coupled linear phase slope term and constant phase intercept includes: Singular value decomposition is performed on the energy carbon multichannel feature correlation matrix to obtain a left orthogonal matrix, a diagonal singular value matrix and a right orthogonal matrix, and the singular value condition number is calculated based on the maximum singular value and the minimum effective singular value. When the singular value condition number is not greater than the condition number threshold, a generalized pseudo-inverse matrix is constructed based on the left orthogonal matrix, the diagonal singular value matrix, and the right orthogonal matrix. The generalized pseudo-inverse matrix is then used to project and solve the multi-channel relative phase difference vector to obtain the time-frequency coupled linear phase slope term and the constant phase intercept. When the singular value condition number is greater than the condition number threshold, the selection priority of candidate feature frequency points with low phase linearity scores is reduced, the energy carbon multi-channel feature correlation matrix is reconstructed, and singular value decomposition is re-executed. The time-frequency coupled linear phase slope term is used to calculate the residual time delay shift, and the constant phase intercept is used to extract the physical clock relative frequency deviation based on the intercept change between adjacent data blocks.
7. The energy and carbon analysis data processing method based on time-series awareness according to claim 6, characterized in that, The process of outputting a synchronously calibrated power quality sampling sequence includes: The time-frequency coupled linear phase slope term is converted into the residual time delay shift, and an all-pass phase shift compensation factor is constructed in the frequency domain based on the residual time delay shift. The full-pass phase shift compensation factor is used to perform frequency domain phase shift compensation on the complex spectrum of each channel to reduce the residual subsampling point delay after the first-stage time-domain coarse alignment; The physical clock relative frequency deviation is calculated based on the constant phase intercept change of adjacent data blocks, and the sampling time within the data block is linearly recalibrated based on the physical clock relative frequency deviation. The inverse fast Fourier transform is performed on the frequency domain phase-shift compensated signal, and interpolation resampling is performed according to the sampling time after linear recalibration to obtain the synchronously calibrated power quality sampling sequence. The synchronously calibrated power quality sampling sequence is bound to the low-speed parameter sequence of the energy carbon factor according to the data block identifier and time window number.
8. The energy and carbon analysis data processing method based on time-series awareness according to claim 1, characterized in that, The process by which the data processing center generates the physical clock synchronization estimation error after non-clock factor constraints are eliminated based on the time-frequency coupled linear phase slope term and the constant phase intercept includes: The time-frequency coupled linear phase slope term is converted into a residual time delay shift; The physical clock relative frequency deviation is obtained based on the constant phase intercept change of adjacent data blocks, and the time drift formed by the cumulative frequency deviation is obtained based on the physical clock relative frequency deviation and the data aggregation update cycle duration. The residual time delay shift is added to the time drift to generate the physical clock synchronization estimation error after the non-clock factor filtering constraint; The physical clock synchronization estimation error after the non-clock factor screening constraint is not directly derived from the comprehensive energy carbon index report, carbon emission accounting error or channel fusion residual, but rather from the decoupling result of the time-frequency coupled linear phase slope term and the constant phase intercept.
9. The energy and carbon analysis data processing method based on time-series awareness according to claim 8, characterized in that, When the backhaul update conditions are met, the process of backhauling the physical clock synchronization estimation error, after removing constraints due to non-clock factors, to the corresponding distributed energy and carbon data acquisition node to update the crystal oscillator drift prediction compensation model includes: The data processing center calculates the phase fitting residual, the singular value condition number, and the rate of change of continuous periodic error; When the phase fitting residual is not greater than the phase fitting residual threshold, the number of singular value conditions is not greater than the condition number threshold, and the rate of change of continuous periodic error is not greater than the rate of change of error threshold, it is determined that the backhaul update condition is satisfied. When the backhaul update conditions are met, the data processing center encapsulates the physical clock synchronization estimation error, channel identifier, data aggregation update cycle identifier, phase fitting residual, singular value condition number and check field after non-clock factor filtering constraints into downlink control signaling, and backhauls it to the corresponding distributed energy and carbon data acquisition node. After the edge microcontroller of the distributed energy and carbon data acquisition node verifies the downlink control signaling, it subtracts the total cumulative drift time predicted at the beginning of the current data aggregation and update cycle from the physical clock synchronization estimation error after the non-clock factor filtering constraint is returned to obtain the signed prediction error. The edge microcontroller reads the signed prediction error, the hidden layer representation vector, and the current output layer weight matrix, calculates the single-step update amount for each weight item in the output layer weight matrix, the single-step update amount is jointly determined by the signed prediction error, the corresponding hidden layer representation component, the parameter incremental update learning rate constant, and the orthogonal regularization decay coefficient, and updates the output layer weight matrix of the crystal oscillator drift prediction compensation model according to the single-step update amount; When the backhaul update conditions are not met, the data processing center only uses the physical clock synchronization estimation error after the non-clock factor filtering constraint is removed for the center-end calibration record of the current data block, and does not trigger the update of the output layer weight matrix.
10. The energy and carbon analysis data processing method based on time-series awareness according to claim 1, characterized in that, After the synchronously calibrated power quality sampling sequence enters the energy carbon index fusion calculation module, the energy carbon index fusion calculation module reads the synchronously calibrated power quality sampling sequence and the energy carbon factor low-speed parameter sequence according to the same time window. The energy and carbon index fusion calculation module calculates the power quality assessment index based on the synchronously calibrated power quality sampling sequence, calculates the carbon emissions based on the energy and carbon factor low-speed parameter sequence, and generates synchronous quality weights based on the synchronous reliability score. The synchronization reliability score is determined by the phase fitting residual, the singular value condition number, and the continuous periodic error rate of change. The energy carbon index fusion calculation module fuses multi-channel data according to the synchronization quality weight and outputs a comprehensive energy carbon index report that includes power quality assessment and carbon emission calculation. When the energy carbon index fusion calculation module also obtains the energy intensity benchmark corresponding to the current time window, the comprehensive energy carbon index report also includes energy intensity analysis results.
