10
Americans With Disabilities Act – Compliance Assessment Toolkit on Smartphone Mohammad Tanviruzzaman * , Rizwana Rizia * , Sheikh Iqbal Ahamed * , and Roger Smith * Department of Mathematics, Statistics, and Computer Science Marquette University, Milwaukee, Wisconsin 53233 Emails: {mtanviru, rrizia, iq}@mscs.mu.edu Department of Occupational Science & Technology University of Wisconsin-Milwaukee, Milwaukee, Wisconsin 53201–0413 Email: [email protected] Abstract—The Americans With Disabilities Act (ADA) and other accessibility standards specify the requirements for assessing the architectural barriers for the built environment. And, the ADA – Compliance Assessment Toolkit (ADACAT) provides simple pass-fail assessments of those requirements. Measurement Kit is the principal component of the ADACAT, which consists of various measuring instruments like, measur- ing tape, sound-level meter, light-level meter, magic slope block, etc. In this paper, we show that most of the instruments in the Measurement Kit can be effectively implemented as a software application on a smartphone equipped with sensors like, accelerometer, gyroscope, and microphone. Detailed algorithms have been presented and the experimental results show that an iPhone or iPod Touch 4.0 application can serve as measuring tape, sound-level meter, as well as slope meter, making the ADACAT both cheaper and more portable. Keywords-allan variance; americans with disabilities act; a-weighting; dead reckoning; distance; inertial navigation; kalman filter; measurement; slope; smartphone; sound-level I. I NTRODUCTION Over 50 million Americans have some kind of physical, sensory, cognitive, or mental disability [1]. The Americans With Disabilities Act (ADA) of 1990 sets the minimum requirements (minimum door width, staircase slope, etc.) for state and local government facilities, public accommo- dations, and commercial facilities to be readily accessible to and usable by individuals with disabilities with a view to eliminate architectural barriers for these people [1, 22]. The Americans With Disabilities Act – Compliance Assessment Toolkit (ADACAT) is a screening tool-kit, which allows individuals without advanced training to assess the archi- tectural barriers of the built environment. It consists of two parts: Audit and Measurement Kit. Each audit is essentially a web-based questionnaire concentrating on the legal require- ments of the ADA. The answers to the questions in an audit come from the actual measurements performed using the Measurement Kit. After answering the questions in an audit, the person, who is performing the accessibility-assessment can click the “Score Audit” button to receive a numerical score of the degree of accessibility and usability compliance of say, a room [23]. The Measurement Kit consists of a measuring tape, a sound-level meter, a light-level meter, a door force tool, the story stick, the magic slope block, the font guide, the multi-tool, and the key force tool. In this paper, our focus is limited to implementing the measuring tape, the magic slope block, and the sound-level meter of the Measurement Kit as a smartphone application. The measuring tape is used to measure width of hallways and doors, height of signages, barriers, and clearances under desks and tables. A digital sound-level meter enables pass-fail assessments of the environmental sound-level with sufficient precision. The magic slope block enables one to measure slopes of ramps and paths, and cross-slopes of both [24]. In this paper we show that a smartphone equipped with accelerometer, gyroscope, and microphone can adequately (having acceptable accuracy) serve as a measuring tape, sound-level meter, and slope meter. In order to measure length or height (measuring tape) the accelerometer of the smartphone is used to perform dead reckoning based inertial navigation [2]. The basic idea is to integrate ac- celeration twice to get the position of the phone and the distance (length or height) is the difference between the final and the initial positions of the smartphone. The Microelectromechanicalsystem (MEMS) type accelerometer used in a smartphone is susceptible to various deterministic and stochastic errors. Two consecutive integrations at each time instant cause any small error to grow large very quickly [6]. The deterministic errors include, bias, scale-factor, nonorthogonality, etc., whereas the stochastic errors include, random walk, Gauss-Markov process, etc. [3]. We apply the 6-position static test to determine the principal deterministic errors (bias, scale-factor, and non-orthogonality), and then we use this information to calibrate the sensor-data, before applying stochastic error removal techniques [4]. In order to reduce the stochastic errors, we use Allan Variance technique for determining velocity random walk error coefficients of the accelerometer (data) and then we feed those coefficients into a Kalman filter along with the calibrated data [5, 6]. The smartphone’s microphone is used to record audio data, and then the environmental sound-level is determined from the Fast Fourier Transform (FFT) coeffcients cal-

Americans With Disabilities Act – Compliance Assessment ...mtanviru/index_files/papers/compsac_ada.pdf · inertial navigation [2]. The basic idea is to integrate ac-celeration twice

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Americans With Disabilities Act – Compliance Assessment ...mtanviru/index_files/papers/compsac_ada.pdf · inertial navigation [2]. The basic idea is to integrate ac-celeration twice

Americans With Disabilities Act – Compliance Assessment Toolkit on Smartphone

Mohammad Tanviruzzaman∗, Rizwana Rizia∗, Sheikh Iqbal Ahamed∗, and Roger Smith†∗Department of Mathematics, Statistics, and Computer Science

Marquette University, Milwaukee, Wisconsin 53233Emails: {mtanviru, rrizia, iq}@mscs.mu.edu

†Department of Occupational Science & TechnologyUniversity of Wisconsin-Milwaukee, Milwaukee, Wisconsin 53201–0413

Email: [email protected]

Abstract—The Americans With Disabilities Act (ADA) andother accessibility standards specify the requirements forassessing the architectural barriers for the built environment.And, the ADA – Compliance Assessment Toolkit (ADACAT)provides simple pass-fail assessments of those requirements.Measurement Kit is the principal component of the ADACAT,which consists of various measuring instruments like, measur-ing tape, sound-level meter, light-level meter, magic slope block,etc. In this paper, we show that most of the instruments in theMeasurement Kit can be effectively implemented as a softwareapplication on a smartphone equipped with sensors like,accelerometer, gyroscope, and microphone. Detailed algorithmshave been presented and the experimental results show that aniPhone or iPod Touch 4.0 application can serve as measuringtape, sound-level meter, as well as slope meter, making theADACAT both cheaper and more portable.

Keywords-allan variance; americans with disabilities act;a-weighting; dead reckoning; distance; inertial navigation;kalman filter; measurement; slope; smartphone; sound-level

I. INTRODUCTION

Over 50 million Americans have some kind of physical,sensory, cognitive, or mental disability [1]. The AmericansWith Disabilities Act (ADA) of 1990 sets the minimumrequirements (minimum door width, staircase slope, etc.)for state and local government facilities, public accommo-dations, and commercial facilities to be readily accessibleto and usable by individuals with disabilities with a view toeliminate architectural barriers for these people [1, 22]. TheAmericans With Disabilities Act – Compliance AssessmentToolkit (ADACAT) is a screening tool-kit, which allowsindividuals without advanced training to assess the archi-tectural barriers of the built environment. It consists of twoparts: Audit and Measurement Kit. Each audit is essentially aweb-based questionnaire concentrating on the legal require-ments of the ADA. The answers to the questions in an auditcome from the actual measurements performed using theMeasurement Kit. After answering the questions in an audit,the person, who is performing the accessibility-assessmentcan click the “Score Audit” button to receive a numericalscore of the degree of accessibility and usability complianceof say, a room [23].

The Measurement Kit consists of a measuring tape, a

sound-level meter, a light-level meter, a door force tool,the story stick, the magic slope block, the font guide, themulti-tool, and the key force tool. In this paper, our focusis limited to implementing the measuring tape, the magicslope block, and the sound-level meter of the MeasurementKit as a smartphone application. The measuring tape isused to measure width of hallways and doors, height ofsignages, barriers, and clearances under desks and tables.A digital sound-level meter enables pass-fail assessments ofthe environmental sound-level with sufficient precision. Themagic slope block enables one to measure slopes of rampsand paths, and cross-slopes of both [24].

In this paper we show that a smartphone equipped withaccelerometer, gyroscope, and microphone can adequately(having acceptable accuracy) serve as a measuring tape,sound-level meter, and slope meter. In order to measurelength or height (measuring tape) the accelerometer ofthe smartphone is used to perform dead reckoning basedinertial navigation [2]. The basic idea is to integrate ac-celeration twice to get the position of the phone andthe distance (length or height) is the difference betweenthe final and the initial positions of the smartphone. TheMicroelectromechanicalsystem (MEMS) type accelerometerused in a smartphone is susceptible to various deterministicand stochastic errors. Two consecutive integrations at eachtime instant cause any small error to grow large very quickly[6].

The deterministic errors include, bias, scale-factor,nonorthogonality, etc., whereas the stochastic errors include,random walk, Gauss-Markov process, etc. [3]. We apply the6-position static test to determine the principal deterministicerrors (bias, scale-factor, and non-orthogonality), and thenwe use this information to calibrate the sensor-data, beforeapplying stochastic error removal techniques [4]. In order toreduce the stochastic errors, we use Allan Variance techniquefor determining velocity random walk error coefficients ofthe accelerometer (data) and then we feed those coefficientsinto a Kalman filter along with the calibrated data [5, 6].

The smartphone’s microphone is used to record audiodata, and then the environmental sound-level is determinedfrom the Fast Fourier Transform (FFT) coeffcients cal-

Page 2: Americans With Disabilities Act – Compliance Assessment ...mtanviru/index_files/papers/compsac_ada.pdf · inertial navigation [2]. The basic idea is to integrate ac-celeration twice

culated from the recorded audio data utilizing Parseval’sidentity to avoid the calculation of inverse FFT [21]. Wehave used “A-weighting filter” to emphasize and suppresscertain frequencies in the audio data so that the calculatedsound-level matches the response of a human ear [20].

Using the phone’s gyroscope, the angular difference be-tween the orientations of the phone, when it is on a horizon-tal plane and when it is on a slope can be computed, thus theslope of a path or ramp can be determined. We also computethe slope using the accelerometer, and to improve accuracy,we take a weighted average of these two calculations as thefinal slope.

Our contributions:• We propose the idea of a smartphone application that

can make a useful toolkit like the ADACAT cheaperand more portable.

• We have presented detailed algorithms to performvarious measurements with reasonable accuracy. Inorder to reduce errors in distance measurement ouralgorithm uses Discrete-time Kalman Filter (for re-moving stochastic errors) and 6-position static test (forremoving deterministic errors). Detailed discussion ofhow to formulate the distance measurement problem interms of Discrete-time Kalman Filter (DKF) has beenpresented. In order to determine the Velocity RandomWalk (VRW) error coefficients to be used in DKF, wehave used Allan deviation technique.

• We have implemented the application on iPod Touch4.0 and provided experimental results confirming thatour algorithms agree with the outputs of ADACAT’smeasuring tape and digital sound-level meter and thatour algorithms outperform the iPhone applications al-ready available for measuring distance and sound-level.Through experiments, we also show that the slopemeasured using our algorithm has sub-degree levelaccuracy for a wide range of slopes.

The rest of the paper is organized as follows: in Section IIwe give the motivation behind our work, detailed algorithmsof various parts of our application have been presented inSection III, experimental setups along with results havebeen presented in Section IV, discussion of related worksalong with comparisons between our algorithms and existingiPhone applications go in Section V, and we conclude ourwork with a brief description of future works in Section VI.

II. MOTIVATION

At present, all the measuring instruments of ADACAT’sMeasurement Kit are accommodated in a 30′′ × 8′′ × 4′′

bag that weighs about 4 lbs, and it costs about $650 [24].Whereas a smartphone, e.g., an iPhone 4.0, weighs only4.8 ounces and has dimensions 4.5′′ × 2.31′′ × 0.37′′ [28].Obviously, a smartphone software capable of performingmost of the measurements required by the ADA with ac-ceptable accuracy, can make the Measurement Kit cheaper

Figure 1: Smartphone’s sensor axes

(since many people already possess smartphones) and moreportable; this is the principal motivation behind our work.

A database containing accessibility ratings of various partsof all the buildings can assist the people with disabilities tolive independently. For example, with such a database inplace, a person with disabilities can inquire about a buildingbefore actually going there or he may find some facility, e.g.,a nearby restaurant, which has good accessibility scores. Inorder to populate such a database, the participation (may bevoluntary) of a great number of individuals is needed. Thegoal is very unrealistic with the present Measurement Kitof the ADACAT, which is too cumbersome and costly. Therestaurant owner, then has the incentive to become ADA-compliant and to put, say, a logo on the restaurant-websiteadvertising that their facility complies to the ADA require-ments and thus accessible to the people with disabilities.

On the other hand, if a person with disabilities feels thatpart of a building does not comply with the ADA standards,he can perform the measurements using his smartphone withmuch more ease than using the various instruments of theMeasurement Kit of the ADACAT; and if needed he canthen report his findings to the appropriate authority.

Potential users of our application are: the businesses thatcould profit from being able to assert that their facilities areaccessible to the people with disabilities, the organizationsthat perform the measurements and assess the accessibilityof a facility, the people who would want to volunteer inthe accessibility data-gathering process, and the people withdisabilities themselves.

III. MEASUREMENT KIT ON SMARTPHONE

In this section we present the algorithms behind the threecomponents (distance measurement, slope measurement, andsound-level measurement) of our application in detail.

A. Measurement of Length and Height

The basic idea for measuring length and height usinga smartphone is to apply dead reckoning based inertialnavigation. The phone is moved through air from the startingpoint of the distance to be measured, to the ending point. Theacceleration data received from the phone’s accelerometer isintegrated twice at each time instant to determine the currentposition of the phone [2].

We assume the starting point of the smartphone to havecoordinates 03×1 and thus the Euclidean distance between

Page 3: Americans With Disabilities Act – Compliance Assessment ...mtanviru/index_files/papers/compsac_ada.pdf · inertial navigation [2]. The basic idea is to integrate ac-celeration twice

the last position,[sx,last sy,last sz,last

]Tand the starting

point is the distance of interest. So, we have,

distance =√s2x,last + s2y,last + s2z,last (1)

In order to determine position of the phone at each instantwe apply Newton’s laws of motion along each of the threeaxes:

vaxis,k = vaxis,k−1 + aaxis,kδt (2)

saxis,k = saxis,k−1 + vaxis,kδt+1

2aaxis,kδt

2 (3)

Where, k = 1, 2, . . . are time instants at which wedetermine the smartphone’s positions; vaxis,k is the speedof the phone at time instant k along an axis (x, y, or z)as depicted in Fig. 1; aaxis,k is the acceleration of thephone at time instant k along an axis received from thephone’s accelerometer; δt is the time-difference betweentime instants (k − 1) and k; and saxis,k is the phone’sposition at time instant k along an axis.

We describe the calibration of accelerometer data (toremove deterministic errors like: scale factor, bias, andnonorthogonality) in the experimental section. In order toreduce the uncertainty of the calculated position of thesmartphone due to random errors in the accelerometer data,we apply the Discrete-time Kalman Filter (DKF) [2].

1) Discrete-time Kalman Filter (DKF): The DKF triesto estimate the state xk ∈ <n of a discrete-time controlledprocess at a time instant k, which is governed by the linearstochastic difference equation,

xk = Axk−1 + Buk−1 + wk−1 (4)

In the estimation process a measurement zk ∈ <m isincorporated at each time instant k using the followingequation,

zk = Hxk + ϑk (5)

Here wk−1 and ϑk represent the process and measurementnoises and they are assumed to be independent, white, andhaving normal probability distributions: p(w) ∼ N(0,Q)and p(ϑ) ∼ N(0,R), where Q and R are the process-noise and measurement-noise covariance matrices. The n×nmatrix A relates the state at time instant (k − 1) with thestate at time instant k and the n × l matrix B relates theoptional control input uk−1 ∈ <l at time instant (k − 1)with the state xk at time instant k. The m × n matrix Hrelates the state xk with the measurement zk. Once xk, zk,A, B, H, Q, and R have been determined for a particularestimation problem, a set of five equations along with theinitial estimates of xk−1 (= 0) and Pk−1

(= I9×9

)can be

used to obtain the “optimal” estimate xk at each later time-instant [7–9].

The basic idea behind DKF is to use a weighted averageof the predicted (based on previous estimates) state and thecurrent measurement to obtain an estimate, which has a

lower uncertainty than the prediction or measurement alone[10]. The recursive nature of the DKF computation allowsone to get the current estimate from only “the previousestimate and the current measurement” and does not requireone to save all the past estimates or involve them in latercomputations, which is suitable for the smartphone scenariodue to the limited memory and computational power of thephone [9].

2) Formulation of Distance measurement problem interms of DKF: For our problem the state xk is as follows,

xk =[xx,k xy,k xz,k

]TWhere xaxis,k =

[saxis,k vaxis,k aaxis,k

]; saxis,k,

vaxis,k, and aaxis,k are the position, speed, and accelerationof the smartphone at time instant k along an axis; andaxis = {x, y, z}.

The measurement vector, zk is as follows,

zk =[ax,k ay,k az,k

]Tzk contains the three components of acceleration of thesmartphone along the three axes at time instant k.

A(δt)9×9 =

Ax(δt)3×3 03×3 03×3

03×3 Ay(δt)3×3 03×3

03×3 03×3 Az(δt)3×3

Where,

Aaxis(δt)3×3 =

1 δt 12δt

2

0 1 δt

0 0 1

Aaxis(δt)

3×3 executes Newton’s laws of motion along anaxis over δt time period.

H3×9 =

01×2 1 01×6

01×5 1 01×3

01×4 01×4 1

We do not have any control inputs thus we drop the Bukterm in Eq. 4;

Q(δt)9×9 =

Qx(δt)3×3 03×3 03×3

03×3 Qy(δt)3×3 03×3

03×3 03×3 Qz(δt)3×3

Qaxis(δt)

3×3 denotes the discrete-time process-noise co-variances along an axis.

3) Derivation of Qaxis(δt): Newton’s laws of motion areaccurate when the acceleration does not change betweentwo consecutive time instants; this is the source of errorin our process model, because acceleration is not constantover a time interval of δt. If a, v, and s are instantaneousacceleration, speed, and position of the smartphone along anaxis, we may write:

a =dv

dt⇒ dv = adt

Page 4: Americans With Disabilities Act – Compliance Assessment ...mtanviru/index_files/papers/compsac_ada.pdf · inertial navigation [2]. The basic idea is to integrate ac-celeration twice

a =d

dt

(ds

dt

)⇒ ds = atdt

Let E[a2]

= qaxis. We recognize qaxis as the instantaneousvariance of acceleration (as we subtract mean), which wedetermine from Allan deviation plot in the experimentalsection later. Now we have:

E[ads] = E[a2tdt

]= qaxistdt

E[dvds] = qaxistdtdt

E[dvdv] = qaxisdtdt

E[adv] = qaxisdt

E[dsds] = qaxist(dt)tdt

Now, the continuous-time process-noise covariance matrix,Qaxis(t) along an axis is,

Qaxis(t) = qaxis

∫ tdt ∫ tdt ∫tdt∫

dt∫tdt∫

tdt∫

dt∫

dt∫

dt∫

dt∫tdt

∫dt 1

⇒ Qaxis(t) = qaxis

14 t

4 12 t

3 12 t

2

12 t

3 t2 t12 t

2 t 1

Then the discrete-time process-noise covariance matrixQaxis(δt) along an axis is,

Qaxis(δt) =

t+δt∫t

Qaxis(t)dt = qaxis

120δt

5 18δt

4 16δt

3

18δt

4 13δt

3 12δt

2

16δt

3 12δt

2 δt

We determine R3×3 in the experimental section.

B. Measurement of Slope

Slope is the angle between the horizontal surface and aramp or a road. We determine the sope of an inclined surfacein the following two methods:

1. Using gravity:Here, the smartphone is placed on the inclinedsurface in such a position that the solpe of thesurface is the angle of a counterclockwise rotation(θ) of the smartphone about its x–axis as shownin Fig. 2. We assume g = 9.8 ms−2 in Fig. 2. Letgravity along the z–axis be gz . Then gz = − cos θ.So, the slope is, θ = − cos−1 gz . Core MotionFramework (CMF) of iOS 4.0 gives the value ofgz [25].

2. Using gyroscope:In this method, the phone remains as in Fig. 2, andthe roll (rotation about x–axis) value received fromthe gyroscope using CMF, provides the slope (ψ)directly.

z-ax

is

inclinedsurface

phone

θ

θ

1g

y-axis

x-axis

ground

Figure 2: Slope using gravity

Finally, we take the weighted average of the two slopesacquired from the above-mentioned two methods, as theslope (φ) of the surface [21]:

φ =w2

1 × θ + w22 × ψ

w21 + w2

2

(6)

Where, w1 = 1σ1

, w2 = 1σ2

, and σ1 and σ2 are thestandard deviations of θ and ψ.

C. Measurement of sound-level

Human ear does not respond to all sound frequencieswith equal sensitivity. As a result, even if two differentnoises have the same sound pressure level, any one of themcould appear louder to a person when the sound powerof that noise is concentrated in a frequency region wherehuman ear is more sensitive. For this reason, frequency-weighting is used in sound level meters so that the meterbecomes less sensitive at frequencies where human ear isless sensitive [20]. Among different frequency-weightingfilters, A-weighting is the most popular and widely used one[29]. ADACAT’s digital sound-level meter also employs A-weighting for measuring sound-level [30].

In order to measure sound-level, sound-data is recordedover δt length of time using the smartphone’s microphoneat a periodic interval of ∆t (∆t > δt), then Fast FourierTransform (FFT) is applied on the recorded sound-data. A-weighting is applied on the FFT coefficients and utilizingParseval’s identity we calculate mean energy of the recordedsound-data from the A-weighted FFT coefficients. UsingParseval’s identity lets us avoid the calculation of inverseFFT, saving computational cost [21]. Finally the meanenergy thus calculated is translated into decibel unit. Inorder to match the output of ADACAT’s digital sound-level meter, we find a mathematical relationship betweenthe smartphone’s output and that of the digital meter, whichwe describe in the experiment section. The pseudocode forsound-level calculation is given in the listing Algorithm 1.

IV. EXPERIMENT AND EVALUATION

In this section we present the experimental setups andresults for the three components (distance measurement,slope measurement, and sound-level measurement) of ourapplication in detail.

Page 5: Americans With Disabilities Act – Compliance Assessment ...mtanviru/index_files/papers/compsac_ada.pdf · inertial navigation [2]. The basic idea is to integrate ac-celeration twice

Algorithm 1 Measure sound-level; Input: Length of soundrecording period: ∆t, Sound recording interval: δt, andSampling frequency of microphone: fs

1: loop2: for every ∆t time interval do3: soundData[]← RecordSound(δt)4: m← Length (soundData[])5: fft[]← FFT (soundData[])6: cleansedFFT[]← BelowNyquist (fft[])7: weightedFFT[]← Aweighting (cleansedFFT[])8: n← Length (weightedFFT[])

9: energy←m∑i=1

weightedFFT[i]2

n

10: meanEnergy← energym/fs

11: soundLevel← 10 log10(meanEnergy)12: end for13: end loop

A. Measurement of Length and Height

1) Experimental Setup: Most of the Americans WithDisabilities Act (ADA)’s length or height measurementsare limited to 5 feet [1]. In this section we show that aniPhone or iPod Touch 4.0 application can determine lengthor height of 5 feet or less with good accuracy given that bothcalibration and discrete-time Kalman filter (DKF) are used.We compare the measurement accuracy of four cases: simplenewton (neither calibration nor DKF), with calibration butwithout DKF, without calibration but with DKF, and withboth calibration and DKF.

a) Simple Newton: We have implemented an appli-cation for iPod Touch 4.0 in Objective C that acquiresthe acceleration imparted by the user to the device viaCMDeviceMotion object in Core Motion Framework (CMF)with a sampling frequency of 100 Hz. As CMF is event-driven, we did not get acceleration data after each 0.01second time interval. Hence we determined the time elapsedbetween two consecutive accelerometer readings using thetime-stamp data reported by CMF [25].

b) With Calibration but Without DKF: For calibrationwe performed the 6-position static test [4]. We kept thedevice static in 6-positions: x-axis up and down, y-axisup and down, and z-axis up and down, and for eachof these 6 positions, we collected acceleration data (sumof user acceleration and gravitational acceleration) usingCMAccelerometerData object in CMF over 10 minutes.Thus we have the following underdetermined system oflinear equations:

MA = U (7)

Where,

M =

mxx mxy mxz bxmyx myy myz bymzx mzy mzz bz

A =

−gtrue gtrue 0 0 0 0

0 0 −gtrue gtrue 0 00 0 0 0 −gtrue gtrue1 1 1 1 1 1

U =

lx:upx lx:downx ly:upx ly:downx lz:upx lz:downx

lx:upy lx:downy ly:upy ly:downy lz:upy lz:downy

lx:upz lx:downz ly:upz ly:downz lz:upz lz:downz

Here, in M: mxx, myy, and mzz represent scale-factorerrors and other m’s represent nonorthogonality errors, andbaxis represents bias error for an axis; in A: gtrue repre-sents the value of the gravitational constant at the locationwhere the 6-position static test was performed; and in U:laxis:up|downaxis represents the accelerometer reading (mean of

10–minutes data) along the axis when the device was inan axis : up|down position. We then use the method ofleast-squares to determine the coefficients in M [21]:

M = UAT(AAT

)−1(8)

In order to determine gtrue we used the online gravitycalculator provided by National Geodetic Survey [26] where,in the gravity calculator we inserted latitude, longitude, andsea level height information from Google Earth [27]. In orderto calibrate the accelerometer data at each time instant, wesolved the following system of linear equations:

M

axayaz1

=

lxlylz

(9)

Where, M is the coefficient matrix obtained from the 6-position static test, ax|y|z represents the calibrated user-imparted acceleration along an axis, and lx|y|z representsthe raw user-imparted acceleration reported by the CMDe-viceMotion object along an axis.

c) With Calibration and DKF: In order to compute theprocess-noise covariance matrix (Q) and the measurement-noise covariance matrix (R) to be used in DKF, we col-lected 6-hrs of static acceleration data at 100 Hz samplingfrequency, keeping the z-axis of the device pointing upwardson a level surface. In order to compute the value of qaxis(coefficient of Velocity Random Walk), we computed Allanvariance for each axis of the accelerometer using the 6-hrsdata (after subtraction of mean).

Allan variance is a method for representing the root meansquare (RMS) random-drift errors as a function of averagingtimes [6]. The idea is to chop the data into n bins, eachhaving length t . The average of each bin is calculated todetermine a list of averages: avg(t)1, avg(t)2, . . . , avg(t)n.Then the Allan variance (AV) is,

AV (t) =1

2(n− 1)

∑i

(avg(t)i+1 − avg(t)i)2 (10)

Page 6: Americans With Disabilities Act – Compliance Assessment ...mtanviru/index_files/papers/compsac_ada.pdf · inertial navigation [2]. The basic idea is to integrate ac-celeration twice

In order to determine the characteristics of the underlyingnoise processes, Allan deviation, AD(t) =

√AV (t) is

plotted as a function of t on a log-log scale. VelocityRandom Walk (VRW) noise coefficient appears on the Allandeviation plot as a linear region with a slope of about −0.5. A straight line is then fitted through the linear region ofinterest and the numerical value of VRW noise coefficient isobtained by reading the fitted line at t = 1 [5]. The plot ofAllan deviation for the three axes of accelerometer is givenin Fig. 3.

10−2

10−1

100

101

102

10−4

10−3

10−2

10−1

Cluster time in seconds

Alla

n D

evia

tion

in m

s− 2

Allan Deviation Plot for Accelerometer

x−axisy−axisz−axis

Figure 3: Allan deviation of accelerometer-axes

Percentage error, σ(δ) of Allan deviation estimate can bedetermined from the following equation [11],

σ(δ) =1√

2(Nc − 1

) (11)

Where, N is the total length of data and c is the lengthof a cluster (bin). We implemented a function in MATLABto calculate AD(t) and we did not allow percentage errorto be greater than 5% in our Allan deviation estimates.We implemented DKF (Discrete-time Kalman Filter) inObjective C and for the associated matrix-computations weused BLAS library in Accelerate Framework of iOS 4.0 [31].In our DKF, the transition matrix A and the process-noisecovariance matrix Q depend on δt, which is not constant,hence A and Q were computed at each iteration of the DKFloop.

2) Experimental Results:a) With Calibration but Without DKF: We found

gtrue = 9.80393 ms−2 at the location of the 6-positionstatic test and the coefficient matrix, M is,

M =

1.00447 −0.00327 −0.01522 0.039390.00055 0.99533 0.00124 0.020250.01196 0.00358 1.00428 −0.02532

b) With Calibration and DKF: From the 6-hrs static

data we computed the measurement-noise covariance matrix,R and Allan deviation (after subtraction of mean).

R = 10−3

0.28271 0.01193 0.000010.01193 0.30491 0.000580.00001 0.00058 0.64263

Table I: Comparison data(a) Result for 14.625′′

Standard Dev. Mean ‖True−Mean‖Newton 7.80′′ 18.17′′ 3.55′′

Calibration+Newton 7.73′′ 18.10′′ 3.48′′

DKF 0.29′′ 14.59′′ 0.035′′

Calibration+DKF 0.26′′ 14.63′′ 0.005′′

(b) Result for 29.5′′

Standard Dev. Mean ‖True−Mean‖Newton 21.55′′ 46.24′′ 16.74′′

Calibration+Newton 21.49′′ 46.24′′ 16.74′′

DKF 2.11′′ 30.60′′ 1.10′′

Calibration+DKF 2.08′′ 30.48′′ 0.98′′

(c) Result for 70.25′′

Standard Dev. Mean ‖True−Mean‖Newton 11.77′′ 47.78′′ 22.47′′

Calibration+Newton 11.73′′ 47.59′′ 22.66′′

DKF 3.86′′ 68.00′′ 2.25′′

Calibration+DKF 3.77′′ 68.31′′ 1.94′′

From the Allan deviation plot we found VRW errorcoefficients along the three accelerometer-axes as: qx =3.1315 × 10−6m2s−4s−1, qy = 3.3251 × 10−6m2s−4s−1,and qz = 6.0709× 10−6m2s−4s−1.

While measuring distance we held the device in one handand moved it keeping z-axis pointing upwards and we triedto keep the motion of the device in the x–y plane towards thex-axis. We aligned the front camera (situated at the middleof the top edge of the device) of the iPod Touch with thestarting point of the distance to be measured and moved thedevice until the front camera got aligned with the endingpoint.

Fig. 4 (on the next page) shows comparison plots betweenfour cases (3 runs for each case): simple Newton, Newtonafter calibration, Newton with DKF, Newton with DKFafter calibration (distance is in inch. unit). It is evidentthat the use of DKF significantly improves accuracy ofmeasurements. From Fig. 4 we see that different runs(measurements) for a particular distance last for differentamounts of time, because we cannot move the phone alwaysat a fixed speed by hand.

In table I, standard deviation, mean of 3 runs (mea-surements), and absolute difference between mean and true(tape) measure are shown. From the data in the subtables(I(a), I(b), and I(c)), it is evident that simple Newton isunusable in terms of measurement accuracy. DKF greatlyimproves accuracy, but calibration followed by DKF per-forms the best having mean of 3 runs very close to the tapemeasure and a lower standard deviation than that from usingonly DKF.

Though compared to simple Newton, calibration followedby DKF increases the number of floating-point computationsrequired to determine the position of the phone at eachtime instant almost 300 folds, the response time was notmore than a few seconds even for measuring a distance

Page 7: Americans With Disabilities Act – Compliance Assessment ...mtanviru/index_files/papers/compsac_ada.pdf · inertial navigation [2]. The basic idea is to integrate ac-celeration twice

50 100 150 200 2500

5

10

15

20

25

time instants

dist

ance

(inc

h.)

true distance = 14.625 inch.

Newton(run:1)Newton(run:2)Newton(run:3)Calb.+N(run:1)Calb.+N(run:2)Calb.+N(run:3)DKF(run:1)DKF(run:2)DKF(run:3)C+DKF(run:1)C+DKF(run:2)C+DKF(run:3)

(a) For distance 14.625′′

50 100 150 200 250 300 350 400 4500

10

20

30

40

50

60

time instants

dist

ance

(inc

h.)

true distance = 29.5 inch.

Newton(run:1)Newton(run:2)Newton(run:3)Calb.+N(run:1)Calb.+N(run:2)Calb.+N(run:3)DKF(run:1)DKF(run:2)DKF(run:3)C+DKF(run:1)C+DKF(run:2)C+DKF(run:3)

(b) For distance 29.5′′

50 100 150 200 250 300 350 400 4500

10

20

30

40

50

60

70

time instants

dist

ance

(inc

h.)

true distance = 70.25 inch.

Newton(run:1)Newton(run:2)Newton(run:3)Calb.+N(run:1)Calb.+N(run:2)Calb.+N(run:3)DKF(run:1)DKF(run:2)DKF(run:3)C+DKF(run:1)C+DKF(run:2)C+DKF(run:3)

(c) For distance 70.25′′

Figure 4: Comparison results for three distances

phone’slength (λ)object’s

height (h)π

phoneobject

ground

Figure 5: Slope using scale

of 70.25′′. Battery-charge consumption after a series of 30measurements was unnoticeable.

B. Measurement of slope

1) Experimental setup: We kept the iPod Touch flat ona horizontal surface keeping the z-axis pointing upwards,and collected a set of values for θ and ψ (as in Eq. 6) ata sampling rate of 0.5 Hz. From these values we calculatedσ1(≈ 1.40× 10−3

)and σ2

(≈ 4.92× 10−4

)as in Eq. 6.

To measure the reference values of various slopes, we keptthe phone as in Fig. 5, varying the object’s height (h). Witha scale we measured the phone’s (iPod Touch’s) length (λ)and the object’s height (h) and then the reference value ofslope, π = sin−1 hλ , which is equivalent to using the magicslope block of ADACAT [24].

2) Experimental results: In table II, we show the refer-ence values (π’s) of different slopes, the measured values(φ’s) using Eq. 6, and the absolute difference between thesetwo values; from which we see that the measured slopeshave sub-degree level precision.

Table II: Measurement of slopeScale (π) Phone (φ) ‖π − φ‖12.46◦ 12.40◦ 0.06◦

27.88◦ 27.53◦ 0.35◦

43.67◦ 43.42◦ 0.25◦

53.67◦ 53.87◦ 0.20◦

62.74◦ 62.94◦ 0.20◦

C. Measurement of sound-level

1) Experimental setup: First, we measured sound-levelsat different places (having noise-levels ranging from that of‘quiet library environment’ to that of ‘heavy city traffic’)using Algorithm 1 with ∆t = 5 seconds and δt = 3seconds; and fs = 44.1 kHz. We implemented Algorithm

1 in Objective C and for the associated FFT calculationwe used the vDSP library of the Accelerate Framework ofiOS 4.0 [31]. We also recorded ADACAT’s digital sound-level meter’s readings at these places. We then plotted thesetwo sets of values against one another and fitted a curvein MATLAB to find out a mathematical formula relatingthe output of Algorithm 1 and that of ADACAT’s digitalsound-level meter. Sound-level reported by the digital metervaries fast. So, in order to obtain the readings of the digitalmeter, we videoed the readings of the digital meter, andafterwards extracted the frames from the video data. Usingthe frame-rate information we could then map the sound-level calculated using Algorithm 1 over a small chunkof sound-data to the output of the digital meter. Once weobtained the mathematical formula, we calculated the sound-level using Algorithm 1 in real time and then fed thiscalculated sound-level into the formula to obtain a valuethat matches with the output of the digital meter.

In order to evaluate the accuracy (agreement with ADA-CAT’s digital sound-level meter) of our sound-level calcula-tion, we measured sound-levels at a set of places (differentfrom the ones used to obtain the formula) having differentnoise-levels using both Algorithm 1 followed by the formulaand the digital meter (average of sound-level over δt time-period).

2) Experimental results: In Fig. 6 we show the fittedgraph for sound-level data. The mathematical formula is asfollows:

f(x) = 1.118x− 57.28

Here, x is the calculated sound-level using Algorithm 1over δt = 3 seconds and f(x) is the mapped (to the digitalmeter’s readings averaged over 3 seconds) output.

Table III: Evaluation of sound-levelDigital meter Algo. 1 ‖error‖26.5 dBA 26.3 dBA 0.20 dBA37.1 dBA 36.8 dBA 0.30 dBA58.3 dBA 60.8 dBA 2.5 dBA72.8 dBA 75.9 dBA 3.1 dBA

In table III, the comparison between the digital meter’soutputs and the outputs from Algorithm 1 is shown and

Page 8: Americans With Disabilities Act – Compliance Assessment ...mtanviru/index_files/papers/compsac_ada.pdf · inertial navigation [2]. The basic idea is to integrate ac-celeration twice

80 85 90 95 100 105 110 115 120 125

30

40

50

60

70

80

Calculated sound−level (dBA)

Sou

nd−l

evel

(dB

A) f

rom

dig

ital m

eter

f(x) = 1.18 x − 57.28

Y vs. Xfit 1

Figure 6: Fitting Sound-level Data

we see that the agreement is good. In table III and V, dBArepresents A-weighted decibel unit.

V. RELATED WORK

Lot of works have been done to improve positioning (ofrobot, vehicle, human, etc.) accuracy through fusion of datafrom various sources like: GPS, INS (accelerometer, gyro-scope, and magnetometer or compass), odometry, RADAR,camera, map or, building information. In order to fuse thedata received from various sources, most of those works usedKalman filter (KF) or its variants like: Extended KF, Un-scented KF, Fuzzy Adaptive KF, Cascaded KF, QuaternionCentral Divided Difference KF, and Cubature KF or, ParticleFilter (PF) or its variants like: Mixture PF and MultiscalePF; e.g., [12–14]. As our process (Eq. 4) and measurement(Eq. 5) models are linear and we are using the smartphone’sbuilt-in accelerometer, we shall concentrate on the worksutilizing MEMS accelerometer and DKF.

Liu and Pang [15] used a solid-state micro-machinedaccelerometer as a short-duration distance measurementdevice, and they applied Kalman filter to reduce the ran-dom noise (random bias drift and bias drift rate due totemperature) existing in the sensor. In [16] a smoothingalgorithm was applied on KF-based estimation of a solid-state accelerometer data for vehicle positioning and the resultwas an increase in position accuracy. In [17] a KF-basedinertial navigation system using MEMS accelerometers andgyroscopes was used to build a digital writing system. Errorsaffecting a MEMS Inertial Measurement Unit (IMU) werestochastically modeled and analyzed using Allan varianceand Wavelet decomposition was used to remove higherfrequency noise to improve accuracy in [18]. Accelerometer,magnetometer, and assisted GPS data were combined usingKF to provide a positioning solution for mobile phones in[19].

There are several iPhone applications (AccelaRuler, Point& Measure, Sonic Ruler, Ruler Magic, etc.) already availablein Apple’s App Store that can be used to measure distance.These applications use various methods like, arrival time ofecho, comparison with reference image, etc. But they suffereither from usability or accuracy issue severely. In tableIV a comparison between three already available iPhoneapplications and our algorithm for distance measurement is

given. Here ‖error‖ is the average of the absolute valuesof errors (difference from tape measure) for three distances:14.625′′, 29.5′′, and 70.25′′. We see that our application isusable and more accurate than the other applications.

Table IV: Comapring Distance MeasurementApp Name Method ‖error‖

AccelaRuler Slide phone: injurious for the phone 3.6′′

Point & Measure Need to know phone’s height 4.5′′

Sonic Ruler Need quiet room, smooth surface LargeOur algo. Move in air, easy, phone’s safe 0.97′′

A few already available iPhone applications (dB, SPLMeter, db Meter, VU Meter, etc.) provide sound-level mea-surement, but none of them agrees with ADACAT’s digitalsound-level meter as well as our algorithm does. In table Vwe show the comparison between three sound-level measur-ing iPhone applications that are already available and ouralgorithm for measuring sound-level. Here ‖error‖ is theaverage of the absolute values of errors (differences fromADACAT’s digital sound-level meter’s readings) for foursound-levels: 26.5 dBA, 37.1 dBA, 58.3 dBA, and 72.8 dBA.From table V, it is evident that our algorithm agrees withADACAT’s digital sound-level meter the most.

VI. CONCLUSION AND FUTURE WORK

In this paper we have proposed the idea of implement-ing many of the instruments of the Measurement Kit ofAmericans With Disabilities Act – Compliance AssessmentToolkit (ADACAT) as a smartphone application. This willmake an important tool like ADACAT more portable andcheaper. We have presented detailed algorithms for measur-ing distance, slope, and sound-level using an smartphoneequipped with accelerometer, gyroscope, and microphonewith acceptable accuracy. We have implemented the al-gorithms on iPod Touch 4.0 and evaluated them usingthe outputs of ADACAT’s measuring tape, slope block(an equivalent method), and digital sound-level meter asreference values. Also, we have compared our algorithmsfor distance and sound-level measurement with other iPhoneapplications already available in Apple’s App Store andshown that our algorithms outperform them.

We are currently implementing two more componentsof ADACAT’s Measurement Kit on iPod Touch 4.0, forlight-level measurement and measurement of the ratio ofheight and width of the font in a signage. For light-levelmeasurement, our idea is to take an image of a referenceobject from a fixed distance (avoiding shadows) using thesmartphone’s camera and from the average luminance of

Table V: Comapring Sound-level MeasurementApp Name ‖error‖

dB 9 dBSPL Meter 6 dBAdb Meter 4 dBOur algo 1.5 dBA

Page 9: Americans With Disabilities Act – Compliance Assessment ...mtanviru/index_files/papers/compsac_ada.pdf · inertial navigation [2]. The basic idea is to integrate ac-celeration twice

the image we shall infer the light-level of the place. Forfont’s height-width ratio measurement, our idea is to takethe image of a signage, extract characters from the image,measure their width and height in pixels, and then using thesignage’s actual height and width we shall infer the font’sactual height and width and then their ratio.

The remaining two basic components in the ADACAT’sMeasurement Kit are for measuring pressure needed to opena door and pressure needed to turn a key, both of whichinvolve using small, light, and cheap mechanical devices.Moreover, distance, slope, sound-level, light-level, and fontheight-width ratio measurements cover most of the questionsof a typical ADACAT audit, thus our application will be ableto fullfil most of the measurement needs for the ADA usingonly a smartphone, in the future.

Presently, one must use different instruments from theMeasurement Kit to perform various measurements and theninsert the measured values (width of a door, sound-levelof the room, etc.) in the Audit (Web-based questionnaire)of the ADACAT. It is one of our future goals that weshall combine these audit and measurement components ofADACAT into an integrated smartphone application, whichis better from the HCI point of view. In future, we alsointend to improve the accuracy of our distance measurementcomponent further by incorporating the phone’s gyroscope inan Extended Kalman Filter. The algorithms presented in thispaper and those outlined as future works are not limited toiPhone or iPod Touch, any smartphone having the requiredsensors on it can be used to run the algorithms. We alsointend to evaluate our application on different smartphoneplatforms in the future.

ACKNOWLEDGEMENT

This work is supported in part by the Department ofEducation, National Institute on Disability and Rehabilita-tion Research (NIDRR), grant number H133G100211. Theopinions contained in this paper do not necessarily representthe policy of the Department of Education, and you shouldnot assume endorsement by the Federal Government.

REFERENCES

[1] M. A. Rhoads. The ADA Companion Guide: Under-standing the Americans with Disabilities Act Accessi-bility Guidelines (ADAAG) and Architectural BarriersAct (ABA). John Wiley & Sons, Inc., 2010.

[2] D. Titterton and J. Weston. Strapdown Inertial Navi-gation Technology. American Institute of Aeronauticsand Astronautics, 2nd Edition, 2005.

[3] P. Aggarwal, Z. Syed, A. Noureldin, and N. El-Sheimy.MEMS-Based Integrated Navigation. Artech House,2010.

[4] P. Aggarwal, Z. Syed, X. Niu, and N. El-Sheimy. “AStandard Testing and Calibration Procedure for Low

Cost MEMS Inertial Sensors and Units,” in Journal ofNavigation, vol. 61, no. 2, pp. 323–336, 2007.

[5] IEEE Std. 952-1997. “IEEE Standard SpecificationFormat Guide and Test Procedure for Single-AxisInterferometric Fibre Optic Gyros”.

[6] O. Woodman. “An Introduction to Inertial Navigation,”Technical Report, UCAM-CL-TR-696, University ofCambridge, 2007

[7] G. Welch and G. Bishop. “An Introduction to KalmanFilter,” in Proceedings of SIGGRAPH, 2001.

[8] R. G. Brown and P. Y. C. Hwang. Introduction toRandom Signals and Applied Kalman Filtering. 3rd

ed., John Wiley & Sons, Inc., 1996.[9] H. W. Sorenson. Kalman Filtering: Theory and Appli-

cation. IEEE Press, 1985.[10] P. S. Maybeck. Stochastic Models, Estimation, and

Control. vol. 1, Academic Press, Inc., 1979.[11] N. El-Sheimy, H. Hou, and X. Niu. “Analysis and

Modeling of Inertial Sensors Using Allan Variance,” inProceedings of IEEE Transactions on Instrumentationand Measurement, vol. 57, no. 1, pp. 140–149, 2008.

[12] I. Abuhadrous, F. Nashashibi, C. Laurgeau, and M.Chinchole. “Multi-Sensor Data Fusion for Land Ve-hicle Localization Using RTMAPS,” in Proceedingsof IEEE Intelligent Vehicles Symposium, pp. 339–344,2003.

[13] F. Azizi and N.Houshangi. “Mobile Robot PositionDetemination Using Data From Gyro and Odometry,”in IEEE World Automation Congress, pp. 1–8, 2006.

[14] D. Rotenberg. Inertial and Magnetic Sensing of HumanMotion. PhD Thesis, University of Twente, 2006.

[15] H. Liu and G. Pang. “Evaluation of a Low Cost SolidState Accelerometer as a Distance Measuring Sensorfor Vehicle Positioning System,” in Proceedings ofIEEE International Conference on Intelligent Trans-portation Systems, pp. 435–440, 1999.

[16] S. Nikbakht, M. Mazlom, and A. Khayatian. “Evalu-ation of Solid-state Accelerometer for Positioning ofVehicle,” in IEEE International Conference on Indus-trial Technology, pp. 729–733, 2005.

[17] C. C. Tsang. Error Reduction Techniques for a MEMSAccelerometer-based Digital Input Device. Master’sThesis, The Chinese University of Hong Kong, 2008.

[18] R. Ramalingam, G. Anitha, and J. Shanmugam. “Mi-croelectromechanical Systems Inertial MeasurementUnit Error Modelling and Error Analysis for Low-cost Strapdown Inertial Navigation System,” in DefenseScience Journal, vol. 59, no. 6, pp. 650–658, 2009.

[19] D. Gusenbauer, C. Isert, and J. Krosche. “Self-contained indoor positioning on off-the-shelf mobiledevices,” in IEEE International Conference on IndoorPositioning and Indoor Navigation, pp. 1–9, 2010.

[20] C. M. Harris. Handbook of Accoustical Measurementsand Noise Control. McGraw–Hill, Inc., 3rd Edition,

Page 10: Americans With Disabilities Act – Compliance Assessment ...mtanviru/index_files/papers/compsac_ada.pdf · inertial navigation [2]. The basic idea is to integrate ac-celeration twice

1991.[21] G. Strang. Computational Science and Engineering.

Wellesley-Cambridge Press, 1st Edition, 2007.[22] http://www.ada.gov/[23] http://ada-cat.misericordia.edu/[24] http://www.aacinstitute.org/ADA-CAT/[25] http://developer.apple.com/library/ios/#documentation/

CoreMotion/Reference/CoreMotion Reference/ index.html

[26] http://www.ngs.noaa.gov/cgi-bin/grav pdx.prl[27] http://www.google.com/earth/index.html[28] http://www.apple.com/iphone/specs.html[29] http://en.wikipedia.org/wiki/A-weighting[30] http://www.mcmelectronics.com/product/TENMA-/

72-935[31] http://developer.apple.com/library/ios/#documentation/

Accelerate/Reference/AccelerateFWRef/ index.html#//apple ref/doc/uid/TP40009465