Our initial ambitions were to experiment with a balancing robot. We wanted to improve the balancing capabilities (compared to lab session work and previous projects with balancing robots) by doing experiments with different sensors and regulation methods. The addition of an accelerometer, which had not previously been used, should complement the existing balancing capabilities. Furthermore if everything went smooth we would extend the balancing to 2 axis.
The accelerometer, which in theory should yield a more precise output of angle than the gyrosensor, proved to be very sensitive and subject to noise. By introducing a complementary filter we were able to cancel out the noise and still compensate for gyro drift. The work required to solve these problems were more time consuming than expected. But since the accurate sensing of angle is alpha and omega to all balancing experiments this was time well spent.
We were able to produce a balancing robot using the standard segway wheel-regulation method with quite a successful result. The robot is able to keep its balance within a small area for more than 15 seconds. After this time period, the robot seems to start wandering backwards and forwards over increasing distances. This may be due to the physics law of lego, which causes the accelerometer to jiggle out of place. But it may also be the PID constants that can be optimized. Since we did not want to focus solely on this design, we are satisfied with this result. In our experiments with alternate balancing techniques, we found that the physics involved are somewhat more complex than with the "traditional" segway-style.
In the experiment with mass displacement, we experienced Newton's third law in action: When we pushed the mass in one direction, the robot got "pulled" in the opposite direction, and thereby got even more unstable. Besides this, the construction wasn't optimal built, as we could not displace the mass enough for it to have any practical effect on the robot - the angle from which the robot could be recovered was not great enough.
The experiment with the inverted pendulum on top of the robot showed us, that the torque exercised on the robot, by the motor turning the pendulum, made the robot unstable by "pulling" it in the wrong direction. This, and the fact that we now were trying to balance an inverted pendulum with two pivot points, caused that we were not successful in making the robot balance. The PC application and the Bluetooth communication with the NXT proved to be a very useful tool for us. The robot works independently of the Bluetooth communication and the connection is therefore optional. The graphs on the PC GUI give a great understanding of the sensor values and the robot response impact and it has been easy to spot errors, optimizations and wrong signings (-/+) without debug-printing values to the NXT-screen (which is both inconvenient and resource demanding).
If given 2 more weeks to work with our project there are a few things that would be of interest.
As it is now the robot (traditional segway) is not balancing completely perfect and a way to improve the performance is by tuning the PID parameters. The tuning of these would require some time of precise work and focus; time we did not want to spend during the project but that would improve the balancing capabilities. Also since we based our physical construction of the robot upon a 3rd party project, it could be interesting to experiment with other robot constructions - ex. changing center of gravity by making a taller robot or/and by placing some weight on either side of the robot.
Since we did not succeed in getting any of the alternate balancing techniques to balance properly it would be valuable to scratch a little deeper into the surface of how mass displacement works. The physical construction of the robot and the mass displacement mechanism, could be optimized to improve performance on these techniques.
We had to give up on the idea of constructing a 2-axis balancing robot because of the time spend to implement the accelerometer and compensate for gyro drift. Even though it was our initial hope, it would only be possible if everything else went smoothly. And as it allways is, it didn't. But when looking at the ground we have covered during our project, we are very satisfied with the end result.