变频恒压供水装置目前在新型舰船上获得广泛应用,普遍采用进口PLC作为其控制器.为了研制拥有自主知识产权的嵌入式控制系统,本文提出一种基于模型设计(MBD)的变频恒压供水装置嵌入式控制系统快速开发方法.首先通过实验辨识建立与真实变频机组特性基本一致的数学模型;其次在Simulink统一仿真环境下根据模型设计开发模糊自适应PID稳压控制器和基于stateflow有限状态工况切换逻辑控制器,联合2者进行了动态控制仿真实验;最后利用embedded coder自动生成高效率嵌入式控制C代码,在uCOS-Ⅱ实时系统下进行软件多线程代码集成并部署到基于STM32自行设计开发的嵌入式控制电路板中实现嵌入式控制系统的快速开发.最终通过实际装置运行实验,验证了利用该方法进行嵌入式控制系统设计开发的有效性和便捷性.
The variable frequency constant pressure water supply device has been widely used in the new type ship. In order to develop an embedded control system with independent intellectual property rights, a rapid development method-model based design(MBD)for embedded control system of variable frequency and constant pressure water supply unit is proposed in this paper. Firstly, a mathematical model consistent with the characteristics of real frequency conversion unit is established through experimental identification. Secondly, under the unified simulation environment of Simulink, the fuzzy self-adaptive PID voltage regulator and the switching logic controller based on Stateflow finite state condition were developed according to the model design, and the dynamic control simulation experiment was carried out by combining the two. Thirdly, the embedded control C code was automatically generated using Embedded Coder,and the embedded control system was integrated and deployed into the embedded control board based on STM32 to realize the rapid development of embedded control system. Finally the effectiveness and convenience of the embedded control design and development using this method are verified through the actual device operation experiment.
[1] 侯姗. 恒压供水 PLC 控制系统设计与实现[J]. 机械工程与自动化,2017(1): 179-180. DOI:10.3969/j.issn.1672-6413.2017.01.075.
[2] 刘毅, 潘锦平. 大型船舶变频供水管网压力平衡与控制策略仿真[J]. 船海工程, 2017, 46(3): 77-83. DOI:10.3963/j.issn.1671-7953.2017.03.017.
[3] 王丽丽, 王成荣. 基于模糊自适应PID的供水电机调速系统研究[J]. 电子测量技术, 2019, 42(12): 60-65. DOI:10.19651/j.cnki.emt.1802520.
[4] 肖睿,刘源全,田敔晗,等.基于变频器内置PID模块和控制器模块的恒压供水系统设计[J].节能,2020(3):71-75.
[5] 厉翔. 基于PLC控制的智能变频恒压供水系统[J]. 自动化应用, 2019(12): 4-6. DOI:10.19769/j.zdhy.2019.12.002.
[6] NAJAFI E, ANSARI M. Model-based design approach for an industry 4.0 case study: a pick and place robot[C].2019 23rd International Conference on Mechatronics Technology(ICMT). October 23-26, 2019, Salerno, Italy. IEEE, 2019: 1-6.
[7] 刘杰. 基于模型的设计及其嵌入式实现[M]. 北京: 北京航空航天大学出版社, 2010.
[8] 刘杰, 翁公羽, 周宇博. 基于模型的设计-MCU篇[M]. 北京: 北京航空航天大学出版社, 2011.(