referring to fig1 , a portable balance prosthesis 10 includes a motion sensing system 12 . motion sensing system 12 has an output that depends on the rotational and translational motion experienced by the wearer . the output from the motion sensing system 12 is provided to an on - board digital signal processor 14 that provides real - time estimates of the wearer &# 39 ; s orientation and angular velocity in three - dimensional space . the processor 14 detects the wearer &# 39 ; s vertical orientation while rejecting errors caused by instrument drift and extraneous acceleration . the resulting estimates are then provided to an actuator 16 that drives a stimulator 18 in communication with the wearer &# 39 ; s nervous system . the actuator 16 translates the real - time estimates of the wearer &# 39 ; s orientation and velocity into a form that can be used by the wearer . a controller area network ( can ) bus and controllers are provided to transfer information between the sensors , the digital processor , and the stimulator . the prosthesis also preferably includes a wireless transmitter , which allows system parameters such as dead zone and control loop gains to be adjusted and which allows subject performance to be remotely recorded . the prosthesis also may have one or more batteries that supply power to the sensors , processor , and stimulator . the motion sensing system 12 is preferably an instrument sensor assembly ( isa ). the isa may include three gyroscopes (“ gyros ”) and three accelerometers , but any number of any instruments capable of determining linear or angular changes in position may be used . other such instruments include , for example , magnetometers . micromachining or microelectromechanical systems ( mems ) techniques can be used to provide small and portable sensors , e . g ., as described in a . kourepenis , j . borenstein , et al ., “ performance of mems inertial sensors ,” aiaa gn & amp ; c conference , august , 1998 . the isa preferably includes read - out electronics and digitizers , and a mechanism and bubble level for aligning the sensors with the subject &# 39 ; s natural or comfortable vertical . a suitable , relatively low - cost isa may be assembled using the type of sensors currently used in automobiles for air bag deployment and traction control , for example analog devices adxl accelerometers and gyroscopes , or silicon sensing systems gyroscopes , or motorola accelerometers . such accelerometers may have a thermal sensitivity of about 3 milligravity ( mg ) per ° c . and noise of about 0 . 23 mg /√ hz . the gyroscopes may have a thermal sensitivity of about 650 °/ h /° c . and noise at 470 °/ h /√ hz . assembled isas exhibiting higher performance may be purchased from honeywell , for example the hg1920 instrument sensor assembly . the hg 1920 isa incorporates accelerometers whose thermal sensitivity is 0 . 3 mg /° c . and gyroscopes whose thermal sensitivity and noise are 10 °/ h /° c . and 5 °/ h / hz , performance one to two orders of magnitude better than commercial automotive grade sensors . stimulator 18 preferably includes an array of tactors 20 ( see fig2 ) to be worn close to the subject &# 39 ; s skin , e . g ., in a belt around the subject &# 39 ; s waist and / or in columns 24 ( see fig2 ) mounted on the subject &# 39 ; s front and back . the tactors may be worn under or over clothing . each tactor is an individually addressable electromechanical vibrating element . the array can include tactors to indicate azimuth and vertical tactor columns 24 to indicate elevation . “ azimuth ” and “ vertical ,” when describing tactors , are labels of convenience only ; the phrases are not used to imply any structural difference between azimuth and vertical tactors . as determined by the preferences of the subject , there should be sufficiently many columns 24 to indicate the direction when energized , each tactor vibrates at a frequency that is readily perceived by the wearer , typically a frequency between 250 hz and 400 hz , e . g ., 250 hz . a digital controller commands individual tactor amplifiers , which drive the tactors . the gyroscopic and accelerometer signals discussed above are processed to obtain a tilt - angle estimate . the tilt &# 39 ; s direction is transmitted to the subject by the azimuth tactors and the tilt &# 39 ; s magnitude is transmitted by the vertical tactors . the number of tactors is operator selectable , based e . g . on subject preference and sensitivity . the number of tactors can be selected based on other factors . the prosthesis 10 also has at least one optional airbag 22 . as described more fully below , the airbag is deployed when the subject is in a state in which a fall is imminent . in a preferred embodiment , the prosthesis is equipped with airbags that are positioned around the prosthesis so as to be effective if the subject should fall in any direction . in addition to ( or instead of ) tactile stimulation , other forms of stimulation are possible , e . g . one or a combination of auditory or acoustic ( l . chiari , m . dozza , et al ., “ audio - biofeedback for balance improvement : an accelerometry - based system .,” ieee trans biomed eng ., vol . 52 , no . 12 , 2005 , p . 2108 - 11 .) or electric currents applied to the tongue ( p . bach - y - rita , k . a . kaczmarek , et al ., “ form perception with a 49 - point electrotactile stimulus array on the tongue : a technical note ,” j rehabil res dev , vol . 35 , no . 4 , 1998 , p . 427 - 30 .) or skin . the balance prosthesis converts sensor outputs to an indication of vertical and provides cues to the subject . for purposes of explanation , determination of the wearer &# 39 ; s vertical will be presented in two parts : single axis tilt estimation , followed by the multi - axis estimations which may be used in the prosthesis . referring to fig3 , the subject is modeled as an inverted pendulum with its fulcrum coinciding with the subject &# 39 ; s feet . the subject is modeled as having a constant height l , and is assumed to be inclined at a tilt angle θ . in general , the tilt angle will be modeled as a function of time , since the subject is assumed to undergo motion . as used in this document , “ motion ” refers to all aspects of an object &# 39 ; s movement , including but not limited to position , velocity , acceleration , trajectory , etc . other , more refined , models can be employed , e . g . treating the subject as a double pendulum with fulcra at the subject &# 39 ; s waist and at the subject &# 39 ; s feet . the tilt estimations described below do not depend on a particular detailed model of the subject . in “ single axis estimation ,” motion experienced by the subject includes rotation about only one axis . a block diagram of a single axis estimation 40 used for the prosthesis is shown in fig4 . for instructional ease , analog filters are shown . consistent with computer control , higher order digital filters also can also be used in the prosthesis . as described more fully below , the single axis estimation determines the subject &# 39 ; s tilt from gyro output 42 and accelerometer output 41 . to mitigate the effects of gyro drift 44 and unwanted , high frequency acceleration inputs , the gyro output is filtered by a high - pass filter 46 and the accelerometer output is filtered by a low - pass filter 45 . the outputs are then combined at a combiner 47 , to produce the single - axis tilt estimation . where , s a and b a are the scale factor and bias of the accelerometer and a is the acceleration which the accelerometer experiences . for ease of explanation , it is assumed that the subject &# 39 ; s tilt angle and the initial offset angle of the accelerometer are small , allowing small - angle approximations to be employed . the estimation may be employed without making these approximations . assuming small - angle approximations for the tilt angle θ and the initial offset α , the input acceleration is given by : where g = acceleration due to gravity ( 9 . 8 m / s 2 ) α = initial offset between accelerometer input axis and subject &# 39 ; s vertical l = height of the subject , with the subject modeled as an inverted pendulum as shown in fig3 . θ = angle between subject &# 39 ; s position and subject &# 39 ; s vertical a h = horizontal acceleration of the pendulum pivot where , s g and b g are the scale factor and bias of the gyro respectively . to obtain a good estimate of tilt 0 and to remove the angular acceleration { umlaut over ( θ )} and horizontal acceleration a h from equation ( 2 ), the accelerometer output 41 should be low - pass filtered . for l = 1 . 5 m , which is the height of a typical person , the angular acceleration term in ( 2 ) becomes larger than gθ for tilts with frequencies greater than 0 . 4 hz . the angular acceleration term is 180 degrees out - of - phase with the desired tilt term so that wide bandwidth stabilization is difficult . to reduce the angular acceleration terms by two orders of magnitude , the break frequency of the low - pass filter is set at 0 . 03 - 0 . 3 hz . the break frequency of the low - pass filter can be computed in this manner for a subject whose height is different from 1 . 5 m . since the gyro output is integrated in what follows , small bias can lead to large angle errors ; however , the gyro gives a relatively good estimate of high - frequency rotation . to achieve a wide bandwidth estimate of the tilt angle θ , the gyro and accelerometer signals are combined . in analog laplace transforms , the tilt is estimated by : θ ^ = lp ⁡ ( s ) ⁢ ( v a - b ^ a s ^ a ) + hp ⁡ ( s ) s ⁢ ( v g - b ^ g s ^ g ) ( 4 ) where carat (^) denotes estimated or calibrated quantities stored in computation and lp ( s ) and hp ( s ) are the transfer functions of the low - pass filter 45 and high - pass filter 46 : lp ⁡ ( s ) = s ⁢ ⁢ ω n 2 ⁡ ( 2 ⁢ ⁢ ς + 1 ) + ω n 3 ( s + ω n ) ⁢ ( s 2 + 2 ⁢ ⁢ ς ⁢ ⁢ ω n ⁢ s + ω n 2 ) ( 5 ) hp ⁡ ( s ) s = s 2 + s ⁢ ⁢ ω n ⁡ ( 2 ⁢ ⁢ ς + 1 ) ( s + ω n ) ⁢ ( s 2 + 2 ⁢ ς ⁢ ⁢ ω n ⁢ s + ω n 2 ) ( 6 ) where ω n = 0 . 03 hz , ζ = 0 . 707 , and s is the laplace transform of the time derivative . in this document , references to a “ low - pass filter ” will mean a low - pass filter according to equation ( 5 ), and references to a “ high - pass filter ” will mean a high - pass filter according to equation ( 6 ), unless otherwise specified . other low - pass or high - pass filters may be implemented with equal efficacy . the filters described above reduce accelerometer low frequency noise as the inverse of frequency squared . the low frequency gyro drift is proportional to frequency squared so that a bias shift does not result in a steady state offset of tilt . filters of higher or lower order or direct digital implementations ( such as impulse invariant ) can be used as well . the low - pass 45 and high - pass 46 filters are complementary ; that is , hp ( s )+ lp ( s )= 1 . implementing the gyro filtering according to equation ( 6 ) avoids numerical problems associated with integrating the gyro rate and high - pass filtering later . for error analysis and calibration , the estimated tilt is obtained from the actual tilt and other poorly modeled effects by substituting equations ( 1 ) through ( 3 ) into equation ( 4 ): θ ^ = lp ⁡ ( s ) [ s a ⁡ [ g ⁡ ( θ + α ) - l ⁢ ⁢ θ ¨ + a h ] + b a - b ^ a s ^ a } + hp ⁡ ( s ) s ⁢ ( s g ⁢ s ⁢ ⁢ θ + b g - b ^ g s ^ g ) ( 7 ) errors in calibration or changes in bias are included in equation ( 7 ) by including both the actual bias and the bias obtained from calibration . because of the third order high - pass filter 46 described by equation ( 6 ), gyro bias errors 44 do not cause a steady shift in the estimated tilt . white gyro noise does not cause angle random walk . the effects of accelerometer noise ( the unmodeled bias terms ) and angular and lateral accelerations decrease two decades per decade beyond the filter break frequency of 0 . 03 hz . when starting the prosthesis , the subject is held still for 1 second at his comfortable vertical . in this position , the subject &# 39 ; s tilt θ is defined to be 0 . because the subject is held still , by equation ( 1 ) the measured accelerometer voltage equals the accelerometer &# 39 ; s estimated bias 43 . by equation ( 2 ), the estimated bias 43 will contain the accelerometer - to - subject misalignment α . inserting equation ( 8 ) into equation ( 7 ), causes the calibration to account for the misalignment , a result that requires that the accelerometer input axis be close to , but not necessarily exactly , horizontal . ( if the nominal accelerometer bias is known beforehand , unknown residual alignment is calibrated .) during calibration , a new gyro bias 44 is also determined in a similar manner by ( 3 ). calibrating the accelerometer and gyro biases 43 and 44 greatly reduces any filter startup transients . the balance prosthesis estimates the vertical to within 0 . 1 to 1 deg . a 1 mg ( 0 . 0098 m / s 2 ) accelerometer bias shift causes a 0 . 001 radian ( 0 . 06 - deg ) tilt error . since the bias is calibrated at instrument turn - on , it must be maintained for roughly 16 hours . with 0 . 03 hz filtering , accelerometer white noise of 1 mg /√ hz results in 0 . 2 milliradians of tilt . the best mems sensors can provide a stability of 1 mg , while 5 to 50 mg is typical of automotive grade sensors . because the gyro signal is filtered to eliminate bias , accelerometer bias , not gyro bias , is the limiting factor in this processing scheme . the gyro contributes only transient errors . with the 0 . 03 - hz filters , 360 -°/ h /√ hz gyro white noise , typical of automotive sensors , results in 0 . 10 tilt error . the maximum allowable transient tilt error for a balance impaired subject to fall is not presently known . the ability to estimate the tilt that results from complicated motion including rotation about multiple axes is desirable , because such complicated motion more closely describes people in day - to - day tasks than does motion limited to rotation about a single axis . one simple strategy to estimate multi - axis tilt is that of employing several instrument sensor assemblies along multiple axes , each configured to perform single - axis tilt estimation . this strategy provides reasonable tilt estimation for small tilt angles , but is otherwise flawed . each instrument sensor assembly has a corresponding axis about which it detects the tilt of the subject . the single - axis tilt estimation is based in part on the instruments having particular spatial orientations relative to each other . when the subject rotates about the assembly &# 39 ; s axis , the relative spatial orientations of the instruments are not changed in a manner which affects the estimation . however , when the subject rotates about an axis other than the axis corresponding to the assembly , the assembly &# 39 ; s instruments &# 39 ; relative orientations change in a manner which will affect the estimation performed by the assembly . in essence , the single - axis assembly does not account for its own tilt about an axis different from the one it measures tilt relative to . for sufficiently large angles , the change in the instruments &# 39 ; relative orientations leads to significant errors . for example , when the subject undergoes motion which includes a 45 degree rotation about two distinct axes , an estimate of the subject &# 39 ; s tilt made by combining two single - axis tilt estimates may be off by as much as 20 degrees . for the general multi - axis and large angle case , one expands the single - axis estimation discussed to account for the changes in the spatial orientations of the instruments that occur as the subject rotates about multiple distinct axes . as described in more detail below , the multi - axis algorithm can be implemented using quaternions . however , other implementations are possible , such as the use of euler angles and kalman filters . the following description of the multi - axis implementation relies on the following basic principles and notational conventions for quaternions . a quaternion is a particular type of number . as used herein , a quaternion has four parameters , also called components . the first parameter is sometimes referred to as “ real ,” while the last three parameters are sometimes referred to as “ complex .” the symbols i , j , and k are often used to signify the three complex parameters . we may write a general quaternion by specifying its four parameters , for example : it will often be convenient to use capital letters ( e . g ., q ) to represent a quaternion , and corresponding lower case letters with indices ( e . g ., q 1 , q 2 , q 3 , q 4 ) to represent its components . quaternions can be multiplied . one way to define quaternion multiplication of quaternions q and p with components [ q 1 , q 2 , q 3 , q 4 ] and [ p 1 , p 2 , p 3 , p 4 ] respectively , is to define the components of their product , denoted q ** p as : q ** p = [ p 1 ⁢ q 1 - p 2 ⁢ q 2 - p 3 ⁢ q 3 - p 4 ⁢ q 4 p 2 ⁢ q 1 + p 1 ⁢ q 2 + p 4 ⁢ q 3 - p 3 ⁢ q 4 p 3 ⁢ q 1 - p 4 ⁢ q 2 + p 1 ⁢ q 3 + p 2 ⁢ q 4 p 4 ⁢ q 1 + p 3 ⁢ q 2 - p 2 ⁢ q 3 + p 1 ⁢ q 4 ] ( 10 ) ( where the top component is the first component .) equivalently , quaternions represented using the “ i , j , k ” notation can be multiplied like ordinary polynomials subject to the rules i 2 = j 2 = k 2 = ijk =− 1 . note that quaternion multiplication is not commutative . that is , q ** p need not equal p ** q . conjugate ( q )=[ q 1 ,− q 2 ,− q 3 ,− q 4 ]. ( 11 ) some quaternions can be used to describe geometric points in space , or vectors . when the real component of a quaternion equals 0 , the three complex components can be thought of as representing the three cartesian coordinates of a point in space . equivalently , the three complex components can be used to define a vector in space anchored to the origin . for this reason , the first component of a quaternion is sometimes referred to as the “ scalar ” component , and the last three components are referred to as “ vector ” components . some quaternions can also define rotations of the vectors ( and equivalently , reference frames ). a quaternion q can define a rotation if and only if its components satisfy the condition : in this case , the quaternion q can be referred to as a “ rotation quaternion .” the square root of the expression on the left hand side of equation ( 12 ) is called the “ magnitude ” of the quaternion q =[ q 1 , q 2 , q 3 , q 4 ]. suppose coordinate frame a is related to coordinate frame b by a rotation , with the rotation being described by a quaternion q . then the coordinates of a vector defined in coordinate frame a are related to the coordinates of the vector in coordinate frame b by : { right arrow over ( v )} b = q **{ right arrow over ( v )} a ** conjugate ( q ) ( 13 ) ( where the vectors in both coordinate frame a and coordinate frame b are assumed to be written in quaternion form , as described above .) the rotation quaternions are related to the angular velocity of the reference frame by : q . = q ** ω → p 2 ( 14 ) where { right arrow over ( ω )} p is the angular rotation rate of frame a with respect to frame b , expressed in the coordinates of frame a . equation ( 14 ) is particularly useful for inertial guidance or for an all gyro balance prosthesis , because the angular rates are measured directly ( after bias and misalignment compensation ) by the three gyroscopes . the integrations are straightforward for first order differential equations with no singular points . assume that coordinate frame a is obtained by rotating an angle θ about the z axis of coordinate frame b . the quaternion describing vector transformations from frame b to frame a is given by : more generally , the amplitude of the rotation is defined by the scalar vector of the quaternion . the “ axle ” about which the rotation is executed is defined by the vector component of the quaternion . note that the quaternion representing transformation from frame a back to frame b is given by the conjugate of the transformation from frame b to frame a . this is equivalent to replacing the angle by its negative . the multi - axis tilt estimation algorithm will perform calculations in a number of different reference frames , which are defined here . in general , “ a reference frame ” is a set of axes which can be used to specify the location of a point or an object in space . an “ orthogonal ” reference frame is one in which the axes are mutually perpendicular . the term “ coordinate frame ” is synonymous with “ reference frame .” to specify the location of a general point in space , at least three axes are required . for a given reference frame , these axes are typically labeled “ x ,” “ y ,” and “ z .” when multiple reference frames are under consideration , primes (′) will be used to distinguish , e . g ., the x - axis in one reference frame with the x ′- axis of another . the “ local frame ” is defined to be an orthogonal frame oriented with respect to the earth so that its z - axis is aligned with the direction of gravity . in this definition , the earth can be considered flat and the rotation of the earth can be considered negligible . the x and y axes may be defined in any convenient way , so long as the local frame remains orthogonal . for example , the x and y axes of the local frame may be chosen to correspond to the nominal x and y axes of the body frame , as described below . the “ body frame ” is attached to the subject &# 39 ; s trunk or head , with the z - axis lying substantially parallel to the subject &# 39 ; s spine . in the preferred embodiment , the z - axis is oriented so that movement in the positive z - direction corresponds to movement from the subject &# 39 ; s head to the subject &# 39 ; s feet . if the subject is standing with his arms outstretched in a “ t ” formation , the y - axis is oriented to be generally parallel to the subject &# 39 ; s outstretched arms ( with the positive y coordinates lying to the subject &# 39 ; s right ). the x axis is oriented to be generally perpendicular to the subject &# 39 ; s chest ( with positive x coordinates lying in front of the subject ). the roll , pitch , and yaw axes are synonymous with the x , y , and z axes of the body frame , respectively . coordinates of a point as measured in some reference frame may be converted to coordinates measured in the body frame by conventional methods if the pitch , roll , and yaw angles are known . in fig5 a , a subject is shown in two positions . when standing generally upright , the x , y , and z axes of the body frame are as indicated on the left . when bending over , the x , y , and z axes of the body frame are as indicated on the right . the “ platform frame ” is an orthogonal frame defined by the input axes of inertial instruments . alternatively , the platform frame can be defined by reference surfaces upon which the instrument sensor assembly is mounted . the prosthesis contains six instruments : three gyros and three accelerometers . each instrument has its own input axis . the input axis of an instrument determines what the instrument measures : an accelerometer measures acceleration in the direction of its input axis , and a gyro measures rotation about its input axis . ideally , the accelerometers &# 39 ; input axes would all be mutually perpendicular , and the gyros &# 39 ; input axes would all be mutually perpendicular . ( equivalently , pairs of accelerometer input axes or pairs of gyro axes would coincide with reference surfaces ). these cases are ideal because the input axes of the prosthesis can then be used to define an orthogonal frame in which the prosthesis has a fixed orientation . however , it is often impractical to install the accelerometers and the gyros with this precision , or to expect the sensors &# 39 ; axes to be aligned with a reference surface . referring to fig5 b , the platform frame 50 b may be defined as follows . any of the six instruments in the prosthesis is selected arbitrarily . for illustration , an accelerometer 51 b is selected , although the following procedure can be carried out using a gyro . the x axis of the platform frame is defined to coincide with the input axis ( not shown ) of the accelerometer 51 b . the input axes 53 b , 55 b of the remaining accelerometers 52 b , 54 b generally do not coincide with the platform axes , because the input axes 53 b , 55 b of the accelerometers need not be mutually perpendicular and the platform axes must be . thus , there generally are two “ misalignment angles ” between each accelerometer &# 39 ; s input axis and a given platform axis . to define the y axis of the platform frame , a second accelerometer 52 b is selected , and the y axis is chosen so that this second accelerometer is misaligned with the y axis with only one nonzero angle of misalignment . in describing misalignment angles , subscripts 1 - 3 shall indicate gyros , subscripts 4 - 6 will indicate accelerometers , and the subscript x , y , or z will indicate the axis about to which the instrument should rotate to eliminate the misalignment . thus , the misalignment angle is of the second accelerometer 52 b is denoted α 5z , because the accelerometer 52 b is rotated by this angle about the z axis from aligning with the y axis . the choice of they axis fixes the z axis , because the platform axes must be mutually perpendicular . generally , there are two nonzero misalignment angles for the third accelerometer , denoted α 6x and α 6y . ( for clarity in fig5 b , planar regions p xy , p xz and p yz , parallel to the x - y , x - z and y - z planes , respectively are shown . points of input axis 53 b rotated about the z axis remain in the planar region p xy , points of input axis 55 b rotated about the y axis remain in the planar region p xz , and points of input axis 55 b rotated about the x axis remain in the planar region p yz .) generally , the input axes 53 b , 55 b of the accelerometers 52 b , 54 b are nearly parallel to the platform axes , so that one can refer to , e . g ., a “ nominally y accelerometer ” as being the accelerometer whose input axis is closest to they axis of the platform frame . in this context , “ nominally ” implies that the input axis of the instrument in question need not exactly coincide with the specified axis . the nominally x , y , and z accelerometers 51 b , 52 b , 54 b respectively are shown in fig5 b . fig5 c shows a subject 50 c ( shown schematically ) leaning forward while wearing the prosthesis 51 c ( shown schematically ), with all of the reference frames described above shown . the direction of gravity is indicated by the arrow g . the local frame is labeled by x , y , and z axes . note that the z axis is parallel to the direction of gravity . the body frame is labeled by x ′, y ′, and z ′ axes . note that the z ′ axis is parallel to the subject &# 39 ; s torso 52 c . the platform frame is labeled by x ″, y ″, and z ″ axes . note that no axis of the platform frame is parallel to any axis of the body frame . i . e ., the body - to - platform misalignment angles are all nonzero . the above reference frames are each convenient for particular tasks or contexts . for example , the local frame is a convenient frame in which to calculate the effect of gravity on the individual instruments , because gravity is always aligned with the local frame &# 39 ; s z axis . the platform frame is a convenient frame to in which to manipulate the data obtained by all the instruments , because in the platform frame the instruments have a fixed position . the body frame is a convenient frame to make calculations related to presenting stimulus to the subject , so that the subject need not make mental calculations to make sense of the stimulus . other tasks or calculations are convenient in each of the above reference frames . assuming small misalignment angles , the transformation matrix relating coordinates in the body frame to those of the platform frame are given by : c b p = [ 1 β z - β y - β z 1 β x β y - β x 1 ] ( 16 ) where β = misalignment angle about subscripted axis of the platform frame . calibrating the misalignment angles between the platform frame and the body frame is discussed in the “ initialization ” sections after equations ( 7 ) and ( 31 ). the misalignment of the other accelerometer input axes with respect to the platform axes are defined by the non - orthogonal matrix : c p a = [ 1 0 0 - α 5 ⁢ ⁢ z 1 0 α 6 ⁢ y - α 6 ⁢ x 1 ] ( 17 ) where the α terms are the misalignment angles of the accelerometers with respect to the platform frame , defined above . the misalignment of the gyroscope input axes with respect to the platform axes is defined by the non - orthogonal matrix : c p g = [ 1 α 1 ⁢ z - α 1 ⁢ y - α 2 ⁢ z 1 α 2 ⁢ x α 3 ⁢ y - α 3 ⁢ x 1 ] ( 18 ) where the α terms are defined analogously to the accelerometer case , as described above . the general approach to determining the tilt angles of the subject is to detect the direction of gravity in the platform frame . both accelerometer and gyro information is used to determine this . in one implementation , the direction of gravity as determined by each of the accelerometers and gyros can be displayed as a quaternion . in one implementation , quaternions determined from the accelerometers and from the gyros are combined to obtain a total quaternion . the total quaternion provides a more reliable estimate of the subject &# 39 ; s tilt because the individual gyro or accelerometer quaternions have been filtered prior to being combined . as with the single - axis case , filtering removes errors associate with drift , bias , or noise of the respective instruments . fig6 shows a multi - axis estimate of the subject &# 39 ; s tilt using quaternions . a gyro quaternion 63 , denoted q g will be used to rotate the platform frame into the local frame . from the gyro output 60 one can directly calculate the gyro quaternion 63 . by separating the orientation into a rotation about the vertical and a rotation about the horizontal , as will be described below , a horizontal quaternion 61 is calculated without knowledge of azimuth and is independent of azimuth gyro drift ( which can be difficult to directly determine ). as in the single axis case , drift in the nominally horizontal gyro is removed by using the accelerometers for low frequencies . the gyro quaternion q g in fig6 is defined as q v = [ cos ⁡ ( θ 2 ) 0 0 sin ⁡ ( θ 2 ) ] , θ = rotation about the vertical of inertial space with respect to the platform q h =[ h 1 h 2 h 3 0 ], a rotation quaternion about the horizontal ** indicates quaternion multiplication thus , q g transforms a vector in the platform frame to the local frame by rotating an appropriate angle about a horizontal axis , followed by an appropriate rotation about a vertical axis . the quaternion q h implementing the horizontal rotation is called the horizontal quaternion 61 , and the quaternion q v implementing the vertical rotation is called the vertical quaternion 62 . the angular rate of the platform with respect to inertial space , represented as a quaternion in the platform coordinate frame , is : { right arrow over ( ω )} p =[ 0 , ω 1 p ω 2 p ω 3 p ]. ( 20 ) the angular rate of the platform can be measured by the gyroscopes after compensating for bias , scale factor , and angular misalignments . using these measurements , one can determine the gyro quaternion 63 through the equation : substituting equations ( 19 ) and ( 20 ) into equation ( 21 ), one can then solve for the individual quaternion terms of q h . additionally , θ is directly determined by integration of the θ ′ equation below , so that the vertical quaternion can be determined by equation ( 19 ). the substitution of equations ( 19 ) and ( 20 ) into equation ( 21 ) yields : h 1 ′ ⁡ ( t ) = 1 2 ⁢ ( - ω 1 ⁢ h 2 ⁡ ( t ) - ω 2 ⁢ h 3 ⁡ ( t ) ) ⁢ ⁢ h 2 ′ ⁡ ( t ) = ω 3 ⁢ h 3 ⁡ ( t ) + ω 2 ⁢ h 2 ⁡ ( t ) ⁢ h 3 ⁡ ( t ) 2 ⁢ h 1 ⁡ ( t ) + ω 1 ⁡ ( h 1 ⁡ ( t ) 2 - h 3 ⁡ ( t ) 2 2 ⁢ h 1 ⁡ ( t ) ) ⁢ ⁢ h 3 ′ ⁡ ( t ) = - ω 3 ⁢ h 2 ⁡ ( t ) + ω 1 ⁢ h 2 ⁡ ( t ) ⁢ h 3 ⁡ ( t ) 2 ⁢ h 1 ⁡ ( t ) + ω 2 ⁡ ( h 1 ⁡ ( t ) 2 - h 2 ⁡ ( t ) 2 2 ⁢ h t ⁡ ( t ) ) ⁢ ⁢ θ ′ ⁡ ( t ) = ω 3 + ω 2 ⁢ h 2 ⁡ ( t ) h 1 ⁡ ( t ) - ω 1 ⁢ h 3 ⁡ ( t ) h 1 ⁡ ( t ) , ( 22 ) where the prime (′) indicates differentiation with respect to time t . to avoid clutter , in ( 22 ), the superscript p has been dropped . note that none of the time derivatives includes the azimuth angle θ . this allows the high - pass filter 64 and low - pass filter to act on the gyro signal 60 and accelerometer signal 65 respectively , so that h 1 , h 2 , and h 3 will approach the accelerometer - determined values . the h terms determine the horizontal quaternion 61 as above , which transforms a vector from the platform coordinates to a frame rotating about the vertical at the yaw rate . the gyro output 60 is obtained by transforming angular rates from gyro to platform coordinates . each gyro is linearly modeled as a scale factor plus bias . linear cross - axis terms are included in the misalignment angles defined by equation ( 18 ). the platform rates are solved directly from the three instrument voltages : [ v 1 v 2 v 3 ] = [ b 1 b 2 b 3 ] + [ s 1 0 0 0 s 2 0 0 0 s 3 ] ⁢ c p g ⁡ [ ω 1 ω 2 ω 3 ] ( 23 ) v = instrument output voltage , b = instrument bias , s = instrument scale factor , ω = rates measured in platform coordinates , and subscripts 1 - 3 refer to the individual gyros low - pass filtering the accelerometer outputs avoids inclusion of lateral accelerations and distance from rotation centers . the accelerometer output 65 , which is thus determined by gravity as defined in the platform frame , is : [ v 4 v 5 v 6 ] = [ b 4 b 5 b 6 ] + [ s 4 0 0 0 s 5 0 0 0 s 6 ] ⁢ c p a ⁡ [ - g 1 - g 2 - g 3 ] ( 24 ) in which gravity is a negative acceleration . from the accelerometer output 65 , one solves for the three components of acceleration in the platform frame . from the platform gravity vector , the measured gravity quaternion is defined as : { right arrow over ( ĝ )} p =[ 0 , ĝ 1 , ĝ 2 , ĝ 3 ] ( 25 ) the rotation quaternion about a horizontal axis for rotating gravity from platform coordinates to earth - fixed coordinates is : q a = [ cos ⁡ ( φ 2 ) , sin ⁡ ( φ 2 ) ⁢ g 2 g 1 2 + g 2 2 , - sin ⁡ ( φ 2 ) ⁢ g 1 g 1 2 + g 2 2 , 0 ] , ( 26 ) tan ⁡ ( φ ) = g 1 2 + g 2 2 g 3 , 0 ≤ φ ≤ π . this quaternion , q a , is called the accelerometer quaternion 66 . the zero in the fourth position of the accelerometer quaternion 66 specifies that the rotation is about a horizontal axis . the horizontal quaternion 61 determined by equation ( 19 ) and the accelerometer quaternion 66 determined by equation ( 26 ) are similar in form . a total quaternion 68 can be obtained by applying a high - pass filter 64 to the gyro quaternion 63 to remove gyro drift , and by applying a low - pass filter to the accelerometer quaternion 66 , and combining the results : { circumflex over ( q )} t ( s )= l p ( s ) { circumflex over ( q )} a ( s )+ h p ( s ) { circumflex over ( q )} g ( s ) ( 27 ) if poor estimates of the h terms are used in equation ( 22 ), the derivative h ′ will be calculated inaccurately . therefore , after an initial estimate is made , the derivatives are subsequently obtained from the total quaternion 68 . that is , the gyro quaternion 63 updates ( 19 ) as according to the equations : h 1 ⁢ g ′ ⁡ ( t ) = 1 2 ⁢ ( - ω 1 ⁢ h 2 ⁢ t ⁡ ( t ) - ω 2 ⁢ h 3 ⁢ t ⁡ ( t ) ) ⁢ ⁢ h 2 ⁢ g ′ ⁡ ( t ) = ω 3 ⁢ h 3 ⁢ t ⁡ ( t ) + ω 2 ⁢ h 2 ⁢ t ⁡ ( t ) ⁢ h 3 ⁢ t ⁡ ( t ) 2 ⁢ h 1 ⁢ t ⁡ ( t ) + ω 1 ⁡ ( h 1 ⁢ t ⁡ ( t ) 2 - h 3 ⁢ t ⁡ ( t ) 2 2 ⁢ h 1 ⁢ t ⁡ ( t ) ) ⁢ ⁢ h 3 ⁢ g ′ ⁡ ( t ) = - ω 3 ⁢ h 2 ⁢ t ⁡ ( t ) + ω 1 ⁢ h 2 ⁢ t ⁡ ( t ) ⁢ h 3 ⁢ t ⁡ ( t ) 2 ⁢ h 1 ⁢ t ⁡ ( t ) + ω 2 ⁡ ( h 1 ⁢ t ⁡ ( t ) 2 - h 2 ⁢ t ⁡ ( t ) 2 2 ⁢ h 1 ⁢ t ⁡ ( t ) ) ( 28 ) where the subscript “ g ” indicates a gyro quaternion from equation ( 22 ), the subscript “ t ” indicates a total quaternion from equation ( 27 ), and the ω i terms indicate the angular rates measured by the respective gyros and transformed into platform coordinates . because the accelerometer quaternion 66 is determined from acceleration ratios , its magnitude is always equal to 1 as expected for a rotation quaternion . the total quaternion 68 is normalized to 1 but the gyro quaternion 63 is not . the complementary filters 64 , 67 correctly extract the gyro quaternion &# 39 ; s oscillating portion so that the total quaternion 68 is close to 1 . the gyro quaternion 63 is inserted into the complementary filters 64 , 67 , which are numerically integrated by a second order runge - kutta ( b . carnahan , h . a . luther , and j . o . wilkes , applied numerical methods , john wiley and sons , new york , 1969 ). additionally , small damping terms could be added to equation ( 28 ) so that numerical or physical instabilities dampen over time . the total quaternion terms in equation ( 28 ) could be replaced with the low - passed terms derived from the accelerometers . the total quaternion 68 is used to determine when to fire tactors and which tactors to fire . the gravity in local coordinates , [ 0 , 0 , 0 , g ], is rotated by the conjugate of the total quaternion 68 to obtain the gravity in the platform frame . normalized to 1 , the gravity in platform coordinates is calculated from the total quaternion 68 by : the term h 1t defines the magnitude of the rotation as described in the convention for quaternions section above , or , by inspection of ( 29 ), all three terms can be employed . { circumflex over ( φ )}= a tan 2 (√{ square root over ( ĝ 2 + ĝ y 2 )}, ĝ z ) 0 ≦ φ ≦ π ( 30 ) the firing angle θ is the azimuth angle indicating the direction toward which the subject should move to correct his posture . the firing angle is measured from the roll axis about the positive ( nominally down ) yaw axis ( in body coordinates ) and is determined by : { circumflex over ( φ )}= a tan 2 [ ĝ y , ĝ x ]+ π = a tan 2 [− ĝ y ,− ĝ x ]= a tan 2 [− h 2t , h 3t ] ( 31 ) if the roll axis is up while the pitch axis is horizontal , the subject is leaning backward . in this case , the acceleration sensed by the x - axis accelerometer is positive , which means the sensed g x is negative . consistent with ( 31 ), the front tactor will be commanded to vibrate . as another example , assume the subject leans forward and right . in this case , the x and y accelerometers will indicate positive gravity ( negative acceleration ). therefore the tactors behind and to the left of the subject will vibrate . the tactors drive the subject to the nulls defined by the sensors &# 39 ; output signals . because of the complementary filters 64 , 67 , the low frequency ( below 0 . 03 hz ) null is determined by the accelerometers . the prosthesis is therefore initialized to align the subject &# 39 ; s comfortable vertical with that indicated by the accelerometers . in addition , the sensors &# 39 ; bias ( the output signal when no acceleration or angular rate is applied ) can drift between factory ( test station ) calibration and field tests with subjects . changing instrument bias is equivalent to the instrument &# 39 ; s null changing with time . beforehand , on a test station , the prosthesis undergoes a stationary calibration in which each sensor &# 39 ; s bias , scale factor , and the misalignment angles with respect to the isa reference plane are calibrated . because the balance prosthesis seeks to null the sensor outputs , the sensor bias , and particularly accelerometer bias , is generally more important than the scale factor . thus , initialization focuses on instrument - to - platform and platform - to - body misalignment angles and sensor bias . the stationary calibration can be performed by measuring a lumped bias or by assuming the factory bias and determining the body - to - platform misalignments . the lumped bias approach combines the accelerometer bias and alignment angles . the instrument sensory assembly ( isa ) is mounted on the subject and adjusted to be nearly level , using , for example , a bubble level on the isa . the leveling implies that the sensor input axes are close to horizontal and vertical . thus , misalignments between the subject &# 39 ; s vertical and the isa are small angles . with assistance , the subject stands vertical long enough to accomplish the initialization , for example one second . with the assumption of no motion , the gyro outputs are recorded as gyro bias . again assuming no motion , the horizontal accelerometer outputs contain sensor bias plus misalignment times gravity terms . these are automatically entered as a bias ( the “ lumped ” bias ). the lumped bias effectively nulls the accelerometers to the subject &# 39 ; s comfortable vertical and removes accelerometer drift . at this point , the angles between the accelerometers and subject vertical are not known ; however , for low frequency and steady state , the isa will drive the subject to his vertical . because the angles are not known , the knowledge of the vertical at high frequencies ( gyro alignment is assumed small ) and high roll and pitch angles is not perfect but sufficient for null - seeking prostheses . the periodic bias calibration allows less costly instruments to be used . a second option is to assume that accelerometer bias is constant and does not require periodic recalibration . a third option is to provide a simple calibration fixture so that the sensors &# 39 ; bias can be measured immediately before mounting the isa to the subject . accelerometer bias can be calculated from the average of its outputs after the input axis is initially aligned up and then its alignment is reversed . this procedure is relatively insensitive to alignment angles and can be done without a precise test table . during the on - subject initialization , one can solve for the misalignments of the accelerometers and employ the factory - supplied misalignments of the gyros with respect to the accelerometers . one need not determine misalignment about the vertical , i . e ., the azimuth alignment between the tactors and the isa . because the tactors are used in closed loop control , precise knowledge of azimuth alignment is not necessary . a number of embodiments of the invention have been described . nevertheless , it will be understood that various modifications may be made without departing from the spirit and scope of the invention . for example , vibrating elements other than tactors may be used to deliver information to the subject . moreover , signals other than tactile signals can be provided to the subject . for example , an acoustic signal can be delivered through a headset or a visual signal can be delivered by selectively illuminating light sources . moreover , other multi - axis estimation methods may be used , for example estimates based on euler angles , redundant euler angles , or estimates made using a kalman filter . examples of these types of multi - axis estimates are given below . one way to uniquely specify the orientation of a body can be done using euler angles . “ euler angles ” are similar to misalignment angles described above . in this document roll , pitch , and yaw angles are used to describe euler angles . other angles may be used . the prosthesis determines the roll and pitch angles of the subject with respect to local coordinates as described below . determining the yaw angle is of little importance , because motion consisting of purely changing yaw ( e . g . standing still at the center of a slowly spinning merry - go - round ) poses little danger to vestibulopathic subjects . the transformation from local coordinates to the body frame is calculated by : ⁢ where ( 32 ) c y = [ cos ⁡ ( y ) sin ⁡ ( y ) 0 - sin ⁡ ( y ) cos ⁡ ( y ) 0 0 0 1 ] ( 33 ) c p = [ cos ⁡ ( p ) 0 - sin ⁡ ( p ) 0 1 0 sin ⁡ ( p ) 0 cos ⁡ ( p ) ] ( 34 ) c r = [ 1 0 0 0 cos ⁡ ( r ) sin ⁡ ( r ) 0 - sin ⁡ ( r ) cos ⁡ ( r ) ] ( 35 ) and p is the pitch angle , r is the roll angle , and y is the yaw angle . these transformation matrices are orthogonal . the pitch angle p is limited to − π / 2 & lt ; p & lt ; π / 2 . this is a mathematical , not physical , limitation related to the phenomenon of “ gimbal lock .” if operation near p =± π / 2 is required , variables can be redefined ( for example , exchange definitions of pitch and roll ) or augmented ( e . g ., by adding a fourth euler angle , as described below in redundant gimbal euler angles ) to avoid the singularity . the angular rates sensed in the body frame are related to the derivatives of the euler angles through : for vectors , the subscript lb indicates that the rate is that of the base with respect to the local frame and the superscript b indicates that the quantities are measured or defined in the body frame . transformations ( 32 ) through ( 35 ) are orthogonal so that their respective transposes are also their inverses . transformation ( 37 ), however , is not orthogonal . the outputs of the gyros are obtained by transforming roll , pitch and yaw rates into components along the gyros &# 39 ; input axes . each gyro is modeled as a simple bias plus scale factor . the output signals are : [ v 1 v 2 v 3 ] = [ b 1 b 2 b 3 ] + [ s 1 0 0 0 s 2 0 0 0 s 3 ] ⁢ c p g ⁢ c b p ⁢ c ypr b ⁡ [ r . p . y . ] ( 41 ) where the v terms represent the output voltages of each gyro , and c b p , c p g are matrices given by equations ( 16 ) and ( 28 ) respectively . the gyro outputs are obtained from inserting equation ( 37 ) into equation ( 41 ): for small angles and small yaw rates , each gyro senses a single rate . this results in two single - axis feedback loops . as expected , the outputs in equation ( 42 ) do not depend on the yaw angle . [ v 4 v 5 v 6 ] = [ b 4 b 5 b 6 ] + [ s 4 0 0 0 s 5 0 0 0 s 6 ] ⁢ c p a ⁢ c b p ⁢ c l b ⁡ [ 0 0 - g ] ( 43 ) where the v terms represent the output voltages of the accelerometers . equation ( 43 ) assumes that the accelerometer input axis is aligned nominally with + z ( down ) so that gravity causes a negative voltage . including the body - to - platform and accelerometer - to - platform misalignments in the previous equation , the accelerometer outputs from gravity are : [ v 4 v 5 v 6 ] = [ b 4 + gs 4 ⁡ [ sin ⁡ ( p ) ] b 5 - gs 5 ⁡ [ cos ⁡ ( p ) ⁢ sin ⁡ ( r ) ] b 6 - gs 6 ⁡ [ cos ⁡ ( p ) ⁢ cos ⁡ ( r ) ] ] + [ gs 4 ⁡ [ - β z ⁢ cos ⁡ ( p ) ⁢ sin ⁡ ( r ) + β y ⁢ cos ⁡ ( p ) ⁢ cos ⁡ ( r ) ] - gs 5 ⁡ [ β x ⁢ cos ⁡ ( r ) ⁢ cos ⁡ ( p ) + ( β z + α 5 ⁢ z ) ⁢ sin ⁡ ( p ) ] + gs 6 ⁡ [ ( β x + α 6 ⁢ x ) ⁢ cos ⁡ ( p ) ⁢ sin ⁡ ( r ) + ( β y + α 6 ⁢ y ) ⁢ sin ⁡ ( p ) ] ] ( 44 ) this equation accounts for all the misalignment terms . a more detailed representation can also include lateral accelerations of the body frame . in what follows , the accelerometer outputs are low - pass filtered , to remove the effect of the lateral accelerations on the measurement . thus , there is no need to account for them in equation ( 44 ). fig7 shows how the euler angles of the subject are calculated . either the gyro ( 42 ) or accelerometer ( 44 ) equations can be solved to obtain roll and pitch angles . the gyro equations determine a high - frequency roll estimate 71 and a high - frequency pitch estimate 72 ; and the accelerometer equations will determine a low - frequency roll estimate 75 and a low - frequency pitch estimate 76 . because the accelerometer signals contain angular and lateral accelerations and because gyro drift is integrated to obtain the roll and pitch , it is desirable to calculate the roll and pitch by low - pass filtering the output of the accelerometers and by high - pass filtering the output of from the gyroscopes . the low - frequency roll estimate 75 and pitch estimate 76 are obtained from the accelerometer outputs 74 by inverting equation ( 44 ) and filtering through a low - pass filter 77 : where { circumflex over ( r )} l , { circumflex over ( p )} l = low frequency portion of roll , and pitch estimates a tan 2 = two argument arc tangent . here a tan 2 ( yx )= a tan ( y / x ) in the first quadrant â p = acceleration in platform frame based on measurement in accelerometer frame , i . e . c a p =( c p a ) − 1 = transformation matrix from accelerometers to platform frame . if needed the body to platform misalignments c b p can be included . for small pitch angles , the second variable in a tan 2 is roughly 1 g so that the small axis approximation holds . in equation ( 46 ), the roll estimated from both the gyros and accelerometers is used . optionally , { circumflex over ( r )} in equation ( 46 ) can be replaced with { circumflex over ( r )} l . from equation ( 42 ), one obtains the euler angle rates from the measured gyro outputs 70 . these are , with misalignment angles omitted and high - pass filter 73 included , in equations ( 47 )-( 49 ), h p is the high - pass filter described by equation ( 6 ). the angular rates specified in equations ( 47 )-( 49 ) employ the combined roll 78 and pitch 79 , as described in equations ( 50 )-( 51 ). this reduces accumulation of drift during gyro integration . the angular rates for roll and pitch can be directly integrated to obtain a high - frequency roll estimate 72 and a high - frequency pitch estimate 73 . the combined roll angle 78 and pitch angle 79 are defined as follows : the high and low - pass filters are complementary . in laplace transform notation : the integral of yaw rate in equation ( 49 ) is not used since the yaw angle appears in no other expressions . the low - frequency roll estimate 75 and pitch estimate 76 do not depend on prior knowledge of the roll and pitch . as long as the accelerometer coefficients are known , the low frequency angles are determined and the subject will stand about his vertical on the average . additionally , small damping terms could be added to equations ( 47 ) and ( 48 ) so that numerical or physical instabilities dampen over time . the total pitch and roll terms could be replaced with the low passed terms derived from the accelerometers . another approach involves a fourth , redundant euler angle whose function is similar to the redundant gimbal in inertial navigation systems . the redundant euler angle is added to the traditional yaw , pitch , and roll angles . the redundant euler angle is selected so that the pitch angle remains near null , thereby avoiding effective gimbal lock . this approach allows the accelerometers to estimate low frequency components of tilt ( below 0 . 03 - 0 . 3 hz ) while the gyros estimate the higher frequency components without requiring low frequency yaw information . this formulation is useful because the accelerometers only yield information about tilt and not azimuth . the redundant euler angle is implemented as follows . the transformation from local coordinates to body coordinates is calculated by : where c r , c p , and c y are as above and c j is rotation about the redundant angle , defined by : the angular rates sensed in the body frame are related to the derivatives of the euler angles through : ω → lb b = c a b ⁡ [ j . r . p . y . ] , ( 55 ) the subscript “ lb ” indicates that the rate is that of the body with respect to the local frame and the superscript “ b ” indicates that the quantities are measured or defined in the body frame . the c a b transformation is not orthogonal . for ease of explanation , it is assumed that the instruments are aligned with the body frame . this assumption can be relaxed by introducing additional transformations to account for misalignment , as was done above . the gravity vector g y is fixed in the yaw frame and takes the form : a vector defined in the yaw frame is transformed into body coordinates by the transformation : for nominal position , the input axis of the yaw accelerometer is down and the yaw accelerometer will therefore detect gravity as a negative acceleration . the gravity vector in the body frame is : the roll , pitch , and yaw rates can be determined as functions of angular rates ω x , ω y , and ω z sensed by the gyroscopes in the body frame by solving : { dot over ( r )} = sin ( j )( ω z − ω x cos ( r ) tan ( p ))+ cos ( j )( ω x + ω z cos ( r ) tan ( p )) { dot over ( p )} =(− ω z cos ( j )+ ω x sin ( j )) sin ( r )+ cos ( r )( ω y −{ dot over ( j )} ) { dot over ( y )} = sec ( p )( ω z cos ( j ) cos ( r ))− ω x cos ( r ) sin ( j )+ sin ( r )( ω y −{ dot over ( j )} ) ( 59 ) where p , r , j and y , are functions of time . in addition to these three equations , a control law for both the accelerometer and gyro equations , { dot over ( j )}= pk p if cos ( r )≧ 0 , otherwise { dot over ( j )}=− pk p is added , where k p is a positive constant . in an exemplary embodiment , k p is between 20 and 100 radians / second . thus , a system of four equations in four variables is obtained . such a system can be solved using ordinary methods . the solution , which is based on the outputs of the gyroscopes , can be combined with the accelerometer output as described above to yield a total measurement of the wearer &# 39 ; s tilt . fig8 shows a thirteen - state extended kalman filter 80 that can be used to obtain tilt estimates using the sensor platform . the thirteen states include six first - order markov processes for low frequency sensor drifts , three first - order markov processes for angular rate , and four states for propagating the quaternions representing the subject &# 39 ; s tilt . it is emphasized that kalman filters can be designed with more or fewer states , but that the underlying principles are similar . the markov processes for the sensors coupled with the wide bandwidth noise on the sensor output shape the kalman filter to a response similar to that of the high - and low - pass filters described above . in this context , the gyro and accelerometer biases are modeled as first - order markov processes and wide bandwidth noise . the body frame input angular rates are also modeled as first - order markov processes . the angular rates are related to the quaternions , which define angular orientation , through the nonlinear first - order quaternion differential equation ( 14 ). three gyro biases , three accelerometer biases , three angular rates , and four quaternions result in thirteen states . for the sensor models , the markov process appears in the state vectors while the wide bandwidth noise is output noise . in state space , the markov processes for sensor bias and input angular rate are modeled as : ⅆ x → 1 - 9 ⅆ t = a 11 ⁢ x → 1 - 9 + b 1 ⁢ w → ( 60 ) x → 1 - 9 = [ b g ⁢ ⁢ 1 b g ⁢ ⁢ 2 b g ⁢ ⁢ 3 b a ⁢ ⁢ 1 b a ⁢ ⁢ 2 b a ⁢ ⁢ 3 ω 1 ω 2 ω 3 ] t ( 61 ) b 1 = diag ⁡ [ ω g ω g ω g ω a ω a ω a ω θ ω θ ω θ ] ( 62 ) a 11 = - b 1 ( 63 ) w = [ b gn ⁢ ⁢ 1 b gn ⁢ ⁢ 2 b gn ⁢ ⁢ 3 b an ⁢ ⁢ 1 b an ⁢ ⁢ 2 b an ⁢ ⁢ 3 ω n ⁢ ⁢ 1 ω n ⁢ ⁢ 2 ω n ⁢ ⁢ 3 ] t , ( 64 ) where { right arrow over ( x )} 1 - 9 represents a state vector ; { right arrow over ( w )} represents a white noise vector ; b g is gyro bias ; b a is accelerometer bias ; ω is angular rate ; subscripts 1 - 3 indicate sensor axes nominally aligned with roll , pitch , and yaw respectively ; ω a and ω g are the break frequencies of the markov processes for accelerometer and gyro biases , respectively ; b gn and b an are gyro and accelerometer biases , respectively ; ω n is the angular rate generator , and ω θ is the break frequency of tilt input . in an exemplary embodiment , b g = 0 . 0024 rad / s rms with 0 . 006282 rad / s break frequency ; b a = 0 . 012 m / s 2 rms with 0 . 006283 rad / s break frequency ; ω = 0 . 18 rad / s rms with 12 . 56 rad / s break frequency ; ω g = ω a = 0 . 006283 rad / s , b gn = 0 . 043 rad / s /√ hz double sided ; b an = 0 . 22 m / s 2 /√ hz double sided ; ω n = 0 . 07 rad / s /√ hz , and ω θ = 12 . 56 rad / s . when the bias and angular rate thus generated are passed through their associated transfer functions , the states &# 39 ; rms biases result . in what follows , both the measurement and input noise are assumed to be zero mean . this assumption may be relaxed using standard techniques . from equation ( 14 ), the quaternion propagation leads to the following four nonlinear first order differential equations : q . 1 = - 1 2 ⁢ ( ω 1 ⁢ q 2 + ω 2 ⁢ q 3 + ω 3 ⁢ q 4 ) ( 65 ) q . 2 = 1 2 ⁢ ( ω 1 ⁢ q 1 - ω 2 ⁢ q 4 + ω 3 ⁢ q 3 ) ( 66 ) q . 3 = 1 2 ⁢ ( ω 1 ⁢ q 4 + ω 2 ⁢ q 1 - ω 3 ⁢ q 2 ) ( 67 ) q . 4 = 1 2 ⁢ ( - ω 1 ⁢ q 3 + ω 2 ⁢ q 2 + ω 3 ⁢ q 1 ) ( 68 ) where [ q 1 , q 2 , q 3 , q 4 ] is the quaternion defining rotation between body and local coordinates . the complete 13 - state vector is given by : x → ⁢ = [ x → 1 - 9 t q 1 q 2 q 3 q 4 ] t ( 69 ) the gyro outputs are linearly related to the input rate and gyro bias by : y → g = [ v g ⁢ ⁢ 1 v g ⁢ ⁢ 2 v g ⁢ ⁢ 3 ] = [ i 3 ⨯ 3 o 3 ⨯ 3 i 3 ⨯ 3 o 3 ⨯ 4 ] ⁢ x → + [ v g ⁢ ⁢ n ⁢ ⁢ 1 v gn ⁢ ⁢ 2 v gn ⁢ ⁢ 3 ] , ( 70 ) where v g is the gyro output ( measured in rad / s ), v gn is gyro additive white noise , i is the identity matrix , and o is the zero matrix . in an exemplary embodiment , v gn = 6 . 8 × 10 − 4 rad / s /√ hz double sided = 140 °/ h /√ hz double sided . the accelerometer outputs are linearly related to the accelerometer bias and are nonlinear in the quaternions that transform gravity into body coordinates . the unwanted high frequency subject accelerations are represented by additive white noise . additional states could more flexibly represent high frequency accelerations . the accelerometer outputs are linearly related to the input rate and accelerometer bias by : y → ⁢ a = [ v a ⁢ ⁢ 1 v a ⁢ ⁢ 2 v a ⁢ ⁢ 3 ] = [ 0 3 ⨯ 3 i 3 ⨯ 3 0 3 ⨯ 7 ] ⁢ x → + g ⁡ [ 2 ⁢ ( - q 1 ⁢ q 3 + q 2 ⁢ q 4 ) 2 ⁢ ( q 1 ⁢ q 2 + q 3 ⁢ q 4 ) q 1 2 - q 2 2 - q 3 2 + q 4 2 ] + [ v an ⁢ ⁢ 1 v an ⁢ ⁢ 2 v an ⁢ ⁢ 3 ] , ( 71 ) where g =− 9 . 81 m / s 2 , v a is accelerometer output ( measured in m / s 2 ), and v an is accelerometer noise . in an exemplary embodiment , v an = 0 . 069 m / s 2 /√ hz double sided . the gyro noise is typically that of a commercial gyro , while the accelerometer noise is selected to yield accelerometer frequencies near 0 . 03 hz as used in the complementary filters . both the measurement and input noise are assumed to be zero mean , with the measurement noise not correlated to the input noise . these assumptions can be relaxed according to known techniques . for what follows , it is convenient to convert the continuous linear model described above to the discrete domain . in an exemplary embodiment , this is done by assuming a 0 . 01 s sampling interval , t s , and that other inputs are constant across the sampling interval . the zero order hold ( zoh ) assumption is also made , as described in k . ogata , “ modern control engineering ”, prentice - hall , englewood cliffs , n . j ., 1970 . for the stochastic inputs , the power spectral densities of the continuous case are transformed to covariance by integrating the white noise power spectral densities ( psds ) from minus nyquist to nyquist frequency . in an exemplary embodiment , the nyquist frequency is 0 . 5 / t s . thus q n = e ⁡ [ w → ⁢ w → t ] ⁢ ⁢ = [ 0 . 188 ⁢ ( r ⁢ / ⁢ s ) 2 ⁢ i 3 ⨯ 3 0 3 ⨯ 3 0 3 ⨯ 3 0 3 ⨯ 3 4 . 80 ⁢ ( m ⁢ / ⁢ s 2 ) 2 ⁢ i 3 ⨯ 3 0 3 ⨯ 3 0 3 ⨯ 3 0 3 ⨯ 3 0 . 49 ⁢ ( r / s ) ) 2 ⁢ i 3 ⨯ 3 ] ( 73 ) r n = e ⁡ [ v → ⁢ v → t ] = [ 4 . 70 ⨯ 10 - 5 ⁢ ( r ⁢ / ⁢ s ) 2 ⁢ i 3 ⨯ 3 0 3 ⨯ 3 0 3 ⨯ 3 0 . 480 ⁢ ( m ⁢ / ⁢ s 2 ) 2 ⁢ i 3 ⨯ 3 ] ( 74 ) where e [ ] is the expected value operator , q n is the discrete covariance of the inputs ( 64 ) at time step n , and r n is the discrete covariance of outputs ( 70 - 72 ) at time step n . again , inputs 1 - 3 correspond to gyros , and inputs 4 - 6 correspond to accelerometers . because the noise is separate from the nonlinear dynamics in the equations of motion and the output equation , we can employ the extended kalman filter , in which the states are propagated between measurements by the continuous equations and the states are updated by measurements at discrete times . see a . gelb , ed . “ applied optimal estimation ”, m . i . t . press , cambridge , mass . 1974 (“ gelb ”). we treat the initial covariance of the states as known . in practice , such initial covariance can be readily determined . generally , the kalman filter will cycle between two phases : prediction and correction . during the prediction phase , the kalman filter will predict the subject &# 39 ; s state at the time of the next measurement , based on the subject &# 39 ; s previously corrected state . in the correction phase , the kalman filter will account for differences between the subject &# 39 ; s predicted state and the subject &# 39 ; s actual state , as determined from the measurement . between measurements , the subject &# 39 ; s state at the time of the next measurement is predicted by a state predictor 82 , and the covariance at that time is predicted by a covariance predictor 83 . the predictors 82 , 83 calculate a new state and covariance , respectively , according to the formulas ⅆ x → ^ ⅆ t = f ⁡ [ x → ^ ] ( 75 ) p k + 1 = a z ⁡ [ x → ^ k ⁡ ( + ) ] ⁢ z k ⁢ a z t ⁡ [ x → ^ k ⁡ ( + ) ] + b z ⁢ q n ⁢ b z t ⁢ ( 76 ) where the nonlinear function ƒ , which is obtained from equations ( 60 )-( 69 ), describes the predictor 82 , and where the predictor 83 produces p k + 1 as the predicted covariance based on an old covariance z k . the numerical integration starts with initial conditions { right arrow over ({ circumflex over ( x )} k (+) and ends at { right arrow over ({ circumflex over ( x )} k + 1 (−). the matrices a and b are calculated by linearizing equations ( 53 )-( 62 ). the zoh discrete matrices a z and b z are recalculated at each step , periodically , or when the state estimates exceed certain value . in integrating the nonlinear function ƒ in equation ( 75 ), zero mean noise inputs are omitted . after the measurement , which reads the sensor voltage 81 and corrects for instrument drift , misalignment , and other errors described above , the predicted state estimate is corrected by a state corrector 84 . the corrector 84 is implemented by the formula : { right arrow over ({ circumflex over ( x )} k (+)= { right arrow over ({ circumflex over ( x )} k (−)+ m k { y k − h [{ right arrow over ({ circumflex over ( x )} k (−)]}. ( 77 ) the nonlinear function h is obtained from equations 70 - 72 . the matrix m k is called the innovation matrix . generally , the innovation matrix accounts for differences between the predicted state and the measured state . with each measurement , the innovation matrix is recalculated by an innovation matrix updater 85 that is implemented by the formula m k = p k h t [{ right arrow over ({ circumflex over ( x )} k (−)]{ h [{ right arrow over ({ circumflex over ( x )} k (−)] p k h t [{ right arrow over ({ circumflex over ( x )} k (−)]+ r } − 1 . ( 78 ) the covariance is corrected after the measurement by a covariance corrector 86 . the corrected covariance z k is determined from the formula : z k = { i - m k ⁢ c ⁡ [ x → ^ k ⁡ ( - ) ] } ⁢ p k , ⁢ p k = [ ( x → k - x → ^ k ⁡ ( - ) ) ⁢ ( x → k - x → ^ k ⁡ ( - ) ) t ] = previously ⁢ ⁢ predicted ⁢ ⁢ covariance , ⁢ and ⁢ ⁢ z k = e ⁡ [ ( x → k - x → ^ k ⁡ ( + ) ) ⁢ ( x → k - x → ^ k ⁡ ( + ) ) t ] = corrected ⁢ ⁢ covariance . ( 79 ) any of the multi - axis , large angle vertical detection algorithms ( euler angles , quaternions , redundant euler angles , or kalman filter ) estimate the elevation angle φ and the azimuth angle θ . the azimuth indicates the direction toward which the subject &# 39 ; s head should move for the subject to attain vertical . the elevation is restricted to 0 to π radians , and indicates how far the subject has moved from vertical . for a given elevation angle , if the elevation angle is changing faster than a certain threshold , one would expect that the risk of a fall is heightened . if the elevation angle is beyond a different threshold , one would expect a fall is imminent . in either case , it is useful to trigger remedial action . an exemplary decision space 90 , depicted for example in fig9 , is used to determine when to trigger remedial action , and what type of action is called for . when the subject has a particular elevation which is changing at an acceptably low rate , the subject is within the “ safe zone ” 91 and no remedial action is triggered . for example , in fig9 , for an upright subject ( angle of elevation = 0 ), the subject &# 39 ; s elevation may change at a rate less than |{ dot over ( φ )} 0 | and remain in the safe zone . for motion beyond this range , the subject is outside the safe zone , and remedial action will be taken . for non - zero elevation , a negative rate larger than the positive rate may be permissible , since , a negative rate would indicate that the subject is moving toward the vertical . the decision space may be partitioned into several regions , one of which being the safe zone 91 . other regions correspond to different remedial actions . for example , region 92 may be chosen to reflect situations in which the subject bears a heightened ( but not imminent ) risk of falling . in this case , remedial action such as sounding an alarm or providing additional stimulus to the subject may be taken . region 93 may be chosen to reflect situations in which a fall is imminent . in this case , remedial action intended to mitigate the adverse effects of the fall may be taken . for example , the prosthesis may : deploy an airbag or initiate an automated call for help .
among other things , a vestibular prosthesis includes a wearable motion sensing system , the motion sensing system generating a motion signal indicative of a motion thereof , wherein the motion includes rotation about two distinct axes ; a signal processor in communication with the motion sensing system , the signal processor being configured to generate an estimate of a tilt of the motion sensing system ; and an actuator responsive to the estimate of the tilt made by the signal processor .