Microcontroller-Based Sinusoidal Voltage Generation for Electrical Bio-Impedance Spectroscopy Applications

A sinusoidal voltage wave generator is proposed based on the use of micro-processor digital signals with programmable duty-cycles, with application to real-time Electrical Cell-substrate Impedance Spectroscopy (ECIS) assays in cell cultures. The working principle relies on the time convolution of the programmed microcontroller (μC) digital signals. The expected frequency is easily tuned on the bio-impedance spectroscopy range [100 Hz, 1 MHz] thanks to the μC clock frequency selection. This system has been simulated and tested on the 8 bits μC ArduinoTM Uno with ATmega328 version. Results obtained prove that only three digital signals are required to fit the general specification in ECIS experiments, below 1% THD accuracy, and show the appropriateness of the system for the real-time monitoring of this type of biological experiments.


Introduction
Sinusoidal voltage generators are basic building blocks in many instrumentation and signal acquisition systems, as in spectroscopy analysis, where AC voltage signals must be generated in a defined frequency range [1] [2] [3].The application to impedance measurements in cell-culture assays is actually known as Electrical Cell-substrate Impedance Spectroscopy (ECIS) technique [3].Realtime signal generation is essential for the monitoring of many biological processes.The cell bio-impedance obtained can be directly related with several biological processes, such us motility, cell attachment, cell index, membrane transfer, tumor cells detection, etc., employing only one cell seeding, since all data are obtained from the same cell culture.This means the employment of a non-destructive process that avoids endpoint-based protocols.
In ECIS, excitation is usually done with ac current sources, while processing steps are based on algorithms useful to decode the sample voltage response to signal excitation [4].This paper describes how sinusoidal voltage signals required in ECIS setups can be derived from digital signals using a microcontroller (µC).
As a difference to other recent µC based realizations for a fixed frequency [5] and to other current bioimpedance monitoring systems [4]

Sinusoidal Waveform Generation
The proposed approach is based on the design of digital signals in which the duty-cycle (δ) can be programmed.This fact is used for the high harmonics exact cancellation.Signal processing is performed in the frequency domain, whereas signal manipulation is done in the time domain.For a given digital signal f d (t), with period T, amplitude A and interval d at high state, the C n Fourier coefficients at the harmonics ω n = nω o , are given by ( ) The sin(x) function has zeros when πnδ = mπ (n, m belong to N), being δ = d/T.A method to derive a sinusoidal voltage signal based on δ selection is proposed.
The mathematical basis of the proposed method is the time convolution of two signals.For two given functions, f d1 (t) and f d2 (t), the time convolution has a Fourier spectrum defined by the product of independent spectra of the functions F d1 (ω) and F d2 (ω) respectively, expressed as In particular, when the signals have a rectangular form with the same period, T, but different duty cycle δ, the frequency spectrum of each signal will have zero components at frequencies in which sin(πnδ) is cancelled.In this work, we assume that all digital outputs have the same amplitude.The basic block processing scheme (Figure 1) considers the FFT's of M rectangular signals with the same period T, and different δ n (n = 1, 2, •••, M).
For f d1 (t) rectangular signal, with δ = 0.5, all even C n coefficients are cancelled.The spectrum of f d2 (t) must be designed to null the first useless odd harmonic of f d1 (t) that is 3ω o .By selecting its duty-cycle as one third of T, the first non-desired odd harmonic (3ω o ) is cancelled since sin(πn/3) is zero when 3|n (C 3 , C 6 , •••).It can be easily deduced that considering only two functions f d1 (t) and f d2 (t), with δ = 0.5 and δ = 0.33, all non-eliminated harmonics are co-primes with 2 and 3.This is shown more clearly in Figure 2.For this reason, the Fourier coefficients after multiplying these functions are given by  and V n,2 signal (c).As it can be observed in V n,2 signal, the harmonic cancellation is produced in even harmonic frequencies and in multiples of the third harmonic.
where V n,i represents the nth coefficient of the complex Fourier series for the convolution of the i signals, and P i , the ith element of the ordered set composed by the prime numbers, P, i.e.P = {2, 3, 5, •••}.In the case i = 2, Equation ( 4) is obtained.This process can be extended to three or more digital signals, increasing the lower element in P set, which means to increase the sinusoidal voltage signal quality.

Experimental Setup
The proposed system has been tested on the 8 bits microcontroller (µC) Ar-duino™ Uno with ATmega328 version.Arduino™ is an open-source electronics prototyping platform [8].Besides the µC, we use a DAC 0808 to create an analog version, and a first order RC Smoothing Active Filter (SAF).The cutoff frequency of the SAF is programmed to the nearest higher frequency as the wanted signal.This paper will show the output to 100 Hz, 1 kHz and 10 kHz signals, and the SAF cutoff frequencies are 200 Hz, 2 kHz and 20 kHz respectively.

Theoretical Results
Matlab® R2014b simulations have been performed for several digital signals.
Waveforms are presented after Fourier coefficients have been multiplied in the frequency domain, and then, the inverse Fourier transform is calculated.To evaluate the quality of the sinusoidal signals obtained, the Total Harmonic Distortion (THD) is observed in Figure 4.
Taking only three convoluted signals it is possible to obtain a THD below 1% (about 0.5%), which is usually enough in ECIS technique.Total Harmonic distortion expected as a function of the number of convoluted signals is represented in Figure 4. To select the working frequency it must be set the µC clock signal, a difference to other µC based realizations [5].It was considered the ARM Cortex-M7 µC as an example for further implementation.

Experimental Results
Real-time signal generated by the 8 bits microcontroller is presented in the following figures, in which channel 1 is a sinusoidal wave produced by the Press 2 MHz Function Generator GF-232, and channel 2 shows the proposed generator output.In Figure 5, we can see that the approximate generator GF-232 THD is  0.88%, while the proposed generator is 0.85%, being these two results approximately 0.3% higher than the theoretical THD expected result, around 0.5%, shown in section 3.1.
In Figure 6, the outputs of the four selected frequencies (100 Hz, 1 KHz, 10 KHz and 18.5 KHz) are presented.The highest frequency that can be achieved  In (d), the high level language programming efects can be observed, increasing the rate of noise.
with the selected µC, with an acceptable rate of noise, is around 18.5 KHz.This is derived, mainly, by the clock drift and the high level programming language, which can be easily sorted out with another µC.With the proposed system, the frequency can be easily changed in real-time, what is of utmost importance in the monitorization of ECIS biological experiments.

Conclusion
[5] [6][7], our work uses the mathematical properties of time convolution and the adequate design of digital signals.This way, we are avoiding the synchronization with the input signals as a requirement for the technique to work well, therefore facilitating the implementation of the monitoring circuit and improving the robustness of its spectroscopy results.

Figure 1 .
Figure 1.Proposed block diagram for sinusoidal voltage generation.Square signals are generated by the microcontroller and then convoluted.

Figure 5 .
Figure 5. Spectra of the 100 Hz sinusoidal signals of GF-232 (a) and the proposed generator output (b).We can observe the similarity of the two results, in spite of the low cost of our experimental implementation.

Figure 6 .
Figure 6.Comparatives between the commercial sine generator (blue) and the proposed generator (yellow) at 100 Hz (a), 1 KHz (b), 10 KHz (c) and 18.5 KHz (d).In (d), the high level language programming efects can be observed, increasing the rate of noise.
This work presents an alternative sinusoidal voltage signal generator for real time Electrical Cell-substrate Impedance Spectroscopy assays employing cell cultures.The signal synthesis algorithm proposed relies on time convolution of rectangular signals, with a programmable duty-cycle easily defined by µC circuits.Furthermore, frequency can be configured in real time, enabling advanced spectroscopy applications.Results obtained from simulations prove that only three digital signals are required to fit the general specifications in ECIS experiments, below 1% THD, being confirmed these theoretical results with the proposed experimental work.The circuit solution proposed as programmable sinusoidal voltage signal generator is simple, robust and easy to be implemented for this and other spectroscopy applications.