Developing a Device to Predict Autistic Meltdowns

Summary

Because effects of autism such as seizures and meltdowns are highly unpredictable, it is important to design a way to predict, track, and analyze these outbursts. The project involves building a prototype of a wearable, wrist device that tracks users’ heart rates in order to predict a meltdown in advance. I’ve seen the blatant need for a predictive device for autism-induced meltdowns firsthand, while tutoring students with siblings who have severe autistic disabilities, and my goal was to build something that would surpass the reliability and accuracy of current outbreak-tracking devices.

I used three circuit boards including the Arduino Uno, HC-05 Bluetooth module, and Pulse Sensor Amped, each serving as a different aspect of the device's function. Once the data, gathered from peers and online data sources, is collected through the pulse sensor and transferred to an application on an external device via Bluetooth, it is analyzed through several methods and mathematical tools for inconsistencies and possible meltdown signals, such as sudden dips and spikes. The program incorporates information from past biometric measurements and currently-streaming data to determine whether a meltdown is likely to occur soon.

With my wearable, effects of autism can be predicted, deferred, and potentially prevented. I successfully built a prototype that can predict meltdowns with high accuracy and alert someone to take precautions. For the future, I wish to add more detectors for oncoming meltdowns, such as sensors for galvanic skin response, body temperature, and anxiety levels to the device to further increase its accuracy.

Question / Proposal

Autism spectrum disorder, more commonly known as autism, is a complex developmental disability often associated with social, behavioral, speech, and learning challenges. In the United States, this condition affects around one in every 68 children; therefore autism is considered to be quite common. Sudden outbreaks and meltdowns can happen frequently as a result of this condition, and occur when there is an overwhelming, uncontrollable buildup of emotions and events throughout a time period.

As effects of autism such as seizures and meltdowns can be highly unpredictable, it is of importance to design a way to predict, track, and analyze these outbursts. The purpose of this project is to build a wearable, removable, wrist device that tracks the heart rate of users in order to predict a user’s meltdown in advance, and also to discover possible patterns in results. My goal at the end of this project was to answer the following proposed question: Does this device have the potential to be effective enough to improve the lives of autistic children in a meaningful way, and can I increase the level/percentage of accuracy of current outbreak-tracking devices? I hypothesize that this device is effective enough to be used in real-life scenarios, and will be able to predict meltdowns with higher accuracy.

Research

While researching the patterns of an autistic child's heart rate versus a neurotypical's heart rate in various scenarios, I discovered, as predicted, that heart rate is steady during a non-meltdown time, but the average rate is higher than that of a neurotypical. When a meltdown is approaching, the heart rate spikes and increases rapidly, before it reaches the peak, which is the time of the meltdown/seizure. I also came across a study that compared autistic children’s heart rates with neurotypicals’ heart rates while the children were performing the exact same activities with the same constraints. This demonstrated that it is possible to build an approximate function equating the heart rates of two different types of people. I applied this research to model autistic heart rate, and created a function so I could input my own heart rate and output approximate autistic heart rate values. This, in addition to data I had retrieved from certified sources, served as a basis for my analysis process and detection of a meltdown.

Another study I researched from the National Survey of Children’s Health shows that the children who have a delayed reflex also have differences in several other autonomic nervous system functions. For instance, they have higher heart rates than controls do. Many of them also show marked improvement in their behavior when they have a fever, and many walk on their toes and are hypersensitive to sensory stimulation. These children tend to look intently, avoid light and act anxious when lifted off the ground. All of these symptoms indicate that a subset of children with autism have impairments in their autonomic nervous system, which is a trigger for autistic seizures.

There are a few products meant to track and notify a parent of excessive heart rate when a child is sleeping. A particular parent, whose child had first inspired me to create my product, described and showed me a thick layer of heart rate sensor film laid on top of her child’s bed at night, and it was supposed to detect the child’s heartbeat function as she slept. However, the main issue with this machine was its sensitivity; any slight movement of the daughter’s body triggered alarms and the mother was notified every few minutes.

Fitness devices, like an Apple Watch or FitBit, also track heart rate and keep a log. Using similar logic as these two products, my project incorporates this aspect, but also makes sense of the data. In other words, the devices above only keep a record, but the owner of the data is the person that can interpret it. My prototype also analyzes the data for possible anomalies, inconsistencies, and other indicators of a meltdown, and sends out a push notification so that the situation can be properly addressed. This is a very valuable factor, and allows for meltdowns to be detected.

 

Method / Testing and Redesign

Initially, I worked with smaller, rounder circuit boards: the Adafruit FLORA and FLORA Bluetooth Low Energy boards, in the hopes of making my product more watch-like. However, this did not go as planned because I discovered that a classic Bluetooth connection would be the better option. This is because Bluetooth Classic is much more effective over short distances, and thus, transferring data over Bluetooth Low Energy would be more time-consuming. I predicted that the device would be utilized over shorter distances i.e. the child would under supervision. Therefore, I switched my plan over from the FLORA-based boards to the more widely-recognized Arduino UNO. 

I configured the Arduino Uno and HC-05 boards so they could work together, and connected Pulse Sensor Amped to the two boards and programming for heart rate in the Arduino IDE. I then coded the data transfer methods in order to send heartbeat data to an outside source using Bluetooth for analyzation. Lastly, I thoroughly analyzed my data to check for anomalies and discrepancies to send an alert to an external mobile device. A useful feature I added was a visual interface for easy viewing via the IDE Processing. To ensure that my device was accurate, I tested it on multiple individuals, and found and graphed their heart rates over several different periods of time. I recorded and noted their heart rate doing differnet stages: resting heart rate, increasing heart rate, heart rate during physical activity, and decreasing heart rate. As a subcategory of physical activity, the participants performed various physical activities such as walking, running, jumping rope, and stretching, so I could collect their heart rate data over multiple scenarios and have different means of comparison. In this attachment, I have displayed the full circuitry of the boards.

Attached are four graphs detailing separate stages of the testing process: resting heart rate, increasing heart rate, heart rate during physical activity, and decreasing heart rate. The graphs display an average person’s statistics. Because the heart rate data collected fell into an appropriate human range, I concluded that my heart rate monitor functioned correctly.

As part of the data analysis, the following were calculated: the number of beats per minute (BPM), the mean distance of intervals between heartbeats (inter-beat interval, or IBI), the standard deviation of intervals between heartbeats (SDNN), the standard deviation of successive difference between R-R (where R denotes a raw signal peak) intervals (SDSD), and the root mean square of successive differences between adjacent R-R intervals. Taking into account nuanced measures such as these allows for heart rate variability due to athletics or increased physical activity to not be misidentified as a pre-meltdown symptom, and for outliers in an otherwise ordinary signal (rejected peaks) to be weighted less. 

Results

The goal of this project was to build a wearable device that tracks and records heartrate to predict and notify of when a likely outburst could occur. While the sensor constantly recorded heartrate, the HC-05 Bluetooth module simultaneously sent the data to a mobile application via a Bluetooth connection. With this app, parents were able to view data of heartbeat and track their child’s heartrate. In the Arduino program, a certain “normal” heart beat range was determined, personalized to each device user. If detected heartbeats began to increases too rapidly in a short period of time or go abnormally above or below that range, a push notification was sent, warning a parent of a potential meltdown. This feature allowed the parent to be promptly informed, perhaps allowing for improved and increased help to be taken, whether they were within close proximity of the child or not. 

As part of the data analysis, the following were calculated: the number of beats per minute (BPM), the mean distance of intervals between heartbeats (inter-beat interval, or IBI), the standard deviation of intervals between heartbeats (SDNN), the standard deviation of successive difference between R-R (where R denotes a raw signal peaky) intervals (SDSD), and the root mean square of successive differences between adjacent R-R intervals. Taking into account nuanced measures such as these allows for heart rate variability due to athletics or increased physical activity to not be misidentified as a pre-meltdown symptom, and for outliers in an otherwise ordinary signal (rejected peaks) to be weighted less. The series of images attached displays the process for gathering information and detecting potential signals for a meltdown. R-R intervals do not change abruptly per heartbeat in people without autism, but vary over time in a sine-wave like pattern. The frequencies that make up this pattern would likely differ for autistic children facing an oncoming meltdown. Please see the attached document for specifics and explanations of these mathematical measures.

BPM 58.9239965841
IBI 1018.26086957
SDNN 65.4517528189
SDSD 32.9913587484
RMSSD 63.7466576664
NN20 [40.0, 30.0, 50.0, 40.0, 110.0, 70.0, 70.0, 120.0, 80.0, 30.0, 110.0, 30.0, 30.0, 90.0, 80.0, 50.0, 80.0, 30.0]
NN50 [110.0, 70.0, 70.0, 120.0, 80.0, 110.0, 90.0, 80.0, 80.0]
PNN20 0.8181818181818182
PNN50 0.4090909090909091
LF 38.8196443462
HF 47.7899270096
LF/HF 0.812297627874

 

I found that overall, my autistic heart rate sensor yielded about a 90% accuracy rate, while storebought, commercialized products ranged from 60-70%. I also created a Microsoft Azure Anomaly Detection Model to more easily display the data and analysis procedures to parents. By writing a biometric data analysis model in Microsoft Azure, I was able to detect anomalies in data sets for heartrate, galvanic skin response, and temperature. These graphs and tables display the probabilities of an anomaly using these three biometric factors. With autistic data, it would be possible to detect anomalies through this model to predict an oncoming meltdown.

Conclusion

As inputs to my predictive model, I coded calculations for several measurements involving number of beats per minute (BPM), inter-beat-interval (IBI), differences in raw signal peaks, etc. with standard deviations, arithmetic functions, and numerous other mathematical measures. These inputs enabled my model, and by extension my device, to be more reliable and effective. By comparing my data gathered from peers, publically available biometric data, and, for the purposes of testing my predictive and anomaly detection models, simulated data. I successfully constructed and integrated software and hardware that predicts to-be-anomalous heart rates ahead of time.

I also built anomaly detection models for other biometric measures (galvanic skin response, body temperature, anxiety levels, etc.), for which sensors are integrated into the hardware app. Effects of autism can be predicted, deferred, and potentially prevented through use of this wearable. I found that my device predicted meltdowns in advance correctly almost 90% of the time for children with severe cases of autism, which is significantly higher than that of current models, which have an accuracy of about 60-70%. My goal was to improve accuracy of a predictive device, and I achieved the expected outcome! This device can be utilized in real life, and would yield accurate results.

Detecting meltdowns and taking precautions in advance would save stress and ensure safety. My wearable device predicts, notifies, and potentially prevents autistic seizures with high accuracy - something modern technology hasn’t yet fully accomplished. I definitely want to keep building on this idea, condensing it, and making it as applicable as possible. The idea of my device potentially and hopefully aiding children in the future is amazing.

Current limitations of my model include the lack of heartrate data on autistic children, so that I may understand the relative importances of these measures in combination with factors such as age, body size, etc. in causing prolonged heartrate variability during breakdowns. I believe that if I acquire real-time data from researchers, I would be able to expand my project on a larger scale. For the future, I really want to add more sensors on the device for galvanic skin response and anxiety levels to accurize the results even further. 

About me

I am a freshman at Milton High School, GA, and am extremely passionate about utilizing computer science to solve complex challenging problems, test theoretical ideas, and create something better, more creative, and more innovative through engineering and iteration. I am an avid pianist, and have been playing for almost nine years! Math has been a part of me ever since I can remember, and I love competitive problem-solving. I was honored to represent Georgia at National MATHCOUNTS in May 2018!

My past project, Communicable Disease Spread Simulation (CDSS), models the spread of an unpredictable disease visually and allows for the data underlying it to be efficiently stored. By applying a set of rules, one can discover the growth of diseases over a certain time period and compare speeds and severities. This inspiration guided me to other projects and ideas, most notably, "Developing a Device to Predict Autistic Meltdowns". I had the amazing opportunity of presenting my work at the National Broadcom MASTERS! 

I am passionate about using AI to propose accessibility tech solutions – building devices and experiences for the impaired, stemming from my project on predicting autistic meltdowns. I want to pursue data science to continually experience the thrill of deriving meaningful insights from signals, and also greatly value helping others, so I hope to combine my technological passions with my inner values. Technology’s greatest asset is its ability to help people on a massive scale, and I will passionately work to build and code for this purpose. 

 

 

Health & Safety

Since my project only used circuit boards and electronics (no potentially dangerous chemicals, substances, and materials), there was not a specific safety protocol I referred to. As I did conduct human participants in my research and data collection, I ensured that my product was safe for all kids to use. To prevent side effects of shocks and stings from the board, I carefully wrapped it in cloth before applying it on the participant and gently securing it.

Bibliography, references, and acknowledgements

Throughout the course of this project, I received help and advice from various wonderful people, including my science fair and project sponsor, Julie Godfrey. She encouraged my idea and promptly responded to all my non-technical questions. She also helped me keep up with my log book, which was very helpful. I also want to thank my family, especially my older sister, who was always ready to talk to me and answer any questions I had. Lastly, I am grateful to the parents and kids whom I tested my device upon. Everyone was very considerate and open to letting their children experiment with my device. They were happy that they would be contributing to my research!

Below is a list of extremely helpful YouTube videos, articles, and websites that taught me how to work with and create a product using hardware, as well as the patterns of heart rate in children with autism. In the past, I had been exposed to only software to code, present, and create online tools. My project helped me to experiment beyond my comfort zone and try something new! I gained so much knowledge from these purposeful resources, and have learned countless things along the way, from how to put circuit boards together to transferring data over a Bluetooth connection to be further processed and analyzed.

[1] http://prd-medweb-cdn.s3.amazonaws.com/documents/sleepinautism/files/Research%20and%20Publications/Harder_HRV%20during%20sleep%20in%20children%20with%20ASD.pdf

Title: Heart rate variability during sleep in children with autism spectrum disorder, Author: René Harder + 10 more, Date written: 26 July 2016

[2] https://www.e-sciencecentral.org/articles/SC000015830

Title: The Difference in Heart Rate Change between Temporal and Frontal Lobe Seizures during Peri-ictal Period, Author: Woo Hyun Son + 9 more, Date written: 30 June 2016

The heart rate (HR) is one of the most easy way to detect autonomic activity. The autonomic system (parasympathetic and sympathetic systems) has a major role to maintain homeostasisHeart rate change is frequently seen in autistic seizures, for example, ictal tachycardia and ictal bradycardia. Ictal tachycardia is defined as the occurrence of sinus tachycardia around the onset of ictal discharges.1 The prevalence of ictal tachycardia is very common (80–100%).2–5 It occurs more frequently in seizures with temporal lobe origin, 6, 7 especially with mesial temporal lobe onset.6,8 Ictal bradycardia is less frequent than ictal tachycardia; the prevalence has been calculated as ranging from 2.1% to 25.5%.4,9 It is most prevalent in seizures of the temporal lobe origin,9,10 and has a stronger association with bilateral hemispheric seizures.

[3] https://www.youtube.com/watch?v=LN8fBh7LH9k

This video helped me to learn the basics and the outline of the countless functions in Android studio, as well as how to make a basic, functioning app.

[4] https://www.youtube.com/watch?v=u5Gj-_ifxUo

[5] https://www.spectrumnews.org/news/study-links-pupillary-reflex-heart-rate-in-autism/

[6] https://www.youtube.com/watch?v=fJeE8-iKLkg

[7] https://www.youtube.com/watch?v=eYn9XzNepLQ

[8] https://www.youtube.com/watch?v=UTA0Fkwx1Vo

[9] https://developer.android.com/guide/topics/connectivity/bluetooth

This is an Android guide reviewing the basics of a Bluetooth connection and how to establish one from a circuit board. The Android platform includes support for the Bluetooth network stack, which allows a device to wirelessly exchange data with other Bluetooth devices. The application framework provides access to the Bluetooth functionality through the Android Bluetooth APIs. These APIs let applications wirelessly connect to other Bluetooth devices, enabling point-to-point and multipoint wireless features.

[10] https://developer.android.com/guide/topics/ui/notifiers/notifications

This is an Android guide reviewing the basics of how to set up, create, and send your own push notification. A notification is a message that Android displays outside your app's UI to provide the user with reminders, communication from other people, or other timely information from your app. Users can tap the notification to open your app or take an action directly from the notification.

[11] https://www.spectrumnews.org/news/national-surveys-estimate-u-s-autism-prevalence-1-40/

This article discussed the prevalence of autism per state, and resulted in an average 1/40 rate, which is continuing to increase.

[12] Music from Conclusion video: https://www.youtube.com/watch?v=WKGonBhZicI