An Adaptive Measurement System for the Simultaneous Evaluation of Frequency Shift and Series Resistance of QCM in Liquid

In this paper, a novel measurement system based on Quartz Crystal Microbalances is presented. The proposed solution was conceived specifically to overcome the measurement problems related to Quartz Crystal Microbalance (QCM) applications in dielectric liquids where the Q-factor of the resonant system is severely reduced with respect to in-gas applications. The QCM is placed in a Meacham oscillator embedding an amplifier with adjustable gain, an automatic strategy for gain tuning allows for maintaining the oscillator frequency close to the series resonance frequency of the quartz, which is related in a simple way with the physical parameters of interest. The proposed system can be used to monitor simultaneously both the series resonant frequency and the equivalent electromechanical resistance of the quartz. The feasibility and the performance of the proposed method are proven by means of measurements obtained with a prototype based on a 10-MHz AT-cut quartz.


Introduction
In-liquid measurements with quartz-based sensors are used in many different application fields, among which are chemical sensing, biosensing and viscosity measurements [1][2][3][4].
Sensing systems based on quartzes exploit their electromechanical resonant behavior: their piezoelectric properties provide a transduction of mechanical quantities into electrical quantities, whereas the pure elastic behavior of the quartz, which is an almost ideal resonator, is extremely sensitive to the changes of mechanical properties (mass, stiffness and damping). These particular properties have been exploited to obtain many different sensors: the most traditional ones are Quartz Crystal Microbalances (QCM), operating as mass sensors with resolutions down to a few nanograms [5][6][7][8], although, if used in liquid environments, it is possible to employ resonant measurement systems to characterize liquid viscosity and density. In this contest, the use of resonant structures is widely diffused and spread in different applications. Just to mention a couple, García-Arribas et al. developed a magnetoelastic sensor to sensitively measure the viscosity of fluids, aimed at developing an online and real-time monitoring of the lubricant oil degradation in machinery [9], and Zang et al. used a self-oscillating tuning fork device to perform fast measurements of viscosity and density, with the aim of characterizing different phases of liquids in a multiphase flow [10]. Moreover, in several applications, the research interest is focused on the realization of distributed sensor networks using sensor fusion techniques [11][12][13].
The basic structure of a quartz-based chemical or biosensor is the QCM, which is usually an AT-cut quartz disk operating in the MHz range provided by two electrodes on the two opposite surfaces. When the quartz vibrates in air, it is possible to assume no damping, and the modal frequencies of the device are set by the disk thickness [14]. In particular, it can be written [15]: where f s N represents the N-th modal frequency, N ∈ ℵ and N odd and t is the thickness of the quartz, whereas ρ Q and µ Q are the quartz density and shear modulus. A mass sensor is obtained by functionalizing one of the quartz surfaces with a material providing the selective adsorption of a target species. If, due to functionalization and to adsorption, a small additional mass (∆m) is deposited on one of the quartz surfaces, by assuming that the mechanical properties of the added layer are the same as those of the quartz, then the effect changes the resonator thickness and, accordingly, shifts the modal frequencies of a quantity (∆ f sN ) related to the added mass: where m Q is the quartz mass, and the linear relation stems from the assumption of small thickness variations. Notice that Equation (2), written in a different form, is also known as the Sauerbrey equation [16]. By means of the piezoelectric effect, the mechanical vibrations are converted into an electrical charge or voltage signal. Therefore, a QCM is, in principle, a linear mass sensor providing the frequency as an output quantity. A typical 10-MHz AT-cut QCM provides, theoretically, a response of ∆ f s1 (Hz) = −0.8 ∆m (ng) [17]. A complete sensing system can be obtained by inserting the quartz into an electronic circuit providing the frequency metering [1].
Indeed, the measurement problem is far more complex [1,18]. First of all, the electromechanical vibrations can shift frequency not only due to the added mass (desired effect) but, also, due to the unwanted mechanical damping caused by the added layer, which has usually different and worse mechanical properties with respect to the quartz, especially in biosensors, where it consists of a lossy viscoelastic functionalization film and of the adsorbed target species (biological targets). Moreover, and more importantly, differently from AT-cut quartz oscillating in the air, where the surrounding medium can be well-described as an ideal fluid, and the standing elastic wave causing the vibration is confined in the solid disk, for in-liquid sensors, the surrounding medium is better described by a Newtonian fluid. In this case, part of the shear vibration can be transferred to the liquid and part of the elastic energy dissipated. The interaction with the fluid is, in this case, a non-negligible mechanical load (with both dissipative and conservative characteristics) that causes very large frequency shifts (up to hundreds of ppms). Due to this fact, some sensing systems exploit the dependency of the modal frequency of the quartz on the characteristics of the surrounding fluid to obtain viscosity measurements [14,19,20].
As a consequence, QCM-based measurement systems operating in liquid often couple the modal frequency shift assessment with the evaluation of the viscoelastic characteristics of the added layer through the monitoring of other dynamic parameters, such as the dissipation coefficient δ or, equivalently, the Q-factor [21,22]. This could unravel the inertial and dissipative behaviour of the ad-layer and enable distinguishing between the added mass and the surrounding liquid effects.
To continue with the issues related to the QCM-based measurements, it must be underlined that the way in which the vibrations are generated and measured can influence their frequency, which can be different from the searched modal frequency: for instance, the front-end circuit loads and influences the electromechanical resonance [1].
In a typical QCM system, the quartz is embedded in the feedback network of an oscillator circuit, and its output frequency is measured by, e.g., a digital frequency meter.
QCM systems with dissipation monitoring (D-QCM) also provide a measurement of the dissipation factor δ (equivalent to the Q-factor) by inducing transients, e.g., disconnecting the feedback loop [23] and evaluating the transient decay duration. This allows for assessing the damping coefficient of the resonant electromechanical system.
In this paper, the problems related to measurements based on QCM in in-liquid applications are summarized, and a novel system based on a Meacham oscillator embedding an amplifier with adjustable gain is proposed. An automatic strategy is described that allows for gain tuning and maintaining the oscillator frequency close to the modal resonance of the quartz. From the adjusted gain value, an estimation of the series electromechanical resistance can be obtained, providing also the monitoring of the dissipative behavior of the electromechanical system through a robust estimation technique.
This paper is organized as follows: in Section 2, the operation of quartzes in liquid is presented, and the main measurement problems are discussed. In Section 3, the proposed oscillator topology, the series resistance estimation technique and the gain adjustment strategy are described. In Section 4, a prototype system, used to verify the proposed solution, is described, whereas Section 5 shows and discusses the experimental results. The conclusions are drawn in Section 6.

In Liquid Measurements Based on QCM and Oscillators
In-liquid quartz resonators can be used either to assess the viscoelastic properties of a liquid or to measure the mass of a target biological species. In the latter case, a functionalization layer is deposited over one of the quartz surfaces, ensuring the selective adsorption of the target. The target species are usually dispersed in a liquid; therefore, in both cases, the pristine or functionalized surface of the quartz is in contact with a liquid medium. A general model for this kind of measurement set-up is represented in Figure 1, where the lumped parameter electrical equivalent circuit (Butterworth-Van Dyke) of a QCM operating at the first modal resonance, f s1 , is shown [1].  The equivalent circuit is the parallel of the purely electrical branch (C 0 ) and of the electromechanical branch, which is a series resonant circuit, representing with inductances the inertial properties of the mechanical system, with capacitance its elastic properties and, with resistances, viscous losses.
Each component of the mechanical system (quartz, additional layer and nonideal liquid) is represented in the electrical domain by the appropriate equivalent components.
In the circuit shown in Figure 1, the functionalization layer is modeled as an additional rigid layer (mass load), but if needed, the model can be refined simply accounting also for its viscoelastic behavior, introducing a further resistor describing the viscous losses. The Newtonian fluid is represented by an inertial load and by a dissipative element.
More in detail, considering an AT-cut quartz with electric permittivity Q = 22 , shear modulus µ Q = c 66 , density ρ Q , piezoelectric coefficient d 26 , electrode area A e , viscosity coefficient η Q and mass m Q , the quartz is represented by the series of C Q1 = 8 and and by the electrical branch consisting only of the electrical capacitance, which, in air, is C 0 = Q A e t . C 0 can take a slightly different value in-liquid, due to a fringe electric field in the surrounding medium.
The presence of the additional layer (functionalization and adsorbed target species) with mass ∆m is modeled while adding in the series an inductance L Mass = ∆m t 2 .
Finally, the effect of the Newtonian fluid with a density ρ L and viscous coefficient η L is represented by a series of a resistor and a nonideal inductors with a resulting impedance [24]: Usually, since the quartz operates in a small frequency range close to f s1 , in Equation (3), it can be assumed that f = f s1 . Therefore, we get: Defining L m , C m and R m , as shown in Figure 1, the impedance of the circuit shown in Figure 1 presents a series resonance f s = 1 2π √ L m C m corresponding to the first mechanical modal frequency f s1 and a parallel one . The two resonances are very close, because C 0 is always much larger than C m . It can be seen that the series resonance depends only on the mechanical property of the quartz, whereas the parallel resonance depends also on C 0 ; therefore, it is influenced by the parasitic components due to, for instance, the read-out circuit.
In detail, the series frequency changes due to the presence of an additional mass (and this is the working principle of a microbalance), since the inductance L Mass contributes to the overall inductance, but, even in the absence of an added mass, the presence of a Newtonian liquid causes a modal frequency shift, due to L L .
The shift in this case can be described by the equation derived by Kanazawa and Gordon [25]: However, only under the assumption of L L L Q1 1. Note that this equation holds only for very small changes of L m , which is not the case when passing from air to water.
It is well-known that, when placed in an oscillator circuit, the quartz vibrates at a frequency comprised between the series and the parallel resonance frequencies, and the actual oscillation frequency within this range depends on the circuit topology and components.
From the above discussion, it can be concluded that the mechanical properties of the resonator are related by known relationships to the series resonance frequency. Therefore, to obtain information about the mechanical properties either of the fluid or of the added mass exploiting a QCM-based oscillator, the oscillator should operate at a frequency as close as possible to the series resonance of the quartz in any conditions; otherwise, the observed frequency shifts cannot be easily interpreted and related to the variations of the mechanical quantities of interest.
To clarify the above discussion, the different impedances of the same 10-MHz AT-cut quartz in air, water and in a solution of water and 20% glycerol are shown in Figure 2. The plots are obtained using values for the different components of the equivalent circuit in Figure 1 assessed either from the theoretical model presented in this section or using experimental data [17]. As expected, beyond shifting the series frequency about 2 kHz, the effect of pure water is to dramatically reduce the Q-factor due to the dissipative effect represented by R L , which takes quite a large value (more than ten times the resistance in air). This reduction leads to a less stable behavior and opens many problems in the design of oscillators. In this respect, it must be remembered that these kinds of quartzes are used to measure very small masses. The typical needed mass resolution is in the order of a few nanograms; therefore, the frequency relative resolution has to be smaller than 100 ppb. resonator are related by known relationships to the series resonance fre to obtain information about the mechanical properties either of the flu mass exploiting a QCM-based oscillator, the oscillator should operat close as possible to the series resonance of the quartz in any conditi observed frequency shifts cannot be easily interpreted and related to t mechanical quantities of interest.
To clarify the above discussion, the different impedances of the cut quartz in air, water and in a solution of water and 20% glycerol are The plots are obtained using values for the different components of th in Figure 1 assessed either from the theoretical model presented in th experimental data [17]. As expected, beyond shifting the series frequ the effect of pure water is to dramatically reduce the Q-factor due to th represented by , which takes quite a large value (more than ten tim air). This reduction leads to a less stable behavior and opens many pro of oscillators. In this respect, it must be remembered that these kinds o to measure very small masses. The typical needed mass resolution is in nanograms; therefore, the frequency relative resolution has to be smal   Figure 3a shows the impedances of the 10-MHz quartz in water and in a 20% glycerolwater solution, with and without an additional parasitic capacitance of 2 pF in parallel with C 0 , whereas Figure 3b illustrates the effects of an added mass of 10 µg. It can be seen that parasitic capacitances do not affect the series resonance position.  Figure 3a shows the impedances of the 10-MHz quartz in water and in a 20% glycerol-water solution, with and without an additional parasitic capacitance of 2 pF in parallel with C0, whereas Figure 3b illustrates the effects of an added mass of 10 μg. It can be seen that parasitic capacitances do not affect the series resonance position.

Oscillator Topology and Working Principle
In QCM-based oscillators for in-liquid applications, the design should, usually, satisfy the following requirements: • The oscillator should oscillate at a frequency providing an estimation of the series resonance of the quartz.

•
One electrode of the quartz should be grounded in order to minimize the parasitic effects due to the fluid in contact with the QCM surface and to simplify the development of the measurement chamber.

•
Due to the large reduction of the Q-factor of the quartz, the oscillator circuit must be characterized by a high stability.
For these reasons, we selected as the oscillator topology the Meacham bridge, shown in Figure 4, which is characterized by a high stability [26], allows for the use of a grounded quartz and oscillates at a zero-phase frequency, 0°. The oscillation frequency can be used as an estimation of the series resonance of the quartz, as required, even if, with the different from 0 Ω, the series resonance frequency is close to but does not coincide with this frequency.

Oscillator Topology and Working Principle
In QCM-based oscillators for in-liquid applications, the design should, usually, satisfy the following requirements:

•
The oscillator should oscillate at a frequency providing an estimation of the series resonance of the quartz.

•
One electrode of the quartz should be grounded in order to minimize the parasitic effects due to the fluid in contact with the QCM surface and to simplify the development of the measurement chamber. • Due to the large reduction of the Q-factor of the quartz, the oscillator circuit must be characterized by a high stability.
For these reasons, we selected as the oscillator topology the Meacham bridge, shown in Figure 4, which is characterized by a high stability [26], allows for the use of a grounded quartz and oscillates at a zero-phase frequency, f 0 • . The oscillation frequency can be used as an estimation of the series resonance of the quartz, as required, even if, with the R m different from 0 Ω, the series resonance frequency is close to but does not coincide with this frequency.
In this configuration, we have a loop gain: where Z Q is the equivalent impedance of the quartz (impedance of the network shown in Figure 1); A v is the open loop gain of the differential amplifier and β, β p and β n are the overall, the positive and the negative feedback networks gains, respectively. The oscillation conditions are obviously those that grant the existence of a couple of purely imaginary poles of the closed loop gain, i.e., the Barkhausen conditions, requiring the existence of a frequency where the loop gain has a unitary module and a phase equal to −180 • .
Ideally, the open loop gain is assumed to be a real number not contributing to the phase of the loop gain. In this case, the oscillator operates at the frequency, f o , where the impedance of the quartz is purely real; therefore, at the oscillation frequency, it can be written: where Z Q ( f o ) ∈ . Note that, to satisfy the phase Barkhausen condition, it must be granted that β p ( f o ) > β n ( f o ); therefore, in any working condition, the following inequality should be satisfied: Therefore, in the Meacham oscillator, at the oscillation frequency, the quartz operates as a pure resistive component; therefore,  In this configuration, we have a loop gain: where is the equivalent impedance of the quartz (impedance of the network sh Figure 1); is the open loop gain of the differential amplifier and , and overall, the positive and the negative feedback networks gains, respectively. The o tion conditions are obviously those that grant the existence of a couple of purely nary poles of the closed loop gain, i.e., the Barkhausen conditions, requiring the ex of a frequency where the loop gain has a unitary module and a phase equal to −180 Ideally, the open loop gain is assumed to be a real number not contributing phase of the loop gain. In this case, the oscillator operates at the frequency, , wh impedance of the quartz is purely real; therefore, at the oscillation frequency, it written: The inequality in (8) is particularly critical for QCMs operating in-liquid. In fact, these devices present a largely variable value of R m due to the contributions of the surrounding liquids, which can have different viscosities.
Besides the phase condition (Equation (7)), the marginal stability of the system is granted by selecting the value of A v to also satisfy the Barkhausen module condition, which is: Note that, if Equation (9) is satisfied, given the value of A v and those of the resistances R 1 , R 2 and R f , it is possible to derive the value of Unfortunately, this equality cannot be perfectly met in the reality, and for a QCM, this problem is particularly critical, because the value of Z Q ( f o ) varies during operations.
In any case, the loop gain module should be as close to 1 as possible but larger than 1; otherwise, the oscillator behaves as a stable system, and its output is not persistent.
These considerations clarify how real oscillator circuits never behave as pure marginally stable systems; on the contrary, they can be modeled in the linear regime with poles with the real part larger than zero, and they always also operate in nonlinear regions. As a consequence, the imaginary part of the unstable poles, which sets the frequency of the oscillator output, does not coincide with the frequency of the marginally stable poles.
To deepen this discussion, the overall gain of the amplifier with feedback, A f , can be written in the Laplace domain in the following way: where N(s) and P(s) s 2 ω 2 N − 2ζ ω N s + 1 are polynomials in s. By describing the gain of the amplifier in Equation (10), the denominator factor, responsible for the oscillating behavior, is written in the Bode form. Therefore, the couple of unstable poles responsible for the oscillation are: where ζ and ω N are positive real numbers, and α = ζω N is the positive real part of the poles. Consequently, the response to the initial condition of the system contains a nonvanishing contribution due to this couple of poles that can be written as: where A and φ are the parameters related to the initial conditions. Therefore, the oscillator operates at the frequency f o , defined as follows: If Equation (9) is perfectly satisfied, and if R m is sufficiently small, then the poles are marginally stable, and ζ is equal to zero; therefore, we can write: In this case, the oscillator frequency estimates the series resonance frequency as desired.
On the other hand, if the loop gain module at the frequency selected by the phase condition is larger than one, then the frequency of the oscillator is different from the searched resonance frequency, and we can approximate the difference, e f , between the two frequencies as follows: It is interesting relating the deviation e f , which is a measurement error, to the magnitude of the loop gain module. To this end, we propose a simplified analysis considering A v as a real number and the value of R m small. To obtain the relationship between the oscillator characteristics, i.e., how much the loop gain is larger than 1 and the measurement error, it is convenient to write the denominator of the amplifier gain, A f , defined in Equation (10), with the following equation: where N β (s) and D β (s) are the numerator and the denominator of β, respectively. At the frequency satisfying the phase condition, which is approximately f s , β is a real number; A v is either a real number and its imaginary part is zero and or a pure imaginary number with a null real part.
Hence, in the first case, While, in the second case, At the frequency f s , we have Re(α( f s )) = 0 and Im(α( f s )) = 2ζ. So, in the first case, we derive: While, in the second case: The last equations describe accurately the behavior of the oscillator for a small value of R m , whereas, for larger values of R m , the oscillator frequency deviates from f o in a different manner.
In any case, Equations (20) and (21) show that the larger the loop gain is with respect to 1, the larger the coefficient ζ and the deviation between the oscillator output frequency and the quartz series resonance frequency. Moreover, and more importantly, this error is not independent from the measurement conditions, and it cannot be compensated, since it varies with R m . Concluding the deviation of the oscillator frequency from the measurand is a function of A v and of the characteristics of the fluid.
This discussion clarifies that the operating frequency of the oscillator deviates from the desired one (in this case, the series resonance of the quartz) if the loop gain module is much larger than 1 and that the deviation depends on the working conditions of the QCM.
To mitigate these problems, we propose a Meacham oscillator for AT-cut 10-MHz quartzes based on a large band differential amplifier with variable gain (VGA) VCA842, by Texas Instruments (Dallas, TX, USA). With this solution, it is possible to adaptively change the open loop differential gain, A v , in Equation (9) to maintain the loop gain as close to 1 as possible, irrespective of the working conditions of the quartz.

Effect of the Phase of the Amplifier
The oscillator working frequency corresponds exactly to the zero-phase frequency of the quartz only in the case of an ideal amplifier; in reality, due to the behavior of a real amplifier, the measured frequency deviates both from the series resonance frequency and from the zero-phase frequency, and the effect of the amplifier nonidealities grows, increasing the acoustic losses.
In particular, the assumption of A v having a 0 • phase around 10 MHz (typical working frequency for QCM) accepted until now is critical; this means that the amplifier has to be chosen with extreme care, because the phase lag of the amplifier is compensated by the phase of the feedback network gain, bringing the quartz to operate far from the series resonance.
The selected amplifier phase is smaller than 6 • at 10 MHz for all the possible gain values, granting satisfactory operations. In this subsection, the effect of the amplifier phase lag is evaluated.
In Figure 5, the oscillator is considered to operate at the optimum gain magnitude so that Equation (9) is satisfied, replacing A v with |A v (f o )|. In this figure, the oscillator working frequency (cyan line) is compared to the quartz series resonance frequency (black dashed line) and to the zero-phase frequency (green line) in the case of R 2 /R 1 = 10 and R f = 200 Ω and taking into a dominant pole the transfer function for the amplifier gain. The comparison points out that the deviation is acceptable also when the fluid is characterized by large losses. In fact, it can be seen that the effect introduced by the amplifier phase lag (cyan curve in Figure 5) is the one providing an overestimation of f 0 • , but since f 0 • itself is an underestimation of f s , the small amplifier phase lag partially compensates the error induced by the large acoustic losses in the liquid and provides a working frequency of the oscillator closer to the series resonance frequency. Obviously, if the phase lag becomes large, the error becomes very high, as can be seen in Figure 5, where the magenta line shows the effect of a large amplifier phase lag.
In particular, the assumption of having a 0° phase around 10 MHz (typical working frequency for QCM) accepted until now is critical; this means that the amplifier has to be chosen with extreme care, because the phase lag of the amplifier is compensated by the phase of the feedback network gain, bringing the quartz to operate far from the series resonance.
The selected amplifier phase is smaller than 6° at 10 MHz for all the possible gain values, granting satisfactory operations. In this subsection, the effect of the amplifier phase lag is evaluated.
In Figure 5, the oscillator is considered to operate at the optimum gain magnitude so that Equation (9) is satisfied, replacing Av with |Av(fo)|. In this figure, the oscillator working frequency (cyan line) is compared to the quartz series resonance frequency (black dashed line) and to the zero-phase frequency (green line) in the case of R2/R1 = 10 and Rf = 200 Ω and taking into a dominant pole the transfer function for the amplifier gain. The comparison points out that the deviation is acceptable also when the fluid is characterized by large losses. In fact, it can be seen that the effect introduced by the amplifier phase lag (cyan curve in Figure 5) is the one providing an overestimation of 0°, but since 0° itself is an underestimation of , the small amplifier phase lag partially compensates the error induced by the large acoustic losses in the liquid and provides a working frequency of the oscillator closer to the series resonance frequency. Obviously, if the phase lag becomes large, the error becomes very high, as can be seen in Figure 5, where the magenta line shows the effect of a large amplifier phase lag. Comparison between the series resonance of an AT-cut 10MHz quartz operating in a Newtonian fluid as a function of the series resistance, ° (which would be the oscillator frequency in the case of an ideal amplifier) and , which is the oscillator frequency accounting for the real amplifier behavior, considering R2/R1 = 10 and = 200 Ω.
Nonetheless, the effect of even a small phase lag becomes very important when operating with a gain that does not satisfy Equation (9). This can be seen extending through simulations, the results obtained from the theoretical analysis presented in the previous subsection concerning the frequency error ef due to the operation with large gains of the amplifier, taking into account also the frequency behavior of the amplifier. As an example, Figure 6 shows the frequency error defined in Equation (15) for an AT-cut 10-MHz quartz, considering the circuit components reported in the legend, as a function the amplifier open loop gain (direct current (DC)value) normalized with respect to the value (DC value), which is the value of the gain needed to satisfy Equation (9). In this case, even a small phase lag of −5.68° introduced by the selected amplifier causes very large errors. Nonetheless, the effect of even a small phase lag becomes very important when operating with a gain that does not satisfy Equation (9). This can be seen extending through simulations, the results obtained from the theoretical analysis presented in the previous subsection concerning the frequency error e f due to the operation with large gains of the amplifier, taking into account also the frequency behavior of the amplifier. As an example, Figure 6 shows the frequency error defined in Equation (15) for an AT-cut 10-MHz quartz, considering the circuit components reported in the legend, as a function the amplifier open loop gain (direct current (DC)value) normalized with respect to the value A vopt (DC value), which is the value of the gain needed to satisfy Equation (9). In this case, even a small phase lag of −5.68 • introduced by the selected amplifier causes very large errors. of the estimation based on Equation (22) is really very high (the error is alway smaller than few Ωs). As an example, Figure 7 shows the error between the "true" valu of used for the simulations of the quartz behavior and the value obtained from Equa tion (22), considering also the amplifier nonideality (as in Figure 6), i.e., accounting for th amplifier phase lag.

Evaluation of the Series Resistance
If the open loop amplifier gain A v = A vopt , which is the value that verifies Equation (9), is known, then the value of R m can be evaluated by inverting the same equation, under the assumption of small losses and ideal amplifier behavior, obtaining: where, due to the low loss assumption, we consider Z Q ( f o ) = R m . Indeed, as diffusely discussed in the previous subsections, the assumptions used to derive Equation (22) are not fully satisfied, and Equation (22) provides only an estimation of R m with a certain degree of uncertainty. To evaluate the quality of this estimation, simulations were performed, taking into account the behavior of the real amplifier in terms of the frequency response and considering also large values of R m . The simulation results showed that the accuracy of the R m estimation based on Equation (22) is really very high (the error is always smaller than few Ωs). As an example, Figure 7 shows the error between the "true" value of R m used for the simulations of the quartz behavior and the value obtained from Equation (22), considering also the amplifier nonideality (as in Figure 6), i.e., accounting for the amplifier phase lag.
Finally, concerning the uncertainty of the estimation related to the uncertainty of the gain estimation, we can write: which, considering operating close to the optimum gain, can be expressed as a function of R m as follows:  Finally, concerning the uncertainty of the estimation related to the uncertainty of the gain estimation, we can write: which, considering operating close to the optimum gain, can be expressed as a function of Rm as follows: Showing that there exists an optimum value of Rm, * = , where the estimation of Rm is robust with respect to the estimation errors of the optimum gain. As a concluding remark, it is shown that the estimation of the series resistance value is found to be significantly more robust than the one of the series resonance frequency and as such, is a very useful parameter, which should be taken into account for the correct interpretation of measurements.

Measurement System Architecture and Gain Adjustment Procedure
The proposed measurement system is composed by the oscillator, an amplitude me ter able to monitor the oscillator output amplitude and a control block that provides gain adjustment with a feedback loop exploiting the measured oscillator output amplitude, as shown in Figure 8.

Showing that there exists an optimum value of
, where the estimation of R m is robust with respect to the estimation errors of the optimum gain.
As a concluding remark, it is shown that the estimation of the series resistance value is found to be significantly more robust than the one of the series resonance frequency, and as such, R m is a very useful parameter, which should be taken into account for the correct interpretation of measurements.

Measurement System Architecture and Gain Adjustment Procedure
The proposed measurement system is composed by the oscillator, an amplitude meter able to monitor the oscillator output amplitude and a control block that provides gain adjustment with a feedback loop exploiting the measured oscillator output amplitude, as shown in Figure 8.
Gain adjustment is provided by a digital controller (the block named "gain adjustment logic" in Figure 8) that executes the iterative dichotomic search of the optimum gain value illustrated in Figure 8b with the objective of minimizing the quantity Each step lasts a time T s , so the search process concluded in N iterations, a measurement sample of the oscillator frequency, f o , and R m is provided after a time equal to t meas = NT s. For the real-time monitoring of adsorption phenomena, t meas must be less than about 2 s.
The search algorithm is based on the two following ideas: • the system works in a predefined range of R m , with R m < R mMAX . • At the start, the gain is set at the maximum value, and this is sufficient for the oscillator to also work in the case of R m = R mMAX (minimum Q-factor), with the oscillator behaving as an unstable (or marginally stable) system with A v ≥ A vopt . • At each search process step, the amplitude of the oscillator output signal is measured and used to detect the presence of persisting oscillations.
The search procedure, described in Figure 8b, is based on reducing the gain on a dichotomic basis, checking for the presence of oscillations with an amplitude larger than a predefined threshold related to the noise floor and taking as f o the frequency measured at Gain adjustment is provided by a digital controller (the block named "gain adjustment logic" in Figure 8) that executes the iterative dichotomic search of the optimum gain value illustrated in Figure 8b with the objective of minimizing the quantity = − ( ( ))) ( ( )) − 1 in N steps.
Each step lasts a time Ts, so the search process concluded in N iterations, a measurement sample of the oscillator frequency, , and is provided after a time equal to tmeas = NTs. For the real-time monitoring of adsorption phenomena, tmeas must be less than about 2 s.
The search algorithm is based on the two following ideas: • the system works in a predefined range of , with < .

•
At the start, the gain is set at the maximum value, and this is sufficient for the oscillator to also work in the case of = (minimum Q-factor), with the oscillator behaving as an unstable (or marginally stable) system with ≥ .

•
At each search process step, the amplitude of the oscillator output signal is measured and used to detect the presence of persisting oscillations.
The search procedure, described in Figure 8b, is based on reducing the gain on a di-oscillator Gain adjustment logic Amplitude/Frequency meter Using N search steps, the gain can be adjusted with a resolution given by , and consequently, using the same procedure adopted to derive the uncertainty as in Equation (24), the resolution of the R m measurements is . Notice that, as usual, accurate measurements need longer measurement times; therefore, the settings in terms of gain resolution and measurement time must be selected as a trade-off.

Measurement System Setup
The system, described in principle in Figure 8, was implemented in the laboratory to test the performance of the proposed oscillator. The implemented measurement set-up is described in Figure 9. In particular, the AT-Cut 10-MHz quartz (gold electrodes having a diameter of 0.6 cm) was placed in an ad-hoc-built measurement chamber that allowed for static measurements in liquid. The measurement chamber, shown in Figure 9b-d, has a cylindrical shape with a 49-mm outer diameter and 50-mm height. The chamber is composed of two main blocks (see Figure 9c,d), the bottom one is a polyvinyl chloride (PVC) material and hosts a proper designed holder and connector for the quartz. The quartz is sandwiched between two conductive O-rings. The top block (cap) is stainless steel and presents a central hole, under which the quartz is placed. The steel cap is grounded by means of spring-loaded contacts and connected to the upper quartz electrode. The quartz upper surface acts as the bottom wall of a measurement well with a diameter of 11.5 mm and a height of 2 mm, guaranteeing the liquid deposition on the quartz surface. All the tests in liquid are performed using the volume of the liquid such that the thickness of the liquid layer is much larger than the extinction depth δ = 2η L ω s ρ L [27]; therefore, the liquid can be seen as a semi-infinite layer.
test the performance of the proposed oscillator. The implemented measurement set-up is described in Figure 9. In particular, the AT-Cut 10-MHz quartz (gold electrodes having a diameter of 0.6 cm) was placed in an ad-hoc-built measurement chamber that allowed for static measurements in liquid. The measurement chamber, shown in Figure 9b-d, has a cylindrical shape with a 49-mm outer diameter and 50-mm height. The chamber is composed of two main blocks (see Figure 9c,d), the bottom one is a polyvinyl chloride (PVC) material and hosts a proper designed holder and connector for the quartz. The quartz is sandwiched between two conductive O-rings. The top block (cap) is stainless steel and presents a central hole, under which the quartz is placed. The steel cap is grounded by means of spring-loaded contacts and connected to the upper quartz electrode. The quartz upper surface acts as the bottom wall of a measurement well with a diameter of 11.5 mm and a height of 2 mm, guaranteeing the liquid deposition on the quartz surface. All the tests in liquid are performed using the volume of the liquid such that the thickness of the liquid layer is much larger than the extinction depth = [27]; therefore, the liquid can be seen as a semi-infinite layer.  The quartz is connected to the developed Meacham oscillator; the gain of the VGA is set through the 16-bit D/A converter of an acquisition board (NI PCI 6052E, D/A) and a conditioning amplifier.
With reference to Figure 4, the Meacham bridge was realized using R 1 = 2.4 kΩ, R 2 = 24 kΩ and R f = 200 Ω (which are the same values considered for the all the simulations whose results were presented in the previous sections).
The amplitude and the frequency of the oscillator output are digitally measured by a LabView VI executed by a PC after having acquired, with the same acquisition board (16-bit A/D), a frequency downshifted version of the signal. The frequency downshift of the oscillator output is obtained using an ad-hoc developed circuit hosting a mixer and a low-pass filter used to mix the oscillator output with a reference signal the with frequency f re f generated by a signal generator AG33220A (Agilent, Santa Clara, CA, USA). The f re f is automatically selected by exploiting a coarse measurement of f o , performed during the set-up phase, with The mixer output signal is acquired with a suitable sampling frequency for the time windows of the duration t acq < T s . The gain adjustment algorithm (Figure 8b) is implemented by the same VI controlling the acquisition and performing the amplitude measurements.
The same VI assesses also the frequency of the acquired signal at each search process step, using an accurate single tone estimation algorithm.
The selected acquisition time is 150 ms, and the optimum gain search procedure consists of a number of steps, N, that can be selected in the range 9-12. The measurement time, t meas , was fixed at 2 s; therefore, each two seconds, the system provides and saves a measurement of f o performed with the optimum gain (obtained at the last step of the gain adjustment procedure) and, for comparison sake, a measurement of f o obtained at the starting step of the gain adjustment procedure (with maximum gain).
The TI VCA842 differential amplifier has a gain range 1/10 < A v <10, but, in this application, we consider A vmin = 1 and a linear analog control of the gain value, obtained by means of a voltage input V G . The gain is related to the control voltage by the following equation: The search strategy resolution, which is considered as the largest source of uncertainty for the estimation of A vopt , is related to the number of steps that are used to adjust the gain. In the presented case, the number of steps, N, used can be selected in the range 9-12; we have, therefore: . . , 12 Exploiting the results of Equation (24), and using the circuit component values, we found that the obtainable resolution for the R m estimation is in the range 2 Ω-4 Ω with N = 9, whereas, with N = 12, the resolution is improved a factor of 8 and lies in the range 0.25 Ω-0.5 Ω.
The VI front-panel is shown in Figure 10.
Exploiting the results of Equation (24), and using the circuit component values, we found that the obtainable resolution for the Rm estimation is in the range 2 Ω-4 Ω with N = 9, whereas, with N = 12, the resolution is improved a factor of 8 and lies in the range 0.25 Ω-0.5 Ω.
The VI front-panel is shown in Figure 10.

Experimental Results
To test the theory discussed in the previous section, fo and Rm were monitored in different experimental conditions for time windows 25-min-long performing the optimum gain search (Avopt); simultaneously, the fo value obtained without using the gain adjustment procedure at the maximum gain AvMAX was also acquired. Table 1 shows the mean deviation ef between the two frequencies (i. e. , = @ − @ ) in the tested different conditions. The experimental measurements were repeated at least five times for each of the considered test cases in the same environmental conditions.
Assuming fo as a good estimation of fs in the case of the adjusted gain, we find an error due to the loop gain module inaccuracy of about 3 kHz in the air (ef = 3377 Hz) and a larger error in the liquid; these results are in accordance with the simulation analysis reported in Figure 6. Moreover, operating at an optimum gain usually increases the stability of the oscillator, especially when the optimum value is far from the maximum gain value.

Experimental Results
To test the theory discussed in the previous section, f o and R m were monitored in different experimental conditions for time windows 25-min-long performing the optimum gain search (A vopt ); simultaneously, the f o value obtained without using the gain adjustment procedure at the maximum gain A vMAX was also acquired. Table 1 shows the mean deviation e f between the two frequencies (i.e., e f = f o @A vopt − f o @A vMAX ) in the tested different conditions. The experimental measurements were repeated at least five times for each of the considered test cases in the same environmental conditions. Table 1. e f , the estimated R m , A vmax /A vopt and standard deviation of the measured frequency (10 min) in different working conditions. Gly20% is a solution of glycerol in pure water with a 20% concentration.
Assuming f o as a good estimation of f s in the case of the adjusted gain, we find an error due to the loop gain module inaccuracy of about 3 kHz in the air (e f = 3377 Hz) and a larger error in the liquid; these results are in accordance with the simulation analysis reported in Figure 6. Moreover, operating at an optimum gain usually increases the stability of the oscillator, especially when the optimum value is far from the maximum gain value.
The standard deviations reported in the table describe the short-time frequency stability provided by the oscillator in different test conditions. Nevertheless, the analysis of repeated measurements showed larger deviations that can be explained by the variations of the influence quantities (e.g., ambient temperature varied approximately in a 5 • C interval during the measurement campaign). The Allan variance was assessed to gain information on the variability/stability of the oscillation frequency over time in different conditions: in air and in water. The standard deviation values of the frequency variations for one hour and one day are: <3 Hz, ≈20 Hz in the air and <20 Hz, ≈50 Hz in the liquid. Figure 11 reports the optimum gain predicted by simulations (solid line) in the same conditions used to derive Figures 5-7 as a function of the series resistance and the optimum gain provided by the adjustment procedure experimentally (markers), showing a very good accordance.  Figure 11 reports the optimum gain predicted by simulations conditions used to derive Figures 5-7 as a function of the series mum gain provided by the adjustment procedure experimentall very good accordance.  Figure 12 reports the results obtained in a 13-h measureme with the quartz placed in the chamber and shows the performanc of the short time stability. It is worth noticing that the constraint ex of the quartz in a chamber for in-liquid applications causes a pertu system accompanied by a modest reduction of the Q-factor. There bility of the measurements in the air results are somewhat worse t for in-gas applications where the QCM fixing is obtained by susp small springs, which cause a negligible mechanical load.  Figure 12 reports the results obtained in a 13-h measurement performed in the air with the quartz placed in the chamber and shows the performance of the system in terms of the short time stability. It is worth noticing that the constraint exerted by the placement of the quartz in a chamber for in-liquid applications causes a perturbation of the resonant system accompanied by a modest reduction of the Q-factor. Therefore, the short-term stability of the measurements in the air results are somewhat worse than the ones obtainable for in-gas applications where the QCM fixing is obtained by suspending the quartz with small springs, which cause a negligible mechanical load. Figure 13 reports the results obtained in a 10-h measurement performed in a solution of pure water and 10% of glycerol. The effect of evaporation of the water during the measurement, accompanied by an increase of the solution viscosity, can be seen both from the decreasing of the frequency shift with time and from the increasing of the optimum gain.
The results obtained in the different conditions are compared in Figure 14, showing that the effect of the gain setting is relevant particularly when considering fluids with a large difference in viscosity.      The results obtained in the different conditions are compared in Figure 14, sho that the effect of the gain setting is relevant particularly when considering fluids w large difference in viscosity. Finally, Figure 15 shows a dynamical test, fo, was monitored starting from pure w (140 μL) and adding, with a micropipette, subsequent doses of 13 μL or 26 μL of a sol of water with 30% glycerol, obtaining solutions with glycerol concentrations of 0%, 6.5%, 8.1%, 9.5%, 10.7% and 11.8%. The transients induced by the perturbation due t drop cast can be seen. The glycerol solution is dropped manually with a micropipette the added solution has a different density and temperature with respect to the one i well, so, when the drop falls (even if we tried to perform this operation as smooth possible), a fluid dynamical transient is expected before the solution diffuses and re a steady state. Due to the manual deposition, the transients obtained with the indiv drop depositions are somewhat different.
These measurements show that the gain successfully adapts itself to the diff measurement conditions, compensating as needed for the change of Rm during mea ments.
Finally, Figure 15 shows a dynamical test, f o , was monitored starting from pure water (140 µL) and adding, with a micropipette, subsequent doses of 13 µL or 26 µL of a solution of water with 30% glycerol, obtaining solutions with glycerol concentrations of 0%, 4.7%, 6.5%, 8.1%, 9.5%, 10.7% and 11.8%. The transients induced by the perturbation due to the drop cast can be seen. The glycerol solution is dropped manually with a micropipette, and the added solution has a different density and temperature with respect to the one in the well, so, when the drop falls (even if we tried to perform this operation as smoothly as possible), a fluid dynamical transient is expected before the solution diffuses and reaches a steady state. Due to the manual deposition, the transients obtained with the individual drop depositions are somewhat different. The relationship between the glycerol concentration, the measured frequency shifts and the estimated resistance was evaluated and reported in Figure 16. It can be seen that, as expected by it being derived from the theory and simulations in the previous section, the effect of using the maximum gain of the amplifier is not a simple offset of the frequency shifts, but it causes an error depending on the working conditions, and as such, it can be hardly compensated. Using the proposed system allows both for reducing the frequency shift error and for adding an accurate measurement of the series resistance, which can be used to assess the viscosity of the interacting liquid. These measurements show that the gain successfully adapts itself to the different measurement conditions, compensating as needed for the change of R m during measurements.
The relationship between the glycerol concentration, the measured frequency shifts and the estimated resistance was evaluated and reported in Figure 16. It can be seen that, as expected by it being derived from the theory and simulations in the previous section, the effect of using the maximum gain of the amplifier is not a simple offset of the frequency shifts, but it causes an error depending on the working conditions, and as such, it can be hardly compensated. Using the proposed system allows both for reducing the frequency shift error and for adding an accurate measurement of the series resistance, which can be used to assess the viscosity of the interacting liquid.

Conclusions
This paper showed the feasibility of a novel measurement system based on Quartz Crystal Microbalances on a Meacham oscillator embedding an amplifier with adjustable gain and on an automatic strategy for gain tuning. It was shown that maintaining the oscillator frequency close to the series resonance frequency of the quartz needs ad-hoc solutions when the quartz operates in-liquid, where the Q-factor is severely reduced. The system uses the optimum gain value to derive the value of the quartz impedance at f0°, which is a good estimation of the series resistance of the quartz. The simultaneous monitoring of the frequency shift and of the series resistance allows for gaining information on the mechanical load type and distinguishing between the viscous loading and inertial loading of the QCM. The proposed system was tested and verified using a laboratory setup, but it can be realized with low-cost components exploiting a microcontroller for the implementation of the gain adjustment algorithm and for frequency downshifted signal acquisition and processing, whereas the reference signal can be easily generated with a Direct Digital Synthesis integrated circuit (DDS IC).

Conclusions
This paper showed the feasibility of a novel measurement system based on Quartz Crystal Microbalances, on a Meacham oscillator embedding an amplifier with adjustable gain and on an automatic strategy for gain tuning. It was shown that maintaining the oscillator frequency close to the series resonance frequency of the quartz needs ad-hoc solutions when the quartz operates in-liquid, where the Q-factor is severely reduced. The system uses the optimum gain value to derive the value of the quartz impedance at f 0 • , which is a good estimation of the series resistance of the quartz. The simultaneous monitoring of the frequency shift and of the series resistance allows for gaining information on the mechanical load type and distinguishing between the viscous loading and inertial loading of the QCM. The proposed system was tested and verified using a laboratory set-up, but it can be realized with low-cost components exploiting a microcontroller for the implementation of the gain adjustment algorithm and for frequency downshifted signal acquisition and processing, whereas the reference signal can be easily generated with a Direct Digital Synthesis integrated circuit (DDS IC).