Intelligent fault switching method and system for vPLC redundancy control of wind power plant
By deploying virtual PLCs in wind farms and combining them with digital twin technology, the problems of high hardware costs, long switching times, and simple synchronization mechanisms in existing wind turbine control redundancy schemes have been solved. Millisecond-level, disturbance-free fault switching has been achieved, improving the reliability and stability of wind turbine operation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-11
- Publication Date
- 2026-03-31
AI Technical Summary
Existing wind turbine control redundancy schemes suffer from high hardware costs, poor scalability, long switching times, simple state synchronization mechanisms, and a lack of predictive maintenance capabilities, which affect the operational stability and reliability of wind farms.
Virtual PLCs are deployed using a private cloud virtualization platform. Through three-domain monitoring of heartbeat, status, and model, health is calculated in real time, and predictive status alignment and switching are performed in case of failure. Smooth switching is achieved by combining a delay compensator, and predictive maintenance is performed using digital twin technology.
It achieves millisecond-level seamless fault switching, improving the reliability and stability of wind turbine operation, reducing hardware costs, and increasing resource utilization and system maintainability.
Smart Images

Figure CN121763689A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial automation control technology, specifically to a method and system for intelligent fault switching in redundancy control of vPLC in wind farms. Background Technology
[0002] With the large-scale development of the wind power industry and the continuous increase in grid-connected wind power capacity, the reliability of the control system of a single wind turbine has become a key factor affecting the stability of grid operation and the power generation revenue of wind farms. In the field of industrial automation control, to cope with the potential failures of local hardware PLCs, redundant control technology is widely used in wind turbine control scenarios, aiming to ensure the continuous operation of the unit through backup control units. In recent years, the penetration of virtualization technology and private cloud platforms in the industrial field has provided a new direction for the optimization of wind farm control systems. How to combine virtual PLCs (vPLCs) to build an efficient redundant control architecture and achieve rapid and smooth switching in case of failure has become an important research direction for improving the reliability of wind turbine control.
[0003] Current mainstream wind turbine control redundancy solutions mostly adopt a local dual-PLC hot backup mode. This solution can address the single-point failure problem of PLCs to a certain extent, but there is still room for optimization in practical applications. From the perspective of cost and scalability, the configuration of dual hardware PLCs not only increases equipment procurement and maintenance costs, but also increases the complexity of hardware deployment and management as the scale of wind farms expands. In terms of switching performance, the switching time of existing solutions is usually between 100ms and 500ms, during which turbine speed fluctuations and torque surges are prone to occur, which are detrimental to the stability of unit operation. At the same time, the state synchronization mechanism of traditional solutions is relatively simple, making it difficult to fully guarantee the consistency of critical control data, and lacking predictive maintenance capabilities combined with digital twin technology, it is unable to provide early warning of potential faults. To address these issues, we propose an intelligent fault switching method and system for wind farm vPLC redundancy control. Summary of the Invention
[0004] To address the aforementioned technical issues, this paper presents a method and system for intelligent fault switching in vPLC redundant control for wind farms. This solution overcomes the limitations of existing mainstream wind turbine control redundancy schemes, which rely on local dual-PLC hot backup. While these schemes can handle single-point failures, they have significant drawbacks: high hardware costs and poor scalability, leading to increased management complexity as the wind farm scales up; switching times are typically between 100-500ms, which can easily cause speed fluctuations and torque surges; and the simple state synchronization mechanism makes it difficult to guarantee the consistency of critical data and lacks predictive maintenance capabilities.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows: Intelligent fault switching method for redundancy control of vPLC in wind farms includes: S1. Deploy vPLC instances on the wind farm's private cloud virtualization platform, each corresponding to a local hardware PLC for each wind turbine, so that the vPLC and the local PLC can continuously perform parallel monitoring and data synchronization in the three domains of heartbeat, status and model. S2. Based on heartbeat delay, control response check code, and digital twin model deviation, calculate the health score ScoreH of the local PLC in real time. S3. If the health score ScoreH is lower than the preset threshold, predictive state alignment is initiated. Key control variables are written to the vPLC's mirror register through differential synchronization and hash verification, and the output of the local PLC is frozen. S4. The fault detection and switching controller issues a switching command within a preset time, and the vPLC immediately takes over the fan control based on the latest image. S5. During the switching moment, the built-in delay compensator of the vPLC uses a model predictive control algorithm to perform feedforward-feedback compensation for command jumps, ensuring the continuity of wind turbine speed, torque and pitch angle. S6. After the switch is completed, the vPLC enters the online control mode; S7, after the original PLC is repaired and passes the consistency verification, supports seamless reverse switching.
[0006] Preferably, the S2 center-hop delay is calculated as follows: Based on the round-trip time (RTT) of bidirectional Ethernet ring network probe packets, the average time difference between sending and receiving heartbeat packets within a continuous period is taken. When the RTT value is greater than the preset threshold or the packet loss rate exceeds the set ratio, the heartbeat monitoring module triggers an alarm signal, which serves as the heartbeat domain input factor for the health score ScoreH calculation. The health calculation formula has a corresponding weight set for the center jump domain. After RTT is normalized, it is used to quantify the impact of network latency on health, so as to identify network anomalies and initiate predictive state alignment.
[0007] Preferably, the process of generating and verifying the control response check code in S2 is as follows: The local PLC calculates check codes for key output variables in each task cycle and sends them back to the vPLC. After receiving the vPLC, it compares the local calculation results with the check codes. If the check codes do not match, the control response is deemed abnormal. When the cumulative number of anomalies exceeds the set threshold, a status domain alarm is triggered. In the health calculation, the status domain is assigned a corresponding weight, and the ratio of the number of consistent verifications to the total number of verifications is used as the status factor.
[0008] Preferably, the calculation method for the digital twin model deviation in S2 is as follows: Compare the sensor measured values with the model predicted values. Key state variables include wind turbine speed, torque and blade pitch angle. When any state variable deviation continues to exceed the set threshold and the time is longer than the preset duration, the model domain alarm is activated; the model domain is set with corresponding weights in the health calculation, and the model deviation is normalized before participating in the health calculation.
[0009] Preferably, in S3, the predictive state alignment uses incremental synchronization frames for data synchronization. The frame format includes an absolute timestamp, key variable increments, and a check field to ensure efficient transmission and that the synchronization time error is controlled within an allowable range. After receiving a complete frame, the virtual PLC updates the mirror register at the beginning edge of the next task cycle to ensure the timeliness of data synchronization.
[0010] Preferably, the delay compensator in S5 is based on the nonlinear state-space model of the wind turbine, which includes differential equations for rotational speed, pitch angle, and torque. Rolling optimization is performed using a model predictive control algorithm. The prediction time domain and control time domain are set to the corresponding number of steps, and an appropriate weight matrix is configured to achieve effective command compensation.
[0011] Preferably, the reverse switching process in S7 includes: after the local PLC is powered on, it performs a self-test and a basic I / O test. After passing the test, it enters the shadow mode, receives the real-time image of the virtual PLC, and runs synchronously for a certain period of time, during which the state deviation is always less than the allowable value. Once the health score ScoreH is confirmed by the switchback management module to reach the switchback threshold, a switchback command is issued. The virtual PLC relinquishes output control, and the local PLC takes over within a set period.
[0012] A wind farm vPLC redundancy control intelligent fault switching system is used to implement the wind farm vPLC redundancy control intelligent fault switching method, including: The heartbeat monitoring module is used for periodic bidirectional heartbeat communication with the local PLC; The status verification module, connected to the heartbeat monitoring module, is used to perform CRC verification and differential synchronization on key control variables; The digital twin model module is connected to the heartbeat monitoring module and the status verification module respectively, and is used to mirror the fan status in real time and calculate the model deviation; The health assessment module is connected to the heartbeat monitoring module, status verification module, and digital twin model module, respectively, and is used to calculate the health score ScoreH of the local PLC by comprehensively considering the heartbeat delay, status verification results, and model deviation. The prediction alignment module, connected to the health assessment module, is used to write the latest status into the virtual PLC's mirror register through differential synchronization and hash verification when the health level is below a threshold. The switching decision module is connected to the health assessment module and is used to output a switching command when the health level is below a threshold. The delay compensation module, connected to the switching decision module, is used to compensate the control output based on the model predictive control algorithm at the moment of switching. The rollback management module is connected to the health assessment module and the virtual PLC, respectively, and is used to perform consistency verification and reverse switching after the original PLC is repaired.
[0013] Preferably, the delay compensation module is deployed in the real-time task context of the virtual PLC, runs on a dedicated CPU core, the task cycle meets the real-time requirements, and the time jitter is controlled within the allowable range. Hard real-time scheduling ensures computational determinism, the module integrates model predictive control algorithms, online rolling optimization is performed based on the wind turbine state space model, and compensation commands are output to the actuator.
[0014] Preferably, each module interacts with a lock-free circular queue via shared memory; The shared memory area stores monitoring data, health scores, and control commands, while the lock-free circular queue is used for asynchronous communication between modules.
[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: The intelligent fault switching method and system for redundancy control of wind farm vPLC proposed in this invention significantly improves the stability and reliability of wind farm control systems. By deploying virtual PLCs on a private cloud virtualization platform, a highly efficient redundancy pair is formed with the local hardware PLC, achieving rapid and smooth fault switching. Its unique heartbeat-state-model three-domain monitoring mechanism can accurately assess the health status of the local PLC, provide early warning of potential faults, and avoid unplanned downtime. When a fault occurs, the system can switch to virtual PLC control in a very short time, ensuring continuous and undisturbed wind turbine operation. The built-in delay compensator effectively suppresses command jumps during the switching process, ensuring the stability of control output and reducing hardware costs. Cloud resource pooling and sharing improve resource utilization, and predictive maintenance is achieved by combining digital twin technology, further enhancing the maintainability and economy of the system. Attached Figure Description
[0016] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a system framework diagram of the present invention. Detailed Implementation
[0017] The following description is intended to disclose the invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art.
[0018] Reference Figure 1 As the grid-connected capacity of wind power continues to increase, the control reliability of a single wind turbine directly affects grid stability and power generation revenue. Currently, most mainstream wind turbine control schemes adopt a local dual-PLC hot backup mode. However, this mode has significant limitations. On the one hand, hardware redundancy costs are high and scalability is poor, requiring two identical hardware PLCs for each wind turbine, increasing equipment procurement and maintenance costs. Furthermore, if upgrades or expansions of control functions are needed later, both hardware sets must be operated simultaneously, resulting in insufficient flexibility. On the other hand, switching times are generally between 100ms and 500ms, during which time wind turbines are prone to malfunctions. Issues such as turbine speed drops and torque surges affect power generation quality and equipment lifespan. Furthermore, the simple state synchronization methods cannot guarantee data consistency and lack predictive maintenance and digital twin support, making it difficult to detect potential faults in advance. Therefore, there is an urgent need for a new type of redundancy switching technology based on cloud-edge collaboration, which is predictive, smooth, and self-healing. The intelligent fault switching method and system for redundancy control of wind farm vPLC is proposed to solve these problems. Through virtualization technology and cloud-edge collaborative architecture, it can achieve millisecond-level, disturbance-free fault switching, effectively improve the reliability of wind turbine operation, reduce downtime, and reduce hardware costs.
[0019] In implementing the intelligent fault switching method for vPLC redundancy control in wind farms, the first step is to deploy vPLC instances corresponding to the local hardware PLC of each wind turbine on the wind farm's private cloud virtualization platform. Specifically, the wind farm's central control center will deploy three physical servers to form an OpenStack private cloud cluster, using KVM virtualization technology to create vPLC virtual machines for each wind turbine. To ensure the real-time performance of the vPLC, it will be bound to a dedicated CPU core and 2GB of HugePage memory, running an OpenPLC+RT-Xenomai real-time kernel with a task cycle set to 1ms to ensure timely processing and issuance of control commands. The local PLC is a Siemens S7-1500, communicating with the vPLC through a PRP gigabit ring network to ensure the stability and high speed of data transmission. After the vPLC and local PLC are deployed, they will continuously perform parallel monitoring and data synchronization in three domains: heartbeat, status, and model. Heartbeat monitoring is achieved by periodically sending bidirectional Ethernet ring network probe packets, with the sending period being consistent with the vPLC task cycle at 1ms. Status synchronization involves the local PLC sending back relevant data of key output variables to the vPLC in each task cycle. Model synchronization relies on the digital twin model module to mirror and update the wind turbine status data on the vPLC side in real time. Differential synchronization is used during data synchronization, transmitting only the incremental values of variables to reduce data transmission volume and improve synchronization efficiency.
[0020] The calculation of health score ScoreH is a key step in realizing intelligent fault switching. It is calculated based on three dimensions: heartbeat delay, control response check code, and digital twin model deviation. The specific formula is ScoreH=0.4·(1−RTT / 100ms)+0.3·(1−model deviation / 5%)+0.3·(CRC consistency count / total count). The heartbeat delay calculation is based on the round-trip time (RTT) of bidirectional Ethernet ring network probe packets, taking the average time difference between sending and receiving heartbeat packets within a continuous period. The reason for choosing the average value of a continuous period is to avoid the impact of a single network fluctuation on the delay judgment. The weight of the heartbeat domain in the health calculation is set to 0.4 because network latency has a significant impact on the real-time control of the wind turbine. If the network latency is too large, it will cause the transmission of control commands to lag, affecting the stability of wind turbine operation. When the RTT is greater than 80ms for three consecutive periods or the packet loss rate exceeds 2%, the heartbeat monitoring module will trigger an alarm signal. This alarm signal serves as the input factor for the heartbeat domain in the health calculation. The RTT is normalized by the ratio to 100ms. The setting of 100ms is based on the maximum tolerance value of wind turbine control for network latency. Exceeding this value will significantly affect the control effect, thereby quantifying the impact of network latency on health and timely identifying network anomalies.
[0021] The generation and verification process of the control response check code needs to be completed within each task cycle. The local PLC will perform CRC32 check code calculation on key output variables (including wind turbine speed, torque, pitch angle, and other variables that directly affect the wind turbine's operating status) and send the calculated check code back to the vPLC. After receiving the vPLC, it will perform local CRC32 calculation on the same key output variables and then compare the two check codes. If the check codes are inconsistent, the control response is determined to be abnormal. This is because inconsistent check codes mean that the control data output by the local PLC may be erroneous or that data loss or tampering has occurred during transmission, which needs to be addressed promptly. When the number of abnormal occurrences exceeds the set threshold (usually set to 3 times to avoid misjudgment triggered by a single accidental abnormality), a status domain alarm will be triggered. In the health calculation, the status domain weight is set to 0.3, and the ratio of the number of consistent CRC occurrences to the total number of occurrences is used as the status factor. This ratio directly reflects the accuracy and transmission stability of the local PLC control data. The closer the ratio is to 1, the more normal the control response is, and the greater the positive contribution to the health.
[0022] The calculation of the digital twin model deviation involves comparing the measured values of the wind turbine sensors with the predicted values of the digital twin model. Key state variables include wind turbine speed, torque, and pitch angle. These state variables directly determine the wind turbine's operating state and power generation efficiency. The sensors collect these state variable data in real time and transmit them to the digital twin model module. The digital twin model module establishes a nonlinear state-space model based on the wind turbine's physical characteristics (containing differential equations such as dω / dt=(Ta−Tg) / J, dβ / dt=uβ, dTg / dt=uT, where Ta is the aerodynamic torque, Tg is the electromagnetic torque, J is the moment of inertia, uβ is the pitch angle control variable, and uT is the torque control variable). The model is used to calculate the deviations of each key state variable. The predicted values of key state variables are used for calculation. When the deviation between the measured and predicted values of any key state variable exceeds 3% of the rated value for a sustained period of more than 200ms, the model domain alarm is activated. The 3% rated value is set based on the allowable fluctuation range of state variables during wind turbine operation. Exceeding this range indicates that the wind turbine may have abnormal operating conditions or that the model deviates too much from the actual state. The 200ms duration is set to eliminate deviations caused by instantaneous interference. In the health calculation, the model domain weight is set to 0.3. The model deviation is normalized by the ratio to 5%, which is the maximum acceptable value of the model deviation. This quantifies the impact of model deviation on health and ensures timely detection of deviations between the model and the actual wind turbine state.
[0023] When the health score ScoreH is lower than the preset threshold (usually set to 0.7, which has been verified through extensive experiments; when it is lower than this value, the probability of local PLC failure increases significantly, and predictive measures need to be activated) and lasts for 100ms (to avoid triggering erroneous operations due to a sudden drop in health score), predictive state alignment will be activated. This process uses differential synchronization and hash verification to write key control variables to the vPLC mirror register and freezes the output of the local PLC to prevent the local PLC from continuing to output erroneous control instructions when the state is abnormal. Predictive state alignment uses incremental synchronization frames for data synchronization. The format of the incremental synchronization frame includes an absolute timestamp T0, increments of key variables (Δω for speed increment, Δβ for pitch angle increment, and ΔT for torque increment), and a CRC check field. The entire frame structure is 32 bytes long. This compact frame format design reduces data transmission volume, ensures high transmission efficiency, and the transmission completion time is less than 2ms. The absolute timestamp T0 has millisecond-level precision to ensure time synchronization between the vPLC and the local PLC. The CRC check field is used to verify the integrity of the transmitted data and avoid errors during transmission. After receiving the complete incremental synchronization frame and passing the CRC check, the vPLC will immediately update the mirror register at the start edge of the next task cycle to ensure that the synchronization time error is less than 1ms, ensuring that the key control variables stored on the vPLC side are completely consistent with the state of the local PLC before the fault.
[0024] After detecting a local PLC fault (such as a health level that is consistently below the threshold and status alignment is complete), the fault detection and switching controller will issue a switching command within 50ms. The 50ms setting is based on the characteristics of fan operation. If the time exceeds this, the fan is prone to problems such as speed drop and torque surge. Switching within 50ms can make the fan unaware of the fault. The switching command is the "TAKEOVER" command. After receiving the command, the vPLC will immediately take over the fan control based on the latest key control variables stored in the mirror register. The takeover operation is executed at the beginning of the next task cycle. According to actual implementation cases, the entire switching takes about 42ms, which can meet the requirements of millisecond-level switching.
[0025] During the switching process, slight differences in control command transmission and processing between the local PLC and the vPLC may occur, leading to command jumps. In this case, the built-in delay compensator in the vPLC uses a model predictive control algorithm to perform feedforward-feedback compensation for these command jumps, ensuring the continuity of the wind turbine's speed, torque, and pitch angle. The delay compensator is based on the wind turbine's nonlinear state-space model, which includes the speed differential equation dω / dt=(Ta−Tg) / J, the pitch angle differential equation dβ / dt=uβ, and the torque differential equation dTg / dt=uT, accurately describing the wind turbine's dynamic characteristics. When using the model predictive control algorithm for rolling optimization, the prediction time domain is set to 10 steps, and the control time domain is set to 3 steps. The 10-step prediction time domain can fully predict the wind turbine's future operating state, while the 3-step control time domain ensures control effectiveness while avoiding excessive computation. The configured weight matrix Q is diag(10,1,2) and R is diag(0.5,0.1), where Q... The R matrix is used to weigh the importance of speed deviation, pitch angle deviation, and torque deviation. The speed deviation weight is set to 10 because speed stability is crucial for wind turbine operation. The R matrix is used to weigh the rate of change of control variables to avoid drastic changes in control variables from impacting the equipment. The optimal pitch angle β and torque Tg sequence are obtained through this algorithm and output as compensation commands. For example, at a certain switching instant, the wind turbine speed setpoint changes from 18 rpm to 18.1 rpm, and the pitch angle changes from 2.3° to 2.0°. After delay compensation, the speed overshoot is less than 0.5%, and the torque change rate is less than 5% / s of the rated value, achieving a disturbance-free switching and ensuring the continuous and stable operation of the wind turbine.
[0026] After the switch is completed, the vPLC enters the online control mode. At this time, the vPLC will continuously output control commands according to the preset control logic. The control commands are transmitted to the actuators of the wind turbine (such as the pitch system, converter, etc.) through the PRP gigabit ring network. The task cycle is maintained at 1ms to ensure the real-time performance and accuracy of the control. At the same time, the vPLC will continuously interact with the wind farm central control center, upload the wind turbine operating status data, and receive the scheduling commands from the central control center to ensure that the wind turbine operates normally and efficiently under the control of the vPLC.
[0027] After the local PLC is repaired, it must pass a consistency check before a seamless reverse switchback can be performed. The switchback process begins with powering on the local PLC. Upon power-up, it automatically performs self-tests and basic I / O tests. The self-test includes status checks on hardware modules (such as power supply, communication, and CPU modules), while the basic I / O test performs functional tests on the PLC's input / output interfaces to ensure each interface can receive and send signals normally. After passing the self-test and basic I / O tests, the local PLC enters "shadow mode." In this mode, the local PLC receives real-time mirror data from the vPLC (consistent with the key control variables used in online vPLC control) and runs synchronously. The synchronous running time is set to 30 seconds to ensure the local PLC can fully follow the control rhythm of the vPLC and achieve stable operation. During the synchronous running period... The system continuously monitors the state deviation between the local PLC and the vPLC, requiring the deviation to remain below 1%. This 1% deviation threshold ensures that the operating state of the local PLC is highly consistent with that of the vPLC, preventing state fluctuations during the switchback. The switchback management module monitors the health score (ScoreH) of the local PLC in real time. When the health score (ScoreH) is confirmed to be greater than 0.9 (this threshold indicates that the local PLC has fully recovered and is ready to take over control) and the state deviation remains below 1%, a "HANDBACK" switchback command will be issued. Upon receiving the switchback command, the vPLC immediately relinquishes output control, and the local PLC takes over wind turbine control within one task cycle, completing a seamless switchback. The entire switchback process is imperceptible to the wind turbine and will not affect the power generation process.
[0028] Reference Figure 2 As shown, the system used to implement the above-mentioned intelligent fault switching method for vPLC redundancy control in wind farms includes multiple functional modules. These modules work together to ensure the effective implementation of the method. The heartbeat monitoring module is a software module deployed inside the vPLC. It is used for periodic bidirectional heartbeat communication with the local PLC. The communication period is consistent with the vPLC task period of 1ms. This module periodically sends bidirectional Ethernet ring network probe packets and receives response packets returned by the local PLC. It calculates the round-trip time (RTT) and monitors packet loss. When the RTT is greater than 80ms for three consecutive periods or the packet loss rate exceeds 2%, a heartbeat domain alarm is triggered, and the alarm information and RTT data are transmitted to the health assessment module.
[0029] The status verification module, also a software module, is connected to the heartbeat monitoring module and is used to perform CRC verification and differential synchronization on key control variables. In each task cycle, this module obtains data of key output variables (speed, torque, pitch angle, etc.) from the local PLC, calculates the CRC32 check code, and compares the locally calculated check code with the check code returned by the local PLC. It counts the number of CRC matches and the total number of matches. At the same time, it uses differential synchronization to calculate the incremental value of key control variables in the current cycle and the previous cycle. The verification results (match / inconsistency), the ratio of the number of CRC matches to the total number of matches, and the incremental data of key variables are transmitted to the health assessment module and the prediction alignment module.
[0030] The digital twin model module is a software module connected to the heartbeat monitoring module and the status verification module. It is used to mirror the wind turbine status in real time and calculate the model deviation. This module obtains the network transmission time information from the heartbeat monitoring module and the measured data of key control variables from the status verification module. Based on the wind turbine's nonlinear state-space model (dω / dt=(Ta−Tg) / J, dβ / dt=uβ, dTg / dt=uT), it calculates the predicted values of each key state quantity. The measured values are compared with the predicted values to obtain the model deviation. When the deviation of any key state quantity continues to exceed 3% of the rated value for a period of more than 200ms, a model domain alarm is triggered, and the model deviation data and alarm information are transmitted to the health assessment module.
[0031] The health assessment module is a software module that connects to the heartbeat monitoring module, status verification module, and digital twin model module. It is used to calculate the health score ScoreH of the local PLC by comprehensively considering the heartbeat delay, status verification results, and model deviation. This module receives RTT data transmitted from the heartbeat monitoring module, the ratio of CRC consistency counts to total counts transmitted from the status verification module, and model deviation data transmitted from the digital twin model module. It calculates the health score ScoreH according to the formula ScoreH=0.4·(1−RTT / 100ms)+0.3·(1−model deviation / 5%)+0.3·(CRC consistency counts / total counts). The calculated health score ScoreH is then transmitted to the prediction alignment module, the switching decision module, and the back-off management module, respectively.
[0032] The prediction alignment module is a software module connected to the health assessment module. When the health level is below a threshold, it writes the latest status to the virtual PLC's mirror register through differential synchronization and hash verification. When it receives a signal from the health assessment module that the ScoreH is below 0.7 for 100ms, this module obtains the incremental data of key variables from the status verification module, generates a 32-byte incremental synchronization frame containing an absolute timestamp T0, the increment of key variables, and a CRC check field. After ensuring data integrity through hash verification, it writes the incremental synchronization frame to the vPLC's mirror register and simultaneously sends an instruction to freeze the local PLC's output.
[0033] The switching decision module is a software module connected to the health assessment module. It is used to output a switching command when the health level is lower than the threshold. When the health assessment module receives a signal that the ScoreH is continuously lower than 0.7 and the prediction alignment module has completed the state alignment, the module will generate a "TAKEOVER" switching command within 50ms and transmit it to the vPLC control module through a lockless circular queue, instructing the vPLC to take over the control of the fan.
[0034] The delay compensation module is a software module deployed in the real-time task context of the virtual PLC and connected to the switching decision module. It is used to compensate the control output based on the model predictive control algorithm at the moment of switching. This module runs on a dedicated CPU core, with a task cycle of less than or equal to 1ms and time jitter controlled within 100μs. Hard real-time scheduling ensures computational determinism and avoids computational delay from affecting the compensation effect. When it receives the switching command from the switching decision module, this module calls the nonlinear state-space model of the wind turbine, uses the model predictive control algorithm for rolling optimization, solves the optimal pitch angle β and torque Tg sequence, and outputs the compensation command to the wind turbine actuator to realize feedforward-feedback compensation for command jumps.
[0035] The switchback management module is a software module that connects to the health assessment module and the virtual PLC. It is used to perform consistency verification and reverse switching after the local PLC is repaired. This module monitors the power-on status and self-test results of the local PLC. After the local PLC enters "shadow mode", it receives real-time mirror data sent by the vPLC and transmits it to the local PLC. At the same time, it monitors the status deviation between the local PLC and the vPLC. It obtains the health score ScoreH of the local PLC from the health assessment module. When it is confirmed that the ScoreH is greater than 0.9 and the status deviation is consistently less than 1%, it generates a "HANDBACK" switchback instruction and transmits it to the vPLC and the local PLC through a lockless circular queue. The instruction instructs the vPLC to relinquish output control and the local PLC to take over control.
[0036] The modules interact with each other via shared memory and a lock-free circular queue to meet high real-time and deterministic requirements. The shared memory area is divided into multiple data blocks to store monitoring data (such as RTT data, model deviation data, and state deviation data), health scores (ScoreH), and control commands (such as "TAKEOVER" and "HANDBACK" commands). The data storage format adopts a structured data format to ensure that each module can read and write quickly. The lock-free circular queue is used for asynchronous communication between modules, such as the heartbeat monitoring module transmitting RTT data to the health assessment module and the switching decision module transmitting switching commands to the vPLC. The lock-free design avoids the waiting delays caused by traditional locking mechanisms, ensures the real-time performance of data transmission, ensures smooth and efficient data flow between modules, and supports the stable operation of the entire system.
[0037] In practical applications, this method and system have been implemented and verified in multiple wind farms. For example, after adopting the above scheme in a wind farm, the switching time of the wind farm's vPLC redundant control system stabilized at around 42ms, less than the preset time of 50ms, and the wind turbine operation was imperceptible. After delay compensation, the speed overshoot was controlled at around 0.4%, less than the target value of 0.5%, and the torque change rate was controlled at around 4.5% / s of the rated value, less than the limit of 5% / s, achieving disturbance-free output. Through differential synchronization and hash verification, the state mirroring has zero error, ensuring high data consistency. Combined with the digital twin model, it provides multiple early warnings of potential faults in the local PLC, realizing predictive maintenance. At the same time, it eliminates the procurement and maintenance costs of dual hardware PLCs, and by utilizing cloud resource pooling and sharing, it significantly reduces the control costs of the wind farm, fully demonstrating the effectiveness and practicality of this method and system, and showing good prospects for promotion.
[0038] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention. The scope of protection claimed by the appended claims and their equivalents is defined.
Claims
1. A method for intelligent fault switching in redundancy control of vPLC in wind farms, characterized in that, include: S1. Deploy vPLC instances on the wind farm's private cloud virtualization platform, each corresponding to a local hardware PLC for each wind turbine, so that the vPLC and the local PLC can continuously perform parallel monitoring and data synchronization in the three domains of heartbeat, status and model. S2. Based on heartbeat delay, control response check code, and digital twin model deviation, calculate the health score ScoreH of the local PLC in real time. S3. If the health score ScoreH is lower than the preset threshold, predictive state alignment is initiated. Key control variables are written to the vPLC's mirror register through differential synchronization and hash verification, and the output of the local PLC is frozen. S4. The fault detection and switching controller issues a switching command within a preset time, and the vPLC immediately takes over the fan control based on the latest image. S5. During the switching moment, the built-in delay compensator of the vPLC uses a model predictive control algorithm to perform feedforward-feedback compensation for command jumps, ensuring the continuity of wind turbine speed, torque and pitch angle. S6. After the switch is completed, the vPLC enters the online control mode; S7, after the original PLC is repaired and passes the consistency verification, supports seamless reverse switching.
2. The intelligent fault switching method for redundancy control of wind farm vPLC according to claim 1, characterized in that, The S2 center jump delay is calculated as follows: Based on the round-trip time (RTT) of bidirectional Ethernet ring network probe packets, the average time difference between sending and receiving heartbeat packets within a continuous period is taken. When the RTT value is greater than the preset threshold or the packet loss rate exceeds the set ratio, the heartbeat monitoring module triggers an alarm signal, which serves as the heartbeat domain input factor for the health score ScoreH calculation. The health calculation formula has a corresponding weight set for the center jump domain. After RTT is normalized, it is used to quantify the impact of network latency on health, so as to identify network anomalies and initiate predictive state alignment.
3. The intelligent fault switching method for redundancy control of wind farm vPLC according to claim 1, characterized in that, The process of generating and verifying the control response check code in S2 is as follows: The local PLC calculates check codes for key output variables in each task cycle and sends them back to the vPLC. After receiving the vPLC, it compares the local calculation results with the check codes. If the check codes do not match, the control response is deemed abnormal. When the cumulative number of anomalies exceeds the set threshold, a status domain alarm is triggered. In the health calculation, the status domain is assigned a corresponding weight, and the ratio of the number of consistent verifications to the total number of verifications is used as the status factor.
4. The intelligent fault switching method for redundancy control of wind farm vPLC according to claim 1, characterized in that, The calculation method for the digital twin model bias in S2 is as follows: Compare the sensor measured values with the model predicted values. Key state variables include wind turbine speed, torque and blade pitch angle. When any state variable deviation continues to exceed the set threshold and the time is longer than the preset duration, the model domain alarm is activated; the model domain is set with corresponding weights in the health calculation, and the model deviation is normalized before participating in the health calculation.
5. The intelligent fault switching method for redundancy control of wind farm vPLC according to claim 1, characterized in that, In S3, predictive state alignment uses incremental synchronization frames for data synchronization. The frame format includes an absolute timestamp, key variable increments, and a check field to ensure efficient transmission and keep synchronization time errors within an acceptable range. After receiving a complete frame, the virtual PLC updates the mirror register at the beginning edge of the next task cycle to ensure the timeliness of data synchronization.
6. The intelligent fault switching method for redundancy control of wind farm vPLC according to claim 1, characterized in that, The delay compensator in S5 is based on the nonlinear state-space model of the wind turbine, which includes differential equations for rotational speed, pitch angle, and torque. Rolling optimization is performed using a model predictive control algorithm. The prediction time domain and control time domain are set to the corresponding number of steps, and an appropriate weight matrix is configured to achieve effective command compensation.
7. The intelligent fault switching method for redundancy control of wind farm vPLC according to claim 1, characterized in that, The reverse switching process in S7 includes: after the local PLC is powered on, it performs self-test and basic I / O test. After passing the test, it enters shadow mode, receives the real-time image of the virtual PLC and runs synchronously for a certain period of time. During this period, the state deviation is always less than the allowable value. Once the health score ScoreH is confirmed by the switchback management module to reach the switchback threshold, a switchback command is issued. The virtual PLC relinquishes output control, and the local PLC takes over within a set period.
8. A wind farm vPLC redundant control intelligent fault switching system, characterized in that, The method for implementing the intelligent fault switching method for redundancy control of wind farm vPLC as described in any one of claims 1-7 includes: The heartbeat monitoring module is used for periodic bidirectional heartbeat communication with the local PLC; The status verification module, connected to the heartbeat monitoring module, is used to perform CRC verification and differential synchronization on key control variables; The digital twin model module is connected to the heartbeat monitoring module and the status verification module respectively, and is used to mirror the fan status in real time and calculate the model deviation; The health assessment module is connected to the heartbeat monitoring module, status verification module, and digital twin model module, respectively, and is used to calculate the health score ScoreH of the local PLC by comprehensively considering the heartbeat delay, status verification results, and model deviation. The prediction alignment module, connected to the health assessment module, is used to write the latest status into the virtual PLC's mirror register through differential synchronization and hash verification when the health level is below a threshold. The switching decision module is connected to the health assessment module and is used to output a switching command when the health level is below a threshold. The delay compensation module, connected to the switching decision module, is used to compensate the control output based on the model predictive control algorithm at the moment of switching. The rollback management module is connected to the health assessment module and the virtual PLC, respectively, and is used to perform consistency verification and reverse switching after the original PLC is repaired.
9. The wind farm vPLC redundant control intelligent fault switching system according to claim 8, characterized in that, The delay compensation module is deployed in the real-time task context of the virtual PLC, runs on a dedicated CPU core, the task cycle meets the real-time requirements, and the time jitter is controlled within the allowable range. Hard real-time scheduling ensures computational determinism, the module integrates model predictive control algorithms, online rolling optimization is performed based on the wind turbine state space model, and compensation commands are output to the actuator.
10. The wind farm vPLC redundant control intelligent fault switching system according to claim 8, characterized in that, Each module interacts with data via shared memory and a lock-free circular queue; The shared memory area stores monitoring data, health scores, and control commands, while the lock-free circular queue is used for asynchronous communication between modules.