0
\$\begingroup\$

Does the electronic circuit equivalent of a mathematical model have any inherent advantage over numerical simulation of the same model ?

For instance, if I numerically simulate the Navier-Stokes equation and obtain a time-series of the velocity field and compare with the time-series of the voltage from an electronic circuit equivalent of the Navier-Stokes equation.

\$\endgroup\$
6
  • \$\begingroup\$ I don't get it. Are you asking if a resistor transfer function better be read of an actual resistor in a circuit or from it's PSPICE simulation? \$\endgroup\$ – Eugene Sh. Jan 10 '19 at 19:42
  • \$\begingroup\$ @EugeneSh. I think he might be talking about continuous vs discrete math. Since an analog computer would theoretically do everything perfectly, while with discrete math you only get closer to the real answer the smaller time step you have. - I could be 100% wrong though. Ey Frost, elaborate a little, will ya? \$\endgroup\$ – Harry Svensson Jan 10 '19 at 19:45
  • 1
    \$\begingroup\$ @HarrySvensson I completely agree with you. I saw the question as more about s space vs z space; or as the difference betweeen Kalman-Bucy continuous time and Kalman discrete time analysis. But it may also include numerical simulation features too, such as truncation and rounding, limited precision constants and limited precision operations. (For example, standard deviation calcs over data with a wide dynamic range which don't presort the FP data prior to computation and summation, can yield grossly incorrect results.) Add in various drift and precision issues, too. \$\endgroup\$ – jonk Jan 10 '19 at 19:49
  • \$\begingroup\$ Noise is far more of a problem in the analog domain. But the traditional way of doing fluid dynamics in analogue is the wind tunnel.. \$\endgroup\$ – pjc50 Jan 10 '19 at 19:53
  • \$\begingroup\$ Thanks for the comments. To elaborate: My interest is in creating a circuit with a voltage output that shares the same statistical properties as the output velocity from a numerical simulation of the Navier-Stokes equation at large Reynolds number. I was wondering if there is any specific advantage with doing analog computing... \$\endgroup\$ – Frost Jan 11 '19 at 3:02
2
\$\begingroup\$

Does the electronic circuit equivalent of a mathematical model have any inherent advantage over numerical simulation of the same model ?

I've bolded the most important word in your question.

Yes, there are a few advantages, but as an electrical engineer you always work with trade-offs. Meaning that you gain X but lose Y, you can't have both X and Y, unless you increase $. I will mention some advantages first, and then all the disadvantages.


Precision is one advantage that Jonk mentioned a little bit in his comment. Instead of dealing with number of bits in a data type, such as a float (32 bit) or a double (64 bit) or a long double (128 bit). Instead you are dealing with planck units which is the smallest value anything can have, be it mass, length, time, charge and temperature. We are interested in time and charge, because those two relate to the only part we are interested in when it comes to implementing the mathematical equation in an equivalent electronic circuit.

To put some numbers to it, the Planck time is about \$5.4\times10^{-44}\text{ s}\$, and the Planck charge is about \$1.9\times10^{-18}\text{ C}\$. These are the values that the universe is using to quantify these units, meaning that if you can represent these values then you can make a perfect prediction of the real world, iff you ignore all the noise.

A float can approximate a Planck charge with some error, this is called quantization noise (which is a small error), which will show up as noise, error, whatever you want to call it, unwanted effects. Which will appear if you try to do it with a digital computer. A float doesn't have enough bits to start representing a Planck time. A double can approximate the constant Planck charge and Planck time with some less error. So you can use a long double or use some custom library, sure, go for it. But you will still never be able to represent the constants exactly because we are using base 2 and the constants are defined by irrational numbers. So now we know that we can't even represent them, ever, with a digital computer. But with an electronic circuit you can. Then add all the operations you need to perform digitally, you got errors in your values from the start, as you start calculating all the errors will accumulate and your answer will contain the true answer + the errors, so digitally you will never truly see the exact value.

Execution time is another advantage, you will most certainly be able to propagate through the mathematical equation much faster than you would digitally. This depends on the actual mathematical equation that is implemented though, since multiplication and division tends to be faster in the digital domain. But if you are multiplying or dividing by a constant then you can use op-amps which can outperform a digital computer also doing a multiplication by a constant.

Power consumption is maybe an advantage, since implementing the equation in a circuit should take less power than doing the same thing on a computer. This depends heavily on the architecture of whatever processor we are talking about. But in a perfect world where noise doesn't exist, the physical circuit should be more energy efficient. This is more of a gut feeling, which is why I said maybe advantage.

There are also other advantages, I'm sure I've forgotten to mention some, but at some point this answer must be delivered. The major advantages are precision, speed and power efficiency. But at what cost?


As I said earlier, it's all about trade-offs. What do we lose? Or rather, what penalty must we face if we only use the analog domain? I've accidentally mentioned some disadvantages above.. so it will be few repetitions.

Noise is the major disadvantage, noise comes in all shapes and forms, all from people breathing onto the components to radio waves and a bazillion other sources. Since noise is the largest culprit I will mention them separately below.

Inaccuracy is another disadvantage, this comes from noise in the form of components changing their properties over time, meaning that their values drift from their original values. The source of this can be due to temperature, aging, humidity, radio waves, position of the moon, you name it. Even pressure or the concentration of helium in the air. On a digital computer 5*3 will yield 15 on a sunny day or on a winter day. But in the analog domain you might get 14.99 or 15.01, again, noise.

Price is another disadvantage, implementing everything in software is technically for free, while implementing the exact same thing on a physical circuit can cost anything, from cheap to very very expensive. The more expensive you go the better the components and you can opt for less drift components and all that. There are components specifically made to drift very little as their temperature changes or as they age, but you can't eliminate the drift. This is also heavily related to the tolerances of components. In an ideal world the tolerances of all component values are 0%.

Measuring (loading your circuit) is another disadvantage, you mentioned that you wanted a voltage output which obviously is because you want to see the output in a clear way. The act of measuring will load the circuit, what I mean by this is that the voltage will change slightly just because you are measuring with an instrument that doesn't have infinite impedance, so whatever value you do see, it will not be true. This is because no circuit has 0 output impedance, so measuring will form a voltage divider + a filter of some sort, probably a band-pass filter due to other mumbo jumbo capacitance and inductance in your probe.

The quantization noise is another disadvantage, I mentioned quantization noise before, here I will name it again because you will use an ADC (Analog to Digital Converter). The loaded output that you are measuring will snap to predefined values (imagine a grid) which whatever instrument you are using can interpret digitally. Say you have a 2bit ADC with a voltage reference of 3 volt. Then the voltage 0.51 V and 1.49 V will snap to the value 1. As you can see there is almost an entire volt that returns the same value. That's quantization noise, which you can move around by using filters (high-pass for an example), but you can't eliminate it.

non-ideal components (parasitics) is another disadvantage, a resistor isn't really a resistor, it's a resistor and an inductor and a capacitor where the inductance and capacitance has been designed to be as low as possible so it will behave as much as a resistor as humanly possible. Same thing with an inductor and a capacitor, they all contain parts of each other, which are called parasitics. That's right, capacitors leak, meaning that it will discharge on its own, it will also have an ESR (equivalent series resistance) and other unwanted parameters. I'm barely touching on the surface of all the problems due to parasitics. This means that you probably can't design your mathematical equation good enough.

Maybe being forced to use shielding is another disadvantage, if you want some circuit to receive less noise from the outside world, then you need to place a cage around your entire circuit and connect the cage to ground.

Reflection (in a transmission line) is another disadvantage, if your circuit is very fast then the signal will bounce back and forth on the wire, to get rid of this bouncing you need to terminate the signal. Literally kill the signal with a resistor. If this resistor doesn't have the correct value then a part of the reflection will keep bouncing and eventually die off through the resistor and other resistive components, such as the wire. So this is wasting power, but this is only relevant for high frequency circuits.

I'm sure there's more that I haven't touched on. But this answer can't be too large.


The bottom line is this, a computer is reliable and cheap, an analog circuit is only as good as less noise there is. Technically both have quantization errors, so no matter what you do, you won't get the exact value. I doubt that you have the time and energy to make a proper analog circuit for only calculating the Navier-stokes equation. I recommend using a computer. Just write good code and you'll be good.

If the Navier-stokes equation takes so much time to compute digitally, then use googles HPC (High Performance Computation). Then you can use custom floating point data types with absurd number of bits. Though I bet that a 128 bit long double will suffice. Or just use several threads on your computer so you parallelize your problem.

\$\endgroup\$
3
  • \$\begingroup\$ Planck units are definitively NOT how the universe “quantizes” anything. These denote the absolute minimum precision of a measurement, but these still assume continuity and an infinitely “quantized” universe. ThIs might look like mere semantics, but that’s how the underlying mathematics are used. Analog time is absolutely continuous, not quantized in any form, pi/3 planck times and sqrt(pi) Planck times are perfectly valid measurements. Now for currents you do have to consider the electron charge. \$\endgroup\$ – Edgar Brown Jan 12 '19 at 0:26
  • \$\begingroup\$ @EdgarBrown I've read your comment a couple of times and I still don't understand it. - I thought that the Planck units were similar to \$dt\$ used in this equation for an example: \$V_c(T)=\frac{1}{c}\int_0^TI_c~dt\$. I mean it's also continuous, yet there's a \$dt\$. - But maybe I should just remove the Planck text if it is not helping. \$\endgroup\$ – Harry Svensson Jan 12 '19 at 0:51
  • \$\begingroup\$ It suffices to say that the universe is continuous, Planck units only denote the minimum posible measurement resolution. But that is really irrelevant, as noise and bandwidth are the actual physical limits of an analog system. \$\endgroup\$ – Edgar Brown Jan 12 '19 at 0:56

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