Max’s Status report for 4/18

This week I worked with Jacob and Soejong on porting/integrating the SVM to the RPi and separately worked with Nick on getting a mobile Bluetooth app online.

The SVM is running nicely on the phone and seems to be working as expected with the IMU data — I have it reporting results in realtime over Bluetooth to the generic Bluetooth serial terminal app from before. Before running in realtime, I determined that each inference takes about 13ms which is well within acceptable bounds — right now, we’re checking a 1s window once a second. Determining power draw/battery life probably won’t happen since our battery has disappeared (somewhere in mail system, not on route to me), but I might be able to work something out.

On the app front, I was able to run an older, native version of Nick’s app, so he has a working environment. That uses a native library, so the biggest hurdle (getting arbitrary native code working) is done.

Max’s Status Report for 4/11

This week (and weekend) I spent far too long trying to get a simple Bluetooth app working. Some combination of my unfamiliarity with the Android ecosystem, Java, Javascript, JSX, and the toolchains used to work with all of those led to a lot of time and no real progress. I asked Nick to take a look at it, but the environment he’s been using (Expo) doesn’t seem to be compatible with the sort of device-native code needed by the various Bluetooth approaches I’ve tried.

In order to make real progress, I’ll ignore that for now (other than working with Nick as needed) and get to running the SVM on device — that should be much smoother.

Sojeong’s Status Update for 4/11/2020

This week, I worked on calculating the accuracy of the fall detection algorithm for different combinations of features. These values will help us choose the best feature combination to use, and we will also include these in our final paper to compare different features that we tried. To calculate the accuracy, I used one csv file from our data set and trained the SVM with the remaining files, and repeated this for all the files. The accuracy is calculated by dividing the number of true positives and true negatives by the total number of trials. Below is a table of the accuracy for each feature combination.

magnitude, change in angle (x, y, z)

85.976

magnitude, change in z-angle

96.895

magnitude

93.651

change in z-angle

23.034

Although the accuracy of the algorithm with magnitude and change in z-angle as features is high, there were number of false negatives, so I will look into adding new features that could reduce this number. I will also continue the integration with the RPi next week.

In terms of schedule, we are on time.

Nick’s Status Report for 4/11/2020

This week I wrapped up on implementing the three major functionalities that I was working on last week. After I received feedback during the interim demo on the mobile application, I adjust them accordingly. Currently, I am trying to find a way to send an SMS text message without the app switches to the SMS application. For next week, Max and I will focus on integrating the app and RPi using a library module that Max found. Current progress is on time, and we are looking forward to completing our project promptly.

Jacob Hoffman 4/11 Status Update

This week, our group demoed our current progress.

After the demo, I started work on integration of the machine learning algorithm with the Raspberry Pi, Max, Sojeong, and I started discussing how max would like the inputs and outputs of our code to be presented, so that when he runs our code on the Pi, his code can interface with our code.

Jacob Hoffman 4/4 Status update

This week, I collected data with the dummy. I collected 30 minutes of walking data, 30 minutes of falling data, and 30 minutes of sitting data. I then had to label the data. As well, I worked on plotting frequency features of falls. I noticed the frequency wavelet plots of fall segments had a specific appearance indicating these features will be beneficial.

Max’s Status Report for 4/4

This week I brought up a fairly robust simple two-way messaging system between an Android phone and the device. This has error handling and retry logic to make sure that it doesn’t get confused/softlocked due to a flaky connection — having a means to power cycle it without pulling the plug or sshing in is nice.

This was all done on the device’s end; I used an existing app for the Bluetooth serial handling on the phone. This upcoming week, I’ll work on a basic React Native app to work as an example receiving end of the interface in lieu of directly integrating with Nick’s work.

In parallel, I’ll work to get the fall detection SVM running on the RPi. this shouldn’t take much effort, but it may reveal performance issues. If all goes well, I should be able to get the realtime detection working on the IMU data and/or record data to test.

Nick’s Status Report for 4/4/2020

This week I set up all the UI pages that we planned for the mobile application by using the NavigationContainer library module. I mainly focused on implementing three major functionalities for the applications; save/delete contacts, timer, and geolocation. As React Native supports both platforms iOS and Android, I had to confirm newly added modules and functionalities work for both platforms. For next week, we are expecting to work on integration with hardware before the final demo.

Sojeong’s Status Report for 4/4/2020

This week I worked on adding new features and developing a visual interface for the fall detection. For the new features, instead of using the raw phase values, I tried using changes in phase. This way, the orientation of the device does not affect the phase values. After combining the change in phase with the magnitude, the algorithm now accurately categorizes jumping and running activities as non-falls. Also, I combined Jacob’s frequency features and tested the algorithm, but the frequency features did not improve the accuracy of the algorithm. Jacob will work on changing the frequency features so that they improve the accuracy of the algorithm.

The visual interface is implemented for the demo next week. Because we currently do not have our components integrated, I thought that it would be useful to visualize the fall detection to make it easier to demonstrate that the algorithm works. When the program runs, it shows the graph of the input acceleration data, and a rectangle with a size of our sliding window moves through the graph and displays the algorithm’s prediction for each window.

I also collected some fall and non-fall data to compare them with the dummy data that Jacob is collecting. From previous data collection, I held my phone on my hand but this time I placed my phone in my pocket to include noises and  possible orientation changes of the device in the pocket.

Next week, I will send the SVM program to Max and we will try integrating the fall detection and raspberry pi components. We will have to check how long it takes for the algorithm to run on the pi and improve the running time if it takes too long. If the algorithm takes too long to run, I will try reducing the feature size. Currently, the size of the feature array for each sliding window is 20: 10 for magnitudes and 10 for phase changes. If I only use the maximum values of each features, I can reduce the size to 2 per window, which will decrease the run time for a large train data.

Sojeong’s Status Report for 3/28/2020

This week I worked on combining the magnitudes and angles of the accelerations as input features to the SVM. At first, I tried inputting them as tuples, but the SVM did not support inputs with dimensions greater than two. Instead of using them as tuples, I appended the angle values after the magnitudes. Now that I have three different combinations of input features (magnitudes, angles, magnitude & angles), I compared the accuracy of each of the features. I randomly chose a test data, then trained the model with the remaining data and counted the number of false positives and false negatives. When the angles were used, there were no false negatives but false positive rate was high and detected all normal activities as falls. This was unexpected because the graphs of the angles showed large differences between the falls and non-falls. However, because using magnitudes as the only feature still provides accurate results, the low accuracy of angle features is not a big problem.

Next week, I am planning to add a visual component to the fall detection algorithm so that it is easier to demonstrate that the algorithm works. I will write a program that graphs the inputs and shows when a fall is detected. I will also get dummy data from Jacob next week and make sure that the algorithm works accurately with his data.