Adaptation of Log Domain Second Order Filters Implemented by Floating Gate MOSFETs Yiming Zhai and Pamela A. Abshire Department of Electrical and Computer Engineering University of Maryland College Park, MD 20742, USA ymzhai, pabshire@umd.edu Least Mean Square (LMS)-based adaptation algorithms. LMS methods are well suited to implementations of FIR filters. In this paper we present alternative methods based on Lyapunov stability well suited for adaptive control of Infinite Impulse Response (IIR) filters. IIR filters offer the advantage of smaller filter structures and fewer filter coefficients than FIR filters in order to model plants of similar complexity. This work extends our previously reported design of an adaptive log domain first order low-pass filter [7]. We derive novel robust control laws based on the Lyapunov method for a second order filter and simplify them for compactness and VLSI-friendliness in the implementation of the learning rules. The structure of the second order filter using floating gate MOSFETs is also a new approach based on the first order low-pass filter design. Section II develops robust learning rules for adapting the quality factor and time constant of a log domain second order filter. Section III describes the implementation of the log domain filter structure and integration of the learning rules for quality factor and time constant. Section IV presents simulation results of the adaptive system for a variety of inputs which are suitable for model reference estimation. Section V summarizes this work. Abstract—We describe an adaptive log domain second order filter with integrated learning rules. The system is implemented using multiple input floating gate transistors to realize on-line learning of quality factor and time constant. We use adaptive dynamical system theory to derive robust control laws for both quality factor and time constant adaptation in a system identification task. The log domain filters adapt to estimate the quality factor and time constant of a reference filter accurately and efficiently as the parameters of the reference are changed. We present simulation results for 0.5µm technology which demonstrate that adaptation occurs within milliseconds. The filter consumes 2µW and the entire system consumes 10µW. I. INTRODUCTION Adaptive signal conditioning offers the opportunity to reject noise and improve signal quality dynamically in a variety of complex and demanding applications. To achieve this, control laws must use limited information to adjust parameters of the adaptive system in directions that produce robust system adaptation. In this paper log domain filter architecture and floating gate MOSFETs are combined to realize accurate and stable learning rules for the system parameters of a bandpass filter, quality factor and time constant. Several groups have described filtering applications based on floating gate MOS circuits. Hasler et al. [1] described the Auto-zeroing Floating Gate Amplifier (AFGA) and its use in bandpass filter structures with very low frequency response capability. Fernandez et al. [2] described a 1V micropower lowpass filter implemented using floating gate transistors. Rodriguez-Villegas et al. [3] designed a log domain integrator based on floating gate transistors. Minch [4, 5, 6] developed circuits and synthesis techniques using Multiple Input Translinear Elements (MITEs) for a variety of signal processing applications. Abshire et al. [7] reported an adaptive log domain first order low-pass filter using floating gate transistors. Few groups have reported integrated analog adaptive filters. Juan et al. [8] and Stanacevic and Cauwenberghs [8, 9] have designed analog transversal Finite Impulse Response (FIR) filters that include adaptation of weights. Both Juan et al. and Stanacevic and Cauwenberghs use 0-7803-9197-7/05/$20.00 © 2005 IEEE. II. DERIVATION OF LEARNING RULES We describe an adaptive filter which addresses the classical problem of system identification depicted in Fig 1. Figure 1: The system identification problem A tunable second order filter is used as the model to identify an unknown system. An input signal is applied to both an unknown system (plant) and an adaptive estimator (model) 79 system. Control laws are designed using observable outputs to adjust the parameters of the estimator so as to ensure stability of the learning procedure. V& (e) = e&1&e&1 + B 2e1e&1 + e2 e&2 + e3e&3 = − ABe&12 + e2 (− Be&1 x&2 + e&2 ) + L &x& + e3 e&1 2 − B( x2 − D ) + e&3 B The frequency response of the second order filter is described by the following equation: I out ( s) = I in ( s) ⋅ τ ⋅s 1+ 1 ⋅τ ⋅ s + τ 2 ⋅ s 2 Q + I dc ⋅ By choosing the following control laws: 1 1+ 1 ⋅τ ⋅ s + τ 2 ⋅ s 2 Q we find that the candidate Lyapunov function has a negative time derivative: While the bandpass function eliminates DC components from the input, log domain filters are inherently current mode circuits with strictly positive currents. Thus we must introduce an output bias, denoted here as a constant current Idc which is independent of the input signal [10]. V& (e) = − ABe&12 If we further assume that x2 is a sinusoidal signal, we find that − &x&2 can be expressed as the product of (x2 − D ) and a positive scalar. Thus we can incorporate the second order derivative in the learning rule of e&3 into the term (x2 − D) . These rules may be simplified further since in current mode log domain filters the quality factors and time constants are positive. The positive scalars in the rules affect the rates of the adaptation, but not the direction. Thus the rules above can be simplified: We describe the unknown plant and adaptive model filter using the state-variable representation: &x&1 = − B 2 x1 − ABx&1 + Bu& + B 2 D plant &x&2 = − B 2 x2 − A B x&2 + B u& + B 2 D model where x1 and x2 are the plant and model outputs, A and A are the reciprocals of plant and model quality factors, B and B are the reciprocals of plant and model time constants, u is the input to both filters, and D is the output bias of both outputs. output error e2 = A − A (1/quality factor) error e3 = B − B (1/time constant) error We estimate the reciprocal quality factor by integrating the product of the output error derivative and model output derivative and estimate the reciprocal time constant by integrating the product of the output error derivative and model output without bias. III. &e&1 = &x&2 − &x&1 e&2 = A& e&3 = B& We cannot control the dynamics of the output error since that depends on the unknown input u, but we can derive adaptive laws that specify the dynamics of the parameter errors so that the estimator learns the behavior of unknown system. I1 = I 0 e K (V1 +Vr ) = I in The direct Lyapunov method is employed to derive appropriate learning rules [11]. We must find a scalar function which satisfies three conditions: positive definite, negative definite time derivative and radially unbounded. For the adaptation of the second order bandpass filter we consider the candidate Lyapunov function: V (e ) = ( 1 2 e&1 + B 2e12 + e22 + e32 2 CIRCUIT IMPLEMENTATION A. Implementation of Log Domain Bandpass Filters We implement the log domain bandpass filter using dynamic MITE networks. The circuit in Fig 2 is used both as the unknown plant and the estimated model with labels in parentheses representing model parameters. In subthreshold operation MITE current is an exponential function of the summed inputs. We seek control laws which drive all errors toward zero with time, so we focus our development on the dynamics of the error system: e&1 = x&2 − x&1 e&3 ∝ e&1 ( x2 − D ) e&2 ∝ e&1 x&2 An error system is constructed in order to evaluate the performance and stability of the adaptation. e1 = x2 − x1 &x& e&3 = e&1 B ( x2 − D ) − 2 B e&2 = Be&1 x&2 I 4 = I 0e K (V3 +V4 ) I 7 = I 0e K (V4 +V5 ) = Iτ I 2 = I 0 e K (V1 +V2 ) I 5 = I 0e K (V2 +V5 ) I8 = I 0e I 3 = I 0 e K (V2 +V3 ) = Iτ K (V4 +V6 ) I 6 = I 0 e K (V5 +Vr ) I 9 = I 0 e K (V6 +Vr ) = I dc Kirchoff’s Current Law (KCL) is applied at the capacitive nodes to obtain the following relationships: and I 8 = I 7 + CV&4 M6, M7, M8 and M9 form a translinear loop: Iτ / Q + I 3 = I 2 + CV&2 I 8 = I 7 I dc / I 6 ) I 7 = I 7 I dc / I 6 − CV&4 (1) M3, M4, M7 and M5 form a translinear loop: I 3 = Iτ2 / I 7 This function satisfies the first and third conditions. To evaluate the second condition, we evaluate the temporal derivative of the candidate function: M1, M2, M5 and M6 form a translinear loop: I 2 = I in Iτ / I 6 = Iτ / Q + I 3 − CV&2 = Iτ / Q + Iτ2 / I 7 + CI&6 / KI 6 So the input current can be expressed as 80 circuit of Fig 3(c) in order to compute I d 3 − I d 4 ∝ x& 2 , since I& f = I f KV&5 and I f is a positive current which only affects (2) I in = I 6 / Q + Iτ I 6 / I 7 + CI&6 / KIτ Let us consider an intermediate current I x : I x = I τ I 6 / I 7 = I τ e K (Vr −V4 ) I&x = − I x KV&4 the rate of adaptation. Iτ / I x = I 7 / I 6 If we substitute equation (1) for I 7 , Iτ I 6 = I x ( I 7 I dc / I 6 − CV&4 ) = I x ( Iτ I dc / I x + CI&x / KI x ) C I&x / K = Iτ ( I 6 − I dc ) I x = KI τ ( I 6 − I dc ) / sC (3) and further substitute the new expression for Ix into equation (2), we obtain I in = I 6 / Q + KIτ ( I 6 − I dc ) / sC + sCI 6 / KIτ ⇒ I6 = I in ( sC / KIτ ) + I dc 1 + ( sC / KIτ ) / Q + ( sC / KIτ ) 2 which is a second order transfer function with quality factor Q and time constant τ=C/KIτ. We can easily tune the bias current Iτ and bias voltage VQ to change the time constant and quality factor respectively, thus changing the central frequency and shape of the filter. Figure 3: (a) and (c) are circuits for computing temporal derivative of voltage. (b) is the circuit for converting output current difference to a voltage. Both the learning rules for quality factor and time constant require a four quadrant multiplication, implemented using the MITE circuit shown in Fig 4(a). The labels in parentheses represent the adaptation circuits for the time constant. Circuits for integrating the learning rules are shown in Fig 4(b) and (c). Note that VQ can be higher than Vdd, so the voltage Vee in Fig 4(b) is higher than Vdd. Figure 2: Log domain MITE network for a second order filter used for both plant and filter. Labels in parentheses refer to filter variables, the rest to the plant. B. Implementation of Learning Rules The behavior of plant and model filters is controlled by two parameters: quality factor and time constant. We have derived learning rules for the reciprocals of these parameters in Section II. The inputs to the learning rules are the temporal derivative of the output difference, the temporal derivative of the model output and the model output excluding bias. Fig 3(c) is a circuit for computing temporal derivative. We use it to implement both the derivatives of the output difference and the model output. Figure 4: (a) Circuit for computing four quadrant multiplication. (b) Integrator circuit for quality factor adaptation. (c) Integrator circuit for time constant adaptation. IV. SIMULATION RESULTS The circuit is simulated with HSPICE using BSIM3v3 model for a commercially available 0.5µm technology. The technique in [12] is used to avoid floating-node problems in the simulation. The voltage source Vdd for both filters is 1.5V and the voltage sources Vcc and Vee required for adaptation are both 2.5V. We use a sine wave (Fig 5) and superposition of sine waves (Fig 6 and 7) as inputs. The temproal derivative circuit is a wide range OTA that operates as a voltage follower with a capacitor connected to the output as shown in Fig 3(a). The output current is Id=Id1Id2 in Fig 3(c). The larger the gain is , the more accurate the calculation. So we operate the input devices near threshold for large transconductance. We use the circuit of Fig 3(b) to compute the filter output error and convert it to a voltage, then use the circuit of Fig 3(c) to realize the derivative I d 1 − I d 2 ∝ e&1 . We also use the intermediate node voltage V5 of the model filter in Fig 2 as the input to the derivative Fig 5 shows adaptation with a 10kHz sine wave as Q and τ vary. The sine wave is biased at 100nA with an amplitude of 60nA. Fig 5(a) shows VQ and VQ_est. VQ is varied as 1.47V from 0-2ms, 1.45V from 2-6ms and 1.46V from 6-10ms. Fig 5(b) shows Vτ and Vτ_est, which correspond to different values of Iτ. Iτ is varied as 40nA from 0-4ms, 45nA from 4-8ms, and 81 filter using a log domain topology which has wide tuning range and large dynamic range and capability for high frequency operation. Further, we have developed robust learning rules for system identification based on the direct Lyapunov method for the second order filter. We implement these learning rules using MITE structures, which is compact and elegant although necessarily more complex than the design of the adaptive first order low pass filter. 35nA from 8-10ms. Fig 5(c) is the error between the plant and filter output. For all changes in VQ and Vτ, VQ_est and Vτ_est track the new values accurately. The error converges to zero when VQ_est converges to VQ and Vτ_est converges to Vτ. The adaptation rate depends on signal strength, currents IQa and Iτa, and capacitances CQ and Cτ. We are in the process of fabricating these circuits, experimentally validating these results and extending this work to more comprehensive adaptive filter structures. ACKNOWLEDGMENT We thank the MOSIS service for providing chip fabrication through their Educational Research Program. These circuits will be used to teach an undergraduate course in mixed signal circuit design. We thank Paul Hasler for stimulating discussions at the Telluride Neuromorphic Eng Workshop 2004. Y.Z. is supported by Laboratory for Physical Sciences. This work is supported by an NSF CAREER Award (NSF-EIA-0238061). Figure 5: 10kHz sine wave input signal: (a) Quality factor adaptation. (b) Time constant adaptation. (c) Output error. Next we show adaptation when the input signal is a mixture of sine waves. In Fig 6, we use a combination of sine waves at 10kHz, 20kHz, 40kHz and 80kHz as input. In Fig 7, we use a summation of 6 sine waves, whose frequency ratio is an irrational number π / 2 , spanning from 10kHz to 96kHz. In each case, VQ_est accurately tracks VQ and Vτ_est tracks Vτ, and the output error approaches zero when adaptation is finished. REFERENCES [1] Hasler, P., Minch, B.A. and Diorio, C., "An Autozeroing FloatingGate Amplifier," IEEE Transactions on Circuits and Systems II: Analog and Digital Signal Processing, vol. 48, pp. 74-82, 2001. [2] Fernandez, R., Lopez-Martin, A.J., de la Cruz, C.A., Carlosena, A., “A 1V micropower FGMOS Log-Domain Filter,” International Conference on Electrons, Circuits and Systems, 2002, vol.1, pp381384 [3] Rodriguez-Villegas, E., Yufera, A., Rueda, A., “A 1-V micropower log-domain integrator based on FGMOS transistors operating in weak inversion,” IEEE Journal of Solid-State Circuits, 2004, Vol. 39 , pp.256-259 [4] Minch, B.A., Hasler, P. and Diorio, C., "Multiple-Input Translinear Element Networks," IEEE Transactions on Circuits and Systems II, vol. 48, pp. 20-28, 2001. [5] Minch, B.A., "Multiple-Input Translinear Element Log-Domain Filters," IEEE Transactions on Circuits and Systems II: Analog and Digital Signal Processing, vol. 48, pp. 29-36, 2001. [6] Minch, B.A., "Synthesis of Static and Dynamic Multiple-Input Translinear Element Networks," in IEEE Trans. Circuits and Systems I, 2004 vol. 51, pp.409-421 [7] Abshire, P.A., Wong, E.L., Zhai, Y. and Cohen, M.H., "Adaptive Log Domain Filters Using Floating Gate Transistors, " Circuits and Systems, 2004. ISCAS '04. Proceedings of the 2004 International Symposium, vol: 1 , 23-26, 2004 [8] Juan, J.-K., Harris, J.G. and Principe, J.C., "Analog Hardware Implementation of Adaptive Filter Structures," presented at International Conference on Neural Networks, 1997. [9] Stanacevic, M. and Cauwenberghs, G., "Charge-Based Cmos Fir Adaptive Filter," presented at Midwest Symposium on Circuits and Systems, 2000. [10] Edwards, T.R., "Time-Frequency Acoustic Processing and Recognition: Analysis and Analog VLSI Implementations," Chapter 3, PhD dissertation, 1999 [11] Narendra, K.S. and Annaswamy, A.M., Stable Adaptive Systems. Prentice-Hall, New Jersey, 1989. [12] Rahimi, K., Diorio, C., Hernandez, C., Brockhausen, M.D., "A Simulation Model for Floating-Gate Mos Synapse Transistors," presented at ISCAS, 2002. Figure 6: Four harmonic sine waves input signal: (a) Quality factor adaptation. (b) Time constant adaptation. (c) Output error. Figure 7: Six geometrically spaced sine waves from 10-96kHz input signal: (a) Quality factor adaptation. (b) Time constant adaptation. (c) Output error. V. CONCLUSIONS We have developed a circuit design approach for log domain adaptive filters that extends earlier work from adaptation of first order low-pass filters to a second order structure. We designed a novel structure for a second order 82