Fall Detection
Fall detection for pendants and smartwatches, running nonstop on a battery-powered microcontroller. We trained three kinds of recurrent network to spot the free fall, impact and stillness of a fall, and in 60 training runs, every one caught every simulated test fall without a single false alarm.
- training runs that caught every simulated test fall, with zero false alarms
- 60 of 60
- readings on average between a fall starting and the alert
- 0.0
- parameters in the smallest network, the plain RNN
- 337
- of weights for the largest network, the LSTM
- Under 6 KB
Where it's used
Always on, always watching
Fall-detection pendants and smartwatch fall alerts protect older and at-risk people who live alone. The device watches a live accelerometer stream around the clock, on battery power, and has to decide by itself whether what just happened was a real fall worth raising the alarm for.
A fall isn’t one moment. It’s a brief free fall, a sharp impact, and then a person who doesn’t get up normally. Telling that apart from a device dropped on a table means remembering the free fall once the impact arrives, then watching for unusual stillness long after. That’s a job for a network with memory.
- Fall-detection pendants that raise the alarm on their own
- Smartwatch fall alerts for people who live alone
- Private by design: only the alert ever leaves the device
The data
Simulated falls in everyday motion
Every training and test sequence is simulated on the fly, so nothing the network is tested on was ever seen in training. Each one is 150 accelerometer readings of everyday motion, and half of them have a fall spliced in at a random moment.
- Everyday motion
- gentle, noisy movement, with gravity holding the total near 1 g
- Free fall
- 5 to 8 readings of near weightlessness, the total dropping toward 0 g
- Impact
- a sharp spike lasting a reading or two
- Stillness
- the rest of the sequence lying still, turned to a new orientation
How we built it
Three networks, one job
Our library has three kinds of recurrent layer, and we trained each one on the identical task. All three read one accelerometer sample at a time, carry what they’ve seen forward to the next, and give a fall probability at every step.
Plain RNN train_rnn.c
One hidden state, passed through tanh at every step. The simplest of the three, and the fastest to train.
337 parameters
GRU train_gru.c
Reset and update gates decide how much of the hidden state to keep at each step, for about three times the parameters of the RNN.
977 parameters
LSTM train_lstm.c
A hidden state plus a separately gated cell state, built to hold on to a signal over long gaps.
1,297 parameters
We kept the safest model, not just the lowest-error one. After each round of training we counted missed falls and false alarms on 200 validation sequences and kept the round with the fewest. Choosing on error alone would have kept a false-alarming model in up to 10 of 60 runs. Choosing on mistakes kept none.
Results
Every fall caught, no false alarms
We trained and tested each network 20 times, from a fresh random start each time. All 60 trained models caught all 50 simulated test falls, raised no false alarms on 50 normal sequences, and flagged each fall the moment it began.
| Network | Parameters | Runs with every fall caught, no false alarms | Reading-by-reading accuracy | Training rounds |
|---|---|---|---|---|
| Plain RNN | 337 | 20 of 20 | 100.00% | 34 |
| GRU | 977 | 20 of 20 | 100.00% | 99 |
| LSTM | 1,297 | 20 of 20 | 99.79% | 41 |
Accuracy and training rounds are medians over each network’s 20 runs. Every run of every network trained in under 6 seconds on a desktop.
Which one to pick
For this job the plain RNN is enough, and it trains fastest, in a median of 34 rounds. The GRU is the most exact reading by reading, at 100.00% in 18 of 20 runs, but takes the longest to train. The LSTM lands in between. What a wearer would actually notice is a missed fall or a false alarm, and all three were perfect on both.
On the device
Light enough for a battery-powered pendant
The firmware loop is one call per accelerometer reading. Hand the network the three axes and raise an alert when its output crosses the threshold. The network keeps its own memory between readings, so the firmware stores nothing but the model itself.
Even the largest of the three, the LSTM, is under 6 KB of weights, and each reading costs one small recurrent step. Our tools can also convert a trained model to 8-bit integers and to a format that runs straight out of flash.
- parameters, depending on the network
- 337 to 1,297
- of weights for the largest, the LSTM
- Under 6 KB
- to the network per accelerometer reading
- 1 call
- the one thing that ever leaves the device
- Alert only
Ready to build your next intelligent device?
Let's discuss your project and how Cole Design & Development can bring your idea to life.
Founded in 2008 · Hudson, Ohio · info@coledd.com