The development of this device requires two main steps to be performed before the safe and proper implementation of the final product. These steps include the development of the impedance-controlled feedback system and validation of the safe and proper operation of the system.
2.1. Development of Feedback System
To accomplish the task of developing a device that can measure and track the changes of the impedance over time while the ESU is in operation requires three separate systems that need to be created and integrated together. The three parts of this feedback system include the modified ESU, a measuring system, and a controlling system. The ESU modified in this study, which supplies the high-frequency alternating current, is the Olympus PSD-30 (Olympus, Shinjuku, Tokyo, Japan). The PSD-30 has a fundamental frequency of 350 kHz with an open-circuit output voltage upwards of 900 V. The ESU is capable of outputting power ranging from 2 W–50 W. The ESU also has three different methods of operation for each the coagulation and cutting mode. The three modes for coagulation include soft, auto-stop, and forced. The soft mode is used to stop light bleeding as well as marking tissue where very little tissue carbonization occurs in this mode. The auto-stop mode uses soft coagulation and is used to reduce tissue carbonization and invasion while using forceps. The forced mode is used for strong coagulation and hemostatic effects. The three modes used for cutting include pure, blend1, and blend2. The pure mode uses the cut wave-form with no hemostatic effects while the blend1 mode contains some hemostatic effects and blend2 contains even more hemostatic effects than blend1. The measuring system is comprised of a computer running LabVIEW (National Instruments, Austin, TX, USA) that is used to calculate the impedance values and determine at what point the ESU should be interrupted. The final piece of the puzzle consists of the controlling system. This control system uses an Arduino UNO (Arduino LLC, Ivrea, Italy) microcontroller to coordinate the safe measurement of the impedance. With each of these three systems synchronized, accomplishing the task of initiating, measuring, and interrupting the ESU based on the change in impedance value can be developed.
The modification of the ESU was accomplished by way of the foot pedal assembly. This allows for the reading of when the user presses down on the assembly to initiate the firing, as well as a place to stop the ESU from firing by interrupting the signal sent to it. The foot pedal assembly works by use of two normally open momentary switches as shown in
Figure 1a. One switch is used to control the cutting mode, while the other switch is used to control the coagulation mode. The modification was accomplished by way of these two switches. The wires connecting from the switches were cut, and then the microcontroller was placed in between each wire as shown in
Figure 1b. This gave the microcontroller two inputs and two outputs. When one of the pedals are pressed, a 5 V signal is passed, on the other hand, when the pedals are depressed, the signal reads 0 V. This allows for the microcontroller to determine the state of the switch as either digital high, the user is pressing the button to fire, or digital low, the user is not pressing the button. With this information, the microcontroller can tell the ESU to fire or not. Essentially the user presses the button on the foot pedal assembly telling the microcontroller they wish to fire the system, and then the microcontroller tells the ESU whether to fire or not, effectively playing the middleman.
The second portion of the feedback system comprises the measuring system (
Figure 2). This part of the feedback system is used to take the impedance measurement of the device under test (DUT), which in this case is the model the alternating current from the ESU passes through. The measuring system consists of multiple parts which each play a vital role in the operation. The first of which is the E3633A benchtop DC power supply (Keysight Technologies, Santa Rosa, CA, USA) which is used to power the PYB10-Q24-D5 DC-DC converter (CUI Inc, Tualatin, OR, USA). The DC converter takes an input voltage range from 9V–36V and was chosen because it can support an output current from ±50 mA to ±1000 mA and supplies the ±5 V required by the Howland current pump, buffers, and relays. Note that the power connections for each of these components are not shown in the diagram to keep the figure from being cluttered. The Howland current pump was chosen for its’ ability to provide a stable output current over varying input frequencies which is required for accurately measuring both the DUT and reference resistor. The current pump uses the Voltage Controlled Current Source (VCCS) method and was tested and confirmed for accuracy over a range of 3 kHz–1 MHz to provide 200 µA RMS by measuring the voltage from the reference resistors. The current has a constant value regardless of the DUT using OPA655 operational amplifiers. These op-amps were chosen as they outperformed three others in a study by Bertemes-Filho et al. [
15].
In addition, a B&K Precision model 4053 Function Generator (B&K Precision Corp, Yorba Linda, CA, USA) is used to generate the 50 kHz 1 V
pp sinusoidal wave that is used as the reference signal. The 50 Ω output impedance and varying current from the function generator are handled by the current pump to ensure a constant current for measuring. The single 50 kHz frequency was chosen for two reasons. The first of which has to deal with timing. Although multifrequency bioimpedance spectroscopy is the preferred method, as it allows for a complete picture of the properties of the subject [
16], this method takes too long to be practical in this application. To perform a reasonable multifrequency measurement, frequencies from about 5 kHz to 500 kHz need to be measured, which dismisses this technique. This frequency range is the most commonly used for bioimpedance analysis [
16]. Knowing that a single frequency measurement will be required, leads to the second reason. The 50 kHz frequency is the most commonly used frequency when performing a single frequency bioelectrical impedance measurement. This is due to the weighted sum of extra-cellular water (ECW) and intracellular water (ICW) resistivities at this frequency [
16]. With knowing that the current source supplies a constant current of 200 µA
pp RMS at this reference frequency, the impedance of the DUT and reference resistor can be calculated. To calculate these impedance values, two voltage output signals are collected with a National Instruments NI 6353 data acquisition (DAQ) device as shown in
Figure 2, where the reference resistance is 475 Ω. This resistance value was chosen as it is a comparable resistance to the DUT. This allows for a measurable voltage drop that is not too small where the error of the measuring device does not become a problem. Before the signals make it to the DAQ however, they are passed through a buffer, also known as an active electrode (AE)
Figure 3, and then through an instrumentation amplifier (IA) with a gain of two. The buffer is used to stabilize the signal, while the amplifier is used to increase the small output voltage being received by the DAQ for higher resolution. These voltages collected by the DAQ are then read into LabVIEW via the computer. The sampling frequency of the DAQ is set to 251 kHz. This adheres to the Nyquist rate and ensures the samples are not a constant multiple of the measuring frequency ensuring that the full waveform is measured. The 475 Ω reference resistor is used to confirm that the voltage measurements taken of the DUT are accurate. To ensure this, the measured voltage drop should be an ideal 268.7 mV, which relates to a resistance of 475 Ω. This value is derived from multiplying the current from the pump of 282.84 µA with the known reference resistance of 475 Ω, and then multiplying by a factor of two for the amplifier. With this measurement, the system can be said to accurately measure the voltage drop across the DUT.
Now that the modification of the ESU and measuring system is completed, the control system part of the feedback system needs to be developed (
Figure 4). For the control system, a microcontroller is used to coordinate the firing, measuring, and the on and off synchronization of the relays. The microcontroller utilizes three inputs and five outputs to achieve this. Two inputs are used for reading the state of the foot pedal assembly, one for coagulation and one for cut mode, while the third input is connected to the DAQ which is attached to an interrupt pin on the microcontroller. This third input is used by LabVIEW to stop the ESU before perforation occurs based on the measured impedance and calculated threshold value. The five outputs include one for each of the two sets of two CPC1988 solid-state power relays (IXYS, Milpitas, CA, USA). These high-power solid-state relays are used to separate the DUT between the measuring system and the modified ESU. They were chosen because of the high 1000 V
p blocking voltage [
17] which is required to block the maximum output voltage of about 900 V [
18] that the PSD-30 ESU is capable of. Two more outputs are used to control each of the 9002 SIP reed relays (COTO Technology, North Kingstown, RI, USA) which are used to send a 5 V signal to the modified ESU foot pedal assembly to fire either the coagulation or cut mode. As the signal required to fire the ESU is low voltage, the only concern was that of speed. That is why the 9002 SIP reed relay was chosen, it has an operating time of 0.35 ms and a release time of 0.1 ms [
19]. It is important to note that each of these four outputs is controlling the relays through NPN bipolar transistors configured to perform as a switch. This was done to allow the relays to be powered by the DC-DC converter’s 1000 mA power supply, as the microcontroller is not able to source enough current for proper switching. The transistors are not included in the diagram for simplicity. The final output is connected to the DAQ and tells LabVIEW whether it is acceptable to measure or not. This output is especially important as the feedback system should not take measurements while the ESU is firing as the measuring relays are open and an infinite impedance measurement would be calculated.
Now that the feedback system is complete, the operation of the system is as follows. The complete impedance feedback system is shown in
Figure 5.
As the user presses the foot pedal, a 5 V signal is sent to the microcontroller indicating either the coagulation or cut switch has been pressed. The microcontroller reads this input and starts by opening the solid-state power relays that connect the measuring system to the DUT, which will be referred to as the ‘measure relays’. While this is happening, the solid-state power relays connecting the ESU to the DUT are closed, these relays will be referred to as the ‘ESU relays’. This separates the measuring system from the DUT while the ESU is firing, and closes the connection between the DUT and ESU while the PSD-30’s fundamental frequency of 350 kHz alternating current is being applied. While the foot pedal is still being pressed, the microcontroller opens the ESU relays and closes the measuring relays. This now allows for safe and accurate measurements. When this switch happens, the microcontroller sends a signal to the DAQ to tell LabVIEW to measure the voltage drop across the reference resistor and the DUT. LabVIEW takes these voltage measurements and converts them into a resistance, using the known current of the system, and decides whether or not there has been too much thermal damage. From here, the microcontroller tells LabVIEW to stop measuring, and the ESU and measure relay switch orientation again. The ESU continues to send an alternating current to the DUT, and the process is repeated over and over again until the calculated resistance reaches some threshold value. Once this threshold is reached, LabVIEW sends a signal to the microcontroller to interrupt this process and turn off the ESU firing process. This ultimately stops the DUT from receiving any more alternating current from the ESU.
2.2. Validation of Feedback System
Before the validation can begin, a few programming considerations need to be completed. The first consideration that was made includes adding a delay of 25 ms between the transition of opening and closing the relays that separate the measuring system and ESU from the DUT. This is done to ensure that no current is sent back into the measuring system destroying the equipment. The 25 ms delay was chosen as a safe postponement time as the maximum switching time for the measure and ESU relays, according to the datasheet, is 20 ms.
This allows for a 5 ms buffer in case something goes wrong in the validation stage. An additional consideration had to be made in terms of a 25 ms delay between closing the measure relays and sending the signal to the DAQ to begin measuring. This fixed an error that occurred where the resistance measured would be extremely high as the initial measurements were made while the relays were still slightly open, during the switching of the relay. The last consideration that had to made concerns the ESU. The minimum amount of time that the ESU needed to be on before being turned off was found to be 75 ms. If the on-time was any less than this, then the ESU would display an error ‘Er P’ on the front panel. This error is caused by the ESU thinking that the P cord of the device is broken. With all of these considerations, the time to complete one full cycle of measuring the DUT, turning on and off the ESU, and back to measuring takes 0.184 s. This means that the ESU fires 5.4 times a second, with a total on-time of 0.405 s, giving the system a duty cycle of about 41%. A complete timing diagram is shown in
Figure 6. The ‘Foot Pedal Pressed’ signal indicates wither the microcontroller reads a digital low, No, or digital high, Yes, signal from the modified foot pedal assembly. The ‘Measure Relays’ and ‘ESU Relays’ signals indicate when the relays are open or closed. The ‘ESU Firing’ signal indicates when the PSD-30 is applying an alternating current to the DUT. While the ‘LabVIEW Measure’ signal indicates when the impedance of the DUT is being measured.
The DUT used for validation is an RRC circuit which is the equivalent electrical circuit (
Figure 7). used to mimic the human body [
16]. Where the resistance of the ICW is denoted by R
I, the resistance of the ECW is denoted by R
E, and the cell membrane is denoted by C
M. The values chosen are such that they represent the Cole-Cole curve from the ground patch location to the colon. An ImpediMed SFB7 (ImpediMed Ltd., Pinkenba, Australia) was used to determine these values. The SFB7 is capable of taking 256 measurements ranging from 4 kHz to 1 MHz in the time span of just about one second [
20]. The device was connected at the same location that the ground patch would be on the thigh with the other end attached to the torso where the colon is located. The average of three measurement values for the front of the torso to the thigh was calculated to be 62.06 Ω for R
0 and 25.35 Ω for R
∞. While the average of three measurement values for the back of the torso to the thigh was calculated to be 65.50 Ω for R
0 and 25.28 Ω for R
∞. The R
0 and R
∞ values of these two positions were then averaged to give a close representation of what the Cole-Cole curve would look like if the snare were near the colon. The average values of these were calculated to be 63.78 Ω for R
0 and 25.32 Ω for R
∞. With these design specifications, the RRC circuit was created with a 64 Ω resistor for R
E, a 18 Ω resistor for R
I, and a 1nF capacitor for C
M. As the measurements are all taken at the 50 kHz frequency and the equivalent circuit does not change values with the applied alternating current, a potentiometer was placed in series with the RRC circuit. This allows for the change in impedance of the DUT, by way of turning the potentiometer, to simulate the increase that would be observed if a tissue sample were being measured as an alternating current from the ESU was being passed through it.
Multiple tests of the feedback system were performed on the DUT with impedance threshold values set to 500 Ω, 750 Ω, and 1000 Ω. A low power setting on the ESU was used as this was the proof of concept step and the electrical components used were not rated for high wattage. In each of the trial runs, the alternating current from the ESU was stopped at each impedance threshold. During each trial, the impedance measurements from the reference resistor stayed within ±5 Ω of the known resistance of 475 Ω. The time between data points was also found to be the correct time delay of 0.184 s as predicted. The power to impedance curve for the 1000 Ω threshold trial is shown in
Figure 8. As the coagulation switch was pressed on the modified foot pedal assembly, the potentiometer was turned simultaneously. The impedance started at 68 Ω and moved up to the 1000 Ω threshold where the ESU was automatically stopped by the feedback system, where the power dropped off to 0 W. Now that the feedback system has been verified as working as designed, the next stage of the study can be completed.