摘要: | 本論文主要在設計與控制一輛具有自我維持平衡能力的兩輪車。整個系統以NIOS CPU作為主控核心,是一種嵌入式系統與系統晶片(SOPC)的應用,整合馬達控制、電路訊號擷取、無線訊號傳輸與訊號處理的技術,並將模糊控制器建構在系統晶片本身,實現模糊控制的機器人系統。在控制流程上,使用傾斜器(Tilt)與陀螺儀(Gyro)分別量測車身的傾斜角度與角速度,另外使用馬達編碼器(Encoder)量測車子馬達轉動的角度及角速度。根據傾斜器、陀螺儀、馬達編碼器所回授的即時車身資訊當作輸入,建立車體各種行動模式的模糊控制器,計算輸出之後,以FPGA實現的PWM訊號來控制兩輪馬達的轉動,使得兩輪車具備平衡、定位、同步、左右轉向、前進與後退、停止、行走定速、上下坡等功能。在車身維持工作的期間,可利用無線數據機將車身所有資訊回傳至電腦端,藉由電腦端監控兩輪車的整體狀態,並可由遙控器下達行動的控制指令。 The purpose of this thesis is to design and control a self-balance two-wheel vehicle. NIOS CPU is the control center of the entire system, which includes fuzzy control algorithm, motor control, A/D converter, wireless communication and signal process etc. It is the whole applications of an embedded system and system on programmable chip(SOPC). In control, the sensors tilt and gyro are used to measure the inclination angle and the angular velocity of the vehicle. Furthermore, the encoder is used to measure rotational rate and rotational angle of motors of the vehicle. The real-time vehicle information is selected for the inputs of every motion’s fuzzy controller. Through evaluating outputs of controllers, we use FPGA to implement PWM signals control motors of the vehicle. Finally, the two-wheel vehicle achieves self-balance, position fixing, synchronization, going forward and backward, walking with pace, making a turn, climbing up, going downhill, stopping and so on motions. All signals could be transmitted via wireless modules. However, not only the whole information of vehicle can be revealed by PC, but also the vehicle can be controlled by remote controller in our result. |