Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Waveform/Source Library #1046

Open
tomhajjar opened this issue Nov 6, 2024 · 7 comments
Open

Waveform/Source Library #1046

tomhajjar opened this issue Nov 6, 2024 · 7 comments

Comments

@tomhajjar
Copy link

tomhajjar commented Nov 6, 2024

Would it be useful to have a Library of Sources made up of sub-circuits? It would speed making say Triangle, Sawtooth, Clock, 3-phase source...etc. LTspice users have created a number of source.asy.

2024-11-05_230106
2024-11-05_230136
2024-11-05_230224

Waveforms_prj.zip

@ra3xdh
Copy link
Owner

ra3xdh commented Nov 6, 2024

Please wait with this library and similar libraries. We need first to backport this rejected PR from Qucs: Qucs/qucs#659 This will allow to show XML defined devices on the system components panel. Otherwise these source will have bad visibility for user.

@csrabak
Copy link

csrabak commented Nov 6, 2024

With adherence to @ra3xdh guidance about the timing, I think the idea of having already parametrized "well known" and "useful", for the accepted at this group definitions thereof, of these sources would speed up the usage for people who are newcomers to the simulator.

From a neophyte perspective the parametrization of such sources requires the command of a new mini programing language, and on the other hand we've a semiotic clash when you've a menu to pick and place components in the canvas.

I would even go further and suggest we get a sub GUI for the parametrization of these sources, easing even more this task to allow users to put focus and energy in the simulations themselves.

@ra3xdh
Copy link
Owner

ra3xdh commented Nov 8, 2024

I propose the following addition to improve the pulsed source usability:

  • Add a button named like Interactive source setup in a pulse sources properties dialog. This button will be inactive for other devices. The dialog window will appear after clicking on this button. This dialog will allow to define the parameters based on some patterns like sawtooth, triangle, meander, trapezoidal. The dialog window may contain an image representing waveform, drop-down list and input fields. This will automatically calculate the pulsed source parameters.
  • Alternative: add a special pulse source like Unified source. A dialog window like mentioned before will be opened after clinking on this source. This source could be mapped to SPICE PULSE source.

In other words this issue should be resolved in C++ level.

@tomhajjar
Copy link
Author

tomhajjar commented Nov 8, 2024

Pulse is a good one to start with. Pulse can also be V or I. I in Qucs-S generates -I.

One can also specify how many pulses or continuous.

PULSE(V1 V2 TD TR TF PW PER NP)

Name Parameter Default Value Units
V1 Initial value - V, A
V2 Pulsed value - V, A
TD Delay time 0.0 sec
TR Rise time TSTEP sec
TF Fall time TSTEP sec
PW Pulse width TSTOP sec
PER Period TSTOP sec
NP Number of Pulses (NP set to 0 or omitted denotes unlimited pulses)

2024-11-08_105824
2024-11-08_105804

@tomhajjar
Copy link
Author

I made a number of Source subcircuits for use in "analog" and XSPICE "digital" Simulations. Might be useful to someone.

Waveforms_prj.zip

@ra3xdh
Copy link
Owner

ra3xdh commented Jan 6, 2025

I made a number of Source subcircuits for use in "analog" and XSPICE "digital" Simulations. Might be useful to someone.

I am not inclined to include this library in the distribution. This problem should be resolved in C++ level. See my comment about a custom dialog above.

@tomhajjar
Copy link
Author

tomhajjar commented Jan 6, 2025

No need to be in distribution or made into a Library. They are available in the Discussion section.

XSPICE "digital" will require something different than your planning. XSPICE has built-in digital sources and any analog source can be made into a digital source with a ADC Bridge. The reverse is also true. They are much easier to use once made into subcircuits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants