Microonics ELSEVIER
MicroelectronicsJournal 29 (1998) 441-444
A translinear circuit for piecewise-linear approximation of nonlinear functions Muhammad Taher Abuelma'atti, Sofian Mustafa Abed King Fahd University of Petroleum and Minerals, Box 203, Dhahran 31261, Saudi Arabia
Abstract
A new technique for synthesizing piecewise-linear approximations of nonlinear functions is presented. The technique, using only transistors and current-sources, is simple, flexible, programmable and suitable for integration. Simulation results are included. © 1998 Elsevier Science Ltd. All rights reserved.
1. Introduction
Analog nonlinear circuits are widely used in linearizing the nonlinear transfer characteristic of amplifiers and transducers, in neural networks, triangle-to-sine wave converters and many others. Piecewise-linear approximation techniques have lmrgely dominated the design of such nonlinear analog circuits and implementations using metaloxide-semiconductor (MOS) current-mirrors [1], operational transconductance amplifiers [2,3], current-conveyors [4] and diode-resistors networks [5-7] have been reported. While the operational-transconductance amplifier-based realizations are programmable, they suffer from temperature dependence. Current-conveyor based realizations are not programmable but they do not suffer from temperature dependence. However, both operational transconductance amplifier- and current-conveyor-based realizations are relatively silicon area intensive [1] as one active element is required for each segment of the piecewise-linear characteristic. On the other hand, diode-resistor-based realizations are not programmable and their high frequency performance is relatively poor. Recently, the use of metal-oxide-semiconductor fieldeffect transistor (MOSFET)-based current-mirrors for implementing piecewise-linear transfer functions has been reported [1]. This technique enjoys a number of attractive features including, programmability of the breakpoints, simplicity, unconditional stability and modularity. However, the major disadvantage of this technique is the determination of the slope of the transfer characteristic of the basic building blocks by the ratios of the transistor geometries [1]. Thus, the slope is not practically programmable. The aim of this paper is, therefore, to present a bipolar 0026-2692/98/$19.00 © 19'98 Elsevier Science Ltd. All rights reserved PII S0026-2692(97)00095-5
junction transistor-based realization of the piecewise-linear transfer functions. While the proposed realization enjoys all the above mentioned attractive features of the MOSFETbased current-mirrors realization [1], it has also the attractive feature of programmable slope using externallyconnected currents. Thus, the proposed realization is more flexible than the MOSFET counterpart. 2. Proposed circuit
Consider the basic circuit shown in Fig. 1, which is a modified version of the programmable current-mirror proposed in Ref. [8]. Assuming that the translinear conditions are satisfied [9,10], and that the static current gains, /3, of transistors, are much greater than unity, then applying the translinear principle to the circuit formed of transistors Qs-Q8 yields
(,1)
Vc1- Vc2=2VTln ~
(1)
where VT is the thermal voltage. Applying the translinear principle to the circuit formed of QrQ4 yields
Vcl--Vcz=2VTln(I°ut~ \ 12 ./
(2)
Combining Eqs. (1) and (2) yields tout =
1213
(3)
11 Thus, the circuit of Fig. 1 can realise the following operations: 1. current multiplication by keeping 11 constant; 2. current division by keeping either 12 or 13 constant; 3. 'one-over' by keeping both 12 and 13 constant;
M.T. Abuelma 'ani, S.M. Abed/Microelectronics Journal 29 (1998) 441-444
442
4. programmable-gain current amplification with 12 as the input current and gain = 13//vThis feature can be used for piecewise-linear approximation of nonlinear functions. This can be explained as follows. Since the basic circuit of Fig. 1 provides a linear relationship between the input and the output currents, with programmable slope, then the addition of a number of such output currents can yield the required function.
(a) o
Slope = A
Slope = A+B
/
0
=A+B+c
Ib
Ic
Id
[input
(b)
3. Example To illustrate the use of the basic circuit of Fig. 1 in synthesizing a piecewise-linear approximation of a nonlinear function, consider the synthesis of the piecewise-linear function shown in Fig. 2(a). This example is illustrative as it contains positive-, negative- and zero-slope segments. Any other function can be approximated using no more than these three types of segment's slopes. The function of Fig. 2(a) can be decomposed into four distinct regions as shown in Fig. 2(b). The first region, with slope, A, can be realized using the circuit of Fig. 1 with gain, A. The second region, with slope, B, and offset current, Ib, can be realized by adding the output current of a second basic circuit with gain, B. The third region, with slope, C, and offset current, lc, can be realized by adding the output of a third basic circuit with gain, C. Finally, the fourth region, with slope, D, and offset current, Id, Can be realized by adding the
pe = A Slope = D J
/
0
Ib~
I c ~
Id
Iin;ut
\
Fig. 2. (a) Piecewise-linear function. (b) Decomposition of the function of (a) into four distinct regions.
output current of a fourth basic current with gain D so that the slopes A -t- B + C + D = 0. The breakpoints of the function, the points at which the slopes change, can be programmed by means of d.c. offset currents, as shown in the block diagram of Fig. 3. With the d.c. offset currents, the basic circuit will not provide any output current until the input current exceeds this d.c. offset current. Thus, the block diagram for realizing the piecewise-linear function of Fig. 2(a) is shown in Fig. 4. In Fig. 4, the circuits used in implementing blocks 1 and 4 are similar to the circuit shown in Fig. 1. The circuits used in implementing blocks 2 and 3 are the complements of the circuit of Fig. 1. Thus, while Q1, Q4, Q5 and Q8 are npn
[
1
vc,
,3
I°ffset
Ioutput
Iinput t
T I1
~. . . . . . . . . . . . . .
--i--
. . . . . . . . . . . . . .
"J
Fig. 1. Circuit for realisation of the transfer function lout = (lfflOl z.
]
QI - - Q8
l Fig. 3. Block representation of the basic circuit of Fig. 1 with offset current (/offset) and slope-control currents (11 and 13).
M.T. Abuelma'atti, S.M. Abed/Microelectronics Journal 29 (1998) 441-444
transistors, QI', Q4', Qs' and Q8' are pnp transistors. Similarly, while Q2, Q3, Q6 and Q7 are pnp transistors, Q2', Q3', Q6' and QT' are npn transistors. 4. Simulation results
The block diagram of Fig. 4 was simulated using the ICAPS circuit simulation program. The transistors used for simulation are 2N2222 for npn transistors and 2N2905 for the pnp transistors. The results obtained with Ib = 0.25 mA, Ic = 0.50 mA, ld = 0.75 mA and I = 1 mA and A = B = C = D = 1 are'. shown in Fig. 5. It appears from Fig. 5 that the simulated results are in good agreement with the required function. 5. Discussion and conclusion
In this paper a new technique for synthesizing nonlinear functions has been presented. The nonlinear function is decomposed into a number of piecewise-linear segments. The number of segments is determined only by the required accuracy and the smoothness of the resulting function. For each segment, the linear relationship between the input and output currents is implemented using a programmable-gain current mirror. The breakpoints of the piecewise-linear approximation are realized by means of offset-currents. The slope of each segment is determined by the ratio of control currents. This is a basic advantage over the current-mirror-based realization reported in Ref. [1] where the slope of the transfer characteristic corresponds to the gain of the mirror, which is determined by ratios of transistor geometries, and thus can not be practically programmed.
linput
O QI-
- Q8
_1_ [input Ib
t-t 7" ®
Ioutput
Q~ - _ e ~
BI
443
The proposed circuit is flexible and can be programmed to synthesize any piecewise-linear function. The circuit uses only transistors and current sources and is, therefore, attractive for integration. Moreover, the proposed technique requires only one basic building block with programmable current-gain to realise any piecewise-linear function. This is another basic advantage over the current-mirror-based realization reported in Ref. [1] where four different basic building blocks are required. In contrast with the OTA-based realizations reported in Refs [2,3], the proposed circuit performance is temperature independent. Compared with the OTA-based [2,3] and the current-conveyor-based [4] realizations, the proposed technique is very simple and uses a small number of transistors for each block. Finally, in contrast with the diode-resistor realizations [5-7], there is no restriction on the choice of the breakpoints. Thus, the realization of piecewise-linear approximations with any degree of accuracy is practically feasible. The accuracy improves with the number of segments and this can be increased as required since there is no restriction on the choice of the locations of the breakpoints. Simulation results, obtained from a function containing positive, negative and zero segments slopes, verified the operation of the proposed technique. The simulation results were obtained assuming that the 'n' parameters of the NPN and PNP transistors are equal to unity. While this is, practically, a very good approximation, failure to meet this condition will result in an error in the effective value of the current gain of the basic building block of Fig. 1. Another possible source of error is the effect of the collector-base voltage, through the base-width modulation (Early effect) on the base-emitter voltage. Thus, transistors with large values of Early voltage will result in better performance. Moreover, the base-emitter voltage is also affected by the finite ohmic resistances, especially the effective base resistance, and this will result in higher values of base-emitter voltage and may degrade the performance of the basic building block of Fig. 1. Finally, errors due to finite values of/3 frequently degrade the performance of translinear circuits and the basic building block of Fig. 1 is not an exception. Thus, large values of/3 would be preferable. Alternatively, many measures can be taken to minimize the effect of finite/3s on the performance of the basic building block of Fig. 1 [9].
[input Ic
I Iinput
Id
7"
Qi
® -
-
IT ±--
®
Q1--Q8
I
Q~
330 7
c[ I
~ 130
t ii DI
_J_ Fig. 4. B l o c k d i a g r a m o f the c i r c u i t u s e d to i m p l e m e n t the p i e c e w i s e - l i n e a r c h a r a c t e r i s t i c o f Fig. 2(a).
-70 0
J
I
200
i
I
- ~
\
I I 400 600 Iinout(~A)
I
I
I
i
I 800
I
1000
Fig. 5. S i m u l a t e d results o b t a i n e d f o r lb = 0.75 m A , Ic = 0.5 m A , Id = 0 . 7 5 m A a n d l = 1 m A , A = B = C = D = 1. d.c. s u p p l y v o l t a g e s = --- 5 V.
444
M.T. Abuelma 'atti, S.M. Abed/Microelectronics Journal 29 (1998) 441-444
It is worth mentioning here that the basic building block of Fig. 1 is a class A structure and is, therefore, not characterized by low quiescent power dissipation. However, the basic building block of Fig. 1 is characterized by relatively low supply voltage requirements. Although the results reported here were obtained with a supply voltage of ___5 V, operation from lower supply voltages is feasible.
References [1] J. Ramirez-Angulo, E. Sanchez-Sinencio, A. Rodriguez-Vazquez, A piecewise-linear function approximation using current mode circuits IEEE Int. Symp. Circuits Systems 4 (1992) 2025-2026. [2] E. Sanchez-Sinencio, J. Ramirez-Angulo, B. Linares-Barranco, Operational transconductance amplifier-based nonlinear function synthesis, IEEE J. Solid-State Circuits 24 (1989) 1576-1586. [3] A.R. A1-Ali, M.T. Abuelma'atti, A. Shabra, Transconductance amps for function synthesis, Electron. Engng 66 (December) (1994) 26-28.
[4] S. Liu, D. Wu, H. Tsau, J. Wi, J. Tsay, Nonlinear circuit applications with current conveyors, lEE Proc. 140 (Part G) (1993) 1-6. [5] M.T. Abuelma'atti, Synthesis of a concave monotonically increasing function using the diode-equation model, Int. J. Electron. 51 (1981) 57-62. [6] M.T. Abuelma'atti, Synthesis of a non-monotonic single valued function generators without using operational amplifiers, Int. J. Electron. 51 (1981) 803-809. [7] V.G. Bello, Design of a diode function generator using the diode equation and iteration, IEEE Trans. Circuit Theory 19 (1972) 213214. [8] J. Ramirez-Angulo, I. Grau, Wide gm adjustment range, highly linear OTA with linear programmable current mirrors. International Symposium on Circuits and Systems, IEEE, NJ, 1992, pp. 1372-1375. [9] B. Gilbert, Current-mode circuits from a translinear viewpoint: a tutorial, in C. Toumazou, F.J. Lidgey, D.G. Haigh (Eds), Analogue IC Design: the Current-mode Approach, Peter Peregrinus, London, 1990. [10] B. Gilbert, Translinear circuits: a proposed classification, Electron. Lett. 11 (1975) 14-16.