To process the data, start up a Matlab and type
c526

Take a look at c526.m, which loads the data of when the robot was "balancing"
(actually, from when it started to slightly before it crashed).
You can edit c526 to change filtering and the Kalman filter gain which
tries to predict an estimate of the wheel angle that is better than the
one from the accelerometers.
This command script calls regress.m, which adds a additional data, as well
as makes a variety of models using direct regression.
The end of regress.m lists the channels in the ffxxx data files it creates.

Here are the commands I used to make the figures in this directory.

figure(1)
plot(ff000(:,12))
hold
plot(ff000(:,18))
legend('actual wheel velocity','simulated wheel velocity') 
title('actual vs. simulated wheel velocity, based on integrated motor command v-next = 0.96*v + 0.004*u)')


figure(2)
plot(ff000(:,11))
hold
plot(ff000(:,17))
legend('actual wheel angle','simulated wheel angle')      
title('actual vs. simulated wheel angle, based on integrated wheel velocity (angle-next = angle + Ts*angular-velocity)')

figure(3)
[b a] = butter(1,0.2)          
plot(filtfilt(b,a,ff000(:,13)))
hold
plot(ff000(:,4))    
legend('filtered wheel acceleration','command')              
title('Filtered wheel acceleration (filtfilt, butter(1,0.2)) and command')

