1. Introduction
Quartz Crystal Microbalances (QCMs) are sensors based on piezoelectric electromechanical resonators, which interact with the environment and change their resonant behavior due to different interaction mechanisms. QCMs-based sensing systems have a wide range of applications, such as gas sensing, humidity sensing, particle sensing, biosensors for a variety of biological targets, film growth monitoring in electrochemical deposition and liquid viscosity sensing [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12]. The use of QCM has some consolidated application fields but is still a subject for many research works aiming at improving performance from different points of view. In particular, the most active research topics, nowadays, concern the application of QCMs in reproductive medicine and point-of-case diagnostics [
13,
14,
15], and the use of novel sensing layer material, the development of new applications and of new models for the interpretation of measurement data and the design of improved measurement systems and techniques [
16].
Focusing on this last topic, i.e., the development of measurement systems, to evaluate the resonator behavior, several electronic systems and techniques have been proposed, relying on resonance frequency measurement, which typically exploits electronic quartz oscillator circuits [
17,
18] or on the evaluation of other quantities such as those based on the measurement of the QCM electrical impedance [
19,
20,
21] or on the induced phase shift [
22,
23,
24]. Some notable examples are the QCM 200 [
25], which is a commercial device that realizes the frequency measurement using continuous oscillatory circuits which exploit automatic gain control circuitry; the 0-phase electronic circuit for QCM operation in highly viscous environments implemented by Avramov [
26], which recovers the quartz parameters via an
transmission measurement after the tuning of the quartz via an
network to reduce the effects of electrical loading and parasitic contributions given by the electrical loading of the measurement system; or the OPENQCM Q-1 with dissipation module [
27], another commercial device that analyzes the resonance curve characteristics using a network analyzer in a wide frequency range, allowing to also detect and monitor overtones.
Focusing on the direct resonance frequency measurement, a more versatile widespread technique is the Quartz Crystal Microbalance with Dissipation Monitoring (QCM-D) [
28,
29,
30,
31,
32,
33,
34,
35,
36,
37]; this technique is based on the simultaneous measurement of the sensor resonance frequency and of its dissipation factor (i.e., the reciprocal of the quartz quality factor) during a transient response triggered by short electric excitations.
The challenges related to the design of electronic read-out circuits for QCM sensors are related to the involved complex sensing mechanisms. In general, the sensing principle of QCMs relies on the variation of the electromechanical resonator behavior due to the mechanical load exerted by the environment on the vibrating quartz, or, in other words, caused by the acoustic coupling between the quartz and the media in contact with its surfaces. The most common quartzes used for QCM, which are shear wave bulk resonators, usually operate at 5 MHz or 10 MHz, and the pristine devices, surrounded by air, are resonators with very high-quality factors (in the order of some tens of thousands), so that their transient response due to impulsive stimuli or to non-zero initial conditions lasts for some milliseconds. For high Q resonators, the design of the read-out circuit is not critical [
38].
When used as sensors, quartzes are functionalized by the deposition of a sensing layer over one of their surfaces, and, especially for bio-sensing, they can be immersed in liquid. In these cases, the elastic wave responsible for the vibration is transmitted also to the sensing film and/or leaks in the liquid. The coupling with the film and/or the environment changes both the resonance frequency and the quality factor of the quartz. If a target is absorbed by the sensing layer or if the liquid changes its composition, the QCM resonant behavior changes as well, and this is the base of sensing with QCMs; it can be shown that the frequency changes as a function of the mass of the ad-layer and of the viscoelastic characteristics of the media surrounding the quartz, whereas the Q factor mainly depends on the viscosity of the media in contact with the resonant system. In in-liquid applications, due to the liquid viscosity, the quality factor of the resonant system drops by about an order of magnitude (or more), so the transient response duration decreases down to hundreds of microseconds. For low Q-factor QCM applications, the design of the readout and measurement electronics becomes critical; moreover, the measurement requirements in terms of measurement range and resolution are very demanding: in most applications, the expected maximum relative variation of the resonance frequency is in the order of hundreds of ppms (some kHz for 10 MHz QCM) and the required frequency relative resolution is in the order of 100 ppb or less, (1 Hz or less for a 10 MHz quartz); moreover, it can be shown that, especially for low Q situations, the measurement of the ‘resonance frequency’ through the monitoring of the oscillation frequency of the transient response has many advantages in terms of accuracy, because other techniques lead to systematic errors, which increase when the Q-factor decreases [
38]. Therefore, QCM-D is a very convenient measurement technique for these cases. Nevertheless, since the transient response becomes short, the frequency assessment resolution can drop unless suitable measurement solutions are adopted [
29,
39,
40,
41,
42,
43].
To evaluate the transient oscillation frequency and decay time, the response signal is typically passed through an analog-to-digital converter and digitally processed [
44,
45]. Digital processing methods include direct model fitting (both in time and in frequency domains) [
46,
47,
48], Discrete Hilbert Transform [
49], parametric modeling [
50,
51], or Discrete Fourier Transform [
52,
53]; what all these methods have in common is the need for a complex processing system.
Even if many low-complexity and low-cost measurement systems with very good metrological characteristics have been proposed in the literature or are commercially available, which exploit oscillators and measure the frequency of a sine wave produced by a feedback amplifier with the quartz embedded in the loop [
17], or zero-phase lock-in circuits [
54], no relevant low-cost accurate solution has yet emerged regarding the QCM-D technique [
55,
56].
In this paper, we approach the problem of QCM-D measurement systems by proposing a low-cost, FPGA (Field Programmable Gate Array)-based frequency meter device for exponentially decaying sinusoidal QCM-D response signals. The system combines the well-known reciprocal frequency counter architecture with the preprocessing of the QCM-D signal through mixing operations, such as step-down the signal frequency and improving the measurement accuracy.
The paper is organized as follows. In
Section 2, the background and motivation of the measurement technique are described. In
Section 3 the frequency measurement technique is described, also providing some design considerations related to the measurement constraints. In
Section 4, an application case study is provided. In
Section 5, the optimized device architecture, implementing the response signal processing, and the frequency measurement, is presented; moreover, the experimental results are presented and analyzed. Finally, in
Section 6, the conclusions are drawn.
2. Background and Motivation
Quartz Crystals Microbalances (QCMs) are sensors obtained sandwiching a thin piezoelectric crystal between two conducting electrodes.
In this discussion, the considered quartz is an AT-cut quartz, which vibrates in shear thickness mode, with active area
, thickness
, density
electric permeability
piezoelectric coefficient
. When a gas surrounds the pristine QCM, the boundary conditions for the acoustic field at the quartz surfaces are characterized by a null shear stress. Exploiting these conditions, the mechanical impedance of the quartz can be found, and, in turn, it can be transformed into an electrical impedance due to the piezoelectric electromechanical coupling, which can be written as follows:
where
is the angular frequency,
is the electrical capacitance of the quartz, whereas
, is the shear wave speed in the quartz, and
is the complex shear modulus, being
the shear modulus and
the viscosity of the quartz. Finally,
is the piezoelectric coupling coefficient. (1) represents an impedance with an infinite number of resonances.
The behavior of the impedance in (1) around the first resonance frequency can be approximated with a lumped parameter network, where the quartz is represented by the parallel of the electrical capacitance and a motional branch consisting of a series resonant circuit, i.e., by the following impedance [
39,
40]:
where:
The corresponding equivalent circuit, neglecting the effect of the last term in (2), being
, is named Butterworth Van Dyke (BVD) model and is shown in
Figure 1. In the BVD model, the pure electric branch formed by the capacitance
is in parallel with the motional branch (
,
and
), which well approximates the mechanical behavior of the quartz, and is characterized by a series resonance frequency, given by the following equation:
(4) shows that the series resonance frequency depends solely on the mechanical characteristics of the resonator.
On the other hand, the parallel resonance frequency
is dependent on the parallel capacitor
, given by the
of the quartz, as defined above, in parallel to any parasitic capacitance connected to the two electrodes, comprising the one offered by wiring or by the front-end electronics
:
Finally, the Q-factor of the quartz can be written as follows:
The QCM used as a sensor, either due to the presence of a functionalization layer or to the presence of a non-ideal fluid (e.g., a Newtonian fluid), has a surface in contact with a material that supports shear waves, and this situation corresponds to a change of the boundary conditions at one of the quartz surfaces. Therefore, the acoustic field inside the quartz changes, and this is reflected in a transformation of the equivalent circuit model.
In general, the equivalent electric impedance of a film deposited on the QCM film can be written as follows:
where
, is the complex shear wave speed in the film, and
is the complex shear modulus, being
the film viscosity and
the shear modulus.
Considering always to work at frequencies much lower than the resonance of the film, in the lumped parameter equivalent network, the impedance of the film is usually approximated by a resistance (for the real part of
) and an inductance (for the imaginary part of
), placed in series to the motional branch of the BVD circuit [
57].
The presence of in the electrical circuit models the mechanical load and obviously shifts the series resonance frequency, such that the QCM sensor can be used to detect different characteristics of the added films depending on the applications; moreover, the presence of the film also affects the Q-factor of the resonant system.
In case the film viscosity is equal to 0 (purely elastic medium), the electric impedance is a pure positive reactance (until the resonance) therefore, it behaves as an inductive load; moreover, if the layer is thin the effect of the film on the series resonant frequency is the one described by the Sauerbrey equation [
58], and the series frequency shift depends solely on the film (ad-layer) mass. So, in a situation such as this: in the presence of thin elastic films or rigid films QCMs behave as pure mass sensors and a negligible effect on the Q factor is seen.
On the other hand, if the film has a viscous behavior there is also a large resistive component in series appearing in the motional branch, the magnitude of which depends on the phase of the complex wave speed.
We can consider as the limit case a film composed of a Newtonian fluid, where the phase of the complex wave speed is equal to 45°, since and .
Note that (7) (asymptotically with the fluid layer thickness going to ) describes also the impedance loading the quartz in in-liquid measurements , with ). In fact, when the thickness of the layer overcomes a certain limit the effect of the wave reflected by the upper surface of the film is negligible at the lower surface of the film in contact with the quartz and the load tends to the impedance provided by a semi-infinite space of Newtonian fluid. For fluid films and half spaces, the resistive load is very large, and the Q factor of the resonant system decreases dramatically, typically by at least one order of magnitude.
It must be noted that in some applications the sensing mechanism depends on the interaction of the QCM with individual particles (e.g., bacteria) if the size of the adsorbed objects, which form an ad-layer, is larger than the wavelength. In this case, the impedance that must be added in series to the motional branch of the BVD takes a different form from (7) and depends on the particle concentration, on the geometry and density of the particles, the density of the fluid surrounding the particles, and on the strength of the elastic bond of the particle to the surface [
59,
60].
The basic principle of the QCM-D technique is to excite the QCM with a burst signal, whose frequency is close to its resonance; this excitation triggers a sufficiently large transient response of the quartz which is an exponentially decaying response [
20,
21,
22,
23]. The response can be written as:
where
is the amplitude of the initial oscillations,
is the response oscillation frequency and
is the decay time constant. The response oscillation frequency is independent of the excitation frequency; however, the nearer the excitation frequency to the response one, the higher the response amplitude
, therefore increasing the measurement signal-to-noise ratio [
39].
Assuming to short circuit the quartz to measure the short circuit current signal and to evaluate the signal oscillation frequency
and decay time constant
, it is possible to estimate the quartz quality factor and series resonance frequency using the following equations [
38]:
Therefore, if succeeding in measuring the transient short circuit current, the measurement of the transient signal oscillation frequency and of the time constant measurements allows the assessment of the series resonance frequency, which, as can be observed in (4), is independent of loading parasitic capacitances and directly provides information on the electromechanical properties of the resonant system and/or on the mass of the adlayer.
This explains the motivation of QCM-D measurement techniques, which in summary can separate the information related to the imaginary part of the impedance (that can give information also on the mass of the ad-layer as pointed out in the detailed discussion) and to the dissipative behavior of the ad-layer or surrounding fluid and provide estimations independent from parasitic capacitances due to the insertion of the quartz in the measurement circuit.
The critical issues are related to the need of developing front-end electronics characterized by low input impedance, behaving as a current amplifier, limiting the load effects on both the time constant and the frequency value [
38].
Moreover, since the measured signal is a vanishing oscillation, which for QCM in gas sensing applications lasts tens of thousands of cycles (e.g., some milliseconds for QCM at 10 MHz) whereas in in-liquid applications few thousands of cycles (e.g., about 200 s for QCM at 10 MHz), the frequency must be estimated in a short time window with measurement accuracies that can be relatively high (typically around tens of ppb in gas applications and ppm in in-liquid applications).
3. Frequency Measurement Technique
To perform the digital measurement of a signal frequency, frequency counters are commonly employed. These well-known devices are generally composed by three elements:
a gate counter, that defines the measurement time duration;
a pulse counter, that provides the frequency measurement as the number of pulses counted during the measurement time;
a reference clock signal, whose frequency is used to convert the counted pulse number into a frequency value.
The generic structure of a frequency counter is shown in
Figure 2. When the device is enabled (RESET = ‘0’), the gate and the pulse counters start counting, respectively, with frequency
and
, until the gate counter reaches the overflow condition (OF = ‘1’). The overflow disables the counters, providing as output (MEASURE) the count reached by the pulse counter.
The described architecture can be configured to perform two kinds of frequency measurement.
If we connect the reference clock signal to the gate counter and the signal to be measured to the pulse counter, we perform a direct frequency measurement. In this case
is the reference clock frequency, while
is the input signal frequency, being
the bit length of the gate counter, and
the bit length of the pulse counter. Setting the gate counter to count to
and defining with
the number of counts reached by the pulse counter at the end of a measurement, the input signal frequency measure
is given by:
Instead, if we connect the reference clock signal to the pulse counter
=
and the signal to be measured to the gate counter,
, we perform a direct period (or reciprocal frequency) measurement. Using the same notation given for the direct frequency measurement, in this case, the input signal frequency measure is given by:
According to (11), the measurement resolution of a direct frequency counter depends on , i.e., the measurement time duration; this means that to achieve a high-frequency resolution, we need to perform a long measurement; this condition does not fit our application, since the QCM-D response signal (8) has a limited time duration, and therefore we must design our device implementing a reciprocal frequency counter.
The uncertainty of the proposed technique must be evaluated by considering two sources of uncertainty: one related to the measurement method, and to the process of counting therefore discretizing time, and the other related to the presence of measurement electronic noises (e.g., white noise, phase jitter) injected and caused by the implementation of the measurement hardware through real components.
The first contribution can be considered at first as a systematic error, assuming a deterministic phase difference between the gate, pulse and reset input signals. We call this contribution count error; the count error magnitude is related to the ratio between the clock period and the measurement time (intended as the time required by the gate counter to reach overflow), therefore it decreases as the measurement time increases. Afterward, considering the phase difference randomness, it can be shown that this error can be treated as a stochastic process, with maximum amplitude related to the systematic error cited above; it can be shown that this stochastic process, on the whole, is white and zero mean, therefore averaging consequent measurement results allows for reducing the uncertainty due to its effect.
The other source of uncertainty, which is the electronic noise injected by the circuit, is mitigated by the choice of quality components (e.g., low noise amplifiers, stable oscillators) and by carefully designing the front-end electronics and can be counteracted by averaging repeated measurement results at the expenses of measurement time.
Focusing on the count error, referring to the frequency counter scheme in
Figure 2, the count error depends both on the gate and the pulse counters.
The gate counter is supposed to count from 0 to , generating, therefore, the overflow after a time equal to ; however, the frequency counter RESET transition instant from ‘1’ to ‘0’ is not in phase with the gate input signal, and therefore the real measurement time is a random value , with .
On the other side, neglecting the stochastic contribution of electronic noise, jitter, clock instability and the phase displacement between the input signal and the reference clock, the pulse counter output
is the truncation of the product between the measurement time and the reference clock frequency:
is a real number, defined in the range .
Putting together the counting uncertainty of the gate and the pulse counters, according to (12) we get that the input signal frequency
is limited in the following interval:
therefore, the maximum count error corresponds to an error on the frequency measurement equal to:
Observing that in general
, we have that
, therefore (11) can be approximated as:
According to (16), the maximum measurement error depends only on the measurement time, regardless of the characteristics of the pulse counter. What is more, for short measurement times and input frequencies much greater than the required measurement accuracy, the resulting error can be high with respect to the desired accuracy.
To overcome these problems, we can employ a slightly different frequency counter architecture with respect to the one shown in
Figure 2, called equal precision frequency meter [
61], whose structure is shown in
Figure 3.
In this architecture, the RESET signal is given as input to a D Flip-Flop synchronized with the gate signal, rather than being directly connected to the pulse and the gate counters; in this way, the counters enable instant is delayed with respect to the RESET switching instant to the first rising edge of the gate signal, granting the measurement time to be exactly equal to
and reducing the maximum count error of the frequency counter to:
Putting together (8) and (13), we finally get:
Apparently, if we consider a limited measurement time application such as the QCM-D technique, in which the measurement time is upper bounded by the QCM transient response duration, the count error reported in (18) represents a performance limitation that cannot be overcome, as it is the result of a numerical truncation. In practice, however, it is possible to further reduce the error by averaging repeated measurements, exploiting the initial phase shift between the input signal and the clock signal.
In (13) we stated that the frequency meter output is a count value
corresponding to the floor of the product
between the measurement time
and the clock frequency
; however, this statement is true only when the gate and the clock signals are initially in phase, i.e., if the measurement window starts with a rising edge of both the input and the clock signals; in this way, each clock count corresponds to a period equal to
. Conversely, if the two signals are not in phase, i.e., the first clock rising edge is delayed with respect to the measurement start instant, the first clock count occurs after a time shorter than
, although the frequency meter interprets it as a whole clock period; as a consequence, if the clock delay is smaller than the fractional part of
times
(the truncation error, i.e.,
), the resulting frequency meter output count becomes the ceil of
; this effect is depicted by the three examples shown in
Figure 4.
Since the equal precision reciprocal frequency meter is always synchronized with the input signal, without any synchronization with the clock signal, the clock delay can be considered a uniformly distributed random variable defined between 0 and ; it can be easily proven that this random contribution to the frequency count allows, on average, to recover the input frequency removing the count error.
Let us consider again the product of the measurement time and the reference clock frequency . As previously stated, this is a deterministic real number defined in the range , being the floor of . Normalizing with respect to the clock period , the phase displacement between the input signal and the clock can be represented as a random variable uniformly distributed between 0 and 1. As a consequence, actually, the frequency meter output count is the result of the truncation of the random variable uniformly distributed between and , i.e., defined in the range .
This implies that the frequency meter output count is a discrete random variable
defined on the set
, with the probabilities of the following symbols:
where
is the probability density function of
, defined as:
It can be observed that the expected value of
is equal to:
i.e., the average value of
is equal to the exact product between measurement time and clock frequency.
Accordingly, averaging repeated measurements of a certain input frequency allows to reach error values lower than the maximum error provided in (18). What is more, the average is beneficial also with respect to other error contributions, such as jitter and electronic noise, being typically gaussian distributed with zero mean.
3.1. Equal Precision Reciprocal Frequency Counter Design Procedure
As shown in
Figure 3, the equal precision reciprocal frequency counter is a very simple device, which requires, to be designed, only to choose the counters bit length.
Assume that we want to design a frequency counter to perform the frequency measurement of an unloaded QCM with transient oscillating frequency ; according to the sensing application, when the quartz is loaded by the adlayer or by the surrounding medium, this frequency is reduced, and we consider as the minimum possible frequency for the given application ; moreover, we assume the QCM-D decaying response minimum time duration equal to , being the minimum decay time. Suppose that the device on which we are implementing the frequency counter works with a clock frequency equal to .
The gate counter bit length
must be chosen big enough to grant that the counter reaches overflow in
for any possible frequency of the quartz. In other words, we must size the counter with respect to
, choosing the minimum integer value of
that allows setting the frequency counter measurement time greater or equal then
:
In this way, we can configure the gate counter to count the maximum number of input signal periods
observable in the measurement time:
Along with
,
and
define the maximum number of pulses
we can count during the measurement time, i.e.,
The pulse counter bit length
must be chosen high enough to grant that the counter is able to count at least up to
without reaching overflow:
4. Application Case
To evaluate the performance of a QCM-D system based on a digital frequency meter, we consider an AT-cut quartz crystal with a nominal resonance frequency equal to 10 MHz mounted between two gold electrodes having a diameter of 6 mm. For such quartz, using an optimized electronic interface [
16], the transient duration
is about 1.6 ms in gas and 200 μs in water. Hence, considering in-liquid applications we consider
equal to 200 μs. Taking as a target application the real-time monitoring of biofilm growth through QCM, the implemented frequency meter should be capable of measuring frequency variations of the order of some Hz [
38].
The frequency meter is implemented on a Xilinx Artix 7 xc7a45 FPGA, working at a frequency of 100 MHz, nominally generated by quartz with a stability of 50 ppm mounted on the FPGA board (Digilent Arty). Using a Mixed-Mode Clock Manager (MMCM) module, the FPGA frequency can be boosted up to 462.5 MHz.
The provided parameters can be used to properly size the frequency meter counters following the previously described procedure.
Setting the measurement time equal to the minimum signal duration, according to Equations (22) and (23) we get that the gate counter length must be:
with the gate count limited to:
Accordingly, applying Equations (24) and (25), we get that the maximum number of counted pulses is:
requiring a counter with a length equal to:
Unfortunately, applying (18) to check the expected count error of a frequency meter of this kind:
we notice that the frequency meter performance does not match the required measurement accuracy of some Hz. On the other hand, to keep the frequency meter count error lower than, for instance, 1 Hz, the input signal frequency should be lower, as derived from the following equation:
A condition of this kind can be achieved by performing proper preprocessing operations on the input signal before executing the frequency measurement. A possible approach to pass from the original QCM resonance frequency to a frequency value granting the desired measurement resolution is to down-shift the frequency of the QCM signal by mixing it with a signal with an appropriate frequency to reach the frequency band indicated in (31); this mixing operation can be performed in two ways:
Both techniques are well-known methods to perform the frequency difference between two periodic signals. From our application point of view, the main difference between the two techniques is the operation domain: the first technique is a purely analog technique, which requires analog processing of the QCM signal before it is provided as an input to the FPGA; conversely, under-sampling is a mixed-signal technique which can be partially performed in FPGA, 1-bit converting the QCM signal outside the FPGA and sampling the obtained square wave in the FPGA simply using a D Flip-Flop.
5. Measurement System Architecture
To test the proposed frequency meter, we realized a testbench that conditions the QCM transient response, preprocesses the QCM signal by either analog mixing or under-sampling, generating the mixing signal both with the FPGA or with an external waveform generator (Rigol DG4162), and finally performs the frequency measurement.
To the aim of obtaining a metrological characterization of the different frequency measurement techniques, in the realized test bench the QCM was emulated by means of an additional signal generator (Rigol DG4162).
This allows for testing the system with a source generating a ‘known’ oscillation frequency (characterized by high accuracy and stability). In fact, assessing the uncertainty of the proposed methods using a real QCM, by comparing the measured results with those obtained by theoretical predictions based on modeling, will introduce additional and larger sources of uncertainty (e.g., model accuracy).
Figure 5 shows the functional block diagram of the testbench.
A LabVIEW Virtual Instruments (VI) performs the testbench configuration selecting the mixing technique and the mixing signal.
Regardless of the preprocessing signal operation, the frequency meter performs the measurement on its input signal and provides the result to the VI for storing, postprocessing and visualization.
5.1. Experiments and Results
We employed the testbench to compare the performance of the frequency meter assuming to preprocess the quartz signal following four different approaches:
the QCM response signal is mixed using the analog mixer with another analog periodic signal (analog mixer + waveform generator signal) and then fed to the frequency meter;
the QCM response signal is mixed using the analog mixer with a periodic signal coming from the FPGA (analog mixer + MMCM signal) and then fed to the frequency meter;
the QCM response signal is under-sampled and quantized using a D Flip-Flop synchronized with an external signal generated by a waveform generator (under-sampler + waveform generator signal);
the QCM response signal is under-sampled and quantized using a D Flip-Flop synchronized with an internally generated FPGA signal (under-sampler + MMCM signal).
The tests were realized emulating different QCM frequencies in the range [9.998 MHz, 10 MHz] with steps of 1 Hz. The QCM signal was mixed with a 9.968 MHz periodic signal (generated by the FPGA or by the waveform generator), nominally providing mixed signals with frequencies ranging from 30 kHz to 32 kHz. The mixed signal was provided as input to the frequency meter. Finally, the measured frequency was compared with the ‘true’ (nominal) mixed signal frequency to evaluate the measurement error.
Considering the new input frequencies range and repeating the design procedure described in
Section 3.1, the gate counter length was set at 3 bits, with a gate count
equal to 6. With this configuration, the maximum expected count error was equal to 0.33 Hz.
Figure 6 reports the results obtained by testing the frequency meter directly providing square waves with fundamental frequencies in the range of 30 kHz to 32 kHz generated by a waveform generator, with steps of 1 Hz and performing a single frequency measurement per frequency. As shown by the results in the figure, the measurement error is coherent with the expected one, despite being slightly higher because of the noise contributions due to the clock jitter and the FPGA on-board electronic noise. The results shown are corrected for the biasing related to the FPGA and signal generator clock accuracies.
Having evaluated the effective measurement error of the frequency meter, we tested the four different architectures described above. The results obtained in the analyzed cases are shown in
Figure 7, which pictures the experimental error observed performing a single measurement for each of the generated frequency; it can be easily observed that the resulting error is much higher than the one observed in
Figure 6.
This increment of error is due to one of two possible causes, which are analyzed hereafter, depending on the used mixing technique.
If we perform repeated measurements on a single input frequency, we get different error distributions according to the employed mixing process, as shown in
Figure 8.
Focusing on the purely digital (Digital Mixer—FPGA Signal) measurement system and on the measurement system employing a purely analog front end (Analog Mixer—WG Signal) cases, we notice that the first solution produces quantized error levels, while the second one gives a more continuously distributed error.
In the analog case, the observed error depends on the fact that even if theoretically we use the mixer to generate a periodic signal whose frequency is the difference between the quartz frequency and the mixing frequency , in practice is affected by a certain jitter coming from the combination of the input signals jitters and the front-end electronic noise, i.e., , where is the nominal signal frequency.
Consequently, the frequency meter count
is the truncation of a uniformly distributed random variable, which can be described as:
where
is the nominal count and
is the count variability.
Conversely, in the digital case we observe a quantized and higher error because of the sampling operation performed by the digital mixer. Since the digital mixer is realized through a Flip-Flop which performs the quartz signal under-sampling at the frequency
, its output signal period
will be the truncated value of
with respect to
, i.e.,:
where
is a natural number; this means the digital mixer output signal period can be up to
shorter than the expected period, introducing a maximum count error equal to
counts. The combination of this count error with jitter, electronics noise, and phase displacement between the two signals ensures also in this case a statistical behavior, therefore the measurement falls onto quantized values with different probabilities functions whose mean value is related to the true frequency value, due to a behavior such as the one discussed in detail in
Section 3.
Referring again to
Figure 8, a final remark must be done for the results obtained by mixing the quartz signal with the FPGA-generated signal using the analog mixer. In this case, the resulting error is not distributed as uniformly as in the purely analog case because of the shape of the mixed signal. Since the signal coming from the FPGA is a square wave, unlike the signal generated by the waveform generator, which is a sine wave, the mixer output signal frequency error is still continuously distributed, but the mixing signal multiple integer frequencies are more probable with respect to the fractional ones.
In any case, regardless of the phenomena producing the mixer output signal frequency variability, the frequency meter performance can be improved simply by performing the average of repeated measurements.
Figure 9 shows the experimental error obtained by averaging the output of 100 repeated measurements for each input frequency. The number of averaged measurements is considered acceptable in the context of a QCM-D measurement technique, assuming to interrogate the quartz with a frequency of 100 Hz, i.e., a transient excited with a pulse repetition frequency (PRF) of 100 Hz, and to provide an estimation of the resonant frequency each second; this measurement time is reasonable for QCM-based monitoring in most applications where the system under test transients are usually in the tens of seconds or in the minutes ranges (e.g., bacterial growth, gas adsorption, film growth).
The average operation reduces the measurement error both in terms of maximum error and of standard deviation, as also reported in
Table 1.
According to the obtained results, performing the average of 100 repeated measurements, the proposed architecture is characterized by a measurement error with zero mean (assuming calibrating the system to remove the biasing related to the FPGA and signal generator clock accuracies) and standard deviations, which are reduced, as expected, approximately by a factor , reaching values lower than 1 Hz. Comparing the four proposed architectures, the best performance is achieved by the purely analog and purely digital preprocessing solutions. Although the analog solution is the one with the best performance at all, the slightly higher error of the digital solution is compensated by a lower implementation complexity, as it is integrated into the digital architecture within the FPGA.
5.2. QCM Tests
Having characterized the frequency meter accuracy by using a waveform generator used as a QCM emulator, we applied the proposed frequency meter in a realistic application, i.e., the dynamic measurements in-liquid with a QCM whose characteristics corresponds to the application case proposed in
Section 4, i.e., an AT-cut quartz crystal with nominal resonance frequency equal to 10 MHz mounted between two gold electrodes having a diameter of 6 mm, with expected in-liquid QCM-D transient duration of about 200 μs.
The QCM was placed in an ad-hoc-built measurement chamber [
16]. The chamber, shown in
Figure 10, is composed of two blocks, in the middle of which the QCM is sandwiched, working as a wall between them; the bottom block hosts a holder and a connector for the quartz, while the upper block presents a central hole which allows depositing liquid on the quartz when the chamber is closed. The bottom block is made of Teflon, while the top is realized in stainless steel which has been used due to the low interaction with chemical compounds. The contact with the quartz metallization is guaranteed by two conductive O-rings. An embedded copper ring in the Teflon structure is used to carry out the signal from the bottom metallization via the conductive O-ring. Concerning the top stainless steel structure, it is in electrical contact with the quartz top metallization via the conductive O-ring and it is then grounded at the front-end electronics input. The electrical contact between the top and the bottom is performed by spring contacts. The design of the chamber grants that the deposited liquid remains only on the upper surface of the quartz; in this way, it is possible to perform in-liquid measurements.
Moreover, the use of Teflon as the bottom block guarantees a reduction of parallel parasitic capacitances to the quartz crystal, which can affect the measurement results.
The QCM was excited by means of a waveform generator and its QCM-D response was processed by means of dedicated front-end electronics to be amplified and compared, to convert it into a square wave with a voltage range compatible with the FPGA. The obtained signal was than given as input to the architecture presented in
Section 5.
The presented system was used to monitor the QCM series resonating frequency in liquid. We started from pure water (150
L) and then we added, with a micropipette, subsequent doses of 20
L of a solution of water with 57% weight/weight (
w/
w) concentration of anhydrous glucose, obtaining solutions with anhydrous glucose
w/
w concentrations of 0%, 9.11% and 15.71%, corresponding to heavily loaded damped responses of the QCM, as they correspond to values of the resistance
up to 210
[
2,
48]; the observed frequency variations are reported in
Figure 11.
Figure 11 shows the results obtained monitoring the QCM frequency for 13 min employing the proposed frequency meter with the analog mixer and the mixing signal generated by a waveform generator, without performing averages. The QCM-D pulse repetition frequency was set at 1 Hz, providing one measurement per second. The single measurement time was set equal to 200
s.
The application of 10
L of the solution of water with 60% anhydrous glucose causes a frequency shift of the QCM of around 200 Hz: in fact, at the end of the transient induced by the application of the solution with the micropipette, whose duration is of the order of few minutes, the mixed frequency value passes from an initial value of 34.65 kHz (pure water) to 34.45 kHz after the first solution dose application, and to 34.25 kHz after the second solution dose application; these results are in perfect accordance with what expected from the theory [
38]; it can be observed, also looking at the figure, that the employed frequency meter achieves a frequency resolution of few Hertz, as expected from the previously performed characterization. Consequently, the performed measurements show that the proposed architecture can be employed to measure frequency shifts in QCM-D applications, since it can reach sufficient resolutions for the target applications, related to liquid density/viscosity assessment; this resolution can be further enhanced by averaging, if needed by the application, as in the case of biosensors.
Always referring to
Figure 11, a final comment must be provided regarding the frequency meter behavior during the transient induced by solution application on the QCM; it can be observed that, at the beginning of the transient, the output frequency drops to 0; this effect is caused by the perturbation generated by the application of the solution: the solution is dropped manually with a micropipette; since the added dose has a different density and temperature with respect to the one on the QCM, when it falls on the QCM, a fluid dynamical transient is generated, during which the QCM-D response signal is so short in time to not be detectable by the frequency meter, as set for this simple test with fixed time gate duration, therefore producing the 0 Hz output.
6. Conclusions
We have proposed an FPGA-based measurement system for the monitoring of QCM oscillating frequency in QCM-D applications, tailored to in-liquid applications, in which the large mechanical loading reduces the duration of the quartz transient responses duration down to a few hundreds of μs, corresponding to a Q factor of about some thousands.
We have derived the proposed measurement circuit from the study of the theoretical count error introduced by an architecture of this kind, identifying the most suitable signal preprocessing technique to achieve the desired measurement resolution (in the order of a few ppb). We proposed different low-cost circuits implementing four different preprocessing techniques, based on the mixing of the quartz signal to increase the frequency meter resolution, exploiting both analog and digital hardware.
The four circuits’ performance was tested experimentally with the use of a test bench capable of emulating the QCM-D response signal with selected frequencies. The experimental results showed that the effect of noise and implementation non-idealities can significantly decrease the system performance, especially due to the implementation of down-shifting in frequency by means of under-sampling, as required by the all-digital solution; this effect is related to the system main clock frequency and depends on the ratio between this frequency and the QCM resonance one. The additional errors behave as white noise signals. Therefore, it was shown that averaging subsequent measurements mitigate the issue, providing satisfactory results. In particular, the experimental results concerned the operations with 10 MHz QCMs loaded by water solutions and characterized by a transient response lasting at least 200 s. The proposed measurement system settings were adjusted to achieve a nominal frequency resolution of 0.3 Hz whereas the actual resolution was experimentally estimated to be 24 Hz (3 sigmas of the noise floor) for the all-digital solution and 6 Hz for the circuit embedding an analog mixer and a DDS based generation of the mixing signal. Passing through average operations of N subsequent measurement (processing N subsequent transient responses) encompassing a window where the process under measurement can be considered stationary the additional noise can be reduced by about a factor . In the explored experimental cases the stationary window was assumed to be 1 s, with a PRF of 100 Hz that allows setting to be equal to 100; under this setup, the obtained resolution reached by the low-cost full-digital solution is about 2.4 Hz.
In summary, this work showed that the main sources of uncertainty are white zero mean processes, therefore increasing the measurement time and averaging, when possible, allows for lower uncertainty and improved resolution: longer times come both from increasing the number of pulse repetitions used for averaging and from using a longer gate. Nevertheless, the length of the gate is limited by the duration of the transient, whereas the number of repetitions is limited by the stationarity of the observed phenomenon.
Finally, we tested the proposed architecture by performing dynamical measurements on a QCM, monitoring its frequency variation in liquid while changing the applied load. The resulting measurement accuracy appears to be fully compatible with the QCM-D application, being the observed uncertainty more than one order of magnitude smaller than the frequency variations, confirming therefore the validity of the proposal.