Circuit makes square deal

A classic nonlinear analog function is the squaring circuit. It’s useful in power sensing, frequency multiplication, RMS computation, and many other odd jobs around the lab bench.
The version in Figure 1 is straightforward, fast, temperature-compensated, calibration-free, and if the transistors are well matched, accurate. The final output is as follows:
Vout = R3 antilog(2log(Vin/R1) – log(Vgain/R2)) = R3 antilog(log((Vin/R1)2 /(Vgain/R2))
Vout = (R1-2 R2 R3)Vin2 /Vgain
Figure 1 The squaring amplifier that is fast, temperature-compensated, calibration-free, and accurate (if the transistors are well matched).
Wow the engineering world with your unique design: Design Ideas Submission Guide
Its input can accept either voltage or current. It gains a bit of extra versatility from a separate gain factor control input, which can also accept voltage or current. Another boost in versatility comes from a similarly flexible output with both voltage and (inverted) current output mode. If the current mode is chosen, A3 and R3 can be omitted and a dual op-amp (OPA2228) used instead of the quad (OPA4228) illustrated.
The series connection of Q1 and Q2 generates a signal proportional to 2log(Vin/R1) = (log(Vin/R1)2). This is applied to antilogger Q3 ,which subtracts log(Vgain/R2) from it to generate a current of:
-(antilog(log((Vin/R1)2 /(Vgain/R2))
This is inverted and scaled by R3 and A3 to yield the final:
Vout = (R1-2 R2 R3)Vin2 / Vgain
Note that if the three resistors are equal and Vin = Vgain, then:
Vout = (R-2 R R)Vin2 / Vin = Vin
And, the squarer circuit will have unity gain.
Which is kind of a “square deal,” although I doubt it’s what Teddy Roosevelt had in mind when he made that phrase his 1904 campaign slogan.
An interesting application happens when the squarer is combined with a full-wave precision rectifier (like the one in “New full-wave precision rectifier has versatile current mode output”). See Figure 2.
Figure 2 The cascading full-wave rectifier (black) with squarer makes low distortion frequency doubler (red).
Stephen Woodward’s relationship with EDN’s DI column goes back quite a long way. Over 100 submissions have been accepted since his first contribution back in 1974.
Related Content
- New full-wave precision rectifier has versatile current mode output
- Simple diff-amp extension creates a square-law characteristic
- Boost and modify square waves: More circuits
- Precision Full Wave Rectifier Circuit
The post Circuit makes square deal appeared first on EDN.


