# Electronic Emulator of Biological Tissue
## 2 Methods and Materials
### Circuit Model
#### 2.2.1 Single Monopolar Pulse Model  
For a single positive monopolar pulse the following circuit is proposed (Scheme 1). Figure 1: (a) Typical time course during PEF application to the tissue (red) and three mathematical functions (black); (b) Current is modeled as a sum of a square wave pulse and two exponential functions, by following the equation (Equation (1)). The values of the circuit elements are calculated using the following equations (Equations (2) and (3)):  
\[I(t)=I_{R}+I_{C}+I_{E}\]  
\[I(t)=\frac{U_{amp}}{R_{1}}+\frac{U_{amp}}{R_{2}}\times e^{-t/\tau_{1}}+\frac{U_{ amp}-U_{th}}{R_{3}}\times(1-e^{-t/\tau_{2}}),\quad\text{when}\quad 0\quad<t<\quad T_{pulse} \tag{2}\]  
\[C_{1}=\frac{\tau_{1}}{R_{2}}\qquad L_{1}=\tau_{2}\times R_{3} \tag{3}\]  
where \(U_{amp}\) represents pulse voltage amplitude of applied electroporation pulse (\(V_{ep}\) in Scheme 1) and \(U_{th}\) electroporation threshold voltage. For the threshold voltage determination measurements at different applied voltages are required. While all the other values can be determined directly from the mathematical model:  
\[ \begin{split} R_{1}=\frac{U_{amp}}{A};\qquad R_{2}=\frac{U_{amp}} {B}\\ \tau_{1}=C;\qquad R_{3}=\frac{U_{amp}-U_{th}}{D};\quad\tau_{2}=E \end{split}  \tag{4}\]  
This solution is accurate only in case of one pulse application, or when pulse repetition frequency is low (pause between pulses is longer than 1 ms [31]) e.g., in our case 1 Hz, meaning all the applied pulses in one sequence have approximately the same current time course. For numerical model, all measurement data (obtained and described earlier [19]), were imported into Matlab R2018b (MathWorks, Natick, MA, USA) computing environment, where values of optimal circuit elements were calculated. Due to a big number of undefined variables (\(R_{1}\), \(R_{2}\), \(R_{3}\), \(R_{4}\), \(C_{1}\), \(L_{1}\), \(U_{th}\)) a deterministic optimisation method was used. A flow chart (Figure 2) visualises a calculation process. Five high-quality measurements of applied current and voltage for each preset voltage 500 V, 750 V and 1000 V (pulse duration: 100 \(\upmu\)s and repetition frequency: 4.717 kHz), were averaged and down-sampled for further analyses. From average voltage and current signals, the active parts were cutout (values in the range from the maximal value of current to the FWHM minus 1 \(\upmu\)s). Averaged current signals were split into two parts, a capacitive current spike part and electroporation part (the minimal value in the cutout signal was set as a split point). In order to facilitate calculations, signals were decimated. The capacitive current spike part was due to its short duration-dynamics decimated by 10 (sample rate was approximately 50 MHz) and electroporation part by 70 (sample rate was approximately 7 MHz). Those two values (decimation by 10 and 70) were chosen in a way that half of the values in the new decimated signal represented a capacitive current spike part and the other half an inductive/electroporation part of the signal. At first initial values for final least square error (LSE) fit, were determined. The dynamic conductivity was calculated from applied averaged and cut-out current and voltage signals, only for the first pulse in sequence. With the Matlab's curve fitting toolbox, optimal parameters (A, B, C, D, E) for proposed equation (Equation (1)) were defined, for each applied voltage separately. Than optimal electronic component values (\(R_{1}\), \(R_{2}\), \(R_{3}\), \(\tau_{1}\), \(\tau_{2}\)) were calculated for each applied voltage in accordance with the equation (Equation (4)), assuming the threshold voltage is equal to 200 V (assumption based on the slope of the current dynamic of electroporation part). Due to a large number of variables and three applied voltages, each variable range was predefined. For resistive components (\(R_{1}\), \(R_{2}\), \(R_{3}\)) and time constants (\(\tau_{1}\), \(\tau_{2}\)), fifteen linearly distributed values between a minimal and maximal proposed optimal values from individual fit were used.