The goal of this project is to model the longitudinal motion of a Segway and design a PID controller for it. The model must include the dynamics of the inverted pendulum on two wheels, as shown on Figure 1 (left), and the model of the DC motors (same as ) that actuate the wheels as shown on Figure 1 (right). In particular, we will neglect the weight of the handle and, therefore, the pendulum/bar is only representative of the Segwey passenger, assumed as a rigid body attached to the base.



Figure 1. Segway inverted pendulum model (left) and DC motor electromechanical model (right).

The structure of the controlled system is a standard negative feedback, as shown in Figure 2. The passenger will command vehicle accelerations �̈ by body inclinations ��, therefore the latter will be chosen as controlled variable. The control variable �(�) generated by the PID control is the input of the process (Segway+passenger). To achieve favorable performances the PID must be tuned (choice of the gains ��,��,��) so that the overall controlled system behaves as a critically damped system, i.e. fastest response with no overshoot, to avoid motion unbalance.


Figure 2. PID feedback control system.

The final report must be typed and properly commented. All results need to be commented and supported by figures and/or calculations.

Project checklist:

1. System model in time domain (differential equations)
2. System model in Laplace domain (Laplace transform of the process)
3. Uncontrolled system stability assessment
4. Simulink/Matlab model
5. PID controller design
6. Simulations and presentations for final performances assessment
7. Report hardcopy and softcopy (.doc) must be submitted on or prior the due date.
8. Final software (Matlab + Simulink) must be submitted

Even if I had the math model of the vehicle and motors, this would be take hours. You are to make body angle proportional to linear or angular accelerations, velocites and magnitudes it seems. You seem to have a math model, put in your force or torque proportional to those errors and go to work on the gains.