# Implement $x^{\gamma}$ function using op amps

Is there a way to implement $$\f(x) = x^{\gamma}\$$ for a fixed (most conveniently, adjusted by a pot) value of $$\\gamma\$$, using op amps or other analog circuitry?

What I want is for the circuit to take an input voltage $$\x\$$V between 0V and 1V, and output the voltage, say, $$\x^{2.2}V\$$. A possible use-case for this would be properly gamma-corrected control of light intensity (since the commonly used log/antilog approach is considered less accurate in relation to human perception)

• It might be a good idea to change your title to "exponential function" rather than "power function" which has a different meaning in electrical engineering. Oct 10, 2021 at 18:56
• Many non-linear functions such as X½, X2, X3, 1/X, XY, and X/Y are easily generated.. ti.com/lit/an/snoa641b/snoa641b.pdf Apr 5, 2023 at 11:47

A few possibilities:

1. Log->gain->Antilog (variable gain with a pot is easy and does not require an expensive multiplier chip)

eg. $$\e^{\ln(x)\cdot\gamma} = x^{\gamma}\$$

Log-antilog circuits (typically using a transistor junction as a fairly ideal diode) have various challenges such as temperature sensitivity, required trimming, and frequency response that varies with signal.

2. Your exponent is close to 2 so using the FET characteristic Id $$\\approx (V_{\text{gs}}-V_{\text{t}})^2\$$ is a possibility.

3. Use a precision on-chip trimmed multiplier chip as a squarer to get an accurate characteristic without trimming. More multiplier chips could be used to generate a series approximation, but that gets expensive.

4. Piecewise linear approximation, with diodes and resistors (not easily adjustable).

No it is not possible with opamps and resistors. These are linear components and can only implement linear functions of the inputs (so multiplication by a constant, add a value, integrate or differentiate etc.). These constants can be dependent on resistor values, but there is no simply way to make the effective resistor value depend on another signal.

There are a few methods commonly used to achieve what you want:

1. Bipolar transistors have an exponential relationship between base-emitter voltage and collector current. This can be used to develop voltages proportional to the logarithm of a signal, and this in turn can be used to generate an output dependent on the logarithm. This does allow a multiplication or power-law (or exponential) function to be implemented. ICs are available (https://www.analog.com/en/products/analog-functions/analog-multipliers-dividers.html).

2. MOSFETs have a square-law characteristic (drain current depends on the square of VGS), but this is not extremely accurate in most MOSFETs, and so is seldom used to implement multiplication functions.

3. The signals can be digitized with an ADC, the mathematical function implemented in software and converted back to an analog signal with a DAC.

• Unless you make a doozy of a circuit using the expansion series...maybe... Oct 10, 2021 at 19:22
• no; that won't work either. Oct 10, 2021 at 21:34