The robot has two light sensors downward that distinguish between light and dark surfaces. We use the output of each sensor to determine the speed of each wheel. If the robot detects a light surface the set speed is high while if the surface is dark the set speed is low. This operation allows to simulate the speed change of an electromagnetic wave that goes from an object with low refractive index (simulated with the light surface) to an object with high refractive index (simulated with the dark surface). When the light sensors detect the crossing, the speed of the drive wheel changes and then the direction of the robot deviates in agreement with Snell law. Our control goal is to keep the speed of each drive wheel to a constant value, hight or low.
This experiment was shown with ISC of Florence CNR at «Laboratorio - guardare oltre il visibile -» of Genova Science Festival 2010 from October 29 to November 7 2010.
Control of a tricycle with differential drive
Abstract: This script explains the control of a tricycle with differential drive at a constant speed. The control's goal is to optimize the step response. We measure the angular position of the wheels drive with two rotary encoders with a resolution of 1/360 deg, so the measures are affected by a quite big quantization error. In order to obtain a good result we follow these steps: we identify the system with output error method; we filter the measures with a first order filter; we control the system with a PID controller; we control if the simulation results agree with the real measures; we try to improve the step response speed with a direct synthesis controller; finally we compare the results of the two controller choosing the best.
Video 1-2: Lego Mindstorm robot simulates a ray light through a lens.
Video 3: Lego Mindstorm robot simulates a ray light through a prism.
Video 4: Lego Mindstorm robot simulates the total internal reflection in a prism.