6 ms·
I will respectfully disagree about opamp feedback loops being recursion. It is almost magical but I do not see any recursive nature in it. You can't compute fi
by exDM69 4y ago
I will respectfully disagree about opamp feedback loops being recursion. It is almost magical but I do not see any recursive nature in it.
You can't compute fib(n) recursively with O(1) transistors. Maybe if you use the non-recursive exponentiation formula.
Analog electronics is different from digital computation because it's not about inputs and outputs, cause and effect in the same manner. A circuit maintains an equilibrium between inputs and outputs. The input doesn't cause the output as the changing the output may affect the input.
Just a simple resistor is an example: is voltage or current the input to Ohm's law? Neither is.
Same with the opamp feedback loop. It looks like it feeds its output to the input and then repeats. But it doesn't, it just maintains the same relationship between them by pumping electrons from the power supply. Short circuit the output to ground and you will see the circuit load the input circuit more.
That said opamp circuits are very cool. The patent for negative feedback was rejected as "another perpetual motion machine". Yet it works and it works magically.
A (bad) opamp can be cobbled together from 4 or 5 transistors. Yet it can do, together with negative feedback: addition, subtraction, multiply by constant, integral, derivative, exponent and logarithm. Probably others too. Combine log, add, and exp and you have a multiplier.
But it won't do a Fibonacci, a factorial or the Ackermann function.
There is no way I am aware of that could compute anything of recursive nature with a constant number of parts. You need some form of memory ("space") and a method of repeating the same computation ("time") to qualify.
You certainly can build this kind of computer with digital, or even analog, circuits. But negative feedback in opamps is not it.
This is my contribution to the Sunday morning semantics debate on the nature of recursive computation.
- jojobas 4y agoWith a delay line and an opamp adder you can in fact sort of loop-compute fib(n). It won't be recursion though, more like a direct forward loop.
- artemonster 4y agoFeeding own output to own inputs IS a definition of a recursion
- atoav 4y agoI don't think so, recursion would be having another opamp in the feedback path, which in turn has yet another opamp in it's feedback path and so on.
- artemonster 4y agoWhy function application instantiates new opamps?! Its one feeding itself
- mxkopy 4y agoThere's no function application in circuitry. See > It looks like it feeds its output to the input and then repeats. But it doesn't, it just maintains the same relationship between them by pumping electrons from the power supply.
- dahart 4y ago> There’s no function application in circuitry. Why do you say that? Of course there is. It would be more accurate to say all circuitry is built out of function applications, both analog and digital. If you can write an equation for the voltage on a given trace, the circuit applies a function. If you can write a truth table for a given component, that’s a function applicator. The whole reason we can build software functions is because we build them on top of circuit functions. Saying feedback doesn’t exist because it’s just electrons is like saying people are just atoms; it ignores the structure of the system. While all electric circuits pump electrons, signal feedback is a physical reality, one that you can even see & hear first-hand in some circuits. The OP maybe forgot momentarily to think about capacitors and time-varying inputs when they claimed analog circuits don’t have a time component.
- mxkopy 4y agoFor context I'm talking about function application a la lambda calculus. In this case 'function application' is something that's done to discrete symbols. Circuits aren't a discrete system however so there's no mapping. Functions are a good way to describe things but it's not what they are fundamentally. OP also made a good point about how the inputs can change with the outputs but it's not recursive. It's literally the same process as water flowing more slowly into a lake as the lake gets more full. My intuition with circuits is that you'll end up doing something like that if you try to feed the output to the input without an intermediary store like a delay line or capacitor. And even then it's not recursive unless the algorithm you're running is tail optimized.
- TomWhitwell 4y agoThe patent for negative feedback was rejected as "another perpetual motion machine" - I’d never heard this! Do you have a reference so I can read more?
- HPsquared 4y ago"Inventing the Negative Feedback Amplifier", IEEE Spectrum (Dec 1977) https://wiki.epfl.ch/me412-emem-2020/documents/06501721.pdf https://wiki.epfl.ch/me412-emem-2020/documents/06501721.pdf The difficulty with the patent office is on the last page.
- exDM69 4y agoI read about this story in Horowitz, Hill : "The Art of Electronics" chapter on negative feedback. You can find an old edition freely available here: https://archive.org/details/TheArtOfElectronics/Vol-1/mode/1up https://archive.org/details/TheArtOfElectronics/Vol-1/mode/1...
- enord 4y agoOfcourse an electric circuit cannot be «recursive» as such, because the physical ontology in which they are defined does not admit mereological (part/whole) relations, that would be «spooky action at a distance». The signal function, being an interpretation (or specification) of the circuit, is a metaphysical ontology and is often defined in terms of itself at adjacent points in it’s domain, i.e mereological in nature, which is to say: recursive.
- dahart 4y ago> Analog [is] not about inputs and outputs [...] A circuit maintains an equilibrium between inputs and outputs. Capacitors provide memory and time-varying behavior. That’s one thing I’m sure you just forgot about for a minute. There are analog A/V circuits all around the world that explicitly feed back to themselves, thus in a sense explicitly computing a recursive function. > There is no way I am aware of that could compute anything of recursive nature with a constant number of parts. You’re forgetting about tail-recursion. In addition, a stack is still a constant number of parts (all computers & digital circuits have a recursion limit), and circuits are perfectly capable of repeating the same computation, even analog ones, so they qualify there at least.
- marmetio 4y agoInductors too. In a state-space model, capacitances and inductances are the state variables.
- dahart 4y agoIndeed - the capacitor and the inductor go together like peanuts and chocolate. Maybe try to find an electronic device you own that doesn’t have an LC circuit in it! ;)
- exDM69 4y agoCapacitors and inductors are "memory" but only one unit or "word" per component. You need more than one to make a stack to have recursion. Mercury delay lines, neon bulbs, magnetic drums or disks and lots of other components are also capable of storing a quantity for some time. Tail recursion is just a loop, and we certainly can do simple repetition in a circuit. I'm not arguing that you can't build a digital or analog computer capable of recursion, you certainly can but it takes O(n) components where n is recursion depth. But I am arguing that a feedback loop in an opamp circuit is not a form of recursion. It is not capable of computing the Ackermann function or any other recursive function, which I consider the smoke test here.
- dahart 4y ago
- naasking 4y ago> You can't compute fib(n) recursively with O(1) transistors. [...] There is no way I am aware of that could compute anything of recursive nature with a constant number of parts. Every compute CPU in existence has a fixed number of transistors, so by this argument you can't compute fib(n) on any computer. In one sense this is technically correct because there is no bound on n, so you will encounter some n after which fib(n) will fail. Obviously this is not what you meant though. The fixed number of parts is not the issue, it's whether they can be arranged to compute the function you want using the equilibrium behaviour you describe. Obviously this can be done if this equilibrium behaviour reproduces digital logic, so I'm not convinced it can't be done by in analog form, there just hasn't been a pressing need for it.
- exDM69 4y ago> Every compute CPU in existence has a fixed number of transistors, Fixed and very large number. It can compute fib(n) for a finite but large number n. Even with infinite time, my computer couldn't compute fib(2^128) recursively because there is not enough memory to store the stack. You need O(recursion depth) memory, which implies number of components in the same order of magnitude.
- naasking 4y agoRight, but my point is that the component count scaling requirements for an analog circuit are basically the same, so of course you can compute fib(N) using analog circuitry. You can even do it using a fixed number of components, as long as the component count is large enough.
- kilgnad 4y agoAs long as a system can be defined in terms of itself it fits the definition of recursion if we are to follow the official definition of recursion. Whether that recursion is capable of doing certain things is another matter entirely. This is a semantic issue. Not worth it to get to deep into how I define a word or how you define a word. But I will say that my definition of the word recursion is more inline with the official definition, and that official definition does encompass an opamp. Source: https://en.m.wikipedia.org/wiki/Recursion https://en.m.wikipedia.org/wiki/Recursion (see first sentence)
- deleted 4y ago[deleted]
- danielheath 4y ago> There is no way I am aware of that could compute anything of recursive nature with a constant number of parts. Computers have a constant number of parts, and also can’t compute arbitrary recursive functions - they run out of space.
- xodjmk 4y agoJust define an escape condition, like do "recursions until we reach zero". I don't think recursion has to be infinite? One example is tail-recursion which can be statically defined by a compiler.