单片机电机测试系统的研制-上位机监控系统设计

2019-02-15 16:06

武汉工程大学毕业设计(论文)说明书

毕业设计(论文)

题 目 :单片机电机测试系统的研制-上位机监控系统设计

姓 名 学 号 :

指 导 教 师 :

年级专业班级:2008过程控制自动化 所 在 学 院 :电气信息学院

2012年 6 月 6 日

教 师 职 称 :副教授

武汉工程大学毕业设计(论文)说明书

目 录

摘要 .............................................................................................................................. 1 Abstract ................................................................................................................... 1

1绪言 ........................................................................................................................... 4 1.1课题背景 .................................................................................................................. 4 1.2课题任务需求分析 .................................................................................................. 6 1.3论文结构 .................................................................................................................. 7 2 系统方案论证 ....................................................................................................... 7 2.1基于Labview上位机调试方案 .............................................................................. 8 2.2基于VB上位机调试方案 ...................................................................................... 8 2.3基于Matlab上位机调试方案 ................................................................................ 9 2.4方案选择 .................................................................................................................. 9

3 系统设计 .............................................................................................................. 10

3.1界面设计 ................................................................................................................. 11 3.2测速程序设计 ........................................................................................................ 13 3.3电机控制程序设计 ................................................................................................ 21 3.4后台文件存取程序设计 ........................................................................................ 28 3.5底层通信程序设计 ................................................................................................ 29 3.5.1制定串行通信协议 ............................................................................................. 29 3.5.2 MATLAB实现串行通信的程序设计 ............................................................... 30 3.5.3单片机实现串行通信的程序设计 ............................................................................... 34

4 试验测试及分析 ................................................................................................ 36

4.1 测试方法 ....................................................... 36 4.1.1T法测速 ...................................................... 37 4.1.2 PI调节 ...................................................... 39 4.1.3输出转速信号转换成PWM输出 ................................... 46

武汉工程大学毕业设计(论文)说明书

4.2 开环调试 ....................................................... 41 4.2.1开环调试结果 ................................................. 41 4.3闭环调试 ....................................................... 42 4.3.1闭环PID参数整定 ............................................. 42 4.3.2闭环调试结果分析 ........................................................................................... 43

结束语........................................................................................................................45 致谢............ ................................................................................................................46 参考文献...................................................................................................................47 附录............................................................................................................................48

武汉工程大学毕业设计(论文)说明书

单片机电机测试系统的研制-上位机监控系

统设计

摘要:随着人们生活水平的不断提高,单片机控制无疑是人们追求的目标

之一,它所给人带来的方便也是不可否定的,要为现代人工作、科研、生活、提供更好的更方便的设施就需要从单片机技术入手,一切向着数字化控制,智能化控制方向发展。

然而现代化集中管理需要对现场数据进行统计、分析、制表、打印、绘图、报警等,同时,又要求对现场装置进行实时控制,完成各种规定操作,达到集中管理的目的。加之单片机的计算能力有限,难以进行复杂的数据处理。因此在功能比较复杂的控制系统中,通常以PC机为上位机,单片机为下位机,由单片机完成数据的采集及对装置的控制,而由上位机完成各种复杂的数据处理及对单片机的控制。

文章提出了一种基于MATLAB和单片机的直流电机变频调速测控系统方案,主要利用MATLAB的serial设备控制箱访问串口设备实现上位机和下位机之间的串行通信,借助MATLAB友好的图形界面和单片机可直接面向设备的特点,实现对电机转速的监测和闭环PID调节控制。用单片机对电机转速进行采样,并将转速信号上传给上位机;在上位机利用MATLAB设计图形用户界面,在界面上输入电机给定转速和PID参数;MATLAB通过串口发送数据给单片机;单片机进行PID运算后控制变频器,最终控制电机转速,实现电机转速闭环,这就是本系统的工作流程。

关键词: MATLAB用户图形界面;单片机;GUI;串行通信;数字PID调节器;PWM;闭环变频调速;

1

武汉工程大学毕业设计(论文)说明书

Single-chip testing system-motor control

software design

Abstract :with the continuous improvement of people's living standard, SCM

control is one of the goals that people pursue, it brings convenience to also cannot be negative, for modern people work, scientific research, life, provide better and more convenient facilities needs from SCM technology proceed with, all to the digital control, intelligent control direction.

Modernization of centralized management of on-site data statistics, analysis, tabulation, print, drawing, alarm, at the same time, and the requirements of field device for real-time control, complete the various provisions of the operation, to achieve the purpose of centralized management. Coupled with microcontroller with limited computational power, it is difficult to carry out complex data processing. Therefore in the function of complex control system, usually with PC as a host computer, single-chip machine, composed of a single chip microcomputer data acquisition and control of the apparatus, and the PC to complete all kinds of complex data processing and on the single chip microcomputer control.

This article proposed one kind based on the Matlab and AC motor variable frequency speed control system, the main use of Matlab serial device control box access serial port equipment to achieve the position machine and the lower position machine serial communication between Matlab, with friendly graphic interface and the chip can be directly facing the equipment characteristics, to achieve motor speed monitoring and closed loop pid control. Chip on the motor speed is sampled, and the speed signal is sent to computer; in the pc using Matlab to design a graphical user

2


单片机电机测试系统的研制-上位机监控系统设计.doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:安全检查表应用培训计划和内容 - 图文

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: