## 2 Converting Frequency into Numerical Values  
The variable frequency signal can be measured using various methods [25]. One of them is the application of a microprocessor system that performs digital period measurement, supported by a counter with an additional register attached, which captures the current state of the counter [26]. The counter operating in this mode works continuously; i.e., after reaching its maximum value, it starts counting from the beginning. The reading of the counter status is performed by transferring the current contents of the counter totalizing register [27], without stopping the summation of pulses, to a special register that keeps the instantaneous value of the state [28].  
In the present system, the reading of the counter status is controlled by a microprocessor. The system measures the frequency by determining the duration of a single period \(T_{xi}\)[14]. The block diagram of the system operating according to the proposed method is presented in Figure 1. Figure 2 shows the waveforms presenting the operation of the periods processing system of the signal of variable frequency.  
The counter is controlled by a clock generator with the period \(T_{0}\) (Figure 2c). The code output of the counter is connected through a register capturing the state of the counter to the microprocessor. A frequency signal with period \(T_{xi}\) is applied to the selected microprocessor input (Figure 2b). The microprocessor reads the counter state at the instants of receiving the start and end impulse \(T_{xi}\) (Figure 2d). In this way, in the memory of the microprocessor, information is collected in the form of numbers representing successive values of the periods \(T_{xi}\) of the variable frequency signal from the physical-quantity-to-frequency converter.  
Figure 1: Continuous frequency measurement using a single counter and state capturing register.  
The frequency for a given \(T_{xi}\) is determined by the formula:  
\[f_{xi}(t)=\frac{1}{t_{i+1}-t_{i}}=\frac{1}{T_{xi}}, \tag{1}\]  
where: \(t_{i}\), \(t_{i+1}\)--time instants when the characteristic slopes of the testing signal with variable frequency appear. The numerical value corresponding to the length of a given period \(T_{xi}\) is described by the formula:  
\[N_{xi}=N_{i+1}+N_{max}*O-N_{i}, \tag{2}\]  
where: \(N_{i}\) and \(N_{i-1}\)--the states of the totalizing register of the counter at the times instants \(t_{i}\) and \(t_{i+1}\), respectively, \(N_{max}\)--capacity of the counter, and \(O\)--number of overflows of the counter during the measurement of each interval \(T_{xi}\).  
The \(T_{xi}\) period estimate of the f/N converter input signal is calculated from the formula:  
\[T_{xi}\approx\frac{N_{i+1}+N_{max}*O-N_{i}}{f_{0}}. \tag{3}\]  
Hence, the estimated frequency of the tested signal can be described by the formula:  
\[f_{xi}=\frac{1}{T_{xi}}=\frac{1}{T_{0}(N_{i+1}+N_{max}*O-N_{i})}, \tag{4}\]  
where: \(T_{0}\)--the period of the clock generator output signal. In this way, the data for calculating the values of consecutive periods of the input signal of the f/N converter are obtained. Taking into account the sensitivity \(S\) of the X/f converter, the data allow for a direct reconstruction of the waveform \(x(t)\) (Figure 2a) by using the dependency:  
\[x(t)=\frac{f_{xi}}{S}. \tag{5}\]  
Figure 2: The principle of continuous measurement of the periods of signal of a variable frequency with a single counter. The individual positions are shown: (**a**) exemplary waveform \(x(t)\), (**b**) variable frequency waveform produced by the X/f converter, (**c**) clock signal waveform with frequency \(f_{0}\), (**d**) counter reading of the f/N converter at the beginning and end of each period \(T_{xi}\).