Digital Measurement of Frequency With Linear Interpolation in Dynamic States
Digital Measurement of Frequency With Linear Interpolation in Dynamic States
SIGNAL TECHNOLOGY
T 121
SIGNALŲ TECHNOLOGIJA
47
tk is calculated basing on the values of last periods Ti-1 and ⎛ i ⎞
Ti and interval Tk according to the formula 2( f i + 2 − f i +1 )⎜⎜ t k − ∑ Tj − 12 Ti +1 ⎟⎟
⎝ j =1 ⎠. (4)
= f i +1 +
⎛1 1 ⎞1 Ti +1 + Ti + 2
2⎜⎜ − ⎟( 2 Ti −1 + Ti + Tk )
1 T Ti −1 ⎟⎠
fk '= + ⎝ i =
Ti −1 Ti −1 + Ti For one measuring channel with frequency carrier
complete measuring cycle is realised by two counters
T ⋅ (T + 2Ti + 2Tk ) − Ti ⋅ (Ti + Tk ) . (2)
= i −1 i −1 working in continuous buffered mode. The first one counts
Ti −1 ⋅ Tk ⋅ (Ti −1 + Ti ) pulses of standard signal in meantime of consecutive
periods of pulse signal, and loads them to the memory. The
Off-line mode second counter counts the pulses of standard signal in the
instants between the pulse determining the instant of
The second method is used in an off-line mode [5]. In sampling and the next pulse of measured signal.
the first step one defines and registers the positions of In the instant of measurement the number of last
pulses of measured signal. Then the value of frequency is measured period is registered in the memory (the number
computed for chosen instants. For the arbitrary chosen of measured periods up to the instant of given sampling
instant of frequency the position of pulses preceding and pulse).
following this instant is well known. After the end of measuring cycle in the memory are
The value of frequency fk in the instant tk can be registered three one dimensional table for simple
calculated from two successive periods in assumption that measuring channel:
the frequency has changed in linear mode. Depending on • numbers of pulse signal in instants of strobe pulses: a1,
the instant of tk these periods are Ti and Ti+1 for calculation a2, …, am,
frequency fk or Ti+1 and Ti+2 for frequency f’k (Fig. 2). • length of periods of the measured signal: T1, T2, …, Tn,
• intervals between the sampling pulse and the nearest
pulse of measured signal: τ1, τ2, …, τp.
The first two tables have the same numbers of
elements m. The third table has the same number of
elements as the two first tables (p = m) in the case when
the longest period of pulse signal is equal or less than the
periods of sampling (max Ti ≤ Ts) as presented in Fig. 3.
48
⎡τ j ⎤ where f0 – constant component of frequency of pulse signal
w = trunc ⎢ ⎥ + 1 , (6) f, fm – amplitude of deviation of pulse signal frequency f.
⎣ Ts ⎦ i −1
For the instant t i = ∑ T j + 1Ti the value of frequency
2
j =1
and trunc[x] is integer of number x.
is expressed as
⎡ ⎛ i −1 ⎞⎤
f i = f 0 + f m ⋅ sin ⎢2πf sin ⎜⎜ ∑ T j + 12Ti ⎟⎟⎥ + noisei . (10)
⎣⎢ ⎝ j =1 ⎠⎦⎥
After transformation equation (11) is obtained in form
⎡ ⎛ i −1 T ⎞⎤ 1
f 0 + f m ⋅ sin ⎢2πf sin ⎜⎜ ∑ T j + i ⎟⎟⎥ + noisei − = 0 , (11)
⎣⎢ ⎝ j =1 2 ⎠⎦⎥ Ti
Fig. 5. Conversion of table τp
From this equation it is possible to compute the
In that way table τ1, τ2, … , is created τm with m values of successive intervals between the pulses Ti of
elements, where successive values represent interval measured signal.
between every sampling pulse and the nearest pulse of In the Fig. 6 distribution of errors is presented for
pulse signal. sinusoidal fluctuation of the pulse signal in the case of
The value of frequency fk of pulse signal in the f0 = 20 Hz, fm = 2 Hz, fsin = 0,3 Hz, noisemax = 0,001 Hz
instant of kth pulse of sampling signal is computed from and sampling frequency fs = 50 Hz.
formulae (3) and (4) taking into consideration two periods
( Ta i Ta +1 or Ta +1 i Ta + 2 ) and interval τ a , where ak is
k k k k k
formula
⎛ 1 1 ⎞⎟ 1
⎜
⎜
− (
Ta + Tak +1 + τ ak
Tak +1 Tak ⎟⎠ 2 k
)
1 ⎝
fk = + =
Tak 1
T + 12 Tak +1
2 ak
=
(
Tak 2 − Tak +1 2 + 2 ⋅ Tak ⋅ Tak +1 − 2 ⋅ τ ak ⋅ Tak + Tak +1 ) . (7) Fig. 6. Errors Δfk distribution for f0 = 20 Hz, fm = 2 Hz,
fsin = 0,3 Hz, noisemax = 0,001 Hz and fs = 50 Hz;
(T
ak )
+ Tak +1 ⋅ Tak ⋅ Tak +1 a – measurement from last time interval, b – measurement from
two last intervals
While for τ a < 12 Ta +1 frequency fk is used formula
k k
⎛ 1 1 ⎞⎟ 1
⎜ − T
⎜ Ta + 2 Ta +1 ⎟ 2 ak +1
( − τ ak )
1 ⎝ ⎠
f 'k = + k k
=
Tak +1 2 Ta k +1 + 2 Ta k + 2
1 1
=
(
Tak +1 2 − Tak + 2 2 − 2 ⋅ τ ak ⋅ Tak +1 − Tak + 2 ). (8)
(T ak +1 )
+ Tak + 2 ⋅ Tak +1 ⋅ Tak + 2
49
Conclusions 2. Świsulski D. Cyfrowa rejestracja sygnałów impulsowych z
częstotliwościowym nośnikiem informacji. – Gdańsk
In the paper the principles and realisation of pulse Wydawnictwo Politechniki Gdańskiej, 2006.
signal frequency measurement are presented in dynamic 3. Prokin M. Dynamic Response of a Frequency Measuring
System. IEEE Transactions on Instrumentation and
condition. The presented methods use linear interpolation. Measurements. – Vol. 41, No. 3, June 1992. – P. 390–396.
From the simulation of measurements for sinusoidal 4. Świsulski D. Pomiar on-line zmiennej częstotliwości metodą
variations of measured signal the interpolation method cyfrową // Pomiary Automatyka Kontrola. – 2006, No. 9bis. –
gives good results for small amount of noises in the P. 101–103.
measured signal. 5. Świsulski D. Wielokanałowa akwizycja z torami
pomiarowymi z napięciowym i częstotliwościowym
References nośnikiem informacji. Pomiary Automatyka Kontrola. –
2006. – No. 6. – P. 27-29.
1. Kirianaki N. V., Yurish S. Y., Shpak N. O., Denega V. P.
Data acquisition and signal processing for smart sensors. –
John Wiley & Sons, Ltd, Baffins Lane 2001. Submitted for publication 2007 02 15
L. Referowski, D. Swisulski. Digital Measurement of Frequency with Linear Interpolation in Dynamic States // Electronics and
Electrical Engineering – Kaunas: Technologija, 2007. – No. 4(76). – P. 47–50.
Digital frequency measurements of small values of frequency are based on the measurement of the period of investigated signal. The
result of measurement corresponds to the mean value of frequency in the defined time window. The instants which start the
measurement depend on the position of the slope of the measured signal. For this reason it is impossible to compare the results of
measurements in different measuring channels or to compare the results from frequency channels and voltage channels. The results are
delivered in different intervals and therefore it is impossible to calculate Fourier transform. Good results can assure the linear
interpolation. In the paper two methods (on-line and off-line mode) realized with buffered counters are presented. The simulation proves
that good results of measurements can be obtained in case of a little amount of noises in the measured signal. Ill. 7, bibl. 5 (in English;
summaries in English, Russian and Lithuanian).
L. Referowski, D. Swisulski. Skaitmeninis dažnio matavimas naudojant tiesinę interpoliaciją dinaminėse sistemose //
Elektronika ir elektrotechnika. – Kaunas: Technologija, 2007. – Nr. 4(76). – P. 47–50.
Išnagrinėtas skaitmeninio signalo matavimas, esant mažoms dažnio reikšmėms, pagrįstas tiriamojo signalo periodo matavimu.
Matavimo rezultatą atitinka vidutinė dažnio reikšmė tam tikru laiko momentu. Momentai, kuriais prasideda matavimai, priklauso nuo
matuojamojo signalo formos. Dėl šios priežasties neįmanoma palyginti skirtinguose kanaluose arba dažnio ir įtampos kanaluose atliktų
matavimų rezultatų. Rezultatai gaunami ir apdorojami skirtingais laiko momentais, tačiau Furjė transformacijos neįmanoma
apskaičiuoti. Naudojant tiesinę interpoliaciją galima tikėtis gerų rezultatų. Išnagrinėti du metodai, susiję su buferiniais skaitikliais.
Modeliavimo rezultatai rodo, kad geriausi matavimo rezultatai gaunami tik tada, kai matuojamame signale yra mažai triukšmų. Il. 7,
bibl. 5, (lietuvių kalba; santraukos anglų, rusų ir lietuvių k.).
50