Turmell-Meter: A Device for Estimating the Subtalar and Talocrural Axes of the Human Ankle Joint by Applying the Product of Exponentials Formula

The human ankle is a complex joint, most commonly represented as the talocrural and subtalar axes. It is troublesome to take in vivo measurements of the ankle joint. There are no instruments for patients lying on flat surfaces; employed in outdoor or remote sites. We have developed a “Turmell-meter” to address these issues. It started with the study of ankle anatomy and anthropometry. We also use the product of exponentials’ formula to visualize the movements. We built a prototype using human proportions and statistics. For pose estimation, we used a trilateration method by applying tetrahedral geometry. We computed the axis direction by fitting circles in 3D, plotting the manifold and chart as an ankle joint model. We presented the results of simulations, a prototype comprising 45 parts, specifically designed draw-wire sensors, and electronics. Finally, we tested the device by capturing positions and fitting them into the bi-axial ankle model as a Riemannian manifold. The Turmell-meter is a hardware platform for human ankle joint axes estimation. The measurement accuracy and precision depend on the sensor quality; we address this issue by designing an electronics capture circuit, measuring the real measurement with a Vernier caliper. Then, we adjust the analog voltages and filter the 10-bit digital value. The Technology Readiness Level is 2. The proposed ankle joint model has the properties of a chart in a geometric manifold, and we provided the details.


Introduction
Taking in vivo measurements in the human ankle joint is troublesome because the ankle is a complex mechanism [1]. Deviations in the axis increase the pronation or supination moments, causing instability and enhancing injuries risk. In this work, we present a device intended for the study of the human ankle joint (HAJ). Modeling and measuring this lower limb joint is essential in physiology, biomechanics, and rehabilitation (also in humanoid robotic limb development).
Our primary aim is to develop a device for the two axes model estimation of the human ankle joint. Secondary objectives are: it must be non-invasive, compact, energy-efficient, and easy to set up and transport. It should also be compatible with laying positions, such as with the foot in the elevated position. To accomplish the objectives, we followed a plan, first by understanding the ankle movements. Then, we used statistics for dimensional determination. We also use a modern approach, such as the Product of Exponential (POE) formula. We then designed the structure based on embedded non-invasive distance sensors.
Our contribution to the ankle joint axis localization is the holistic development of a specific device. Draw-wire sensors measure distance, are composed of a wire wound around a drum, and are attached to a potentiometer and a spring. They are retractile with constant tension. For bias correction and gain calibration, we designed a capture system. We adjust the voltage to avoid the maximal value of the analog-to-digital conversion. We calibrated each sensor through direct measuring with a Vernier caliper. Then, we measured the voltage and adjusted the offset and gain by a calibration program in Processing (Software). Limitation measurements are by 10-bit analog-to-digital converters and digitally filtered in the acquisition board. Technology Readiness Level (TRL) is 2.
We highlight our approach over traditional methods because we apply the POE formula to the ankle kinematic model. Furthermore, we estimate the ankle axis localization by a geometric approach, solved algebraically. We computed it from the pseudo-inverse application. For the talocrural and subtalar axes estimation, we use circle fitting. As an alternative ankle joint representation, we propose a Riemannian chart. We have limited the scope to the human ankle joint (HAJ) model. There are applications in physical therapy and HAJ mobility diagnosis.
Draw-wire sensors (DWS) are distance measurement sensors, who use a wire coiled on a drum attached to a potentiometer and a spiral spring that are retractile at constant tension. Similar robotic applications are in [28][29][30], also in linear position tracking [31], and easy robot programming [32]. Inertial measurement units (IMU) were post-processed and complemented with other sensors [33][34][35][36][37]. We shall employ our device for the HAJ bi-axial measurements and for other models as well [38]. Biodex TM and Humacnorm TM are manufacturers of general kinetics machines.
We divide the materials and methods section into two subsections: the motion theory and the mechatronics design. In the first section, we study anatomy, statistics, proportions, and anthropometry to understand the functional HAJ movements and standard dimensions. Then we perform the HAJ simulation using the POE formula. Here, we do not include a deep study of infinitesimal kinematics. We intend to design a device for a healthy HAJ with no singularities with a continuous range of movement. We describe the trilateration method to find the platform pose. It is a geometrical method based on tetrahedrons; we avoid numerical solutions that depend on finite derivative terms. The tetrahedron is a well-defined 3D geometrical structure. Solving tetrahedron geometry is the expansion of planar trigonometry. Knowing the sides allows us to find the height of a tetrahedron. We attach the platform to the foot; the sensors are passive elements and do not support or add high tensile forces. We have selected the first seven sensor configurations 3-2-2 (seven sensors) instead of 3-3-3 (nine sensors) or 3-2-1 (five sensors) for hardware limitations, sensor redundancy, and symmetrical design (for both limb use).
The device's mechatronics design and implementation are in the second subsection. We used Draw-wire sensors to measure the tetrahedron sides. These sensors have a constant tension because they comprise a drum attached to a spiral spring. We limit them to the maximal distance, and the precision depends on the potentiometer and electronics signal conditioning with a high common-mode rejection ratio (CMRR). The calibration process deals with accuracy and precision. First, we made rough adjustments to the acquisition system. Second, the software calibration process makes fine adjustments. Our proposed method avoids numerical errors because it uses geometric formulas. We validate the position through sensor redundancy. We conduct calibration and testing in a healthy patient and represent the HAJ movements as a manifold chart. The complementary source code was uploaded to [39].

Materials and Methods
This section is grouped in two main subsections, first the motion theory, and second the mechatronic system. For the first part, we show the simulation using anthropometric values and the POE formula. Using the plots, we estimate the DWS maximal length. Next, we present the device's geometrical design and the trilateration method. Finally, we compute the axis position by circle fitting and modeling the ankle joint as a Riemannian manifold chart. In the second subsection, we describe the mechanics design and implementation, we used SolidWorks ® (2017-2018 Student Edition, Dassault Systèmes, Vélizy-Villacoublay, France), KiCad © (6.0.4, Jean-Pierre Charras and KiCad developers, CERN, Linux Foundation), and FreeCad © (0.19, Jürgen Riegel, Werner Mayer, Yorik van Havre and others) StepUp tools addon.

Motion Theory
For the simulation with the POE formula, we adapt the data from [40], proportions from [41,42], and statistics from [43]. Figure 1 presents the reference points and the mean distances taken from [40].  A, B, and C are the triangle's vertices in a platform fixed to the foot, the K, L, and O distances from the most medial and lateral points from the black-filled to the white-filled marker. M 1 and M 2 define the talocrural (TC) axis. We show top-transverse and rightlateral views in Figure 2 with distances Q, W, and w. N 1 and N 2 determine the subtalar (ST) axis.

Anatomical and Geometrical Correspondence
We define the sagittal (lateral) plane as the X-Z plane (perpendicular to the y-axis). The coronal (frontal) plane is the Y-Z plane (x-axis is normal to it); the transverse (axial) plane is the X-Y plane (perpendicular to the z-axis). Figure 4, left, shows this corresponding references.  With this reference frame, we can define the TC axis orientation from a unitary vector in the z-direction. We first rotate it −80°around the x-axis; then we turn it −6°around the z-axis. A unitary vector in the x-axis direction defines the ST axis, rotating 41°about the y-axis, followed by a 23°rotation around the z-axis.
We show the fibula, tibia, talus, calcaneus 3D position, reference points, TC, and ST axes in Figure 4, right.
In this image, A 0 , B 0 , and C 0 are the vertices from the platform fixed to the foot, and P M is the triangle's center. S 1 , S 2 , and S 3 are fixed to the shank relative to the origin point P 0 . M 1 and M 2 define the TC axis; N 1 and N 2 correspond to the ST axis. We define r 1 and r 2 as the sagittal plane intersection with the TC and ST axes.

Size and Dimensions
This first part help us to determine the HAJ axes direction and orientation for some cases. However, it is difficult to design a device that fits all humans, and we cannot make a device that fits 90 % percentiles; we intend to design a device scalable and adjustable in a defined population group. We also make an effort to design adjustable foot and shank attachments. To do so, we select the device dimensions using the proportions extracted from [41]. The heigh is H, and the proportions we use are: distance from the knee to the foot is 0.285H, the distance from the ankle to the foot is 0.039H and the foot widht is 0.055H and the foot length is 0.152H.
We select the origin of coordinates between the knee and the ankle, d m is the distance from P M to P O . This distance is proportional to the body's height H. To do so, we define d m as follows: For the sake of obtaining the prototype dimensions, we use statistics for a specific population. In [43], the mean height H of an adult male is 175 cm; by substituting this value into the equation, the knee-ankle distance is 28.35 cm. The distance d p12 between points r 1 and r 2 about the TC and ST axes on the sagittal plane is: the projection of the most medial point (MMP) on the sagittal plane is: and for the most lateral point is: The point M 1p is the projection of M 1 on the sagittal plane; we calculate it from the P and O values.
also, M 2p is M 2 ; we estimate the projection from L and K through: Therefore, the segment M 2 M 1 has the sagittal projection M 2p M 1p ; it has the same proportional relation R = W/w in respect to M 2p r 1 , then: solving for r 1 gives the following: By knowing the distance Q projected in the sagittal plane and r 1 , the angle 41°we calculate r 2 from: The distance from the origin P O to the plantar surface of the foot is d m , we choose a circumscribed equilateral triangle with vertices A 0 , B 0 , C 0 as the platform base. The coordinates of A 0 are: for B 0 are: B 0 = r p cos 60 • , r p sin 60 • , −d m , and for C 0 : C 0 = r p cos −60 • , r p sin −60 • , −d m , where r p is proportional to H, then: In summary, we estimate P 0 , r 1 , r 2 ; and the platform's vertices A 0 , B 0 , and C 0 . They are not arbitrarily selected, on the contrary, we employed anthropometry, statistics, and proportions.

Product of Exponentials Formula
In this section, we employ the PoE formula. We follow the intuitive concept that inter-bone contact surfaces determine HAJ movements. Therefore, we represent these movements as a Special Euclidean group SE(3) in matrix form: where R 3×3 is the rotation matrix andp T is the translation vector. For the initial point A 0 : for B 0 : and for C 0 We defineω 1 = (ω x1 , ω y1 , ω z1 ) as a unitary vector for the TC axis direction given by: and a directed vectorr 1 from P O to r 1 is: then, an orthogonal vector tor 1 andω 1 is: together,ω 1 andν θ 1 r 2z compound the six-dimensional vectorξ 1 : In the same way, there are correspondent vectors for the TC axis: and:ξ We compute R for each joint i = 1, 2 from the Rodrigues' formula: where Ω is the skew symmetric matrix: The exponential formula is: and, τ i is translation vector: Points A, B, and C have invariant relative positions, and there are two rotating joints; the PoE formula for A is: wherep A is the instantaneous position vector of A, the PoE for B: and the PoE for C is: θ 1 is the TC rotation angle from the zero position, and θ 2 is the ST rotation from the zero position. For the sake of clarity, we show the section of the ankle with the vectorsr 1 , ω 1 ,ν 1 andr 2 ; also the points A, B, C, and P O in Figure 5.

Forward Kinematics
In this subsection, we show the simulation of the movements of the ankle by using the measurements and the PoE. The code is in SageMath Computer Algebraic System (CAS), which lets us manage symbolic notation, and interactive plotting in a Jupyter notebook. All source was uploaded to Git-Hub [39].
The simulation plot for the platform's central point is in Figure 6a. We show the points P O , A 0 , B 0 , C 0 , r 1 , r 2 , and the surfaces representing each group of movements. The forward Such a representation lets us compute the ankle joint ROM in all directions. Groups of A, B, C, and PM movements are smooth surfaces or geometric manifolds. They have two DOF, with a limited domain due to the axes ROM.

Geometric Design and Trilateration Method
In the last section, we note that in a healthy ankle, the range of motion from three points in a platform attached to the foot, pertain to a surface without singularities. Moreover, we note that we can trace tetrahedrons from the reference base on the shank to the platform points. Tetrahedrons can be solved by knowing the triangle base, and the sides. We choose the complete tetrahedron with three distance sensors in the point A for symmetry conservation in the case of using the device in the left or right foot. We avoid the use of numerical methods such as the Newton-Raphson (NR), for reducing time of computation. Furthermore, we choose the symmetry and redundancy in the apexes B and C. We realize that by knowing the platform dimensions, two sensors and the apex A coordinates, we can define a plane rotated with respect to the base and solve other tetrahedrons corresponding to the B and C apexes. We also take a holistic approach, we knew that micro-controller systems often have two cores and eight or ten analog to digital converter channels. We used 7 channels, leaving three for temperature, battery level, and voltage input detection.
Finally, based on such considerations, we show a geometric design in the Figure 7a platform center, and in Figure 7b are the vertices. By considering the distances between the origin and the vertices, we estimate the DWS maximal length in every module.
Here, l max is the maximal possible length from the triangular inequality, p A is the positions group in g A , r m is the module's radius, and A B is the base point.
The main design requirement is the localization of three points attached to the foot. We estimate the actual position employing a DWS array in a tetrahedral structure to find the apex, which is a platform vertex. In Figure 8 we show the design structure. P O and P M are the base and platform reference frames. The platform has known dimensions and the number of sensors is seven. First, we compute A p from three distances: l A1 = A p − A 1 , l A2 = A p − A 2 , and l A3 = A p − A 3 . Then, we compute B p and B p apexes after A p employing two DWS. We summarize the method in a flowchart; Figure 9.

Finding the Apex in Tetrahedron A
In this section, we compute the tetrahedron T A with base A = [A 1 , A 2 , A 3 ] and apex A p . Figure 10 shows the method we use. In Figure 10 we see that triangles 132 = [A 1 , A 3 , A p132 ] and 231 = [A 2 , A 3 , A p231 ] are two sides of the tetrahedron T A developed on the base plane.
We compute the A p132 and A p231 orthogonal projection on each adjacent side of the module base triangle [A 1 , A 2 , A 3 ] by tracing a circle centered on A 1 with radius A p − A 2 and the circle centered on A 3 with radius A p − A 3 ; resulting in A p132 and A p131 intersection points. In addition, the circle centered on A 2 with radius A p − A 2 intersects the circle centered in A 3 at points A p231 and A p232 . The segment from A p132 to A p131 intersects the points defined by A p231 and A p232 at A pxy . In the case of tetrahedron T A , we determine A pxy = (Apx, Apy, 0) as A p projection on the base plane. It is easy to realize that the height of T A is the absolute value of the A pz coordinate. Then, we can find the distance from A pxy to A 3 as a triangle [Apxy, A 3 , A p ] side; the other is A pz , and the hypotenuse is the distance l A3 = A p − A 3 , then, A pz is:

Tetrahedrons B and C Apexes
In this subsection, we show that, by knowing A p , the point B p needs two sensors to be found. To determine the result of the tetrahedron T B , we consider the base of a triangle B 1 , B 3 , A p in Figure 11a . We compute the angle α from the XY plane to a normal vectorn ApB : and, the angle α is: wheren z is the unitary vector normal to the XY plane. The tetrahedron sides are the lengths lB1 = Bp − B1 , lB3 = Bp − B3 , and d ApBp = Bp − Ap . The rotation axis is in the direction B1 − B3. The Bpr is Bps rotated α in angle about this axis. In Figure 11b, we show how to find the Bpr apex, similarly to that of a tetrahedron T A . Finally, when Bpr is found, the contrary rotation about the axis B1 − B3 gives the Bps. There are two possible apex values: Bps1 over, and Bps2 below of the XY plane. We show the Bpr apex below the XY plane in Figure 12. We use the same method to solve the T C apex. For the correct apex selection, the condition when the side of the platform distance d CpBp is: 2.1.9. Procedure for Found Platform Positions We must fix the shank and the foot to the base and platform. Then we mark the MMP and the MLP. To do so, we design a detachable reference point from module A. Initially, we attach the foot and the shank to the device, and then we mark and record the MMP and MLP; Figure 13 shows the detailed view. We compute the platform position from the seven sensor lengths. The main steps for capture data series are:

1.
Capture the initial position at horizontal relative position from dr = I MU2 − I MU1 readings; 2.
Move the foot continuously until jerk crosses zero again.
First, we capture the sensor lengths by activating a button in the computer software. Every time, we compute the absolute difference from IMU2 to the IMU1 readings. If the differences are constants, then there is no platform and base relative movement. We compute the jerk by relative acceleration differentiation. The data capturing process ends when the acceleration change crosses zero. Jerk changes activate the capture of IMU data.
The symbolic equations to find A p , B p , and C p from the captured data, were found by the SageMath CAS. By using the prototype dimensions and the sensor lengths, we compute the platform's position and orientation. Here, the origin is from the initial DWS lengths l Mi0 , where M is the module A, B, or C; and i is the sensor number i = 1, 2, 3.
After MLP and MMP registering, we attach the apex of module A to the platform, define the sagittal plane perpendicular to the ABC base plane, and intersect point A. By implementing the trilateration method mentioned before, we compute the points A 0 , B 0 , and C 0 . Figure 14a illustrate the point positions with the device in the initial portable configuration. The apexes' computation are in Figure 14b- and: from these values, we solve for r 1 from the plane y = 0 intersection with the line L TC : where V is a point pertaining to L TC . The ST axis sagittal intersection r 2 initial point is: Here, r 1 and r 2 are reference values computed from the previously mentioned anthropometric mean values. Such initial points are for reference, comparison and validation of the trilateration and regression method. The tracked trajectory data set is processed offline. We use the least squares normal vector to the plane, this direction is similar to the circle approximation. From here, we compute the TC axis first, and then the ST axis. To do so, we compute the TC axis position by employing dorsiflexion and plantarflexion, because the TC axis is the most dominant in such movements. The method used is circle fitting in a plane containing the trajectory points. A further model refinement can be made with optimization, and machine learning methods, such as gradient descent and the symbolic product of exponential formula. First, we found the TC axis orientation ω 1 by registering several trajectories. For each trajectory, we have a list of data points P = [x, y, z], which pertain to a plane: where a, b, and c are the components of a direction vector perpendicular to a plane containing the points. Solving out for z, we have the system: which has the form: there are more equations than unknowns. From linear algebra and least squares we knew that the pseudo inverse is A + = (A T A) −1 A T , then a normal vector is: Now, we compute c by replacing a, b, d in the plane equation, and finally we getn = [a, b, c] T . We found the angle between the normal plane and the X-Y plane, after knowing the normal vector by applying the Rodrigues' formula,v =n ×k, withk = [0, 0, 1] T P r = P cos(θ) + (v × P) sin(θ) +v(v · P)(1 − cosθ).
where θ = arccos n·k n . After this, we estimate the plane, and rotate all the data points onto the X-Y plane. We search for a circle in the X-Y plane, and rearrange the equation for least squares estimation by using a variable substitution.
where c = [c 0 , c 1 , c 2 ] T with c 0 = 2x c , c 1 = 2y c , and c 2 = r 2 − x 2 c − y 2 c . By taking the rotated points, P r we have a linear system: . .
that has the form: In this system, we have more equations than unknowns, then, we search for the c values that minimize the squared difference b − Ac 2 . arg min We found the center point C p = [x c , y c ] and radius r by solving: Finally, we apply a rotation to the center in respect to the original plane. This point pertains to the TC axis. For each trajectory A, B, C, we get three planes, and three centers, the TC line direction is parallel to the planes' normal vectors. The information is complete by determining the plane orientation.
The ST axis estimation is similar, but employs trajectories from inversion and eversion movements.
This is a basic estimation; by conducting optimization on the product of the exponential formula, we enhance the accuracy of the axis position estimation.

Ankle Joint Movements as a Manifold
In this subsection, we explain how the centers r 1 , r 2 and directions ω 1 , ω 2 define a manifold representing the HAJ movements. The circle center points calculated pertain to the TC and ST axes; they are the initial data to fit the product of the exponential formula. In Figure 15a, we show the complete platform's center point manifold. It is topologically similar to a torus. A manifold chart represents the range of motion limits, we show an example of the geodesic as a trajectory on the manifold in Figure 15b; this explains how to map ankle coordinates, and a straight trajectory with initial velocity and no external force action. We have the data necessary for the line intersection with the sagittal plane, the center points, and the direction gives a line:p wherep l is the parametric line,l is a parallel vector to it,l 0 is a known vector in such line, and d ∈ R, replacing the parametric equation in the plane equation: wherep 0 is a known vector in the plane, andn p is the plane's normal vector, solving for d, gives: and replacing in the TC axis line equation: where r 1 is the TC axis intersection with the sagittal plane. The point c 1 is the center, and the axis direction ω 1 , both were found by circle fitting. Furthermore, packing in six dimensional Plücker line coordinates, we have: and the l 1 six dimensional vector is: We include those data for the PoE formula simulation and the manifold representation.

Mechatronic System Design
In this section, we design DWS to measure the lengths of the tetrahedron sides; they are arranged as structural parts. Their maximal length estimation is from the forward kinematics simulation. We design the shank attachment from the dimensions, proportions, and statistical data.

Draw-Wire Sensor
We use flat springs. They are not exposed to a high load against gravity, and are in two or three concurrent groups. In Figure 16, we depict the design, composed of three 3D printed parts, potentiometer, flat spring, bolts, and nuts.  A two-coil winch drives the potentiometer; a flat spring retracts a wire attached to the winch. When we pull the wire, the spring retracts it. The value of each turn is from the nominal value of the potentiometer, R n = 2.2 kΩ, divided into ten turns, that is 220 Ω per turn. The diameter is D = 3.8 cm, the spring could be compressed in four turns. The maximal length is as follows: Which is 47.75 cm approximately, this value is greater than l max for all groups of movements.

Mechanical Parts
The attachment on the calf has a size according to the simulation. We use the mesh model of a leg to guide the shape of the calf support, as in Figure 17a. We also scale and divide this structure into seven parts for 3D printing. An aluminum tube is the support structure, as in Figure 17b, and a neoprene band attaches the shank to the support with Velcro fabric. All the DWS modules are in a plate, the A module has three DWS, B and C modules has two DWS, as in Figure 18a. The design of the foot attachment is from standard measurements to adjust the foot's length and width, as in Figure 18b.

Electronics
Two operational amplifiers in instrumentation configuration are the base block of the acquisition system, as Figure 19 shows. We employ the KiCad software for the circuit design. The voltage gain in the instrumentation amplifier is: By selecting R 2 = 100 kΩ, R 1 = 1 kΩ, and R G = 5 kΩ, the voltage gain is 141. With 34 mV as voltage input, we get: The final acquisition circuit has seven instrumentation amplifiers, with bias and gain trimmers for calibration. We design the printed board circuit as an ™Arduino Mega 2560 Shield, and assemble the components to the board by throw-hole soldering. We feed the circuits with a power system with two 18650 Li-Ion batteries in series, a backup pack, a Battery Management System (BMS); a 5V buck and a 12V boost converters. The Figure 20 shows the schematics. Finally, we add connectors for the MPU, OLED, and Bluetooth modules.

Electronics Casing
We export the KiCad printed circuit design to FreeCAD StepUp to design the case containing all the components, focusing on a compact configuration design. The two main electronic components are the Arduino Mega 2560 and the Orange Pi One single board computer. We place the components, such as the Dual Pole Dual Throw (DPDT) toggle switches, symmetrically on the box sides. Figure 21 shows the main sides and the final assembly of the electronics case. Each box has attached components to optimize the space. We test every component, and then install the support structure.

Final Mechanical Assembly
The prototype consist of 45 3D printed parts, the union of main components is by an 8 mm steel threaded rod. The sub-assemblies uses M3 bolts and nuts. Figure 22 shows the assembly CAD.

Calibration and Validation Software
Calibration is with the Arduino board connected to the PC, running a calibration program in processing. The basic program reads the IMU measurements and captures readings from the draw-wire sensors through the ADC inputs. The raw data are integer values with signs 2 bytes wide, the two 1-byte registers converted to 2-byte integers. An exponentially weighted moving average (EWMA) algorithm filters the raw signals and sends them to the PC via a serial port. The lengths computed are from the initial values plus the scaled sensor inputs with: here, l iMj is the length in cm from the i wire to the j module, d iMj is the initial distance, m iMj is the measured digital value, and s iM is the scale factor in digital units per cm. We present a rendered image with a scaled 175 cm model in Figure 23.

Results
We organize this section as follows: first, we show the simulation; second, the final prototype; third, the trilateration and axis orientation; and finally, an ankle manifold representation.

Simulation Results
In this subsection, we use different values from Table 1 to estimate the work-space and range of motion. First, we show the variation of mean value results, and second the platform position simulation by changing the range of movement and angles. Figure 24a shows the complete manifold, taking into account the intervals θ 1 , θ 2 ∈ [−180 • , 180 • ). It also shows the platform's initial position, the TC axis reference, the initial ST reference, the initial orientation, and a parametric trajectory with equal angle rate variation. In Figure 24b is the attaching point A simulation; Figure 24c,d depicts the simulations of B and C, respectively. In Figure 25a we show the platform' central point simulation with variations of 10% below the statistical mean values; Figure 25b shows the simulation changing 10% over the statistical mean values; Figure 26a is the attaching point A simulation adding the 10% mean values; and Figure 26b subtracts 10% of the mean values. Figure 27a,b are the results for the platform attaching point B. We show the results for the attaching point C in Figure 28a Finally, by changing the range of maximum and minimum angles, an example of the interactive simulation is in Figure 29a,b. We capture the view of the sliders and also show the simulation rendering result.

Minimum and maximum angle sliders
Angle values sliders

Final Prototype
In this section, we describe the results of the TM design, which are the assembled device and calibration. We try several designs and finally the CAD model is in [44]. First, we show images of the connected electronics parts. Second, we assemble the structure and perform calibrations. Third, we probe the device in a healthy patient to validate the prototype adaptability. We print the structural parts using ABS and the draw-wire sensor using PLA; PETG is in the supports and the case.

Printed and Connected Electronics
We place the electronics in each side. In Figure 30, the connections and box sides and charge of the batteries.

Printed and Assembled Structure
We assemble all structural components carefully, putting them together with stainlesssteel threaded rods; then we place the draw-wire sensors, the acquisition board, connections, and final structure for calibration. Figure 31 shows the assembly.

Calibration Results
We calibrate the system by using a personal computer. The resulting calibration, and measures of the lengths, are in Figure 32. The lecture is at the initial position, then we compare with the SolidWorks ® model measurements and the Vernier caliper real measurements for each DWS. The Table 2 shows the calibration results.   Figure 33a shows the length with a SolidWorks ® Measurement tool for module A, sensor 1; the lecture for sensor 2 is in Figure 33b. In Figure 33c, is the sensor 3 length. Table 3 shows the error measured in the real prototype and in SolidWorks ® .

Trilateration Results
In this section, we use the measurements from the sensors to compute trilateration, then we compare them with the simulation results. The foot and shank fit in the adjustable platform and support structure, respectively, as is shown in the initial procedure in Figure 13. By introducing the DWS lengths to the virtual model, we compute the A, B and C coordinates in four consecutive positions. In the Table 4 are the seven sensors lenghts, and in the Table 5, we show the A, B and C coordinates for the four positions. The resulting figures for the first two positions are in Figure 34a,b, and for the latest two positions in Figure 35a,b. We show the base triangles, the points, the sensors, the platform and the circles on the base.

TC Axis Circle Fitting
The results of circle fitting for trajectories A, B, and C are in Table 6, corresponding to ankle joint plantar/dorsiflexion movements. We show the circle fitting for trajectories A, B, C, and PM in the Figure 36a-d.

ST Axis Circle Fitting
The results of ST circle fitting for trajectories A, B, C, and PM are in Table 7, corresponding to ankle joint inversion movements. We show the circle fitting for trajectories A, B, C, and PM in the Figure 37a-d.

Ankle Manifold Representation
In this section, we show the results in the software SageMath Manifolds. We load the model and visualize it as a manifold, we show the axis and the sagittal plane intersection.
With the model parameters loaded, r 1 , r 2 , ω 1 , ω 2 , and the origin established in the center of the base modules. We apply the equation: where c 0 is the median center computed from trajectories A, B, and C center fitting, andn p is the median planes' normal vectors containing the circles. Table 8 shows values for the TC axis in the PM chart. In Table 9, we show the Plucker coordinates for the TC and ST axes. Finally, Figure 38a shows the ankle manifold, and Figure 38b, the chart representing the range of movement and angle coordinates.  Table 9. Plucker line coordinates.

Discussion
In this work, we addressed the human ankle joint model from an alternative approach. We used statistical measurements for the development of a new device, specially designed to capture the human ankle joint movements. In animal joints, it is difficult to place encoders and linear sensors to measure the range of movement of complex joints in each internal living tissue reference frame. The product of exponential formulas uses only two frames, and it is useful in this case. Furthermore, in our work, we used a trilateration method for finding the device's platform position, which is an analytic method. Therefore we avoid numerical approximations that can diverge and reduce rounding errors. We proposed the ankle joint model as a Riemannian manifold. We can define a chart as a subset of such a manifold with angle coordinates for measuring the range of movement. Our presented device is lightweight, non-invasive, and can be used in remote places, on beds, or on the floor. By characterizing the ankle parameters, we can conduct symmetry studies by correlating the left and right ankle joints. We can enhance the device configuration in future versions by replacing the draw-wire sensors used from potentiometers to digital encoders connected by a CAN bus, reducing wiring, space, weight, and energy consumption. We will use the model for the synthesis and reconfiguration of an ankle parallel rehabilitation robot, programmed by symmetrical movements at the opposite ankle. By employing the axis location and the screw theory, forces, and torques, we will study the ankle dynamics by using reciprocal screws to the axis location in a re-configurable platform. The robot will be lightweight because of the use of cable-driven actuators, inspired by antagonistic muscles that work with reciprocal inhibition for energy optimization. The robot will reconfigure the structure, considering the ankle joint as a central mast, and referenced it with MMP and MLP markers. Figure 39 shows a schematic of the re-configurable approach. Other applications are, for example, by visualizing the platform trajectories one can explain how the calcaneal Achilles insertion is near to the platform's A point. The platform's normal vector changes abruptly near this region, as was depicted in Figures 24b and 26a,b. Furthermore, Riemannian models have different properties. We will explore diagnosis and treatments based on the model and metrics by employing machine learning algorithms. This approach can be applied to other joints in humans and other animals, by designing specialized re-configurable hardware and software. Tracking the parameters in different ages and weight conditions, and comparing the ankle models in healthy and injured people.

Conclusions
Computer tomography (CT) and magnetic resonance (MR) images have greater precision and accuracy. Measurements in medical imaging will help us compare the errors (RMS) in the HAJ. In biomechanics, we have not found an ideal model for error comparison. Then, we will compare the error with an accurate measurement. The device has limitations regarding mechanical precision and deformation of its parts. We face up to the error through the electronic design system. The calibration process is imperative for enhancing accuracy.
The calibration process is human-dependent. We read the digital measurement and compare it with caliper measurements directly in the sensor. Then, we register the data in a table to find the equivalence. An electronic board with trimmers avoids saturation, bias, and calibration; a 10 bit ADC and an exponentially weighted moving average (EWMA) filter the noise signals. We have implemented a processing (Software) calibration interface. We avoid adding more specific technical data, such as CMRR, ADC speed, mechanical tolerance, and other issues inherent to the measuring devices.
Digital sensors, communications, and POE function fitting use machine learning techniques.
The ankle is the most commonly injured joint of the lower limb, fundamental to the human body's balance; it is necessary to measure the range of motion by in vivo methods for patients in lying positions in reduced or remote places. The device's development considers ankle anatomy and anthropometry. We propose a Riemannian manifold model based on the device's data readings. Performing simulations enabled us to design the size of the device and the maximal length of the wires. We present a trilateration algorithm, projecting the tetrahedron's sides on the base plane. The sensors are modular and part of the device's lightweight and portable structure. The electronic system is modular, replaced by other single-board computers (SBC) and microcontroller unities. We will also use the TM for ankle characterization and diagnosis for rehabilitation robotics, prosthesis, and orthosis design. The prototype is not a finished product (the TRL is 2). The work's scope is to validate the use of a modern alternative biomechanic representation of the human ankle joint. It is a platform for testing an alternative trilateration method that employs draw-wire sensors (DWS). Such sensors have a constant tension, coiled on a drum attached to a potentiometer, and a flat spiral spring. We also attempted to develop a flexible device design for several foot sizes. We are working on a newer device version with an enhanced attachment system, a more compact design, and digital DWS compatible with a configurable robot. Machine learning and edge computing will assist in disease diagnosis and rehabilitation of patients.

Institutional Review Board Statement: Not applicable.
Informed Consent Statement: Informed consent was obtained from all subjects involved in the study.

Data Availability Statement:
The code and CAD electronics and mechanical designs are available.

Acknowledgments:
The authors thank the Colfuturo Colciencias Collaboration for supporting this work, as well as the Universitat Politècnica de València and the Universidad de los Llanos.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript: