09 — Computing and connecting

The code between converter and display.

+ The questionWhat can firmware add to a measurement, and what can it hide?

A meter that subtracted 1,024

A blood-glucose meter can measure correctly and still report a wrong number. At a blood glucose of 1,024 mg/dL and above, the FreeStyle InsuLinx meter would display and store in memory a result 1,024 mg/dL below the measured one, as its recall notice stated. One mg/dL is a milligram of glucose in a deciliter, a tenth of a liter, of blood. A measured 1,066 mg/dL would thus appear as 42 mg/dL, in the example that the trade journal MD+DI gave when it reproduced the notice. Abbott Diabetes Care began recalling the meters in the US in April 2013. Abbott's own reason for the recall, as FDA recorded it, was only that at rare, extremely high glucose levels, 1,024 mg/dL and above, the meter may provide an inaccurate reading.

A falsely low result at such a level could delay the treatment of severe hyperglycemia, a blood glucose far above normal, and this could lead to serious injury or death, as MedWrench, a website for medical-equipment technicians, warned in its report of the recall. FDA classified the recall as Class I, the most serious of its three recall classes, on 9 May 2013. A fault in code is present in every meter that runs the code, so the recall covered 335,273 meters by FDA's record.

The meter's code, not its sensor, made the error. FDA recorded the cause as "Software design". The number 1,024 is 2 multiplied by itself ten times, a boundary in binary counting (Chapter 8), but what the code did wrong is stated neither in FDA's record nor in the notice. The remedy was itself code: a software update from Abbott's website, or a replacement meter. Firmware, the code that an instrument runs, is therefore a stage of the measuring chain like the sensor and the converter, the compute stage of Chapter 1's six. It can add an error that appears only at inputs that a calibration may never apply.

Coefficients for each unit

The monitor's firmware must first turn counts into millimeters of mercury, and it cannot use one set of numbers for every unit, because no two sensors are alike. One of Omron's 2SMPP-03 sensors may have an offset anywhere within 4.0 mV of the typical −2.5 mV, and a span anywhere within 5.5 mV of the typical 42.0 mV (Chapters 4 and 11). The firmware therefore holds calibration coefficients, numbers measured for each unit and stored in its memory. Two of them carry most of the correction: a zero, the output taken as no pressure, and a span coefficient, the unit's own sensitivity, its change in output for each millimeter of mercury (Chapter 4).

The monitor obtains its two coefficients in different ways, because it can measure its zero again at every use, while the span coefficient needs a known pressure that only a reference supplies. Shenzhen CHK Technology, a Chinese monitor maker, requires each sensor to be calibrated in the method of its 2010 patent application. A program sets the gain and offset of the amplifier on the chip, so that zero pressure falls at one-eighth of the converter's codes and full scale at seven-eighths. The monitor then corrects its zero each time the sensor is switched on.

The air around the monitor supplies the zero's known pressure. In 1980 Omron, then named Omron Tateisi Electronics, filed a patent for a monitor that exposes its sensor to the atmosphere before measuring, stores the reading taken then as a correction and subtracts it from every later reading. Between calibrations the zero also serves as a check that the monitor makes on itself (Chapter 17).

The span coefficient comes from a calibration against a reference (Chapter 14), usually during manufacture, with known static, or steady, pressures applied at a series of values over the range, as Grotov, an individual inventor, describes the common practice in a patent granted in 2019. In Welch Allyn's service manual for the Ambulo 2400, an ambulatory monitor that the patient wears through the day, a technician applies 250 mmHg and then 15 mmHg from a reference and then drains the system to zero. The monitor's later tests must agree with the reference within ±3 mmHg.

Solved example: two calibration points for one unit

A unit with the highest offset and span in Omron's figures has an offset of −2.5 + 4.0 = 1.5 mV and a span of 42.0 + 5.5 = 47.5 mV over 50 kPa, about 375 mmHg, against the typical sensor's −2.5 mV and 42.0 mV.

  • This unit's sensitivity: 47.5 mV ÷ 375 mmHg = 0.12667 mV, or 126.7 µV, per mmHg, against the typical 112.0 µV.
  • At Welch Allyn's two points the bridge gives 1.5 + 15 × 0.12667 = 3.40 mV at 15 mmHg, and 1.5 + 250 × 0.12667 = 33.17 mV at 250 mmHg.
  • The span coefficient: (33.17 − 3.40) ÷ (250 − 15) = 29.77 mV ÷ 235 mmHg = 126.7 µV per mmHg. The zero: 3.40 − 15 × 0.12667 = 1.50 mV.
  • At a cuff pressure of 150 mmHg the bridge gives 1.5 + 150 × 0.12667 = 1.5 + 19.0 = 20.50 mV, and the unit's own coefficients return (20.50 − 1.50) ÷ 0.12667 = 150.0 mmHg.
  • The typical coefficients would return (20.50 + 2.5) ÷ 0.1120 = 205.4 mmHg.

With typical coefficients, this unit reads 205.4 − 150.0, about 55 mmHg, too high at 150 mmHg, and 55 divided by the ±3 mmHg limit is about 18, which is why each monitor carries its own coefficients. The firmware does the same arithmetic in counts, each count being 12.2 µV at the bridge (Chapter 8). A straight line through two points leaves the sensor's nonlinearity, up to 1.3 %FS, uncorrected unless the firmware adds a table of corrections at more pressures, and how much such a table leaves uncorrected is stated by neither Omron nor TI (Chapter 11).

21 — Two calibration points give one unit its own line
0 10 20 30 40 0 50 100 150 200 250 300 −5 BRIDGE OUTPUT, mV CUFF PRESSURE, mmHg this unit: 1.5 mV, 47.5 mV span (the top of both of Omron's bands) typical coefficients: −2.5 mV, 112.0 µV per mmHg (Omron 2SMPP-03) zero, measured again with the sensor open to the air reference at 15 and 250 mmHg (Welch Allyn's service points) 20.50 mV this unit's coefficients: 150.0 mmHg typical coefficients: 205.4 mmHg 55 mmHg wrong with another unit's numbers Sources: offsets and spans from the Omron 2SMPP-03 data sheet (min/typ/max at 23 °C, 100 µA); points from the Welch Allyn Ambulo 2400 service manual.
References and standardsThe signal in the chainNoise and errorReadingFocal detail
Plate 21 — Two reference points fix one unit's zero and span. The same bridge voltage read with typical coefficients would be 55 mmHg high, about 18 times the ±3 mmHg limit.

Designs differ most in where they correct for temperature. Omron states no temperature compensation for its 2SMPP-03, although it sums up the effect of temperature between 0 and 85 °C as ±5.0 %FS on the offset and ±3.0 %FS on the span (Chapters 4 and 11). Freescale's integrated sensors, the MPXV5050GP and the MP3V5050, carry the correction in circuits on the chip, as Freescale describes them. CHK requires in its patent that temperature drift be compensated, without saying where or how, and Grotov writes only that a monitor may include a thermistor, a resistor whose value changes with temperature, or another temperature sensor. A design built on a bare bridge must therefore state where its temperature correction is made: in the sensor, in the circuit or in the firmware.

From oscillations to an estimate

Before any algorithm runs, the firmware separates the oscillations from the cuff pressure and reduces the noise. It does both with digital filters, calculations run on the stream of readings, and a filter that reduces noise does so at the cost of time, because it averages over a longer stretch of readings. In the monitor, a filter that averages over more than a beat would average away the oscillations as well.

A converter at its quietest setting can be too slow for a pulse. Analog Devices' AD7190 converter, at a gain of 128, has 8.5 nV rms of noise at 4.7 readings a second, against 295 nV at 4,800 a second, about 35 times more, since 295 divided by 8.5 is 34.7. At the slower rate its filter needs four conversion periods to settle after a step, and 4 divided by 4.7 readings a second is 0.85 s. That is longer than one beat at 80 a minute, which lasts 60 divided by 80, or 0.75 s.

Two designs filter in the firmware. Oh and colleagues' prototype monitor (Chapter 7) read its sensor 75 times a second and separated the oscillations in software with a digital high-pass filter whose corner frequency was 0.5 Hz. Microchip's reference monitor smooths its readings with a moving average run twice, which weakens the signal above 3.5 Hz, as the trade magazine Electronics For You reports. In both designs the firmware decides how much noise is removed at the cost of time, although in Oh and colleagues' design the converter's own filter also decides how much mains hum remains (Chapter 7).

The algorithm then turns the envelope of Chapter 7 into the estimate: the systolic pressure, the highest pressure in the artery during a heartbeat, and the diastolic pressure, the lowest. It rests on a published principle: the oscillations are always largest when the cuff pressure equals the mean arterial pressure, in Renesas's words (Chapter 1). Systolic pressure is read where the amplitude of the oscillations grows suddenly, and diastolic pressure where its rapid decline begins, as Freescale placed them in a 2005 note.

The common fixed-ratio method reads systolic and diastolic pressure where the envelope falls to a population-based fraction of its peak, one fraction, or ratio, on each side of it, as Chandrasekhar and colleagues at Michigan State University describe it. In a 2019 study of the popular published algorithms, they used a mathematical model and pressures recorded inside the arteries of 21 patients, and the US National Institutes of Health funded the work.

Each maker sets its own ratios. TI gives ranges for them in its monitor design, 0.30 to 0.75 for systolic pressure and 0.45 to 0.90 for diastolic, but it marks its table of values as for reference only and leaves the algorithm section of its software blank. Chandrasekhar and colleagues call commercial algorithms proprietary, and Celler and colleagues (Chapter 7) describe them as "closely guarded trade secrets that are not subject to independent critique and validation". By these accounts, the ratios inside a finished monitor are not published.

The ratios also rest on the peak, and the peak is less simple than the principle suggests. Chandrasekhar and colleagues found that the cuff pressure at the largest oscillation is a weighted average of systolic and diastolic pressure, with weights of 0.45 and 0.55. They also found that the true ratios varied between patients over a range of 0.5 to 0.6. A single population ratio therefore fits some patients and misses others.

The ratio a maker chooses moves its monitor's systolic estimate. In a 2018 study, Celler and colleagues tested six finished monitors on a simulator, which gave every monitor the same pulses. In their analysis, the systolic ratio that best matched auscultation, the stethoscope method, was 0.565. Three monitors from Chinese makers behaved as if they used a ratio of about 0.46 and overestimated systolic pressure by 6.2 mmHg on average. The other three, one German and two Japanese, behaved as if they used about 0.65 and underestimated it by 4.8 mmHg. Above the cuff pressure of the largest oscillation, where systolic pressure is read, the envelope grows as the cuff pressure falls, so a smaller ratio is reached at a higher cuff pressure and gives a higher systolic reading. On the same simulated pulses, the two groups' average systolic errors lay 6.2 plus 4.8, about 11 mmHg, apart.

The estimate is defined against a reference method on people, not against a manometer (Chapter 24). Microlife, for example, ties its home monitor's estimate to the Korotkoff method (Chapter 1), phase I of the sounds for systolic and phase V for diastolic pressure.

22 — One envelope, three systolic ratios
0 0.5 1.0 180 160 140 120 100 80 60 40 OSCILLATION SIZE, FRACTION OF PEAK CUFF PRESSURE, mmHg deflation → TI's diastolic range: 0.45 to 0.90 of the peak; systolic range 0.30 to 0.75, for reference only largest oscillation: a weighted average of systolic (0.45) and diastolic (0.55) pressure (Chandrasekhar and colleagues, 2019) about 0.65: one German and two Japanese monitors: −4.8 mmHg on average 0.65 0.565: best match with auscultation (Celler and colleagues, 2018) 0.565 about 0.46: three monitors from Chinese makers: +6.2 mmHg on average 0.46 about 11 mmHg between the two groups' systolic errors Envelope shape schematic. Sources: ratios and errors from Celler and colleagues (2018, simulator and 304 recordings from 102 patients); ranges from TI TIDA-010266.
The algorithm's estimateFocal detail
Plate 22 — The fixed-ratio method reads systolic pressure where the envelope reaches a set fraction of its peak. A lower fraction lands at a higher pressure, which is why ratios of about 0.46 and 0.65 overestimate and underestimate systolic pressure.
A calibrated cuff pressure leaves the algorithm untested

Calibration ties the reading, the cuff pressure, to a reference manometer at static pressures (Chapter 14). The systolic and diastolic values come from ratios applied to the envelope, and a static test never exercises them, so no comparison with a manometer would reveal the 11 mmHg between the systolic errors of Celler and colleagues' two groups of monitors. A design file that shows a calibrated pressure channel has therefore shown nothing yet about the estimate, which a clinical validation on patients tests (Chapter 24).

The record and what it inherits

The last computing steps are rounding and units, and each is a quantization of its own. The firmware rounds its counts to the display's 1 mmHg (Chapter 8). A monitor that can also show kilopascals must convert, and the conversion rounds a second time. Under India's rule for automated sphygmomanometers, the display's scale interval, the step between two shown values, is 0.1 kPa or 1 mmHg (Chapter 8). The two steps are not equal: at 133.322387415 Pa to the millimeter of mercury (Chapter 3), 0.1 kPa, which is 100 Pa, is 0.75 mmHg.

Firmware that rounds in one unit and then converts the rounded value into the other rounds twice, and the second rounding can move the shown digit. A cuff pressure of 150 mmHg is 150 times 133.322 Pa, or 19.998 kPa, shown as 20.0. A cuff pressure of 149.6 mmHg is 19.945 kPa and should show 19.9, but rounded first to 150 mmHg it shows 20.0, one step of the display too high.

23 — What the firmware does between the converter and the display
counts, 0.109 mmHg each CALIBRATION AGAINST A REFERENCE MANOMETER CHECKS THIS PATH (CHAPTER 14) − × mmHg 150 mmHg subtract the zero multiply by the span factor cuff pressure, mmHg round to 1 mmHg display optional: convert to kPa, 19.998 → 20.0 not exercised by any pressure calibration SYS DIA high-pass filter 0.5 Hz (Oh and colleagues) oscillation size, one per beat envelope ratios: the maker's own systolic / diastolic ONLY CLINICAL VALIDATION CHECKS THIS PATH (CHAPTER 24) check value zero at power-on span factor calibrated stored readings SE 1, HE 37, HE 18: calibration missing or corrupted memory → phone, clinic system, health record Schematic; no single maker's firmware.
References and standardsThe signal in the chainThe algorithm's estimateReadingFocal detail
Plate 23 — One stream of counts feeds two outputs. Calibration checks the path to the cuff-pressure reading; the path through the maker's ratios to the systolic and diastolic estimate needs a clinical study. Sources: Omron's patents, the Welch Allyn Ambulo 2400 service manual (the error codes), Oh and colleagues (2008) and TI TIDA-010266.

A reading becomes a record when the firmware stores it, and the record keeps every error the code made. The InsuLinx meter stored its wrong results in memory as well as showing them, so the stored history carried the same false values as the display. The monitor of Omron Healthcare's patent first filed in 2009 keeps its measurement data in nonvolatile memory, such as flash memory, which holds its contents when the power is off, so a stored value remains, right or wrong. Welch Allyn's Ambulo 2400 reports "SE 1" when it has no main calibration, and "HE 37" or "HE 18" when it is not calibrated or its calibration is corrupted, so its firmware checks the coefficients it depends on.

The memory itself can fail, and a monitor can report the failure rather than hide it. An error may occur at power-up in the NIBP EEPROM of Welch Allyn's patient monitors, as the maker describes in a 2012 bulletin. The name joins NIBP, non-invasive blood pressure, with EEPROM, a nonvolatile memory chip. When the error occurs, the monitor's display reads "NIBP Not Functional. Call for service." Welch Allyn states that the error does not constitute a risk to the patient, but it does not state what the memory holds.

From the memory the record passes to a phone, a clinic's system or a health record, and each link copies what the firmware computed without any means of checking it against the cuff. Software that computes a measured number therefore needs verification as a link of the chain in its own right. The International Electrotechnical Commission, the IEC, publishes the standard for that work, IEC 62304, Medical device software – Software life cycle processes. As of October 2026 the IEC lists it as the 2006 edition with its 2015 amendment and lists no second edition. Two consultancies describe a second edition in draft, and they disagree on how far the draft has progressed. The companion guide on medical device software and AI, The next patient, the next update, follows that life cycle in full. The accuracy of the firmware's corrections is also a requirement of the monitor's design (Chapter 25).

Firmware that computes a measured number
  • Store each unit's zero and span coefficient with a check value, a checksum recalculated at start-up, and report a missing or corrupted coefficient as an error, as Welch Allyn's monitors report a missing or corrupted calibration.
  • Test the conversion across the whole input range, including values the device rarely meets: the InsuLinx error appeared only at 1,024 mg/dL and above.
  • State where temperature correction is made, in the sensor, the circuit or the firmware, and verify it across the 10 to 40 °C over which the legal limit applies (Chapter 11).
  • Keep the value computed before rounding in the record, and convert units from that value rather than from a rounded one.
  • Record the algorithm's ratios and their origin in the design file apart from the calibration record, because calibration does not test them (Chapter 24).
  • Verify the firmware under the software life cycle of IEC 62304.
+ What this chapter established
  • Firmware is a stage of the measuring chain: at very high glucose, the FreeStyle InsuLinx glucose meters that Abbott recalled in 2013 showed and stored results 1,024 mg/dL below the measured value, as the recall notice stated, and FDA recorded the cause as software design.
  • Each monitor needs its own calibration coefficients because sensors differ: a zero, measured again with the sensor open to the air, and a span coefficient from calibration points such as Welch Allyn's 250 and 15 mmHg; read with typical coefficients, one unit is 55 mmHg wrong at 150 mmHg.
  • The algorithm that turns the envelope into systolic and diastolic values is published only in principle, each maker's ratios are its own, and on a simulator ratios of about 0.46 and 0.65 shifted the systolic estimates of two groups of monitors by +6.2 and −4.8 mmHg on average, which no calibration of the cuff pressure tests.
  • Rounding, unit conversion and the stored record each carry whatever the code computed, so the firmware's checks of its own coefficients and its verification under IEC 62304 belong to the measurement.
Created with Claude (Anthropic).
Educational reference material, not engineering, regulatory or clinical advice. Product and company names referenced are the property of their respective owners.