Communication anomaly detection method and device for wind farm and station controller

By using the communication anomaly detection method between the station controller and multiple devices in the wind farm, the problem of substandard response time and accuracy caused by communication anomalies in new energy stations is solved, achieving fast and accurate communication anomaly troubleshooting, and simplifying Debugging process.

CN113806593BActive Publication Date: 2024-10-15BEIJING GOLDWIND SCI & CREATION WINDPOWER EQUIP CO LTD
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202010553226.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-17
Publication Date
2024-10-15
Estimated Expiration
2040-06-17

AI Technical Summary

Technical Problem

In the process of fast frequency response transformation of new energy stations, communication abnormalities lead to substandard response time and accuracy, making it difficult to accurately find the problem. The existing methods are cumbersome and inefficient.

Method used

By introducing the communication anomaly detection method between the site controller and multiple devices in the wind farm, the device to be checked is determined, its operation message is obtained, and it is written into the shared memory data structure to generate device files for processing. Abnormality troubleshooting improves the efficiency and accuracy of communication anomaly troubleshooting.

Benefits of technology

It simplifies the communication anomaly troubleshooting process, improves efficiency and accuracy, reduces debugging complexity, can effectively find equipment communication faults, and shortens the time to analyze problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113806593B_ABST
    Figure CN113806593B_ABST
Patent Text Reader

Abstract

A communication anomaly detection method, device and station controller for a wind farm are provided. The wind farm includes a station controller and multiple devices that communicate directly with the station controller. The communication anomaly detection method includes: determining at least one device to be checked from the multiple devices; obtaining an operation message of the at least one device to be checked; writing the obtained operation message of the at least one device to be checked into a data structure of a shared memory; generating a device file of the at least one device to be checked based on the operation message written in the data structure of the shared memory, so as to perform communication anomaly troubleshooting on the at least one device to be checked based on the device file. The communication anomaly detection method, device and station controller for a wind farm based on the exemplary embodiment of the present invention can effectively improve the efficiency and accuracy of communication anomaly troubleshooting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention generally relates to the field of communication processing technology, and more specifically, to a communication anomaly detection method and device for a wind farm, and a station controller. Background Art

[0002] With the increasing penetration of new energy generators, the safety and stability of wind turbines have attracted widespread attention in power grids with high penetration rates. In the actual operation of the power grid, when the power consumption does not match the power supply, it can cause a small component with a small change and a short change period in the power grid frequency. This frequency disturbance mainly relies on the steam turbine generator set's own regulation system to automatically adjust the steam turbine throttle to complete the grid load compensation and correct the fluctuation of the grid frequency. This process is the rapid frequency control of the generator set.

[0003] The power grid requires that new energy sites have fast frequency control response capabilities. After the new energy sites have completed the transformation of the fast frequency response function, they must pass on-site tests at the site connection point to verify that they have the fast frequency response function. Specifically, this includes testing the new energy site's fast frequency response lag time, response time, frequency measurement accuracy and other indicators.

[0004] The rapid frequency response transformation of new energy sites includes wind farms and photovoltaic power stations. However, after the transformation process of many new energy sites, many response times and accuracies do not meet the standards. When looking for specific problems, it was found that many of them are closely related to communications.

[0005] During the rapid frequency response transformation process, the station controller communicates with multiple devices, including a single renewable energy power generation unit, intermediate measurement and control devices, communication cabinets, data acquisition devices, frequency acquisition devices, protocol conversion devices, AGC, energy management platform, WFC, dispatch and other direct communication devices. The communication process with these devices includes single-unit testing, multiple-unit testing and testing during the actual adjustment response process. Communication problems may also occur in different links. If communication problems with non-fixed devices are encountered during the adjustment response process, the problem cannot be accurately found. At this time, it is necessary to select which device in advance and keep checking the command line message for analysis. However, the problem may not be caused by this device during the actual adjustment response process. In this case, the message of another device needs to be checked through the command line, which makes the search work cumbersome. Summary of the invention

[0006] An exemplary embodiment of the present invention aims to provide a communication anomaly detection method, device and station controller for a wind farm to overcome at least one of the above-mentioned defects.

[0007] In a general aspect, a method for detecting communication anomalies in a wind farm is provided, wherein the wind farm includes a site controller and multiple devices that communicate directly with the site controller, the method for detecting communication anomalies including: determining at least one device to be checked from the multiple devices; obtaining an operation message of the at least one device to be checked; writing the obtained operation message of the at least one device to be checked into a data structure of a shared memory; generating a device file of the at least one device to be checked based on the operation message written in the data structure of the shared memory, so as to perform communication anomaly checking on the at least one device to be checked based on the device file.

[0008] Optionally, the step of determining at least one device to be checked from the multiple devices may include one of the following steps: determining the at least one device to be checked based on a device selection instruction; identifying devices with communication abnormalities based on the communication status between the site controller and each device, and determining the at least one device to be checked from the identified devices with communication abnormalities.

[0009] Optionally, the communication anomaly detection method may also include: obtaining a control identifier for the at least one device to be checked, the control identifier indicating whether to enable file recording for the at least one device to be checked, wherein when the obtained control identifier indicates to enable file recording for the at least one device to be checked, writing the obtained operation message of the at least one device to be checked into a data structure of the shared memory; when the obtained control identifier indicates not to enable file recording for the at least one device to be checked, displaying the obtained operation message of the at least one device to be checked in the command window.

[0010] Optionally, the step of writing the obtained operation message of at least one device to be checked into a data structure of a shared memory may include: determining the device index information of each device to be checked; writing the device identifier associated with each device index information into a data structure of a shared memory, and writing the operation message of each device to be checked into a message structure corresponding to the device identifier associated with the device index information of each device to be checked in the data structure.

[0011] Optionally, the operation message of any device to be checked can be written into the message structure in the following manner: determine whether the device identifier in the data structure of the shared memory matches the predetermined device index information, and the predetermined device index information is the device index information of any device to be checked; when the device identifier matches the predetermined device index information, obtain the operation message of any device to be checked; sort the operation messages obtained each time in chronological order; write the device identifier that matches the predetermined device index information and the sorted operation message into the message structure.

[0012] Optionally, the site controller communicates with the multiple devices based on different communication protocols, wherein the step of writing the acquired operation message of at least one device to be checked into a data structure of the shared memory may include: determining the device index information of the device to be checked for performing the read / write operation, determining the communication protocol used by the corresponding device to be checked based on the determined device index information, and writing the operation message corresponding to the read / write operation into the data structure of the shared memory based on the determined communication protocol.

[0013] Optionally, the communication anomaly detection method may also include: when a run message corresponding to a read / write operation fails to be obtained, disconnecting the communication connection between the station controller and the device to be checked for which the run message acquisition failed; generating a descriptive message, wherein the descriptive message is used to describe the cause of the failure of the read / write operation; and when it is determined that there is a need to view the message, displaying the generated descriptive message in the command window.

[0014] Optionally, the step of generating the device file of at least one device to be checked based on the operation message written in the data structure of the shared memory may include: creating a thread for each device to be checked, wherein each thread is used to write the operation message of the corresponding device to be checked into the device file of the device to be checked, wherein the created threads are executed in parallel.

[0015] Optionally, any thread in each thread can generate a device file of the device to be checked corresponding to any thread in the following manner: associate the device identifier associated with the device index information of the device to be checked corresponding to any thread with the initial file created at the storage location into a message path; open the initial file indicated by the message path; obtain the running message in the message structure corresponding to the device identifier associated with the device index information; splice the device identifier and the obtained running message, and write the spliced ​​running message into the opened initial file to form a device file of the device to be checked corresponding to any thread.

[0016] In another general aspect, a communication anomaly detection device for a wind farm is provided, the wind farm comprising a site controller and a plurality of devices that communicate directly with the site controller, the communication anomaly detection device comprising: a device to be checked determining module, for determining at least one device to be checked from the plurality of devices; a message acquisition module, for acquiring an operation message of the at least one device to be checked; a data writing module, for writing the acquired operation message of the at least one device to be checked into a data structure of a shared memory; and a file generation module, for generating a device file of the at least one device to be checked based on the operation message written in the data structure of the shared memory, so as to perform communication anomaly troubleshooting on the at least one device to be checked based on the device file.

[0017] Optionally, the module for determining the device to be checked may determine the at least one device to be checked in one of the following ways: determining the at least one device to be checked based on a device selection instruction; identifying devices with communication abnormalities based on the communication status between the site controller and each device, and determining the at least one device to be checked from the identified devices with communication abnormalities.

[0018] Optionally, the data writing module may further obtain a control identifier for the at least one device to be checked, the control identifier indicating whether to enable file recording for the at least one device to be checked, wherein when the obtained control identifier indicates to enable file recording for the at least one device to be checked, the data writing module writes the obtained operation message of the at least one device to be checked into a data structure in the shared memory, and / or, the communication anomaly detection device may further include a display control module, and when the obtained control identifier indicates not to enable file recording for the at least one device to be checked, the display control module displays the obtained operation message of the at least one device to be checked in the command window.

[0019] Optionally, the data writing module may include: an index determination submodule, which determines the device index information of each device to be checked; an identifier writing submodule, which writes the device identifier associated with each device index information into a data structure in the shared memory; and a data writing submodule, which writes the operation message of each device to be checked into a message structure in the data structure corresponding to the device identifier associated with the device index information of each device to be checked.

[0020] Optionally, the data writing submodule can write the operation message of any device to be checked into the message structure in the following manner: determine whether the device identifier in the data structure of the shared memory matches the predetermined device index information, and the predetermined device index information is the device index information of any device to be checked; when the device identifier matches the predetermined device index information, obtain the operation message of any device to be checked; sort the operation messages obtained each time in chronological order; write the device identifier that matches the predetermined device index information and the sorted operation message into the message structure.

[0021] Optionally, the site controller communicates with the multiple devices based on different communication protocols, wherein the message acquisition module can obtain the operation message corresponding to the read / write operation, the data writing module determines the device index information of the device to be checked for performing the read / write operation, determines the communication protocol used by the corresponding device to be checked based on the determined device index information, and based on the determined communication protocol, writes the acquired operation message corresponding to the read / write operation into the data structure of the shared memory.

[0022] Optionally, the communication anomaly detection device may also include: an operation anomaly processing module, which, when failing to obtain the operation message corresponding to the read / write operation, disconnects the communication connection between the station controller and the device to be checked for which the operation message acquisition failed, and generates a descriptive message, wherein the descriptive message is used to describe the cause of the failure of the read / write operation; and a display control module, which, when determining that there is a need to view the message, displays the generated descriptive message in the command window.

[0023] Optionally, the file generation module may create a thread for each device to be checked, wherein each thread is used to write the operation message of the corresponding device to be checked into the device file of the device to be checked, wherein the created threads are executed in parallel.

[0024] Optionally, the file generation module may include: a path generation submodule, which associates the device identifier associated with the device index information of the device to be checked corresponding to any thread with the initial file created in the storage location into a message path; a file opening submodule, which opens the initial file indicated by the message path; a message reading submodule, which obtains the running message in the message structure corresponding to the device identifier associated with the device index information; a message writing submodule, which splices the device identifier and the obtained running message, and writes the spliced ​​running message into the opened initial file to form a device file of the device to be checked corresponding to any thread.

[0025] In another general aspect, a site controller of a wind farm is provided, in which a communication process and a communication troubleshooting process are executed, wherein the communication troubleshooting process determines at least one device to be troubleshooted from multiple devices that directly communicate with the site controller, generates a communication troubleshooting request for the at least one device to be troubleshooted and sends it to the communication process; the communication process obtains an operation message of the at least one device to be troubleshooted in response to the communication troubleshooting request, and writes the obtained operation message into a data structure of a shared memory; and the communication troubleshooting process generates a device file of the at least one device to be troubleshooted based on the operation message written in the data structure of the shared memory.

[0026] Optionally, the communication troubleshooting request carries device index information and a control identifier corresponding to each device to be troubleshooted, and the control identifier indicates whether to enable file recording for at least one device to be troubleshooted; wherein the communication process can extract the control identifier from the received communication troubleshooting request, and if the control identifier indicates to enable file recording for at least one device to be troubleshooted, the obtained operation message is written into a data structure in the shared memory.

[0027] In another general aspect, a computer-readable storage medium storing a computer program is provided, and when the computer program is executed by a processor, the above-mentioned communication anomaly detection method for a wind farm is implemented.

[0028] The communication anomaly detection method, device and station controller of a wind farm based on the exemplary embodiments of the present invention can effectively improve the efficiency and accuracy of communication anomaly troubleshooting. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The above and other objects, features and advantages of exemplary embodiments of the present invention will become more apparent from the following detailed description taken in conjunction with the accompanying drawings which exemplarily illustrate exemplary embodiments.

[0030] Figure 1 A flow chart showing a communication anomaly detection method for a wind farm according to an exemplary embodiment of the present invention;

[0031] Figure 2 A flowchart showing the steps of determining the device write state according to an exemplary embodiment of the present invention;

[0032] Figure 3 A flowchart showing the steps of device read status determination according to an exemplary embodiment of the present invention;

[0033] Figure 4 A flowchart showing the steps of writing an operation message into a data structure of a shared memory and generating a device file according to an exemplary embodiment of the present invention;

[0034] Figure 5 A flow chart showing the steps of the TCPlient main loop according to an exemplary embodiment of the present invention;

[0035] Figure 6 A schematic diagram showing a communication protocol between a station controller and a plurality of devices according to an exemplary embodiment of the present invention;

[0036] Figure 7 A flowchart showing the steps of writing a run message corresponding to a read / write operation into a data structure of a shared memory according to an exemplary embodiment of the present invention;

[0037] Figure 8 A flowchart showing the steps of writing an operation message of any device to be checked into a message structure according to an exemplary embodiment of the present invention;

[0038] Fig. 9 A flowchart showing steps of generating a device file of at least one device to be checked according to an exemplary embodiment of the present invention;

[0039] Fig.10 A block diagram showing a communication anomaly detection device for a wind farm according to an exemplary embodiment of the present invention;

[0040] Fig.11 A block diagram showing a data writing module according to an exemplary embodiment of the present invention;

[0041] Fig.12 A block diagram showing a file generation module according to an exemplary embodiment of the present invention;

[0042] Fig.13 A block diagram of a controller according to an exemplary embodiment of the present invention is shown. DETAILED DESCRIPTION

[0043] Various example embodiments will now be described more fully with reference to the accompanying drawings, in which some example embodiments are shown.

[0044] New energy stations use corresponding active power control systems to complete the droop characteristic control of the station's active power and the grid frequency at the grid connection point, enabling them to participate in rapid adjustment of the grid frequency at the grid connection point, that is, to have rapid frequency response capability.

[0045] A wind farm includes a site controller and multiple devices that communicate directly with the site controller. There are many types of equipment in a wind farm, and the communication protocol is not fixed but flexible. In particular, the photovoltaic and wind turbines in the power generation units have a large number of controlled units and are the main control objects. These control objects are controlled by a variety of control devices in actual applications. Therefore, when it is necessary to control the power generation units, they may be forwarded through some intermediate devices, such as measurement and control devices, communication cabinets, etc. Therefore, the communication status between the site controller and the measurement and control devices and communication cabinets becomes very important.

[0046] During the rapid frequency response transformation and debugging process or during the communication process between the site controller and multiple devices during the operation of the wind farm, for communication anomalies between the site controller and multiple devices, the communication anomaly detection method for a wind farm according to an exemplary embodiment of the present invention can be used to generate a corresponding device file for each device to be checked, so that communication anomalies can be subsequently checked for each device to be checked based on the device file.

[0047] Figure 1 A flow chart showing a communication abnormality detection method for a wind farm according to an exemplary embodiment of the present invention is shown.

[0048] Reference Figure 1 In step S10, at least one device to be checked is determined from multiple devices.

[0049] In one case, based on the communication status between the site controller and each device, devices with communication anomalies can be identified, and at least one device to be checked can be determined from the identified devices with communication anomalies.

[0050] For example, at least one device to be checked may be determined based on the identified devices with communication anomalies. In this case, all or part of the identified devices with communication anomalies may be automatically determined as at least one device to be checked. In addition, all or part of the identified devices with communication anomalies and at least one other device without communication anomalies may also be automatically determined as at least one device to be checked.

[0051] For example, the site controller can automatically determine the communication status between each device and the site controller based on the data sent and received by each device, so as to facilitate the use of debugging personnel and policy control.

[0052] Refer to the following Figure 2 This describes the process by which the station controller determines the communication status of writing data to each device to be checked. That is, the station controller can perform the following operations for each device to be checked: Figure 2 The data writing process shown is used to determine the device writing status of each device to be checked.

[0053] Figure 2 A flowchart showing the steps of device write status determination according to an exemplary embodiment of the present invention.

[0054] Reference Figure 2 In step S110, data is written to any one of at least one device to be checked.

[0055] In step S120, it is determined whether the data written to any device is sent successfully.

[0056] If the sending is successful, step S130 is executed: the communication flag bit of any device is set to the first identification.

[0057] As an example, the communication flag (e.g., ComStatus) is used to indicate the communication status between the device and the site controller. The first flag can be used to indicate that the communication status between the device and the site controller is that there is no communication abnormality. For example, the first flag can be set to 1.

[0058] If the transmission is not successful, step S140 is executed: the communication flag bit of any device is set to the second flag.

[0059] As an example, the second identifier may be used to indicate that the communication status between the device and the site controller is abnormal. For example, the second identifier may be set to 0.

[0060] Refer to the following Figure 3 Describes the process by which the station controller determines the communication status of reading data from each device to be checked. That is, the station controller can perform Figure 3The data reading process shown is used to determine the device reading status of each device to be checked.

[0061] Figure 3 A flow chart showing the steps of device read status determination according to an exemplary embodiment of the present invention.

[0062] Reference Figure 3 In step S101, data is read from any one of at least one device to be checked.

[0063] In step S102, it is determined whether the data read from any device is received successfully.

[0064] If the reception is not successful, step S103 is executed: the communication flag bit of any device is set to the second identification.

[0065] If the reception is successful, step S104 is executed: determining whether the communication protocol between the field controller and any device is the Modbus protocol.

[0066] If it is not the Modbus protocol, execute step S105: set the communication flag bit of any device to the first flag.

[0067] Here, since the Modbus protocol involves packet transmission and other communication protocols do not involve packet transmission, when it is determined that the communication protocol with any device does not belong to the Modbus protocol, the communication flag bit of any device can be directly determined in step S105.

[0068] If it is the Modbus protocol, step S106 is performed: a flag indicating whether the current reception is successful is set to a third flag. As an example, the third flag can be used to indicate that the current reception is successful.

[0069] In step S107, it is determined whether reception of all packets is complete.

[0070] If all packets have not been received, the process returns to step S101 to continue reading data from any device.

[0071] If all packets are received, step S108 is executed: determining the communication flag of any device.

[0072] For example, the communication flag of any device can be determined based on the flag corresponding to all packets received. In one example, the third flag can be set to 1, and if a packet is not received successfully, the flag can be set to the fourth flag (such as the fourth flag can be set to 0). In this case, the flags corresponding to all packets are ANDed, and if the result of the ANDing is 1, the communication flag of any device is set to the first flag, and if the result of the ANDing is 0, the communication flag of any device is set to the second flag.

[0073] In the communication anomaly detection method of the exemplary embodiment of the present invention, by adding the communication flag ComStatus of each device to be checked, the communication status of each device to be checked can be intuitively and quickly determined. In other words, by performing preliminary screening through the value of the communication flag ComStatus, devices with communication anomalies can be screened out.

[0074] It should be understood that the above Figure 2 and Figure 3 The method shown in which the station controller determines the write status / read status of each device is only an example, and the present invention is not limited thereto. Those skilled in the art may also determine the communication status between the station controller and each device in other ways.

[0075] In another case, at least one device to be checked may be determined based on the device selection instruction.

[0076] In this case, at least one device can be arbitrarily selected from multiple devices as the device to be checked according to the device selection instruction. At this time, the selected device can be all or part of the devices with communication anomalies determined in the above manner, or all or part of the devices without communication anomalies, or a combination of devices with and without communication anomalies.

[0077] return Figure 1 In step S20, the operation message of at least one device to be checked is obtained.

[0078] For example, the real-time parameters of each device to be checked may be obtained to form an operation message.

[0079] In step S30, the acquired operation message of at least one device to be checked is written into a data structure of the shared memory.

[0080] In step S40, a device file of at least one device to be checked is generated based on the operation message written in the data structure of the shared memory, so as to perform communication abnormality check on the at least one device to be checked based on the device file.

[0081] For the instantaneous faults of an unfixed number occurring during the response and adjustment process, or the situation that each device is tested normally individually but communication abnormalities occur during the response and adjustment process or during the operation of the wind farm, a communication abnormality detection method based on an exemplary embodiment of the present invention can generate a corresponding device file for each device to be checked for analysis and troubleshooting of communication abnormality problems.

[0082] Figure 4 A flow chart showing the steps of writing an operation message into a data structure of a shared memory and generating a device file according to an exemplary embodiment of the present invention.

[0083] Reference Figure 4 In step S301, it is determined whether to write a file. That is, a control identifier for at least one device to be checked is obtained, and based on the obtained control identifier, it is determined whether to enable file recording. Here, the control identifier indicates whether to enable file recording for at least one device to be checked (that is, whether to generate a device file).

[0084] In one example, before step S301, the shared memory may be acquired and mapped to acquire the data structure DeviceInfo in the shared memory. The present invention is not limited thereto, and other areas in the shared memory may also be acquired to write the running message.

[0085] If it is determined to write a file, that is, the acquired control identifier indicates to start file recording for at least one device to be checked, step S302 is executed: determining device index information of each device to be checked.

[0086] As an example, the serial number of the device to be checked may be used as the device index information.

[0087] In step S303, the device identification associated with each device index information is written into the data structure of the shared memory, and the operation message of each device to be checked is written into the message structure corresponding to the device identification associated with the device index information of each device to be checked in the data structure.

[0088] As an example, the device identification may include but is not limited to the device name. That is, the data structure (such as PrintDebugInfos) in the shared memory includes the device identification of each device to be checked and the message structure corresponding to the device identification.

[0089] Optionally, for the case where at least one device to be checked is determined based on a device selection instruction, the device selection instruction may be generated based on a user selection. In this case, the communication anomaly detection method according to an exemplary embodiment of the present invention may further include: verifying whether the user input is correct.

[0090] For example, the verification process may be: determining whether the device identification and the device index information can correspond to each other, if so, executing step S303, and if not, giving an error prompt.

[0091] In step S304, a thread is created for each device to be checked.

[0092] Here, each thread is used to write the operation message of the corresponding device to be checked into the device file of the device to be checked. Preferably, the created threads are executed in parallel.

[0093] For example, corresponding threads may be created one by one for each device to be checked. If thread creation fails, an error message is displayed.

[0094] In one example, the device file can be stored in the hard disk, and when writing the operation message, it can be determined whether the device file exists in the hard disk, and if not, the device file is created to write the operation message into the created device file. If it exists, the device file in the hard disk is updated.

[0095] If it is determined not to write the file, that is, the acquired control identifier indicates that the file record is not enabled for at least one device to be checked, step S305 is executed: determining the number of devices to be checked.

[0096] In step S306, the acquired operation message of at least one device to be checked is displayed in a command window.

[0097] In this case, the operation message is only displayed in the command window, and the operation message is not stored. Preferably, in the communication troubleshooting process, the operation message of a single device to be checked is analyzed and checked through the command window, but the present invention is not limited thereto, and the operation messages of multiple devices to be checked may also be displayed in the command window.

[0098] In one example, when it is determined not to write a file, the operation message of the device to be checked is also written into the message structure through the above steps S302 and S303. At this time, a predetermined number of operation messages of the device to be checked corresponding to the device index information can be obtained from the message structure of the shared memory, the obtained operation messages are sorted, the device identifier corresponding to the device index information and the obtained operation message are spliced, and the spliced ​​operation message is displayed in the command window.

[0099] Figure 5 A flow chart showing the steps of a TCPlient main loop according to an exemplary embodiment of the present invention.

[0100] Reference Figure 5 In step S310, initialize and obtain the shared memory mapping.

[0101] In step S320, a read / write operation is performed.

[0102] For example, if the communication connection between the device to be checked and the site controller is disconnected, it can be reconnected to perform read / write operations.

[0103] In step S330, the readable set and the writable set are determined.

[0104] For example, determine that at least one device that can perform a read operation among the devices to be checked is placed in a readable set, and place a device that can perform a write operation in a writable set.

[0105] In step S340, a command is obtained, and a data structure and a command queue are cleared. Here, the obtained command may include a command for performing a read / write operation on the device to be checked.

[0106] In step S350, when the device channel is writable, a write data operation is performed.

[0107] In step S360, after the write data operation is successful, a read data operation is performed on the device to be checked based on the modbus protocol.

[0108] This is because only the modbus protocol with the device status of WaitingForRead can be read. If it is other communication protocols, it will not be affected. That is, other communication protocols can also perform the read data operation first and then the write data operation.

[0109] It should be understood that the above Figure 5 The TCPClient peer process is taken as an example for introduction, but the present invention is not limited to this, and other processes with the same functions as the TCPClient peer process may also be used, for example, OPCUAClient, SVGControl, PLCSend, etc.

[0110] Figure 6 A schematic diagram showing a communication protocol between a station controller and a plurality of devices according to an exemplary embodiment of the present invention is shown. Figure 6 As shown, the station controller communicates with multiple devices based on different communication protocols.

[0111] Figure 7 A flow chart showing steps of writing a run message corresponding to a read / write operation into a data structure of a shared memory according to an exemplary embodiment of the present invention.

[0112] Reference Figure 7 In step S31, the device index information of the device to be checked for performing the read / write operation is determined.

[0113] For the data message reading operation, you can first determine whether it is readable and then read the message.

[0114] For the operation of writing data packets, it can be determined whether it can be written first. At this time, it can be determined whether there is a control command. If there is a control command, the control command is written first. If there is no control command, a summon command is sent. That is, it is ensured that the control command is executed first.

[0115] In step S32, the communication protocol used by the corresponding device to be checked is determined based on the determined device index information.

[0116] In step S33, based on the determined communication protocol, the operation message corresponding to the read / write operation is written into the data structure of the shared memory.

[0117] In one example, a communication anomaly detection method for a wind farm according to an exemplary embodiment of the present invention may further include: if the acquisition of an operation message corresponding to a read / write operation fails, disconnecting the communication connection between the station controller and the device to be checked for which the acquisition of the operation message fails; generating a description message, where the description message is used to describe the cause of the failure of the read / write operation; and if it is determined that there is a need to view the message, displaying the generated description message in the command window.

[0118] For example, a requirement flag (e.g., DebugNumber) for indicating a message viewing requirement may be obtained. If the requirement flag indicates that there is a message viewing requirement (e.g., DebugNumber is not 0), the generated description message is printed to the command window. If the requirement flag indicates that there is no message viewing requirement (e.g., DebugNumber is 0), the description message is not processed.

[0119] Figure 8 A flowchart showing the steps of writing the operation message of any device to be checked in each device to be checked into the message structure according to an exemplary embodiment of the present invention.

[0120] Reference Figure 8 In step S601, it is determined whether the device identification in the data structure of the shared memory matches the predetermined device index information. Here, the predetermined device index information is the device index information of any device to be checked.

[0121] Optionally, before step S601, the system time may be obtained, and the seconds may be converted into the local time, with the milliseconds reserved.

[0122] If the device identification does not match the predetermined device index information, the process returns to continue searching for a device identification that matches the predetermined device index information.

[0123] If the device identification matches the predetermined device index information, step S602 is executed: obtaining the operation message of any device to be checked. For example, the operation message of any device to be checked can be obtained continuously and in real time.

[0124] In step S603, the operation messages obtained each time are sorted in chronological order.

[0125] For example, a sequence number (Number) may be defined for the running message, and the running messages may be sorted and increased so that the running messages are increased one by one in chronological order, that is, the value of Number may be changed to ensure that the order is from old to new.

[0126] In step S604, the device identification matching the predetermined device index information and the sorted operation message are written into the message structure.

[0127] For example, the local time, milliseconds, filtered device identifiers, and messages can be put into the shared memory.

[0128] Refer to the following Fig. 9 The following describes a process in which any thread in each thread generates a device file for a device to be checked corresponding to the thread.

[0129] Fig. 9 A flow chart showing steps of generating a device file for any device to be checked in each device to be checked according to an exemplary embodiment of the present invention.

[0130] Reference Fig. 9 In step S401, the device identification associated with the device index information of the device to be checked corresponding to any thread is associated with the initial file created in the storage location to form a message path.

[0131] In step S402, the initial file indicated by the message path is opened.

[0132] In step S403, the operation message in the message structure corresponding to the device identification associated with the device index information is obtained.

[0133] In step S404, the device identification and the acquired operation message are concatenated.

[0134] In step S405, the spliced ​​running message is written into the opened initial file to form a device file of the device to be checked corresponding to any thread.

[0135] As an example, the spliced ​​running message can be put into the Message in the PrintDebugInfos data structure, and then the Message message is written into the initial file to form a device file.

[0136] The long-term storage message analysis function can be turned on and off at any time, and the analysis duration can be determined by the user. By analyzing communication problems in the above way, you can obtain running messages stably for a long time. This message is a simplified user data message and does not contain other content such as Ethernet header, TCP header, IP header, Ethernet tail, etc. In addition, the message analysis records the formats of disconnection, command and read data, which are distinguished for easy analysis.

[0137] Fig.10 A block diagram of a communication anomaly detection device for a wind farm according to an exemplary embodiment of the present invention is shown. The wind farm includes a site controller and a plurality of devices that communicate directly with the site controller.

[0138] like Fig.10 As shown, a communication anomaly detection device 100 for a wind farm according to an exemplary embodiment of the present invention includes: a to-be-checked equipment determination module 101 , a message acquisition module 102 , a data writing module 103 and a file generation module 104 .

[0139] Specifically, the to-be-checked device determining module 101 determines at least one to-be-checked device from the multiple devices.

[0140] In one case, the module for determining the device to be checked 101 may identify the device with communication abnormalities based on the communication status between the site controller and each device, and determine at least one device to be checked based on the identified device with communication abnormalities.

[0141] In another case, the to-be-checked device determining module 101 may determine at least one to-be-checked device based on the device selection instruction.

[0142] The message acquisition module 102 acquires the operation message of at least one device to be checked.

[0143] The data writing module 103 writes the acquired operation message of at least one device to be checked into a data structure of the shared memory.

[0144] In one example, the data writing module 103 may further obtain a control identifier for at least one device to be checked. Here, the control identifier indicates whether to enable file recording for at least one device to be checked.

[0145] If the acquired control identifier indicates that the file record is enabled for at least one device to be checked, the data writing module 103 writes the acquired operation message of the at least one device to be checked into the data structure of the shared memory.

[0146] Optionally, the communication anomaly detection device 100 for a wind farm according to the exemplary embodiment of the present invention may further include a display control module (not shown in the figure).

[0147] If the acquired control identifier indicates that the file record is not enabled for the at least one device to be checked, the display control module displays the acquired operation message of the at least one device to be checked in the command window.

[0148] The station controller communicates with multiple devices based on different communication protocols, and the message acquisition module 102 can acquire the operation message corresponding to the read / write operation.

[0149] In this case, the data writing module 103 determines the device index information of the device to be checked that is used to perform the read / write operation, determines the communication protocol used by the corresponding device to be checked based on the determined device index information, and writes the obtained operation message corresponding to the read / write operation into the data structure of the shared memory based on the determined communication protocol.

[0150] The communication anomaly detection device 100 for a wind farm according to an exemplary embodiment of the present invention may further include: an operation anomaly processing module (not shown in the figure), which disconnects the communication connection between the station controller and the device to be checked for which the operation message acquisition fails, and generates a description message if the acquisition of the operation message corresponding to the read / write operation fails. Here, the description message is used to describe the failure reason of the read / write operation.

[0151] At this time, if it is determined that there is a need to view the message, the display control module displays the generated description message in the command window.

[0152] Fig.11 A block diagram illustrating a data writing module according to an exemplary embodiment of the present invention.

[0153] like Fig.11 As shown, the data writing module 103 according to the exemplary embodiment of the present invention may include: an index determination submodule 31 , an identification writing submodule 32 , and a data writing submodule 33 .

[0154] Specifically, the index determination submodule 31 determines the device index information of each device to be checked.

[0155] The identification writing submodule 32 writes the device identification associated with each device index information into the data structure of the shared memory.

[0156] The data writing submodule 33 writes the operation message of each device to be checked into the message structure corresponding to the device identification associated with the device index information of each device to be checked in the data structure.

[0157] In one example, the data writing submodule 33 can write the operation message of any device to be checked into the message structure in the following manner: determine whether the device identifier in the data structure of the shared memory matches the predetermined device index information, where the predetermined device index information is the device index information of any device to be checked; if they match, obtain the operation message of any device to be checked, sort the operation messages obtained each time in chronological order, and write the device identifier that matches the predetermined device index information and the sorted operation message into the message structure.

[0158] return Fig.10 The file generation module 104 generates a device file of the at least one device to be checked based on the operation message written in the data structure of the shared memory, so as to perform communication abnormality troubleshooting on the at least one device to be checked based on the device file.

[0159] For example, the file generation module 104 may create a thread for each device to be checked. Here, each thread is used to write the operation message of the corresponding device to be checked into the device file of the device to be checked. Preferably, the created threads are executed in parallel.

[0160] Fig.12 A block diagram illustrating a file generation module according to an exemplary embodiment of the present invention.

[0161] like Fig.12 As shown, the file generation module 104 according to an exemplary embodiment of the present invention may include: a path generation submodule 41 , a file opening submodule 42 , a message reading submodule 43 and a message writing submodule 44 .

[0162] Specifically, the path generation submodule 41 associates the device identification associated with the device index information of the to-be-checked device corresponding to any thread with the initial file created at the storage location into a message path.

[0163] The file opening submodule 42 opens the initial file indicated by the message path.

[0164] The message reading submodule 43 obtains the running message in the message structure corresponding to the device identification associated with the device index information.

[0165] The message writing submodule 44 splices the device identification and the acquired operation message, and writes the spliced ​​operation message into the opened initial file to form a device file of the device to be checked corresponding to any thread.

[0166] According to an exemplary embodiment of the present invention, a site controller of a wind farm is further provided, in which a communication process and a communication troubleshooting process are executed.

[0167] The communication troubleshooting process can provide users with command line input troubleshooting device numbers, command line view and analysis message methods, and an entry for long-term monitoring and analysis of messages for multiple devices. The communication process can process the device message corresponding to the device number input by the user in the communication troubleshooting process, and put it into the shared memory for use by the communication troubleshooting process.

[0168] Specifically, the communication troubleshooting process determines at least one device to be troubleshooted from multiple devices that directly communicate with the site controller, generates a communication troubleshooting request for the at least one device to be troubleshooted and sends it to the communication process; the communication process responds to the communication troubleshooting request, obtains the operation message of the at least one device to be troubleshooted, and writes the obtained operation message into a data structure of the shared memory; the communication troubleshooting process generates a device file for the at least one device to be troubleshooted based on the operation message written in the data structure of the shared memory.

[0169] The communication troubleshooting request carries device index information and a control identifier corresponding to each device to be checked. Here, the control identifier indicates whether to enable file recording for the at least one device to be checked.

[0170] In this case, the communication process extracts a control identifier from the received communication troubleshooting request, and if the control identifier indicates to enable file recording for at least one device to be checked, the acquired operation message is written into a data structure of the shared memory.

[0171] If the control identifier indicates that file recording is not enabled for at least one device to be checked, the communication troubleshooting process displays the operation message of at least one device to be checked through the command window.

[0172] Each communication process, such as TCPClient, OPCUAClient, SVGControl, PLCSend, etc., runs for a long time and requires response time guarantee. In addition, each communication process has a large number of communication devices. Printing and analyzing messages in these processes affects the main communication response time, and the messages are mixed together and are not easy to analyze.

[0173] In an exemplary embodiment of the present invention, the communication troubleshooting process runs independently, does not affect the response time of the main communication process, and can use a slow long-term recording of communication message analysis files of multiple devices to facilitate detailed analysis of the cause of the fault without affecting the main communication process. In other words, the problem can be checked by printing messages in the command line in the communication troubleshooting process instead of the communication process.

[0174] Fig.13 A block diagram of a controller according to an exemplary embodiment of the present invention is shown.

[0175] like Fig.13As shown, the controller 200 according to the exemplary embodiment of the present invention includes: a processor 201 and a memory 202 .

[0176] Specifically, the memory 202 is used to store a computer program, and when the computer program is executed by the processor 201 , the computer program implements the above-mentioned communication anomaly detection method for a wind farm.

[0177] here, Figure 1 The wind speed estimation method for wind turbines shown in Fig.13 The processor 201 is shown. That is, Figures 10 to 12 Each module shown can be implemented by a general hardware processor such as a digital signal processor, a field programmable gate array, etc., can also be implemented by a dedicated hardware processor such as a dedicated chip, or can be completely implemented in software through a computer program. For example, it can be implemented as Fig.13 The various modules in the processor 201 shown in FIG.

[0178] According to an exemplary embodiment of the present invention, there is also provided a computer-readable storage medium storing a computer program. The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to execute the above-mentioned communication anomaly detection method for a wind farm. The computer-readable recording medium is any data storage device that can store data read out by a computer system. Examples of computer-readable recording media include: read-only memory, random access memory, read-only optical disk, magnetic tape, floppy disk, optical data storage device, and carrier wave (such as data transmission through the Internet via a wired or wireless transmission path).

[0179] The communication anomaly detection method, device and station controller of a wind farm according to the exemplary embodiment of the present invention can effectively find equipment communication faults, gradually narrow the scope of investigation, and simplify the complexity of debugging.

[0180] In addition, according to the communication anomaly detection method, device and station controller of the wind farm according to the exemplary embodiment of the present invention, through long-term communication analysis message records of multiple devices, it is convenient to troubleshoot communication problems that cannot be discovered during single-device testing, and save message analysis device files to facilitate communication with cooperating manufacturers to confirm fault problems, thereby shortening the debugging cycle and the division of responsibilities.

[0181] In addition, the long-term communication messages of multiple devices are simpler than those obtained by packet capture tools, and data analysis is convenient, which shortens the time and complexity of problem analysis and reduces the time invested by R&D personnel in troubleshooting.

[0182] While the invention has been particularly shown and described with reference to exemplary embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the claims.

Claims

1. A method for detecting communication anomalies in a wind farm, wherein the wind farm comprises a station controller and a plurality of devices that communicate directly with the station controller, characterized in that: The communication anomaly detection method comprises: Determining at least one device to be checked from the multiple devices; Obtaining the operation message of the at least one device to be checked; Writing the acquired operation message of the at least one device to be checked into a data structure of the shared memory; Generate a device file of the at least one device to be checked based on the operation message written in the data structure of the shared memory, so as to check the communication abnormality of the at least one device to be checked based on the device file, The step of writing the acquired operation message of the at least one device to be checked into a data structure of the shared memory includes: Determine the device index information of each device to be checked; The device identification associated with each device index information is written into the data structure of the shared memory, and the operation message of each device to be checked is written into the message structure corresponding to the device identification associated with the device index information of each device to be checked in the data structure.

2. The communication anomaly detection method according to claim 1, characterized in that: The step of determining at least one device to be checked from the multiple devices comprises one of the following steps: Determine the at least one device to be checked based on the device selection instruction; Based on the communication status between the site controller and each device, the device with communication abnormality is identified, and the at least one device to be checked is determined from the identified devices with communication abnormality.

3. The communication anomaly detection method according to claim 1, characterized in that: The communication anomaly detection method further includes: Obtaining a control identifier for the at least one device to be checked, the control identifier indicating whether to enable file recording for the at least one device to be checked, When the acquired control identifier indicates that file recording is enabled for the at least one device to be checked, the acquired operation message of the at least one device to be checked is written into a data structure of the shared memory. When the acquired control identifier indicates that file recording is not enabled for the at least one device to be checked, the acquired operation message of the at least one device to be checked is displayed in the command window.

4. The communication anomaly detection method according to claim 1, characterized in that: Write the running message of any device to be checked into the message structure in the following way: Determine whether the device identification in the data structure of the shared memory matches the predetermined device index information, where the predetermined device index information is the device index information of any device to be checked; When the device identification matches the predetermined device index information, obtaining the operation message of any device to be checked; Sort the running messages obtained each time in chronological order; The device identification matching the predetermined device index information and the sorted operation message are written into the message structure.

5. The communication anomaly detection method according to claim 1, characterized in that: The station controller communicates with the multiple devices based on different communication protocols. The step of writing the acquired operation message of the at least one device to be checked into a data structure of the shared memory includes: Determine the device index information of the device to be checked for performing read / write operations. Determine the communication protocol used by the corresponding device to be checked based on the determined device index information, Based on the determined communication protocol, the operation message corresponding to the read / write operation is written into the data structure of the shared memory.

6. The communication anomaly detection method according to claim 5, characterized in that: The communication anomaly detection method further includes: When the acquisition of the operation message corresponding to the read / write operation fails, the communication connection between the station controller and the device to be checked for which the acquisition of the operation message fails is disconnected; Generate a description message, wherein the description message is used to describe the failure reason of the read / write operation; When it is determined that there is a need to view the message, the generated description message is displayed in the command window.

7. The communication anomaly detection method according to claim 1, characterized in that: The step of generating the device file of the at least one device to be checked based on the operation message written in the data structure of the shared memory includes: A thread is created for each device to be checked, wherein each thread is used to write the operation message of the corresponding device to be checked into the device file of the device to be checked. The created threads are executed in parallel.

8. The communication anomaly detection method according to claim 7, characterized in that: Any thread in each thread generates the device file of the device to be checked corresponding to any thread in the following way: Associating a device identifier associated with device index information of a device to be checked corresponding to any thread with an initial file created at a storage location into a message path; Open the initial file indicated by the message path; Obtain the running message in the message structure corresponding to the device identification associated with the device index information; The device identification and the acquired operation message are spliced, and the spliced ​​operation message is written into the opened initial file to form a device file of the device to be checked corresponding to any thread.

9. A communication anomaly detection device for a wind farm, the wind farm comprising a station controller and a plurality of devices that communicate directly with the station controller, characterized in that: The communication anomaly detection device comprises: A device to be checked determining module, which determines at least one device to be checked from the multiple devices; A message acquisition module, which acquires the operation message of the at least one device to be checked; A data writing module writes the acquired operation message of the at least one device to be checked into a data structure of the shared memory; A file generation module generates a device file of the at least one device to be checked based on the operation message written in the data structure of the shared memory, so as to check the communication anomaly of the at least one device to be checked based on the device file. Wherein, the data writing module is also used for: Determine the device index information of each device to be checked; The device identification associated with each device index information is written into the data structure of the shared memory, and the operation message of each device to be checked is written into the message structure corresponding to the device identification associated with the device index information of each device to be checked in the data structure.

10. The communication anomaly detection device according to claim 9, characterized in that: The station controller communicates with the multiple devices based on different communication protocols. The message acquisition module acquires the running message corresponding to the read / write operation. The data writing module determines the device index information of the device to be checked for performing the read / write operation, determines the communication protocol used by the corresponding device to be checked based on the determined device index information, and writes the obtained operation message corresponding to the read / write operation into the data structure of the shared memory based on the determined communication protocol.

11. The communication anomaly detection device according to claim 10, characterized in that: The communication anomaly detection device also includes: The operation exception processing module disconnects the communication connection between the station controller and the device to be checked for which the operation message acquisition fails, and generates a description message if the operation message corresponding to the read / write operation fails to be acquired, wherein the description message is used to describe the failure reason of the read / write operation; The display control module displays the generated description message in the command window if it is determined that there is a message viewing requirement.

12. The communication anomaly detection device according to claim 11, characterized in that: The file generation module creates a thread for each device to be checked, wherein each thread is used to write the operation message of the corresponding device to be checked into the device file of the device to be checked. The created threads are executed in parallel.

13. A station controller for a wind farm, characterized in that: Executing a communication process and a communication troubleshooting process in the station controller, The communication troubleshooting process determines at least one device to be checked from multiple devices that directly communicate with the station controller, generates a communication troubleshooting request for the at least one device to be checked, and sends it to the communication process; The communication process obtains the operation message of the at least one device to be checked in response to the communication troubleshooting request, and writes the obtained operation message into a data structure of the shared memory; The communication troubleshooting process generates a device file of the at least one device to be checked based on the operation message written in the data structure of the shared memory, The step of obtaining the operation message of the at least one device to be checked and writing the obtained operation message into the data structure of the shared memory includes: Determine the device index information of each device to be checked; The device identification associated with each device index information is written into the data structure of the shared memory, and the operation message of each device to be checked is written into the message structure corresponding to the device identification associated with the device index information of each device to be checked in the data structure.

14. The station controller according to claim 13, characterized in that: The communication troubleshooting request carries device index information and a control identifier corresponding to each device to be checked, wherein the control identifier indicates whether to enable file recording for the at least one device to be checked; The communication process extracts a control identifier from the received communication troubleshooting request, and if the control identifier indicates to enable file recording for the at least one device to be checked, writes the acquired operation message into a data structure of the shared memory.

15. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the communication anomaly detection method for a wind farm as claimed in any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Mechanical characteristic condition monitoring device for circuit breaker based on IEC61850

    CN102710014A

  • Shared memory-based information inquiring equipment and method

    CN103870511A

  • Data file processing method and system

    CN106708825A

  • Vehicle diagnosis method and device

    CN107332711A

  • A method and device for detecting the number of process instances based on a memory mapping file

    CN109324952A