Inspiration
What it does
How we built it
Challenges we ran into
Accomplishments that we're proud of
What we learnedInspiration
Fitness trackers like Fitbit or Apple Watch cost hundreds of dollars and are black boxes — you have no idea what's happening inside. We wanted to build one from scratch using nothing but a smartphone and MATLAB, and actually understand every step of the process. The idea of turning raw phone sensor data into something meaningful — like "you burned half a Whopper today" — felt both technically interesting and genuinely fun to present.
What it does MathRiders is a smartphone-based fitness tracker that collects accelerometer data via MATLAB Mobile and uses a machine learning model to classify physical activity in real time: sitting, walking, running, climbing stairs, or descending stairs. Based on the predicted activity, it estimates the number of steps taken (using GPS data) and calories burned (using MET values and body weight). Results are presented per participant and expressed in an intuitive unit: Whopper equivalents (1 Whopper = 765 kcal).
How we built it We collected labeled accelerometer data from 3 participants across 5 activity types — 15 recording sessions in total — using MATLAB Mobile in Log mode, which automatically synced the .mat files to MATLAB Drive. In MATLAB Online, we preprocessed and labeled each session, combined all data into a single table, and trained multiple classifiers using the Classification Learner App. The best-performing model was exported and applied to new sessions to predict activity labels. Step counts were calculated from GPS latitude/longitude data using Earth's circumference, and calories were estimated using the standard MET formula. Everything was developed and run entirely within the MathWorks ecosystem.
Challenges we ran into The biggest challenge was distinguishing stairs up from stairs down — the acceleration signals look surprisingly similar, and the model initially confused them frequently. We also ran into GPS reliability issues indoors (during stair sessions), which made distance-based step counting unreliable for those activities, so we had to fall back to a peak-detection approach for stairs. Synchronizing data across three different phones with slightly different sampling behaviors also required extra cleaning steps we hadn't anticipated.
Accomplishments that we're proud of We're proud that the classifier generalizes across three different participants with different body types, stride lengths, and phone-carrying habits — without any per-person tuning. Getting stairs up and stairs down as separate classes (rather than lumping them together) was a deliberate design choice that paid off. We're also proud of the Whopper comparison: it sounds like a joke but it genuinely makes the output more understandable to anyone, which is exactly the point of a good fitness tracker.
What we learned We learned how much signal there is in a simple 3-axis accelerometer — and how much noise. Feature engineering matters enormously for time-series classification, and raw X/Y/Z values alone are only the starting point. We also learned that collecting clean, consistent labeled data is harder than training the model itself. MATLAB's Classification Learner App made model comparison fast, but understanding why one model outperforms another required digging into the confusion matrices carefully.
What's next for MathRiders We want to add real-time streaming classification using MATLAB Mobile's Stream mode, so the activity label and calorie counter update live during a workout. We'd also like to incorporate angular velocity data from the gyroscope to better separate stair directions, and experiment with simple feature extraction (signal magnitude, variance, zero-crossing rate) to improve overall accuracy. Longer term, personalizing the MET values based on heart rate data — or even training a separate model per participant — could make the calorie estimates significantly more accurate.