Software-based method of increasing the effective

0 downloads 0 Views 1MB Size Report
e.pawlowski@pollub.p. Elek. Ó. Eligiusz PAW£OWSKI. 28.08 - 31.08.2017. Amber Baltic Hotel, Miedzyzdroje, Poland. Lublin University of Technology.
ÓElek

28.08 - 31.08.2017

22nd International Conference on Methods and Models in Automation and Robotics

Lublin University of Technology

Amber Baltic Hotel, Miedzyzdroje, Poland

Eligiusz PAW£OWSKI

Software-based method of increasing the effective resolution of a measurement chain for a transducer with a pulse frequency output DETERMINING EFFECTIVE RESOLUTION (ENOB) OF THE MEASUREMENT CHAIN

TRANSDUCERS WITH PULSE FREQUENCY OUTPUT

x(t)

Photosensor Slit

Comp.

g

y(t)

Li

Photoemitter

Sh

f(t) t

REF

iREF

S=

Disc

1

m S= 60

RwiREFtREF

n

-VS Example 1: Voltage-to-Frequency Converter (VFC)

un =

S Kn

tn =

A block diagram of the considered measurement chain with the pulse frequency signal is shown in igure. The VFC converts the time-varying input voltage u(t) to a proportional frequency fx(t) of the pulse signal:

f x (t ) = Su (t )

fx(t)

u(t) VFC

where S is the sensitivity of the VFC expressed in Hz/V.

F/D

Kn

2

tn

1 The second error is the dynamic error Ddyn, which is the D dyn = result of signal averaging in the measurement chain: Tn

u (t) DSP

DU RMS =

1 N

å (u N

n =1

* n

(

- U 0 - A sin 2pf s t n*

))

Du (t ) = u (t )- u (t )

fref

Tset=Nset .Tref

fx =

Tset Tlong Treal

Nref .Tref

fref Time diagrams for signals in the reciprocal counting method with long measurement time

ENOB =

Tlong = N x

fx Real measurement time

fref

Tset=Nset .Tref Tset Tshort Treal

Nref .Tref

1 1 = ent.(Tset × f x + 1) fx fx

N ref

2 DU RMS

f ref

Tshort = N x

1 1 = ent.(Tset × f x ) fx fx

3 T__ real Tset [-]

2 Tlo n g 1 Tsh ot r

0

fref

0

Time diagrams for signals in the reciprocal counting method with short measurement time

1

f

7 [-] 5 6 3 2 4 Relative measured frequency

x ____ 1 __

Tset

Real measurement time Treal depending on the measured frequency f

dq =

f 1 1 = x × f ref Tlong f ref ent.(Tset × f x + 1)

dq =

f 1 1 = x × f ref Tshort f ref ent.(Tset × f x )

d Tref 2 __ Tset

q ____

å K n+k

k =0

u n*

1 Nx = f ref S N ref

Tlong 0

1

7 [-] 3 5 6 2 4 Relative measured frequency

=

2

1 N x -1 = å Ti + å Tn + k 2 k =0 i =1

tn

t tn+1

*

u n-1

*

u n-2

*

u

u n+2

* n

*

u n+1 t*n-2 t*n-1

*

t

*

tn

t*n+2

t n+1

Principle of digital frequency signal processing

fs=5Hz

One period measurement

14 13 1V 12 11 10 9 8 7 6 5 4 0

2V 4V

8V U0= 10V

6V

2

4

6

8

10

Effective number of bits ENOB depending on the amplitude A and constant component U0 for a frequency signal fs=1 Hz in measurement system using the classic one period measurement method

f

x ____ 1 __

Tset

Quantization error inx the reciprocal counting method

fref C

t n -1 + t n + N x -1

Tn+1 2

Tn 2 tn-1

t

The developed algorithm makes it possible to investigate the possibility of increasing the effective resolution of a measurement chain with a VFC by means of a software implementation of the reciprocal counting method in order to optimise quantization and dynamic errors. Research was conducted for a VFC with a typical sensitivity S= 1kHz/V, with a reference frequency fref=10MHz and the number of simulated output pulses from the converter of N=1000 adopted. The simulation was performed for a sinusoidal input voltage signal u(t) =U0+Asin (2fst), taking different combinations of the constant component U0 (from 1V to 10V) and the amplitude A (from 1V to U0). This first figure demonstrates the effective number of bits ENOB for a measurement chain using the classic method, wherein the measured durations of individual periods Tn.

1

Cref

= N ref ³ N set

t n*

tn-2

Tn+2

RESULTS OF COMPLETED STUDIES

Tshort

The algorithm implementing the reciprocal counting method has been used in the measurement system shown in figure, simulated in Matlab. Counter C continuously counts pulses with a reference frequency fref from generator G. The evenly increasing counter Cref generates a linear time scale. Each subsequent pulse of the output signal fx from the VFC writes at the moment tn the current code Cn in registry R and stores it in memory M. Further values of codes Kn are calculated as the difference of two successive values of saved counter * Kn Cn fx(t) un u(t) codes Kn=Cn-Cn-1. The arithmetic logic unit (ALU) determines the frequency fx according to the reciprocal counting method with a long measurement time. The algorithm adds the number of Nx periods of the measured signal Tn=Kn·Tref, so that the total number of ALU VFC R M the periods of the reference signal Nref exceeds the minimum set value Nset : N x -1 *

Tn+1

t

Input signal amplitude A (V)

SOFTWARE IMPLEMENTATION OF THE RECIPROCAL COUNTING METHOD

Finally, the quantized values of the input signal u n are calculated, and then * the corresponding moments of time t n . The set measurement time is equal Tset=Nset·Tref, with the real measurement time Treal being determined by the presented above formula, with the knowing limit value of the quantization error. Finally the effective number of bits ENOB is calculated.

fref

[-]

0

Tn

Tn-1 Tn-1 2

SINADdB - 1,76 dB 6,02 dB

The real measurement time Treal varies within a small range, long time Tlong and short Tshort according to the presented formulas. In both cases, the changes in the real measurement time are small and decrease in line with the increase of the measured frequency. As a result, the quantization error also varies to within a small degree£ no more than twofold and for larger measured frequencies, these changes are smaller, close to the value of Tset/Tref. The relative quantization error dq depends on the difference between the real measurement time and the measurement time defined by the edges of the measured signal Treal=Nx·Tx and the time determined by the number of pulses of the reference signal Nref·Tref. The limit value of the quantization error for the long measurement time Tlong and for the short measurement time Tshort is determined by the presented formulas.

Tx=1/fx Tref=1/fref

x

fx(t)

*

t n-1

diagrams shown in figures. The reciprocal counting method is dependent on the measurement of the duration of one or more periods of the measured signal Tx, with the number of measured periods Nx depending on the measured frequency in such a way that the real measurement time equal to Treal=Nx·Tx is approximately equal to the set measurement time Tset. The set measurement time Tset is defined by a predetermined number Nset of reference signal periods Tref. Measurement can be conducted in two ways using this method: by extending the set measurement time Tset until the appearance of the next pulse ending the subsequent time span Tx, or by shortening the measurement at the moment the earlier pulse appears. There are two versions of the reciprocal counting method: the long measurement time Tlong or the short Tshort. In both cases the result of the frequency measurement fx is determined by the number of time spans of the measured signal Nx, the number of time spans of the reference signal Nref and the reference frequency fref according to the formula: N

Relative quantization error

Tref=1/fref

Tn-2

Tref

ò u (t )dt - u (t n )

RECIPROCAL COUNTING METHOD Obtaining small quantization errors in a wide range of measured frequencies is assured thanks to the reciprocal counting method, which is illustrated by time

fx

*

u(t n+1)

where N is the total number of pulses at the output of the VFC.

A

u(t n+2)

= å Ti + Tn 2 i =1

Then the signal-to-noise and distortion ratio (SINAD) is calculated and finally the effective number of bits (ENOB):

SINADdB = 20 log10

*

*

u(t n)

Taking into account the quantization errors, dynamic errors and any other errors in the measurement chain under consideration, the effective value of the total error URMS is calculated according to the u*(t) formula: 2

Block diagram of a measurement chain with a frequency signal

Then, measurement data contained in the pulse frequency signal is converted in the F/D block into digital form, represented as a string of Kn code values. The principle of operation of the F/D block is based on the known structure of a digital frequency counter. In the next digital signal processing (DSP) block, the digital values Kn serve as the basis for * recovering the quantized values u (t) of the input signal. Since the evaluated measurement chain features errors, primarily * quantization errors and averaging errors, the reproduced voltage values u (t) at the output of the measurement chain are not equal to the values of the input voltage u(t). Instantaneous values of the total error Du(t) in the considered measurement chain can be calculated as the difference: *

Tx=1/fx

*

*

u(t n-2) u(t n-1)

u(t)

The first equation in the actual measurement system is not exactly fulfilled. A Tref quantization error dq appears which is the result of the digital time measurement Tn 1 d = = q with the quantization step equal to the period of the reference signal Tref: Tn Kn *

+

A block diagram of a system for determining the ENOB

In order to minimise dynamic errors, the calculated u n values are placed on the timeline in moments t n -1 + t n n -1 1 t*n falling in the middle of the time interval Tn *

STRUCTURE OF THE MEASUREMENT CHAIN UNDER CONSIDERATION

_ Du(t)

n

G

*

Example 2: Rotary incremental encoder

u DSP

fref

where: tn-1, tn are the times of occurrence of pulses, Tn=Kn·Tref is the time interval between pulses, Tref is the period of the reference signal with the frequency fref. Subsequent code values Kn are calculated in the DSP block into quantized values of the input signal u*n : * 1 f ref

a

2p m

*

Kn F/D

VFC

t -t K n = n n -1 = Tn f ref Tref

Effective resolution (ENOB)

One-Shot

Output signal

aft

ht

fx(t)

u(t)

where: U0 is a constant component of the signal, A is the amplitude of the variable component, fs is the frequency of the input signal. Frequency fx of the output signal from the transducer is converted into digital form Kn in the F/D block as shown in Fig. 3. Subsequent Tn time intervals between two successive pulses in moments tn-1 and tn are measured with reference frequency pulses fref :

G

n -1

Then, the simulation was repeated for the same parameters of the input signal, but using the reciprocal counting. These figures show results obtained for the reciprocal counting method algorithm with a set measurement time Tset= 0.5 ms and Tset= 1 ms. It can be stated that the classic method demonstrates a strong dependence of the resolution in relation to the signal amplitude A and the constant component U0. Using the reciprocal counting method with a set measurement time Tset= 0.5ms increases the effective resolution by approximately 3 bits, especially for large input signal values. Doubling the set measurement time Tset=1ms additionally increases the resolution by a further 1 bit, which confirms the theoretical formula presented above.

Effective resolution (ENOB)

Integ.

R

u (t ) = U 0 + A sin(2pf s t )

Block diagram of the simulated measurement system

SUMMARY In summarising the obtained results, it can be concluded that the analysed characteristics of the measurement chain with a VFC can be shaped within a significant scope by a reciprocal counting algorithm. The presented method of reciprocal counting makes it possible to obtain higher resolutions compared to the classical method of signal period measurement and can be implemented in software, without modifications to the hardware part of the measurement system. There always are, however, certain optimum values of amplitude A and the constant component U0 of the signal, for which the highest effective resolution is achieved. In this respect, the properties of a measurement chain with a frequency information carrier differ substantially fromADCs with a voltage signal, for which the highest resolution is obtained for the maximum amplitude. Also, the bandwidth for VFCs is narrower than for mostADCs with a voltage input and usually does not exceed a few hundred Hertz. The results may be useful in analyses of the properties of any measurement system that uses a pulse frequency signal with the processed input value being variable over time, such as in: research on rotating machines, measurements of energy frequency instability, analysis of heart rate variability, as well as many more. The simulated measurement system can also be easily implemented in practice using an appropriately programmed data acquisition card containing universal pulse counters. In further study, experimental test will be made in order to assess the method performance in a working environment. In this respect, it should first of all be noted that there are various sources of additionally errors in a physical measurement system. The real measurement input signal u(t) (1) will typically be contaminated by noise, which adds up to the difficulty of proper signal reconstruction in the measurement chain. Additionally, since the choice of measurement time Treal (and other parameters) balances quantization (7) vs. dynamic errors (8), an optimization problem should be taken into account during the preparation of a new measurement algorithm. In further study, experimental test will be made in order to assess the method performance in a working environment. In this respect, it should first of all be noted that there are various sources of additionally errors in a physical measurement system. The real measurement input signal will typically be contaminated by noise, which adds up to the difficulty of proper signal reconstruction in the measurement chain. Additionally, since the choice of measurement time Treal balances quantization vs. dynamic errors, an optimization problem should be taken into account during the preparation of a new measurement algorithm. Eligiusz PAW£OWSKI, Lublin University of Technology, Department of Automatics and Metrology, ul. Nadbystrzycka 38A, 20-618 Lublin, Poland E-mail: [email protected]

fs=5Hz

Reciprocal counting Tset=0.5ms

14 13 12 11 10 9 8 7 6 5 4

U0= 10V 4V

6V

8V

2V 1V

0

2

4

6

8

10

Input signal amplitude A (V) Effective number of bits ENOB depending on the amplitude A and constant component U0 for a frequency signal fs=1 Hz in measurement system using the long measurement time reciprocal counting method with Tset=0.5ms

Effective resolution (ENOB)

u(t)

Asinusoidal input voltage u(t) is applied to the measurement chain input, as follows:

u(t) , f(t)

Signals of the transducer with pulse frequency output

f (t ) = S x(t )

C

X F

The tansducer with the pulse frequency output converts linearly the input quantity x(t) to frequency f(t) of pulse train, with the proportionality coefficient S referred to as a transducer sensitivity :

WITH PULSE FREQUENCY SIGNAL

y(t)

fs=5Hz

Reciprocal counting Tset=1ms

14 13 12 11 10 9 8 7 6 5 4

6V

U0= 10V 8V

4V 2V 1V

0

2

4

6

8

10

Input signal amplitude A (V) Effective number of bits ENOB depending on the amplitude A and constant component U0 for a frequency signal fs=1 Hz in measurement system using the long measurement time reciprocal counting method with Tset=1ms