A Smartphone-based Posture Measurement System for Physical
Therapy Applications
Synchronization of Multiple Devices via Bluetooth Network
Noriaki Ikeda
1
, Kai Ishida
2
, Yoshitaka Shiba
3
, Kousuke Mizuno
4
,
Noritaka Mamorita
5
and Akihiro Takeuchi
1
1
Medical Informatics, School of AHS, Kitasato University, Sagamihara, Kanagawa, Japan
2
Graduate School of Medical Sciences, Kitasato University, Sagamihara, Kanagawa, Japan
3
Physical Therapy, School of AHS, Kitasato University, Sagamihara, Kanagawa, Japan
4
Division of Rehabilitation, Kitasato University East Hospital, Sagamihara, Kanagawa, Japan
5
Department of Clinical and Rehabilitation Engineering, Hokkaido Institute of Technology, Sapporo, Japan
Keywords: Bluetooth, iphone/ipod, Posture Measurement, Physical Therapy.
Abstract: A smartphone-based measurement system was developed for the purpose of measuring time series data for
posture in the physical therapy field. We used the iPod touch (Apple Inc.) as hardware and iOS SDK as a
software development tool. Posture data (pitch, roll and yaw) were taken directly from Euler angles or by
transformation from quaternion data (qw, qx, qy, qz) to the Euler angles, depending on the orientation of the
device. This approach allows continuity of data values. Data were stored in the Documents directory of the
iOS Appli as a file in CSV format, which can be transferred to a PC via iTunes or sent by email as an
attached file if a WiFi environment is available. In order to synchronize two devices, communication via
Bluetooth was implemented. The accuracy of the data was checked by comparing with the OPTOTRAK
data. Variation of posture while standing still and walking was recorded using this system for 50 elderly
subjects.
1 INTRODUCTION
1.1 Background
The rapid aging of society in Japan has increased the
importance of approaches that allow elderly people
to live a healthy and independent life, in order to
reduce medical costs and to lighten the burden of
care.
Elderly people suffer various reductions in
physical and vital functions, including decreased
posture stability that reduces balance and the quality
of walking. In turn, these changes reduce ADL
(Activities of Daily Living) performance and QOL
(Quality of Life). Displacement of the pelvis has
been related to falling in elderly people (Ishigaki, et
al., 2011), which indicates the importance of posture
during walking, as well as while standing still.
Measurement of posture currently requires a
laboratory environment or a stationary position
sensor device (Ishigaki, et al., 2011). An easy-to-use
mobile device for this purpose is required for wider
application in community-dwelling elderly people.
1.2 Purpose of the Study
We have previously developed a system for
evaluating tremor symptoms in Parkinson’s disease
using the accelerometer installed in a game
controller (Mamorita, et. al., 2009). The purpose of
the present study is to develop a measurement
system for posture during walking that is compact,
easy to use, and inexpensive for physical therapy
applications.
2 METHODS
2.1 Posture Measurement System
As hardware, we chose the iPod touch (Apple Inc.,
80
Ikeda N., Ishida K., Shiba Y., Mizuno K., Mamorita N. and Takeuchi A..
A Smartphone-based Posture Measurement System for Physical Therapy Applications - Synchronization of Multiple Devices via Bluetooth Network.
DOI: 10.5220/0004203600800083
In Proceedings of the 2nd International Conference on Sensor Networks (SENSORNETS-2013), pages 80-83
ISBN: 978-989-8565-45-7
Copyright
c
2013 SCITEPRESS (Science and Technology Publications, Lda.)
101 g, 58.9 × 111 × 7.2 mm) and the built-in sensors
of acceleration, rotation rate (Gyro sensor) and
attitude. Software was developed as an “iAppli”
using iOS SDK v.4.2 on an Apple Macintosh with
Mac OS X (ver 10.6.5).
The system measures 3-axis acceleration,
rotation rate and attitude. The coordinates of the
system (when the iPhone/iPod touch is laid flat on
the desk) are +Z, upward perpendicular; +X,
rightward (in portrait view); and +Y, upward (in
portrait view). We define three different modes of
the device as follows, because the data from the
attitude sensor is output to a different variable
depending on the placement of the device.
F (Flat): The device is placed flat with the +Z
axis pointing upward perpendicular.
H (Horizontal): The device is placed flat with the
+X axis pointing upward perpendicular.
V (Vertical): The device is placed flat with the -
Y axis pointing upward perpendicular.
The CMMotionManager class and the
CMAttitude class of CoreMotion Framework were
used to obtain the sensor data. Attitude data are
given as the Euler angles (pitch, roll and yaw),
quaternion data (qw, qx, qy, qz), and the rotation
matrix (m
ij
, i,j=1,2,3) (Apple Inc., 2010). The
method of obtaining data from the sensor was
changed as follows, depending on the positioning
mode of the device.
F: Px=roll, Py= pitch, Pz= yaw, from the Euler
angles.
H: Same as F, but adding 90° to Pz.
V: Euler angles were calculated from qw, qx, qy,
and qz using the equations below, and 90° was
added to Py to make the reference value equal to
zero.
Px = atan2(2(qw*qx+qy*qz), 1-2*(qx*qx+qy*qy));
Py = asin(2*(qw*qy-qz*qx);
Pz = atan2(2*(qw*qz+qx*qy), 1-2*(qy*qy+qz*qz));
Data are stored in the Documents directory
as a CSV file with a file name constructed from the
date and time when the data were collected. These
files can be transferred to a PC via iTunes or sent by
email as an attached file if a WiFi environment is
available.
The display during measurement is shown in
Figure 1. Using pop-up menus, various functions can
be accessed, including setting the measuring time (5,
10, 20(default), 30, 40, 60 sec), reviewing recorded
data (up to 20 sec) with pinching in and out and
scrolling , display of statistics , display of file names
saved in the Documents directory, sending mail, and
display of the instruction manual. The functions of
connection by Bluetooth, selection of placement of
the device (F/H/V), and on/off for saving a file were
assigned to the buttons (see Figure 1).
If we want to measure the data from multiple
points at a time, inter-device synchronization is
required. This function was realized using Bluetooth
wireless communication with GameKit framework
(Apple Inc, 2010). Two devices are connected as
peer-to-peer mode by Bluetooth pairing procedure
(Figure 2).
2.2 Subjects and Measurements
The subjects in the study were 50 community-
dwelling elderly females from 6 districts of
Sagamihara city. The subjects had a mean age of
71.0 ± 4.9 (range: 61-82) years old, height of 152.3
± 5.3 cm, and body weight of 52.4 ± 7.0 kg. Each
subject answered questions on age, sex, height, body
weight, history of falling, and amount of daily
exercise. Measurements were made for physical
functions and activity, including muscle strength for
knee extension, bending angle of the upper body,
stimulus response time of the body, 10 m walking
time at a comfortable speed, and 10 m walking time
at maximum speed.
To evaluate the posture of the trunk, the device
was attached to the sternum with plastic tape so that
the +Y axis of the device was parallel to the
perpendicular direction (V position; Figure 3A). To
measure rotation of the pelvis, another device was
attached with a belt on the sacrum so that the +X
axis pointed in the upward perpendicular direction
(H position; Figure 3B).
The study was approved by the ethical
committee of Kitasato University School of
Medicine.
3 RESULTS
3.1 Evaluation of Posture Data
To evaluate the posture measurement, the results
were compared with the integral of gyro data. An
example is shown in Figure 4, where the blue, red
and green lines show the gyro (Gx), posture (Px),
and integral (Ix), respectively:
Ix(t) = Gx(t) dt.
The absolute difference | Px(t) - Ix(t) | increased with
time (about 15.3° at t=20 s). However, if the device
A Smartphone-based Posture Measurement System for Physical Therapy Applications - Synchronization of Multiple
Devices via Bluetooth Network
81
was returned to the initial position, Px(t) showed
only a small error (about 0.5°) compared to the
initial value Px(0).
3.2 Comparison with the OPTOTRAK
To evaluate the accuracy of measured data we used
OPTOTRAK (Northern Digital Inc., Waterloo,
Canada) and compared the two data. One of the best
results is shown in Figure 5, in which the data from
OPTOTRAK (blue line) and those from iPod (green
one) were plotted. Time axes of two data were
adjusted (27 sample points were shifted) so that the
correlation between them was maximum (R=0.8886).
The RMS (root mean square of differences) value
was 2.15 (deg).
3.3 Example Data
In some cases we had observations that the yaw
component was subject to a linear drift (Figure 6)
especially in rapid movements. This phenomenon
did not appear in the other components (pitch and
roll) and the cause has not been identified yet.
4 DISCUSSION
A three-axis accelerometer is often used in walking
analyses in physical therapy (Hemmi et al., 2009);
(Kojima, et al., 2008), but a posture sensor has not
been available. Therefore, the device described in
this report is likely to be of value for many
applications, particularly since it can be used
outdoors, rather than being limited to the laboratory.
We used two devices to measure the movement
of the subject at two positions of the body. In order
to synchronize two devices (i.e. to adjust the time
axis of the two data files), onset of the data
acquisition was synchronized using Bluetooth
wireless communication. This connection, however,
was not so accurate nor stable; time to communicate
between two devices varied from 1 msec to several
10 msec. Considering that the sampling frequency
was 50 Hz, this is not satisfactory. We are trying to
do several methods to avoid this problem.
Three or more devices can be synchronized, but
the variance of delay will be larger. One can use
WiFi to synchronize remote multiple devices if the
wireless LAN environment is available, by which a
global sensor network could be constructed.
5 CONCLUSIONS
A smartphone-based measurement system was
developed for measuring time series data for posture
in physical therapy. Data for variation of posture on
standing still and during walking were recorded
using this system in 50 elderly subjects. The results
suggest that the system can serve as a new tool for
walking analysis in physical therapy.
ACKNOWLEDGEMENTS
This study was funded in part by a grant from
Kitasato University School of Allied Health
Sciences (No.2012-6604). The posture measurement
system can be downloaded from the App Store
(Ikeda, 2012).
REFERENCES
Apple Inc., 2010. CMAttitude Class Reference. iOS SDK
Reference Manuals.
Ishigaki, N., Kimura, T., Usui, Y. 2011. Analysis of pelvic
movement in the elderly during walking using a
posture monitoring system equipped with a triaxial
accelerometer and a gyroscope. Journal of
Biomechanics 44:9, 1788-1792.
Mamorita N., Iizuka T., Takeuchi A., Shirataka M., Ikeda
N., 2009. Development of a system for measurement
and analysis of tremor using a three-axis
accelerometer. Methods Inf Med 48: 589-594.
Hemmi, O., Shiba, Y., Saito, T., Tsuruta, H., Takeuchi, A.,
Shirataka, M., Obuchi, S., Kojima, M., Ikeda, N., 2009.
Spectral Analysis of Gait Variability of Stride Interval
Time Series: Comparison of young, elderly and
Parkinson’s disease patients. J. Phys. Ther. Sci.
21:105-111.
Kojima, M., Obuchi, S., Henmi, O., Ikeda, N., 2008.
Comparison of smoothness during gait between
community dwelling elderly fallers and non-fallers
using power spectrum entropy of acceleration time-
series J. Phys. Ther. Sci. 20:243-248.
Ikeda, N., 2012. GYRO-kun v3.0 (GR3e). AppStore.
URL: http://soul.ahs.kitasato-u.ac.jp/~ikeda/.
SENSORNETS 2013 - 2nd International Conference on Sensor Networks
82
APENDIX
Figure 1: Screen shot of the system. Buttons at the bottom
are, from left to right, Bluetooth connection, start/stop of
measurement, recording to file ON/OFF and the placement
of device (flat, horizontal or vertical).
Figure 2: Pairing of two iPods via Bluetooth.
Figure 3: Mounting of the device. A: Vertical setting to
measure the posture of the trunk. B: Horizontal setting to
measure the rotation of the pelvis.
Figure 4: Comparison of posture data (red) and integral
values (green) of rotation rate (blue).
Figure 5: Comparison of iPod data (green) and
OPTOTRAK data (blue).
Figure 6: An example of drift. The last half of yaw
component of posture data (red) measured by iPod was
subject to a drift.
A Smartphone-based Posture Measurement System for Physical Therapy Applications - Synchronization of Multiple
Devices via Bluetooth Network
83