Introduction

This documentation features the implementation of the Segway behavior in a Zumo32u4 board. The process started with the modeling of the system according to the capabilities of the Zumo32u4. Therefore, a Zumo32u4 chapter was written with the relevant about the Zumo’s IMU, Zumo’s encoders and Zumo’s motos.

Secondly a model from the literature was selected. The model in [3] was firstly analyzed. The developed model in [3] was develop upon simplifying and considering it as a cart with an inverted pendulum installed on top. It defined the input as the force applied to the cart. To use this model the force had to be written in terms of the torque applied to the pendulum.

The model in [15] proved to be better applicable for implementation on a Zumo32u4 since it was in already in terms of torque applied to the pendulum system and the physical model upon the state variable model was based could be easily mapped to the Zumo by simplifying it.

None of the model in [3] and [15] considered a caterpillar driven system. Nevertheless, [15] considers explicitly the inertia moment of the wheels which can be replaced by the inertia moment of the caterpillar system.

Segway Model chapter presents how the model of [15] was adapted to the Zumo32u4 considering also actuator’s scaling factors.

Later, in LQR Controller Design chapter the design of the control law using LQR method is presented. The design was done based on the design done in [3] and [15].

After the designing the control law the Controller Implementation chapter explains how the controller was implemented.

As expected [3] nor [15] present a method to obtain accurate friction coefficients, what makes the model also inaccurate. But the inaccuracy of the model lead to unstable controlled system. Which showed the need of add a scale factor in the controlling law.