5
\$\begingroup\$

Before this I have always worked with digital circuit synthesis. I have designed circuits with combinational logic using Karnaugh maps, decoder encoder shift registers and so on. And I have designed sequential logics using state transition tables. However, I am pretty weak in analog. For example, I want to create an output like the one below against a linear input between 0-7 Volts and I want to provide this with op-amps. What exactly is the methodology for doing this?or what are the different approach methods?because I want to apply this process on different input and output forms and build analog circuits.in fact, we can partially achieve this by assuming (with Fourier series) that each waveform consists of sine waves of different amplitude and frequency.(I hope I am not wrong.Also we have a linear input here) But this looks fantastic to me. Are there any books or tutorials that cover other approaches?

enter image description here

My head begins to understand the answer. Actually, it is a linear input from the output of the HAL sensor seen above, and the output is the function we want. Actually, analog signal processing is in question here. Analog signal processing can of course also be done. However, there can be an infinite number of different ways to do it. I think a bit of analog design intelligence and heuristics can be used here. enter image description here

I'm starting to understand the beauty of digital signal processing here. it is much easier to have these operations done by an Arithmetic logic unit.It's much easier to process the signal as binary and flexibly.In order for the analog form at the output to have a more natural output rather than a ladder, it is necessary to pass through some analog filters.

enter image description here

enter image description here useful resources

https://en.wikipedia.org/wiki/Analog_signal_processing https://en.wikipedia.org/wiki/Network_synthesis

https://www.analog.com/media/en/training-seminars/design-handbooks/Nonlinear-Circuits-Handbook/Part2.pdf (curve fitting methods) other perspective linear circuits and nonlinear circuits

simple example

\$\endgroup\$
4
  • 1
    \$\begingroup\$ It would help if you'd write the I/O relationship, rather than letting us guess from tha small graph, and also what application is this for? There may be another way. \$\endgroup\$ Dec 25, 2022 at 17:18
  • 1
    \$\begingroup\$ analog signal ->input filter-> ADC pin on uController -> DAC -> output filter -> buffer \$\endgroup\$
    – user57037
    Dec 25, 2022 at 18:13
  • 1
    \$\begingroup\$ This question seems to be asking "how do I design an analog circuit which implements a desired function?" which is far too broad a question for us to be able to do a good job of answering it. I did a Google search for 'non linear functions using analog circuits' and one of the results is a 36-page document about the subject. \$\endgroup\$ Dec 26, 2022 at 1:00
  • \$\begingroup\$ analog.com/media/en/training-seminars/design-handbooks/… Thanks Tanner! \$\endgroup\$
    – Electronx
    Dec 26, 2022 at 5:36

2 Answers 2

7
\$\begingroup\$

To be clear, Fourier transforms do not apply to a DC transfer function, at least not profitably, in any context I can think of offhand. But we can apply other kernels to approximate or solve for a desired transfer function, and implement these with op-amps.

To further clarify, whereas the digital version is a combinatorial function, taking a bit vector input to a bit vector output (plus some propagation delay), the analog version is an input voltage (or other circuit variable) to an output voltage (within some frequency response, which may involve a true propagation delay as well).

Consider the basic transfer function of a linear amplifier with fixed supply rails. If using a rail-to-rail type op-amp (and other well-behaved assumptions, which fortunately aren't hard to find among commercially available parts), the output follows the input (give or take whatever gain and offset the circuit has been designed for), which makes for example one of the diagonal line segments in your plot. When the output saturates, it can't go any further than ±VCC, so flattens out suddenly: the flat segments on your plot.

As with a Fourier transform, we might decompose a function like shown, into a series of these line segments, where the slope is given by the active (non-saturated) amplifier, and the output from any number of these stages are summed together to give the output. The span of each segment is fixed by the gain and supply voltage, and the rise or slope of each is fixed by its gain in the final summation (which includes negative values (inversion), mind).

A decreasing function can also be made by—take the simple inverting amplifier configuration for example: there is a series resistor from input to -IN, +IN is grounded (or in general, set to some reference voltage), and a feedback resistor connects OUT to -IN. We can modify either resistor's value, conditionally, by putting more resistors in parallel with it depending on the voltage -- such as with diodes in series with the paralleling resistor, or zeners or other voltage drop or threshold elements. When this is done to the feedback resistor, a decreasing function is had; the opposite is true of the input resistor.

Mind, using crude elements like diodes has its price: their voltage drop depends on current and temperature, and isn't perfectly sharp, but gives a soft exponential bend between slopes. This can be compensated in some cases, such as by adjusting signal level with temperature; or it might be reduced with another op-amp in the loop (active rectifier). Or, the curve might be indeed beneficial, as in the triangle-sine shaper network used in analog signal generators.

Since arbitrary mathematical functions can be created (not necessarily using op-amps alone -- usually depending on device properties, indeed like the diode's exponential curve), we can implement any mathematical function we like: multiplication, exponentiation, trig, etc. (Of course, always within limits: good luck implementing \$\lim_{x\rightarrow pi/2^-}\tan x\$. :) ) So we can also solve such a function this way, if we absolutely have to. (Relevant transformations would be best-fit polynomials, Taylor series, that sort of thing; sums or fractions of exponentials; or more ad hoc methods.)

We can also apply discontinuous methods; for example, implementing a sine function by sampling a low-distortion sine wave a dependent time after its zero crossing. We can align the sample with some flip-flops and timers; when the time delay is proportional to the input variable, we get a sinusoidal output. This incurs at least one full cycle of delay, so it has a pretty steep bandwidth limitation; but often this is acceptable (switched-capacitor filters have the same limitation, and saw practical use before DSPs got so cheap; I think some (LT?) chips still offer analog S-C implementations though?).

We can even compose different kinds of functions right away, like using an RC (decaying exponential) instead of a linear ramp, to time the sinewave sample in the above example. I don't know exactly what value that would be, but hey, it's cheap, and maybe it's enough degrees of freedom to fit a function!

The real cleverness is finding a reasonably optimal solution, given specified accuracy and bandwidth requirements.

I don't know of any book references offhand unfortunately, but this may be enough food for thought to get you started. Further reading will include the basic building blocks of course, so, inverting and non-inverting op-amp circuit; differential amplifier and other linear gain-offset circuits; ReLu function (rectified linear, basically what we're doing in the first part, but always in pairs because the output range must saturate to both supplies); op-amp limiter, diode slope or distortion network, triangle-sine network, etc.; and general mathematical approximation methods, including polynomial transforms, least-squares methods, etc.

\$\endgroup\$
1
  • \$\begingroup\$ Thank you for your approach to the subject and for this nice answer. \$\endgroup\$
    – Electronx
    Dec 25, 2022 at 18:58
8
\$\begingroup\$

As pointed out @Tim Williams, this can be done simply, something like this.
Just adjust some components ...

But as you are using some DSP, this can be done also with simple software.

enter image description here

\$\endgroup\$
2
  • 3
    \$\begingroup\$ Be sure to use rail-to-rail op-amp ... \$\endgroup\$
    – Antonio51
    Dec 25, 2022 at 19:49
  • 2
    \$\begingroup\$ Thanks -- visual aids are always helpful! \$\endgroup\$ Dec 26, 2022 at 2:18

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.