Journal of Software Engineering and Applications
Vol.11 No.02(2018), Article ID:82471,11 pages
10.4236/jsea.2018.112006

Smartphone Based Cervical Spine Stress Prevention

Harsh Gupta

Computer Science Department, Modern School, New Delhi, India

Copyright © 2018 by author and Scientific Research Publishing Inc.

This work is licensed under the Creative Commons Attribution International License (CC BY 4.0).

http://creativecommons.org/licenses/by/4.0/

Received: January 12, 2018; Accepted: February 10, 2018; Published: February 13, 2018

ABSTRACT

Rapidly increasing smartphone usage has resulted in an increasingly adverse impact on the health of people. Cervical Spine Stress and the risk of Thoracic Kyphosis have been accentuated due to inappropriate posture. Existing efforts to solve this problem require the use of expensive wearable devices or can only be implemented on selected smartphones. This paper has proposed a novel posture detecting mechanism which does not require any external devices and can be implemented inexpensively on all smartphones. The solution has utilized the built-in 3-dimensional accelerometer of the smartphone and provided an Android Operating System-based application as a proof of concept that determines the Cervical Spine posture and generates ALERTS when necessary. In addition, data of the posture could be displayed in form of graphs to make the user aware of his or her posture trend throughout the week. The application can be extended to different operating systems.

Keywords:

Cervical Spine, Android, Posture, Accelerometer, Sensors

1. Introduction

There are an estimated 4.77 billion mobile phone users in the world as of 2017. This number is expected to grow to 5.07 billion by 2019 [1] . Many useful services are now implemented on smartphones and the number of such applications is continuously increasing. Consequently, smartphones have become multi-utility devices that are utilized for many functions besides the basic function of communication and are therefore being operated for prolonged periods of time. The extended and frequent usage brings with it health risks associated with physical stresses imposed on the users of these devices when incorrect body postures are adopted while operating these devices. A large number of patients exhibiting such health problems have familiarized medical practitioners with these issues and considerable research has been conducted in analyzing and understanding the underlying causes and finding solutions. Most smartphone users, however, remain unaware of these health risks. Creating awareness and educating the extremely large and increasing number of users on these health concerns is a challenging proposition that is difficult to be effectively implemented. It is therefore necessary to find a more practical solution.

The basic health problem related to smartphone’s usage relates to Cervical Spine Stress arising from the prolonged declination of the neck while viewing the screen of the smartphone. A ground-breaking study by Kenneth K. Hansraj, Chief of Spine Surgery, New York Spine Surgery and Rehabilitation Medicine revealed that while the standard weight applied on the spinal cord is normally 10 - 12 lbs. when the Cervical Spine is colinear with the spinal cord it rises steeply to 60 lbs. when the user’s neck is declined at 60 degrees from the body’s longitudinal axis [2] . The Cervical Spine connects the Spinal cord to the brain and is a crucial pathway for carrying signals between the brain and the rest of the body. These signals control almost all the bodily functions and hence any damage to this area can result in a condition termed in Text Neck and cause very serious health damage. In extreme conditions, the debility can develop into extreme curvature of the upper portion of the spinal cord, known as Kyphosis [3] . Kyphosis is a severe spinal affliction that can cause hindrance in even daily activities. Various studies have shown that tilted or hunched back posture leading to less energy level and known to affect depression or happiness levels [4] . Children and senior citizens are most vulnerable owing to their weaker cervical musculature.

2. Related Work

Several attempts have been made to solve aforementioned problem. Most solutions have required using devices that are externally attached on the body [5] . Some scholars have also used the smartphone’s built-in accelerometer to gather data and monitor activity of a senior citizen to prevent falling, stumbling et cetera [6] . Smartphone approaches make use of applications (known as “apps”) to improve the user’s posture. Most solutions have used external wearable devices to track daily activity. A. Hermanis et al. gave a Wearable Posture Monitoring System with Biofeedback via smartphone. All the features were in real time; however, the ease-of-use and comfort are significantly reduced [7] . Similarly, Monitoring for Context Awareness in Mobile Computing by J. Baek and J. Yun used smartphone’s sensors to account for the posture and an external device too. The application of the sensors was limited to the postures like sitting, standing, walking only. The study was comprehensive but lacked a proper notification or warning mechanism [8] . Another study by Hosub Lee et al. used an orientation sensor and the front camera of a smartphone to monitor the posture of the human body [9] . The drawback lied in the usage of two internal sensors of the smartphone―the triaxial Accelerometer and Magnetic Sensor (compass) to get the orientation of the phone (in Degrees) through an Android library function: TYPE_ORIENTATION. Unfortunately, this function is now deprecated and cannot be used [10] . If the new function, .getOrientation is called in its place, no value is returned if the magnetic sensor is not found. This is a major drawback that limits the use of the application as it will fail to work in smartphones that lack a magnetic sensor. Moreover, the research proposed that to check if the user is actually using the phone, their application, Smart Pose, periodically checks the face of the user from captured images by the front camera. To capture images using the front camera, however, is not possible or ethically within the limits of Android Development without running the app in real time. In another implementation Worawat Lawanont et al. suggest different techniques to utilize face feature detection for calculating the tilt angle of the user’s neck. These techniques also require Accelerometer and Magnetic Field sensor data to find the neck angle, by finding the Phone’s tilt angle and face angle [11] . However, the limitation lies in the number of sensors employed. Moreover, the solution lacks a proper alert system. The application may also not work reliably due to the disparity between the quality of smartphone cameras today.

This research paper presets Spined which overcomes most of the limitations. This ability makes it extremely useful as it can run on low-end smartphones too. Spined directly converts the raw data from the built-in triaxial accelerometer into useful values which are analyzed to monitor the users’ posture. A notification is provided to the user automatically whenever the neck posture is determined to be incorrect with the notification indicating the severity of the incorrect posture. The notification is removed automatically when the posture is corrected.

3. Method and Algorithm

3.1. The Mechanism

After the application is installed on the smartphone and started by the user, it runs in the background, barring the exceptions mentioned in Section 3.5. The application has been optimized in a way that it fetches minimal energy and stops running at extremely low battery (<5). The flowchart explaining the working of Spined is given by Figure 1. The first step is to check the active state of the screen. If the screen is in an inactive state, the service terminates. As soon as the screen gets active, after 2000 milliseconds, the service automatically starts. Data from the triaxial accelerometer is constantly fetched and processed in accordance with the equation mentioned in Section 3.3. The equation returns a value of λ which is further processed through various if-else statements.

The result of this computation determines the seriousness of the posture. If the value of λ is high, the notification (Alert) level will be the highest. Similarly, the notification is adapted for lower values of λ. As the notification appears, the user has to correct his or her posture to cancel the notification, else click the notification which opens the application. He or she can choose to stop the service if desired. Once the activity is recorded by the smartphone, entries of the duration of wrong or harmful posture in minutes are made into the local SQLite Database. The process has been thoroughly explained in Section 3.4. When required, these SQLite database values are retrieved by passing a query and the graphing library to generate various reports and plots of past performance. These plots show the time trend of posture which enhances user awareness and helps in improving posture. Finally, the application stops if the user presses the “Exit” button. The User Interface is shown in Figure 2.

Figure 1. Working of Spined.

(a) (b)

Figure 2. (a) Alert system and exit button; (b) Posture graph and report generated.

3.2. Sensor Data

The application is based on the reading of data from a single built-in triaxial accelerometer sensor. It is the most significant sensor for obtaining information relating to the orientation and position of the smartphone. The cervical spine position for some angles is depicted through Figure 3.

Accelerometer Sensor

Triaxial accelerometer measures the acceleration due to gravity acting on the different axes of the accelerometer. The crystal structures of the accelerometer get stressed by the acceleration forces that act on them. While the total acceleration due to gravity acting on the sensor remains constant, its components acting along the 3-axes vary with the change in the position and/or orientation of the smartphone. When the smartphone is flat (90 degrees from the normal of the ground) then the Y-axis has a acceleration due to gravity of 9.8 ms−2. This Y-axis component reduces and Z-Axis’ value increases as the angle of orientation from the normal decreases. It is unnecessary to use data from all the three axes of the accelerometer. Only data from the Y and Z axis of the phone are indispensable since horizontal movement does not contribute to adverse posture change (shown in Table 1). It is the phone tilt (Y and Z axes changes) that decide the posture of the cervical spine which determines the Cervical Spine stress level. The raw accelerometer data that the phone captures is in ms−2. This value is converted mathematically into a quantified Cervical Spine Stress Level (λ). Sample measurements of the different values of the 3 axes at various angles of tilt between 0 and 85 degrees from the normal are given by Table 1. These values are with an observational error of ±2%:

Figure 3. Declination to view smartphone screen.

Table 1. Accelerometer readings for major angles.

As shown, the values of X-axis do not change considerably. A larger data-set of tilt angles was used to plot the graph given below for different values of Z-axis and Y-axis. The accelerometer values for which the posture severely stresses the Cervical spine are shown in Figure 4. The threshold has been set to be at 12 degrees (Datum from Kenneth K Hansraj’s Study [2] ). Hence all the “starred/dark” points in Figure 4 depict a bad posture and green squares depict healthy posture.

3.3. The Algorithm

Spined’s Algorithm is given by Equation (1) and Equation (2). Triaxial accelerometer readings are averaged out over 1500 milliseconds to filter out random fluctuations and noise and improve accuracy. Calculations are performed at millisecond intervals because the sensor values change rapidly. Equation (1) has been derived by the tangent of the trigonometric angles formed by two axes of the built-in accelerometer. In Equation (2), the severity level of the posture is found by solving for the Arctan of Equation (1) and finding the percentage of severity.

Let ψ be the total number of values recorded in 1500 milliseconds. The number of ψ will be variable since the built-in triaxial accelerometer in smartphones differs in precision, accuracy, and fetching data. Let the warning (Cervical Spine Stress) level be λ and the angle at which the phone is inclined be ϕ from Y-axis and the magnitude of the vector of the value of Z-axis be A γ and Y-axis be A β then:

tan ϕ = i = 1 ψ A γ i i = 1 ψ A β i (1)

λ = ( tan 1 A γ A β 90 ) 100 % (2)

If λ > 90, then notification type priority is VERY SERIOUS. If λ > 65 and λ < 90, then priority is CAUTIONARY. If λ > 45 and λ < 65, then notification priority is HARMFUL. If λ > 20 and λ < 45, then notification priority is NEEDS IMPROVEMENT.

Above, Figure 5 is portrayal of a “Very Serious” Heads Up notification in Android Nougat when the posture should be immediately corrected. Red is often associated with warning and seriousness [12] . The color grades shift to more soothing as the notification type decreases. When the notification type is “Needs Improvement” the color scheme of the notification is kept green.

3.4. Database

Many of the applications, for example, Smart Pose, proposed in a past research paper, warns the user only momentarily; however, datum is not collected or

Figure 4. Values of Y, Z axis and the angle from normal.

Figure 5. Example of a “Serious” notification.

reported over the day, week, or months [9] . Spined stores all the data of the posture in a local SQLite Database that is created when the app is first installed. The most important feature is that the duration of bad postures (where the cervical spine stress levels are beyond threshold values) throughout the day is stored in the SQLite database. The SQL table includes a serial number, date, and the cumulative duration of bad postures, and total recorded time in minutes throughout the day. The values can be read from the table and graphed to show progress. This database is created with a class and SQLite packages. At any time, the user can view the results, and weekly report will be shown to see whether the posture has improved or if improvement is required. This process is shown through Figure 6.

“MPAndroidChart”, an open source graph plotting library, has been employed to plot the graph of the results from the database. A subsequent report is also shown.

3.5. Addressing Various Problems

There may be a lot of unanticipated bugs and glitches that occur when the user uses the app-based posture correcting mechanism. Most of these problems have not been addressed in the past studies on this subject. The most important of all these issues is undesired alerts. This study proposes a set of algorithms that try to minimize these issues.

3.5.1. Problem 1

Sometimes the smartphone is in use while the user is lying horizontally on his or her back with the smartphone located above the user and having its screen

Figure 6. Spined operation flowchart.

facing downwards. Under these conditions there is in fact very minimal Cervical Spine Stress and the application would normally produce erroneous results since the Z-axis value from accelerometer becomes negative resulting in a negative value for λ. For the problem case, the ideal raw value of Z-axis will be −9.8 ms2. The application resolves this issue as follows: for any general case, let the Z-axis value of accelerometer be Aγ:

If Aγ < 5, then SERVICE = PAUSE

where SERVICE is the activity of the Application, i.e. if SERVICE pauses then no notification will be generated while this condition is true (screen faces downwards).

3.5.2. Problem 2

Sometimes, the user uses the phone for a very small span of time, like 1000 - 2000 milliseconds. This is too short a period to create any Cervical Spine Stress and is undesirable to have notifications generated during this brief period. However, in most of the software application based prior art solutions the background service, or application does not stop even if the phone is at rest. As a result, unnecessary power is consumed. Spined avoids the unnecessary functioning and undesired power consumption by suspending its operation when the smartphone is idle and particularly when the display screen is in an OFF condition. When the screen is switched on, or is active, the application waits for 2500 milliseconds and then starts the SERVICE. This achieved by monitoring the activity state of the phone using the following library:

(KeyguardManager)getSystemService (Context.KEYGUARD_SERVICE).inKeyguardRestrictedInputMode ();

4. Result and Observation

The prototype of this system was tested on a sample of 100 people of all ages from 10 - 60. Spined was installed on their Android phones. The sample users were asked to keep the application running for as long as they use their smartphones. The results of the application after the week were cumulated and graphs were generated from the data. The data from 100 sample sizes have been averaged out and plotted in Figure 7.

Figure 7. Average posture data of 100 people.

Analyzing the data from the SQLite Database, it is observed that for all respondents the duration of bad postures in minutes reduced; however, for some the decrease was significant, while for others it was minimal. The experiment showed results that supported Spined’s primary objective.

The first observation was that the average duration of bad posture of the 100-sample people was 42.7 minutes (the outliers, who had hunched backs, were not included in the cumulative datum). The second observation was that an average of 17.67 minutes was reduced by the end of the week and a reducing pattern time with bad posture could clearly be seen.

From the detailed information of the sample set, gender did not a play a significant role in the posture data. The male to female ratio of the sample set was 59:41 and the minutes of bad posture of males were averaged out: 39.8 minutes. The average minutes of bad posture daily of women were approximately 43.2 minutes. The calculation is within an observational error of 1.5%.

In Figure 7, evidently, the decline is nearly linear. However, as mentioned, the minutes of bad posture reduced each day for some of the users was not as the above trend. Indeed, the graph showed ups and down; however, by the end of the week, they managed to get the cumulative minutes of bad posture to a significantly low duration. If 17.67 is linearly divided for 7 days, then approximately 3 - 4 minutes reduced each day.

This experiment is bounded by the posture calculated only by the smartphone sensors when users view smartphone screens. Moreover, if the user stops the service, then also the data is not collected. Other daily activities where the posture is wrong or unhealthy cannot be accounted for by this datum. Spined can certainly help people to improve their posture while using phones and significantly reduce the Cervical Spine Stress level and risk of the critical problem of Thoracic Kyphosis.

5. Conclusions

The increase of cervical spine stress levels and poor postures is increasing at unprecedented rates due to smartphone usage. Many ways have been proposed to solve this issue. This paper shows an efficient, reliable, and helpful smartphone application with SQLite Database and posture graphs that can help solve this problem. This prototype application can be developed for various other platforms like Windows, IOS etc. Furthermore, the data from Spined can aid medical researchers in understanding the usage of smartphones and the duration of bad posture. The privacy of the user, however, will be maintained at all times. Most of the applications that exist today require some kind of external device to be attached to the body and most of them can only run on the high-end smartphone with a built-in magnetic compass. The mechanism and algorithm mentioned in the paper solve the issue with only a single smartphone sensor which increases the user base. The limitation of the present work lies in improving the accuracy of this posture correction mechanism and alert systems. Furthermore, the phone usage constitutes only a minor part of the day; therefore, an inexpensive and comfortable 24-hour monitoring system needs to be devised that can measure posture trend at all times and alert the user to ameliorate his or her Cervical Spine posture. Our observation from the sample set has shown a considerable posture improvement due to smartphone-based correction mechanism. The mechanism on which our proof of concept is based is, indeed, indispensable and efficient solution for the growing population of the smartphone, tablet, and phablet users.

Future work in this mechanism may include efficient integration with wearable technology that can employ not only accelerometer sensor but also data from gyroscope and magnetometer. More effective systems need to be designed and further research has to be conducted to aid the people in improving the Cervical Spine posture.

Cite this paper

Gupta, H. (2018) Smartphone Based Cervical Spine Stress Prevention. Journal of Software Engineering and Applications, 11, 110-120. https://doi.org/10.4236/jsea.2018.112006

References

  1. 1. Statista (2017) Number of Mobile Phone Users Worldwide 2013-2019. Statista. https://www.statista.com/statistics/274774/forecast-of-mobile-phone-users-worldwide/

  2. 2. Kenneth, H. (2014) Assessment of Stresses in the Cervical Spine Caused by Posture and Position of the Head. Surgical technology international, 25, 277-279.

  3. 3. Jung, S., Lee, N., Kang, K., Kim, K. and Lee, D. (2016) The Effect of Smartphone Usage Time on Posture and Respiratory Function. Journal of Physical Therapy Science, 28, 186-189.

  4. 4. Riskind, J.H. and Gotay, C.C. (1982) Physical Posture: Could It Have Regulatory or Feedback Effects on Motivation and Emotion? Motivation and Emotion, 6, 273-298. https://doi.org/10.1007/BF00992249

  5. 5. Curone, D., Bertolotti, G., Cristiani, A., Secco, E. and Magenes, G. (2010) A Real-Time and Self-Calibrating Algorithm Based on Triaxial Accelerometer Signals for the Detection of Human Posture and Activity. IEEE Transactions on Information Technology in Biomedicine, 14, 1098-1105. https://doi.org/10.1109/TITB.2010.2050696

  6. 6. Dai, J., Bai, X., Yang, Z., Shen, Z. and Xuan, D. (2010) Mobile Phone-Based Pervasive Fall Detection. Personal and Ubiquitous Computing, 14, 633-643. https://doi.org/10.1007/s00779-010-0292-x

  7. 7. Hermanis, A., Nesenbergs, K., Cacurs, R. and Greitans, M. (2013) Wearable Posture Monitoring System with Biofeedback via Smartphone. Journal of Medical and Bioengineering, 2, 40-44. https://doi.org/10.12720/jomb.2.1.40-44

  8. 8. Baek, J.H. and Yun, B.-J. (2010) Posture Monitoring System for Context Awareness in Mobile Computing. IEEE Transactions on Instrumentation and Measurement, 59, 1589-1599. https://doi.org/10.1109/TIM.2009.2022102

  9. 9. Lee, H., Choi, Y., Lee, S. and Shim, E. (2013) Smart Pose: Mobile Posture-Aware System for Lowering Physical Health Risk of Smartphone Users. CHI '13 Extended Abstracts on Human Factors in Computing Systems, Paris, April 27-May 2 2013, 2257-2266. https://doi.org/10.1145/2468356.2468747

  10. 10. Android Developers (2017) Sensor. developer.android.com. https://goo.gl/LyPNnS

  11. 11. Lawanont, W., Mongkolnam, P. and Nukoolkit, C. (2015) Smartphone Posture Monitoring System to Prevent Unhealthy Neck Postures. 2015 12th International Joint Conference on Computer Science and Software Engineering (JCSSE), Songkhla, 22-24 July 2015, 331-336. https://doi.org/10.1109/JCSSE.2015.7219819

  12. 12. Elliot, A.J., Maier, M.A., Moller, A.C., Friedman, R. and Meinhardt, J. (2007) Color and Psychological Functioning: The Effect of Red on Performance Attainment. Journal of Experimental Psychology: General, 136, 154-168. https://doi.org/10.1037/0096-3445.136.1.154