Wind turbine generator control program generation method and device based on Excel file
By using an Excel-based method to generate wind turbine control programs, the problems of missing safety protection mechanisms, high hardware adaptation costs, complex programming logic, and difficulty in portability have been solved. This method enables efficient and safe generation of control code and system portability, improving development efficiency and system flexibility.
Patent Information
- Application Number
- CN202511595125.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-03
- Publication Date
- 2026-01-30
AI Technical Summary
Existing technologies for wind turbine control program development suffer from problems such as the easy absence of safety protection mechanisms, high hardware adaptation costs, complex programming logic, and difficulty in portability. Furthermore, there is a lack of efficient and automated methods to convert Excel data into executable control code.
The method for generating wind turbine control programs based on Excel files includes Excel spreadsheet configuration, structured data generation, control program conversion rule generation, and control code generation. This ensures complete safety rule configuration, enables hardware address mapping and control device interaction, and automatically generates executable code and technical documentation.
It improved development efficiency, ensured security, reduced hardware adaptation costs, simplified programming logic, improved system portability and scalability, and achieved 100% visual control.
Smart Images

Figure CN121429554A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of wind turbine control technology, and in particular to a method and apparatus for generating wind turbine control programs based on Excel files. Background Technology
[0002] In the development of wind turbine control programs, to precisely control each component and achieve the required functions, programmers need to thoroughly understand the parameter configurations, operating principles, and hardware connections of each component, and write a large amount of code accordingly. However, this process is complex and tedious, and faces the following problems: 1) Safety protection mechanisms are easily lacking: During the programming process, some key protection logic is easily overlooked, making it difficult to guarantee the safety of wind turbine units; 2) High hardware adaptation cost: The code needs to be bound to a specific hardware address, and a lot of code needs to be modified when updating the hardware, resulting in poor adaptability; 3) The programming logic is not intuitive: the control program of wind turbine is usually complex in logic, and the code is difficult to understand and maintain; 4) Poor portability: As wind turbine models iterate, the development of new models requires rewriting a large amount of code.
[0003] Although Excel has strong advantages in data display and management, current technology has not yet provided an efficient and automated way to convert Excel data into control code that wind turbines can execute, thereby improving development efficiency and security.
[0004] Therefore, this invention proposes a method for generating wind turbine control programs based on Excel files, aiming to solve the above problems, improve development efficiency, reduce safety hazards, and enhance hardware compatibility. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of existing wind turbine control program development, such as lack of safety protection mechanisms, high hardware adaptation costs, complex programming logic, and difficulty in porting. It provides a method and apparatus for generating wind turbine control programs based on Excel files, which can greatly improve the development efficiency of wind turbine control systems, ensure the integrity of safety protection logic, and simplify the hardware adaptation and system porting process.
[0006] The technical solution of the present invention provides a method for generating wind turbine control programs based on Excel files, including: The Excel spreadsheet configuration steps involve configuring the safety rules, hardware address mapping, and control device interaction mapping of the wind turbine through an Excel spreadsheet. The safety rules include parameter and logic configuration and project configuration. The structured data generation step involves parsing the Excel spreadsheet to generate a structured data file representing the parameters of each component and the control logic of the wind turbine. The control program conversion rule generation step converts the structured data file into executable code that is called by the main control function of the wind turbine according to the preset conversion rules, including equipment parameter initialization function, control algorithm function and technical document generation rules; The control code and technical document generation steps involve generating control code that can be directly executed by the wind turbine through the conversion rules, and generating technical documents, which include a monitoring configuration software point table, a parameter initial value table, and an operation status flowchart. In one of the alternative technical solutions, the Excel spreadsheet configuration step includes: The parameter and logic configuration steps configure the static attribute parameters and dynamic behavior rules of the key components of the wind turbine. The project configuration steps include configuring basic project information, program tables, and code generation. The basic project information includes the project name, wind turbine model, and control system version information. The program tables include the worksheet name and type. The code generation includes the wind turbine control conversion rules and code generation path. The hardware address mapping step establishes the mapping relationship between hardware identifiers and physical addresses; The control device interaction mapping step configures the interaction logic between the control device and the main control program. The control device includes a human-machine interface, monitoring configuration software, and an energy management platform.
[0007] In one of the alternative technical solutions, the structured data generation step includes: The plugin parses the parameter page, derived page, and running status page in the Excel spreadsheet and stores the component parameters, control logic, and project configuration as a callable structured text data file.
[0008] In one of the alternative technical solutions, the control program conversion rule generation step includes: The equipment parameter initialization rule steps involve generating parameter initialization functions for each component based on the structured data file. The control algorithm mapping rule steps generate the executable code based on the structured data file; The document synchronization generation rule steps generate the technical document based on the identifier.
[0009] In one of the alternative technical solutions, the device parameter initialization rule step includes: Set device parameter initialization rules, and use the device parameter initialization rules to identify channel data in the structured data file whose content type is channel; Obtain the initialization values and data types of each component in the channel data, and generate the corresponding initialization functions.
[0010] In one of the alternative technical solutions, the control algorithm mapping rule step includes: The key component settings of the key components are logically mapped and transformed into the executable code.
[0011] The technical solution of the present invention also provides a wind turbine control program generation device based on an Excel file, comprising: The Excel spreadsheet configuration unit is used to configure the safety rules, hardware address mapping, and control device interaction mapping of the wind turbine through an Excel spreadsheet. The safety rules include parameter and logic configuration and project configuration. The structured data generation unit is used to parse the Excel table and generate a structured data file representing the parameters of each component and the control logic of the wind turbine. The control program conversion rule generation unit is used to convert the structured data file into executable code called by the main control function of the wind turbine according to the preset conversion rules, including equipment parameter initialization function, control algorithm function and technical document generation rules; The control code and technical document generation unit is used to generate control code that the wind turbine can directly execute through the conversion rules, and to generate technical documents, which include a monitoring configuration software point table, a parameter initial value table, and an operation status flowchart. In one of the alternative technical solutions, the Excel spreadsheet configuration unit includes: The parameter and logic configuration unit is used to configure the static attribute parameters and dynamic behavior rules of the key components of the wind turbine. The project configuration unit is used to configure basic project information, program tables, and code generation. The basic project information includes the project name, wind turbine model, and control system version information. The program tables include the worksheet name and type. The code generation includes wind turbine control conversion rules and code generation paths. The hardware address mapping unit is used to establish the mapping relationship between hardware identifiers and physical addresses; The control device interaction mapping unit is used to configure the interaction logic between the control device and the main control program. The control device includes a human-machine interface, monitoring configuration software, and an energy management platform.
[0012] In one of the alternative technical solutions, the structured data generation unit is further configured to: The plugin parses the parameter page, derived page, and running status page in the Excel spreadsheet and stores the component parameters, control logic, and project configuration as a callable structured text data file.
[0013] In one of the alternative technical solutions, the control program conversion rule generation unit includes: The equipment parameter initialization rule unit is used to generate parameter initialization functions for each component based on the structured data file; The control algorithm mapping rule unit is used to generate the executable code based on the control logic in the structured data file and the Excel spreadsheet; The file synchronization generation rule unit is used to generate the technical document based on the identifier.
[0014] In one of the alternative technical solutions, the device parameter initialization rule unit is further used for: Set device parameter initialization rules, and use the device parameter initialization rules to identify channel data in the structured data file whose content type is channel; Obtain the initialization values and data types of each component in the channel data, and generate the corresponding initialization functions.
[0015] In one of the alternative technical solutions, the control algorithm mapping rule unit is further used for: The key component settings of the key components are logically mapped and transformed into the executable code.
[0016] The above technical solution has the following beneficial effects: 1) Improve security: Configure security rules through an Excel spreadsheet to ensure that no critical protection logic is omitted in the control code.
[0017] 2) Reduce hardware adaptation costs: Through the hardware address mapping mechanism, when updating hardware, only the configuration table needs to be modified, and the underlying code is automatically generated.
[0018] 3) Simplify programming logic: Reduce errors in complex control logic through intuitive Excel configuration and achieve 100% visual control.
[0019] 4) Improve system portability and scalability: When developing new models, only the configuration table and conversion rules need to be modified, and the core code can be reused, thereby improving the system's flexibility and scalability. Attached Figure Description
[0020] The disclosure of this invention will become more readily understood by referring to the accompanying drawings. It should be understood that these drawings are for illustrative purposes only and are not intended to limit the scope of protection of this invention. In the drawings: Figure 1 This is a flowchart of a method for generating a wind turbine control program based on an Excel file, according to an embodiment of the present invention. Figure 2 This is a diagram illustrating the structured data of the project configuration content in the security rule configuration; Figure 3 This is a diagram illustrating the code generation path of the structured data for the project configuration content in the security rule configuration; Figure 4 This is a structured data diagram illustrating the parameters and logical configuration content in the safety rule configuration, using generator-related parameters as an example. Figure 5 This is a schematic diagram of the structured data of parameters and logic configuration content in the safety rule configuration, taking the logic of whether the generator cooling fan starts as an example. Figure 6 This is a flowchart illustrating the Excel spreadsheet configuration steps in an embodiment of the present invention. Figure 7 yes Figure 6 A schematic diagram of the parameters and logic configuration; Figure 8 This is a schematic diagram of the parameter page configuration using a generator as an example; Figure 9 This is a schematic diagram of a derived page configuration using a generator as an example; Figure 10 yes Figure 6 A diagram illustrating the project configuration; Figure 11 This is a schematic diagram of the main controller obtaining the logic for determining the start of the generator cooling fan in the hardware address mapping, taking the generator cooling fan start output signal as an example. Figure 12 This is a schematic diagram of the point names that actually act on the hardware in the hardware address mapping, taking the generator cooling fan start-up output signal as an example. Figure 13 This is a schematic diagram of the interaction mapping of control equipment, using active power setting as an example; Figure 14 This is a flowchart of the process for generating conversion rules in the control program in this embodiment of the invention; Figure 15 This is a diagram illustrating the parameter configurations for a generator in an Excel spreadsheet. Figure 16 yes Figure 15 A diagram illustrating the device parameter initialization rules; Figure 17 yes Figure 16 A schematic diagram generated by the initialization function; Figure 18This is a schematic diagram of the control logic using the wind turbine shaft power setting value as an example; Figure 19 yes Figure 18 A schematic diagram of the control algorithm mapping rules; Figure 20 yes Figure 18 A diagram illustrating the code file generated by the control algorithm mapping rules; Figure 21 This is a schematic diagram illustrating the configuration of the technical document regarding the control logic for whether or not to generate wind turbine shaft power setpoints; Figure 22 This is a diagram illustrating the rules for generating synchronized files; Figure 23 yes Figure 22 A diagram illustrating the document generation rules in the file synchronization generation process; Figure 24 This is a schematic diagram of a wind turbine control program generation device based on an Excel file, provided in an embodiment of the present invention. Detailed Implementation
[0021] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0022] It is readily understood that, based on the technical solution of this invention, various structural and implementation methods can be interchanged by those skilled in the art without altering the essential spirit of the invention. Therefore, the following detailed embodiments and accompanying drawings are merely illustrative examples of the technical solution of this invention and should not be considered as the entirety of the invention or as limitations or restrictions on the technical solution of the invention.
[0023] The directional terms such as up, down, left, right, front, back, front, back, top, and bottom mentioned or possibly used in this specification are defined relative to the structures shown in the accompanying drawings. They are relative concepts and may therefore vary depending on their location and usage. Therefore, these or other directional terms should not be interpreted as restrictive.
[0024] like Figure 1 As shown, an embodiment of the present invention provides a method for generating a wind turbine control program based on an Excel file, comprising: Excel spreadsheet configuration step S11: Configure the safety rules, hardware address mapping and control device interaction mapping of the wind turbine through an Excel spreadsheet. The safety rules include parameter and logic configuration and project configuration. Structured data generation step S12: Parse the Excel table to generate a structured data file representing the parameters of each component and the control logic of the wind turbine; Control program conversion rule generation step S13: According to the preset conversion rules, the structured data file is converted into executable code called by the main control function of the wind turbine, including equipment parameter initialization function, control algorithm function and technical document generation rules; Control code and technical document generation step S14: Generate control code that the wind turbine can directly execute through the conversion rules, and generate technical documents, which include a monitoring configuration software point table, a parameter initial value table, and an operation status flowchart.
[0025] Specifically, this embodiment can be controlled by a programmable logic controller (PLC).
[0026] In step S11 of the Excel spreadsheet configuration, safety rules, hardware address mapping, and control device interaction mapping are configured via an Excel spreadsheet. Safety rule configuration includes parameter and logic configuration and project configuration. Parameter and logic configuration defines the static attributes (including rated values, thresholds, etc.) and dynamic behaviors (including control algorithms, protection strategies, and operating state transitions) of key components of the wind turbine (including blades, generators, gearboxes, pitch systems, yaw systems, and converters). Project configuration includes basic project information, program table configuration, and code generation configuration. By establishing a mapping between hardware identifiers and physical addresses, it ensures that the control code can correctly connect to the specific hardware. The wind turbine's control system interacts with control devices such as the Human Machine Interface (HMI), Supervisory Control and Data Acquisition (SCADA) software, and the energy management platform. The control device interaction mapping configures the interaction logic between each device and the main control program, such as power setting and wind turbine control logic.
[0027] In the structured data generation step S12, structured text-formatted data is generated by parsing the data in the Excel spreadsheet, facilitating subsequent processing and application. This structured data includes component parameters, control logic, project configuration information, etc.
[0028] In step S13, the control program conversion rule generation includes equipment parameter initialization rules, control algorithm mapping rules, and file synchronization generation rules. The equipment parameter initialization rules generate parameter initialization functions based on structured data. The control algorithm mapping rules transform complex control logic into executable code. The file synchronization generation rules ensure that relevant technical documents, such as SCADA point tables and initial parameter values, are generated synchronously with the code.
[0029] In step S14, after processing the conversion rules, the executable control code for the wind turbine is generated, and the relevant technical documents are generated at the same time for developers and other platform personnel to use.
[0030] This embodiment of the wind turbine control program generation method based on Excel files ensures zero omissions of critical protection logic in the control code by configuring safety rules through Excel spreadsheets; it achieves automatic generation of underlying code by only modifying the configuration table when updating hardware through a hardware address mapping mechanism; it reduces errors in complex control logic through intuitive Excel configuration and achieves 100% visual control; and it allows for the reuse of core code by only modifying the configuration table and conversion rules when developing new models, thus improving the system's flexibility and scalability.
[0031] In one embodiment, the structured data generation step S12 includes: The plugin parses the parameter page, derived page, and running status page in the Excel spreadsheet and stores the component parameters, control logic, and project configuration as a callable structured text data file.
[0032] Specifically, the program table is read, and the parameter page, derived page, and running status page in the Excel spreadsheet are automatically parsed by a plugin. The parsed wind turbine control system data and logic are stored in a structured text format, such as... Figure 2 and Figure 3 As shown, Figure 2 It includes basic project information, such as project name GUP3p0, wind turbine model 819501, basic control system information (such as version number V20.12_0819501_2110250120010, IP address, etc.), as well as program table configuration, such as sheet subpage name (such as Param, etc.) and content type (Channel). Figure 3 It includes code generation configurations, such as the path to control program conversion rules (..\Infrastructure\Source\Controller\Generation\GenerateChannelsH.xslt) and the path to save deployable language code (.\Controller\Auto\ChannelDefs.h). Figure 4 and Figure 5 As shown, taking the generator parameters and generator cooling fan start-up logic as an example, the entire structured data file contains not only project configuration, but also parameter and logic configuration. Figure 4 It contains multiple parameters of the generator, and each parameter displays the parameter name, Chinese and English descriptions, data type, initial value, maximum and minimum values, and data source. Figure 5It includes the function name, Chinese and English descriptions, data type, initial value, function logic, and data source.
[0033] The plugins include, but are not limited to, one or more of the following: data import plugins, UI component library plugins, third-party platform integration plugins, AI analysis plugins, and collaboration plugins. Data import plugins are used to import structured or unstructured data from Excel, CSV, databases, or API interfaces. UI component library plugins are used to extend the controls, icons, and interface templates required for prototyping. Third-party platform integration plugins are used to interact with Figma, Axure, Sketch, or other design tools to achieve cross-platform import and export of design files. AI analysis plugins are used to perform semantic parsing, user requirement analysis, and interface layout optimization. Collaboration plugins are used to support real-time editing, commenting, and version management for multiple users.
[0034] like Figure 6 As shown, in this embodiment of the invention, the Excel spreadsheet configuration step S11 includes: Parameter and logic configuration step S111: Configure the static attribute parameters and dynamic behavior rules of the key components of the wind turbine; Project configuration step S112: Configure basic project information, program table and code generation. The basic project information includes project name, wind turbine model and control system version information. The program table includes worksheet name and type. The code generation includes wind turbine control conversion rules and code generation path. Hardware address mapping step S113: Establish the mapping relationship between hardware identifiers and physical addresses; Control device interaction mapping step S114: Configure the interaction logic between the control device and the main control program. The control device includes a human-machine interface, monitoring configuration software and energy management platform.
[0035] Specifically, Excel spreadsheet configuration step S11 includes three parts: security rule configuration, hardware address mapping, and control device interaction mapping.
[0036] Safety rule configuration includes parameter and logic configuration and project configuration. By configuring safety rules, the parameters and logic of key components can be written intuitively, thereby avoiding the damage to the wind turbine hardware caused by the omission of critical protection logic such as wind speed exceeding the limit and bearing overheating due to manual coding.
[0037] In the parameter and logic configuration step S111, the parameter and logic configuration defines the static attribute parameters and dynamic behavior rules of key components in the wind turbine, such as... Figure 7As shown, the program table sets up a parameter page, a derived page, and a running status page. The parameter page includes the parameter name, Chinese and English descriptions, data type, initial value, allowable range, and unit. The derived page contains the process variables for controlling the wind turbine and needs to include the derived variable name, Chinese and English descriptions, data type, initial value, and expression. The running status page configures the normal operating status of the wind turbine and needs to include the current status, Chinese and English descriptions, expression, and next status. Taking a generator as an example... Figure 8 and Figure 9 As shown, the parameter page configures parameters such as the generator's rated speed and rated torque. The parameter page also configures the threshold for turning on and off the generator winding temperature cooling fan; the derived page configures the logic for whether the generator cooling fan is started.
[0038] In project configuration step S112, project configuration includes basic project information, program table configuration, and code generation configuration. For example... Figure 10 As shown, the basic project information includes the project name, wind turbine model, and control system version information (such as version number, IP address, etc.); the program table configuration includes the worksheet name and type; and the code generation configuration includes the wind turbine control conversion rules and the generated code path.
[0039] In hardware address mapping step S113, hardware address mapping requires the program table to contain an interface page connecting the control program and the hardware. The interface page is divided into two parts: Part 1 is used for logical interaction between the control logic and the program table, and Part 2 is used for interaction between the program table and the hardware. Both parts specify a unified hardware identifier naming rule, such as the CI_\I prefix indicating a quantity input from the hardware to the main controller, and CO_\O indicating a quantity output from the main controller program to the hardware. Part 1 includes the hardware name, Chinese and English descriptions, data type, initial value, expression, and address; Part 2 includes the hardware name, Chinese and English descriptions, data type, initial value, and address. Figure 11 and Figure 12 As shown, taking the generator cooling fan startup as an example, this variable is a quantity output by the master controller to the hardware, so it is prefixed with CO_ and configured with an address. Correspondingly, the Auto IO page is also configured with a variable prefixed with O_ and containing an address. Figure 11 The Excel file contains the name of the output signal, its Chinese and English description, data type, initial value, logic for starting the generator cooling fan, and hardware address. Figure 12 The Excel file contains the name of the output signal, its description in Chinese and English, its data type, its initial value, and its hardware address.
[0040] In the control device interaction mapping step S114, the wind turbine control also needs to have the function of human operation of control devices such as HMI, SCADA, and energy management platform. The interaction between these devices and the wind turbine control code is also included in the program table. The State page is the program page for the interaction between the control device and the main control program, which includes parameter names, Chinese and English descriptions, data types, initial values, and HMI interaction level configuration. For example... Figure 13 As shown, taking active power setting as an example, the three platforms HMI, SCADA, and energy management correspond to different variables and can independently set the power of the wind turbine.
[0041] The Excel spreadsheet configuration steps in this embodiment ensure that no critical protection logic in the control code is omitted by configuring parameters and logic, project configuration, hardware address mapping, and control device interaction mapping respectively, thereby improving security. When updating hardware, only the configuration table needs to be modified, and the underlying code is automatically generated, reducing errors in complex control logic and achieving 100% visual control. When developing new models, only the configuration table and conversion rules need to be modified, reusing the core code and improving the system's flexibility and scalability.
[0042] like Figure 14 As shown, in this embodiment of the invention, the control program conversion rule generation step S13 includes: Equipment parameter initialization rule step S131: Generate parameter initialization functions for each component based on the structured data file; Control algorithm mapping rule step S132: Generate the executable code based on the structured data file; File synchronization generation rule step S133: Generate the technical document according to the identifier.
[0043] Specifically, the conversion rules for wind turbine control programs need to include multiple domain-specific conversion rules, including equipment parameter initialization rules, control algorithm mapping rules, and file synchronization generation rules.
[0044] In step S131 of the equipment parameter initialization rule, there are numerous parameters in the wind turbine control field, and parameter initialization must have practical significance. Therefore, the control program conversion rule must include a section on equipment parameter initialization. The equipment parameter initialization rule generates parameter initialization functions based on the generated structured data, facilitating their invocation by the language code. The equipment parameter initialization rule operates by retrieving relevant content from the structured data. Taking the logic of whether the generator cooling fan starts as an example, the initial setting value of this logic variable (D_GenCoolingFanOnRequired) must be false; otherwise, the cooling fan will start directly. Figures 15-17 As shown, the parameters are first configured with initial values in the program table, such as... Figure 15The diagram shows how to configure generator-related parameters in Excel; secondly, the structured language generated from the program table is converted using equipment parameter initialization rules to generate initialization functions that the control program can call, such as... Figure 16 The InitialiseChannels function shown in the image automatically generates its contents based on the settings configured in Excel. Figure 17 As shown.
[0045] In step S132 of the control algorithm mapping rule, the wind turbine control field contains complex control logic. Directly programming the underlying code would make it difficult to guarantee its accuracy. Therefore, a program table is used to intuitively display the logic, and then reliable target code is automatically generated through the control algorithm mapping rule. For example... Figures 18-20 As shown, taking the control logic of the wind turbine shaft power setpoint (D_SteadyStateShaftPowerSetpoint) as an example, this setpoint is set in combination with the starting power setpoint and the turbine power limit setpoint. This setpoint is not simply the minimum of the two setpoints, but rather the minimum value is followed by a power change rate limitation. The turbine power limit setpoint includes the turbine user power limit setpoint, gearbox oil temperature power limit setpoint, and headroom power limit setpoint; the turbine user power limit setpoint further includes the HMI-given active power setpoint, SCADA-given active power setpoint, energy management platform-given active power setpoint, and yaw underspeed power limit setpoint. This logic is displayed in the program table, and then the InitialiseDerivedChannels and UpdateDerivedChannels functions are generated through the control algorithm mapping rules, as shown below. Figure 19 As shown, finally, the structured data-related content is retrieved through the control algorithm mapping rules, and the above logic is generated into reliable underlying code according to the requirements of the rules for the main control program to call, such as... Figure 20 As shown.
[0046] In step S133 of the file synchronization rule generation process, the file synchronization rule generates necessary technical documents, such as SCADA point tables, initial parameter values, and flowcharts of the wind turbine's operating status, while generating the language code. Figures 21-23 As shown, taking the generation of a SCADA point table as an example, the configuration operation is performed in Excel. For example, after filling the "SCADA VariablesList" column with "I", the technical document will contain the content of the corresponding row. Then, the rules are generated synchronously through the file (such as...). Figure 22 (As shown) Retrieve identifiers and generate a point table according to the rules, such as Figure 23As shown in the figure, the content within the wireframe is point D of the "I" identifier configured in the "SCADA Variables List" column of the example. The content in the document will be automatically generated based on the content configured in Excel.
[0047] The control program conversion rules in this embodiment ensure that no critical protection logic in the control code is omitted through device parameter initialization rule steps, control algorithm mapping rule steps, and file synchronization generation rule steps, thereby improving security. When updating hardware, only the configuration table needs to be modified, and the underlying code is automatically generated, reducing errors in complex control logic and achieving 100% visual control. When developing new models, only the configuration table and conversion rules need to be modified, and the core code can be reused, improving the system's flexibility and scalability.
[0048] In one embodiment, the device parameter initialization rule step S131 includes: Set device parameter initialization rules, and use the device parameter initialization rules to identify channel data in the structured data file whose content type is channel; Obtain the initialization values and data types of each component in the channel data, and generate the corresponding initialization functions.
[0049] In one embodiment, the control algorithm mapping rule step S132 includes: The key component settings of the key components are logically mapped and transformed into the executable code.
[0050] like Figure 24 As shown, an embodiment of the present invention provides a wind turbine control program generation device based on an Excel file, comprising: Excel spreadsheet configuration unit 241 is used to configure the safety rules, hardware address mapping and control device interaction mapping of the wind turbine through an Excel spreadsheet. The safety rules include parameter and logic configuration and project configuration. The structured data generation unit 242 is used to parse the Excel table and generate a structured data file representing the parameters of each component and the control logic of the wind turbine. The control program conversion rule generation unit 243 is used to convert the structured data file into executable code called by the main control function of the wind turbine according to the preset conversion rules, including equipment parameter initialization function, control algorithm function and technical document generation rules; The control code and technical document generation unit 244 is used to generate control code that the wind turbine can directly execute through the conversion rules, and to generate technical documents, which include a monitoring configuration software point table, a parameter initial value table, and an operation status flowchart.
[0051] The wind turbine control program generation device based on Excel files in this embodiment configures safety rules through Excel spreadsheets, ensuring zero omissions of critical protection logic in the control code; through a hardware address mapping mechanism, hardware updates only require modification of the configuration table to automatically generate the underlying code; intuitive Excel configuration reduces errors in complex control logic and achieves 100% visual control; when developing new models, only the configuration table and conversion rules need to be modified, reusing the core code and improving the system's flexibility and scalability.
[0052] In one embodiment, the Excel spreadsheet configuration unit 241 includes: The parameter and logic configuration unit 2411 is used to configure the static attribute parameters and dynamic behavior rules of the key components of the wind turbine. Project configuration unit 2412 is used to configure basic project information, program table and code generation. The basic project information includes project name, wind turbine model and control system version information. The program table includes worksheet name and type. The code generation includes wind turbine control conversion rules and code generation path. Hardware address mapping unit 2413 is used to establish the mapping relationship between hardware identifiers and physical addresses; The control device interaction mapping unit 2414 is used to configure the interaction logic between the control device and the main control program. The control device includes a human-machine interface, monitoring configuration software, and an energy management platform.
[0053] The Excel spreadsheet configuration unit in this embodiment ensures zero omissions of critical protection logic in the control code by configuring parameters and logic, project configuration, hardware address mapping, and control device interaction mapping, thereby improving security. When updating hardware, only the configuration table needs to be modified, and the underlying code is automatically generated, reducing errors in complex control logic and achieving 100% visual control. When developing new models, only the configuration table and conversion rules need to be modified, reusing the core code and improving the system's flexibility and scalability.
[0054] In one embodiment, the structured data generation unit 242 is further configured to: The plugin parses the parameter page, derived page, and running status page in the Excel spreadsheet and stores the component parameters, control logic, and project configuration as a callable structured text data file.
[0055] In one embodiment, the control program conversion rule generation unit 243 is configured to: The device parameter initialization rule unit 2431 is used to generate parameter initialization functions for each component based on the structured data file; The control algorithm mapping rule unit 2432 is used to generate the executable code based on the control logic in the structured data file and the Excel spreadsheet; File synchronization generation rule unit 2433 is used to generate the technical document based on the identifier.
[0056] The control program conversion rule generation unit in this embodiment ensures zero omissions of critical protection logic in the control code by using device parameter initialization rules, control algorithm mapping rules, and file synchronization generation rules. This improves security, allows for hardware updates where only the configuration table needs to be modified, automatically generates underlying code, reduces errors in complex control logic, and achieves 100% visual control. When developing new models, only the configuration table and conversion rules need to be modified, reusing core code and improving the system's flexibility and scalability.
[0057] In one embodiment, the device parameter initialization rule unit 2431 is further configured to: Set device parameter initialization rules, and use the device parameter initialization rules to identify channel data in the structured data file whose content type is channel; Obtain the initialization values and data types of each component in the channel data, and generate the corresponding initialization functions.
[0058] In one embodiment, the control algorithm mapping rule unit 2432 is further configured to: The key component settings of the key components are logically mapped and transformed into the executable code.
[0059] The above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, and are not intended to limit them. Although the embodiments of the present invention have been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A wind turbine generator control program generation method based on an Excel file, characterized by, The method comprises the following steps: An Excel table configuration step is configured to configure the safety rules, hardware address mapping and control device interaction mapping of the wind turbine through an Excel table, wherein the safety rules comprise parameter and logic configuration and project configuration; A structured data generation step is configured to parse the Excel table and generate a structured data file for representing the component parameters and control logic of the wind turbine; A control program conversion rule generation step is configured to convert the structured data file into executable code called by a main control function of the wind turbine according to a preset conversion rule, including a device parameter initialization function, a control algorithm function and a technical document generation rule; A control code and technical document generation step is configured to generate the control code directly executable by the wind turbine and generate a technical document including a monitoring configuration software point table, a parameter initial value table and a running state flowchart through the conversion rule.
2. The Excel file-based wind turbine control program generation method of claim 1, wherein, The Excel table configuration step comprises: A parameter and logic configuration step is configured to configure the static attribute parameters and dynamic behavior rules of the key components of the wind turbine; A project configuration step is configured to configure project basic information, a program table and code generation, wherein the project basic information comprises project name, wind turbine model and control system version information, the program table comprises worksheet name and type, and the code generation comprises wind turbine control conversion rule and code generation path; A hardware address mapping step is configured to establish a mapping relationship between hardware identifiers and physical addresses; A control device interaction mapping step is configured to configure the interaction logic between control devices and the main control program, wherein the control devices comprise human-machine interface, monitoring configuration software and energy management platform.
3. The Excel file-based wind turbine control program generation method of claim 1, wherein, The structured data generation step comprises: The component parameters, control logic and project configuration are stored as callable structured text data files by parsing the parameter page, derived page and running state page in the Excel table through a plug-in.
4. The Excel file-based wind turbine control program generation method according to any one of claims 1 to 3, characterized in that, The control program conversion rule generation step comprises: A device parameter initialization rule step is configured to generate component parameter initialization functions according to the structured data file; A control algorithm mapping rule step is configured to generate the executable code according to the structured data file; A file synchronization generation rule step is configured to generate the technical document according to identifiers.
5. The Excel file-based wind turbine control program generation method of claim 4, wherein, The device parameter initialization rule step comprises: Device parameter initialization rules are set, and channel data of which the content type is a channel in the structured data file is identified by using the device parameter initialization rules; Initialization values and data types of each component in the channel data are obtained, and corresponding initialization functions are generated.
6. The Excel file based wind turbine control program generation method of claim 4, wherein, The control algorithm mapping rule step comprises: The key component set values of the key components are logically mapped and converted into the executable code.
7. A wind turbine control program generation device based on Excel files, characterized in that, The method comprises the following steps: An Excel table configuration unit is configured to configure the safety rules, hardware address mapping and control device interaction mapping of the wind turbine through an Excel table, wherein the safety rules comprise parameter and logic configuration and project configuration; A structured data generation unit is configured to parse the Excel table and generate a structured data file for representing parameters of each component of the wind turbine and control logic; A control program conversion rule generation unit is configured to convert the structured data file into executable code called by a main control function of the wind turbine according to a preset conversion rule, including a device parameter initialization function, a control algorithm function and a technical document generation rule; A control code and technical document generation unit is configured to generate control code executable by the wind turbine directly and generate a technical document including a monitoring configuration software point table, a parameter initial value table and a running state flowchart through the conversion rule.
8. The Excel file-based wind turbine control program generation apparatus of claim 7, wherein, The Excel table configuration unit includes: A parameter and logic configuration unit is configured to configure static attribute parameters and dynamic behavior rules of key components of the wind turbine; A project configuration unit is configured to configure project basic information, a program table and code generation, the project basic information including a project name, a wind turbine model and control system version information, the program table including a worksheet name and type, and the code generation including wind turbine control conversion rules and code generation paths; A hardware address mapping unit is configured to establish a mapping relationship between a hardware identifier and a physical address; A control device interaction mapping unit is configured to configure interaction logic between a control device and a main control program, the control device including a human-machine interface, a monitoring configuration software and an energy management platform.
9. The Excel file-based wind turbine control program generation apparatus of claim 7, wherein, The structured data generation unit is further configured to: Parse parameter pages, derived pages and running state pages in the Excel table through a plug-in, and store the component parameters, the control logic and project configurations as a callable structured text data file.
10. The Excel file based wind turbine control program generation apparatus according to any one of claims 7 to 9, wherein The control program conversion rule generation unit includes: A device parameter initialization rule unit is configured to generate a component parameter initialization function according to the structured data file; A control algorithm mapping rule unit is configured to generate the executable code according to the structured data file and the control logic in the Excel table; A file synchronization generation rule unit is configured to generate the technical document according to an identifier.
11. The Excel file-based wind turbine control program generation apparatus of claim 10, wherein, The device parameter initialization rule unit is further configured to: Set a device parameter initialization rule, and identify channel data of a channel type in the structured data file by using the device parameter initialization rule; Obtain initialization values and data types of each component in the channel data, and generate a corresponding initialization function.
12. The Excel file based wind turbine control program generation apparatus according to claim 10, wherein, The control algorithm mapping rule unit is further configured to: Perform logical mapping on a key component setting value of the key component, and convert the key component setting value into the executable code.
Citation Information
Patent Citations
Wind driven generator control software architecture method and device and electronic equipment
CN110457840A
Development platform architecture based on CODESYS software
CN114968196A
Method and system for generating module interface file based on excel
CN117632102A
Code generation method and device based on Excel file, electronic equipment and medium
CN119201061A
Autonomous configuration method and system for fan control
CN119554185A