簡易檢索 / 詳目顯示

研究生: 李珈松
Li-Jia Sung
論文名稱: 車輪式倒單擺平衡PID控制
Wheeled Inverted Pendulum Balancing PID Control
指導教授: 施慶隆
Ching-Long Shih
口試委員: 黃志良
Chi-Lian Hwang
許新添 
Hsin-Teng Hsu
學位類別: 碩士
Master
系所名稱: 電資學院 - 電機工程系
Department of Electrical Engineering
論文出版年: 2005
畢業學年度: 93
語文別: 中文
論文頁數: 70
中文關鍵詞: 平衡控制微控制器PID車輪式倒單擺
外文關鍵詞: wheeled inverted pendulum, balancing control, microcontroller, PID
相關次數: 點閱:310下載:26
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 本論文之目的為控制一車輪式倒單擺(wheeled inverted pendulum)能自動起立並在直立的狀態下自我維持平衡。控制系統包含單晶片微控制器PIC18F452與一個直流伺服馬達驅動器。系統使用一個傾斜計和一個陀螺儀來測量車身傾斜角與角速度以實現其平衡控制。本文內容包含電腦模擬與實驗結果以說明所使用之PID控制法的可行性。


    The aim of the thesis is to control a wheeled inverted pendulum to stand up and remain balancing in the upright state by itself. The control system consists of single chip microcontroller PIC18F452 and a DC servo motor driver. A tilt sensor and a gyroscope are used to measure the tilt angle and its angular velocity of the inverted pendulum for realizing the balance control. Computer simulations and experimental results are performed to illustrate the feasibility of the proposed PID control method.

    目 錄 頁次 摘 要…………………………………………………………………....Ⅰ 英文摘要……………………………………………………………......Ⅱ 致 謝……………………………………………………………………Ⅲ 目 錄……………………………………………………………………Ⅳ 圖表索引………………………………………………………………..Ⅶ 第一章 簡介 ……………………………………………………………1 1.1 文獻回顧………………………………………………………..1 1.2 研究目的………………………………………………………..7 1.3 論文架構………………………………………………………..8 第二章 系統硬體架構…………………………………………………..9 2.1 車輪式倒單擺機構…………………………………………….9 2.2 控制系統架構………………………………………………...10 2.3 PIC18moto2直流馬達驅動及控制模組……………………...11 2.4 PIC18Fxx2簡介……………………………………………….14 2.5 陀螺儀………………………………………………………...16 2.6 傾斜計……………………...…………………………………17 第三章 數學模型與PID控制器設計…………………………………21 3.1 車輪式倒單擺數學模型………………………………………21 3.2 車輪式倒單擺控制器設計……………………………………25 3.3 PID參數調整法…………….………………………………….28 3.3.1 Ziegler-Nichols法………………………………………..28 3.3.2 針對本實驗對Ziegler-Nichols法之調整………………29 第四章 系統軟體控制流程及控制器實現……………………………32 4.1 整體控制流程…………………………………………………32 4.2 模組介紹………………………………………………………33 4.2.1 計時模組………………………………………………..33 4.2.2 通訊模組………………………………………………..34 4.2.3 PWM模組……………………………………………….37 4.2.4 AD轉換模組…………………………………………….39 4.2.5 Encoder模組……………………………………………..40 4.3 車輪式倒單擺控制程式流程…………………………………46 4.3.1 主程式控制流程………………………………………..47 4.3.2車輪式倒單擺PID控制流程……………………………47 第五章 模擬與實驗結果……………………….……………………...52 5.1陀螺儀與傾斜計訊號測量之比較……………………………..52 5.1.1陀螺儀訊號測量…………………………………………52 5.1.2傾斜計訊號測量…………………………………………53 5.1.3陀螺儀與傾斜計同時角度測量…………………………54 5.1.4平衡控制中陀螺儀與傾斜計之角度校正……………….55 5.2 車輪式倒單擺平衡模擬與實驗結果…………………………55 5.2.1第一種控制器之模擬與實驗結果之比較………………56 5.2.2第二種控制器之模擬與實驗結果之比較………………60 5.2.3第三種控制器之模擬與實驗結果之比較………………62 5.2.4第四種控制器之模擬與實驗結果之比較………………65 5.2.5 四種控制器之相互比較………………………………..67 第六章 結論……………………………………………………………69 6.1 結 論…………………………………………………………..69 6.2 未來展望………………………………………………………70 參考文獻……………………………..…………………………………71 圖表索引 圖1.1 JOE………………………………………………………………3 圖1.2 車輪式倒單擺實體圖…………………………………………...4 圖1.3 Segway………………………………………………………..…5 圖1.4 nBOT………………………………………………………….…6 圖1.5 LegWay……………………………………………………….…6 圖1.6 iBOT…………………………………………………………..…7 圖1.7 系統架構圖……………………………………………...………8 圖2.1 車輪式倒單擺照片……………………………………...………9 圖2.2 車輪式倒單擺結構圖………………………………….………10 圖2.3 車輪式倒單擺運動系統架構圖………………………….……11 圖2.4 兩軸直流馬達驅動及控制模組PIC18moto2 實體圖………..12 圖2.5 兩軸直流馬達驅動及控制模組PIC18moto2系統方塊圖…...12 圖2.6 LMD18200內部方塊圖……………………………………….13 圖2.7 陀螺儀………………………………………………...………..16 圖2.8 傾斜計……………………………………………...…………..18 圖2.9 傾斜角的計算方法圖……………………………………...…..19 圖3.1 車輪式倒單擺控制系統………………………………….……22 圖3.2 單輪車輪式倒單擺PID控制器1…………….……………….25 圖3.3 單輪車輪式倒單擺PID控制器2……………………………..26 圖3.4 單輪車輪式倒單擺PID控制器3……………………...……...26 圖3.5 單輪車輪式倒單擺PID控制器4……………………………..26 圖4.1 車輪式倒單擺程式燒錄及控制流程圖………………….……32 圖4.2 PIC微控制器16位元計時器系統方塊圖…………………….33 圖4.3 計時模組Time Out流程圖………………….………………...34 圖4.4 通訊模組傳送接收流程圖…………………………………….36 圖4.5 脈波寬度調變方塊圖………………………………………….38 圖4.6 脈波寬度調變輸出圖……………………………………….…38 圖4.7 數位-類比轉換方塊圖………………………………….……..39 圖4.8 數位-類比轉換結果調整圖…………………………………...40 圖4.9 HCTL-2020系統方塊圖…………………………………………41 圖4.10 數位濾波器結構圖……………….……………………………43 圖4.11 四倍頻解碼電路時序圖……….………………………………44 圖4.12 整體控制流程……….…………………………………………47 圖4.13 車身狀態判斷流程圖……….…………………………………48 圖4.14 平衡控制程式流程圖……….………………………………..49 圖4.15 結合陀螺儀與傾斜計之優點的控制流程圖………………...51 圖5.1 陀螺儀訊號未經處理時,靜止時的訊號飄移……………….52 圖5.2 陀螺儀訊號經處理後,靜止時的訊號…………….…………53 圖5.3 傾斜計訊號在三種狀態靜止時的角度………………………53 圖5.4 陀螺儀與傾斜計同時測量角度……………….………………54 圖5.5 陀螺儀與傾斜計之角度校正實驗圖………….………………55 圖5.6 車輪式倒單擺控制器一SIMULINK圖……….……………...56 圖5.7 車輪式倒單擺控制器一模擬結果圖………………………….57 圖5.8 控制器一從起立到平衡時的陀螺儀角度變化……………….58 圖5.9 控制器一從起立到平衡時的傾斜計角度變化……………….58 圖5.10 控制器一從起立到平衡時的PWM大小變化……...……….58 圖5.11 車輪式倒單擺控制器二SIMULINK圖……………………..60 圖5.12 車輪式倒單擺控制器二模擬結果圖…………..…………….60 圖5.13 控制器二從起立到平衡時的陀螺儀角度變化…...…………61 圖5.14 控制器二從起立到平衡時的傾斜計角度變化………...……61 圖5.15 控制器二從起立到平衡時的PWM大小變化………………62 圖5.16 車輪式倒單擺控制器三SIMULINK圖………………………62 圖5.17 車輪式倒單擺控制器三模擬結果圖………………………….63 圖5.18 控制器三從起立到平衡時的陀螺儀角度變化……………….63 圖5.19 控制器三從起立到平衡時的傾斜計角度變化……………….64 圖5.20 控制器三從起立到平衡時的PWM大小變化……………….64 圖5.21 車輪式倒單擺控制四SIMULINK圖…………………………65 圖5.22 車輪式倒單擺控制四模擬結果圖…………………………….65 圖5.23 控制器四從起立到平衡時的陀螺儀角度變化……………….66 圖5.24 控制器四從起立到平衡時的傾斜計角度變化……………….66 圖5.25 控制器四從起立到平衡時的PWM大小變化……………………66 表2.1 陀螺儀規格表…………………………………………………16 表2.2 傾斜計規格表…………………………………………………18 表2.3 陀螺儀與傾斜計之比較表……………………………………20 表4.1 SPBRG之大小設定………………………………………………36 表4.2 四倍頻解碼電路說明…………………………………………44 表5.1 四種控制器之性能比較表…………………………………….68 表5.2 控制器四實驗與模擬之PD參數設定值……………..……….68

    參考文獻

    [1] F. Grasser, A. D’Arrigo, S. Colombi and A.C. Rufer, “JOE: a Mobile, Inverted Pendulum,” IEEE Trans. Industrial Electronics, vol. 39, no. 1, pp. 107–114, February 2002.

    [2] Y. Ha and S. Yuta, “Trajectory Tracking Control for Navigation of Self-Contained Mobile Inverse Pendulum,” IEEE/RSJ/GI Int. Conf. Advanced Robotic Systems and the Real World, vol. 3, pp. 12-16, September 1994.

    [3] J. Borenstein and L. Feng, “Gyrodometry: A New Method for Combining Data from Gyros and Odometry in Mobile Robots,” IEEE International Conference on Robotics and Automation Minneapolis, Minnesota-April 1996.

    [4] Albert-Jan Baerveldt and Roert Klang, “A Low-cost and Low-weight Attitude Estimation System for an Autonomous Helicopter,” Center for Computer System Architecture, Halmstad University, Box 823, S-30118 Halmstad, Sweden.

    [5] Rich Chi Ooi, ”Balancing a Two-Wheeled Autonomous Robot”, Supervisors : A/Prof. Thomas Bräunl Prof. Jie Pan, The University of Western Australia School of Mechanical Engineering Final Year Thesis 2003.

    [6] Greg Welch and Gary Bishop, “An Introduction to the Kalman Filter”, TR 95-041,Department of Computer Science University of North Carolina at Chapel Hill Chapel Hill, NC 27599-3175 Updated: Monday, April 5, 2004

    [7] Michael Baloh and Michael Parent, “Modeling and Model Verification of an Intelligent Self-Balancing Two-Wheeled Vehicle for an Autonomous Urban Transportation System”, The Conference on Computational Intelligence, Robotics, and Autonomous Systems, Dec. 15 2003, Singapore

    [8] “A Basic Introduction to Filters–Active, Passive and Switched-Capacitor”, Application Note AN779, National Semiconductor Corporation, 1991.

    [9] O. Matsumoto, S. Kajita and K. Tani, “Estimation and Control of the Attitude of a Dynamic Mobile Robot Using Internal Sensors,” Advanced Robotics, vol. 7, no. 2, pp. 159-178, 1993.

    [10] Y. Takahashi, S. Ogawa and S. Machida, “Step Climbing Using Power Assist Wheel Chair Robot with Inverse Pendulum Control,” IEEE Int. Conf. Robot. Automat., vol. 2, pp. 1360-1365, April 2000.

    [11] K.Yamafuji and T.Kawamura, “Postural control of a monoaxial bicycle”, Journal of the Robotics Society of Japan, Vol.1 No.4 pp.74-79,1988.

    [12] O.Matsumoto, S.Kajita and K.tani”Attitude estimation of the two wheeled inverted pendulum using adaptive observer”, Proc. of 9th Academic Conf. Of the Robotics Society of Japan, pp.891-989,1991.

    [13] E.Koyanagi, S.Iida, K.Kimoto and S.Yuta, “A wheeled inverse pendulum type self-contained mobile robot and its two-dimensional trajectory control”, Proc. of ISMCR;’92, pp.891-898,1992.

    [14] Jack Wu (SCS’06), Jim Bai (ECE’06),“Self-Balancing Robot: bBot”, Carnegie Mellon University March 12, 2003

    [15] PIC18Fxx2 Data Sheet, 2002, Microchip Technology Inc.

    [16] MPLAB IDE v6.xx Quick Start Guide, 2003, Microchip Technology Inc.

    [17] MPLAB ICD2 In-Circuit Debugger User’s Guide, 2003, Microchip Technology Inc.

    [18] MPLAB C18 C Compiler User’s Guide, 2002, Microchip Technology Inc.

    [19] 王禎祥,碩士論文,“兩輪自我平衡機器人之前後行走控制”, 國立中央大學電機所碩士論文, 2003年六月。

    [20] 鄭鈞元,碩士論文,“兩輪自我平衡機器人之平衡控制”,國立中央大學電機所,2003 年六月。

    [21] 兩軸直流馬達驅動及控制模組PIC18moto2 v1.0使用手冊

    [22] PIC18Fxx2 微控制器原理與實作,施慶隆、劉晏維編著,2004年6月,宏友圖書公司。

    QR CODE