Effect of Filters in Photoplethysmography Analog Signals Using Open-Source LTspice Software

Analog signal processing plays a crucial role in the realm of biomedical signal analysis. This study investigates the application of analog signal processing techniques in the domain of biomedical signals, focusing on enhancing the quality and reliability of recorded physiological data. The primary emphasis is on the implementation of analog filters and amplifiers to address challenges such as noise reduction, signal conditioning, and overall signal improvement. The processing of physiological signals, such as photoplethysmography (PPG), necessitates the use of amplifiers and filters within a range of 0.4 to 5Hz. Signal noise can stem from various sources, including the test subject’s muscle move - ment, respiration, humming, power line interference, or even from the device itself. The research methodology involves a comparison of 3 different order of Butterworth filter circuits and their impact on the signal. The test input signal is derived from an SpO 2 simulator, read by a standard PPG sensor, and processed by the internal 12-bit ADC of Nucleo-F429ZI. The resulting data is stored in CSV format for subsequent use in filter design simulations with SPICE. For analog circuit designers, the utilization of SPICE in the form of LTspice proves invaluable. This open software, LTspice, boasts a simple yet powerful interface, facilitating a focus on the conceptualization and performance of the design


Introduction
Photoplethysmography (PPG) as a non-invasive optical technique relies on the principle that blood absorbs light [1].Non-invasive PPG is used to monitor various physiological parameters without requiring invasive procedures.It involves placing a sensor or a device equipped with light-emitting diodes (LEDs) and photodetectors on the surface of the skin, typically on the fingertip, earlobe, or other body parts.The principle behind non-invasive PPG is the measurement of blood volume changes in the microvascular bed of tissue.The light from the LEDs penetrates the skin and interacts with blood vessels, and the photodetector detects the amount of light absorbed or reflected by the underlying blood.
The amount of light absorbed by blood is proportional to its volume.The basic setup of PPG compose of LED as light transmitter and photo-diode as receiver.The non-invasive and easy of use are valuable for monitoring cardiovascular parameter such as heart rate and oxygen saturation [2].However, PPG signals are susceptible to noise such as motion artifact, ambient light and respiration movement [3] and powerline hum interference [4] [5].Signal filtering is employed to get accurate and reliable extracted data.
The objective of this study is design the processing of PPG signal by employing software to simulate the application of an analog filter.Additionally, the aim is to assess signal quality by altering the filter order, specifically examining orders of 2 nd , 4 th , and 8 th .

Brief Review of Hardware and Sokware Used in Simulation 2.1.1 LTspice
LTspice [6] is a robust, fast, and free simulator software designed for schematic capture and waveform viewing, featuring enhancements and models that improve the simulation of analog circuits.Developed by Linear Technology and now owned by Analog Devices, LTspice has become an industry standard and is widely distributed.SPICE (Simulation Program with Integrated Circuit Emphasis), which stands for provides a circuit simulation environment to replace the need for bread-boarding designs, especially as design complexities have grown.The software allows circuit modeling, probing, and various analyses before committing to board manufacture, saving costs, reducing errors, and increasing project productivity.It offers features such as transient analysis, AC analysis, DC sweep, noise analysis, and Monte Carlo analysis to explore different aspects of circuit performance.Its extensive component library facilitates the accurate representation of diverse circuits and helps user to get a deep understanding of circuit behavior prior to manufacturing.

Microcontroller
The nucleo-F429ZI (STM32F429ZI) is a high-performance microcontroller belonging to the STM32 family, crafted by STMicroelectronics.Featuring an ARM Cortex-M4 core running at impressive clock speeds, this microcontroller is equipped with advanced capabilities, including ADC (Analog Digital Converter) and two channels DAC (Digital Analog Converter).Boasting a versatile set of peripherals such as GPIO, UART, SPI, I2C, and timers, the Nucleo-F429ZI caters to a wide range of embedded system applications [7].With ample Flash memory for program storage and SRAM for data, this microcontroller provides a robust foundation for developing sophisticated industrial control systems, medical devices, consumer electronics, and other high-performance embedded applications.

PPG waveform Simulator
The MS100 SpO2 Simulator (Contec MS100) is a compact, lightweight and batterypowered device designed for accurate testing of Pulse Oximeters.Featuring simulation capabilities, it can execute a range of tests to provide precise references.Embedded with popular R curves like BCI, Masimo, and Nellcor, it accommodates the variations used by different manufacturers.The simulator can simulate SpO2 and pulse rate, withstand interference from 60 Hz/50 Hz and light, and adjust perfusion index for diverse conditions.It enables testing reaction times for SpO2, PR, and cardiac arrest.With 10 built-in compatible R curves and the option for customization, it meets varied testing requirements.Additionally, it comes preset with 24 patient states, including scenarios like weak pulse, bradycardia, hypoxia, infant, tachycardia, the aged, obesity, among others.

PPG Sensor
The PPG sensor in this work is a compatible nellcor 7pin non-oximax SpO2 sensor adult finger clip with 1 meter lead.This instrument comprises of red and infrared led that connected back to back in one line as pictured in Figure 1.On the other side of the clip, there is a photodiode act as receiver of transmitted light from those two leds.Infrared, red, and green LEDs are the wavelengths most commonly used in PPG applications, with infrared having the deepest penetration [8] [9].

Trans Impedance Amplifier (TIA)
The AD620 is a precision instrumentation amplifier designed and manufactured by Analog Devices.This integrated circuit is widely used in applications that require accurate and low-noise amplification of small differential signals [10].The AD620 excels in amplifying signals from sensors, transducers, and other low-level voltage sources, making it a popular choice in fields such as medical instrumentation, industrial automation, and sensor interfaces.With its versatile gain-setting options, high common-mode rejection ratio (CMRR), and low offset voltage, the AD620 provides a reliable and flexible solution for applications demanding precise signal conditioning.A transimpedance amplifier is designed to convert current input to voltage output.In a transimpedance configuration using the AD620, the input current is applied to one of the amplifier's inputs (inverting or non-inverting), and the feedback network consists of a resistor connected from the output to the other input.The voltage output is then proportional to the input current multiplied by the feedback resistor.This setup is useful in applications where the input signal is in the form of a current, such as those from photodiodes or phototransistors in optical sensing systems.To set up the AD620 as a transimpedance amplifier, you would connect the input current source to the inverting or non-inverting input, and a resistor from the output to the opposite input.The gain of the transimpedance amplifier is determined by the value of this feedback resistor.

Operational Amplifier used in LTspice simulation
The AD823 is dual and rail to rail operational amplifier [11].Designed by Analog Devices, this versatile device is specifically tailored for applications in the field of electrocardiography (ECG).It features a low input bias current, low noise, and a wide bandwidth, making it well-suited for capturing subtle biopotential signals.The AD823 includes instrumentation amplifiers with a built-in right-leg drive circuit, facilitating common-mode rejection and ensuring accurate signal acquisition.With its compact design and robust performance characteristics, the AD823 plays a crucial role in enhancing the precision and reliability of biopotential measurements in various medical and healthcare applications.Its integration simplifies the design process, providing engineers and researchers with a powerful tool for acquiring high-fidelity biopotential signals.

Data Acquisition Method
Data was taken from an SpO2 simulator.The simulator was set to generate 96% of SpO2 and with variation 60, 120, 180, 240 bit per menit (bpm).The PPG cuff sensor was clamped to the probe of SpO2 simulator as described in figure 1. Nucleo-F429ZI was designed to control leds driver (red and infrared) via 2 channels GPIO (General Purpose Input Output) and also control data sampling periode of 2ms (500hz).To identify and verify the output signals of the SpO2 simulator, four types of signal conditions were recorded.The simplest method to verify the waveform is by varying the Bits Per Minute (BPM) of the SpO2 simulator, namely 60, 120, 180 and 240 BPM and presented in Figure 4.  [12].According to the American Heart Association, the recommended sampling rate is 500Hz for a 12-bit resolution [13].The ADC conversion was taken between inverted state (on and off ) of 2 GPIO at 2ms as shown in Figure 2.

Data Acquisition Verification
The 12-bit internal ADC of Nucleo-F429ZI is first tested to verify the read data from function generator (ROHDE&SCHWARZ HMF2550 50Mhz) by providing a saw-tooth signal with a frequency of 10 Hz , amplitude of 1 volt, and offset of 1.5 volts as described in Figure 3.The signal was acquired for 10 seconds and recorded into PC as comma-separated values (.csv) file and than plotted the csv file in LTspice as an raw input signal.Verification was done by measuring parameters of input signal by using LTspice tools.

Data processing
Data in CSV format is simulated as the input signal in the LTspice software.Previously, three types of Butterworth filters with orders 2, 4, and 8 were designed, as illustrated in Figure 5, 6 and 8.By using the FFT tool in LTspice, users can visualize the spectrum of the waveform.This greatly aids designers in understanding the conditions of the signal to be processed.In the next stage, the signal is simulated for each filter model in transient mode with a duration of 10 seconds.

Filter Performance Measurement
The output of each filter was plotted, visually examined, and the spectrum of each waveform was generated using the FFT tool in LTspice.The Signal-to-Noise Ratio can be used as a comparative performance parameter for each designed filter.

Frequency range of PPG waveform
PPG signals are typically subjected to bandpass filtering, with cutoff frequencies falling within the 0.4-5 Hz range [14].This choice is informed by the fact that frequencies below 0.4 Hz in the PPG spectrum predominantly represent the energy contribution from the DC or non-pulsatile component of PPG signals.Additionally, frequencies exceeding 5 Hz in the spectrum are associated with heart rates surpassing 300 beats per minute (bpm).However, it's uncommon for heart rates to reach levels above 300 bpm, even during high-intensity exercises [15].

Butterworth Low-Pass Filter
A butterworth low-pass filter is a type of electronic filter designed to pass signals with frequencies below a specified cutoff frequency while attenuating higher frequencies.What sets the Butterworth filter apart is its characteristic flat frequency response in the passband, meaning that it has a maximally flat amplitude response within that region.This results in a smoother transition between the passband and the stopband compared to other filter designs.Butterworth filters are commonly employed in processing physiological signals due to their desirable characteristics, such as a flat frequency response in the passband and a smooth roll-off in the stopband [16].The selection of the filter order in signal processing, such as when designing a digital filter, has a significant impact on the results due to the trade-offs between frequency selectivity, transient response, and phase distortion [17].Understanding these trade-offs is crucial for achieving the desired filtering characteristics in a signal.

Determine RC Components of N-th Order Filter of Butterworth Polynomials
This method was a simplify method to manually calculate the values of RC components in Butterwort filter by using Polynomials in Figure 7.
Second-order Low-Pas Filter Cutoff Frequency= 10Hz; B1 = 2 R1 = R2 = 20 kΩ (Typical Values: 10 kΩ to 100 kΩ) Table 1 presents the values of the RC filter components for a Butterworth low-pass filter, organized according to its order

Signal to Noise Ration (SNR)
The signal-to-noise ratio is the proportion of the necessary signal power relative to the power of the noise [19].

Results
The simulation of the three types order of Low-pass Butterworth filters used are displayed in Figure 9.The filter design was conducted using LTspice software version 17.1.5.All three filters were simultaneously simulated using the same PPG waveform SpO2 96% and 60BPM.After run the transient analysis with start at 1 second and stop time 6 second, the output waveform can be exported as a file as ".txt" file.The result of simulation is illustrated in Figure 2. Frequency response can be generated as well with FFT tools to make ".fft" file.The result of frequency response and transient anlaysis of the sample waveform is shown in Figure 9.
Figure 10 illustrates the simultaneous comparison of all three signals at the same plot.It is evident that the most prominent noise in the raw waveform occurs at a frequency of 50 Hz show in Figure 9, commonly associated with powerline hum interference in low-voltage biomedical measurement signals [20] [5].Based on Figure 2, an analysis of Signal-to-Noise Ratio (SNR) can be conducted as a performance parameter for each designed filter with equation 6 as the result shown in Table 3 .

Discussion
It is evident that the most prominent noise in the raw waveform occurs at a frequency of 50 Hz show in Figure 10, commonly associated with powerline hum interference in low-voltage biomedical measurement signals [20][5].Based on Figure 9, an analysis of Signal-to-Noise Ratio (SNR) can be conducted as a performance parameter for each designed filter with equation 6 as the result shown in Table 2 .

Conclusion
The aim of this study is to demonstrate the signal processing design of PPG by employing analog Butterworth filter in the open-source software LTspice.From the simulation results, it can be observed that the use of a higher order will yield a smaller Signal-to-Noise Ratio (SNR).
In conclusion, LTspice emerges as a remarkably versatile and powerful tool for analog signal processing within the biomedical domain.Its user-friendly interface facilitates a seamless integration of complex circuit simulations, making it a highly accessible resource for analog circuit designers in the field of biomedical signal processing.The software's simplicity, coupled with its robust capabilities, provides an efficient platform for conceptualizing, implementing, and evaluating intricate analog circuits.The ease of use of LTspice significantly expedites the design process, allowing researchers and engineers to focus on refining and optimizing circuitry for enhanced biomedical signal acquisition and processing.The utility of LTspice extends beyond its simplicity, as it proves to be an invaluable asset for achieving optimal outcomes in the challenging realm of analog signal processing for biomedical applications.

Figure 4 .
Figure 4. Combination of Raw signal from SpO2 Simulator

Table 1 .
RC Values Low Pass-Filter.

Table 2 .
Transient Analysis of Input and Filtered Waveform