You are on page 1of 10

Comparison of impedance measurements in a DSP using ellipse-t and

seven-parameter sine-t algorithms


Pedro M. Ramos
a,b,
*
, Fernando M. Janeiro
a,c
, Tom Radil
a
a
Instituto de Telecomunicaes, Av. Rovisco Pais 1, 1049-001 Lisbon, Portugal
b
DEEC, Instituto Superior Tcnico, UTL, Av. Rovisco Pais 1, 1049-001 Lisbon, Portugal
c
Universidade de vora, Departamento de Fsica, Rua Romo Ramalho, n. 59, 7000-671 vora, Portugal
a r t i c l e i n f o
Article history:
Received 13 March 2009
Received in revised form 12 May 2009
Accepted 14 May 2009
Available online 23 May 2009
Keywords:
Impedance measurements
Digital signal processor
DSP based instrument
Sine-t algorithms
Ellipse-t algorithms
Experimental uncertainty analysis
a b s t r a c t
In this paper, two DSP implemented algorithms for impedance measurements are com-
pared. Previously published results demonstrate the usefulness of sine-t algorithms and
ellipse-t algorithms for impedance measurements where two channels are simulta-
neously acquired with analog to digital converters. The comparison between the two
implemented algorithms is done by analyzing the average execution time, memory
requirements and experimental standard deviation of the estimated impedance parame-
ters.
For the rst time, the seven-parameter sine-t algorithm is adapted so that it does not
need the construction and manipulation of its largest matrix thus requiring less overall
memory. This improvement can be used to acquire and process more samples (leading
to reduced experimental standard deviations of the estimated parameters) with the same
memory size.
2009 Elsevier Ltd. All rights reserved.
1. Introduction
Traditional impedance measurement techniques are
being improved [1] due to the development of highly ef-
cient analog to digital converters, the use of digital signal
processing techniques and the rapid development of new,
more powerful digital signal processors that can now per-
form millions of operations per second. Impedance mea-
surements are a relevant topic with many new
developments published recently. Some works focus on
impedance sensor measurements [2] while others make
use of recently published signal processing algorithms to
improve impedance estimation [3,4]. In [5] a high imped-
ance spectroscopy probe is analyzed and in [6] a novel
method to estimate the individual parameters of the com-
ponents from an impedance model was presented.
A simple impedance measurement technique presented
in [7] and improved in [8] minimizes the analog front-end
circuitry to reduce the inuence of its frequency depen-
dence. This technique is based on the volt-ampere method
where a reference impedance and an unknown impedance
are placed in series and supplied with the same current
from a sine generator. The voltage across each impedance
is simultaneously acquired with a two-channel analog to
digital converter and the impedances magnitude and
phase are extracted using digital signal processing
algorithms.
Sine-t algorithms are an option to estimate the sine
signal parameters from a set of acquired samples. Since
the ratio between the sine frequency and the sampling rate
is, most of the times, not accurately known, the algorithms
must also estimate the sine frequency. This makes the
problem a nonlinear regression that is solved using an iter-
ative procedure which is called the four-parameter sine-t
algorithm [9]. For impedance measurements, this algo-
rithm can be applied to each channel separately, however
the overall experimental uncertainty can be reduced by
0263-2241/$ - see front matter 2009 Elsevier Ltd. All rights reserved.
doi:10.1016/j.measurement.2009.05.005
* Corresponding author. Address: Instituto de Telecomunicaes, Av.
Rovisco Pais 1, 1049-001 Lisbon, Portugal.
E-mail addresses: pedro.ramos@Lx.it.pt (P.M. Ramos), fmtj@uevora.pt
(F.M. Janeiro), tomas.radil@lx.it.pt (T. Radil).
Measurement 42 (2009) 13701379
Contents lists available at ScienceDirect
Measurement
j our nal homepage: www. el sevi er. com/ l ocat e/ measur ement
forcing the common frequency in what is called the seven-
parameter sine-t algorithm [10]. Nevertheless, the itera-
tive nature of the sine-t algorithms results in a large num-
ber of operations that the processor must execute. Another
issue that can affect the performance of sine-t algorithms
implemented in DSP devices is the memory requirements.
In fact, the seven-parameter algorithm as proposed in [10]
must build a matrix with seven columns and 2N rows, cor-
responding to the total number of samples acquired in
both channels. This large matrix and its manipulation to-
gether with the limited memory available in the DSP re-
stricts the number of samples that can be processed. In
this paper, the algorithm proposed in [10] is shown to be
applicable in a memory restricted system by bypassing
the need to build the 2N 7 matrix. This modication al-
lows the DSP to process more samples to estimate the sine-
wave parameters with the seven-parameter sine-t.
Although the frequency must be accurately known for a
correct estimation of the sine signals amplitudes, phases
and dc components by the sine-t algorithms, in imped-
ance measurements an accurate frequency value is not
needed. The time information, and thus the sine signals
frequency, can be removed from the problem by making
an XY plot of the two waves. The result is an ellipse whose
parameters can be estimated by ellipse-t algorithms such
as the one presented in [11] and then improved in [12]. The
sine signals parameters can then be extracted from the el-
lipse parameters as proposed in [13]. This algorithm has
been recently adapted and optimized for use in DSP based
impedance measurements [14]. In the modied ellipse-t
method published in [14] there is no limit on the number
of samples that can be used since only nine values must
be stored and the samples themselves can be discarded
after their contribution to the nine stored values is taken
into account. These characteristics make the algorithm a
prime candidate for efcient implementation in a DSP
based impedance measurement instrument.
In this paper, the performance of the DSP implementation
of the ellipse-t algorithm and the seven-parameter sine-t
algorithmis comparedthroughthe evaluationof the memory
requirements, speed of execution and experimental uncer-
taintyof bothalgorithms. Thesystemusedfor thecomparison
is based on a commercial oating-point DSP kit, with few
external electronics, for baseline assessment and require-
ments denition. Theperformancetests wereexecutedat fre-
quency f = 1 kHz, for impedances with magnitudes from
100 Xto 15 kXand phases in the 90 range.
The paper is divided into four sections including the
introduction (Section 1) and the conclusions (Section 4).
The description of the two algorithms is presented in Sec-
tion 2 together with the measurement setup and the algo-
rithms DSP implementation details. The performance
comparison is performed in Section 3 where the experi-
mental results are shown and analyzed. The conclusions
are presented in Section 4.
2. Measurement method
This section describes the measurement setup and
method as well as the two signal processing algorithms
used. The measurement method is based on measuring
the voltages across two impedances placed in series and
supplied with a current from a sine generator that sets
the measurement frequency. This method is also com-
monly called the series comparison method. The voltages
are simultaneously acquired by two differential input
acquisition channels and the samples are then transmitted
to the DSP in which the signal processing algorithms are
implemented.
The two acquired sine signals are modeled by
u
1
t C
1
D
1
cos2pft /
1

u
2
t C
2
D
2
cos2pft /
2

1
where C
k
is the dc component, D
k
is the sine amplitude and
/
k
is the phase of channel k.
The two algorithms compared in this paper, estimate
the sine signals amplitude ratio D
2
/D
1
, their phase differ-
ence D/ = /
2
/
1
and the corresponding dc components.
In addition, the seven-parameter algorithm also estimates
the common frequency f.
2.1. Measurement circuit
The basic measurement circuit is presented in Fig. 1.
The use of different reference impedances is needed so that
the amplitude of the acquired signals is as close as possible
to the ADC input range, thus maximizing the use of the
ADC dynamic range. In addition, the different reference
impedances are also used to avoid ellipse degeneration
[14]. Two analog switches are used to select the appropri-
ate reference impedance from a xed set of impedances.
The rst switch selects the reference impedance through
which the current ows and the second switch selects
where the ADC channel is connected. This switch is needed
Fig. 1. Basic measurement circuit. FG is the function generator (Agilent
33250A). The DSP controls the two switches to select the reference
impedance (Z
R
) in order to maximize the ADC input voltages. The ADCs
included in the acquisition channels are also controlled by the DSP and
sample both channels simultaneously. Z is the impedance under
measurement.
P.M. Ramos et al. / Measurement 42 (2009) 13701379 1371
to assure that the rst switchs impedance is not measured
together with the reference impedance. The impedance of
the second switch is not measured because it is in series
with the voltage circuit of the four-terminal measurement
setup of the reference impedance. This setup removes the
error caused by the impedance of the switches and is a
modication of the four-wire impedance measurement,
used especially for the measurement of low resistors by
eliminating the inuence of resistances of connecting
wires and terminals. The switches were implemented
using the Analog Devices ADG407 8-Channel, high perfor-
mance analog multiplexer.
With channel 1 sampling the voltage across the refer-
ence impedance and channel 2 sampling the voltage across
the unknown impedance, the estimated impedance magni-
tude is
jZj
D
2
D
1
jZ
R
j 2
where jZ
R
j is the magnitude of the reference impedance at
the measurement frequency. The estimated impedance
phase is
u
Z
D/ u
Z
R
3
where u
Z
R
is the reference impedance phase at the mea-
surement frequency.
The acquisition process consists in: (i) an initial acquisi-
tion and quick estimation of the unknown impedance
magnitude and phase; (ii) with this initial estimate, the
DSP selects the reference impedance that best matches
the unknown impedance magnitude and avoids ellipse
degeneration; (iii) nal acquisition using the selected ref-
erence impedance; (iv) estimation of the sine parameters
using either the ellipse-t algorithm or the seven-parame-
ter sine-t algorithm; (v) estimation of the impedance
parameters using (2) and (3). Note that, for the seven-
parameter sine-t, the step (ii) does not have to avoid
ellipse degeneration. Nevertheless, to ensure comparable
results between the two methods, the same procedure is
done for both algorithms.
2.2. Seven-parameter sine-t
Sine-t algorithms were standardized in [9] for the
characterization of ADCs. Their basic objective is to deter-
mine a set of parameters of the tting model (analytical
expression of a sine signal) that minimizes the sum of
the squared errors between the model and the sampled
data. Two sine-t algorithms are described in [9]: the
three-parameter algorithm and the four-parameter algo-
rithm. The rst estimates the phase, amplitude and dc
component when the signal frequency is known and is a
multiple linear regression method that requires no itera-
tions. In the four-parameter algorithm, the frequency is
also estimated which makes the model nonlinear and re-
quires an iterative procedure in order to obtain the best
parameters. The convergence of the algorithm depends
on the initial estimates of the parameters. For two-channel
systems with a common frequency, as is the case of imped-
ance measurements, all the information from both records
should be used to obtain a better estimate of the common
frequency. This is obtained with the seven-parameter sine-
t [10] which is also an iterative algorithm much like the
four-parameter. The main difference is that it estimates,
in each iteration, the two amplitudes, the two phases, the
two dc components and the common frequency. In [15]
the effectiveness of this method was demonstrated by
the smaller Cramr Rao Lower Bound (CRLB) of the fre-
quency and phase difference when compared with the
application of two four-parameter sine-ts.
In the seven-parameter sine-t, the estimated parame-
ter vector for each iteration is
x
i

A
i
1
B
i
1
C
i
1
Df
i
A
i
2
B
i
2
C
i
2

T
4
where A
k
and B
k
are the in-phase and quadrature ampli-
tudes from which the sine amplitudes D
k
and phases /
k
are obtained [9]. Df
(i)
is the frequency correction that up-
dates the estimated common frequency. The iterative pro-
cess ends when the relative frequency adjustment Df
(i)
/f
(i)
is below a preset threshold currently set at 5 10
7
.
After the iterative part of the algorithm is completed and
the nal frequency is determined, the amplitudes A
k
and
B
k
are determined with the three-parameter sine-t.
The estimated parameter vector is obtained from
x
i
D
i

T
D
i

1
D
i

T
y 5
where y is the concatenated sample vector
y u
1;1
u
1;2
. . . u
1;N
u
2;1
u
2;2
. . . u
2;N

T
6
and
7
with (x = 2pf
(i)
)
Q
i
k

cosxt
k;1
sinxt
k;1
1
cosxt
k;2
sinxt
k;2
1
.
.
.
.
.
.
.
.
.
cosxt
k;N
sinxt
k;N
1

8
and
r
i
k

a
k;1
a
k;2
.
.
.
a
k;N

with a
k;n
2pA
i
k
t
k;n
sinxt
k;n
2pB
i
k
t
k;n
cosxt
k;n
:
9
The calculation of D
(i)
requires 2N 7 words (in DSP imple-
mentations, each word usually corresponds to a 32-bit
long single precision oat [16]). [D
(i)
]
T
D
(i)
requires an addi-
tional 7 7 words while [D
(i)
]
T
y requires 7 words. Overall,
the method requires 17N+63 words (the 17N part corre-
sponds to 2N for the samples, 14N for D
(i)
and 1N for the
FFT used in the interpolated discrete Fourier transform
(IpDFT) [17] to estimate the initial frequency). Due to the
restricted DSP internal memory and the space occupied
by the program itself and other internal variables, the
number of samples N is limited to 1024 in case of the em-
ployed DSP. Note that, although external DSP memory is
1372 P.M. Ramos et al. / Measurement 42 (2009) 13701379
available and can be used, this would considerably slow
down the algorithm. The proposed optimization to remove
much of the memory constraints associated with the num-
ber of acquired samples is based on the direct calculation
of [D
(i)
]
T
D
(i)
and [D
(i)
]
T
y further optimized considering
simultaneous acquisition (i.e., t
1,n
= t
2,n
= t
n
)
D
i

T
D
i

E
1;1
E
1;2
E
1;3
E
1;4
0 0 0
E
1;2
E
2;2
E
2;3
E
2;4
0 0 0
E
1;3
E
2;3
N E
3;4
0 0 0
E
1;4
E
2;4
E
3;4
E
4;4
E
4;5
E
4;6
E
4;7
0 0 0 E
4;5
E
1;1
E
1;2
E
1;3
0 0 0 E
4;6
E
1;2
E
2;2
E
2;3
0 0 0 E
4;7
E
1;3
E
2;3
N

10
with
E
1;1

N
n1
cos
2
xt
n
; E
1;2

N
n1
cosxt
n
sinxt
n
;
E
1;3

N
n1
cosxt
n
; E
1;4

N
n1
cosxt
n
a
1;n
;
E
2;2

N
n1
sin
2
xt
n
; E
2;3

N
n1
sinxt
n
; E
2;4

N
n1
sinxt
n
a
1;n
;
E
3;4

N
n1
a
1;n
; E
4;4

N
n1
a
2
1;n
a
2
2;n

;
E
4;5

N
n1
cosxt
n
a
2;n
; E
4;6

N
n1
sinxt
n
a
2;n
; E
4;7

N
n1
a
2;n
:
Notice that [D
(i)
]
T
D
(i)
is a symmetric matrix.
Finally, for [D
(i)
]
T
y
D
i

T
y

N
n1
cosxt
n
u
1;n

N
n1
sinxt
n
u
1;n

N
n1
u
1;n

N
n1
u
1;n
a
1;n
u
2;n
a
2;n

N
n1
cosxt
n
u
2;n

N
n1
sinxt
n
u
2;n

N
n1
u
2;n

: 11
With this method, the memory usage is reduced to 3N + 63
(the 3N part corresponds to 2N for the samples and 1N for
the FFT used in the IpDFT).
For the initial A
k
and B
k
estimates, the three-parameter
sine-t is applied to each channel using the frequency ob-
tained with the IpDFT. These two algorithms are also
implemented in the DSP.
In Fig. 2, 96 samples acquired with the proposed system
at 1 kHz measurement frequency sampled at 48 kS/s are
shown together with the reconstructed sine signals using
the seven-parameter algorithm. In this case D
2
/D
1

1.393 and D/ 44.2.
2.3. Ellipse-t
The ellipse-t algorithm estimates the ellipse parame-
ters that best t the XY pairs of voltages from the two
channels. Fromthe ellipse parameters, the sine amplitudes,
dc components and the phase difference are determined.
The ellipse-t algorithm is a non-iterative method based
on Lagrange multipliers rst published in [11] and im-
proved in [12]. The rened implementation, rst published
in [14], requires the construction of small matrices (3 3)
instead of the N 3 large matrix used in [12], their multi-
plication and inversion and also the determination of the
eigenvectors of a 3 3 matrix. Through algebraic manipu-
lation the common frequency can be eliminated from (1)
u
1
C
1
D
1

2

u
2
C
2
D
2

2
2
u
1
C
1
u
2
C
2

D
1
D
2
cosD/ sin
2
D/ 0: 12
Eq. (12) corresponds to a conic
Fu
1
; u
2
au
2
1
bu
1
u
2
cu
2
2
du
1
eu
2
g 0; 13
which describes an ellipse, when
b
2
4ac < 0: 14
By introducing a scaling constant q, this condition can be
set to 4ac-b
2
= 1.
For conic (12) to correspond to an ellipse three condi-
tions must be veried: D
1
0;D
2
0 and cos
2
(D/) < 1,
i.e., (12) is either a line segment (whenever at least one
of the conditions is not true) or an ellipse.
From the ellipse parameters, the sine parameters are
obtained through
D
1

1

qa
p ; D
2

1

qc
p ; 15
C
1

2cd be
b
2
4ac
; C
2

2ae db
b
2
4ac
16
-0.5
-0.25
0
0.25
0.5
0 0.0005 0.001 0.0015 0.002
Time [s]
C
h
a
n
n
e
l

1
,
2

[
V
]
Fig. 2. Acquired samples from two channels with (+) for channel 1 and
() for channel 2 and the corresponding sine-t reconstructed signals
(lines).
P.M. Ramos et al. / Measurement 42 (2009) 13701379 1373
and
cosD/
signq b
2

ac
p : 17
For impedance measurements the actual sine amplitudes
are of no interest since it is the amplitude ratio D
2
/D
1
that
determines the impedance magnitude. This ratio is given
by
D
2
D
1

a
c

18
therefore the scaling constant q does not need to be deter-
mined. Also, the sign of the scaling constant, required in
(17), can be replaced by the sign of parameter a (due to
scaling, parameters a and c can both be negative which
corresponds also to q < 0).
The only parameter that needs further calculation is the
sign of D/ which is unavailable from (17) but can be re-
trieved from the rotation direction of the ellipse if the el-
lipse is constructed clockwise D/ > 0 and D/ < 0 if it is
constructed counterclockwise. The sign of the phase differ-
ence between two consecutive sample pairs
d
n
j
n1;...;N1
sign arg u
1;n1

1
N

N
i1
u
1;i
j u
2;n1

1
N

N
i1
u
2;i

arg u
1;n

1
N

N
i1
u
1;i
j u
2;n

1
N

N
i1
u
2;i

19
can be used to determine whether the ellipse is being con-
structed clockwise or counterclockwise. The ellipse center
is estimated using all the acquired samples. However, due
to the presence of noise, some of the consecutive samples
may give the wrong rotation direction, therefore a voting
system was implemented. The sign of the sum of the votes
dened in (19) determines the sign of D/
signD/ sign

N
n1
d
n

: 20
This system is specially designed for noisy and low ampli-
tude situations. For example, for f = 1 kHz, f
S
= 96 kS/s and
1024 samples, this voting system has never failed in simu-
lations for SNR > 15 dB.
The ellipse-t requires 2N + 42 words (2N for the sam-
ples, four 3 3 matrices and two 3 element vectors). With
the current sine-t implementation, the memory needed
by the ellipse-t is not a big improvement from the mem-
ory needed by the seven-parameter sine-t. The main
advantage is the total number of operations not only
for the matrix construction and manipulations but also
due to the fact that the sine-t is iterative and the el-
lipse-t is not.
In Fig. 3, 96 samples acquired at 48 kS/s with the pro-
posed system at 1 kHz measurement frequency are shown
together with the reconstructed ellipse obtained using the
ellipse-t. This situation corresponds to the one depicted
in Fig. 2. Two periods are represented that correspond to
two ellipse rotations. Due to low noise and nearly coherent
sampling, the data points of the second period are over-
lapped with the points from the rst rotation.
2.4. DSP implementation
The DSP is an Analog Devices ADSP-21369 SHARC high
performance 32-bit oating point processor operating at
332 MHz performing 2 GFLOPS / 664 MMACS with 2 Mbit
on-chip SRAM. The DSP is included in an evaluation kit
with a multichannel Sigma-Delta ADC (AD1835 - with 24
bit and sampling rate of 48 kS/s or 96 kS/s) and 2Mbit
SPI FLASH memory.
The basic block diagram of the DSP system interface to
the circuit of Fig. 1 is shown in Fig. 4. Outside the DSP kit,
two instrumentation ampliers are used since the kit ana-
log inputs are referenced.
The ellipse-t and the seven-parameter sine-t algo-
rithms were implemented in C using the Analog Devices
VisualDSP++ to program the DSP kit. The implemented
subroutines include: acquisition (communication with
the AD1835), IpDFT, matrix operations (e.g., determination
of eigenvectors and eigenvalues) and simple operations for
the estimation of the impedance magnitude and phase. A
basic set of commands to interface the DSP with a PC
through a fast serial connection (115200 baud) was also
implemented. The implemented commands enable the
impedance measurements either with the ellipse-t or
the seven-parameter sine-t. Also included is a command
to retrieve the unprocessed acquired samples. This option
enables some signal analysis at a lower level to assess
the analog circuitry and the analog to digital conversion.
The complete program is stored in the non volatile ash
-0.5
-0.25
0
0.25
0.5
-0.3 -0.2 -0.1 0 0.1 0.2 0.3
Channel 1 [V]
C
h
a
n
n
e
l

2

[
V
]
Fig. 3. Acquired samples from two channels (+) and the corresponding
reconstructed ellipse (line).
Fig. 4. Block diagram of the DSP system that interfaces the basic
measurement circuit.
1374 P.M. Ramos et al. / Measurement 42 (2009) 13701379
memory and upon boot up or reset of the DSP kit, the pro-
gram is loaded from the ash memory to the DSP and exe-
cuted. It then enters a command mode waiting for
instructions from the serial interface.
In addition to executing the algorithms, the DSP also
controls the selection of the reference impedance.
3. Measurement results
The impedance measurement system was tested for
both algorithms with the measurement of 105 different
impedances at a frequency of 1 kHz with magnitudes from
100 X up to 15 kX and phases in the 90 range.
3.1. Reference impedance
In the seven-parameter sine-t, the reference imped-
ance selection usually only depends on the unknown
impedances magnitude. However, since the ellipse-t
algorithm cannot estimate the ellipse parameters when
the signals are in phase or in opposition, i.e., when
cos
2
(D/) = 1 because the conic is not an ellipse, the selec-
tion of the reference impedance must also be based on the
unknown impedances phase. Another consequence of this
is that the reference impedances must include some
phases substantially different from 0. For the selected
impedance range, a set of six reference impedances were
used. The measured impedances together with the delimit-
ing regions used to select the reference impedances are de-
picted in Fig. 5. The selection of the reference impedance is
done as follows: (i) one period measurement of the two
sine signals with a resistive reference impedance; (ii) pre-
liminary estimation of the impedance magnitude and
phase; if the estimated impedance magnitude is below
3.5 kX then the selected reference impedance has 1 kX
magnitude, otherwise a 5 kX magnitude reference imped-
ance is used; (iii) if the estimated phase is between 0 and
10, a capacitive reference impedance is applied (R = 100 X
in series with C = 159 nF for the lower magnitude and
R = 100 X in series with C = 31.8 nF for the higher magni-
tude) ; (iv) if the estimated phase is between 10 and
0, an inductive reference impedance is used (R = 100 X
in series with L = 157 mH for the lower magnitude and
R = 100 X in series with L = 796 mH for the higher magni-
tude); (v) otherwise a resistive reference impedance is cho-
sen (R = 1 kX for the lower magnitude and R = 5 kX for the
higher magnitude).
3.2. Channel mismatch compensation
To compensate for the mismatch between the two
acquisition channels, the same signal was applied to both
channels and repeated acquisitions at different frequencies
(from 100 Hz up to 10 kHz) were made. The seven-param-
eter sine-t was then used to obtain the amplitude and
phase calibration coefcients. Their average and standard
deviations are plotted in Fig. 6. These calibration coef-
cients are then used in each measurement to correct the
estimated amplitude ratio and phase difference.
3.3. Evaluation of measurement standard deviations
To assess the algorithms performance, repetitive mea-
surements of the impedances were executed. Each imped-
ance was measured 5000 times at a frequency of 1 kHz,
with 1024 points per channel acquired at 96 kS/s. For each
measured impedance, the average value of the impedance
magnitude and phase and the corresponding experimental
standard deviation values were registered. The experimen-
tal standard deviation results obtained with the ellipse-t
algorithm are shown in Figs. 7 and 8. From the results as
a function of the measurement impedance phase (Figs. 7
and 8 on the right side) it is clear that the algorithm is
independent on the impedance phase. Note that this inde-
pendence for the ellipse-t is a result of the method used
to select the reference impedance, i.e., the ellipse-t meth-
od is phase dependant because it does not work for phase
differences near 0 [14]. Regarding the impedance magni-
tude it is also clear that the slightly worse results occur
when the measured impedance magnitude is near the lim-
its of the measurement range. This is justied by the re-
duced number of reference impedances and their values
i.e., near the impedance measurement range, the mis-
match of the reference impedance and the unknown
impedance magnitude is larger. The maximum relative
standard deviation of the impedance magnitude is 0.016%
while the maximum standard deviation of the estimated
impedance phase is 0.0089.
Even in the most mismatched measurement situation of
the 105 impedances, the signal to noise ratio (SNR) is
greater than 54 dB. This ensures that the ellipse-t is not
biased (as shown in [14], the algorithm is slightly biased
but only for SNR below 30 dB).
In Figs. 9 and 10 the results obtained with the seven-
parameter sine-t algorithm are shown for the same situ-
ations as those depicted in Figs. 7 and 8.
For the seven-parameter sine-t algorithm, the worst
results correspond to a relative standard deviation of the
impedance magnitude of 0.015% and 0.0083 for the exper-
imental standard deviation of the estimated impedance
phase, occurring for the measured impedance with highest
Fig. 5. Measured impedances and the corresponding reference imped-
ances for 1 kHz.
P.M. Ramos et al. / Measurement 42 (2009) 13701379 1375
magnitude. As in the ellipse-t algorithm results, this is a
consequence of the mismatch between the measured
impedance magnitude and the used reference impedance
magnitude. This dependence is as expected and is caused
by the ADC resolution, the way noise affects each of the
ADC channels and the low number of different reference
impedances (more specically their magnitude).
Similar to the ellipse-t results, the seven-parameter
sine-t results demonstrate that the uncertainty of the
estimated parameters is independent on the phase of the
measured impedance Figs. 9 and 10 (right).
3.4. Condence regions
In [14] the expanded uncertainty regions were obtained
from the one-dimensional uncertainty intervals of the
impedance phase and magnitude. These uncertainty inter-
vals were obtained with a coverage factor of 2 to dene an
interval having a level of condence of approximately 95%.
The uncertainty regions resembles parallelograms in [14]
due to the considerable distance to the origin and the re-
duced phase uncertainties. However, the overall uncer-
tainty regions obtained this way do not correspond to a
condence level of 95%. To obtain the actual 95% con-
dence level uncertainty regions, one impedance was repet-
itively measured (100,000) and the histogram was plotted
in Fig. 11 for the ellipse-t (the results for the seven-
parameter sine-t are very similar). This particular imped-
ance is inductive with magnitude near 1000 X and 5 of
phase. The uncertainty regions with condence levels of
66% and 95% (Fig. 11 right) were obtained from this
histogram.
The results depicted in Fig. 11 do not take into account
the uncertainty of the reference impedance. In [14] this
0.9874
0.9876
0.9878
0.9880
0.9882
0.9884
0.9886
0.9888
0 0 0 0 1 0 0 0 1 0 0 1
Frequency [Hz]
A
v
e
r
a
g
e

D
2
/
D
1
1.0E-07
1.0E-06
1.0E-05
1.0E-04
S
t
a
n
d
a
r
d

D
e
v
i
a
t
i
o
n

D
2
/
D
1
-0.30
-0.25
-0.20
-0.15
-0.10
-0.05
0.00
0.05
0 0 0 0 1 0 0 0 1 0 0 1
Frequency [Hz]
A
v
e
r
a
g
e

]
1.0E-05
1.0E-04
1.0E-03
1.0E-02
S
t
a
n
d
a
r
d

D
e
v
i
a
t
i
o
n

]
Fig. 6. Average and standard deviations of the amplitude ratio and phase difference obtained with the seven-parameter sine-t for 1000 repetitions with
N = 4000 and the same signal applied to both acquisition channels.
Fig. 7. Relative experimental standard deviation of the estimated impedance magnitude as a function of the impedance magnitude (left) and impedance
phase (right) for the ellipse-t algorithm.
1376 P.M. Ramos et al. / Measurement 42 (2009) 13701379
uncertainty was taken into account by applying the law of
propagation of uncertainty as described in [18]. However,
this approachis not ideal sinceit is combiningtheuncertain-
ties of the D
2
/D
1
ratio, D/ and of the reference impedance
magnitude jZ
R
j and its phase u
Z
R
assuming that all have
Gaussian distributions and then propagating, separately,
their uncertainties to jZj and u
Z
. For the reference imped-
ance, since it was measured by the Agilent 4294A [19], the
correct approach (also validated by the technical support
team from Agilent) is to assume uniform distributions. For
the reference impedance used, the maximum errors of the
Agilent measurements are e
max
jZ
R
j
0:761X and e
max
/
Z
R

0:0434

.
In light of these situations and also because there are
two outputs (real and imaginary or magnitude and phase),
the correct way to obtain the uncertainty regions is to
propagate the distributions using a Monte Carlo method
[18,20]. Using the 100,000 measurements of the imped-
ance used to obtain Fig. 11, the method randomly gener-
ates values (100,000 for each measurement) for the
reference impedance according to their uniform distribu-
tions and stores all the nal estimated impedance values.
From these 10
10
values an uncertainty region is obtained
and shown in Fig. 12. Since the uniform distribution of
the reference impedance magnitude and phase are much
wider than the uncertainty of the D
2
/D
1
ratio, the nal
uncertainty region is basically uniform this means that
the uncertainty region depicted in Fig. 12 (thick line) prac-
tically corresponds to a 100% condence level.
3.5. Efciency of the algorithms
Regarding the execution time, the ellipse-t is fast in the
measurement procedure with 584 ls per measurement
(excluding 10.6 ms of acquisition time). For the seven-
parameter sine-t algorithmandunder the same conditions
(i.e., the same number of samples and the same impedance
set), the average execution time is 4.61 ms including, on
Fig. 9. Relative experimental standard deviation of the estimated impedance magnitude as a function of the impedance magnitude (left) and impedance
phase (right) for the seven-parameter sine-t algorithm.
Fig. 8. Experimental standard deviation of the estimated impedance phase as a function of the impedance magnitude (left) and impedance phase (right) for
the ellipse-t algorithm.
P.M. Ramos et al. / Measurement 42 (2009) 13701379 1377
average, 2 iterations for convergence. The execution time of
the three-parameter sine-t is 401 ls (it is executed four
times), whiletheIpDFTtakes 94.12 ls (includingFFT). These
results are a major improvement to the results presented in
[14] (17.2 ms for the ellipse-t and 414 ms for the two iter-
ation seven-parameter sine-t) mainly due to the change in
theDSPbut alsoduetotheoptimizationintheseven-param-
eter algorithm.
Memorywise the efciency of the seven-parameter
sine-t has improved signicantly. The previous imple-
mentation required 17N + 63 words while the current
implementation needs only 3N + 63 which is now closer
to the memory requirements of the ellipse-t (2N + 42).
4. Conclusions
The comparison of signal processing algorithms for
DSP based impedance measurements was described.
Two algorithms were implemented: ellipse-t and se-
ven-parameter sine-t. The two algorithms were com-
pared in terms of the experimental standard deviation
of the estimated impedance parameters, their execution
speed and also memory requirements. Major improve-
ments regarding execution speed and memory require-
ments are reported here. Speed improvements are
caused by the use of a 32-bit oating-point DSP while
memory usage was drastically improved in the seven-
parameter sine-t due to the direct calculation of some
intermediate matrixes thus bypassing the need to build
the 2N 7 large matrix.
Overall the results are very good with relative standard
deviation of the impedance magnitude below 0.016% and
standard deviation of the impedance phase below
0.0089 for the ellipse-t and 0.015% and 0.0083 for the
seven-parameter sine-t.
Also for the rst time, the histogram and uncertainty
regions for the measurement system are presented. Monte
Carlo simulations show that taking into account the
Fig. 10. Experimental standard deviation of the estimated impedance phase as a function of the impedance magnitude (left) and impedance phase (right)
for the seven-parameter sine-t algorithm.
Fig. 11. Experimental histogram (left) of 100,000 repeated measurements of one impedance obtained with the ellipse-t and uncertainty regions with 66%
and 95% level of condence of the same measurements (right).
1378 P.M. Ramos et al. / Measurement 42 (2009) 13701379
reference impedance uncertainty causes the nal distribu-
tion to be uniform.
Acknowledgement
This work was sponsored by the Portuguese national re-
search project reference PTDC/EEA-ELC/72875/2006.
References
[1] H.P. Hall, How electronics changed impedance measurements, IMTC
2004 Instrum. Meas. Technol. Conf., Italy, May 2004, pp. 28.
[2] F. Caetano, J. Mata, J. Fareleira, C. Oliveira, W. Wakeman, Viscosity
measurements of liquid toluene at low temperatures using a dual
vibrating-wire technique, Int. J. Thermophys. 25 (1) (2004) 111.
[3] T. Radil, P.M. Ramos, A. Cruz Serra, Impedance measurement with
sine-tting algorithms implemented in a DSP portable device, IEEE
Trans. Instrum. Meas. 57 (1) (2008) 197204.
[4] P. Arpaia, F. Clemente, C. Romanucci, An instrument for prosthesis
osseointegration assessment by electrochemical impedance
spectrum measurement, Measurement 41 (9) (2008) 10401044.
[5] J. Hoja, G. Lentka, An analysis of a measurement probe for a high
impedance spectroscopy analyzer, Measurement 41 (1) (2008) 65
75.
[6] J. Hoja, G. Lentka, Method using bilinear transformation for
measurement of impedance parameters of a multielement two-
terminal network, IEEE Trans. Instrum. Meas. 57 (8) (2008) 1670
1677.
[7] A. Carullo, A. Vallan, Impedance measurement technique based on
sine-t, XVI IMEKO World Congress, Vienna, Austria, September
2000, pp. 249254.
[8] P.M. Ramos, M.F. da Silva, A.C. Serra, Low frequency impedance
measurement using sine-tting, Measurement 35 (2004) 8996.
[9] IEEE Std. 1057-1994, Standard for Digitizing Waveform Records, The
Institute of Electrical and Electronics Engineers, New York,
December 1994.
[10] Pedro M. Ramos, A. Cruz Serra, A new sine-tting algorithm for
accurate amplitude and phase measurements in two channel
acquisition systems, Meas. Elsevier 41 (2) (2008) 135143.
[11] A. Fitzgibbon, M. Pilu, R. Fischer, Direct least squares tting of
ellipses, in: 13th Int. Conf. Pattern Recog., Vienna, Austria,
September 1996, pp. 253257.
[12] R. Halr, J. Flusser, Numerically stable direct least squares tting of
ellipses, in: Proc. WSCG98, University of West Bohemia, Czech
Republic, February 1998, pp. 125132.
[13] F.M. Janeiro, P.M. Ramos, M. Tlemani, A. Cruz Serra, Analysis of a
non-iterative algorithm for the amplitude and phase difference
estimation of two acquired sinewaves, XVIII IMEKO World Congress,
Rio de Janeiro, Brazil, September 2006.
[14] P.M. Ramos, F.M. Janeiro, M. Tlemani, A.C. Serra, Recent
developments on impedance measurements with DSP based
ellipse tting algorithms, IEEE Trans. Instrum. Meas. 58 (5) (2009)
16791680.
[15] P. Hndel, Parameter estimation employing a dual-channel sine-
wave model under a Gaussian assumption, IEEE Trans. Instrum.
Meas. 57 (8) (2008) 16611669.
[16] IEEE Std 754-2008, Standard for Floating-Point Arithmetic, The
Institute of Electrical and Electronics Engineers, New York, August
2008.
[17] H. Renders, J. Schoukens, G. Vilain, High-accuracy spectrum analysis
of sampled discrete frequency signals by analytical leakage
compensation, IEEE Trans. Instrum. Meas. 33 (4) (1984) 287292.
[18] Guide to the Expression of Uncertainty in Measurement, ISO, ISO/IEC
Guide 98, 1995.
[19] Agilent 4294A, Precision Impedance Analyzer, Datasheet, January
2003. Available from: <http://www.agilent.com>.
[20] Alan G. Steele, Robert J. Douglas, in: F. Pavese, A. Forbes (Eds.),
Monte Carlo Modelling of Randomness in Data Modeling for
Metrology and Testing in Measurement Science, Birkhauser-
Springer, Boston, 2009.
Fig. 12. Uncertainty regions of the impedance measured by the Agilent
4294A (dashed line, center value is the cross), experimental expanded
uncertainty region of the impedance measured with the ellipse-t in the
DSP with a level of condence of 95% without taking into account the
uncertainty of the reference impedance (thicker line) and the uncertainty
region of the impedance measured with the ellipse-t taking into account
the uncertainty of the reference impedance (thick line) and obtained by
propagating the distributions using a Monte Carlo method (see text for
further details).
P.M. Ramos et al. / Measurement 42 (2009) 13701379 1379

You might also like