In a sampled data system such as this, the required bandwidth for the serial data stream is proportional to the number of channels, the sampling frequency and the measurement resolution. Two strain channels and two auxiliary channels (temperature and humidity) were required. Since the auxiliary data was not required at the same sampling rate as the strain data, it was encoded and transmitted at a lower rate, thus preserving as much bandwidth as possible for the strain data. Including synchronisation the effective number o f 13 bit channels was about 2.5. A sampling rate o f 200Hz was chosen, which assumed that the input signals were bandlimited to lOOHz. This was reasonable considering that the fundamental frequency during fast walking might be IHz. (Fast Fourier Transform analysis carried out on walking data from a Mk2 subject, captured at lOOHz, figure 4.40, showed that components of the signal above the first 8 harmonics were less than 1% o f the fundamental, and above the 25^ harmonic were below 0.2% of the fundamental.) For the shaft channel the total measurement range was set to 7kN [#4.3.2]. Perhaps rather arbitrarily, a target force resolution o f IN was sought. (The achievable measurement resolution however is limited by the overall system noise and the quantisation of the analog strain signals [Appendix D].) This gave a dynamic range o f 7000, or 13 bits. This combination o f parameters gave the number o f data bits per second to be transmitted as 2.5 x 200 x 13== 6500. Including protocol bits, a Baud rate of 9600 was therefore needed for the Mkl serial communications link.
The realisable force resolution was also limited by the bandwidth of the telemetry link. The 'passive signalling' technique used to telemeter the data only switched the implant tuned circuit at the zero crossings of the induced sinewave, and
therefore only operated on half cycle increments of the energiser carrier wave. This effectively reduced the pulse interval resolution to half a period of the induction signal, about 0.35ps, rather than the 0.125ps offered by the 8MHz clock used for the pulse timer. The 8MHz clock resolves the shaft force to 1.2N and the tip force to 0.9N, and the telemetry link degrades these figures to 3.4N and 2.6N.
100000
10000 i
1000
100
1 9 17 25 33 41 49 57 65 73 81 89 97 105 113 121
Figure 4.40 Fast Fourier Transform analysis of a Mk2 walk (34 weeks post-op). Components of the amplitude above the first 8 harmonics was less than 1% of the fundamental (lOOHz sampling frequency).
Noise is generated by the following main sources [Appendix D]:
1 strain gauge resistor alloy (white ‘Johnson’ noise and pink ‘ 1/f noise), 2 current flow through the gauges (white ‘shot’ noise),
3 the amplifiers (white noise, due to voltage and current), and the succeeding signal processing circuitry.
The combination of low gauge current and bandwidth keeps the shot noise low, and the very low 0.5 fA/Vflz op amp current noise density ensures that the input current noise is negligible. The metallic strain gauges keep the 1/f noise low, and even the high 5kQ gauge resistor values do not increase the Johnson noise to more
than the 1/f noise. O f the other contributors, the dominant source is the amplifier voltage noise. Over the bandwidth set by the gain of the first amplifier stage, 3.5kHz, the equivalent ‘force noise’ is 7N (rms) for the shaft channel and 2N (rms) for the tip channel [Appendix D]. The combined effects o f noise and the telemetry link quantisation therefore only permit Mkl shaft and tip resolutions of 7N and 2.6N respectively. In the light o f these figures the target force resolution of IN seems optimistic, especially for the shaft channel. However, where the force is steady, as in the calibration, averaging improves these figures considerably, allowing full advantage to be made o f the digital resolution. This enabled a more precise calibration to be achieved than would have been possible had the digital resolution been reduced to the analog resolution levels. Had the digital resolution been reduced to 7N (a dynamic range of 1000), only 10 bit resolution would have been required. 5000 data bits per second would then have been needed, and a Baud rate o f at least 7000. Since the next highest standard rate is 9600 there would have been no advantage in this.
4.4 4.3 Data compression and packing
The second main task of the MCU, accomplished entirely in software, is to output the digitised data to the radiotransmitter in real time. Each frame o f sampled data words from the external 16 bit counter is processed and output serially during the following frame. Both input and output are double-buffered. Each frame is stored initially in input buffer (IB) 1 and when complete, transferred to IB2 for data processing leaving IBl free for the next frame. When IB2 is full, the program packs the bits into output buffer (OB) 1. Serial transmitter interrupts transmit data from 0B 2. On sending the last byte from 0B 2 the program checks whether there is a new frame ready in OBI. If so, OBI is copied to OB2 and starts sending it. If not, an idle character is queued. Next time there will be a new frame ready.
At a 200Hz frame rate the maximum number o f bits that can be sent at 9600 Baud is 48, including start, stop and parity bits. It was therefore convenient to use a protocol in which 4 data bytes o f 11 bits (comprising 8 data bits, 1 start, 1 stop and
1 parity bit) were transmitted per frame, a total o f 44 bits. This allowed for a total of 32 data bits per frame:
channel 1 13 bits channel 2 13 bits temperature 1 bit humidity I bi t frame counter 4 bits
total 32 bits
These bits were allocated to the 4 bytes as follows: Byte 1: channel 1 bits 12-5
Byte 2: channel 1 bits 4-0 and channel 2 bits 12-10 Byte 3: channel 2 bits 9-2
Byte 4: channel 2 bits 1-0; temperature (1), humidity (1), frame count (4).
Each strain data channel is timed over 3 of the 4 pulse intervals in order to maximise the resolution. The possible range o f each channel is therefore given by
3*80ps to 3*420ps
and after digitisation this corresponded to counts of
3*80*8 to 3*420*8 = 1920 to 10080
In order to compress this total possible range to 13 bits, corresponding to a maximum count o f 8192, a constant of 1900 is subtracted from each count in order to reduce the maximum possible count to 10080 - 1900 = 8180, which is less than 8192 and therefore expressible as a 13 bit number. As this offset is less than 1920 no underflow occurs if the pulse width is a minimum. The 1900 constant is added back onto each received strain data countvalue in the data logging computer, to restore the original number proportional to the measured pulse intervals.
Since temperature and humidity data can be transmitted at a lower rate than the strain data, a 'major frame' o f 16 normal frames was defined, in which the temperature and humidity data are sent one bit at a time, with 12 bit resolution. The remaining 2*4 bits o f these major frames are used to transmit the battery voltage in the patient box, to give warning o f low battery voltage. The 4 frame count bits are used to decode the temperature and humidity bits.
The remaining 4 bits of the allocation o f 48 per frame are not used, and as the MCU serial output protocol does not allow for individual idle bits to be sent, the next frame (if available) is sent early. If a complete byte is not ready when the time comes to send the next byte, an idle byte is sent. (Idle bytes were useful in the development receiving hardware since they could be uniquely identified by a monostable as a string of 10 ‘logic zero’ bits, comprising start bit, 8 data bits and even parity bit, but they were not required by the PC software and were ignored). In this asynchronous way data (including idle bytes) are always sent 11 bits at a time, so that there could be a maximum delay of 1 byte between measurement and transmission. This is transparent to the user, however, as data is received along with the occasional idle bytes transmitted, which are ignored. Overall synchronisation is maintained over an 11-frame period, during which 4 idle bytes are sent at intervals.