Final assembly of the self-balancing segway robot
Robot balancing by itself!
Project Overview
The Segway is a personal transportation system consisting of a two-wheeled system with a rider. The system stabilizes the rider and drives the rider forward as the rider leans their weight. Over the course of two labs in MIT's course 2.004 Dynamics and Control II, I approximated a Segway model using a two-wheeled robot without a rider, assembled a segway robot, and balanced the segway robot using several different control methods.
In the first part of the experiment, PD and PID stabilization controllers were designed for the Segway robot system. First, using the Segway robot properties and the open-loop transfer function, the PD controller was designed and simulated in Matlab using the sisotool. Next, the controller was tested with the Segway robot. Then, gains were adjusted slightly to achieve stability and adjust for balance and direction. Finally, the process was repeated with additional integral control, resulting in a PID controller.
In the second part of the experiment, a state feedback controller was designed for the Segway robot. First, the state feedback controller was designed using the pole placement method. Next, a time response was simulated. Then, the control was tested with the Segway robot. Finally, the controller was adjusted slightly to achieve the best stability performance.
Assembly
I assembled the segway robot using a given set of materials.
Materials used to assemble the segway robot
Modeling and Control Methods
I modeled the segway robot as similar to an inverted pendulum which needs a control system to prevent crashing/falling.
Loop for segway robot
Mechanical properties of the segway robot
Inverted pendulum model
Inverted pendulum with moving cart model
PD Controller
With my models, I was able to obtain the following PD Controller transfer function:
I edited the Control System Designer and Compensator Editor in Matlab:
Control System Designer for PD Controller
Compensator Editor for PD Controller
PID Controller
With my models, I was able to obtain the following PID Controller transfer function:
I edited the Control System Designer and Compensator Editor in Matlab:
Control System Designer for PID Controller
Compensator Editor for PID controller
Results
Better performance was seen with the PID and state feedback controllers rather than PD controllers.
PD Controller
PD Controller - segway robot doesn't fall over when it crashes!
PID Controller - great stability and segway robot doesn't fall over when it crashes!
Square wave setpoint
Sine wave setpoint
State feedback control
Documentation of my Process
Contact
508-404-3168 | leplatt@andrew.cmu.edu | Pittsburgh, PA | https://www.linkedin.com/in/laurenelizabethplatt/