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

VoltageSwitch does not support negative hysteresis #209

Open
Developer-Alexander opened this issue Jan 9, 2023 · 3 comments
Open

VoltageSwitch does not support negative hysteresis #209

Developer-Alexander opened this issue Jan 9, 2023 · 3 comments

Comments

@Developer-Alexander
Copy link

I was expecting that VoltageSwitch behave like when used with a negative hysteresis:

If Vh is negative, like in this case, the switch will smoothly transition between the on and off impedances.

https://www.analog.com/en/technical-articles/ltspiceiv-voltage-controlled-switches.html

But smooth transition between the on and off impedances when used with negative hysteresis seems to be not implemented.

I want to ask kindly to add this feature.

@svenboulanger
Copy link
Member

svenboulanger commented Jan 10, 2023

Hi,

I currently don't have the intention of adding LTSpice-only features in the core package (also, LTSpice is closed source so the best I could do is emulate the behavior).

If you would like to achieve the kind of transition that they are talking about, perhaps you might take a look at SpiceSharp.Behavioral?

Yours sincerely,
Sven

@Developer-Alexander
Copy link
Author

I don't think that this feature is LTSpice only. ngSpice / Pyspice does support it aswell. And it is a very useful feature in my opinion.

Alternatively: would you mind to make the private members of SpiceSharp.Components.Switches.Biasing protected instead? This would allow to overwrite it to implement something like a SmoothVoltageSwitch.

@svenboulanger
Copy link
Member

PySpice is not really a simulator, it does reference ngSpice and Xyce however.

I could not find the implementation in ngSpice (their loading behavior). Perhaps they transform a negative hysteresis to a different kind of component? I couldn't find documentation about this in their manual either (v38, maybe too old?). I am not sure about Xyce. I could not find any switches in HSpice and I couldn't find info about negative hysteresis in PSpice, TSpice or SmartSpice.

The alternative part I could look into. I'm generally in favor of exposing as much as possible such that it can be overridden.

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

2 participants