Site Search:

A Closer Look at the Advanced CODAS Peak Capture Algorithm

Versatile data analysis software package offers automatic detection and convenient reporting of critical cyclic waveform information.

Any continuous periodic waveform represents a variety of desirable information, such as the beginning and end points of a cycle, the minimum, maximum, or mean signal values within the cycle, and the rate at which the cycle repeats. This information is obtained, in many cases, from a quick glance at the waveform and a simple calculation. The problem is not one of procedure, but time. Consider a more typical application involving not one, but several hundred cycles and the need to calculate with reasonable accuracy the parameters mentioned above on a cycle-by-cycle basis. The task becomes overwhelming. Without question, the process may be simplified by "eyeballing" large groups of waveforms for average maximum, minimum, mean, and rate values. But what happens to accuracy and all-important repeatability?

The obvious solution is to computerize. Everyone knows that computers excel in their ability to evaluate large quantities of numbers. Although it is true that for any number of samples a computer can be programmed to report the highest and lowest values, it fails to duplicate the ability of an experienced technician to intuitively identify the beginning and end points of a cycle. Since the accurate determination of minimum, maximum, mean, and rate information depends on an equally accurate determination of cycle beginning and end points, the computer-based solution fails.

The development of DATAQ Instruments' Peak Capture algorithm focused on solving the beginning and end point determination problem, since this was the only barrier preventing the computer from automating the labor-intensive process described above. Through innovative software design, and by making the technician or researcher part of the evaluation process, the Peak Capture algorithm of Advanced CODAS represents the first computer-based solution to the automatic detection of peak, valley, mean, and period information on either a cycle-by-cycle, or a 2 to 32,767 cycle average basis. In addition to the Peak Capture algorithm, the Advanced CODAS package also includes a report generator utility and software routines for waveform integration, differentiation, moving averages, rectification, and arithmetic operations.

Peak and Valley Capture Theory

DATAQ Instruments' Peak Capture algorithm allows the cycle-by-cycle extraction of peak, valley, or peak and valley data points from a periodic waveform. Any periodic waveform can be thought of as a long string or collection of data values. Aside from the peak and/or valley data value, the rest of these values are many times of little or no interest to the technician or researcher. The Peak Capture algorithm can be applied to virtually any waveform with the purpose of reducing this large number of waveform data values to several meaningful values per waveform cycle, representing the maximum, minimum, or maximum and minimum signal excursion within the cycle.

Data Acquisition Waveform - typical arterial blood pressure
Figure 1 — Typical arterial blood pressure waveform. The peak pressure is referred to as the systolic pressure and the minimum pressure is referred to as the diastolic pressure. These pressures are normally measured in millimeters of mercury (mm/Hg ). The mean pressure is calculated to be the average value of the cycle. The period from diastolic point to diastolic point is referred to as the heart rate, while the period from diastolic point to dicrotic notch is referred to as the ejection time.

The procedure used by the algorithm to determine cyclic peak and valley waveform values involves the use of a sensitivity setting. This sensitivity level, controlled by the user through the software, can be increased or decreased to mask or allow minor changes in waveform inflection, resulting in a valid peak and/or valley detection. The software then automatically tags these waveform data values with a positive and/or negative going event marker to indicate cyclic peak and valley points respectively. These tagged points can be reviewed to verify the results and even edited if desired. Once tagged, these values can be sent to another Advanced CODAS utility called the Report Generator to further aid analysis and interpretation of the acquired data by assembling a report of these values in one of two data storage formats.

The Peak Capture Algorithm and Base Line Shift

A salient feature of the Peak Capture algorithm is its ability to peak and/or valley capture data on a waveform containing large baseline variations. Waveforms containing a large amount of varying offset voltage on which the desired peaks and valleys ride pose no problem for the Peak Capture algorithm. Neither do ECG-type waveforms that feature peaks and valleys on a trend that shifts dramatically from the baseline in both positive and negative directions. The Peak Capture algorithm is still able to peak and/or valley capture these types of waveforms because of the unique design of the algorithm.

The Arterial Blood Pressure Waveform

The capabilities of the Peak Capture algorithm can be best illustrated with an example. An arterial blood pressure waveform was chosen because the complex shape of this waveform presents a challenge to most types of computer analysis software. Figure 1 shows a typical arterial blood pressure waveform. The dicrotic notch is what makes this waveform more of a challenge than other less complex waveforms. This notch represents a reflected pulse from the far end of the tapering great artery system. Less sophisticated analysis software would interpret this minor change in waveform inflection as a valid inflection point, resulting in erroneous data. The Peak Capture algorithm, however, can be adjusted to this variation in the waveform. By decreasing the sensitivity of the algorithm, the minor inflections of the waveform will be masked, leaving only true cyclic peaks detected, just as if a skilled technician had analyzed the waveform.

Data Acquisition Waveform - Peak and Valley Capture
Figure 2 — Original and peak-and-valley captured waveform. The top trace shows the original waveform and the bottom trace shows the original waveform captured for peaks and valleys, using the default sensitivity level of 30%.

Data Acquisition Waveform - systolic, diastolic and mean data
Figure 3 — Finished report from Excel showing systolic, diastolic, and mean data. This report contains cycle-by-cycle point values of the arterial pressure waveform shown in Figure 2. The output file format is Excel compatible, with a cycle definition of valley to valley. A valley to valley cycle definition was selected because one cycle of an arterial pressure waveform is defined as diastolic point to diastolic point. Cycle timing was reported as a rate in cycles per minute.

From a typical arterial blood pressure waveform, the systolic pressure, diastolic pressure, mean pressure, heart rate, and ejection time for each cycle can be determined accurately and repeatedly using two Advanced CODAS software utilities; the Peak Capture algorithm and the Report Generator. The first step in deriving relevant information from the raw waveform is to peak and valley capture the waveform with the Peak Capture algorithm. Obviously the peak and valley data values need to be captured because they represent the systolic and diastolic pressure values, but these data values will also be used to determine heart rate. The Peak Capture algorithm is accessed from the Advanced CODAS package in one of two ways; either from a menu that can be called up within the playback software package, or from the DOS command prompt. Once accessed, the Peak Capture algorithm prompts you for information about the waveform you wish to capture. You must specify the channel number of the waveform to be captured, the channel number that the peak and/or valley markers will be written to, the mode of capture, and the sensitivity level. The peak and/or valley markers can be written to a channel that contains a different waveform or to the same channel that contains the original waveform. The mode of capture defines whether the Peak Capture algorithm will mark peaks, valleys, or peaks and valleys. The sensitivity level determines how sensitive the algorithm will be to inflections in the waveform. The sensitivity level has a default setting that provides perfect results for most applications, but if your application deals with an unusual waveform, the sensitivity can be adjusted over a wide range to respond properly. It is possible to write a DOS batch file that will bypass these prompts entirely provided the proper command line syntax is used. This approach would be useful for repetitive operations where the analysis procedure is always the same. Figure 2 shows an original arterial blood pressure waveform as the top signal trace and the peak and valley captured version of the same waveform as the bottom signal trace.

The next step is to pass the peak and valley captured waveform through another Advanced CODAS utility called the Report Generator. The Report Generator extracts the peak and valley markers placed on the waveform by the Peak Capture algorithm as point values. Using these point values, the Report Generator will create a report (in the form of a new file) of the minimum, maximum, mean, and time values per cycle. This report will be created in one of two user selectable data file storage formats: spreadsheet/ASCII compatible or Excel compatible. The spreadsheet/ ASCII compatible format can be imported directly into spreadsheet software (e.g., Lotus 1-2-3, Excel, Quatro, etc.) for further analysis and plotting. The Excel compatible format can be imported directly by a variety of standard analysis packages.

The way the Report Generator calculates and reports the mean waveform value and cycle time is very unique and deserves a closer look. The mean value reported by the Report Generator is not an approximation, which would be expected from less sophisticated analysis software, but rather a true cyclic mean value. Using integration, the mean value of a waveform with respect to time from the beginning to the end of the cycle is calculated by:

Data Acquisition Equation - integration mean value of a waveform with respect to time from beginning to end of cycle

Where:
to = Time at the beginning of the cycle
t1 = Time at the end of the cycle

The Report Generator reports the cycle time in units the user selects. A waveform cycle can be reported as an interval (in seconds) or as a rate in either cycles per second (Hz) or cycles per minute. The waveform cycle interval is reported by taking the difference between the cycle beginning and end points (t1 - t0), which were previously defined for the mean value calculation. The waveform cycle rate in cycles per second (Hz) is reported by taking the reciprocal of the interval, and the waveform cycle rate in cycles per minute is reported by multiplying the reciprocal of the interval by 60.

The final step in deriving relevant information from the raw waveform is to import the file created by the Report Generator into the Excel analysis software package for data manipulation, analysis, and graphical display. Excel is a standard and widely used analysis package. Figures 3 and 4 represent the type of results possible with the Peak Capture algorithm and the Report Generator. The systolic pressure, diastolic pressure, mean pressure, and heart rate were all determined with one pass through the Report Generator since they were all defined with the same mode of capture - peak and valley. Because it is a parameter that is defined with a valley mode of capture, the ejection time required a second pass through the Peak Capture algorithm and the Report Generator.

Data Acquisition Waveform - finished report showing heart rate
Figure 4 — Finished report from Excel showing heart rate. This report contains cycle-by-cycle point values of the arterial pressure waveform shown in Figure 2. The output file format is also Excel compatible, with a cycle definition of valley to valley. Cycle timing was again reported as a rate in cycles per minute because heart rate is normally measured in beats (or cycles) per minute.