Author Topic: Log/antilog amplifiers to multiply two voltages from single supply.  (Read 20765 times)

0 Members and 1 Guest are viewing this topic.

Offline s3cTopic starter

  • Contributor
  • Posts: 26
I'm trying to multiply two voltages together using log/antilog amplifiers. The idea is to log the two voltages, add them together and then antilog them, I have it working with ideal op amps but can't seem to get the single supply version working. Here's a screenshot of the ideal:



I was hoping I could just replace all the grounds with a virtual ground for the single supply version but this doesn't work, the antilog stage fails if I do this and I don't really know why:



I've attached the ltspice files in a zip, I'd appreciate if someone with a little more experience and insight could take a look.
 

Offline scrat

  • Frequent Contributor
  • **
  • Posts: 608
  • Country: it
Re: Log/antilog amplifiers to multiply two voltages from single supply.
« Reply #1 on: July 14, 2011, 01:32:30 pm »
At a first look, it seems the diode is off, since adding a positive voltage you're polarizing it backwards.

If it's for a real application, some time ago Dave posted about a limitation opamp (or a similar name) from AD, which could be easily used to make a "linear" multiplier. Is this an option?
One machine can do the work of fifty ordinary men. No machine can do the work of one extraordinary man. - Elbert Hubbard
 

Offline s3cTopic starter

  • Contributor
  • Posts: 26
Re: Log/antilog amplifiers to multiply two voltages from single supply.
« Reply #2 on: July 14, 2011, 01:42:22 pm »
I was hoping to use it as a power monitor where I got a proportional output signal by multiplying two voltages representing current and voltage. Alternative sollutions are fine but on the other hand I'd like to know why it doesn't work as well. I've measured the voltages over the diodes for both cases and they're fairly identical.
 

Offline Floyo

  • Regular Contributor
  • *
  • Posts: 90
  • Country: nl
Re: Log/antilog amplifiers to multiply two voltages from single supply.
« Reply #3 on: July 14, 2011, 02:16:35 pm »
If you don't want to build the whole thing yourself you could have a look at the AD633, it's an analog multiplier with fully differential inputs so measuring from different grounds isn't a problem. I've used it in a prototype spectrum analyser for a school project, and it works just fine, much better then RF multipliers (NE612). The problem with diy log amps is that they need to be temperature compensated and the diodes need to be properly matched otherwise they become inaccurate, there's a paragraph on that in the art of electronics somewhere.
 

Offline scrat

  • Frequent Contributor
  • **
  • Posts: 608
  • Country: it
Re: Log/antilog amplifiers to multiply two voltages from single supply.
« Reply #4 on: July 14, 2011, 02:22:22 pm »
I've measured the voltages over the diodes for both cases and they're fairly identical.

Do you mean the antilog diode is forward biased? It doesn't seem so, since current should flow on the reverse direction, to have a positive output on the opamp.
One machine can do the work of fifty ordinary men. No machine can do the work of one extraordinary man. - Elbert Hubbard
 

Offline s3cTopic starter

  • Contributor
  • Posts: 26
Re: Log/antilog amplifiers to multiply two voltages from single supply.
« Reply #5 on: July 14, 2011, 02:55:56 pm »
@Floyo

I did consider using a premade sollution but they're a lot more expensive and not as easy to get your hands on as normal op amps are. As for being inaccurate, I suspected as much but it doesn't really matter, I'm not doing anything that needs high precision and would prefer a cheap sollution.

@scrat

In both circuits the antilog diode is forward biased and the voltages are pretty much identical, Here's a screen of the ideal:



And of the single supply implementation:



Could you give a link to the "limitation opamp" you mentioned?
« Last Edit: July 14, 2011, 03:00:59 pm by s3c »
 

Offline s3cTopic starter

  • Contributor
  • Posts: 26
Re: Log/antilog amplifiers to multiply two voltages from single supply.
« Reply #6 on: July 14, 2011, 04:31:59 pm »
Just figured out that part of the problem was that the antilog stage was clipping because the input to the stage was too big, I'm having some problems with linearity of the output atm but with some luck I can fix this by tweaking the resistors of the log/antilog stages.

Has anyone here ever tried building a voltage multiplier that wasn't premade?
 

Alex

  • Guest
Re: Log/antilog amplifiers to multiply two voltages from single supply.
« Reply #7 on: July 14, 2011, 04:55:02 pm »
A better approach is to use an IC that employs a 'Gilbert cell'.

I have designed a log amp, but no antilog or multipliers based on that.

I would first look into optimising (or maybe even making them work) the log and antilog circuits before doing any signal processing in between. For example, silicon diodes give very poor log conformity i.e. everything else perfect the output is not the log of the input. Transistors in the transdiode configuration or diode-connected are much better. And there will be severe output drift due to temperature variation. In a real circuit you would be looking for diodes with matched saturation currents. These circuits are also working with current, not voltage. You can use a resistor an treat the other terminal as ground, but you must consider offset voltages and bias currents (BJT opamp), especially with such large resistors.

I would suggest you hit the library and revisit log amps and, possibly, op-amps. A good book is:

A J Peyton and V Walsh. Analog Electronics with Op amps: A Guide to Circuit Design. Cambridge University Press:1993.

And if you have a question for the author I can go next doors and ask him for you!  :D

There is also an old book from Analog Devices back from the days of analogue computers.
 

Offline s3cTopic starter

  • Contributor
  • Posts: 26
Re: Log/antilog amplifiers to multiply two voltages from single supply.
« Reply #8 on: July 14, 2011, 05:48:55 pm »
@Alex

Thanks for the tips Alex, I'll go read up a bit (esp transdiode & diode-connected). I kinda got the circuit working but the performance for small input voltages is pretty bad:



I'm hoping this will still be viable, It could work if I avoid low voltage inputs but I'll have to test it a bit. All the premaid chips are 20X more expensive, on the other hand I guess you get what you pay for.
 

Alex

  • Guest
Re: Log/antilog amplifiers to multiply two voltages from single supply.
« Reply #9 on: July 14, 2011, 06:01:42 pm »
Do consider the AD633, it is very economical.
 

Offline johnmx

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: pt
Re: Log/antilog amplifiers to multiply two voltages from single supply.
« Reply #10 on: July 14, 2011, 07:21:11 pm »
I’ve done that in my project: Constant Current Dummy Load.

The analog multiplier is pretty easy to implement. Read the circuit description.
The circuit can be powered by single supply. Just limit the signals (input and output) in the linear range. Off course you need to raise the voltage level of all non-invert inputs and the base of all transistors.
I can send you that circuit for LTspice IV, just PM me.

https://www.eevblog.com/forum/index.php?topic=2487.msg33809#msg33809
« Last Edit: July 14, 2011, 07:39:17 pm by johnmx »
Best regards,
johnmx
 

Alex

  • Guest
Re: Log/antilog amplifiers to multiply two voltages from single supply.
« Reply #11 on: July 14, 2011, 08:44:25 pm »
Here are some scans from the AD handbook I mentioned, title is nonlinear circuits handbook - designing with analog function modules and IC's. Not sure if you can find it online or a newer revision, this one is from 1976. The scanned pages give a derivation of the ideal output of the circuit shown. Multipliers have two chapters across 80 pages or so in this book alone.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19897
  • Country: gb
  • 0999
Re: Log/antilog amplifiers to multiply two voltages from single supply.
« Reply #12 on: July 14, 2011, 09:14:00 pm »
How fast does this need to be?

What about doing it digitally?

If you're using a microcontroller anyway and it doesn't need to be fast, it's probably the most sensible solution.
 

Offline s3cTopic starter

  • Contributor
  • Posts: 26
Re: Log/antilog amplifiers to multiply two voltages from single supply.
« Reply #13 on: July 15, 2011, 08:47:37 am »
So my output isn't perfectly linear, the output is the product of the two inputs multiplied with a nonlinear term, If you look at the plots you can see that small signals are much larger than they should be and larger ones are smaller. Is this a real world limitation?

@johnmx

Thanks for the link, it's a great project and the same idea I'm trying at. Can't say I understand how the signals are added by transistors though, the scans Alex posted uses a similar techniques. Do you get the same nonlinear behaviour in this circuit?

@Alex

I'm trying to get my hands on a book like this, found some on google books that explain it fairly well but I miss a page every now and then, do you have any other book suggestions by chance?

@Hero999

I ultimately want to limit signals based on the output so it needs to be fairly fast, much faster than what the low end micro can give and not worth using a big one for.
 

Offline scrat

  • Frequent Contributor
  • **
  • Posts: 608
  • Country: it
Re: Log/antilog amplifiers to multiply two voltages from single supply.
« Reply #14 on: July 15, 2011, 10:11:16 am »
Quote
@scrat
In both circuits the antilog diode is forward biased and the voltages are pretty much identical [...]
Could you give a link to the "limitation opamp" you mentioned?

Yes, I was really lost... The last opamp is inverting. Sorry for me repeating the wrong thing twice.

After some research both here and around the web and the AD site, I was not able to find that chip I mentioned.  >:(
However, I think it was more properly used for quite high frequency applications, but was really interesting. It was mentioned by Dave, don't remember in which contest. It has two inputs which are the "upper" and "lower" limits, and it moves linearly in the range between those limits. The limitation has a high BW, comparable or equal to the one GBWP of the opamp itself. Moreover, the limits can be "inverted" (i.e. "upper" < "bottom") to invert the output. Thus it's easy to use it as a multiplier.
One machine can do the work of fifty ordinary men. No machine can do the work of one extraordinary man. - Elbert Hubbard
 

Offline qno

  • Frequent Contributor
  • **
  • Posts: 422
  • Country: nl
Re: Log/antilog amplifiers to multiply two voltages from single supply.
« Reply #15 on: July 15, 2011, 03:57:09 pm »
Does your circuit work when you use a + and - powersupply?
Why spend money I don't have on things I don't need to impress people I don't like?
 

Offline s3cTopic starter

  • Contributor
  • Posts: 26
Re: Log/antilog amplifiers to multiply two voltages from single supply.
« Reply #16 on: July 15, 2011, 11:45:00 pm »
Well it works from both now with a little tweaking but I don't get a nice linear output.
 

Offline johnmx

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: pt
Re: Log/antilog amplifiers to multiply two voltages from single supply.
« Reply #17 on: July 16, 2011, 10:53:38 pm »
@johnmx

Thanks for the link, it's a great project and the same idea I'm trying at. Can't say I understand how the signals are added by transistors though, the scans Alex posted uses a similar techniques. Do you get the same nonlinear behaviour in this circuit?
I get a perfect response like expected.
If you want to learn how the circuit works watch the following classes:



Best regards,
johnmx
 

Offline ciccio

  • Frequent Contributor
  • **
  • Posts: 659
  • Country: it
  • Designing analog audio since 1977
    • Oberon Electrophysics
Re: Log/antilog amplifiers to multiply two voltages from single supply.
« Reply #18 on: July 22, 2011, 05:00:37 pm »
Nice job.
I've used, years ago, a dedicated IC for a similar application, and got  some problems with temperature coefficients, but at the end it worked over a wide range.
Designing it with discrete op-amps was too complicated (I did not had access to simulation software).
I don't have anymore access the detail of that  projects, but I remember using an Analog Devices IC.
They are still manufacturing Analog Multipliers:
http://www.analog.com/en/special-linear-functions/analog-multipliersdividers/products/index.html


« Last Edit: July 22, 2011, 06:06:05 pm by ciccio »
Strenua Nos Exercet Inertia
I'm old enough, I don't repeat mistakes.
I always invent new ones
 

Alex

  • Guest
Re: Log/antilog amplifiers to multiply two voltages from single supply.
« Reply #19 on: July 27, 2011, 04:24:17 pm »
I have two spare Analog Devices MLT04 4quadrant, 4 channel analogue multipliers if you, or anyone, is interested.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf