摘要
针对现行的控制系统设计方法存在的开发时间长、研发费用高等问题,介绍了一种基于Matlab/RTW(实时工作间)的新型的一体化设计方法。在控制系统开发中应用Matlab强大的仿真及易修改功能将算法设计、软件设计组合在一起,并利用RTW工具自动生成控制系统主要部分的C代码,不仅大大缩短了开发周期,而且节省了研发费用。在Matlab/Simulink仿真环境下,建立了利用手柄控制步进电机运动方向及速度的模型,自动生成的C代码通过开发人员编写的硬件接口代码与研制出的硬件进行整合,经过实践检测,验证了自动生成的C代码具有很好的稳定性与执行速度。手柄控制步进电机的实例有力地证明了新型设计方法具有开发周期短、研发费用低的优点。
Against the existing design method for control system with long development time and high cost, this paper introduced a new design method on the basis of Matlab/RTW and its steps. The method made full use of strong simulation and easy edition of Matlab, combined the algorithm design with the software design, and automatically generated the main C code of the control system by RTW tool. It reduced the development cycle greatly and saved the development cost too. Then, in the Matlab/Simulink simulation environment, the stepper model, the handlebar controlled the way and speed of the step motor, has been established. The automatically generated C code and the interrelated hardware have been integrated by the interface code written by the developer. The experimental result proved that the code has very good stability and run speed. The example confirmed that the new method took shorter development cycle, low development cost.
出处
《中国测试》
CAS
2010年第1期75-77,88,共4页
China Measurement & Test