sharpie7 / circuitjs1

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

Feature Request: More electrical elements #554

Open MarinoHappiness opened 3 years ago

MarinoHappiness commented 3 years ago

Hello,

Thank you for adding power converters and DC motor in the app. Please keep it up. I often use your app to learn about electronics and I hope you will add other good electric elements and circuits, such as resonant converters, BLDC motor, IGBT, Arduino, sensors, etc.

I had no success with simulating resonant converters. Can someone give a link to a good resonant converted circuit?

Will you be creating elements of mathematical algebra for the app (for feedback/control loops)?

Thank you, Marino

pfalstad commented 3 years ago

What do you mean, elements of mathematical algebra?

MarinoHappiness commented 3 years ago

472px-Typical_State_Space_model svg

The mathematical models used for designing feedback/control loops in electrical [control] engineering.

pfalstad commented 3 years ago

Well you can use a VCVS to do an adder: https://tinyurl.com/y54mfw2k

And there is an integrator example under Circuits->Op-Amps->Integrator.

MarinoHappiness commented 3 years ago

I see. Thank you for creating this element. I hope you will expand the Controlled Source Output Function with other mathematical functions (integration, constants, differentiation, etc.) for simulating PID control.

pfalstad commented 3 years ago

You can put constants in there, or any other mathematical function except for integration and differentiation.

MarinoHappiness commented 3 years ago

Why excluding those two? Doing integration and differentiation in PID control with operational amplifiers turns out to be an over endeavor. I think it's easier to define the mathematical functions of PID control using only Controlled Source Output Function elements. See what I mean: https://tinyurl.com/y4rbykjz

pfalstad commented 3 years ago

If I added integrators/differentiators, I would probably do it as separate components (not part of the VCVS) because they require state. They're not just simple functions of the input. For now you can create a subcircuit and encapsulate the op-amp implementation to make it smaller and more convenient.

IPlayZed commented 3 years ago

I was wondering if there is a way to create multi-emitter BJTs, or if I just haven't found it? Thanks!

pfalstad commented 3 years ago

No multi-emitter BJT's, sorry.

pfalstad commented 3 years ago

You use a VCVS to do integration/differentiation now. http://www.falstad.com/circuit/customfunction.html