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