sharpie7 / circuitjs1

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

Impedance #686

Open KevinashoUWU opened 2 years ago

KevinashoUWU commented 2 years ago

Please add impedance with A + jB form, or polar instead

pfalstad commented 2 years ago

you want to measure the impedance of a circuit? or you want to add a complex impedance component to a circuit?

KevinashoUWU commented 2 years ago

Add a complex impedance

Tremeschin commented 2 years ago

I'm interested in this feature, it's monotonous and slow having to convert manually reactance to equivalent capacitance or inductance and micro managing two distinct components to get a wanted Z, that would be a big quality of life improvement :)

TimFFischer commented 2 years ago

I'm also interested in such a feature set. Until now, I tried to emulate an RLC component with constant impedance amplitude and varying phase (phase angle can be changed by the slider). Maybe this circuit can be of help for somebody.

The subcircuits are:

The limitations are:

pfalstad commented 2 years ago

The problem with doing anything related to impedance or phasors is that I need to know the frequency of the source, which has to be sinusoidal. I suppose could have a check to make sure that the circuit only contains one time-varying source and make sure it's a sine wave, so I can get the frequency and do the calculations. If that check fails, I could generate an error.

TimFFischer commented 2 years ago

One could also have multiple time-varying sinusidal sources, when the frequency base is fixed. Not sure, whether the "fixed frequency option" is better to be selectable on the sidebar, as an option in the dropdown of the source menu or as an element in the option menu. Maybe, it's even better to have this type of simulation in the "afilter" instead - then the bode diagram and pole zero plot can be used (but this simulation would need additional things like multiple outputs, current measurement, etc.).

Generally, it would be great to have additional components in this type of simulation:

Enough for my "wish list" ;-)