Based on the following schematic, where V+ and V- are +15 and -15 V respectively: enter image description here

Its transfer function is supposed to be: $$V_{out} = \frac{V_1}{V_2V_R}$$

I made the following circuit in LTSpice: enter image description here

But the waveform I get when I run the simulation is:enter image description here

Can someone please tell me what am I doing wrong here? I have to physically assemble the circuit, so I need to make sure it works with that transfer function beforehand.

  • 3
    \$\begingroup\$ Are you sure about that transfer function? It doesn't make any sense dimensionally; Vout has units of volts whereas V1/(V2Vr) has units of 1/volts. \$\endgroup\$
    – Hearth
    Nov 27, 2022 at 17:51
  • \$\begingroup\$ Is there a possible power supply connections issue in the Spice schematic? Also, if using the LM308 review the data sheet for use of a compensation cap on the open pins. \$\endgroup\$
    – Nedd
    Nov 28, 2022 at 4:58
  • 1
    \$\begingroup\$ Although output voltages are "volt" ... here, there doesn't have any "dimension", because they come from "log" and "antilog" ... which are only "numeric". \$\endgroup\$
    – Antonio51
    Nov 28, 2022 at 8:05

3 Answers 3


Your circuit is almost okay, get rid of the inverter as shown:

enter image description here

And your transfer function will (ideally) be Vout = (V1/V2)*Vr.

So just make Vr = 1/Vr' (your original Vr).

enter image description here

Add compensation capacitors as shown in the op-amp datasheet, and if you are laying out a PCB, allow for some capacitors across the feedback diode and resistors but don't populate.

For troubleshooting this kind of circuit, I suggest you look at the operating point voltages at the output of each op-amp and compare them with your expectations (and the output saturation voltages). That will help promptly identify just where things went pear-shaped.


I think you will not get the supposed transfer function with a simulation even if you correct -Vcc polarity, you will have to analyse the circuit step by step.

Hints: Inputs signals uses op-amp with a diode feedback, based on diode current-voltage characteristics, the output is logarithmic of Vin/Rin. If a diode is used at the input (as in U7 simulation), you will get an exponential function. If you add/substract logarithmics signals is equivalent to multiply/divide and after you make the exponential and invert, you "restore" proportional inputs signals.

enter image description here


There are real world limitations to a simple diode configured op-amp log or anti-log circuit.
A few of the major issues include:
The diode must always be forward biased, so you can only use unary inputs.
Very low currents will cause nonlinear performance.
Diode temperature drift will also cause errors.

Both your circuit configurations and the transfer function above have issues, (and the noted supply connection).
To work them out I would recommend first setting all the op-amp sections to be simple DC amps, (just swap out the diode for a resistor).
Determine the equation for the sub-circuits and the whole system in the simplified configuration.
Verify each section and the system using LTSpice, pay particular attention to the signal polarities and summing functions.
Restore the log/anti-log functionality, (replace the diodes).
Rework the sub-circuits and system equations using log/anti-log, multiplication/division).
Finally, use LTSpice once again to verify that each sub-circuit and the complete system matches the equations.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.