Performing Contactless Respiration Rate Measurements Using an Optical Displacement Sensor and LabVIEW

 Read in  |   Print

"We developed custom software using LabVIEW to visualise the acquired signals in real time, calculate the RR in real time, and store the data in the computer for further analysis."

- Beng Gan Kok, Institute of Space Science

The Challenge:
Developing a graphical user interface and hardware interface without using a difficult and time consuming text-based programming environment, while avoiding obstacles typical with instrumentation design and development, which include hardware interfacing and the software driver.

The Solution:
Using NI LabVIEW system design software to design and analyse a digital signal processing (DSP) system, and using NI-VISA software to provide the serial programming interface between the optical sensor controller and LabVIEW.

Beng Gan Kok - Institute of Space Science
E.S. Yahyavi - Institute of Space Science
E. Zahedi - Institute of Space Science
M.A. Mohd. A - Institute of Space Science

Medical personnel should gather vital signs from every patient receiving a health assessment. Vital signs can offer clues on a patient’s status. The vital signs that medical personnel frequently use to assess patient health are respiratory rate (RR), heart rate, blood pressure, temperature, saturated oxygen, and pain. RR is the most sensitive and crucial vital sign because most emergency cases will present some alteration in it.

In a 2003 article in Journal of Trauma, Hans Husum demonstrated that RR and airway obstruction are the key predictors of injury severity and death. RR is a good indicator of respiratory infection at all ages according to articles in The BMJ by David Isaacs and J.P. McFadden and an article by Thomas R. Gravelyn in JAMA. However, accurate measurement is essential. The present method of measuring RR, other than manual observation, is capnography, which is monitoring the concentration or partial pressure of carbon dioxide (CO2) in the respiratory gases. The waveform gives us information about inspiration and expiration as well as the arterial to end tidal CO2 differences. In the Indian Journal of Anesthesia, Jacqueline D’Mello and Manju Butani contend that clinically expired CO2 reflects changes in metabolism, circulation, respiration, the airway, and the breathing system. Even though capnography is considered the most accurate method of measuring RR in most studies, according to articles by C.V. Egleston and Michael C. Plewa in the Emergency Medicine Journal, it is an invasive technique.

Measurement of movement, volume, and tissue concentrations through transthoracic impedance, inductance plethysmography, and mattress sensors are some other techniques that medical personnel can use to measure RR. However, none of these methods have been used in the emergency department due to the measurement speed. In the emergency department, triage officers need to categorize patients into a triage level within two minutes. Triage officers normally acquire the RR manually, which may contribute to measurement error. Additionally, most respiration measurement devices require medical personnel to attach the sensors to patients. This is time consuming and may increase the risk of patients contracting infectious diseases. The sensor placement on the patient’s body may cause discomfort and result in stress that can affect the breathing rate.

Our main objective with this project is to develop a contactless RR measurement system using an optical displacement sensor and LabVIEW. The sensor is serially interfaced to the computer using NI-VISA. We use the peak detection algorithm to determine the local maximum and calculate the RR. This report presents the preliminary study and the hardware setup using LabVIEW and NI-VISA.


The measurement technique is based on the small displacement of the chest cavity due to respiratory activity. We can detect chest wall displacement using the LK-G507, a high-precision and high-speed optical displacement laser sensor. The laser light source is 650 nm and produces a wild spot type capable of performing reliable measurements of the rough surface with a measuring range from 250 to 1,000 mm. The sampling frequency is 50 kHz with ±0.05 percent accuracy and 0.5 mm repeatability.

The LK-G507 sensor (Figure 1) produces optical power at 0.95 MW (Class II). Users should not look directly at the laser source. This sensor comprises a charge-coupled device (CCD) sensor, lens, and optical system. The light reflected from the target passes through the receiver lens and is focused on the CCD sensor. The CCD sensor detects the peak value of the light quantity distribution of the beam spot for each pixel and identifies this as the target position. The position of the reflected light on the CCD sensor moves as the position of the chest wall moves due to respiration.

The displacement sensor was connected to the sensor controller and serially interfaced to a computer using NI-VISA. NI-VISA made serial instrument programming fast and easy. The basic VISA functions in LabVIEW included VISA Open, VISA Read, VISA Write, and VISA Close. We developed custom software using LabVIEW to visualise the acquired signals in real time, calculate the RR in real time, and store the data in the computer for further analysis. We used the peak detection algorithm to detect the local maximum of the optical displacement waveform and calculated the instantaneous RR based on the differences of the positive peaks.

We conducted the data acquisition sessions in the System Design Laboratory at the Universiti Kebangsaan Malaysia. Seventeen healthy subjects (12 males and five females) between 24 and 55 years old participated in this study. They all provided informed consent after we clearly explained the procedure to them. We asked the subjects to sit on a chair 500 mm away from the sensor. The manufacturer specified the measurement range of the sensor as 250 to 750 mm. The laser irradiated continuously to the patient’s chest wall for 179 seconds. The sensor detected the reflected laser from the patient’s chest wall and sent it to the computer at 45.45 Hz (set by the manufacturer). Figure 2 shows the setup of the contactless respiration rate measurement system in the System Design Laboratory.

Results and Discussion

Figure 3 shows the graphical user interface (GUI) of the system during the data acquisition session and the reflected optical signals from the chest wall. The same GUI shows the instantaneous respiration rate in breaths per minute (BPM).

The preliminary results show that the respiration rate measurement using optical methods ranged from 12 to 34 BPM in healthy random subjects as shown in Figure 4. Note that the measured respiration rates using this technology were still within the minimum and maximum of the human respiration rate, which is 6 to 70 BPM. However, medical data and reference measurement methods are required to validate these results.

This pilot study shows that it is feasible to measure the RR using the optical displacement sensor. Future work will focus on the efficacy of motion on RR by enhancing the digital signal processing technique and establishing the standard RR measurement using electrocardiograph or a piezoelectric respiration sensor.

Author Information:
Beng Gan Kok
Institute of Space Science
Faculty of Engineering & Built Environment, UKM, UKM Bangi, Selangor
Tel: 6012-7804622
Fax: 603-89216856

Next Steps

Download LabVIEW

Bookmark and Share

Explore the NI Developer Community

Discover and collaborate on the latest example code and tutorials with a worldwide community of engineers and scientists.

‌Check‌ out‌ the‌ NI‌ Community

Who is National Instruments?

National Instruments provides a graphical system design platform for test, control, and embedded design applications that is transforming the way engineers and scientists design, prototype, and deploy systems.

‌Learn‌ more‌ about‌ NI