Difference between revisions of "TiltOne"

From AIRWiki
Jump to: navigation, search
m (Classical controllers)
 
(49 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{Project
 
{{Project
 
|title=TiltOne
 
|title=TiltOne
 +
|image=Tiltone_3.jpg
 
|short_descr=Balancing robot
 
|short_descr=Balancing robot
 
|coordinator=AndreaBonarini;
 
|coordinator=AndreaBonarini;
|students=MartinoMigliavacca;
+
|tutor=MartinoMigliavacca;
 +
|collaborator=GiulioFontana;
 +
|students=AndreaGalbiati;
 
|resarea=Robotics
 
|resarea=Robotics
 
|restopic=Robot development
 
|restopic=Robot development
|start=2008/03/01
+
|start=2010/09/20
|end=2010/04/20
+
|end=2011/02/20
 
|status=Active
 
|status=Active
|level=Ms
+
|level=Bs
 
|type=Thesis
 
|type=Thesis
 
}}
 
}}
  
 +
TiltOne is a two-wheels balancing robot, designed for service applications which need a tall robot (it is 120cm tall) keeping a small footprint, e.g., home assistance, office bellboy, advertising purposes, robotic waiter, assistant to move heavy objects.
  
 +
TiltOne has only two wheels, which are actuated to keep itself in equilibrium. It is designed to be able to carry a quite high payload (up to 50kg) travelling at speeds of about 1.5m/s.
  
TiltOne is a two-wheels balancing robot that can keep itself in equilibrium while moving around. It's a bigger version of Tilty - our first balancing robot - as it is designed to be able to carry a quite high payload (up to 50kg) travelling at speeds of about 1.5m/s.
+
The robot is controlled by a microcontroller that runs two different balance algorithms: the first implements classical control laws, analytically tuned, while the other is obtained by machine learning techniques, where the robot learns how to keep the equilibrium.
  
 
== Mechanical project ==
 
== Mechanical project ==
 +
 +
==== Frame ====
 
As the robot needs to keep the wheel axis just under it's center of mass to mantain the unstable equilibrium point, it's inertia should be high in the upper part of the frame and low at the wheel level, allowing the base to move while the center of mass holds - ideally - it's position. For this reason the batteries, that are the heavier component of the robot, are mounted at the top of the frame.
 
As the robot needs to keep the wheel axis just under it's center of mass to mantain the unstable equilibrium point, it's inertia should be high in the upper part of the frame and low at the wheel level, allowing the base to move while the center of mass holds - ideally - it's position. For this reason the batteries, that are the heavier component of the robot, are mounted at the top of the frame.
  
 
A preview of the robot structure was realized using Google Sketchup 6, giving a first idea about it's dimensions and components placement [[Media:Tiltone_2_-_completo.zip]].
 
A preview of the robot structure was realized using Google Sketchup 6, giving a first idea about it's dimensions and components placement [[Media:Tiltone_2_-_completo.zip]].
  
[[Image:Tiltone 2 - ruote alzate.jpg]]
+
[[Image:Tiltone 2 - ruote alzate.jpg|720px]]
  
The mechanical project was then realized using Rinoceros 4.0 CAD. Apart from the robot frame, particular attention was dedicated to the design of the transmission and the wheel hub, that allow to use standard cross-bike wheels [[Media:Tiltone_3_Rhinoceros.zip]].
+
The robot frame is built using standard aluminium profiles (http://www.item.info) to allow future modifications and provide simple solutions to attach auxiliar devices.
  
[[Image:tiltOne.jpg]]
+
==== Wheels and transmission ====
  
 +
The mechanical project was then realized using Rinoceros 4.0 CAD. Apart from the robot frame, particular attention was dedicated to the design of the transmission and the wheel hub, that allow to use standard cross-bike wheels [[Media:Tiltone_3_Rhinoceros.zip]].
  
 +
[[Image:tiltOne.jpg|720px]]
  
The robot frame is built using standard aluminium profiles ([[http://www.item.info Item]]) to allow future modifications and provide simple solutions to attach auxiliar devices.
+
[[Image:Trasmissione.jpg|720px]]
 
+
 
+
 
+
 
+
 
+
== TiltOne: il progetto ==
+
 
+
Forti dell'esperienza accumulata costruendo Tilty abbiamo deciso di progettare TiltOne affinche' la struttura fosse il piu' semplice possibile, cosi' da rendere poco problematiche le eventuali future modifiche. Per la costruzione del telaio abbiamo scelto di utilizzare dei profilati di alluminio standard ([[http://www.item.info Item]]), facilmente reperibili anche in futuro, che permettono di aggiungere e togliere elementi alla struttura con estrema facilità, grazie alla modularità dei profilati e alla quantità di accessori disponibili
+
 
+
Il progetto di massima e' stato realizzato con Google SketchUp 6, per avere in tempi rapidi una vista d'insieme che ci permettesse di scegliere le dimensioni del robot.
+
In allegato, il progetto realizzato con SketchUp: [[Media:Tiltone_2_-_completo.zip]]
+
 
+
Progetto di massima di TiltOne (realizzato con Google SketchUp), con ruote di supporto alzate:
+
 
+
  
 +
The robot is actuated by two high-power electrical DC motor from Maxon Motor (www.maxonmotor.com) that provide torque to the wheels via a belt drive system.
  
Progetto di massima di TiltOne (realizzato con Google SketchUp),  con ruote di supporto a terra:
+
== Electrical project ==
  
[[Image:Tiltone 2 - completo.jpg]]
+
==== Sensors ====
  
 +
What the robot needs to control it's behavior are it's angle and angular velocity with respect to the direction of the gravitational force and the current speed of the wheels.
  
Stabilite le dimensioni del robot e scelti i profilati da utilizzare, abbiamo disegnato con maggior precisione il telaio, utilizzando Rhinoceros 4. In particolare e' stata curata la parte meccanica: trasmissione, ruote, asse e supporto asse, posizionamento dei motori.
+
To acquire the robot angle and the angular velocity two sensors are used: an accelerometer (LIS344ALH by ST Microelectronics), that gives the components of the gravitational force along the vertical and horizontal axes of the frame, and a gyroscope (ADXRS150 from Analog Devices), that can directly measure the angular velocity with respect to the wheel axis.
In allegato il progetto realizzato con Rhinoceros: [[Media:Tiltone_3_Rhinoceros.zip]]
+
In order to reduce the influence of robot's movements sensed by the accelerometer, and to avoid the drift of the gyroscope readings, these two measurements are fused with a Kalman filter. The output of the filter is an estimate of robot's angle and angular velocity that tracks very well the real data.
  
Vista d'insieme di TiltOne (progetto realizzato con Rhinoceros),:
+
[[Image:tiltone_ka_ra_noise.png]]
  
[[Image:tiltOne.jpg]]
+
Wheel's speed is obtained by two optical encoders (HEDS-5540 from Agilent) directly attached to the motor rotors, that allow to evaluate the rotor speed and to drive the motors with a closed loop controller.
  
=== Telaio ===
+
==== Robot controller ====
  
I profilati in grigio scuro saranno fissati con giunti di testa, non mobili (saranno in sostanza gli 8 che chiudono esternamente lo spazio per i motori). Tutti gli altri saranno fissati con le squadre per permetterne lo spostamento andando a variare la posizione del baricentro.
+
The robot is controlled by a board built around a STM32 ARM7 Cortex M3 microcontroller by ST Microelectronics.
  
Vista laterale del telaio, con quote:
+
[[Image:tiltone_board_blocks.png|720px]]
  
Nota: i due traversini alla base sono lungi 30cm (invece che 26cm)
+
The microcontroller acquires sensors data, apply a control law and commits a command to the motors. The software running on the ARM is real-time oriented, having periodic tasks constantly running at different frequencies and some interrupt-driven events that can modify the program flow.
 +
The board provides also a serial interface to an external PC used to program the microcontroller and a wireless Zigbee module allowing to communicate with the robot
  
[[Image:Tiltone 2 - telaio laterale con quote.jpg]]
+
== Stability and motion control ==
  
Vista frontale del telaio, con quote:
+
We have implemented different algorithms to control the stability of the robot and it's movements. Some of them are based on classical control laws, while others exploit machine learning techniques.
  
[[Image:Tiltone 2 - telaio frontale con quote.jpg]]
+
==== Classical controllers ====
  
Vista dall'alto del telaio, con quote:
+
A classical PID controller has been developed for stability control. A simple P-I controller keeps the robot in vertical position, but it is not robust and can't follow a speed o position setpoint.
  
[[Image:Tiltone 2 - telaio dall'alto con quote.jpg]]
+
A better controller was introduced to enhance robot reaction to external disturbances and to follow speed setpoints. A simplified schema of the controller is presented in the following figure.
  
 +
[[Image:tiltone_pid_controller.png|720px]]
  
 +
* C1 and C2 are the tilt controllers. C1 is a PI, obtained by root locus analysis of the system, that makes the system stable. While C2 is a PID, obtained studying the bode plot of the system, that improves stability performance.
 +
* C3 is the speed controller that acts changing the angle setpoint of the tilt controllers (nested PID approach)
  
 +
==== Reinforcement Learning approach ====
  
 +
Machine learning techniques have been exploited to keep the robot stable. The approach we used is based on offline FQI reinforcement learning algorithms, and some continuous-time variants to smooth robot movements.
 +
Basically, the robot is able to learn automatically a control policy (a function, or a lookup table, that maps the state variables to a control action) by an analysis of data collected with random motor commands. The learning process consists in three steps:
 +
* the robot is controlled by random commands, so it shakes for a while (usually 1-2 seconds) and then falls down
 +
* collected data is analyzed with a FQI policy search algorithm and a policy is obtained
 +
* the policy is tested on the robot, and more data is collected to recursively apply the algorithm
  
 +
The figure on the left shows starting data collected by applying random commands, while on the right the obtained policy to keep the robot vertical is reported.
  
=== Meccanica ===
+
[[Image:Tiltone_rl_space.png|420px]] 
 +
[[Image:Rl_policy_angle.png|420px]]
  
La progettazione delle parti meccaniche aveva come obiettivo la costruzione di una struttura molto solida con l'uso di materiale il piu' possibile standard (e quindi facilmente reperibile in futuro). Ci siamo prefissi come traguardo la possibilità di trasportare circa 40kg di strumentazione, in aggiunta al peso del robot e delle batterie, per un peso stimato complessivo di circa 80kg.
+
== Resources ==
  
==== Motori ====
+
==== Thesis ====
  
La scelta dei motori è ricaduta sui prodotti Maxon Motor, coi quali abbiamo già confidenza avendoli utilizzati in altri progetti. Si tratta di motori DC con riduzione planetaria ed encoder ottico, che associano potenze elevate ad ingombri contenuti ed estrema precisione.
+
* Master thesis by Martino Migliavacca (in Italian): "Progetto e realizzazione di una base robotica bilanciante su ruote" (Design and development of a two-wheel balancing platform). [[Media:TiltOne_tesi_Migliavacca.pdf]]
  
Al fine di dimensionare i motori abbiamo realizzato un modello di massima in Matlab, rappresentando in Simulink le relazioni che caratterizzano la dinamica di un pendolo inverso. Al modello del sistema fisico e' quindi stato applicato un semplice controllore PID, tarato affinche' garantisse prestazioni sufficientemente soddisfacenti senza requisiti di coppia troppo elevati.
+
* Project presentation slides by Martino Migliavacca (in Italian). [[Media:Tiltone_Presentation_Migliavacca.pdf]]
  
[[Image:TiltOne Matlab.jpg]]
+
* First level thesis by Andrea Galbiati (in Italian): "Progettazione e realizzazione del controllo di una base robotica bilanciante su ruote" (Control design and implementation for a two-wheel balancing platform). [[Media:TiltOne_tesi_Galbiati.pdf]]
  
[[Image:Mozzo rhino prospettica.jpg|800px]]
+
==== YouTube videos ====
 +
* tiltOne's first steps
 +
{{#ev:youtube|4FrA73Cxljs}}
  
==== Trasmissione ====
 
  
==== Ruote ====
+
* tiltOne's Ad
Pensando con Riccardo alla soluzione per utilizzare normalissime ruote da bicicletta senza pezzi troppo custom, siamo giunti ad una soluzione che, a noi, pare la piu' semplice: invece che insistere nel cercare di rendere solidale il mozzo alla ruota, cosi' da metterlo sui cuscinetti e avere la puleggia (e la cinghia) interna al telaio, si puo' mantenere il mozzo fisso, "saldato" al telaio, esattamente come nelle normali biciclette (il mozzo e' fisso, i cuscinetti sono tra il mozzo e il pignone della ruota).
+
{{#ev:youtube|NvGMq4Qig7M}}
Cio' che servire sarebbe quindi soltanto la puleggia a cui collegare la cinghia (che resterebbe esterna al telaio) fatta ad-hoc in modo da utilizzare lo stesso sistema di aggancio alla ruota che usano gli ingranaggi della bicicletta (quindi la "zigrinatura" su cui si infilano gli ingranaggi). Utilizzando ruote da BMX non c'e' il sistema di ruota libera, per cui la puleggia su cui poggia la cinghia sarebbe solidale al cerchio in entrambi i versi di rotazione.
+
  
==== Mozzo ruote ====
 
  
Disegni di massima con quote
+
*tiltOne naughty waiter
 +
{{#ev:youtube|JLQ06vOvRsU}}
  
[[Image:Mozzo rhino prospettica.jpg|800px]]
 
[[Image:Mozzo rhino tavola.jpg|800px]]
 
  
 +
* tiltOne is stable
 +
{{#ev:youtube|VASMfKkpK6c}}
  
  
 +
* Remote control with joypad
 +
{{#ev:youtube|V0U4vNpM_z8}}
  
Per completezza, qui uno spaccato di come dovrebbe esser fatto il mozzo di una ruota da bicicletta (notare il sistema di aggancio degli ingranaggi al mozzo):
 
[http://www.technical-illustrations.co.uk/bike-project.html http://www.technical-illustrations.co.uk/bike-project.html]
 
  
 +
<!--* tiltOne at Robotica 2011
 +
{{#ev:youtube|jux6vbNTdcQ}}-->
  
Particolare della trasmissione:
+
==== External links ====
 +
- Inverted pendulum on Wikipedia
 +
http://en.wikipedia.org/wiki/Inverted_pendulum
  
[[Image:Tiltone 1 - motore e cinghia.jpg|800px]]
+
- Matlab tutorial about controlling an inverted pendulum (Modeling, PID, LQR, etc)
 +
http://www.engin.umich.edu/group/ctm/examples/pend/invSS.html#lqr

Latest revision as of 17:05, 18 September 2014

TiltOne
Image of the project TiltOne
Short Description: Balancing robot
Coordinator: AndreaBonarini (andrea.bonarini@polimi.it)
Tutor: MartinoMigliavacca (migliavacca@elet.polimi.it)
Collaborator: GiulioFontana (giulio.fontana@polimi.it)
Students: AndreaGalbiati (andrea6.galbiati@mail.polimi.it)
Research Area: Robotics
Research Topic: Robot development
Start: 2010/09/20
End: 2011/02/20
Status: Active
Level: Bs
Type: Thesis

TiltOne is a two-wheels balancing robot, designed for service applications which need a tall robot (it is 120cm tall) keeping a small footprint, e.g., home assistance, office bellboy, advertising purposes, robotic waiter, assistant to move heavy objects.

TiltOne has only two wheels, which are actuated to keep itself in equilibrium. It is designed to be able to carry a quite high payload (up to 50kg) travelling at speeds of about 1.5m/s.

The robot is controlled by a microcontroller that runs two different balance algorithms: the first implements classical control laws, analytically tuned, while the other is obtained by machine learning techniques, where the robot learns how to keep the equilibrium.

Mechanical project

Frame

As the robot needs to keep the wheel axis just under it's center of mass to mantain the unstable equilibrium point, it's inertia should be high in the upper part of the frame and low at the wheel level, allowing the base to move while the center of mass holds - ideally - it's position. For this reason the batteries, that are the heavier component of the robot, are mounted at the top of the frame.

A preview of the robot structure was realized using Google Sketchup 6, giving a first idea about it's dimensions and components placement Media:Tiltone_2_-_completo.zip.

Tiltone 2 - ruote alzate.jpg

The robot frame is built using standard aluminium profiles (http://www.item.info) to allow future modifications and provide simple solutions to attach auxiliar devices.

Wheels and transmission

The mechanical project was then realized using Rinoceros 4.0 CAD. Apart from the robot frame, particular attention was dedicated to the design of the transmission and the wheel hub, that allow to use standard cross-bike wheels Media:Tiltone_3_Rhinoceros.zip.

TiltOne.jpg

Trasmissione.jpg

The robot is actuated by two high-power electrical DC motor from Maxon Motor (www.maxonmotor.com) that provide torque to the wheels via a belt drive system.

Electrical project

Sensors

What the robot needs to control it's behavior are it's angle and angular velocity with respect to the direction of the gravitational force and the current speed of the wheels.

To acquire the robot angle and the angular velocity two sensors are used: an accelerometer (LIS344ALH by ST Microelectronics), that gives the components of the gravitational force along the vertical and horizontal axes of the frame, and a gyroscope (ADXRS150 from Analog Devices), that can directly measure the angular velocity with respect to the wheel axis. In order to reduce the influence of robot's movements sensed by the accelerometer, and to avoid the drift of the gyroscope readings, these two measurements are fused with a Kalman filter. The output of the filter is an estimate of robot's angle and angular velocity that tracks very well the real data.

Tiltone ka ra noise.png

Wheel's speed is obtained by two optical encoders (HEDS-5540 from Agilent) directly attached to the motor rotors, that allow to evaluate the rotor speed and to drive the motors with a closed loop controller.

Robot controller

The robot is controlled by a board built around a STM32 ARM7 Cortex M3 microcontroller by ST Microelectronics.

Tiltone board blocks.png

The microcontroller acquires sensors data, apply a control law and commits a command to the motors. The software running on the ARM is real-time oriented, having periodic tasks constantly running at different frequencies and some interrupt-driven events that can modify the program flow. The board provides also a serial interface to an external PC used to program the microcontroller and a wireless Zigbee module allowing to communicate with the robot

Stability and motion control

We have implemented different algorithms to control the stability of the robot and it's movements. Some of them are based on classical control laws, while others exploit machine learning techniques.

Classical controllers

A classical PID controller has been developed for stability control. A simple P-I controller keeps the robot in vertical position, but it is not robust and can't follow a speed o position setpoint.

A better controller was introduced to enhance robot reaction to external disturbances and to follow speed setpoints. A simplified schema of the controller is presented in the following figure.

Tiltone pid controller.png

  • C1 and C2 are the tilt controllers. C1 is a PI, obtained by root locus analysis of the system, that makes the system stable. While C2 is a PID, obtained studying the bode plot of the system, that improves stability performance.
  • C3 is the speed controller that acts changing the angle setpoint of the tilt controllers (nested PID approach)

Reinforcement Learning approach

Machine learning techniques have been exploited to keep the robot stable. The approach we used is based on offline FQI reinforcement learning algorithms, and some continuous-time variants to smooth robot movements. Basically, the robot is able to learn automatically a control policy (a function, or a lookup table, that maps the state variables to a control action) by an analysis of data collected with random motor commands. The learning process consists in three steps:

  • the robot is controlled by random commands, so it shakes for a while (usually 1-2 seconds) and then falls down
  • collected data is analyzed with a FQI policy search algorithm and a policy is obtained
  • the policy is tested on the robot, and more data is collected to recursively apply the algorithm

The figure on the left shows starting data collected by applying random commands, while on the right the obtained policy to keep the robot vertical is reported.

Tiltone rl space.png Rl policy angle.png

Resources

Thesis

  • Master thesis by Martino Migliavacca (in Italian): "Progetto e realizzazione di una base robotica bilanciante su ruote" (Design and development of a two-wheel balancing platform). Media:TiltOne_tesi_Migliavacca.pdf
  • First level thesis by Andrea Galbiati (in Italian): "Progettazione e realizzazione del controllo di una base robotica bilanciante su ruote" (Control design and implementation for a two-wheel balancing platform). Media:TiltOne_tesi_Galbiati.pdf

YouTube videos

  • tiltOne's first steps


  • tiltOne's Ad


  • tiltOne naughty waiter


  • tiltOne is stable


  • Remote control with joypad


External links

- Inverted pendulum on Wikipedia http://en.wikipedia.org/wiki/Inverted_pendulum

- Matlab tutorial about controlling an inverted pendulum (Modeling, PID, LQR, etc) http://www.engin.umich.edu/group/ctm/examples/pend/invSS.html#lqr