A real-time power quality assessment device and method for flywheel power plants
By combining the ping-pong caching mechanism and the CORDIC algorithm with the CRITIC-TOPSIS method, real-time assessment of power quality in flywheel power plants was achieved. This solved the problems of high assessment delay and strong subjectivity in existing technologies, enabling millisecond-level response and full-dimensional evaluation of flywheel power plants, and improving the system's response speed and reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENYANG INST OF ENG
- Filing Date
- 2026-04-16
- Publication Date
- 2026-07-10
Smart Images

Figure CN122367264A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to flywheel energy storage and power plant operation performance evaluation, and more particularly to a real-time power quality evaluation device and method for flywheel power plants. Background Technology
[0002] Recently, the evaluation of the operational performance of flywheel energy storage power stations has become a core component of power station operation and maintenance and national standard compliance testing. The CRITIC-TOPSIS method, as a precise multi-indicator comprehensive evaluation method, has been widely applied in the field of industrial system operational performance evaluation, providing an algorithmic basis for the objective quantitative evaluation of the operational performance of flywheel energy storage power stations.
[0003] However, existing evaluations of flywheel energy storage systems often focus on a single dimension of power quality, failing to construct a comprehensive operational performance evaluation system tailored to the technical characteristics of grid-connected flywheel energy storage systems, resulting in poor indicator adaptability. Furthermore, existing evaluation methods often employ subjective weighting to determine indicator weights, leading to highly subjective and unobjective evaluation results. Some schemes using objective weighting methods only consider indicator differences, neglecting the correlation between indicators, resulting in large deviations in weight calculations and low accuracy of evaluation results. In addition, existing evaluations often employ offline analysis, using computer software to evaluate based on collected historical operating data. This results in high evaluation latency, an inability to reflect real-time dynamic changes in system operating status, and the evaluation results are not integrated with the flywheel control system, serving only for post-event analysis and report statistics. They cannot directly feed back to the control system to trigger preventative control actions, leading to delayed system response to deteriorating operational performance and increasing the risk of equipment damage or grid fluctuations.
[0004] In addition, existing online evaluation devices mostly use general-purpose processors to run algorithms, which have problems such as high latency, high power consumption and poor adaptability. They cannot meet the millisecond-level real-time evaluation requirements of flywheel power plants, and lack dedicated hardware integration solutions, making it difficult to achieve seamless linkage with flywheel controllers. Summary of the Invention
[0005] This invention addresses the shortcomings of existing technologies by providing a real-time power quality assessment device and method for flywheel power plants.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: a method for real-time assessment of power quality in a flywheel power station, comprising:
[0007] S1. Establish a dual-storage-area ping-pong caching mechanism to decouple the data acquisition process from the algorithm operation process in the physical storage space, so that the writing operation of the current frame's raw data and the reading operation of the previous frame's normalized data are mutually exclusive and alternate.
[0008] S2. Based on the continuous data stream output by the ping-pong caching mechanism, the Euclidean distance is calculated in real time using a pipeline operator based on the CORDIC algorithm, and a comprehensive evaluation score is output in combination with the CRITIC dynamic weight algorithm.
[0009] S3. The comprehensive evaluation score is compared with the preset positive and negative ideal solution boundaries in real time, and the virtual inertia parameter of the flywheel controller is dynamically corrected according to the comparison result. The correction frequency of the virtual inertia parameter is synchronized with the sampling frequency in S1, forming a closed-loop control loop with deep coupling between the physical layer and the algorithm layer.
[0010] Furthermore, there is a temporal coupling relationship between S1 and S2, specifically:
[0011] The writing operation of the current frame sampled data in step S1 and the reading and calculation operation of the previous frame data in step S2 are performed in parallel at the hardware physical layer, and their timing satisfies the following relationship:
[0012]
[0013]
[0014] in, The computation time required for the pipelined operator to process one frame of data in step S2; This refers to a single sampling period in the data acquisition process of step S1. This is the fixed logical delay for a single system evaluation.
[0015] This timing coupling ensures that the computation speed of the pipelined computing module fully covers the data refresh rate, making the evaluation latency constant at a single sampling period, thereby eliminating task scheduling latency in general computing architectures.
[0016] Furthermore, in S2, the iteration level N of the pipeline operator of the CORDIC algorithm and the sliding window depth W of the CRITIC weight are coupled in terms of hardware resources.
[0017] The specific configuration method is as follows: based on the total number of logic gate resources of the FPGA or ASIC chip, the number of DSP slices allocated by the CORDIC algorithm and the BlockRAM resources allocated by the weight calculation module are dynamically balanced.
[0018] Specifically, the CORDIC iteration level N is set to 16 levels to meet the accuracy of the square root operation. At the same time, the sliding window depth W is determined to be 1000~2000 points based on the remaining storage resources, so that the weight update cycle and the Euclidean distance calculation cycle are consistent in the hardware clock domain, avoiding the jitter of evaluation results caused by competition for computing resources.
[0019] Furthermore, in S3, there is a linear mapping coupling relationship between the comprehensive evaluation score and the virtual inertia parameter, and the relationship is as follows:
[0020]
[0021] in, The target virtual inertia of the flywheel controller after real-time dynamic correction; The basic virtual inertia set for the flywheel controller; The sensitivity coefficient for direct intervention in control compensation is used to evaluate the results; the score is the comprehensive evaluation score (out of 100) output at the current time.
[0022] This coupling relationship transforms the abstract distance value output by the TOPSIS algorithm into a physical quantity of rotational inertia that can be recognized by the physical controller. This makes the inertial response speed of the flywheel energy storage system directly dependent on the degree of deterioration of the operating performance, thus achieving the unification of the physical dimensions of the evaluation index and control parameters.
[0023] Furthermore, the method also includes an anti-interference coupling verification step: after the output result of S2, the validity of the evaluation result is determined using a hardware state machine (FSM); within two adjacent pipeline operation cycles, the comprehensive evaluation score of the evaluation index is repeatedly calculated. If the deviation between the two evaluation results is >5%, it is determined to be an invalid transition caused by sensor transient spike noise or communication errors; at this time, the hardware state machine determines that the evaluation result is invalid, suspends the output transmission of the evaluation result, and triggers an interface alarm signal. By coupling the algorithm result with the hardware state machine logic, the erroneous triggering of the control closed loop by occasional interference is eliminated.
[0024] A real-time power quality assessment device for a flywheel power station, used to implement the method, comprising:
[0025] The ping-pong buffer module is equipped with a dual-port memory for executing S1;
[0026] The pipelined computation module, embedded in the FPGA / ASIC chip, includes a CORDIC square root unit and a CRITIC weight calculation unit, used to execute S2;
[0027] The coupling control interface module is equipped with a GPIO driver unit and a communication protocol parsing unit, which is used to execute S3 and convert the evaluation score into PWM duty cycle or communication command.
[0028] In this system, the read / write pointer signal of the ping-pong cache module directly drives the enable terminal of the pipelined operation module, and the completion signal of the pipelined operation module directly triggers the data latch of the coupling control interface module. The modules are directly coupled through hardware level signals, rather than through software polling.
[0029] Furthermore, the evaluation indicators in S2 include 14 core evaluation indicators built around six dimensions: voltage quality support capability, frequency quality support capability, power control performance, inertia damping characteristics, disturbance rejection response capability, and operational reliability.
[0030] The voltage quality support indicators include: voltage deviation I1 and voltage fluctuation I2;
[0031] The frequency quality support indicators include: frequency deviation I3;
[0032] The power control performance indicators include: active power control error I4, reactive power control error I5, and primary frequency regulation control error I6.
[0033] The inertia damping characteristic parameters include: equivalent transient impedance I7, inertia time constant I11, and damping ratio I12;
[0034] The disturbance rejection response capability indicators include: phase angle jump risk of grid disconnection I8, primary frequency regulation adjustment time I9, and voltage disturbance response time I10.
[0035] The operational reliability indicators include: overcurrent capability I13 and wideband positive resistance characteristic I14.
[0036] Furthermore, the data acquisition front-end used to execute S1 is located within a separate edge intelligent evaluation terminal, specifically including: an analog-to-digital converter with synchronous sampling capability, whose sampling frequency... Sampling accuracy The signal conditioning and filtering circuit: before the electrical parameters at the output of the flywheel power station enter the analog-to-digital converter, they first undergo high-frequency anti-aliasing conditioning through a passive RC differential low-pass filter circuit; the converted digital signal is then filtered by a linear phase FIR digital filter before being transmitted to a dedicated evaluation module; the linear phase FIR digital filter ensures that the voltage and current signals do not undergo phase distortion after filtering, thereby ensuring the accuracy of extracting phase-sensitive operating indicators.
[0037] Furthermore, in S2: for the set 16-stage CORDIC algorithm pipeline operator, when calculating the square root operation of Euclidean distance, the floating-point square root instruction of the general-purpose processor is avoided. Instead, it is decomposed into 16 stages of pure hardware logic; each stage iteration is implemented only through shift and addition operations. Through this hardware pipeline structure, the floating-point square root calculation delay, which originally required hundreds of clock cycles, is strictly compressed and locked to 16 hardware clock cycles, ensuring precise alignment with the weight update cycle of the sliding window at the nanosecond level.
[0038] Furthermore, in S2: for a sliding window of depth W, a hardware sliding window is constructed using dual-port RAM as a variance extraction unit; the standard deviation of each index is updated in a "one-in-one-out" rolling manner within a single clock cycle through an accumulator bound to the sliding window, without the need to store large-scale historical data from W points ago; at the same time, the dedicated DSP48E slice inside the FPGA is directly called to perform parallel pipelined multiply-accumulate operations to calculate the Pearson correlation coefficient matrix between each index.
[0039] Furthermore, the dedicated evaluation module is internally designed with a master control state machine (FSM); the master control state machine includes hardware states such as idle, data acquisition, weight calculation, distance decision, result output, and error protection; when the dedicated evaluation module encounters a division-by-zero error or data overflow during pipelined operation, the master control state machine immediately jumps to the error protection state within nanoseconds to perform hardware protection.
[0040] Compared with the prior art, the present invention has the following advantages.
[0041] This invention solves the shortcomings of existing offline assessments, such as high latency and inability to reflect the dynamic changes in flywheel energy storage operation in real time, and achieves online assessment with extremely low latency, adapting to the control requirements of flywheel power plants with millisecond-level response.
[0042] This invention covers 14 core operational performance evaluation indicators across six dimensions of grid-type flywheel energy storage, comprehensively encompassing core operational characteristics of power plants such as voltage quality, frequency quality, power control, inertia damping, disturbance rejection response, and operational reliability. It employs the CRITIC-TOPSIS objective evaluation method, comprehensively considering the variability and correlation of indicators to ensure the objectivity and accuracy of the evaluation results. The indicator system and level determination thresholds fully comply with the quantitative requirements of the "General Technical Specification for Grid-type Converters," and the evaluation results can be directly used as the basis for national standard compliance testing of power plants, enhancing the engineering application value of the device. Attached Figure Description
[0043] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. The scope of protection of the present invention is not limited to the following description.
[0044] Figure 1 This is a schematic diagram illustrating the operational performance indicators of a grid-type flywheel energy storage system in an embodiment.
[0045] Figure 2 This is a hardware architecture and logic flowchart of an embodiment.
[0046] Figure 3 This is a diagram of the internal bus and functional module architecture of the evaluation module for specific implementation examples.
[0047] Figure 4 This is a logic diagram of the flywheel power station system that includes the evaluation device in this embodiment.
[0048] Figure 5 This is a schematic diagram of the signal acquisition and differential filtering conditioning circuit in the embodiment.
[0049] Figure 6 This is a hardware circuit diagram for TOPSIS weighted Euclidean distance calculation in an embodiment.
[0050] Figure 7 This is a schematic diagram of the master state machine (FSM) transition of the evaluation device in the embodiment.
[0051] Figure 8 This is a schematic diagram of the data caching logic based on ping-pong operation in an embodiment.
[0052] Figure 9 This is a diagram showing the pin definitions and interface layout of the embedded evaluation module in the embodiment. Detailed Implementation
[0053] The technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0054] The terminology used in the embodiments of this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of this disclosure. The singular forms “a,” “the,” and “the” as used in the embodiments of this disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0055] Depending on the context, words such as “if” or “suppose” used here can be interpreted as “when”, “in response to determination”, or “in response to detection”.
[0056] For ease of understanding, the embodiments of this disclosure will be described in detail first.
[0057] like Figure 1-9 As shown in the illustration, a specific embodiment provides a real-time power quality assessment device and method for a flywheel power station. Integrated into the local controller of the flywheel power station, its core is the hardware implementation of the CRITIC-TOPSIS operational performance evaluation method. Through the collaborative work of a dedicated assessment module, an edge intelligent assessment terminal, and a linkage interface, it achieves real-time assessment of the power station's operational performance, display and alarm of performance levels, and linkage with the flywheel control system. The specific implementation method is as follows:
[0058] Step 1: Overall device architecture setup.
[0059] The device is integrated into the local controller of the flywheel power station and adopts a modular design, comprising three core modules: a dedicated evaluation module, an edge intelligent evaluation terminal, and a linkage interface. These modules communicate with each other through standardized interfaces to ensure the stability and reliability of their collaborative operation. Specifically, the dedicated evaluation module serves as the core computing unit, the edge intelligent evaluation terminal as the data acquisition and interaction unit, and the linkage interface as the linkage unit with the flywheel controller. These three components have clearly defined roles and work in concert to achieve closed-loop management of the entire operational process, from data acquisition to evaluation, alarming, and linkage control.
[0060] Step 2: Implementation of a dedicated evaluation module.
[0061] The dedicated evaluation module is designed using FPGA or ASIC chips. Its core is to implement the CRITIC-TOPSIS algorithm pipeline to ensure online evaluation with extremely low latency. The dedicated evaluation module inside the device has a weight calculation core, which includes multiple parallel processing units such as PE1 responsible for calculating voltage deviation weights and PE2 responsible for calculating voltage fluctuation weights, corresponding to 14 indicators respectively.
[0062] The dedicated evaluation module in this embodiment includes, but is not limited to, a hardware acceleration unit built on FPGA (Field Programmable Gate Array) or ASIC in terms of hardware logic.
[0063] To achieve an objective evaluation of the operational performance of grid-type flywheel energy storage under complex operating conditions, the computational logic within the dedicated evaluation module follows the following definitions:
[0064] First, the 14 original indicators collected were normalized to eliminate the influence of different dimensions on the evaluation results. The linear mapping rules are shown in equations (1) and (2):
[0065] The 14 indicators need to be distinguished into positive and negative indicators, among which:
[0066] Positive indicator mapping:
[0067] (1)
[0068] Inverse indicator mapping:
[0069] (2)
[0070] Where m is the total dimension of the evaluation index, and in this example m=14; n is the total number of samples in the sliding window, i.e., the data depth; The j-th original index is extracted at the i-th sampling time; and These are the physical quantity boundaries of the negative ideal solution (national standard red line value) and the positive ideal solution (design optimal value) corresponding to the j-th index, respectively. It is the dimensionless normalized value of the j-th index after differential mapping by formula (1) or (2) (the value range is [0, 1]).
[0071] With this hardwired structure, the system can complete the accumulation calculation of standard deviation within a single clock cycle, significantly improving computational efficiency.
[0072] Specifically, the FPGA chip adopts a parallel architecture design, breaking down each step of the CRITIC-TOPSIS algorithm into independent hardware modules, including an index normalization module, a correlation coefficient calculation module, a contrast strength and conflict calculation module, an index weight solution module, an ideal solution determination module, an Euclidean distance calculation module, and a relative distance and level determination module. The ideal solution determination module pre-stores the power plant operating limit parameters based on the "General Technical Specification for Grid-type Converters" as a negative ideal solution, and the optimal operating parameters based on the design parameters of the grid-type flywheel energy storage power plant as a positive ideal solution. The relative distance and level determination module calculates the Euclidean distance between the current operating data stream and the positive / negative ideal solutions. All modules operate in parallel pipelines to avoid delays caused by serial computation, ensuring that the total closed-loop delay of a single system evaluation is constant at one sampling period (i.e., ≤1ms). The pure hardware computation delay of the FPGA's internal pipeline is strictly controlled within microseconds (≤1μs). This meets the real-time management requirements of power plant operation performance.
[0073] To achieve ultra-low latency, this device employs a dual-storage ping-pong caching mechanism (i.e., ping-pong operation). When the sampling module writes the current frame data to storage area A, the computing module simultaneously retrieves the previous frame data from storage area B. This "ping-pong operation" ensures the continuity of the data stream and eliminates the I / O wait time commonly found in software evaluation.
[0074] To coordinate the parallel pipelined operation of the aforementioned hardware operators and modules, the dedicated evaluation module of this invention is internally designed with the following features: Figure 7 The master control state machine (FSM) shown is illustrated. This state machine includes core hardware states such as Idle, Data Acquisition (SAMPLE), Weight Calculation (CALC_W), Distance Decision (CALC_D), Result Output (UPDATE), and Error Protection (ERROR). Driven by a system clock of 50MHz or higher, when the acquisition module triggers the 'BufFull' signal, the state machine autonomously and seamlessly transitions to subsequent calculation stages; when a division-by-zero error or data overflow (NaN / Inf) occurs, it immediately jumps to the ERROR state for hard protection. This state machine mechanism achieves nanosecond-level state transitions for each evaluation operation stage with extremely low logic gate overhead, fundamentally eliminating the uncontrollable latency caused by software interrupt calls and task scheduling in traditional general-purpose CPU architectures.
[0075] To achieve extremely low latency evaluation, this device avoids the serial operation mechanism of traditional processors. Within the evaluation core, a 16-level iterative square root operator based on the CORDIC algorithm is used for the Euclidean distance step, which has the highest computational cost in the TOPSIS algorithm.
[0076] (3)
[0077] (4)
[0078] in, and The Euclidean distance between the system's comprehensive index vector at the current moment and the absolutely optimal state (positive ideal solution) and the extremely deteriorated state (negative ideal solution); The dynamic objective weights assigned to the j-th indicator after normalization ( ); and These are the positive and negative ideal solutions for the j-th index after normalization (since extreme value mapping has been completed, usually...). =1, =0).
[0079] In the dedicated evaluation module, for the Euclidean distance square root step, which has the highest computational cost in the TOPSIS algorithm, this invention avoids calling the floating-point square root instruction of a general-purpose processor. Instead, it designs a 16-stage pure hardware logic pipelined CORDIC operator. Each iteration performs the square root operation only through shift and addition operations. While maintaining high precision, the floating-point calculation delay, which originally required hundreds of clock cycles, is strictly compressed and locked to 16 hardware clock cycles, ensuring precise alignment with the subsequent weight update cycle at the nanosecond level. The specific hardware circuit structure is as follows: Figure 6 As shown.
[0080] To achieve real-time capture of index conflicts at the CRITIC weight calculation module and at the underlying hardware level such as FPGA, this invention constructs a hardware correlation coefficient matrix memory to calculate the information content of each index. Specifically, the hardware extraction logic for its weights is defined by equations (5) to (8):
[0081] Indicator variability:
[0082] (5)
[0083] Indicator conflict:
[0084] (6)
[0085] in, is the standard deviation of the j-th indicator within the current sliding window of n samples, reflecting the variability of the indicator; This is the arithmetic mean of the j-th indicator within the current sliding window; Let be the Pearson correlation coefficient between the k-th and j-th indicators within the sliding window; This is the quantitative value of the conflict between the j-th indicator and all other indicators.
[0086] When calculating the weights of each indicator, this invention calculates the conflict coefficient between indicators through a correlation analysis unit. The calculation formula is as follows:
[0087] (7)
[0088] (8)
[0089] in, This represents the amount of objective information contained in the j-th indicator after considering its variability and conflict. In hardware implementation, By using a sliding window accumulator to update within a single period, the need for storing large amounts of historical data is avoided.
[0090] ASIC Chip: The core computational components of the CRITIC-TOPSIS algorithm are solidified into the circuitry, eliminating redundant circuitry and further reducing chip power consumption and latency, making it suitable for embedded installation scenarios in flywheel energy storage power stations. A dedicated evaluation module can simultaneously collect and process 14 core grid-type operating indicators in parallel, comprehensively covering six dimensions: voltage quality, frequency quality, power control performance, inertia damping characteristics, disturbance rejection response capability, and operational reliability. This ensures the comprehensiveness and accuracy of the power station's operational performance evaluation, complying with the national standard requirements of the "General Technical Specifications for Grid-Type Converters".
[0091] The evaluation score is not merely displayed as a monitoring value, but directly participates in the closed-loop control of the flywheel power station. The linkage interface feeds back the real-time score to the virtual synchronous machine control loop, dynamically correcting the virtual inertia constant J of the flywheel through equation (9), thereby providing millisecond-level power support at the moment of power quality degradation:
[0092] The implementation evaluation score of the device output is determined by the following formula:
[0093] (9)
[0094] in, This is the final output score out of 100. This score is mapped to the virtual inertia coefficient J of the flywheel system via the linkage interface, enabling dynamic inertia support when power quality deteriorates.
[0095] Virtual inertia correction equation:
[0096] (10)
[0097] in, The target virtual inertia of the flywheel controller after real-time dynamic correction; The basic virtual inertia set for the flywheel controller; This is a sensitivity coefficient used to directly intervene in control compensation based on the evaluation results. This linear mapping coupling relationship transforms the abstract distance value output by the TOPSIS algorithm into a physical quantity of rotational inertia that can be recognized by the physical controller, thus achieving a unification of the physical dimensions of the evaluation index and the control parameters.
[0098] The evaluation score is not an isolated numerical value; it dynamically reflects real-time fluctuations in the power grid through a weight update mechanism. This device utilizes the conflict measurement logic of the CRITIC algorithm to adjust the weight coefficients of each indicator in real time, thereby enabling the control commands output by the linkage interface to have higher dynamic sensitivity.
[0099] The specific workflow of the CRITIC-TOPSIS algorithm pipeline is as follows:
[0100] 1. First, the 14 collected indicators are dimensionless through the indicator normalization module, and different normalization formulas are used to distinguish between positive and negative indicators.
[0101] 2. Subsequently, the correlation coefficient calculation module is used to calculate the correlation coefficient between each indicator to characterize the relationship between the indicators;
[0102] 3. Next, the contrast intensity and conflict of each indicator are calculated using the contrast intensity and conflict calculation module;
[0103] 4. Then, the indicator weight calculation module calculates the objective weight of each indicator based on the contrast intensity and conflict to ensure the rationality of the weight;
[0104] 5. Then, the positive and negative ideal solutions are determined through the ideal solution determination module;
[0105] 6. Then, the Euclidean distance between the object to be evaluated and the positive and negative ideal solutions is calculated using the Euclidean distance calculation module;
[0106] 7. Finally, the relative distance is calculated through the relative distance and level determination module, and the running effect level is determined based on the relative distance.
[0107] In the specific hardware implementation, the CRITIC-TOPSIS operational logic circuit does not run software code, but is built using logic gate circuits. For example, the 'index extraction module' consists of a high-speed analog-to-digital converter interface and a FIFO buffer; to balance computational accuracy and microsecond-level extremely low latency, this invention adopts an architecture combining fixed-point numerical and hardware parallel pipelines at the FPGA / ASIC level.
[0108] First, fixed-point conversion: all floating-point operations in the CRITIC-TOPSIS algorithm pipeline are converted into fixed-point operations, preferably using the Q15.16 data format (i.e., 1 sign bit, 15 integer bits, and 16 fractional bits). This avoids introducing high-latency floating-point operation IP cores while ensuring that the data truncation error of the multi-level accumulation process is ≤0.01%.
[0109] Secondly, regarding the sliding window depth: For a sliding window of depth W, this invention uses a dual-port RAM to construct a hardware sliding window as a variance extraction unit. The window depth is preferably set to 1000 to 2000, corresponding to a 1-2 second buffer of the running parameter stream. The standard deviation of each indicator is updated in a "one-in-one-out" rolling manner within a single clock cycle through an accumulator bound to the sliding window, eliminating the need to store large-scale historical data from W points ago. Simultaneously, the dedicated DSP48E slice inside the FPGA is directly called to perform parallel pipelined multiply-accumulate operations, calculating the Pearson correlation coefficient matrix between each indicator with extremely low latency.
[0110] Finally, DSP hardware-level acceleration: For the correlation coefficient matrix, which has the largest computational load, the dedicated DSP48E slice inside the FPGA is directly called to perform parallel pipelined multiply-accumulate operations, compressing the processing time of the 14*14 correlation coefficient matrix to the extreme.
[0111] The 'weight calculation pipeline' consists of multiple cascaded DSP slices, each used for parallel calculation of the covariance matrix. The 'multidimensional distance decision module' calls a CORDIC hardware pipeline operator based on 16 iterations to perform square root operations, abandoning the traditional lookup table method. It can output high-precision floating-point square root results within 16 clock cycles using only a parallel shifter and adder network, greatly reducing logic resource consumption and computation latency.
[0112] Step 3: Implementation of edge intelligent evaluation terminal.
[0113] The edge intelligent assessment terminal is an independent hardware installed on the flywheel power station side. It adopts an embedded design, is small in size, and is suitable for on-site installation in the power station. It includes five sub-units: data acquisition unit, communication unit, display unit, alarm unit, and storage unit.
[0114] The data acquisition unit preferably employs an industrial-grade analog-to-digital converter with multi-channel synchronous sampling capability and a sampling frequency ≥1kHz. For example... Figure 5 As shown, a passive RC differential low-pass conditioning circuit is provided before the analog signal enters the ADC to prevent high-frequency aliasing. In a preferred circuit parameter configuration, the input conditioning resistor is set to... Filter resistor Filter capacitor The low-pass cutoff frequency under this configuration is approximately It can effectively filter out the high-frequency PWM switching ripple generated by the converter (such as...). At the same time, the fundamental frequency and low-order harmonics of the power grid are fully preserved.
[0115] Furthermore, before being transmitted to the evaluation core, the acquired digital signals are preprocessed by linear phase FIR digital filtering within the front-end MCU or FPGA.
[0116] Compared to conventional IIR filters or moving averages, linear phase FIR filters ensure that voltage and current signals do not undergo phase distortion after filtering, thus protecting against the risk of phase jumps and network disconnection from the signal source. Damping ratio 'Accuracy of extracting equally strong phase-dependent indicators.'
[0117] With a sampling accuracy of ≥16 bits, it is used to collect electrical parameters such as voltage, current, and frequency at the output of the flywheel power station. The collected analog signals are converted into digital signals after filtering and transmitted to a dedicated evaluation module for further processing to ensure the accuracy and real-time performance of the collected data.
[0118] The communication unit uses wired or wireless communication to achieve bidirectional communication with the dedicated evaluation module and flywheel controller. On the one hand, it transmits the collected data to the dedicated evaluation module, and on the other hand, it receives the evaluation results output by the dedicated evaluation module and transmits them to the display unit, alarm unit and linkage interface.
[0119] The display unit uses an LCD screen to display the operational performance level, key indicator values, and evaluation time in real time, making it easy for on-site staff to view intuitively.
[0120] The alarm unit adopts an audible and visual alarm design with a preset alarm threshold. When the level drops to the preset threshold or a key indicator deteriorates, it will issue an audible and visual alarm signal and record the alarm time, alarm type and corresponding indicator value.
[0121] The storage unit uses high-capacity flash memory to store historical data, evaluation results, and alarm information for at least one year, facilitating subsequent retrieval, analysis, and traceability. Figure 3 As shown, the dedicated evaluation module uses an AXI-Stream high-speed bus to connect the ADC controller and the evaluation core. By setting an independent data buffer, it ensures that the bus bandwidth utilization is not less than 80% at a sampling frequency of 1kHz, thus solving the evaluation delay problem from the underlying physical level.
[0122] In actual engineering deployment and hardware integration, to adapt to the complex electromagnetic interference environment of flywheel power plants and achieve seamless controller integration, the external physical interface and pin definitions of the dedicated evaluation module (PQ-SoCFPGA / ASIC) of this device are as follows: Figure 9 As shown, this interface layout highly integrates multiple functional pins, including: a high-frequency ADC acquisition interface (ADC_IN+ / ADC_IN-) for receiving differential analog electrical parameters; a high-speed SPI bus interface (SPI_CS, SPI_CK, MOSI, MISO) for data interaction with external edge memory or display terminals; independent status indicator pins (ALARM / STATUS) for triggering hard-wired audible and visual alarms; and pulse width modulation pins (PWM_OUT1 / PWM_OUT2) for directly issuing power regulation commands to the flywheel converter. This highly integrated system-on-a-chip (SoC) level pin layout greatly simplifies the design complexity of peripheral PCB circuits and significantly improves the operational reliability of the evaluation device in strong electromagnetic environments.
[0123] Step 4: Implement the linkage interface.
[0124] The linkage interface is equipped with a feedback verification unit to verify the accuracy of the evaluation results. Within two adjacent pipeline operation cycles, the hardware state machine (FSM) repeatedly calculates the comprehensive evaluation score of the evaluation indicators. Due to the electromechanical inertia of the power plant, physical quantities do not undergo instantaneous jumps under actual operating conditions. Therefore, if the deviation between two evaluation results is greater than 5%, it is determined to be an invalid jump caused by transient spike noise from sensors or communication errors. At this time, the hardware state machine determines that the evaluation result is invalid, immediately suspends the output transmission of the evaluation result, and triggers an interface alarm signal. By coupling the algorithm result with the hardware state machine logic, the erroneous triggering of the control closed loop by occasional interference is completely eliminated.
[0125] When the evaluation result is valid, the linkage interface directly uses the evaluation result as the feedback input of the flywheel control system, triggering the flywheel's preventive control action. The specific linkage logic is as follows:
[0126] Before evaluating the core calculation score, the system pre-defines the positive and negative ideal solution matrices for each indicator. The boundary values of the negative ideal solutions are directly mapped to the critical penalty requirements in the "General Technical Specification for Grid-Type Converters" (e.g., voltage deviation limits). Defined as a negative ideal solution), while the positive ideal solution is mapped from the factory-optimal design parameters of the flywheel energy storage system (e.g., deviation). (To obtain a positive ideal solution), thus providing an absolute physical benchmark for the spatial distance of CRITIC-TOPSIS. The final output comprehensive evaluation score (Score) has a maximum score of 100 points, and its level determination quantification threshold is specifically set as follows:
[0127] Excellent Level I: ;
[0128] Good Level II: ;
[0129] Level III (Intermediate): ;
[0130] Grade IV (Qualified): ;
[0131] Unqualified Grade V: .
[0132] Based on the aforementioned quantitative thresholds, when the evaluation result is valid, the linkage interface directly uses the evaluation result as the feedback input to the flywheel control system. When the operating performance level is Excellent (Level I), the flywheel energy storage power station is in its optimal operating state and operates normally without triggering control actions. When the level drops to Good (Level II), the pre-charging backup unit is triggered to ensure the flywheel energy storage has a rapid response capability; the backup unit's start-up response time is ≤100ms, preventing further deterioration of the operating performance. When the level drops to Medium (Level III), feedback is sent to the flywheel controller, which linearly adjusts the flywheel energy storage's output power according to the evaluation score. For every 10-point decrease in score, the flywheel's active power output gain increases by 5%, smoothing fluctuations in operating parameters and rapidly improving the power station's operating performance; the power adjustment response time is ≤200ms. When the level drops to Qualified (Level IV), the power station's operating performance is close to the deterioration threshold, and a shutdown warning signal is issued to remind on-site personnel to promptly investigate the fault and prevent further deterioration of the operating condition. When the level drops to Unqualified (Level V), the power station's operating performance has severely deteriorated, triggering emergency shutdown control to prevent equipment damage or grid fluctuations and ensure the safety of the power station and the grid.
[0133] Step 5: Device debugging and verification.
[0134] After integrating the device into the local controller of the flywheel power station, on-site commissioning and verification were carried out. Operating parameter data of the flywheel power station under different operating conditions were collected, including normal operating conditions, load fluctuation conditions, wind and solar power output fluctuation conditions, etc. The CRITIC-TOPSIS algorithm was run through a dedicated evaluation module to perform real-time evaluation, and the evaluation delay, evaluation accuracy and linkage reliability of the device were verified.
[0135] The hardware logic of this device adopts a "task-level parallel" design. When the indicator acquisition module is collecting data... When processing frame data, the weight calculation module synchronously processes the first frame. Frame data, while the score evaluation kernel is evaluating the first frame. The final score is calculated for each frame. At an operating frequency of 100MHz, the total path logic latency for a single evaluation is only in the microsecond range. The system manages on-chip storage space through a "ping-pong" operation, ensuring that the refresh frequency of evaluation results is much higher than the rate of power quality degradation, achieving near real-time tracking of the flywheel power plant's status.
[0136] like Figure 8 As shown, there is a strict timing coupling between S1 (data acquisition) and S2 (algorithm pipeline) of this device. When the system clock trigger signal rises, the write address generator switches to memory area A to write the current frame's sampled data, and the read address generator switches to memory area B to read and calculate the previous frame's data. The above read and write operations are strictly parallel at the hardware physical layer, and their timing satisfies the following mathematical relationship:
[0137]
[0138]
[0139] in, The computation time required for the pipelined operators in S2 to process one frame of data; This refers to a single sampling period in the data acquisition process of S1. This represents a fixed logical latency for a single system evaluation. This timing coupling ensures that the computation speed of the pipelined computing module fully covers the data refresh rate, keeping the evaluation latency constant at a single sampling period. This eliminates task scheduling latency and I / O wait time in general computing architectures.
[0140] The debugging results show that the pure hardware operation latency of the device is ≤1μs, and the system-level result refresh latency is constant at ≤1ms, meeting the stringent requirements of microsecond-level state capture and millisecond-level closed-loop control of the flywheel power station; it meets the real-time control requirements of the flywheel power station; the deviation between the evaluation results and the offline software evaluation results is ≤3%, indicating high evaluation accuracy; the linkage interface transmission latency is ≤5ms, the feedback verification unit can effectively identify erroneous evaluation results, and the preventive control actions are triggered promptly and accurately. When the operating effect drops to Level II, the pre-charging backup unit can start within 100ms; when it drops to Level III, it adjusts according to a linear ratio of 5% increase in flywheel active power output gain for every 10-point decrease in score. The control parameters of the flywheel controller, including the virtual inertia coefficient and / or active power adjustment gain, are adjusted in real time according to the evaluation score. The flywheel output power adjustment response time is ≤200ms, effectively improving the flywheel power station's response capability to power quality degradation and avoiding equipment damage and grid fluctuations.
[0141] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "preferred embodiment," "detailed description," or "preferred embodiment," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0142] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Therefore, these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope defined by the claims of the present invention.
Claims
1. A method for real-time assessment of power quality in a flywheel power station, characterized in that, include: S1. Establish a dual-storage-area ping-pong caching mechanism to decouple the data acquisition process from the algorithm operation process in the physical storage space, so that the writing operation of the current frame's raw data and the reading operation of the previous frame's normalized data are mutually exclusive and alternate. S2. Based on the continuous data stream output by the ping-pong caching mechanism, the Euclidean distance is calculated in real time using a pipeline operator based on the CORDIC algorithm, and a comprehensive evaluation score is output in combination with the CRITIC dynamic weight algorithm. S3. The comprehensive evaluation score is compared with the preset positive and negative ideal solution boundaries in real time, and the virtual inertia parameter of the flywheel controller is dynamically corrected according to the comparison result. The correction frequency of the virtual inertia parameter is synchronized with the sampling frequency in S1.
2. The real-time power quality assessment method for flywheel power plants according to claim 1, characterized in that, There is a temporal coupling relationship between S1 and S2, specifically: The writing operation of the current frame sampled data in step S1 and the reading and calculation operation of the previous frame data in step S2 are performed in parallel at the hardware physical layer, and their timing satisfies the following relationship: in, The computation time required for the pipelined operator to process one frame of data in step S2; This refers to a single sampling period in the data acquisition process of step S1. This is the fixed logical delay for a single system evaluation.
3. The real-time power quality assessment method for flywheel power plants according to claim 1, characterized in that, In S2, the iteration level N of the pipeline operator of the CORDIC algorithm and the sliding window depth W of the CRITIC weight are coupled in hardware resources. The specific configuration method is as follows: based on the total number of logic gate resources of the FPGA or ASIC chip, the number of DSP slices allocated by the CORDIC algorithm and the BlockRAM resources allocated by the weight calculation module are dynamically balanced. Specifically, the CORDIC iteration level N is set to 16 levels to meet the square root calculation accuracy. At the same time, the sliding window depth W is determined to be 1000~2000 points based on the remaining storage resources, so that the weight update cycle and the Euclidean distance calculation cycle are consistent in the hardware clock domain.
4. The real-time power quality assessment method for flywheel power plants according to claim 1, characterized in that, In S3, there is a linear mapping coupling relationship between the comprehensive evaluation score and the virtual inertia parameter, and the relationship is as follows: in, The target virtual inertia of the flywheel controller after real-time dynamic correction; The basic virtual inertia set for the flywheel controller; The sensitivity coefficient for direct intervention in control compensation is used to evaluate the results; the score is the comprehensive evaluation score output at the current time.
5. The real-time power quality assessment method for flywheel power plants according to claim 1, characterized in that, The method further includes an anti-interference coupling verification step: after the output result of S2, the validity of the evaluation result is determined by the hardware state machine; in two adjacent pipeline operation cycles, the comprehensive evaluation score of the evaluation index is repeatedly calculated. If the deviation between the two evaluation results is >5%, it is determined to be an invalid transition caused by sensor transient spike noise or communication error; at this time, the hardware state machine determines that the evaluation result is invalid, suspends the output transmission of the evaluation result, and triggers the interface alarm signal.
6. A real-time power quality assessment device for a flywheel power station, characterized in that, To implement the method according to any one of claims 1-5, comprising: The ping-pong buffer module is equipped with a dual-port memory for executing S1; The pipelined computation module, embedded in the FPGA / ASIC chip, includes a CORDIC square root unit and a CRITIC weight calculation unit, used to execute S2; The coupling control interface module is equipped with a GPIO driver unit and a communication protocol parsing unit, which is used to execute S3 and convert the evaluation score into PWM duty cycle or communication command. In this system, the read / write pointer signal of the ping-pong cache module directly drives the enable terminal of the pipelined operation module, and the completion signal of the pipelined operation module directly triggers the data latch of the coupling control interface module. The modules are directly coupled through hardware level signals, rather than through software polling.
7. The real-time power quality assessment method for flywheel power plants according to claim 3, characterized in that, The evaluation indicators in S2 include 14 core evaluation indicators built around six dimensions: voltage quality support capability, frequency quality support capability, power control performance, inertia damping characteristics, disturbance rejection response capability, and operational reliability. The voltage quality support indicators include: voltage deviation I1 and voltage fluctuation I2; The frequency quality support indicators include: frequency deviation I3; The power control performance indicators include: active power control error I4, reactive power control error I5, and primary frequency regulation control error I6. The inertia damping characteristic parameters include: equivalent transient impedance I7, inertia time constant I11, and damping ratio I12; The disturbance rejection response capability indicators include: phase angle jump risk of grid disconnection I8, primary frequency regulation adjustment time I9, and voltage disturbance response time I10. The operational reliability indicators include: overcurrent capability I13 and wideband positive resistance characteristic I14.
8. The real-time power quality assessment method for flywheel power plants according to claim 3, characterized in that, In S2: For the set 16-stage CORDIC algorithm pipeline operator, when calculating the square root operation of Euclidean distance, the floating-point square root instruction of the general-purpose processor is avoided. Instead, it is decomposed into 16 stages of pure hardware logic. Each stage iteration is implemented only through shift and addition operations.
9. The real-time power quality assessment method for flywheel power plants according to claim 7, characterized in that, In S2: For a sliding window of depth W, a hardware sliding window is constructed using dual-port RAM as a variance extraction unit; the standard deviation of each index is updated in a "one-in-one-out" rolling manner within a single clock cycle through an accumulator bound to the sliding window, without the need to store historical data from W points ago; at the same time, the dedicated DSP48E slice inside the FPGA is directly called to perform parallel pipelined multiply-accumulate operations to calculate the Pearson correlation coefficient matrix between each index.