1. Introduction
The auto-balancing bridge method overcomes the disadvantage of traditional bridge methods that require time-consuming manual adjustment. Meanwhile, it can work at a frequency range from a few Hz to tens of kHz and has high impedance measurement accuracy. The basic auto-balancing bridge method utilizes the virtual short and virtual open features of operational amplifiers (op-amps) to maintain a virtual ground potential at point L and regulate the current balance
, as shown in
Figure 1 [
1,
2]. However, the impedance measurement accuracy of this auto-balancing bridge structure depends on the input characteristics of op-amps, especially the input offset current and input bias current. In practical circuits, the potential at point L cannot be strictly maintained at a constant zero, especially at high frequencies, which can also affect the measurement accuracy. Therefore, this basic auto-balancing bridge method is generally used for measurement frequencies below 100 kHz.
Aiming at the above issue, HP proposed the synchronous demodulation–modulation auto-balancing bridge structure [
3] shown in
Figure 2, which seeks to solve the problem of zero potential drift at point L. This structure utilizes lock-in amplification technology to detect the imbalanced current between the device-under-test (DUT) and a reference resistor, then converts it into a proportional voltage signal. This structure modulates the voltage signal by using the excitation frequency as a feedback signal to adjust the balance state of the bridge. Based on this fully analog circuit implementation bridge balance controller, HP has launched the 4271A precision LCR instrument [
4].
However, realizing such a balance controller using analog circuits requires a large number of components to form a complex circuit, meaning that the reliability, temperature drift, and aging issues of analog devices all become factors affecting the long-term measurement accuracy of the auto-balancing bridge. Thanks to the performance improvements provided by digital signal processing (DSP) chips, balancing controllers for auto-balancing bridges are gradually adopting digital implementations. By deploying complex and high-performance digital signal processing algorithms and advanced control algorithms in DSP chips, it is possible to achieve optimal matching of these balance controllers’ convergence accuracy and speed.
Hu et al. designed a bridge balancing control method based on the improved Brent algorithm by utilizing a numerical roots solving algorithm for nonlinear equations [
5,
6]. This method transforms the bridge balance control problem into an equation roots finding problem, and realizes high-precision impedance measurement by optimizing the iterative solution process of Brent’s algorithm in the complex domain. Zhu [
7] and Xie [
8] both designed direct current (DC) auto-balancing bridges based on a fuzzy controller for resistance measurement. These methods have high measurement accuracy for pure resistance measurement, but lack the ability to detect the imaginary impedance of inductive and capacitive devices. Ai et al. [
9] designed a double excitation auto-balancing bridge method for inductance measurement. This method utilizes the steepest descent method to design the bridge balance control algorithm, and also uses the all-phase Fast Fourier Transform (apFFT) algorithm to process the unbalanced current data acquired by the analog-to-digital converter (ADC) in order to improve convergence accuracy. Cai et al. proposed a bridge balance control method combining the two-step excitation method (TSEM) and the incremental iteration method (IIM) [
10] to reduce the influence of the op-amp input impedance on the auto-balancing bridge. Li et al. proposed a bridge balance control method based on the secant method [
11]; however, the secant method has the possibility of divergence. Luo et al. proposed a bridge balance control algorithm with the improved Brent algorithm for the application of automatically balanced bridges in complex impedance measurements [
12]. Their approach further optimizes the performance of the Brent algorithm in the complex domain. Li et al. proposed a bridge balance controller based on the least mean square (LMS) adaptive filtering algorithm [
13]. Their method considers the magnitude of the imaginary and real parts of the adjustable reference voltage source as the filter coefficients, then uses the bridge imbalance current as the input error to regulate bridge balancing. This iterative LMS-based balance control method is easily implemented on field-programmable gate array (FPGA) chips to improve computational efficiency. However, it requires point-by-point computation of ADC sample data, making the balance controller computationally intensive. Malik et al. designed a time domain-based automatic bridge balance control method for capacitance measurement of capacitive sensors [
14]. This method converts the phase difference between the bridge output signal and the reference signal into a time interval and performs self-balancing control of the bridge based on proportional–integral (PI) control, using the time interval as the input and the digital-to-analog converter (DAC) amplitude as the output.
The impedance of a DUT is usually complex. As shown in
Figure 2, digital implementation of the auto-balancing bridge based on synchronous demodulation and modulation structure requires closed-loop control of both the real and imaginary parts of the unbalanced current in order to maintain the balanced state of the bridge. Therefore, the auto-balancing bridge is regarded as a two-dimensional control system. Under high-frequency excitation, the imaginary impedance of the reference resistor generated by the parallel equivalent capacitance and series equivalent inductance cannot be ignored, leading to coupling between the two control channels and downgrading the balance performance of the bridge balance controller. To solve this problem, we first analyzed the coupling effect of the imaginary impedance of the reference resistor on the dual unbalanced current control channels. On this basis, a feedforward decoupling module is proposed in
Section 2 to decouple the unbalanced current control channels into two independent control channels. Then, a bridge balance control algorithm based on a fuzzy proportional–integral–derivative (fuzzy-PID) controller is proposed in
Section 3 to improve the convergence accuracy of the auto-balancing bridge. Through simulation analysis and hardware verification, it is proven that the proposed bridge balance control algorithm can satisfy the requirements of high-accuracy impedance measurement.
2. Analysis of Auto-Balancing Bridge Control Model and Decoupling Method
The simplified structure of the digital auto-balancing bridge is shown in
Figure 3. The current
is formed by the output voltage
of a fixed sinusoidal voltage source on the impedance
of a DUT. The reference current
is formed by a reference sinusoidal voltage source
, with the amplitude and phase controlled on the reference resistor
R. The frequencies of the fixed voltage source
and controllable reference voltage source
are both
f. The unbalanced current
is the difference between the two currents. The aim of the bridge balance control algorithm is to maintain the unbalanced current
at zero by adjusting the amplitude and phase of the reference voltage source
.
The unbalanced current
is converted to a voltage signal
by a trans-impedance amplifier (TIA), where
G is the gain of the TIA. The gain
G does not affect the analysis of the bridge balance control algorithm, and is ignored in the subsequent analysis. Due to the structural characteristics of the TIA, the point
L is at the ground potential. Therefore, the theoretical unbalanced current can be expressed as
By using ADC and digital lock-in amplification method to detect the sinusoidal unbalanced current
, a set of orthogonal components
and
can be obtained. Then, the unbalanced current can be expressed by
. In the same manner, the unbalanced current
in Equation (
1) can be rewritten in the complex domain as follows:
where the subscripts
r and
i denote the real and imaginary parts of the corresponding variables, while
and
are the respective modulus values of the impedances of the reference resistor and DUT. From Equation (
2), it can be seen that the existence of the imaginary part
of the reference resistor leads to coupling in the real and imaginary control channels between the unbalanced current
and controllable reference voltage source
. The structure of this dual-variable control system is described by Equation (
2) and shown in
Figure 4.
In
Figure 4,
G is the current–voltage (IV) conversion gain of the TIA. In addition, the transfer function matrix
G is determined by the reference resistor
R, as shown in Equation (
3).
Combining the state equation of the unbalanced current
in (
2) with the structure diagram in
Figure 4, it can be seen that the digital auto-balancing bridge is a dual-input and dual-output control system. The transfer functions
and
generated by the imaginary impedance
of the reference resistor introduce coupling between the real and imaginary control channels. Moreover, due to this correlation between the real and imaginary control channels, adjusting the reference voltage output of one channel is equivalent to injecting a time-varying disturbance into the other channel, which reduces the stability and convergence accuracy of the bridge balance control.
Therefore, it is necessary to design a suitable decoupling compensation module in order to transform the coupled dual-variable bridge balance control system into two independent single-variable control loops. The feedforward compensation module [
15] designed in this paper is shown in
Figure 5. The compensation module regards the transfer functions
and
as disturbances and inserts compensations
and
between the controller outputs
and
and the controlled object, that is, the current flowing through the reference resistor
R.
Denoting the feedforward decoupling matrix as
D, the state function (
2) can be rewritten as follows:
To realize the decoupling of the real and imaginary control channels, the decoupling matrix
D in Equation (
4) needs to satisfy the following diagonal matrix form:
Therefore, the feedforward decoupling modules
and
need to satisfy
Then,
and
can be calculated by
After the feedforward decoupling compensation, the state equation in (
2) can be rewritten as shown below.
For the auto-balancing bridge, the reference resistor
R is a known device, and its real impedance
and imaginary impedance
can be obtained through calibration. The specific values of the feedforward compensator
and
can be calculated according to Equation (
7). The equivalent bridge balance control system after decoupling compensation is shown in
Figure 6.
3. The Variable Domain Fuzzy-PID Bridge Balance Control Algorithm
According to the principal diagram of the auto-balancing bridge in
Figure 3 and the structure of its control system in
Figure 4, it can be seen that the bridge balance controller regards the reference resistor
R as the controlled object and considers the adjustable reference voltage
and the current
flowing through
R as the control quantity and the output quantity, respectively. The unknown current
generated by the fixed voltage source
and the DUT
is regarded as the target value of the control system.
For the bridge balance controller, the target current cannot be directly obtained; only the unbalanced current is known. The nonlinear characteristics of the DAC, ADC, and other analog chips in bridge circuits cannot be accurately modeled, making it difficult to apply model-based control algorithms to the bridge balance controller. To maintain the balanced state of the bridge, this paper proposes a fuzzy-PID bridge balance control algorithm. The fuzzy-PID controller can achieve fast and stable control without relying on the precise model of the controlled object, and the controller parameters can be adaptively adjusted according to different unbalanced currents.
The principle of the fuzzy-PID controller for bridge balance control is shown in
Figure 7. The actuator represents the DAC and analog filter circuits used to generate the reference voltage
. The controlled object is the reference resistor
R and the sensor is composed of the TIA and digital lock-in amplifier (DLIA), which detects the unbalanced current
and converts it to a digital sequence. The unbalanced current
and its change rate
are used as the input of the fuzzy controller, which is a part of the fuzzy-PID controller. Following the fuzzification, fuzzy reasoning, and defuzzification steps, the fuzzy controller outputs the dynamic adjustment values
,
, and
for the PID parameters. Then, the fuzzy-PID controller can be defined as follows:
In Equation (
9),
,
, and
are the initial PID parameters, while
,
, and
are scale factors for PID parameters converting from the fuzzy domain to the exact domain. Using Equation (
9), the PID parameters undergo dynamic adaptive adjustment by the fuzzy controller, which can meet the different requirements of a variety of unbalanced currents caused by different DUTs.
3.1. Fuzzification and Membership Function
Based on fuzzy control theory, the fuzzy domain of both the input variables
e and
and output variables
,
, and
of the fuzzy controller is divided into seven fuzzy subsets:
Their corresponding symbols are
The basic domain, fuzzy domain, and corresponding quantization factors of each input and output variable are summarized in
Table 1.
In
Table 1, the quantization factor
of the input variables
e or
is calculated by Equation (
12), which is used to achieve scale transformation from the basic domain to the fuzzy domain. In this equation,
and
are the respective upper and lower bounds of the fuzzy domain, while
and
are boundaries of the basic domain. For the output variables
,
, and
, the quantization factor
is the reciprocal of
, as shown in Equation (
13).
For the fuzzy domain variables
E and
of the input variables
e and
, a combination of the Gaussian membership function and triangle membership function is adopted, as shown in
Figure 8a. The outer two fuzzy subsets (NB and PB) use Gaussian membership functions to reduce the possibility of excessive adjustment caused by large errors in the initial stage. For the other five fuzzy subsets (NM to PM), the triangle membership function is used to ensure that the controller retains sufficient control strength even with small input values. For the output variables
,
, and
, the membership functions of their corresponding fuzzy variables
,
, and
are triangle membership functions, as shown in
Figure 8b.
3.2. Fuzzy Control Rules and Defuzzification
In the fuzzy-PID controller, the three outputs , , and work together to adjust the convergence performance of the bridge balance control algorithm according to the input unbalanced current e and its change rate . Therefore, it is necessary to establish suitable fuzzy control rules for parameter tuning of , , and under different inputs e and . The basic requirements are summarized as follows:
When is large, the should also be large in order to accelerate the convergence speed, while the should be zero to avoid output saturation.
When is a medium value, the and should both be small in order to reduce the overshoot of a controller; however, the should be a suitable value in order to maintain the convergence speed.
When is small, both the and should be large in order to ensure the steady-state accuracy of the controller, while the should be inversely proportional to to avoid oscillation of the controller.
According to these tuning requirements, the fuzzy control rules [
16] are summarized in
Table 2.
The outputs
,
, and
derived from the fuzzy control rules in
Table 2 are still fuzzy variables. The PID controller only allows exact values after defuzzification. The center of gravity method is used for defuzzification, as it has the advantages of high accuracy and high computation efficiency. The expression is as follows:
where
n = 7 is the number of fuzzy subsets,
represents the elements in the fuzzy domain, and
and represents their corresponding membership degrees. Using Equation (
14), the exact values of
,
, and
used in the PID controller expression (
9) can be obtained.
3.3. Variable Domain Mechanism
Although the fuzzy-PID controller can improve control performance by dynamically adjusting the PID parameters, the control effect is affected by the domain settings. For the bridge balance controller, the unbalanced current error input
e is determined by the impedance of the DUT, and its initial value is unknown. The basic domains of both
e and
shown in
Table 1 are their maximum range. Therefore, the variable domain mechanism [
17] is introduced. Under the condition of a fixed number of membership functions and fuzzy rules, the initial fuzzy domain of one of the input or output variables can be adjusted to
using a scaling factor
.
As shown in
Figure 9, the membership functions change synchronously under the influence of the domain scaling factor
. When the fuzzy domain shrinks, the number of fuzzy rules near the origin point increases, effectively improving the control accuracy under small errors. When the fuzzy domain expands, it can cover a larger input range. The variable domain mechanism can effectively reduce the difficulty of the fuzzy-PID controller in determining the initial fuzzy domain for each input and output variable. During the bridge balance control progress, the fuzzy domain is dynamically scaled according to the unbalanced current
and its change rate
.
The structure of the variable-domain fuzzy-PID controller is shown in
Figure 10. This structure is realized by multiplying a domain scaling factor with the input variables
e and
and output variables
,
, and
, as represented in Equation (
15).
In Equation (
15),
and
are the domain scaling factors of the input variables
e and
, while the
is the domain scaling factor of output variables. In addition,
,
,
,
, and
are the initial quantization factors shown in
Table 1. The scaled fuzzy domain is shown in Equation (
16).
To ensure that the fuzzy domain can achieve moderate expansion and contraction according to the inputs, the scaling factors
and
should be a function of the input variables
e and
. The scaling factor
is defined as follows:
The
i represents the input
e or
,
, and
is a small positive number that ensures
. The scaling factor
is defined as
where
and
.
Based on the feedforward decoupling module and the variable-domain fuzzy-PID controller, the structure of the bridge balance controller is shown in
Figure 11. The domain scaling factor modules are used to calculate the factors
,
, and
for each control channel.
4. Implementation of the Bridge Balance Control Algorithm
The bridge balance control algorithm was implemented in a circuit board designed by our laboratory, as shown in
Figure 12a. In
Figure 12a, the unbalanced current detection module consists of a TIA and several analog filters. The IV conversion gain G of the TIA is determined by its feedback resistor. To detect a wide range of unbalanced currents, a resistor array is used as the feedback resistor of the TIA. Different current ranges are achieved by switching a resistor through an analog switch. The values of the resistor array and the corresponding current measurement range are shown in
Table 3. By controlling the analog switch to choose different feedback resistors, it is possible to maintain the voltage output of the TIA within the range of 0.05 mV to 1 V.
The sine wave generator module is used to generate both the fixed sinusoidal voltage
and controlled reference voltage
. The control board is used to implement the proposed variable-domain fuzzy-PID bridge balance control algorithm. The AMD ZYNQ7020 SOC chip is used to realize the proposed bridge balance control algorithm, which includes an ARM-based processor called the PS core and an FPGA resource called the PL core. The functional block diagram inside the control board is shown in
Figure 12b. In the PL core, the DLIA is used to demodulate the real
and imaginary
parts of the unbalanced current. The timer module is used to determine the balance control period
T, which is defined by
In Equation (
19),
N is the number of unbalanced current signal cycles used by the DLIA to calculate
and
, while
is the excitation frequency.
The IV gain setting module is used to adjust the feedback resistor of the TIA circuit. As shown in
Table 3, each feedback resistor has limited unbalanced current measurement accuracy. When the bridge gradually approaches the balanced state, the feedback resistor should be switched to a large value in order to satisfy the unbalanced current measurement accuracy. Then, the V-I conversion module inside the PL core converts the voltage acquired by the TIA into current by numerically dividing the data by TIA gain G. This can ensure that the unbalanced current data input to the bridge balance controller are both continuous and unaffected by TIA circuit gain switching.
The reference resistor setting module is used to select an appropriate reference resistor
R at the initial stage of bridge balance control. For a specific reference resistor
R the balance current
and its resolution
flowing through the reference resistor
R have boundaries due to the limited output voltage
and voltage resolution
of the controllable reference voltage
. Thus, it is necessary to choose an appropriate reference resistor for different DUTs. In our hardware design, the output range of the controllable voltage source
is 20 m
∼10
and its voltage resolution is 0.1 m
. The corresponding reference resistors are shown in
Table 4.
The parameter tuning module and the serial port module are used to automatically tune the PID parameters
,
, and
, as shown in Equation (
9), along with the parameters
,
,
, and
of the domain scale factors
,
, and
, as shown in Equations (
17) and (
18). The particle swarm optimization (PSO) algorithm is used to optimize these controller parameters. The PSO algorithm is a population-based optimization algorithm proposed by Eberhart and Kennedy [
18] which is based on the foraging behavior of birds. The PSO algorithm has a population with
M particles; each particle has a position vector
representing a potential optimization solution and a velocity vector
. The length
L of both the position vector
and velocity vector
is equal to the number of optimized variables. Then, a fitness function
is used to evaluate the performance of each particle
i. The personal best position
of each particle
i and the global best position
of the whole population are determined by the fitness function
. Afterwards, the velocity vector
and the position vector
are updated by
where
is the iteration index,
T is the total update number, and
and
are random numbers uniformly distributed between 0 and 1. The learning factors
and
respectively determine the degree to which the current update of particle
i is influenced by its personal best position
and the global best position
. In addition,
is the inertial weight, which is used to balance the global search ability and local search ability. A large value of
means that the global search ability is better and the PSO algorithm has fast convergence speed; on the contrary, a small value of
means that the local search ability is better and the PSO algorithm has high convergence accuracy [
19]. Thus, we use a linear decreasing form of the inertial weight:
At the beginning of the iteration procedure, the PSO algorithm has a large inertial weight , which helps to improve the global search ability and convergence speed. As the iterations progress, the value of decreases linearly, giving the PSO algorithm better local search ability to improve its convergence accuracy.
The optimized controller parameters are encoded as position vectors, as shown in Equation (
22):
where the superscripts
r and
i represent the real and imaginary control channels, respectively. The fitness function for evaluating the performance of the controller parameters is constructed based on the integral of time-weighted absolute error (ITAE) criterion [
20]:
where
and
are the unbalanced currents recorded by the parameter tuning model during the convergence process of the bridge balance control algorithm. Due to limited computing resources, the PSO algorithm is implemented on a desktop computer using the Python programming language (its version is 3.12), and data transmission during the process of optimizing the parameters is achieved using the serial port module. Finally, the amplitude conversion module is used to convert the complex form reference voltage
into the sinusoidal amplitude
and phase
. The direct digital synthesis (DDS) module in the PL core generates the sinusoidal reference voltage
with amplitude
A and phase
, which drives the bridge to the balanced state. Based on the functional block diagram shown in
Figure 12b, the flowchart of the proposed bridge balance control algorithm is shown in
Figure 13.