引用本文: | 刘一民,颜云松,许高阳,等.基于UML活动图的安全稳定控制装置策略代码自动实现方法[J].电力系统保护与控制,2022,50(5):154-161.[点击复制] |
LIU Yimin,YAN Yunsong,XU Gaoyang,et al.A method of automatic realization of security and stability control strategycode based on a UML activity diagram[J].Power System Protection and Control,2022,50(5):154-161[点击复制] |
|
摘要: |
为提高和保障电网安全稳定控制系统控制策略(简称稳控策略)的实现效率和可靠性,研制了一种基于UML活动图的稳控策略的自动编程实现方法和基础平台。首先,抽象稳控策略的最小元素和动态行为元素,提出稳控策略动态行为描述方法,建立基于UML活动图的稳控策略模型和抽象语法树。然后,规范稳控策略模型的存储标准及格式,制定模型到代码的映射规则,基于抽象语法树使用深度优先搜索算法将模型自动转化为嵌入式系统可执行代码。最后,构建稳控策略模型至主体代码自动生成和辅助代码自动补全的软件技术框架并研发实现。结合4个大型稳控系统的新建和改造的编程案例及其成效,验证了所提代码自动生成方法和平台工具的可行性、高效性和可靠性。 |
关键词: 安全稳定控制 动态行为元素 稳控策略模型 抽象语法树 映射规则 代码自动生成 |
DOI:DOI: 10.19783/j.cnki.pspc.210515 |
投稿时间:2021-03-31修订日期:2021-12-07 |
基金项目:国家电网公司总部科技项目资助“策略灵活组态的安全稳定控制系统研究”(5100-202055019A-0-0-00) |
|
A method of automatic realization of security and stability control strategycode based on a UML activity diagram |
LIU Yimin,YAN Yunsong,XU Gaoyang,DONG Xijian |
(1. North China Branch of State Grid Corporation of China, Beijing 100053, China; 2. NARI Group Corporation/State
Grid Electric Power Research Institute, Nanjing 210003, China; 3. State Key Laboratory of Smart Grid
Protection and Control, Nanjing 211106, China) |
Abstract: |
To improve and ensure the efficiency and reliability of control strategy for power grid security and stability control system (SSC), an automatic programming realization method using a UML activity diagram for the SSC strategy is proposed and the corresponding basic platform is developed. First, the least dynamic behaviors elements of the SSC strategy are extracted to propose stability control strategies dynamic behavior description methods. The stability control model and an abstract syntax tree based on UML activity diagrams are thus established. After that, the storage standard and format of the SSC strategy model is regulated, the model-to-code mapping rules are formulated, and the model is automatically converted into embedded system executable code using depth first search based on the abstract syntax tree. Finally, a technical software framework which automatically generates the main body of code from the SSC strategy model and automatically completes auxiliary code is constructed, developed, and realized. The results of the programming cases for 4 large-scale power grid stability control system construction and renovation projects have proven the feasibility, efficiency and reliability of the proposed code automatic generation method and platform tools.
This work is supported by the Science and Technology Project of the Headquarters of State Grid Corporation of China (No. 5100-202055019A-0-0-00). |
Key words: security and stability control dynamic behaviors elements SSC strategy model abstract syntax tree mapping rules code automatic generation |