Model based self-balancing transporter (my master’s thesis)

How much complexity might hide inside a toy? Well, after several months of hard work, I think I can answer this question…fig_rider_dino_initial

Why to choose a toy as a master’s thesis?

The motivation at the base of this project was to prove as many as possible, the things I learned during my master’s course in Mechatronics Engineering, in view of possible other publications.

A simple self balancing transporter (also known as “Hoverboard”) infact faces many complex problems, such as:

  • field-oriented motor driving
  • nested closed-loop controls
  • coupled-system (steering and equilibrium), in an under-actuated system
  • state estimation
  • sensor-fusion
  • safety-critical software

fig_components_connectionThe project was hard, but challenging and exciting. When I started the thesis I was strongly determined not only in the “disclosing the mistery”, but once I did this, I wanted to publish it as an open-source project.

As a first-step in this direction, here is the publication of my master’s thesis (click here to obtain the full PDF file).

The thesis presents all my work about:

Modelization

fig_model_p

the thesis presents two different models for the “inverse” pendulum problem (at the base of the vehicle’s principle of work).fig_person_mod

The first (simplified) model assumed the rider as a solid body solidal with the transporter’s base, while the second aimed to add a further degree of freedom represented by the ankle of the rider, together with a further spring-damper actiolagrangianon.

The Lagrangian approach carried to the construction of a system of non-linear equations put directly into the Simulink model.

 Design of the control

modelsAlso inside the thesis, a complete discussion about the linearization of the previous non-linear equations, with the decoupling of equilibrium and steering problems, together with stability analysis of the LQR controller used in both the problems.

Non-idealities and sensor fusion

The control is based on state-feedback, but (obviously) the state must have been reconstructed from “real” sensors reading, thus it must take into account problems such as noise, quantization and the need of fusion for the accelerometer/gyroscope sensors.

state_fbIn this part it was  presented a benchmark between different state-reconstruction filters, comprised the Kalman Fileter used also as sensor-fusion algorithm.

All such non-idealities and state-reconstruction schemes were modeled inside the Simulink environment, in order to test also the controls inside a “realistic” simulation bed.

Experimental platform

fig_wood_cylinderAfter all the simulations, it was time to “prove” the correspondence with real-time experiments.

In order to do this, it was built a complete bluetooth scheme, that made possible to set experiment setpoints and control gains from the Matlab environment, to the real vehicle.fig_comparison_reference_delta_psi01

During the experiment, the Matlab code reads the state from bluetooth and at the end of such experiment, a comparison between the experiment and the simulation is automatically presented.

Conclusions

At the end of the work, it was possible to tell that the simulation bed provided has well-replicated the real-life experiment, making it affordable and useful for further studies.

This is why I’d like (in a near future) to publish the source code, in the form of an open source project.

Enjoy the reading!

My master’s thesis