Analog Circuit Behavioral Modeling - Semantic Scholar

Report 3 Downloads 90 Views
Analog Circuit Behavioral Modeling via Wavelet Collocation Method with Auto-Companding* Jian Wang1, Jun Tao1, Xuan Zeng1, Charles Chiang2 and Dian Zhou1 1

ASIC & System Lab., Microelectronics Dept., Fudan University, Shanghai 200433, China P. R. 2 Synopsys Inc., Mountain View, CA 94043, USA

Abstract - In this paper, we propose an auto-companding technique for the analog behavioral modeling via wavelet collocation method. The companding function is automatically constructed according to the singularities of the input-output function of the circuit block. Such a general-purpose technique can be applied for the automatic modeling of arbitrary building block of arbitrary input-output function. Moreover, compared with the published modeling approaches, this method works more efficiently in reducing both the modeling error and the number of basis functions in wavelet expansion.

I.

Introduction

Behavioral modeling of analog circuits has become increasing important, as the remarkable advancing of mixed-signal design. In top-down design, behavioral models help designer to rapidly select proper system architectures and analyze tradeoffs at early design stages [1, 2]. In bottom-up design, transistor-level simulation of a mixed-signal chip containing a larger number of analog components is usually unaffordable in both memory and time consumption [3]. Under such circumstance, behavioral models containing circuit non-ideal effects are extracted for each block and simulated at the system level, providing the necessary information for verifying system performance. During the past decade, various methodologies have been proposed for behavioral modeling of analog circuits. First, for interconnect analysis, model order reduction techniques [4] have been successfully developed to generate reduced-order transfer functions for complicated linear dynamic circuits. Unfortunately, in nonlinear circuit modeling, no such mature techniques exist, although several preliminary theoretical methods have been developed in recent years [5]. Practical approaches for nonlinear circuit modeling can usually be classified into three categories. Firstly, the regression method

* This research is supported partly by NSFC research project 60176017 and 90207002, partly by Synopsys Inc., partly by National 863 Program projects 2002AA1Z1340 and 2002AA1Z1460, Cross-Century Outstanding Scholars Fund of Ministry of Education of China, the Doctoral Program Foundation of Ministry of Education of China 2000024628, Shanghai Science and Technology Committee project 01JC14014, Shanghai AM R&D Fund 0107, Science & Technology Key Project of Ministry of Education of China 02095.

proposed in [6] can construct high dimensional nonlinear functions, which directly maps the design space parameters (e.g. transistor size) to the performance space parameters (e.g. gain, area, dominant pole). Secondly, for nonlinear continuous-time systems, Hammerstein model [7] is introduced to represent the input-output behavior of a nonlinear dynamic circuit as a static nonlinear function followed by a linear transfer function. Finally, for switching circuits such as switched-capacitor/current filters and delta-sigma converters, the sampled-data operation can be efficiently modeled by a number of ideal unit delay blocks followed by static nonlinear functions [1, 2]. Clearly, for all these techniques, nonlinear function approximation is a crucial issue within the whole behavioral modeling process. There exist two approaches to approximate the nonlinear functions encountered in analog circuit modeling: (1) equation based on theoretical analysis method [2]; (2) data fitting techniques [1, 3, 6]. The first approach can manually express the internal nonidealities of analog circuits in explicit formulas, but it is restricted to simple circuit structures and device models. The second approach is more efficient and flexible than the first one. Recently, new methodologies, including radial basis approximation [8] and data mining [6], etc., have been developed to efficiently approximate the large dimensional nonlinear functions for analog synthesis. In the meantime, modeling methods for bottom-up verification, such as global support polynomial approximation [1], Fourier expansion, and local support wavelet approximation [3] have also been proposed to accurately characterize the non-ideal input-output function with simple model representation. As reported in [3], the wavelet bases outperform the global support bases in dealing with singularities and controlling the modeling error distribution. Moreover, the nonlinear companding principle proposed in [3] is demonstrated as the essential mechanism to control the modeling error continuously, which is more desired in analog modeling. However, the companding function proposed in [3] is a very specific logarithm function designed for a specific circuit example. The issue of how to automatically design the companding function for arbitrary analog block with arbitrary input-output function has not been explored yet. For practical applications, a general-purpose methodology of constructing the companding function is crucial for applying the wavelet

theory to the automatic behavioral model generation. In this paper, we propose an algorithm to automatically generate the companding function according to the singularities of the input-output function of the building block. The auto-companding method can employ fewer basis functions to model the approximated function with higher accuracy than the existing published approaches [1, 3]. The rest of the paper is organized as follows. In Section II, we review the basic principle of the wavelet collocation method with nonlinear companding. Then in Section III, we propose the general-purpose auto-companding approach. To demonstrate the efficiency of the proposed method, a switched current (SI) delay cell, an SI memory cell and a 4th order SI filter are modeled and simulated in Section IV. Finally, we draw conclusions in Section V.

II.

A. Review of Wavelet Collocation Method with Nonlinear Companding A nonlinear input-output function in equation (1) of a single-input, single-output (SISO) analog circuit block, can be expanded by wavelet series [3] as in equation (2) (1) y = f (x ) N

(2)

i =1

[ x a , xb ] , called the Input Domain. y represents the output. {wi ( x) i = 1, 2, L, N } are the N wavelet basis functions

where x denotes the input defined in an interval

employed.

{ci i = 1, 2, L, N }

are

the

N

N

i =1

i =1

y = f ( x) = ∑ ci wi (g ( x) ) = ∑ ci wi ( xC )

corresponding

coefficients of the wavelets, which can be obtained via collocation method [9].

(4)

According to the wavelet theory [10], higher order wavelets should be employed to the region where the approximated function presents much singularity. Here singularity means the fast changing of the function waveform, which also implies the high-frequency components in the frequency spectrum of the function. To control the modeling error, one can increase the singularity of the wavelet function in the singular regions of the approximated function. We use the derivative of a function to quantify the magnitude of the function singularity. Equation (5) tells that, the derivative of the companded wavelet dwi (g ( x) ) dx is g ′(x) times of the derivative of the original wavelet dwi ( xC ) dxC . dwi ( g ( x) ) dwi ( xC ) dxC dwi ( xC ) = ⋅ = ⋅ g ′( x) dx dx C dx dxC

Principle of Wavelet Collocation Method with Nonlinear Companding

f ( x) = ∑ ci wi ( x)

approximate the input-output function f (x) as shown in equation (4).

(5)

B. Input-Output Function Companding In this subsection, we will present the input-output function companding principle and demonstrate its equivalence to the wavelet function companding method reviewed in the above subsection. Define

(

)

(6) f C ( xC ) ≡ f g −1 ( xC ) By substituting xC = g (x) into the right-hand side of (6), we may have f C ( xC ) = f ( x) So, equation (4) can be equivalently re-written as N

yC = f C ( xC ) = ∑ ci wi ( xC )

(7) (8)

i =1

The nonlinear companding methodology proposed in [3] aims to control the modeling error distribution. Define a Companding Function xC = g (x) , where x ∈ [ xa , xb ] and

where the coefficients {ci i = 1, 2, L , N } are the same as in (4).

xC ∈ [ xCa , xCb ] . Function g (x) satisfies the following constraints: (3) (i) xCa = g ( xa ) = xa and xCb = g ( xb ) = xb (ii) g (x) should be continuous and monotonically increasing. So, its inverse function g −1 ( x) exists. Hence, function g (x) establishes a one-to-one mapping from the input domain to the Companding Domain [ xCa , xCb ] .

companding domain and then approximated by wavelet wi ( xC ) .

Note that in this paper, functions and variables marked with subscript “ C ” denote their counterparts in companding domain. In [3], a wavelet function companding method was proposed to control the modeling error. The wavelet basis functions wi (x) are first companded by function g (x) .

Then the companded wavelets wi ( g (x) ) are employed to

The input-output function companding principle is thus represented by equation (8), where the input-output function f ( x) is first companded to its counterpart f C ( xC ) in

The equivalence of equations (4) and (8) further demonstrates that, for modeling error control, increasing the singularity of the wavelet function is equivalent to decreasing the singularity of input-output function. Furthermore, similar to equation (5), we may derive equation (9), which shows that derivative of f C ( xC ) is 1 / g ′( x) times of the derivative of the original function. df C ( xC ) df ( x) df ( x) dx f ′( x) (9) = = ⋅ = dxC dxC dx dxC g ′( x)

Overall, by choosing proper g ′(x) , both companding methods can equivalently control the modeling error distribution. C. Limitation of the Design of Companding Function in [3] To construct the companding functions, two kinds of basic functions, concave and convex functions, have been adopted in [3]. However, the method in [3], which aims to improve the modeling accuracy in the region near x = 0 , is only proper for the specific function (Fig. 5 in [3]) of circuit blocks and cannot be applied to arbitrary function of other blocks. For instance, Fig. 1 shows the input-output function of a switched current delay cell [11], which contains a mass of high-frequency components in the region of x < 0 . In this example, the modeling error is mainly distributed in the region x < 0 , rather than in the region near x = 0 . If the same logarithm companding function in [3] is applied, the companded input-output function f C ( xC ) will become even more singular in the heavily singular region ( x < 0 ) after companding, as shown in Fig. 2. This will lead to the increase of the modeling error, as will be demonstrated in detail in Section IV. In order to automatically generate behavioral models by wavelet method, a general-purpose approach to automatically construct companding function for any given input-output curve, is inevitably required. In the next section, we’ll derive the auto-companding algorithm. 2.5

x 10-5

reach two goals: high modeling accuracy and fewer basis functions employed. In this section, we first present the objectives for general-purpose design methodology of companding function. Follow on, we derive the auto-companding function to achieve the above two goals. A. Objectives for General-Purpose Companding Function Design In this subsection, we will setup two equivalent objectives for the design of companding function, which can achieve the above modeling goals. Objective I is to compand the input-output function such that the frequency spectrum of the approximated function will be concentrated on the low-frequency region. Objective II is to compand the wavelet functions such that the wavelets located in the singular region of the input-output function will have higher wavelet order. The above two objectives are derived based on the following analysis. For a wavelet expansion system, the approximation space V J can be decomposed into a set of orthogonal subspaces:

(10) V J = V0 ⊕ W0 ⊕ W1 ⊕ ... ⊕ W J −1 where J is the space level (order). The approximation accuracy depends upon the wavelet space level that has been employed. The higher the space level J is, the less the error will be. When approximating the input-output function f (x) , adaptive scheme [9] based on multi-resolution analysis [10] can be adopted. In an adaptive scheme, high order wavelets will be automatically added to only those regions where the function has high-frequency components (i.e., singularities) and the approximation doesn’t reach the specified accuracy.

2 1.5 Output Current

1 0.5 0 -0.5 -1 -1.5 -2 -2.5 -5

0 Input Current

5 x 10-5

Fig. 1. Input-output function of an SI delay cell 2.5

x 10-5

2

It should be noted that companding the approximated function is equivalent to companding the wavelet functions. As a result, objective II can be naturally derived. Due to the space limitation, in the following we will only discuss the design of auto-companding function based on objective I.

1.5 1 Output Current

In Fig. 3, the frequency bands for different wavelet spaces are illustrated [10], which clearly show that high-order wavelets are located in the high-frequency region of the spectrum. On the other hand, the number of the wavelets in certain subspace will increase exponentially as the order of the space increases. In order to achieve the modeling goals of fewer bases and high accuracy, one possible way is to shift the frequency bands of the approximated function to lower frequency region. By this means, lower order wavelets with much fewer basis functions are capable to reach the specified modeling accuracy.

0.5 0 -0.5 -1 -1.5 -2 -2.5 -5

0 Input Current

5 x 10-5

|H(ω)|

Fig. 2. fC(xC) of the delay cell by companding in [3]

V0 0

III.

Auto-Companding Technique

A good modeling strategy by function expansion should

Fig. 3.

W0

W1

W2

ω

Frequency bands of wavelet spaces

As has been stated in Section II, singularity of the approximated function can be quantified by function derivative. Equation (9) further provides an approach to modify the derivatives of the input-output function by function g ′(x) . We may shift the frequency bands of the input-output function to lower frequency region, by choosing larger g ′(x) in the region where the function has high-frequency components, i.e., large derivatives. In this paper, we construct g ′(x) proportional to f ′(x) as shown in equation (11) and (12). (11) p ( x) = f ′( x) + ∆ 1 x (12) g ( x) = x A + ∫ p (t )dt G x where ∆ is a sufficiently small positive value to guarantee p( x) > 0 . Therefore g (x) is monotonically increasing and can satisfy constraint (ii) of the companding function in Section II-A. G is a constant, defined as x 1 (13) G= p (t )dt xB − x A ∫ x which makes g (x) satisfy constraint (i) in Section II-A. A

B

A

Using the companding function g (x) , the original system can be companded by equation (8). We have the following theorems to ensure that such an auto-companding function do really re-locate the frequency spectrum of the original function to the low-frequency region. Theorem 1: Assume on the input-output function there are two points ( x1 , f ( x1 ) ) and ( x 2 , f ( x 2 ) ) . If the derivatives at these two points satisfy f ′( x1 ) > f ′( x 2 ) , the derivatives at

function f C ( xC ) are plotted in Fig. 4 and Fig. 5. It’s obvious that after companding, the regions with high-frequency components are expanded, and the derivatives get much more uniformed. Function g (x) in equation (12) may need a large amount of data to be stored, as a part of the obtained model. A coarse representation of g (x) , which may still effectively achieve the above-mentioned modeling goals, is necessarily desired. In actual modeling process, the companding function is generated by piecewise-linear or cubic interpolation [12] of g (x) . (Due to the space limitation, the detailed algorithms are omitted here.) Both interpolation methods may preserve the monotonicity of g ( x) and have explicit form of inverse function, thus satisfy constraints (i) and (ii) in Section II-A. Moreover, compared with wavelet coefficients representing the input-output function, coefficients representing the companding function are much fewer and thus consume minor storage in most applications. In summary, the auto-companding technique aims to shift and concentrate the frequency spectrum of the approximated function to the low-frequency region. Such a strategy enables the auto-companding wavelet expansion to achieve high modeling accuracy with fewer function bases. In the following section, numerical results will further demonstrate the efficiency of the auto-companding technique. 5

fC′ ( xC 1 ) − fC′ ( xC 2 ) → 0 .

The proof of these theorems is omitted here, due to the limitation of space. Theorem 1 guarantees that the regions with higher singularities in the original function remain to have higher singularities after companding. However, companding can make the function derivatives uniformed, provided that ∆ is sufficiently small. Theorem 2 tells that the differences among the function derivatives will get smaller after companding, which indicates that the frequency spectrum of the input-output function is concentrated. Take the input-output function in Fig. 1 as an example, the auto-companding function and the companded input-output

2 1 0 -1

-3 -4 -5 -5

0 Input Domain

5 x 10-5

Fig. 4. Auto-companding function for the delay cell

Theorem 2: Based on the same assumptions in theorem 1, if the derivatives at these two points satisfy f ′( x1 ) > f ′( x 2 ) ,

2.5

x 10-5

2 1.5 1 Output Current

the corresponding companded function f C ( xC ) will satisfy f ′( x 2 ) fC′ ( xC 2 ) (14) fC′ ( xC 2 ) . Furthermore, if ∆ → 0 , we may have

x 10-5

4 Companding Domain

B. Auto-Companding Derivation

0.5 0 -0.5 -1 -1.5 -2 -2.5 -5

0 Input Current

5 x 10-5

Fig. 5. fC(xC) of the delay cell by auto-companding

IV.

Numerical Examples

For examining the validity of the proposed modeling method, in this section, a switched current (SI) memory cell and an SI delay cell are modeled by different modeling

methods, and a 4th order SI filter is simulated based on the models acquired. Note that all errors referred in this section are relative errors in term of f ( x) − f A ( x ) (15) ERRrelative = f ( x) + α where f A (x) is the approximated value of f (x) , and α is a small positive value to guarantee that when f ( x) is approaching zero, the relative error won’t go to infinity. In the following examples, α is set to 2% of the maximum value of f (x) . All the experiments are performed on a Pentium III 933MHz computer. A. Modeling Results of an SI Delay Cell The input-output function of an SI delay cell [11], as shown in Fig. 1, has been modeled by the following three methods: original wavelet method without companding, nonlinear companding method in [3] and the proposed auto-companding method. All these three methods employ adaptive scheme with the same error threshold. Simulation results are given in Table I. Compared with the wavelet method without companding, nonlinear companding approach in [3] obtains better modeling accuracy at the expense of much more wavelet basis functions. As indicated in the companded input-output function f C ( xC ) in Fig. 2, the heavily singular region ( x < 0 ) of the original input-output function f (x) suffers from even severe singularities after such a companding. As a result, more high-order wavelets are required in this region to achieve the desired accuracy in adaptive scheme, which leads to the increase of the number of bases. As to the proposed auto-companding method, the regions with high-frequency components in the original function are expanded such that derivatives in such regions become more uniformly distributed, as shown in Fig. 5. The high-frequency spectrum of the original function is thus successfully moved into the low-frequency region. Therefore in the approximation, high-order wavelets are much less required, as clearly illustrated in Fig. 6, where the numbers of wavelets in different spaces are plotted, for all three methods. In addition, 40 data are needed to store the companding function in piecewise-linear format. Clearly in this example, the auto-companding method markedly surpasses the other two approaches in terms of modeling accuracy as well as the number of basis functions. TABLE I Simulation Results for the Delay Cell Maximum error

Mean square error

Number of bases

No companding

8.76%

0.012211

235

Companding in [3]

5.71%

0.006562

281

Auto-companding

4.33%

0.007113

149

70

Non-Comp.

60

Comp. in [3]

50

Proposed

40 30 20 10 0 V0

W0 W1

W2

W3

W4

W5

W6 W7

W8

Fig. 6. Number of wavelets in different spaces

B. Modeling Results of an SI Memory Cell The second example is the same memory cell given in [3]. Again we use the above-mentioned three methods to model this cell, all with adaptive scheme under the same error threshold. Polynomial expansion is also employed for comparison. Here we only use 30 bases for polynomial method, because more bases will lead to numerical unstability. Simulation results are listed in Table II. In this example, additional 8 data are needed to store the commanding function. Again the auto-companding method is most effective in improve the modeling accuracy, compared with other approaches. The time for obtaining the input-output function of the circuit block using SPICE is 15.8 seconds, while the time for building behavioral model is no more than 0.1 second, for each of the four methods. TABLE II Simulation Results for the Memory Cell Maximum error

Mean square error

Number of bases

No companding

3.74%

0.004881

41

Companding in [3] Auto-companding

2.49% 1.54%

0.002685 0.002399

57 29

Polynomial

7.69%

0.021078

30

C. Simulation Results of a 4th Order SI Filter In this subsection, we take the 4th-order low-pass Butterworth filter in [3] as the third example. The filter consists of eight memory cells [11], each of which is modeled by the four methods in Section IV-B. The filter is behaviorally represented by a signal flow graph [11] derived from the circuit topology. We simulate the signal-flow-graph of the filter model by MATLAB SIMULINK and compared their performance in the following aspects. 1. Time domain response. First, we test the filter models by a sinusoidal input of frequency 1kHz and amplitude ± 10µA . Fig. 7 plots the time-domain simulation results obtained from SPICE and the four different models. The simulation errors of these methods are given in Table III. The proposed approach is the most accurate one.

TABLE III Simulation Results for the Filter

V.

Mean square error

Simulation time

SPICE

–––

199.1s

No companding

0.110020

< 0.1s

Companding in [3] Auto-companding

0.078223 0.057903

< 0.1s < 0.1s

Polynomial

1.232399

< 0.1s

2. Frequency domain response. Secondly, the filter model is simulated with sinusoidal inputs of amplitude ± 10µA at different frequencies. Fig. 8 depicts the frequency response obtained from SPICE and four kinds of different models. Note that again the proposed method works better than the other three in terms of accuracy. 3. Simulation speed. A transient simulation is performed for the 4th order filter in time interval [0, 5ms ] . Simulation time consumed is given in Table III. Compared with SPICE, the overall speed up with behavioral models is about three orders in time domain simulation. For all the behavioral methods, the overall time including modeling and simulation is less than 15.8+0.1+0.1=16.0 seconds, which also significantly outperforms SPICE. x 10-6 -2

SPICE Polynomial No Companding Companding in [3] Auto-Companding

-2.5

Output Waveform

-3 -3.5 -4 -4.5 -5 -5.5 -6 -6.5 -7 8.5

9 9.5 Time (Sec.)

10 x 10-4

Fig. 7. Time domain response of the filter

Amplitude

100

SPICE No Companding Auto-Companding Companding in [3] Polynomial

102

103 Frequency (Hz)

Fig. 8.

Frequency domain response of the filter

Conclusion

In this paper, we propose an auto-companding method for analog circuit behavioral modeling via wavelet collocation method. The proposed approach presents several advantages over the traditional techniques. First, the companding function is automatically constructed according to the input-output function of arbitrary building block. So the method is a general-purpose one, rather than only for some specific type of circuits. Secondly, compared with other published approaches, the auto-companding approach can efficiently control the modeling errors and reduce the number of basis functions in wavelet expansion. The proposed modeling method is limited to the circuit blocks with input-output function acquirable by simulation. Extension of the proposed method to the modeling of multi-input multi-output (MIMO) blocks is still under investigation.

References [1]

E. Schneider, and T. Fiez, “Simulation of switched-current systems”. Proc. of IEEE ISCAS ’93, pp. 1058-1067, 1993. [2] A. Yufera, and A. Rueda, “Studying the effects of mismatching and clock-feedthrough in switched-current filters using behavioral simulation”. IEEE Trans. on CAS–II, Vol. 44, pp. 1058–1067, Dec. 1997. [3] X. Li, X. Zeng, D. Zhou, and X. Ling, “Behavioral modeling of analog circuits by wavelet collocation methods”. Proc. of IEEE/ACM ICCAD 2001, pp. 65-69, 2001. [4] R. W. Freud, “Reduced-order modeling techniques based on Krylov subspaces and their use in circuit simulation”. Research report of Bell Lab., http://cm.bell-labs.com/cs/doc/98, Feb. 1998. [5] J. Phillips, “Projection frameworks for model reduction of weakly nonlinear systems”. Proc. of IEEE/ACM DAC 2000, pp. 184–189 , 2000. [6] H. Liu, A. Singhee, R. Retenbar, and L. R. Carley, “Remember of circuit past: macromodeling by data mining in large analog design spaces”. Proc. of IEEE/ACM DAC 2002, pp. 437–442, 2002. [7] H. Unbehauen, and G. Rao, Identification of Continuous Systems. Elsevier Science Publishing Inc., 1987 [8] D. M. Walker, N. B. Tufillaro, and P. Gross, “Radial-basis models for feedback systems with fading memory”. IEEE Trans. on CAS–I, Vol. 48, pp. 1147–1151, Sep. 2001. [9] D. Zhou, and W. Cai, “A fast wavelet collocation method for high-speed circuit simulation”. IEEE Trans. on CAS–I, Vol. 46, pp. 920–930, Aug. 1999. [10] C. S. Burrus, R. A. Gopinath, and H. Guo, Introduction to Wavelets and Wavelet Transforms – A Primer. Prentice Hall, 1998. [11] C. Toumazou, J. Hughes, and N. Battersby, Switched-Currents: An Analog Technique for Digital Technology. Peter Peregrinus Ltd., 1993. [12] J. M. Hyman, “Accurate monotonicity preserving cubic interpolation”. SIAM J. Sci. Stat. Comput., Vol. 4, No. 4, pp. 645–654, Dec. 1983.