sharpie7 / circuitjs1

Electronic Circuit Simulator in the Browser
GNU General Public License v2.0
2.29k stars 633 forks source link

[Feature Request] Control Logic #593

Open JonasForssell opened 3 years ago

JonasForssell commented 3 years ago

Apologies if this is already implemented somehow but If digital logic could be added to Falstad it would make this an outstanding piece of software indeed! Generic processor code could be emulated in a graphical way.

I am thinking on this example where the logic machine seems to be run in the same program as the analog simulation. As shown in figure 5.7 in the paper below for example. Very elegant if it could be implemented.

https://upcommons.upc.edu/bitstream/handle/2117/334346/Digital_Control_Strategy_for_an_LLC_converter.pdf

Perhaps all of this can be done using the VCVS control block? (I have not looked in to this component yet)

pfalstad commented 3 years ago

It already does digital logic, if you mean logic gates. But I'm not sure what the symbols mean in that figure. It seems to be doing analog computation. I didn't go through the whole PSIM manual but there seems to be a voltage adder, an integrator and a limiter, and you can do those with a VCVS. Not sure about the rest.