The MATLAB code that we use to read and display the pressure in real time uses the MATLAB Support Package for Arduino to retrieve pressure readouts from the Arduino, which was connected to four Honeywell ABPDANT005PGAA5 board mount sensors. Voltage output from the sensors is in the Arduino code (see pressureSystemV1.docx below), and then the voltage outputs are converted to pressure using the readVoltage function and transfer function given in Honeywell ABP Datasheet, in MATLAB.
The pressures are then plotted in real time so that we can monitor pressure during the procedure (see RealTimeCollection4SensorsV3.m). While the majority of the code was existing from the previous group that worked on this project, we made one key change; we added the ability to mark certain time points by adding an additional button GUI. This button adds a vertical line at the time point at which the button is pressed (highlighted by the red arrows in the screenshot below) and also marks the time point in the .csv output at the end. With this, we are able to better track the pressure changes during certain events of the surgery (such as balloon inflation and deflation).
Another issue we were tasked with was smoothening the signals, which appear to be low resolution when plotted.
We found that this was caused by a delay in communications between MATLAB and the Arduino via USB. Although the Honeywell sensors are reported to have a 1 kHz polling rate, the delay caused the effective sampling rate of our system to be about 1 measurement every 0.2 seconds, or 5 Hz. Therefore, in order to truly increase the sampling rate, a complete overhaul of the software would be required, which was not feasible due to time restraints. However, for the purposes of our project, measuring the average pressure is more important than clearly resolving each peak in the waveform so we decided that simply interpolating the signal to provide more visually appealing plots would be sufficient. The Nyquist criterion (sampling rate must be twice the frequency of the signal in order to interpolate without losing information) is met (see calculations below), so interpolating the signal is a valid approach. Data interpolation was carried out using the interp1 function in MATLAB using the 'spline' method and then plotted using a simple (see interpolate_4sensors.m and Plotting.mlapp below). The resulting waveforms looked like this:
Nyquist Criteria Calculations
Page created by Chris