单片机控制的双电机二维定位系统研究
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
在生活中经常可见这种场景,一个目标物体在不断的移动,而在它周围的某个地方,有个摄像头正对准着它,目标物体动,则摄像头也动,目标物体停,则摄像头也停。这就是二维跟踪,在本文里就是所谓的二维定位了。
     本文中所谓的二维定位系统,是这样的一个系统,分别在水平和竖直两个方向上个设置一个电机,电机运转带动执行器件动作,执行器件又带动摄像头动作,也就是说摄像头的移动完全依靠电机的运转来完成的。这样通过控制两台电机的正确运转,就可使摄像头改变位置,达到跟踪定位的目的。
     设计中选用直流永磁电机作为执行器件,电机X控制了摄像头的水平方位,电机Y控制摄像头的垂直方位,以此组成二维定位系统。整个系统分为给定、控制、执行三个环节。给定环节是由图像处理得到的目标位置的数据。控制环节是以AVR单片机ATmega8为主控核心器件,配以外围辅助电路、电机驱动主电路、位置检测反馈电路组成的控制系统,同时辅以软件程序的配合控制,达到最优控制。执行环节是由电机带动执行器件,以此带动摄像头动作来完成的。由图像处理来数据送给控制环节的单片机,单片机接收此数据,并转化成相应的控制信号,然后送到由开关管组成的主电路,由主电路去控制是哪台电机动作以及是正转还是反转,从而控制了执行环节。当电机转动起来以后,为了达到准确定位,设计了由自制的光电码盘和整形电路组成的反馈环节,反馈环节将电机的实际转过的位移也就是摄像头移动的距离,实时的反馈给单片机,单片机通过比较反馈值与给定值,决定输出控制信号的停止时刻。这样电机带动摄像头在给定的目标位置停下来,达到了准确定位。其间,需要单片机处理的数据都是通过软件编成实现的,这就是软硬件结合控制的思想。
In our daily life we often see the following scene: one objective is always tailed after by a camera somewhere nearby the objective, and when the objective moves, the camera must move, when the objective stops, then the camera stops. Anyhow, the camera is always aimed at the objective, namely the camera is running after the objective. This is what is so called the Two-dimensional Positioning System, which is introduced in this paper.
     In this paper, the so-called Two-dimensional Positioning System is such a system as that there is a motor both in the level and vertical orientation respectively. The camera is derived and controlled completely by the motors. And so, given by the proper control signal of the motor, the camera can change its position to achieve the goal of positioning.
     DC permanent-magnet motor is elected as the executive appliance in this paper's design, of which motor X is used to control the level orientation, and motor Y the vertical orientation of the camera to form the Two-dimensional Positioning System. The whole system is composed of three parts, which are respectively the given part, the controlled part and the executive part. The given value is some data of the target's location coming from the image processor. Taking the MCU ATmega8 as the core control element, the controlled part consists of the secondary circuit of the MCU, the main drive circuit of the motor, and the location's feedback circuit, meanwhile, in the interest of achieving best positioning purpose, the software is also added to the controlled part. The executive part is mainly composed of motor, which driving the camera moving. The data from the image processor is sent into ATmega8, which is one element of the control part and can transform these data into corresponding control signal that will be sent to the next main drive circuit, which consists of switch components and also decides which of the two should run and their forward-backward running. After the motor accomplishes its start-up, for the pinpoint goal, a self-made photoelectric disk and plastic circuit are used to form the feedback portion, which can send real-timely the feedback signal that shows the distance the motor has moved to the MCU. The MCU then decides the moment when its output should be stopped by compare the given with the feedback value, and by doing so, the camera droved by the motor stop at the objective location by rule and line. Meanwhile, the disposal of the data that need the MCU to deal with is implemented via software programmer, and this is the idea of integrated control by integrating hardware with software.
引文
[1]刘和平.单片机原理与应用.重庆:重庆大学出版社.
    [2]杨美仙.单片机的发展及其应用.计算机与网络.
    [3]陈立周,陈宇编.单片机原理及其应用.北京:机械工业出版社.
    [4]毕维峰.单片机技术应用及其发展方向.2006 JOURNAL OF JILIN COMMERCIAL COLLEGE SUM No.85 2006.
    [5]黄立培.电动机控制.北京:清华大学出版社,2003.
    [6]唐仁远.现代永磁电机理论与设计.北京:机械工业出版社,1997.
    [7]陈隆昌,阎治安,刘新政.控制电机.西安:电子科技大学出版社,2000.
    [8]陆让之,张声铖,黄春兰.电机学.人民交通出版设,1998.
    [9]王小明 电机的单片机控制北京:北京航空航天大学出版社2002,5.
    [10]张立,赵永健.现代电力电子技术.北京:科学出版社,1992.
    [11]唐仁远.现代永磁电机理论与设计.北京:机械工业出版社,1997.
    [12]王兆安,黄俊.电力电子技术(第四版).北京:机械工业出版社,2004.
    [13]康华光,邹寿彬.电子技术基础.北京:高等教育出版社,2000.
    [14]康华光,陈大钦.电子技术基础(模拟部分),第四版.北京:高等教育出版社,1999.
    [15]何一鸣.电子技术基础教程.北京:电子工业出版社,2006.
    [16]谭建成.新编电机控制专用集成电路与应用.北京:机械工业出版社,2005.7.
    [17]谭建成.运动控制专用集成电路及应用.微电机.1994,27(1):19-25.
    [18]张明勋.电力电子设备设计和应用手册.北京:机械工业出版社,1992.
    [19]余永权.单片机在控制系统中的应用.北京:电子工业出版社,2000.
    [20]中华报告网.2005--2006年中国嵌入式系统产业研究年度报告.http://eem net,com,2006年3月8日.
    [21]耿德根,丁化成,李君凯.AVR单片机应用设计.北京:北京航空航天大学出版社.
    [22]宋健国.AVR单片机原理与应用.北京:北京航空航天大学出版社,2005.
    [23]马潮,詹卫前,耿德根.ATmega8原理及应用手册.北京:清华大学出版社,2003.
    [24]丁化成,耿德根,李君凯.AVR高速嵌入式单片机原理与应用.北京:北京航空航天人学出版社,2001.229-232.
    [25]窦振中.单片机外围器件实用手册(M).北京:北京航空航天大学出版社,2003,131-140.
    [26]桑楠.嵌入式系统原理及应用开发技术.北京:北京航空航天大学出版社,2002.
    [27]张光张.光栅印制机设计与实现.西安:电子科技大学研究生学位论文,2005.4.
    [28]李贺桥,杨怀栋,黄战华,彭志强.光电开关位置编码测控技术及其应用.光电工程2002.第29卷第1期.
    [29]殷纯永.光电精密仪器设计.北京:机械工业出版社,1996.
    [30]架梓冬,张金铎,金欢阳.传感器及其应用.西安:西安电子科技大学出版社,2002.1.
    [31]缪文贵.基于单片机与PC的光电靶测试系统研究.南京理工大学研究生学位论文,2002.5.
    [32]谭浩强.C程序设计.北京:清华大学出版社,2002.
    [33]马忠梅.单片机的C语言应用程序设计.北京:北京航空航天大学出版社,2003.
    [34]沈文,Eagle Lee,詹卫前.AVR单片机C语言开发入门指导.北京:清华大学出版社,2003.
    [35]汪炼,韩震宇.基于AVR单片机的串口通信.中国测试技术2003.3第2期.
    [36]陶永华,尹怡欣,葛芦生.新型PID控制.
    [37]控制电机位置及反馈检测.辽宁工学院学报,第21卷4期.
    [38]陶永华.新型PID控制及其应用.北京:机械工业出版社,1998.
    [39]张克彦.AVR单片机实用程序设计.北京:北京航空航大人学出版社,2004.
    [40]金春林,邱慧芳,张皆喜.AVR系列单片机C语言编程与应用实例.北京:清华大学出版社,2003.
    [41]肖宁峰,黄玉清.AVR嵌入式单片机接口技术与应用.兵工自动化.2003第22卷第5期.
    [42]美巴尼特(Richard Barnett)等.嵌入式C编程ATmelAVR[M].北京:清华大学出版社,2003.
    [43]KeithH.Billings.C.Eng.Handbook of switehpower supplies.Newyork McGraw-Hill Publishing Com Pany,1989.
    [44]Atmel Corp.AVR Application Notes.
    [45]Atmel Corp.AVR Studio User Manual.
    [46]D.Hanselman,Minimum torque ripple,maximum efficiency excitation of permanent magnet motors,IEEE Trans.Ind.Electron,Vol.41,No.3,pp297-300,June 1994
    [47]P Pillay,R.Krishnan,Modeling,simulation,and analysis of permanent-magnet motor drives,Part Ⅱ:The brushless DC motor drive,IEEE Trans.Ind.Appli.,Vol.25,No.2,March/April,1989,pp27-279
    [48]C.C.Chan et al,Novel wide range speed control of permanent magnet brushless motor drives,IEEE Trans,on Power Electronics,Vol.10,No.5,1995
    [49]Hammed S.A.Performance evaluation of three-phase variable-speed dc drives systems with uniform PWM control.IEEE Trans.Power Elector,1997,12:228-242
    [50]Nesimi Ertugrul,Paul Acamley.A New Algorithm for Permanent Magnet Motors.IEEE Trans.Ind.1998,30(1):126-133
    [51]Z.Q.Zhu,S.Bentouati.Control of three-phase permanent magnet brushless DC drives for high-speed applications.IEEE Conf.on power Electronics and Variable Speed Drives.2000,475:327-332
    [52]Kyeong-Hwa Kim,Myung-Joong Youn.Performance comparison of PWM inverter and variable DC link inverter schemes for high-speed sensor less control of BLDC motor.Electronics Letters.2002, 38(10):1294-1295
    
    [53] P.Pillary, R.Krishnan. Modeling, Simulation, and Analysis of Permanent Magnet Motor Drivers. IEEE Transactions on Industry Applications. 1989, 12(3):28-20
    
    [54] Neyram Hemati, Ming C.Leu.A Complete Model Characterization of Brushless DC Motors. IEEE Trans. Ind. Appl. 1992, 28(1):172-180
    
    [55] Johnson H.P., Ehsani M, Guzelgunler Y. Review of sesorless methods for brushless DC. Thirty-Fourth LAS Annua Meeting Conference Record of the 1999 IEEE, 1999, 1:143-150
    
    [56] Atmel Corporation. AT 24C 1024 Advance Information. 2002
    
    [57] Roger K. deBry. Communicating with display terminals [M]. New York, McGraw-Hill, 1985