News for hackers. Stuff that matters.
Re:An open source, educational, low-cost modern analog computer by mk_stjames on Friday June 02, 2023 @12:25PM (#36167209)
A very popular analog computer patchable with 4mm banana jacks was the Comdyna GP-6. I went down a rabbit hole of reverse engineering it from photos and schematics years ago in order to build a version that would fit in a 3U panel for Eurorack modular synth interfacing. Never finished it, but the total BOM was... well, not much. The panel was going to cost more than the board+opamps+passives. I wanted to buy a real Comdyna but I remember the cheapest I found one for sale was ~$700 and I thought that was expensive. Not so much when you compare it to this unit which is housed in just open PCBs and a much smaller format.

If you are a student and want to learn a bit more about how operational amplifiers, resistors, and capacitors alone can solve differential equations... you can get an educational license for Matlab for nothing and Simulink can emulate all the analog circuitry you want and more.

Another approach might be using the Eurorack simulation software VCV Rack - If there isn't an set of modules you can install that do basic gain, integrators, multipliers, comparators, etc then it would be very easy for someone to write one.

Re:An open source, educational, low-cost modern analog computer by felixgallo on Friday June 02, 2023 @01:11PM (#36167900)
Re:An open source, educational, low-cost modern analog computer by thx-2718 on Friday June 02, 2023 @01:19PM (#36168022)
Question since you appear familiar with math simulation, could you do what you're describing with Matlab with Octave instead?
Re:An open source, educational, low-cost modern analog computer by ted_dunning on Friday June 02, 2023 @02:37PM (#36169018)
Yes.

Easier with Julia, though, because the ODE and PDE support is better and you have better / simpler notation. Performance will be better as well, but for simple problems you can't tell.

Re:An open source, educational, low-cost modern analog computer by ChrisRackauckas on Saturday June 03, 2023 @11:51AM (#36177635)
For circuits a lot of them are represented by differential-algebraic equations (DAEs) and require modeling tools in order to handle the high differential index of the systems. This is the reason why they are typically handled via acausal modeling systems which can do index reduction. For Julia, this is the ModelingToolkit portion of the SciML ecosystem (https://docs.sciml.ai/ModelingToolkit/stable/), and some modeling tools like https://github.com/ModiaSim/Modia.jl and OpenModelica front-ends https://github.com/OpenModelica/OMJulia.jl.
Re:An open source, educational, low-cost modern analog computer by fsckboy on Friday June 02, 2023 @02:41PM (#36169074)
I'm not familiar with matlab or octave :) but I do know the discrete and continuous underlying mathematics involved here, and from the https://octave.org/ homepage, "the Octave syntax is largely compatible with Matlab", the answer is yes.

The cool thing about analog computers (or digital approximations or simulations) is that since they are actually integrating (storing charge in a capacitor as the voltage varies) or actually differentiating (current through a capacitor varies with the voltage differential/rate of change) they can calculate what would be very complex to do on paper.

Or more plainly, if the rate that the water flows out of the drain of the bathtub depends on the water pressure above which depends on the depth of the water in the tub, you can study all the math involved (what you did in calculus) or you can just put water in the tub and set your stopwatch (analog computer)

this is basically all that's involved inside a music synthesizer. The complexity comes from stacking together a variety of different concepts once you understand that the concepts are stackable (like when they taught you about arithmetic being commutative, associative, distributive, reflexive, etc)

Re:An open source, educational, low-cost modern analog computer by etrautmann on Friday June 02, 2023 @03:37PM (#36169797)
Yes, but simulink's graphical interface makes simple circuit simulation a bit easier for rapid iteration, testing, etc.
Re:An open source, educational, low-cost modern analog computer by pkaye on Friday June 02, 2023 @05:26PM (#36170965)
I'm wondering if Modelica might be useful for this. Its an open source modeling language though I've never used it. Its basically writing models with differential equations for each of the components and then connect them together to form a system.

https://en.wikipedia.org/wiki/Modelica

Re:An open source, educational, low-cost modern analog computer by GeorgeTirebiter on Friday June 02, 2023 @09:46PM (#36172915)
I have used https://openmodelica.org/. It's another one of those "invest substantial time understanding what they are doing, and you will likely be rewarded." Simple things are simple, but I found it took longer than I would have like to bang out e.g. a PID algo with a particular motor and load. If you want to try this, buy the book, and follow it to the end. Then keep learning, as you build more and more sophisticated simulators.
Re:An open source, educational, low-cost modern analog computer by ChrisRackauckas on Saturday June 03, 2023 @11:48AM (#36177605)
I'd argue that acausal modeling is much easier for circuit design. And there's quite a bit of research, including surveys of experts, that backs it up as well. I recently put out a video exactly on this topic that summarizes some of the research and shows some examples to this end (https://www.youtube.com/watch?v=ZYkojUozeC4). Acausal modeling definitely isn't something that is taught in most (American) engineering schools, but once you get the brain flip it pretty clearly can improve productivity, no matter which acausal modeling language is used.
Re:An open source, educational, low-cost modern analog computer by mk_stjames on Saturday June 03, 2023 @02:19PM (#36179125)
Responding at the bottom of the thread here, and also just to say Hi to Chris above.

So in my top level I mentioned Simulink as a nice path for students to learn modeling circuits, and in a way then could use this path to simulate what an Analog computer such as that in the original link is running.

My early forays into numerical simulation and linear systems modeling were thru Simulink, and I've built models of some very big systems in Simulink and used them in the design process of various things- typically vehicles, automotive systems; modeling powertrains, electro-hydraulic controls, EV drive cycle range simulation, etc. That was all many years ago.

I then went down the path of learning a bit of OpenModelica and as I was intrigued by the acausal approach and the open source aspect. Like anything the learning curve was steep (steeper than simulink) and I never got past a lot of clunkiness.

Then I discovered Julia a few years ago and even though I've moved on to other work, I've followed how people using Julia are modeling and solving closely, and what Chris says about how building acausal systems can be easier, and the benefits seen in ModelingToolkit.jl combined with the full Julia ecosystem all rings so true. I'm really excited to eventually see a full on acausal, block-based, yet easily extendable Simulink competitor sprout from Julia devs because as it does it will be the killer app for the language for a lot of engineers, IMO.

Funny enough, now Mathworks implements an acausal modeling approach in the Simulink GUI domain with their 'SimScape' add-on, but I have not gotten a chance to use it.

Anyway, yeah I need to get a project going to utilize some of the latest happenings in Julia modeling, and maybe find a way to contribute. Cheers to you and the other devs, Chris!

Re:An open source, educational, low-cost modern analog computer by ChrisRackauckas on Saturday June 03, 2023 @11:45AM (#36177582)
The creators of Modelica, Hilding Elmqvist and Martin Otter, work in Julia these days so there's been a boom to the development of acausal modeling tooling in Julia. They built https://github.com/ModiaSim/Modia.jl and then we collaborated with them on some ideas to build ModelingToolkit.jl (https://docs.sciml.ai/ModelingToolkit/dev/). The latest versions and experiments in OpenModelica are now targeting ModelingToolkit as a compilation backend, which gives a pathway for legacy Modelica code to be used with the MTK ecosystem. The OpenModelica community has always been a very small group in comparison to the Dymola compiler team and so the open part of Modelica never really caught on, but we hope to help them piggyback off of our compiler to get it there. We'll have a workshop on this collaboration in Linköping next February if you're interested in the details.
Re:An open source, educational, low-cost modern analog computer by wrp on Saturday June 03, 2023 @10:12PM (#36182403)
Matlab has Simulink, but I don't think there is anything equivalent for Octave. However, Scilab has Xcos. In general, if you don't need total compatibility with Matlab, you should take a look at Scilab, because it is much more polished than Octave.
Re:An open source, educational, low-cost modern analog computer by ruleforty on Friday June 02, 2023 @03:12PM (#36169471)
Might I suggest the LMN-3 - soup to nuts the most positive project I see and gaining traction and affordability: https://youtu.be/h5UmPTttN1s
Re:An open source, educational, low-cost modern analog computer by Archit3ch on Friday June 02, 2023 @03:37PM (#36169800)
> If there isn't an set of modules you can install that do basic gain, integrators, multipliers, comparators, etc then it would be very easy for someone to write one.

VCV Rack cannot do Zero Delay Feedback because each cable adds one sample of delay. You can do it inside your module, of course.

Re:An open source, educational, low-cost modern analog computer by buescher on Friday June 02, 2023 @09:34PM (#36172847)
Simulink is of course the modern replacement for an analog computer and does a lot more. For open source there is Scilab xcos and underneath it OpenModelica.

It would be crude and inefficient but you also could use spice and rig up op amps just like a physical analog computer if you just want to learn or if spice is your comfort zone. Or if you want to add additional analog circuitry or spice models. It’s the 21st century so it will be fast enough computationally for small to medium sized models.

Re:An open source, educational, low-cost modern analog computer by c-c-c-c-c on Saturday June 03, 2023 @05:48AM (#36175179)
I've had an ebay watchlist for the Comdyna GP-6 for a few years now. Seems like Im not the only one in this hole. :-)