您好,欢迎来到中国测试科技资讯平台!

首页> 《中国测试》期刊 >本期导读>基于Matlab/RTW的控制系统一体化新型设计方法

基于Matlab/RTW的控制系统一体化新型设计方法

2296    2016-01-16

免费

全文售价

作者:李根, 唐臻宇, 耿海翔, 金佛荣

作者单位:四川大学物理科学与技术学院, 四川 成都 610064


关键词:控制系统; RTW组件; 一体化方法; 生成代码; S-函数


摘要:

针对现行的控制系统设计方法存在的开发时间长、研发费用高等问题,介绍了一种基于Matlab/RTW(实时工作间)的新型的一体化设计方法。在控制系统开发中应用Matlab强大的仿真及易修改功能将算法设计、软件设计组合在一起,并利用RTW工具自动生成控制系统主要部分的C代码,不仅大大缩短了开发周期,而且节省了研发费用。在Matlab/Simulink仿真环境下,建立了利用手柄控制步进电机运动方向及速度的模型,自动生成的C代码通过开发人员编写的硬件接口代码与研制出的硬件进行整合,经过实践检测,验证了自动生成的C代码具有很好的稳定性与执行速度。手柄控制步进电机的实例有力地证明了新型设计方法具有开发周期短、研发费用低的优点。


New integrated design method for control system base on Matlab/RTW

LI Gen, TANG Zhen-yu, GENG Hai-xiang, JIN Fo-rong

School of Physical Science and Technology, Sichuan University, Chengdu 610064, China

Abstract: 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.

Keywords: Control system; RTW; Integrated method; Generated code; S-function

2010, 36(1): 75-77,88  收稿日期: 2009-5-4;收到修改稿日期: 2009-7-26

基金项目: 

作者简介: 李根(1984-),男,安徽阜阳人,硕士研究生,专业方向为测控技术。

参考文献

[1] 曹罗生.VC ++与Matlab/Simulink混合编程的实现与研究[J].科学技术与工程,2007,7(21):5 685-5 687.
[2] 齐星刚,赵 刚.在MATLAB/Simulink平台上DSP代码的自动生成[J].中国测试技术,2005,31(1):87-88.
[3] 臧怀泉,李旺军.基于RTW的汽车ABS的软件设计与实现[J].工业控制计算机,2007,20(11):50-51.
[4] 田 伟,熊晋魁.Simulink模型的C/C++代码实现[J].应用技术,2004,31(11):16-18.
[5] 张 祥,杨志刚.Matlab/Simulink模型到C/C++代码的自动实现[J].重庆工学院学报,2006,20(11):111-123.
[6] 樊晓丹,孙应飞.一种基于RTW的实时控制系统快速开发方法[J].清华大学学报,2003,43(7):895-898.
[7] 胡广书.数字信号处理[M].北京:清华大学出版社,2003.
[8] 丁玉美,高西金.数字信号处理[M].西安:西安电子科技大学出版社,2002.
[9] 王正林.Matlab/Simulink与控制系统仿真[M].北京:电子工业出版社,2008.
[10] 张照明.应用MATLAB实现信号分析和处理[M].北京:科学出版社,2005.