Abstract
Electromechanical above-knee prosthetics are widely available, and are reliant on repetitive knee movements of fixed length/angle. This work explores the viability of developing adaptive movements on existing prototypes, through embedded controls from 8051-class 8-bit microcontroller units (MCUs). The system includes an integrated goniometer, intended for measuring the knee angle of the sound limb. The phase delay is subsequently processed to bring about kinematic coordination in the proposed echo-controlled prosthetic.
Keywords: Kinematic coordination, Embedded control, Phase detection, Adaptive movement
1. Introduction
The primary concern in electromechanical prosthetic development has been designing reliable prosthetics that satisfy the needs of the intended users. Significant advances have been made in the development of ergonomic prototypes, but relatively less work has been done on the associated feedback and control systems. The widely available above-knee prosthetics employ a repetitive movement pattern [5–11], based on knee joint movements of fixed angle or fixed duration. The amputee requires adjustment and familiarization to this movement pattern for locomotion. [14] This could be a disadvantage, as the current designs do not fulfil the requirements of speed or finer movements. Our research group has developed a prosthetic which can incorporate adaptive controls of knee movements in existing mechanical prototypes, thus drastically reducing the cost of development. Three separate subparts for development were identified – goniometer development and fixation, programming the microcontroller, and motor control. The primary paradigm employed is tracking the gait cycle of the sound limb in bringing about the movement of the prosthetic. The maintenance of identifiable patterns and characteristics even in variable velocity conditions made gait cycle an ideal candidate for use in achieving kinematic coordination. [1–4]
This paper is organized as follows. In §2 the development and fixation of the goniometer are described. In §3 the algorithm and MCU set-up are given. §4 describes the motor control and §§5–7 give results, conclusions and limitations.
2. Goniometer development and fixation
2.1. Construction
The goniometer was constructed from a galvanized iron (GI) sheet, fibreglass, 10 kΩ potentiometer and a pair of common protractors. Strips of metal were cut from the GI sheet to form the legs of the goniometer, attachable to the thigh and the calf portions. These legs, meant to be attached to the thigh, were rigidly fixed to the body. The fibreglass was in form of cylindrical hollow pipe, from which a section was cut to form the body of the goniometer, as shown in figure 1. The 10 kΩ potentiometer was placed inside and its shaft connected to the metal legs. Power was supplied through a pair of 9V batteries. An A/D converter attached to the potentiometer converted the signal into digital bits. These angles could be visually read by a detachable LCD connected to one of the ports of MCU.
Figure 1.

Goniometer (profile view).
2.2. Calibration and processing
The voltage obtained from the potentiometer was proportionate to the amount of rotation in the shaft, so it was an ideal choice in data acquisition. Hence, in the preliminary stage, 10 kΩ potentiometer was calibrated before it was affixed to the body. Readings of angles at intervals of 2° were taken from 10° to 80°, which encompasses all degrees of knee movement. An HD44780 LCD module was programmed to indicate angles with 1° resolution, enabling precise adjustments and alignments.
The angle–voltage relation shown in figure 2 was, as expected, linear, within acceptable tolerance. This linearity was deduced by plotting the data on MATLAB®. Additionally, an A/D converter (ADC) ADC0804 was used in tandem, to cross-check the analogue reading from the digital data. Upon verification this raw data was used to deduce the exact mathematical relation connecting the two quantities using the Curve-Fitting Toolbox™ from MATLAB®, Mathworks Inc.
Figure 2.

Verification of linearity.
The equations resulting from repeated experiments showed negligible second-order terms and dominant first-order coefficients and constants. A linear approximation of the second-degree equations was acceptable for all practical considerations, verified by plotting alongside the original equation using MATLAB®, as shown in figure 3. The presence of second-degree coefficients had pronounced effects only at higher angle values. Since the range of angle movements was limited generally between 10° and 80°, the difference in operation made by omission of these coefficients was not noticeable, and at the same time this eliminated computation complexity and performance lag which could have been encountered by 8-bit MCUs. The 8-bit data read from the ADC was converted to decimal scale, and a proportionate voltage deduced. This voltage was used to calculate the actual voltage at the goniometer by providing it as an input to the curve-fitted relation. Once the voltage data at the goniometer was known, it was simple to deduce the angle.
Figure 3.

Comparison of original against linearly approximated equation.
2.3. Goniometer fixation
The rigid leg of the goniometer was fixed laterally at the thigh and the movable leg was attached laterally at the calf of the normal leg. Velcro straps were used for closely fixing the set-up to the subject's leg.
3. Defining controls: algorithm and MCU set-up
The knee angle data employed were obtained from the Defence Institute of Physiology and Allied Sciences (DIPAS), Department of Defence, Government of India. Three healthy adult males between the ages of 22 and 27 years, with no prior neurological or musculoskeletal deficiencies, participated as volunteers. All participants provided written informed consent prior to testing. Data were collected in a 3D motion analysis system using six CCD cameras. EVA 7.0 ™ and Orthotrak 6.2 ™ software were used for data recording and gait analysis respectively. A total of 25 Cleveland markers were placed on the subjects. Speed of walking was set at of 1.1 m s−1. Subjects were asked to become habituated with the walking in the treadmill. Data recording began 2–3 minutes after initiation of walking. Seven to eight trials were performed for each locomotive task to obtain repetitive data for analysis. Data were collected at a sampling frequency of 120 Hz. The time duration to record the data for every trial was 3 s. A low-pass Butterworth filter with cut-off of 6.0 Hz was used to remove the noise from data. Orthotrak™ gave its acquisition in Excel™ format. The data from Orthotrak™ were imported to MATLAB® for analysis. These data were normalized by time-locked averaging. Under a confidentiality clause, the photographs and datasets have been prohibited for use.
These data consisted of 138 points over one gait cycle. The knee angle data were down-sampled, each time checking for similarity in pattern with the original data. Beyond two stages of down-sampling, the data became incoherent for use. Hence, optimally compact data were obtained after down-sampling twice. The resulting data of 35 samples were employed for gait-cycle tracking by the algorithm, as shown in figure 4. The value of angle calculated was not sufficient to determine the position of the normal leg in the gait cycle, given the twin lobe structure. It could be intuitively understood that three parameters were needed to uniquely determine the approximate position of the leg among the four distinct segments present in the twin lobes. [12]
Figure 4.

Down-sampled data of 35 points, obtained from 138-point data of knee angle.
Information regarding the phase was required to decide between the lobes. Rate information, exemplified in figure 5, was needed to choose between the increasing and the receding segments, and magnitude information was necessary for the actual position. For collecting the phase information a foot-switch was employed in the design. It conveniently relayed the information in binary format as there could be only two states, either 0 or 1. This switch was directly connected to the MCU unit. For computing the rate, first the difference between two subsequent closely-spaced readings was calculated. A positive first difference indicated increasing nature, and vice versa. The magnitude value was computed from the curve-fitted equation discussed previously. The decision structure was as follows, shown in fig. 6.
{SWITCH=1; DERIVATIVE>0} indicates increasing segment, stance phase;
{SWITCH=1; DERIVATIVE<0} indicates decreasing segment, stance phase;
{SWITCH=0; DERIVATIVE>0} indicates increasing segment, swing phase;
{SWITCH=0; DERIVATIVE<0} indicates decreasing segment, swing phase;
{Default} indicates break operation and re-parsing through the data with new values.
Figure 5.

Typical nature of first difference/derivative calculated from the down-sampled knee angle data.
Figure 6.

Simplified decision control structure.
The computed value was tallied with absolute values of data in that segment. The closest match was considered. The decision control structure is thematically represented in figure 4. The program incorporating all these operations was coded and compiled on Keil μVision™ software development suite, and embedded on ATMEL® AT89C5131A. Two subsequent readings taken at very short intervals provided all the information for movement calculation. The voltage recorded at the goniometer and the foot-switch position was mapped to a definite angle. When the position of the normal leg was known, the angle expected in the prosthetic could be deduced by a circular shift over the knee angle. As the gait cycle is repetitive, the phase shift between the two legs is statistically analogous to shifting the point under study by the phase-lag (calculated experimentally). For different walking postures circular cross correlation (CCC) between knee angles was calculated. The phase lag at which peak CCC exists was selected for that particular walking posture. The current position of the prosthetic limb, aided in determining movement to be carried out. The difference between successive data points was the amount of movement to be achieved in a duration equal to sampling interval.
4. Motor control
4.1. Movement calibration
Although the motors are industry-standard, they need to be calibrated precisely as all movements were expected to be within 5°. The knowledge of the speed constant helped in pinpointing the value of motor movement at 2° m s−1. The resolution was close to the CMOS latency of the microelectronic circuit. Speed reduction by factor of 10 was carried out by a system of gears. The resolution was verified experimentally, within acceptable tolerance on 8051 Software Development Kit (SDK). Note that interrupts were used to deduce the time duration of angle movements. A small mechanical arm was attached to a motor shaft and angles were set prior to experimentation. The mechanical arm completed the interrupt circuit and a counter was stopped to display the duration.
4.2. Motion control
Motion control was attained by software simulated pulse width modulation (PWM). The driving circuitry was based on an IC L293D DC motor driver. The wide range of operational voltages made this an ideal choice in every design test of the electrical subsystem. The IC was operated on two independent inputs of 5V and 12V for Transistor-Transistor Logic (TTL) and motor driving, respectively. The configuration of binary signals applied at two specific pins of L293D achieved forward and reverse motor output, illustrated in fig. 7.
Figure 7.

Illustration of the output configuration through L293D.
5. Results
The angle measurement set-up has been observed to be a crucial factor in the performance of the device. The internally computed angle has a direct impact on the quality and accuracy of motion. As explained earlier, linear approximation was expected to show discrepancy only at higher values. This was corroborated by pictorial evidence as shown below. The experimentation was carried out for a low range of angles (10° to 30°), a median set (30°–60°) and high set (60°–90°). The results are discussed in the following paragraph.
In figure 8(a), angle recording was done in a median range. For example, for a value set at 51°, the value exhibited by the LCD module was exactly 51°. Hence, the digital information relayed for motion control was precise. The movement in such cases will be accurate. The angle displays for values in the range of 10° to 30° were also found to be accurate. [13] In figure 8(b), angle recordings were carried out for a higher range of values. In these cases, discrepancies were found. For example, for a value set at 82° on the goniometer, the value displayed was 89°. This slightly different value meant that there was a marginally reduced efficiency in motor movement. Owing to the latency exhibited by the MCU, the resolution could not be established beyond 2° per step in a single movement.
Figure 8.
Angle recording at (a) lower values; (b) high values.
6. Conclusions
The set-up for knee angle measurement has shown reliable performance. The LCD unit provides an option to visually inspect the angle being recorded. Further application of the angle measurement unit has given satisfactory results on a motion control unit.
7. Limitations
The system was assembled as a low-power prototype. For high-power operation, nonlinearity of the electrical components as well as of the principal equations needs to be carefully investigated. Variations in voltage due to the decreasing emf of batteries have to be taken into account, by suitable correction factors. Since the above feature introduces additional computational operations, a higher processor would be required in future implementations.
The speed constant defines the Revolutions per minute (RPM) for a specific operational voltage. Though it can be proposed to increase the voltage for greater sensitivity, CMOS latency of the microelectronic circuits poses a bottleneck. Newer designs of chipsets with lower latency can improve the performance of the system. Further improvements can be incorporated by introducing speed adaptation.
Acknowledgements
The authors would like to thank the subjects who participated in collection of gait-cycle data on numerous occasions. They extend their gratitude to the laboratories at DIPAS, for their continued cooperation.
References
- [1].Lafortune MA, Cavanagh PR, Sommer HJ, 3rd, Kalenak A. Three dimensional kinematics of human knee during walking. Journal of Biomechanics. 1992;25:347–357. doi: 10.1016/0021-9290(92)90254-x. [DOI] [PubMed] [Google Scholar]
- [2].Goswami A. A new gait parameterization technique by means of cyclogram moments: Application to human slope walking. Gait and Posture. 1998;5:15–36. doi: 10.1016/s0966-6362(98)00014-9. [DOI] [PubMed] [Google Scholar]
- [3].Boulic R, Thalmann NM, Thalmann D. A global human walking model with real kinematic personification. The Visual Computer. 1990;6:344–358. [Google Scholar]
- [4].Borghese NA, Bianchi L, Lacquaniti F. Kinematic determinants of human locomotion. Journal of Physiology. 1996;494:863–879. doi: 10.1113/jphysiol.1996.sp021539. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [5].Aeyels B, Peeraer L, Vander Sloten J, Van der Perre G. Development of an above-knee prosthetics equipped with microcomputer-controlled knee joint: first test results. Journal of Biomedical Engineering. 1992;14:199–202. doi: 10.1016/0141-5425(92)90052-m. [DOI] [PubMed] [Google Scholar]
- [6].Bar A, Ishai G, Meretsky P, Cohen Y. Adaptive microcomputer control of an artificial knee in level walking. Journal of Biomedicine. 1983:145–150. doi: 10.1016/0141-5425(83)90034-1. [DOI] [PubMed] [Google Scholar]
- [7].Chitore D, Rahmatalla SF, Albakry KS. Digital electronic controller for above-knee leg prosthesis. International Journal of Electronics. 1988;64:649–656. [Google Scholar]
- [8].Daniel Z, Beatrice SR, Gerhard S. Finite state control of a trans-femoral (TF) prosthesis. IEEE Transactions on Control Systems Technology. 2002;10:408–419. [Google Scholar]
- [9].Popovic D, Oguztoreli MN, Stein RB. Optimal control for the above knee prosthesis. Annals of Biomedical Engineering. 1991;19:131–150. doi: 10.1007/BF02368465. [DOI] [PubMed] [Google Scholar]
- [10].Herr H, Wilkenfeld A, Olaf B. US Patent 7279009. Artificial Intelligence Labs, Massachusetts Institute of Technology; 2001. Speed adaptive and patient adaptive prosthetic knee. [Google Scholar]
- [11].Inman V. Human Walking. Waverly Press; 351 W Camden St, Baltimore, MD 21201, USA: 1981. [Google Scholar]
- [12].Kadamba M, Ramakrishnan K, Wootten M. Measurement of lower extremity kinematics during level walking. Journal of Orthopedic Research. 1990;8:383–392. doi: 10.1002/jor.1100080310. [DOI] [PubMed] [Google Scholar]
- [13].Peeraer L, Tilley K, Van der Perre G. Computer controlled knee prosthetics: a preliminary report. Advances in Rehabilitation Engineering. 1989;13:134–135. doi: 10.3109/03091908909030213. [DOI] [PubMed] [Google Scholar]

