Digital signal-processing techniques are being used in a wide range of industrial and consumer products due to their accuracy and repeatability. According to Texas Instruments digital signal processing is defined as ‘The science concerned with representation of signals by sequences of numbers and the subsequent processing of these number sequences’ [131]. Processing involves either extracting certain parameters from a signal or transforming it into a form that is more applicable. The digital implementation of signal processing has several distinct advantages:

- It is possible to accomplish many tasks inexpensively that would be either difficult or impossible in the analog domain, for example, Fourier transforms.
- Digital systems are insensitive to environmental changes and component tolerances and ensure predictability and repeatability.
- Reprogrammability features.

Most signal-processing algorithms for quasi-digital smart sensors involve a multiply, divide and an add (subtract) operation which can be written in its general form as Equation (5.26). Before the appearance of embedded microcontrollers and DSP processors, these operations were realized in the quasi-digital domain with frequency–pulse signals. Because a smart sensor uses a microcontroller or a DSP microprocessor in its architecture, it is expedient to perform these operations in the digital domain. However, sometimes in time-critical applications as well as in automatic control, pulse-frequency systems mathematical transformations with pulse-frequency signals are still used. We shall consider some basic transformations peculiar to the frequency-(period)-to-code conversion as well as to signal processing, used for sensor accuracy improvement (quantization error reduction) and to increase sensor noise stability.

Often in frequency signal processing it is necessary to subtract one frequency from another or to add two or more frequencies. As the initial information is coming into the adder as continuous sequences of pulses with the frequency *F _{i}*(

where *F*_{1}(*t*) = *kx*_{1}(*t*), *F*_{2}(*t*) = *kx*_{2}(*t*) is the initial information in a pulse-frequency form; *k* is the constant coefficient. In its turn, subtraction is reduced to the sequence of pulses with the frequency *F*(*t*) formed according to the equation:

From the two initial equations for frequency determination according to the method of the dependent count, the following equations of algorithmic transformations and determination of the absolute sum of two frequencies are constructed

the absolute sum of two periods

Similar equations can be obtained for the determination of an absolute and relative difference of two frequencies (periods), which will differ only in the minus sign in equations (6.3) and (6.4). Besides, knowing the quantization time *T _{q}* it is possible to determine the rate of a change in time of absolute and relative sums and differences of periods and frequencies.

Frequency adders and subtraction devices are used as components in complex devices such as frequency multipliers with a positive and negative feedback [132].

In frequency measurements, frequency multipliers play the same role as amplifiers of electric signals in amplitude measurements: they increase the sensitivity of measuring devices and extend measuring ranges for smaller values. They are able to improve frequency-to-code converters simultaneously in several directions. First, at a given speed they allow reduction of the quantization error. Second, by a given quantization error it is possible to reduce the time of measurement and, hence, to use the measuring device to control many slowly varied parameters or to reduce dynamic errors by the measurement of one quickly varied parameter. Finally, frequency multipliers can be used for frequency signal unification, allowing the same measuring device to be used with sensors of different output frequencies. Let us consider this in detail.

Despite the fact that frequency multipliers are well known and have been applied in radio engineering and metrology (by phase and time measurements) for a long time, the appearance of frequency-measuring techniques with rather specific requirements to multipliers has resulted not only in the creation of new multipliers, but also in a new understanding of the multiplication itself [4].

The *frequency multiplication* is a conversion of the input electric oscillation with the frequency *f _{xi}* into the output oscillation with the average frequency:

where *k _{m}* is the multiplication factor, representing an exact integer number (or in some cases an improper fraction). Thus, the average frequency of a signal is an average crossing by this signal at a certain level (for example, zero) into one side during a time unit. This definition differs from that used in radio engineering and reflects the specificity of frequency-digital devices. Hereby, the multiplication can be reduced to the frequency scaling. This can be realized with the help of widespread frequency dividers and multipliers controlled by the code equivalent of the scale factor

The working range of a multiplier, or a band is characterized by the relation of the maximum frequency to the minimum:

and also its binary logarithm log_{2} *D* (the range in octaves) or the decimal logarithm lg*D* (the range in decades). For input frequencies outside the working range of a multiplier, lg*D* does not change the multiplication factor.

A preliminary frequency multiplication is an effective means of increasing the conversion time for low and infralow frequencies. The output frequency of a multiplier exceeds its input frequency *k _{m}* times. Then this multiplied frequency will be converted into a code. Hereupon, by a given quantization error the quantization time

Frequency multipliers unify output signals of frequency sensors and transducers. This is especially important when a variety of sensors are used in a data acquisition system. Thus, it is desirable, that the output frequencies of all, or even parts of, sensors are multiplied by one frequency multiplier. Therefore, the multiplication factor should be able to change over a wide range without the loss of speed. Frequency multipliers can also carry out different functional transformations of the input frequency, thus they may be used for the non-linearity correction of sensor characteristics. At *k _{m}* < 1 we have a frequency divider.

The main aspects of frequency multipliers are the multiplication factor, the speed and the frequency range. Frequency multipliers used in frequency-to-code converters, should provide first of all a greater multiplication factor, high speed and a wide working frequency range. These requirements are inconsistent. Really, the increase of *k _{m}* is accompanied usually by a narrowing of the frequency range, in its turn, the extension of a frequency range controls the speed reduction.

Alongside these three basic requirements for frequency multipliers, there are additional requirements. First of all, functional transformations of the input frequency, etc.

Frequency multipliers with the pulse form of the input and output signal have received the greatest distribution [95]. If the form of the input signal differs, additional forming should be carried out. However, because of noise interferences during pulse forming, the multiplied period is extracted from the input voltage of the sine wave form with some error. The value of this error determines the achievable value of the multiplication factor *k _{m}*.

If the sensor signal has a sawtooth form, then counting pulses are formed at some set levels by the input voltage. The constant slope of the sawtooth voltage and the constant actuation level make the multiplier unsuitable for work in a wide frequency range because the pulses' arrangement in time becomes non-uniform by the frequency deviation from the nominal value due to changes of the sawtooth voltage amplitude. Besides, it is possible to lose part of output pulses in a high frequency range.

Using a symmetric triangular form of the input signal, the multiplication is realized by the repeated full-wave rectification. The dc component is subtracted from the input signals, then the full-wave rectification is carried out. After that, we will have the triangular voltage but with double the frequency. The dc component is subtracted again from this signal and full-wave rectification is realized and so on. Such a multiplier does not require any reactive elements and theoretically can have any large multiplication factor in any frequency range by the constant amplitude of the input signal.

If the form of the input signal differs from the symmetric triangular form it is necessary to form preliminary a signal of multiplied frequencies.

For the sine wave form of the input signal, multiplication with spatial coding with the help of the non-linear signal transformation (for example the squaring or cube involution) is most frequently used:

The dc component due to the squaring, is eliminated by the appropriate bias. The ac frequency component after the cube involution is eliminated by the subtraction of a certain part of the input signal. Multipliers of this type also suppose the cascade connection of any number of cascades by the not limited frequency range.

Frequency multipliers by the rectangular form of input pulses can be realized most simply. Original structures of such multipliers are described in [133].

Let us consider an example of the multiplier application for frequency signal unification. The large variety of frequency output sensors allows the measurement of various physical and chemical quantities. Depending on the measurand and sensor type the output frequency can vary for a wide range: from fractions of Hz up to several MHz. In multichannel data acquisition systems, with various frequency output sensors, the wide range of input frequencies complicates the use of unified devices which are intended, as a rule, for the input unified frequency signal 4–8 kHz or the standard interface signal 2–22 kHz.

In this case, it is expedient to use devices for preliminary unification of the frequency signal, which play the same role as scaling amplifiers in voltage or current measurements.

The frequency matching device can be constructed on the basis of a digital frequency multiplier, conventional to modern requirements of high accuracy, speed, reliability and stability for a wide range of frequencies. Their multiplication factors can be chosen automatically depending on the ratio between input and unified frequencies.

The circuit of a multirange frequency matching device providing the reduction of a low-frequency range (4–8 kHz) working with a 58-channel multiplexer of frequency signals is shown in Figure 6.1 (Patent No. 798 831, 847 505 (USSR)), [96].

The transformation of the low frequency to this range is carried out by multiplication of a certain factor *k _{m}* = 2

The device works in the following way. Each pulse of the input frequency starts the univibrator, developing the short duration pulse. The counter CT1 and the frequency divider are reset by this pulse to the state ‘0’, and the shift register is set ‘1’. Pulses of the highest clock frequency *f*_{0} come into the counter through the logical circuit AND-OR. After the limiting number *N*_{max} enters the counter, the output pulse of the multiplexer writes down the number *N*_{max}/2 into the counter. The same pulse enters the clock input of the shift register and shifts the ‘1’ in the register into the single place. The frequency of pulses coming into the counter is decreased two times. The repeated toggle of the logic circuit results in the writing of the number *N*_{max}/2 in the counter and in decreasing clock frequency.

Such a process continues up to the next pulse of the input frequency, which starts the univibrator. The number *N*_{Tx}, written at this moment into the counter and proportional to the period duration, is rewritten into the third register by the wavefront of the univibrator's pulse. The number of the chosen range, fixed in the shift register, is rewritten into the second register. Then the counter CT1 and the frequency divider are reset to ‘0’, and the shift register to ‘1’ and the quantization of a new period of the input frequency begins again.

The number *N _{Tx}* stored in the third register, through switches, is written in the decrement counter and the trigger T1. Pulses of the clock frequency, coming into the decrement counter from the generator G, reduce the number written in the counter. When this number becomes equal to zero, the circuit AND toggles. Its output signal sets up the trigger T2 to ‘0’. Hereupon, switches are opened and the number

The subtraction of clock frequency pulses from the number *N _{Tx}* repeats. The frequency of pulses from the trigger T2 is divided by two with the help of the trigger T3 in order to provide the off-duty factor of multiplied pulses, equal to two.

The decrement counter CT2 has one bit less than the third register. The whole part of the number *N _{Tx}*/2 is written in it through switches. The trigger T1 is intended for registration of the least significant digit of the number

Let us determine the output frequency of the matching device. The number, which is fixed in the third register, equals

where *m* is the number of the frequency range.

The duration of two neighbouring cycles between switches toggle is determined in the following way:

where *T*_{0} is the period of the clock frequency.

The period of the output frequency *T _{x}* equals

It is expedient to estimate the error of a frequency-matching device by the instability of the period of the reference frequency, when the maximum value does not exceed one period of the clock frequency. Hence, in order to increase the accuracy, it is necessary to choose a high value of the clock frequency. If the limiting frequency of the electronic components functioning *f*_{max} is accepted as such a frequency, then at the minimum period *T*_{x min}, the maximum value of the relative error will be equal to

The counter CT1 and the third register should have the number of bits determined by the following equation:

For example, at *f*_{max} = 10 MHz and a unified frequency signal in the 4–8 kHz range, the maximum relative error for a frequency-matching device does not exceed 0.05%. The transition time for the output frequency is one period of the input frequency. The dependence of the multiplication factor on the input frequency is shown in Table 6.1.

The use of the trigger T1 and the decrement counter CT2 allows for the minimum possible error, thus providing the duty-off factor of output pulses equal to two.

The number of the range *m* of frequencies *f _{x}* in the described device is in the second register, and such information is absent from the output frequency signal.

In some cases, the number of the range *m* can be transferred by the duty-off factor or pulse duration. For this aim, it is necessary to rebuild the unit for forming output pulses. Other parts of a frequency-matching device remain the same.

Differentiation and integration are frequently used in an automatic control system. Differentiation is one of the most difficult operations. In general, it can be presented in the following way:

where *F*_{1}(*t*) = *kx*(*t*) is the input pulse frequency signal; d*F*_{1}(*t*)/d*t* is the first derivation from *F*_{1}(*t*).

In an ideal case, the equation for a derivative of some function of time can be written as the following ratio:

However, with continuous information, represented in the pulse-frequency form, tending Δ*t* to zero, strictly speaking, loses a physical sense, from the moment when Δ*t* becomes equal to 1/*F*_{1}(*t*). Hence, in this case it is possible to speak about tending Δ*t* not to zero, but to some fixed small value Δ*τ*, much smaller in comparison with the period *T _{x}*. Instead of the infinitely small quantity d

Thus, for the pulse frequency signal it is possible to speak only about approximate differentiation of time functions. Thus, the accuracy of differentiation will be higher, if the following inequality is more strictly carried out:

Many measuring tasks, connected with the determination of fluid or gas flows, for example, can be reduced to the integration of some continuous signal. The integration for a pulse frequency signal is reduced to pulse counting with the help of usual or bidirectional counters. The realization of the so-called virtual counters inside a functional-logic architecture of a microcontroller enables such counters to have a large capacity, i.e. the feasible time of integration will be limited in this case only by the internal memory size of a microcontroller. The number of pulses, integrated by the counter, can be expressed by the following dependence:

Averaging windows allow the error reduction of the average value determination of some signal on its realization, which is limited in time. Averaging windows are weight functions of the finite (duration) impulse response (FIR) low frequency filter with the bandwidth, tending to zero.

The task, which is solved by frequency-to-code converters, can be considered as the dc component determination for some signal containing undesirable pulsations. The counter included in such a converter, counts the number of input pulses during the time *T _{i}* (gate time). If the frequency of input pulses is equal to

Let's consider, that pulses, entering the frequency-to-code converter's counter, have much smaller duration than the period, i.e. can be approximately considered as *δ*-pulses:

where *T _{x}* = 1/

Let's present a sequence of *δ*-pulses (Equation 6.19) as the inverse Fourier transform:

Substituting Equation (6.21) for (6.20), after simple transformation:

From the received ratio, the measurement result contains the desirable information *f _{x}T_{i}* and the error caused by harmonics with frequencies

The quantization error is caused by presence of the time interval *α*_{0} and *α*_{1} in Figure 6.2(a) between the wavefront of the Π-shaped weight function and the nearest next pulse of the sequence *φ _{x}*(

As only the value *T _{x}M* is taken into account, the absolute quantization error will be equal to

Generally, *α*_{0} and *α*_{1} represent the independent random variables distributed according to the uniform distribution law with mean equal to *T _{x}/*2 and dispersion equal to /12. The mean of the quantization error

The averaging Dirichlet window (the Π-shaped weight function) is not the best averaging window. In this case, we are dealing with the signal containing a certain set of higher harmonics. Here, the criterion for windows estimation (the greatest amplitude of the amplitude–frequency characteristic lobe) is impossible to use when the window is intended for the reduction of the mean-root square quantization error of frequency-to-code converters.

Weight factors of the optimum graded window reducing the relative mean-root square quantization error, are determined by the ratio:

In particular, at *N* = 8 we have *a*_{0} = *a*_{7} = 8; *a*_{1} = *a*_{6} = 14; *a*_{2} = *a*_{7} = 18; *a*_{3} = *a*_{4} = 20 (Figure 6.3(a)).

The absolute quantization error in the case the graded weight function can be calculated according to the equation (Figure 6.2(b)):

The mean-root square error will be equal to:

The number of pulses, which have been counted by the counter of the converter, can be calculated according to:

Thus, the relative mean-root square quantization error will be equal to:

The ratio of the error to the error , received in the case of the Π-shaped weight function is represented as:

For the optimum weight function described by Equation (6.26), it is possible to obtain the following:

As can be seen, the optimum weight function reduces the relative mean-root square quantization error and this reduction increases with the growth of *N* of the weight function.

The graded-triangular weight function (Figure 6.3(b) and (c)), is close to optimum. For this weight function by the even number *N*

and by the odd *N*

By the use of these weight functions in frequency-to-code converters the ratio of the mean-root square quantization error to the mean-root square error of a converter with the Π-shaped weight function will be equal (by the odd and even number of steps *N* accordingly):

The trapezoidal weight function provides slightly better results than the triangular weight function. It represents the triangular weight function calculated according to Equations (6.34) or (6.35), but with a cut-off point (Figure 6.3(d)). The analysis shows that the best result is reached when the ratio of the base of trapezoid to the top is approximately equal to three (*N/N*_{0} ≈ 3).

According to Equation (6.33) at *N* 1 and by transition from the Π-shaped to the optimum weight function the relative mean-root square quantization error is reduced *V*_{opt} times:

The same ratio

for triangular weight functions can be calculated on the basis of Equations (6.36) and (6.37):

For the trapezoidal weight function at *N/N*_{0} ≈ 3 and *N* 1 it is possible to calculate the ratio:

Thus, in all considered cases, the more steps *N* that the weight function contains the less the quantization error will be. Thus, triangular and trapezoidal weight functions give the quantization error, only in and in times more, than the optimal weight function. Taking into account that triangular and trapezoidal weight functions can be realized (by hardware or software) a slightly easier than the optimum weight function, we can arrive at the conclusion that these weight functions are expedient for quantization error reduction in frequency-to-code converters.

In the classical direct counting method for frequency-to-code conversion, the conversion time *T _{i}* is casually located in relation to pulses, with frequency

In this section, we have considered weight functions which reduce the quantization error in frequency-to-code converters. The weight method of averaging frequency (period) conversion results is also useful, when the transformation is carried out in the low and infralow frequency range and under the influence of industrial noises.

The quantization error reduction can be reached also by using weight functions in period, phase shift converters as well as in integrating analog-to-digital converters with a pulse-frequency or time-pulse intermediate conversion. Therefore, using the weight function in the phase-shift-to-code converter, the limiting absolute error for Dirichlet window averaging is 3.6°, and for the triangular weight function −0.1°, for a frequency of 50.5 Hz and conversion time 1 s. Modern DSP microprocessors allow the use of more complex weight functions, for example, synthesized with trigonometrical components.

Signal processing from the quasi-digital smart sensor point of view can be performed in a frequency-time domain using pulse-frequency signals as well as in a digital domain after frequency (period)-to-code conversion.

The use of optimum weight functions (for example, triangular) as advanced signal processing increases the accuracy of smart sensors (by reducing the quantization error) and increases the noise stability.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.