本論文主要研究使用狀態相關Riccati方程式(state-dependent Riccati equation, SDRE) 方案於兩輪倒單擺機器人的非線性控制器設計和實現。根據系統數學模型設計兩輪平衡機器人的車體機構,通過Inventor軟體建構3D模型獲得一些重要參數,並以MATLAB®撰寫程式設計SDRE控制器,完成機器人的姿態平衡控制目標。系統軟硬件架構主要以搭載Windows系統的LattePanda開發版為上位機,結合運用RS-485以Modbus RTU通訊協定、馬達驅動控制技術、IMU 姿態量測技術等等,擷取必要之系統狀態變量。本研究進一步分析了狀態相關矩陣對應的逐點代數Riccati 方程式的可解性,通過降維得出的可解性簡單等價條件,可以有效減少逐點檢驗SDRE 方案可解性的大量計算負擔。然後設計SDRE 控制器以獲得最優控制律,通過輸出電壓Duty 模式驅動電機旋轉,成功控制兩輪機器人完成姿態平衡。;This thesis mainly studies the design and implementation of nonlinear controllers for two-wheeled inverted pendulum robots using the state-dependent Riccati equation (SDRE) scheme. According to the mathematical model of the system, the body mechanism of the two-wheeled balancing robot is designed, some important parameters are obtained by constructing a 3D model with Inventor software, and the SDRE controller is programmed with MATLAB® to complete the robot’s postural balance control goal. The system software and hardware architecture are mainly based on the LattePanda development version equipped with Windows system as the host computer, combined with the use of RS-485, Modbus RTU communication protocol, motor drive control technology, IMU attitude measurement technology, etc., to capture necessary system state variables. This study further analyzes the solvability of the pointwise algebraic Riccati equation (ARE) corresponding to the state-dependent coefficients (SDCs) matrix. The simple equivalence conditions for solvability obtained through dimensionality reduction can effectively reduce the computational burden of pointwise testing of the solvability of the SDRE scheme. Then design the SDRE controller to obtain the optimal control law, drive the motor to rotate through the output voltage Duty mode, and successfully control the two-wheeled robot to complete the postural balance.