为了解决传统仿真方法需要人工编写大量程序代码的问题,将基于模型的仿真技术应用到电机的测试中.以Simulink和TMS320 F28335为工具搭建了基于模型的线控转向执行电机仿真平台.该平台针对转向执行电机在Simulink环境中建立了相应的电机测试控制模型,将目标机模型执行编译指令、自动代码生成、连接并下载入目标开发板中.角度传感器的角度变化即为转向执行电机的控制信号源,通过转动角度传感器改变输出电压来对电机进行控制.目标开发板模拟量的接收范围为0~3V,设置1.5V为电机正反转基准,通过将实际的模拟量和1.5V进行比较来判断电机的转向.测试结果表明,采用基于模型的设计方法,缩短了测试及开发周期,同时验证了借助所搭建的仿真平台可以有效地对电机进行测试.
Aiming at the problem of writing a large number of codes in the traditional simulation,the model-based design was investigated.Simulink and TMS320 F28335 were used as the tool to establish the simulation platform of the executive motor.The corresponding model of the motor was built by the platform in Simulink.The target model was compiled.Then,the codes were generated automatically and downloaded to the target board.The angle change of the transducer was seen as the control source of the motor.By twirling the angular transducer,the output voltage was changed,thus the motor can be controlled.The voltage range of the target board was from zero to three.One volt and a half was set up as the reference of the motor's direction.The direction was judged by comparing the actual voltage with the reference one.The results indicate that the method of model-based design shortens the development cycle,proving that the platform can control the motor effectively.