Control method and system for dynamic simulation of virtual inertia of plc
By performing outlier removal, state estimation, and frequency disturbance sensing in PLC virtual inertia control, the problems of noise suppression and response delay are solved, achieving smooth grid frequency and real-time response, thus improving the stability of the power system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUANENG GUANGDONG SHANTOU OFFSHORE WIND POWER CO LTD
- Filing Date
- 2026-01-28
- Publication Date
- 2026-06-02
AI Technical Summary
Existing technologies in PLC virtual inertia control struggle to effectively suppress noise while ensuring real-time response, leading to signal distortion and control delays, which in turn affect the stability of the power grid frequency.
By acquiring the raw values of the power grid frequency measurement, outlier removal is performed, and a discrete state observer is used for state estimation. Combined with frequency disturbance scenario awareness, virtual inertia and damping power are calculated, and power command smoothing is performed to ensure the smoothness and real-time performance of the signal.
It significantly enhances the frequency support capability and dynamic stability of the power grid, ensuring the safe and reliable operation of the power system.
Smart Images

Figure CN122136884A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent control technology, specifically to a control method and system for dynamic simulation of PLC virtual inertia. Background Technology
[0002] With the rapid development and increasing penetration of renewable energy generation, modern power systems are undergoing profound changes. Because wind power, photovoltaic, and other new energy power generation equipment are mostly connected to the grid via power electronic interfaces, lacking the inherent mechanical inertia of traditional synchronous generators, the overall system inertia of the power grid continues to decrease. This leads to a significant decrease in frequency stability and an increase in frequency fluctuation amplitude when facing sudden disturbances, potentially resulting in a faster rate of frequency change, posing a serious challenge to the safe and stable operation of the power grid. Virtual inertia technology, by enabling power electronic devices to simulate the inertia characteristics of synchronous generators, provides necessary frequency support to the power grid, thereby enhancing the system's dynamic response capability and frequency stability. In the field of industrial control, programmable logic controllers (PLCs), due to their high reliability, fast response, and wide range of industrial applications, have become an ideal platform for realizing distributed virtual inertia dynamic simulation control. Therefore, developing a PLC-based virtual inertia dynamic simulation control method and system is of great significance for improving the frequency response capability and stability of the power grid.
[0003] However, in practical applications, existing virtual inertia control schemes face numerous technical challenges, particularly in accurately and in real-time acquiring and processing the rate of change of frequency (RoCoF) signal. Raw grid frequency measurements are often accompanied by various noises and outliers. Directly differentiating these values to obtain RoCoF would severely amplify the noise, leading to signal distortion and affecting the accuracy of control commands. Conversely, various filtering stages introduced to suppress noise inevitably introduce phase delays, which is fatal for virtual inertia control requiring rapid response, as it reduces the real-time performance and effectiveness of control. This struggle to balance noise suppression and response delay in the RoCoF signal is a fundamental contradiction in existing technologies. The root cause lies in the fundamental contradiction between differentiation and filtering, as well as the discrete and limited computing power of industrial logic controllers (PLCs), making it difficult for existing methods to effectively suppress noise while ensuring real-time response, thus limiting the application effectiveness and reliability of virtual inertia technology in actual power grids.
[0004] Therefore, an optimized control method for dynamic simulation of PLC virtual inertia is needed. Summary of the Invention
[0005] The present invention aims to solve at least one of the technical problems existing in the prior art, and provides a control method and system for dynamic simulation of PLC virtual inertia.
[0006] In a first aspect, embodiments of the present invention provide a control method for dynamic simulation of PLC virtual inertia, comprising: Obtain the raw values of the power grid frequency measurement; Outliers are removed from the raw power grid frequency measurements to obtain the processed frequencies. State estimation based on a discrete state observer is performed on the processed frequencies to obtain the estimated angular frequency and the estimated rate of change of angular frequency; The virtual inertia and damping power based on the estimated angular frequency, the estimated rate of change of angular frequency, and the reference angular frequency are used to calculate the virtual response active power. The virtual response active power and the basic active power reference value are combined to obtain the original total active power command. The original total active power command is smoothed to obtain the final output active power command.
[0007] Secondly, embodiments of the present invention provide a control system for dynamic simulation of PLC virtual inertia, comprising: The data acquisition module is used to acquire the raw values of power grid frequency measurements; The outlier removal module is used to remove outliers from the raw values of power grid frequency measurements to obtain the processed frequency. The state estimation module is used to perform state estimation on the processed frequency based on a discrete state observer to obtain the estimated angular frequency and the estimated rate of change of angular frequency. The virtual inertia and damping power calculation module is used to calculate the virtual inertia and damping power based on the estimated angular frequency, the estimated rate of change of angular frequency, and the reference angular frequency to obtain the virtual response active power. The total active power command synthesis module is used to synthesize the virtual response active power and the basic active power reference value into a total active power command to obtain the original total active power command. The power command smoothing module is used to smooth the original total active power command to obtain the final output active power command.
[0008] Compared with existing technologies, the present invention provides a control method and system for PLC virtual inertia dynamic simulation. First, it removes outliers from the raw power grid frequency measurements. Then, using a discrete state observer, it actively estimates the state based on the model and noisy measurements by establishing a simplified dynamic model of the power grid frequency. This allows for the simultaneous acquisition of smooth and real-time estimated angular frequency and estimated rate of change of angular frequency, fundamentally avoiding the problem of direct differential amplification of noise and overcoming the response delay caused by traditional filters. This significantly enhances the frequency support capability and dynamic stability of the power grid, ensuring the safe and reliable operation of the power system. Attached Figure Description
[0009] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0010] Figure 1 A flowchart of a control method for dynamic simulation of PLC virtual inertia according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the data flow in the control method for PLC virtual inertia dynamic simulation according to an embodiment of the present invention; Figure 3 This is a block diagram of a control system for dynamic simulation of PLC virtual inertia according to an embodiment of the present invention. Detailed Implementation
[0011] To enable those skilled in the art to better understand the technical solutions of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the described embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0012] Unless otherwise specifically stated, the technical or scientific terms used in the embodiments of this invention should be understood in their ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains. The terms "comprising" or "including," as used in the embodiments of this invention, do not limit the shapes, numbers, steps, actions, operations, components, elements, and / or groups thereof mentioned, nor do they exclude the appearance or addition of one or more other different shapes, numbers, steps, actions, operations, components, elements, and / or groups thereof, or the inclusion of these.
[0013] Unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps described in these embodiments do not limit the scope of the invention. It should also be understood that, for ease of description, the dimensions of the various parts shown in the drawings are not drawn to actual scale, and techniques, methods, and apparatus known to those skilled in the art may not be discussed in detail; however, where appropriate, the illustrated techniques, methods, and apparatus should be considered part of the specification. In all the examples shown and discussed herein, any other specific example may have different values. It should be noted that similar symbols and letters in the following figures denote similar items; therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0014] In the description of the embodiments of the present invention, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In the embodiments of the present invention, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in a suitable manner in any one or more embodiments or examples. Furthermore, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in the embodiments of the present invention, as well as the features of different embodiments or examples.
[0015] Hereinafter, exemplary embodiments according to the present invention will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments of the present invention. It should be understood that the present invention is not limited to the exemplary embodiments described herein.
[0016] The present invention proposes a control method for dynamic simulation of PLC virtual inertia. Figure 1 This is a flowchart of a control method for dynamic simulation of PLC virtual inertia according to an embodiment of the present invention. Figure 2 This is a system architecture diagram of a control method for dynamic simulation of PLC virtual inertia according to an embodiment of the present invention. Figure 1 and Figure 2As shown, the control method for PLC virtual inertia dynamic simulation according to an embodiment of the present invention includes the following steps: S1, acquiring the original value of the power grid frequency measurement; S2, removing outliers from the original value of the power grid frequency measurement to obtain the processed frequency; S3, performing state estimation based on a discrete state observer on the processed frequency to obtain the estimated angular frequency and the estimated rate of change of angular frequency; S4, performing virtual inertia and damping power calculation based on the estimated state based on the estimated angular frequency, the estimated rate of change of angular frequency, and the reference angular frequency to obtain the virtual response active power; S5, synthesizing the virtual response active power and the basic active power reference value into a total active power command to obtain the original total active power command; S6, smoothing the original total active power command into a power command to obtain the final output active power command.
[0017] Specifically, S1 involves acquiring the raw values of the power grid frequency measurement. It should be understood that the integration of new energy sources into modern power grids leads to a decrease in system inertia and an increase in frequency fluctuations. Therefore, accurately sensing the current power grid frequency state is a prerequisite for achieving effective frequency support and improving system stability. The raw values of the power grid frequency measurement refer to frequency data directly measured from the power grid by sensing devices without any processing, filtering, or correction. These raw values are typically acquired in real time by frequency sensors (e.g., high-precision voltage transformers combined with frequency transmitters, or dedicated power quality monitoring devices) deployed at key nodes or connections in the power grid. These sensors convert the voltage or current waveforms of the power grid into digital or analog signals, and then calculate the current power grid frequency using specific algorithms. These raw values are a direct mapping of the physical power grid state, but their inherent characteristics often include various noises, instantaneous spikes, or outliers introduced by factors such as the measurement environment and equipment accuracy.
[0018] In practice, the process of acquiring the raw values of the power grid frequency measurement is typically continuous and periodic. In real industrial environments, such as the approach used in this embodiment, the PLC will be configured with physical input interfaces or communication modules to receive signals from field frequency measurement devices. These devices may include independent frequency transmitters that convert the power grid frequency signal into a standard analog quantity (such as a 4-20mA current signal or a 0-10V voltage signal) and input it to the PLC's analog input module; or, more advanced power quality monitors or smart meters, which periodically send frequency data to the PLC via digital communication protocols such as Ethernet (such as Modbus TCP / IP) or serial communication (such as Modbus RTU). The PLC reads and digitizes these input signals according to its inherent scan cycle (or sampling cycle). For example, a power quality analyzer may send its measured instantaneous frequency value (such as 50.02 Hz) as a floating-point number to the PLC via a Modbus register. The PLC reads this register in each scan cycle to obtain the latest frequency value. This read value constitutes the raw value of the power grid frequency measurement for the current cycle.
[0019] Specifically, in step S2, outlier removal is performed on the raw power grid frequency measurement values to obtain the processed frequency. It should be understood that the raw frequency values obtained directly from the power grid are often accompanied by various noise interferences, such as power grid transient disturbances, measurement equipment failures, communication errors, or environmental factors. These can all lead to instantaneous spikes or outliers in the data, i.e., outliers. If these outliers are used directly for subsequent control calculations without processing, especially when deriving the rate of change of frequency (RoCoF), they will severely amplify the noise, leading to signal distortion and affecting the accuracy and real-time performance of the virtual inertia response, and may even cause instability in the control system. Therefore, in the technical solution of this invention, by removing outliers from the raw power grid frequency measurement values, the data source can be purified, providing a relatively clean and reliable input for subsequent state estimation based on discrete state observers, thus ensuring the robustness and effectiveness of the entire control method under actual operating conditions.
[0020] In practice, the process begins by calculating the instantaneous frequency change rate and verifying the validity of the raw grid frequency measurement value based on the maximum physical change threshold and the effective frequency value of the previous cycle to obtain an instantaneous spike flag. This process involves first acquiring the current raw grid frequency measurement value and comparing it with the frequency value already determined to be valid in the previous control cycle. The difference between the two values yields an instantaneous frequency change. This change is then compared with a preset maximum physical change threshold (e.g., assuming the grid frequency cannot exceed a certain physical limit within a unit of time, such as 0.5 Hz / s or a larger safe value). If the instantaneous frequency change exceeds this threshold, the current raw grid frequency measurement value is considered an abnormal instantaneous spike, and an instantaneous spike flag (e.g., a Boolean value, true indicating a spike detected, false indicating no detection) is generated. This threshold is set based on a deep understanding of the physical characteristics of the grid frequency, reflecting the maximum rate of frequency change that can be achieved under real physical constraints, thus effectively distinguishing between real frequency changes and abnormal fluctuations caused by measurement noise.
[0021] Furthermore, based on the instantaneous spike flag and the effective frequency value of the previous cycle, the system performs conditional selection of the effective frequency value from the raw power grid frequency measurement to obtain the processed frequency. During this process, the system makes conditional judgments based on the instantaneous spike flag obtained in the previous step. If the instantaneous spike flag indicates that the current measurement value is an abnormal spike, the system will abandon the use of this raw measurement value and instead adopt the effective frequency value determined in the previous control cycle as the current processed frequency. This avoids transmitting erroneous measurement values to subsequent modules, thereby preventing abnormal values from negatively impacting the control system. If the instantaneous spike flag indicates that the current measurement value is normal, i.e., no abnormal spike is detected, the raw value is directly adopted as the current processed frequency. Ultimately, the frequency value obtained through this processing is the processed frequency, which is a smoother and more reliable frequency signal that has eliminated sudden abnormal interference to a certain extent. In subsequent cycles, the processed frequency will be stored as a new effective frequency value for comparison and judgment in the next cycle.
[0022] Specifically, in step S3, state estimation based on a discrete state observer is performed on the processed frequency to obtain the estimated angular frequency and the estimated rate of change of angular frequency. Considering that even after outlier removal, the processed frequency may still contain noise, and that RoCoF amplifies this noise by directly differentiating the frequency, while traditional filters introduce unacceptable phase delays, severely impacting the real-time performance and accuracy of the virtual inertia response, this invention employs a state estimation approach. Based on the system model and noisy measurements, the true state of the system is actively reconstructed, resulting in a smooth estimated angular frequency and an estimated rate of change of angular frequency. This overcomes the inherent contradiction in traditional methods of balancing measurement noise and response delay, providing high-precision, low-latency grid frequency and rate of change information for subsequent virtual inertia and damping power calculations.
[0023] In practical implementation, firstly, based on the PLC scan cycle, the processed frequency is converted into an observation input to obtain the observer's measurement input. That is, within each PLC scan cycle, the processed frequency obtained in the previous step is converted into a measurement input usable by the observer. In the technical solution of this invention, since virtual inertia is usually related to angular frequency rather than frequency, it is necessary to convert the frequency into angular frequency. This conversion ensures that the observer processes a quantity that is more closely matched to the physical model, namely, the angular frequency of the power grid. Next, based on the optimal state estimation vector of the previous cycle, the observer system matrix, and the gain matrix, the observer's measured input is predicted and corrected using a Luenberger observer to obtain the optimal state estimation vector for the current cycle. The Luenberger observer is a commonly used state observer that performs two steps within each sampling period k: prediction and correction. In the prediction phase, the observer uses the optimal state estimate from the previous time step and the system's own dynamic model to predict the current state. For example, a simplified power grid frequency dynamic model can be represented in second-order state-space form, and its state vector may contain angular frequency and the rate of change of angular frequency. In the correction phase, the observer compares the current predicted state with the actual measured input, calculates the measurement residual (i.e., the difference between the predicted output and the actual measurement), and then corrects the predicted state using the observer gain matrix to obtain the optimal state estimation vector for the current time step. This prediction-correction mechanism allows the observer to track the true dynamics of the system while suppressing measurement noise and effectively avoids the delay caused by traditional filtering. In its real-time operating environment, the PLC periodically performs these matrix operations, where the observer system matrix describes the dynamic model of the power grid frequency, and the gain matrix is determined by design to balance noise suppression capability and response speed.
[0024] Furthermore, the estimated angular frequency and estimated rate of change of angular frequency are extracted from the optimal state estimation vector of the current period. Since the optimal state estimation vector of the current period is constructed based on a pre-defined system model, it contains the internal state of the system, namely the smooth angular frequency and rate of change of angular frequency. Therefore, the required estimated angular frequency and estimated rate of change of angular frequency can be directly extracted from this estimation vector. For example, if the first element of the state vector represents the angular frequency and the second element represents the rate of change of angular frequency, then these can be directly extracted for subsequent calculations. This extraction method avoids further differentiation of the original measurements and provides inherently smooth and delay-free frequency dynamic information.
[0025] Specifically, in step S4, virtual inertia and damping power are calculated based on the estimated angular frequency, the estimated rate of change of angular frequency, and the reference angular frequency to obtain the virtual response active power. It should be understood that grid frequency disturbances are complex and varied, potentially exhibiting extremely high rate of change of frequency (RoCoF) but small frequency deviation, significant frequency deviation but a relatively flat RoCoF, or a complex dynamic where both are severe. Traditional virtual inertia control schemes often use preset fixed parameters to calculate the virtual inertia response power and damping response power, and simply perform arithmetic superposition. This method fails to fully consider the specific relationship and dynamic priority of virtual inertia and damping under different disturbance scenarios, making it difficult for the control system to achieve optimal adaptability. Specifically, grid frequency disturbances are not singular; they may exhibit extremely high RoCoF (rate of change of frequency) but small frequency deviation, significant frequency deviation but a relatively flat RoCoF, or a complex dynamic where both are severe. Virtual inertia primarily aims to resist the rate of frequency change, while damping focuses on suppressing frequency deviations and promoting frequency return to its nominal value. The optimal strength and coordination of these two elements under different scenarios are continuously and dynamically changing. A linear superposition strategy with fixed parameters cannot intelligently and dynamically adjust the relative contribution and strength of the two elements in the total power command. This means that in some situations, such as when RoCoF rises sharply, the system urgently needs strong inertial support to prevent further frequency deterioration. If the damping is too strong, it may prematurely weaken the initial effect of the inertial response, or even lead to overall response sluggishness. Conversely, if the frequency deviation is large and RoCoF has stabilized, the system may need stronger damping to accelerate the stable return of the frequency, and fixed-parameter damping may not provide sufficient restoring force. This static combination not only limits the optimization of control effects but also ignores the potential dynamic synergy and conflict between inertia and damping, which may even produce mutually canceling effects under extreme dynamic changes. To overcome the above-mentioned technical defects, the technical solution of this invention introduces a dynamic collaborative control mechanism for virtual inertia and damping based on frequency disturbance scenario awareness. This mechanism can intelligently identify the real-time state of power grid frequency disturbances and accurately and dynamically adjust the virtual inertia and damping coefficients according to the current disturbance mode, thereby achieving optimized collaboration between the two in the total power command and significantly improving the adaptability, robustness and dynamic performance of the virtual inertia control system.
[0026] In practical implementation, firstly, frequency disturbance scenario perception and pattern recognition are performed on the estimated angular frequency, estimated angular frequency change rate, and reference angular frequency to obtain the inertia influence factor and damping influence factor. Traditional schemes use linear superposition of fixed parameters when dealing with virtual inertia and damping, resulting in poor control performance when facing different types of grid frequency disturbances. For example, when RoCoF is extremely high, inertial support is prioritized, while damping recovery is emphasized when frequency deviation is large. To make the control strategy adaptive, the current frequency disturbance characteristics are accurately perceived first to avoid inappropriate fixed parameters affecting performance. During this process, the system receives the estimated angular frequency processed in the previous stage. and estimate the rate of change of angular frequency These input data represent the most reliable state of the current power grid frequency dynamics; and are based on a preset reference angular frequency. Calculate the absolute value of the frequency deviation. and the absolute value of RoCoF Subsequently, using a series of predefined frequency deviation thresholds and RoCoF thresholds, these physical quantities are transformed into continuous inertia influence factors and damping influence factors through a nonlinear mapping function (such as the sigmoid function or a piecewise linear function, rather than a simple hard switch). These two factors, ranging from 0 to 1, reflect the relative importance of the inertial and damping responses under the current scenario. Specifically, the mapping function is designed so that the inertia influence factor increases rapidly at high RoCoF and may preferentially increase its weight in extremely high RoCoF scenarios, ensuring the system receives the strongest inertial support even if the frequency deviation factor has not fully reached its maximum value. Conversely, the damping influence factor increases accordingly when the frequency deviation is large.
[0027] Through the above process, intelligent perception of the control system is achieved, thereby fundamentally solving the adaptability defects of fixed parameters. By generating continuous influence factors, the system can perform fine and smooth pattern recognition for different frequency disturbance scenarios, avoiding rigid mode switching. It creatively introduces consideration of the relationship between RoCoF and frequency deviation, prioritizing the enhancement of key responses (such as inertial support under high RoCoF) in specific high-risk scenarios, ensuring the most appropriate control force is provided at the most critical moments of power grid dynamic changes.
[0028] Furthermore, based on the inertia influence factor and damping influence factor, scenario-aware dynamic coefficient tuning and power calculation are performed on the estimated angular frequency, estimated rate of change of angular frequency, and reference angular frequency to obtain the virtual response active power. That is, after identifying the current frequency disturbance mode in the scenario-aware stage, the perceived information is transformed into actual control actions. Instead of using fixed values, the virtual inertia and damping coefficients are dynamically adjusted to ensure that the output power command is the optimal coordinated response for the current disturbance scenario. In this process, using the inertia influence factor and damping influence factor calculated in the first step, combined with preset inertia reference values, inertia gain, damping reference values, and damping gain, the virtual inertia required for the current scan cycle is dynamically calculated. These dynamic parameters are then substituted into a variant of the classic synchronous generator swing equation to calculate the power components of the inertia response and the damping response; finally, these two dynamic components are superimposed to obtain the enhanced virtual response active power.
[0029] In this way, by integrating situation awareness into the dynamic tuning of virtual inertia and damping coefficients, intelligent coordination of inertia and damping power output is achieved. This means that in emergency situations, the J and D parameters will be amplified according to the actual state to provide stronger support, while in the recovery phase, they can be adjusted to parameters that are more conducive to stability. This dynamic coordination, rather than a simple fixed superposition, enables virtual inertia control to cope with a wider range of more complex power grid disturbance scenarios, providing robustness and performance far exceeding traditional methods.
[0030] Specifically, in step S5, the virtual response active power and the base active power reference value are synthesized into a total active power command to obtain the original total active power command. It should be understood that power electronic devices deployed in the power grid, in addition to providing virtual inertia and damping response to enhance system frequency stability, also need to perform their inherent functions. For example, photovoltaic inverters need to output base active power according to sunlight intensity, and energy storage systems need to charge and discharge according to dispatch commands. The virtual response active power represents the active power component calculated in the previous step based on accurate estimation of the angular frequency and rate of change of the angular frequency, and dynamically adjusted by scenario awareness of the virtual inertia and damping coefficient. It characterizes the power that power electronic devices need to inject or absorb at the current moment to simulate the inertia of a traditional synchronous generator and provide frequency damping, in order to effectively cope with the dynamic changes in the grid frequency. The base active power reference value refers to the target value of active power that power electronic devices should output or absorb according to their main control function or external dispatch commands, without considering the frequency support effect. For example, for photovoltaic inverters, this might be the power output determined based on illuminance and maximum power point tracking algorithms; for energy storage systems, it might originate from the battery management system or charging / discharging commands from the grid dispatch center. It represents the active power baseline for normal equipment operation. In the technical solution of this invention, by effectively synthesizing these two different sources of power commands, both ultimately output through the same device, a unified, executable power command can be formed, ensuring that the device can fulfill its basic responsibilities while actively participating in grid frequency regulation. Specifically, the virtual response active power and the baseline active power reference value are added together to obtain the original total active power command. This direct addition method ensures that the frequency support response can be superimposed on the device's basic operating state, forming a complete instantaneous power target without power ramp-up limitations, providing input for subsequent power command smoothing steps. The obtained original total active power command represents the total active power required to be output or absorbed by the device in the current control cycle. This command is a synthesized instantaneous value and has not yet undergone any smoothing processing based on device physical limitations (such as ramp rate, power limiting, etc.).
[0031] Specifically, in step S6, the original total active power command is smoothed to obtain the final output active power command. It should be understood that the original total active power command generated in the previous step is a direct superposition of the virtual response and the base power; it is an ideal, instantaneously changing quantity. However, actual power electronic conversion equipment, such as inverters or converters, has its active power output limited by many physical characteristics, including the maximum power change slope (i.e., ramp rate) and instantaneous power limiting. If the rapidly changing original command is directly sent to the equipment without power command smoothing, the equipment may experience overshoot, oscillation, or even trigger protection mechanisms and trip due to its inability to respond quickly, thereby damaging the equipment or causing grid power quality deterioration and system instability. Therefore, in the technical solution of this invention, the original total active power command is further smoothed to ensure that the final output power command meets the equipment's operational safety boundaries and grid stability requirements, improving the robustness and reliability of the entire control system.
[0032] In practical implementation, firstly, based on the final active power command of the previous cycle, the maximum allowable power change slope, and the PLC scan cycle, the upper limit and lower limit of the power command for the current cycle are determined. It should be understood that even after meticulous calculations of virtual inertia and damped power, the resulting original total active power command may still exhibit rapid or even abrupt characteristics. However, the output power change rate of actual grid-connected power electronic conversion equipment, such as inverters or energy storage systems, is strictly limited by physical constraints, preventing significant changes in output power within a very short time. Without prior limitation, directly sending commands with large instantaneous changes to the equipment may cause overshoot and oscillations due to the equipment's inability to respond quickly, triggering protection mechanisms and causing tripping, or even damaging the equipment hardware, thereby affecting the overall power quality and system stability of the power grid. Therefore, in the technical solution of this invention, based on the dynamic response capability of the equipment, a reasonable and safe dynamic operating range is preset for the power command to be issued in the current cycle to ensure the stability of power changes, the reliability of equipment operation, and to meet the grid's requirements for the smoothness of active power regulation.
[0033] During this process, the system dynamically calculates the upper and lower limits of the power command for the current cycle within each control cycle, based on the final active power command of the previous cycle, the maximum allowable power change slope, and the PLC scan cycle. The final active power command of the previous cycle refers to the active power command value actually issued to the power electronic equipment at the end of the previous control cycle; it constitutes the starting point or baseline for the dynamic limiting calculation of the current cycle. The maximum allowable power change slope is usually determined by the physical characteristics of the equipment (such as the response speed of the converter, the switching frequency limit of semiconductor devices, etc.) or grid specifications (such as the grid dispatching requirements for the ramp rate of regulating resources). It defines the maximum rate at which the power electronic equipment can safely and stably change its active power output per unit time (e.g., per second), usually expressed in megawatts per second (MW / s) or per-unit (pu / s). The PLC scan cycle refers to the time required for the programmable logic controller (PLC) to execute a complete control algorithm cycle, which is also the time step of the entire discrete control system. It is an indispensable time scale for discrete-time domain calculations. After obtaining these three parameters, the upper limit of the power command for the current cycle can be determined by adding the final active power command of the previous cycle to the maximum allowable power increment within the current PLC scan cycle. That is, by calculating the product of the maximum allowable power change slope and the PLC scan cycle, the maximum power that can change within that cycle is obtained. This maximum power is then added to the final active power command of the previous cycle to obtain the upper limit of the power command for the current cycle. Similarly, by calculating the product of the maximum allowable power change slope and the PLC scan cycle, the maximum power that can change within that cycle is obtained. This maximum power is then subtracted from the final active power command of the previous cycle to obtain the lower limit of the power command for the current cycle. Through these two calculations, the system constructs a dynamic, time-varying safety window for the final output active power command to be generated.
[0034] Furthermore, based on the upper and lower limits of the power command for the current period, the original total active power command is saturated and clamped, and the output is updated to obtain the final output active power command. Although the safe range of power change has been dynamically determined based on the physical ramp-up capability of the equipment in the previous stage, the original total active power command itself is still an instantaneous quantity, which may exceed this dynamically set range. If such over-limit commands are allowed to directly drive power electronic equipment, it may cause the equipment to exceed its dynamic response capability, resulting in overload, overheating, protection actions, or even damage, thereby affecting the stability and reliability of the entire power system. Therefore, limiting the original command to this physically permissible dynamic range through saturation clamping is an important means to ensure the smoothness of the output command, conform to the safe operating boundary of the equipment, and maintain the power quality of the power grid. It is worth mentioning that saturation clamping is a control technique used to constrain the value of a signal between predefined upper and lower limits. When the signal attempts to exceed these boundaries, it will be "clamped" at the boundary value to prevent further deviation.
[0035] In practice, the original total active power command is saturated-clamped and its output is updated using the following formula:
[0036] in, To ultimately output the active power command, This is the lower limit of the power command for the current cycle. This represents the upper limit of power commands for the current cycle. This is the original total active power command. To find the minimum value function, This is a function that takes the maximum value. Specifically, firstly, the original total active power command is compared with the lower limit of the power command for the current period, and the larger of the two values is taken, ensuring that the original total active power command does not fall below the allowable lower limit. If the original total active power command is below the lower limit, its value will be forcibly increased to the lower limit; if the original total active power command is already above or equal to the lower limit, its original value remains unchanged. This operation ensures that the downward adjustment rate of the power command does not exceed the physical limits of the equipment. Secondly, the result of the above operation is compared with the upper limit of the power command for the current period, and the smaller value is taken, ensuring that the final command does not exceed the allowable upper limit. If the value after the first comparison operation exceeds the upper limit of the power command, its value will be clamped to the upper limit; if its value is already below the upper limit, it remains unchanged. This operation controls the upward adjustment rate of the power command, ensuring that it also does not exceed the physical constraints of the equipment. Through this bidirectional saturation clamping, regardless of how rapidly or excessively the original command changes, the final output command will be limited to a safe and smooth dynamic range defined by the lower and upper limits of the power command, thereby achieving effective smoothing and rate limiting of the power command. Here, the final output active power command is the actual power setpoint, after all processing and smoothing, ready to be sent directly to the physical power electronic equipment. It reflects both the frequency requirements of the power grid and the operating constraints of the equipment itself.
[0037] In summary, the control method for PLC virtual inertia dynamic simulation according to embodiments of the present invention is explained. It first removes outliers from the raw power grid frequency measurements, and then, using a discrete state observer, actively estimates the state based on the model and noisy measurements by establishing a simplified dynamic model of the power grid frequency. This simultaneously obtains smooth and real-time estimated angular frequency and estimated rate of change of angular frequency, fundamentally avoiding the problem of direct differential amplification of noise and overcoming the response delay caused by traditional filters. This significantly enhances the frequency support capability and dynamic stability of the power grid, ensuring the safe and reliable operation of the power system.
[0038] Furthermore, a control system for dynamic simulation of PLC virtual inertia is also provided.
[0039] Figure 3 This is a block diagram of a control system for dynamic simulation of PLC virtual inertia according to an embodiment of the present invention. Figure 3As shown, the control system 300 for PLC virtual inertia dynamic simulation according to an embodiment of the present invention includes: a data acquisition module 310 for acquiring the original value of the power grid frequency measurement; an outlier removal module 320 for removing outliers from the original value of the power grid frequency measurement to obtain the processed frequency; a state estimation module 330 for performing state estimation based on a discrete state observer on the processed frequency to obtain the estimated angular frequency and the estimated rate of change of angular frequency; a virtual inertia and damping power calculation module 340 for performing virtual inertia and damping power calculation based on the estimated angular frequency, the estimated rate of change of angular frequency, and the reference angular frequency to obtain the virtual response active power; a total active power command synthesis module 350 for synthesizing the total active power command from the virtual response active power and the basic active power reference value to obtain the original total active power command; and a power command smoothing module 360 for smoothing the original total active power command to obtain the final output active power command.
[0040] As described above, the PLC virtual inertia dynamic simulation control system 300 according to embodiments of the present invention can be implemented in various wireless terminals, such as servers with PLC virtual inertia dynamic simulation control algorithms. In one possible implementation, the PLC virtual inertia dynamic simulation control system 300 according to embodiments of the present invention can be integrated into the wireless terminal as a software module and / or a hardware module. For example, the PLC virtual inertia dynamic simulation control system 300 can be a software module in the operating system of the wireless terminal, or it can be an application developed for the wireless terminal; of course, the PLC virtual inertia dynamic simulation control system 300 can also be one of many hardware modules of the wireless terminal.
[0041] Alternatively, in another example, the control system 300 for PLC virtual inertia dynamic simulation and the wireless terminal can also be separate devices, and the control system 300 for PLC virtual inertia dynamic simulation can be connected to the wireless terminal via wired and / or wireless networks, and transmit interactive information in accordance with an agreed data format.
[0042] It is understood that the above embodiments are merely exemplary implementations used to illustrate the principles of the present invention, and the present invention is not limited thereto. For those skilled in the art, various modifications and improvements can be made without departing from the spirit and essence of the present invention, and these modifications and improvements are also considered to be within the scope of protection of the present invention.
Claims
1. A control method for dynamic simulation of PLC virtual inertia, characterized in that, include: Obtain the raw values of the power grid frequency measurement; Outlier removal is performed on the raw values of the power grid frequency measurement to obtain the processed frequency; The processed frequencies are subjected to state estimation based on a discrete state observer to obtain the estimated angular frequency and the estimated rate of change of angular frequency; Based on the estimated angular frequency, the estimated angular frequency change rate, and the reference angular frequency, virtual inertia and damping power based on the estimated state are calculated to obtain the virtual response active power. The virtual response active power and the basic active power reference value are combined to form a total active power command to obtain the original total active power command; The original total active power command is smoothed to obtain the final output active power command.
2. The control method for dynamic simulation of PLC virtual inertia according to claim 1, characterized in that, The process of removing outliers from the raw power grid frequency measurements to obtain processed frequencies includes: The instantaneous frequency change rate is calculated and the validity is verified based on the maximum physical change threshold and the effective frequency value of the previous cycle to obtain the instantaneous peak indicator; Based on the instantaneous peak indicator and the effective frequency value of the previous cycle, the original value of the power grid frequency measurement is conditionally selected for the effective frequency value to obtain the processed frequency.
3. The control method for dynamic simulation of PLC virtual inertia according to claim 1, characterized in that, Performing state estimation based on a discrete state observer on the processed frequency to obtain the estimated angular frequency and the estimated rate of change of angular frequency includes: Based on the PLC scanning cycle, the processed frequency is converted into an observation input to obtain the observer measurement input; Based on the optimal state estimation vector, observer system matrix, and gain matrix of the previous cycle, the observer measurement input is predicted and corrected based on the Luenberger observer to obtain the optimal state estimation vector of the current cycle. The estimated angular frequency and the estimated rate of change of angular frequency are extracted from the optimal state estimation vector of the current period.
4. The control method for dynamic simulation of PLC virtual inertia according to claim 1, characterized in that, Based on the estimated angular frequency, the estimated rate of change of angular frequency, and the reference angular frequency, virtual inertia and damping power calculations are performed based on the estimated state to obtain the virtual response active power, including: Frequency disturbance scenario perception and pattern recognition are performed on the estimated angular frequency, the estimated angular frequency change rate and the reference angular frequency to obtain the inertia influence factor and the damping influence factor. Based on the inertia influence factor and the damping influence factor, the estimated angular frequency, the estimated angular frequency change rate, and the reference angular frequency are dynamically tuned and power calculated based on context awareness to obtain the virtual response active power.
5. The control method for dynamic simulation of PLC virtual inertia according to claim 1, characterized in that, The process of synthesizing a total active power command from the virtual response active power and the basic active power reference value to obtain an original total active power command includes: adding the virtual response active power and the basic active power reference value to obtain the original total active power command.
6. The control method for dynamic simulation of PLC virtual inertia according to claim 1, characterized in that, The original total active power command is smoothed to obtain the final output active power command, including: Based on the final active power command, maximum allowable power change slope, and PLC scan cycle of the previous cycle, determine the upper limit of the power command and the lower limit of the power command for the current cycle. Based on the upper limit of the power command and the lower limit of the power command in the current period, the original total active power command is saturated and clamped and the output is updated to obtain the final output active power command.
7. The control method for dynamic simulation of PLC virtual inertia according to claim 6, characterized in that, Based on the upper limit of the power command and the lower limit of the power command in the current period, the original total active power command is saturated clamped and the output is updated to obtain the final output active power command. This includes: saturating clamping and updating the original total active power command using the following formula: in, To ultimately output the active power command, This is the lower limit of the power command for the current cycle. This represents the upper limit of power commands for the current cycle. This is the original total active power command. To find the minimum value function, This is the function for finding the maximum value.
8. A control system for dynamic simulation of PLC virtual inertia, characterized in that, include: The data acquisition module is used to acquire the raw values of power grid frequency measurements; An outlier removal module is used to remove outliers from the original values of the power grid frequency measurement to obtain the processed frequency. The state estimation module is used to perform state estimation based on a discrete state observer on the processed frequency to obtain the estimated angular frequency and the estimated rate of change of angular frequency; The virtual inertia and damping power calculation module is used to calculate the virtual inertia and damping power based on the estimated angular frequency, the estimated angular frequency change rate, and the reference angular frequency to obtain the virtual response active power. The total active power command synthesis module is used to synthesize the virtual response active power and the basic active power reference value into a total active power command to obtain the original total active power command. The power command smoothing module is used to smooth the original total active power command to obtain the final output active power command.