【正文】
摘 要 I 摘 要 近年來(lái) , 移動(dòng)機(jī)器人應(yīng)用范圍越來(lái)越廣泛 , 已經(jīng)被用于人類(lèi) 生活的各個(gè)領(lǐng)域 , 而應(yīng)用移動(dòng)機(jī)器人完成偵查、排爆及消防等危險(xiǎn)任務(wù)已 經(jīng)成為各國(guó)研究的重點(diǎn)。隨著移動(dòng)機(jī)器人的智能化程度越來(lái)越高 , 對(duì)機(jī)器人控制器的要求也在不斷提高 , 這就要求控制器具有良好的實(shí)時(shí)性和快速響應(yīng)能力。 本次 設(shè)計(jì)了一款全數(shù)字控制的小型地面移動(dòng)機(jī)器人運(yùn)動(dòng)控制器 , 具有控制、功率驅(qū)動(dòng)及各種保護(hù)等功能。 采用 ARM9 作為 運(yùn)動(dòng)控制器的 主控芯片 , DSP 作為分布式控制芯片 , 重點(diǎn)設(shè)計(jì)了 DSP 控制器的硬件電路。 這些電路包括 DSP 最小系統(tǒng)、電機(jī)驅(qū)動(dòng)、電機(jī)電流檢測(cè)、電機(jī) 位置檢測(cè) 及電機(jī)過(guò)壓欠壓保護(hù) , 并對(duì)其主要電路進(jìn)行了詳細(xì)的分析。 ARM 主 控制器 與 DSP 分布式 控制器 之間利 用 CAN 總線(xiàn)進(jìn)行通信 。 采用速度環(huán)及電流環(huán)的雙閉環(huán)控制 , 并且引入 積分分離 PID 控制作為速度調(diào)節(jié)器的控制算法 , 對(duì)傳統(tǒng)的 PID 控制進(jìn)行了改進(jìn) 。 在設(shè)計(jì)硬件電路和控制算法基礎(chǔ)之上 , 完成了 DSP 控制軟件的設(shè)計(jì)。軟件設(shè)計(jì)主要包括主程序設(shè)計(jì) 及各種中斷子程序設(shè)計(jì)。中斷子程序又包括電機(jī)換相及速度計(jì)算子程序、 PWM 輸出子程序 、 速度控制子程序 、 CAN 總線(xiàn) 通信子程序 等。 關(guān)鍵詞: 移動(dòng)機(jī)器人, ARM9, DSP 運(yùn)動(dòng)控制器,無(wú)刷直流電機(jī), PWMABSTRACT II Abstract In present, the mobile robot has been aplied more and more widely. It has been used in all human life. It has bee the focus study to plete the dangerous tasks such as investigation, remove exploder and fire protection with mobile robot. With the mobile robot being more and more intelligent, the requirment of motion controller has been improved increasingly. It requires the controller with good realtime and rapid response capacity. The study had designed a motion controller of mobile robot with fully digital control system. It had the function of control, power driver and various overload protection. The ARM9 processor was used in the motion controller as main mand chip and DSP chips as the distributed controllers. The hardware circuits of DSP controller had been designed. It included the least control circuit of DSP, the circuit of motor drive, check current, position detection of motor, overvoltage and undervoltage protection. The main circuits had been analyzed detailed. The main processor ARM9 and distributed processors DSP using CAN bus municate with each other. The motion controller had double closed loops which were speed loop and current loop. The traditional PID control had been improved. The integral separation PID control had been used in the speed reguator. Based on the hardware circuits and the control arithmetic, the software design of the DSP controller had been pleted. It included the main program and various subprograms of interrupt. The program of motor munication, speed calculation, PWM output, speed control, munication with CAN and so on were also included in the subprogram. Key words: Mobile Robot, ARM9, DSP Motion Controller, BLDCM, PWM目 錄 III 目 錄 摘 要 ........................................................................................................................... I ABSTRACT ................................................................................................................. II 目 錄 ......................................................................................................................... III 第一章 緒 論 .............................................................................................................1 課題設(shè)計(jì)的意義 .................................................................................................1 課題來(lái)源及國(guó)內(nèi)外研究現(xiàn)狀 ............................................................................1 課題設(shè)計(jì)的主要內(nèi)容 ........................................................................................2 第二章 控制系統(tǒng)總體概述 .........................................................................................3 移動(dòng)機(jī)器人運(yùn)動(dòng)控制系統(tǒng)總體結(jié)構(gòu) ................................................................3 電機(jī)的選擇 ........................................................................................................4 步進(jìn)電機(jī)、有刷直流電機(jī)及無(wú)刷直流電機(jī)比較 .....................................4 無(wú)刷直流電機(jī)結(jié)構(gòu)及工作原理 .................................................................5 無(wú)刷直流電機(jī)的數(shù)學(xué)模型 .........................................................................7 第三章 控制系統(tǒng)硬件電路設(shè)計(jì) ...............................................................................10 控制系統(tǒng)電源設(shè)計(jì) ..........................................................................................10 驅(qū)動(dòng)板電源設(shè)計(jì) .......................................................................................10 DSP 供電電源專(zhuān)用芯片的匹配電源設(shè)計(jì) .............................................11 ARM9 主處理器概述及其與 CAN 總線(xiàn)的連接簡(jiǎn)介 .....................................12 ARM9 處理器概述 ....................................................................................12 ARM9 處理器 S3C2410X 與 CAN 總線(xiàn)的連接 ......................................12 DSP 分布式控制器與 DSP 最小系統(tǒng)設(shè)計(jì) ......................................................13 TMS320F2812 DSP 芯片簡(jiǎn)介 ...................................................................14 DSP 最小系統(tǒng)設(shè)計(jì) ....................................................................................15 CAN 功能模塊硬件設(shè)計(jì) ..................................................................................20 PWM 信號(hào)隔離及驅(qū)動(dòng)電路 .............................................................................22 主電路設(shè)計(jì) ......................................................................................................23 電流檢測(cè)電路設(shè)計(jì) ..........................................................................................25 轉(zhuǎn)速及轉(zhuǎn)子位置檢測(cè)電路設(shè) 計(jì) ......................................................................26 目 錄 IV 第四章 控制系統(tǒng)軟件設(shè)計(jì) .......................................................................................28 軟件開(kāi)發(fā)環(huán)境 ..................................................................................................28 主程序設(shè)計(jì) ......................................................................................................28 中斷服務(wù)程序設(shè)計(jì) ..........................................................................................30 中斷捕獲模塊 ............................................................................................30 PWM 產(chǎn)生模塊 ..........................................................................................32 定時(shí)器 1 中斷模塊 ...................................................................................3