I need to have a switch controlled by current, but I need to treat the current value as absolute value, so that wither its positive or negative, I can use the same model settings for the switch.
Status: open Group: v1.0 (example) Created: Tue Aug 06, 2019 05:42 PM UTC by Samir Sabri Last Updated: Tue Aug 06, 2019 05:55 PM UTC Owner: nobody
I need to have a switch controlled by current, but I need to treat the
current value as absolute value, so that wither its positive or negative, I
can use the same model settings for the switch.
I need to have a switch controlled by current, but I need to treat the
current value as absolute value, so that wither its positive or
negative, I can use the same model settings for the switch.
is there any possible way to achieve this?
Instead of driving the switch directly from a network current,
add a B-source to control it indirectly. The B-source equation
allows one to apply an arbitrary expression to the node voltages
and branch currents that are to set the switch state. Adding the
B-source allow to use either a current or voltage controlled
switch.
-marcel
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
the source for this question is based on a discussion here: https://electronics.stackexchange.com/questions/450938/recommendation-for-simple-relay-model
Use two switches in parallel, one opened with positive, one with negative current.
Or use a B source with an expression containing the current and a ternary function a?b:c to check if the current is positive or negative.
Can you please give simple example of both approaches? I am just very new
to Ngspice and I've just discovered
B
On Wed, Aug 7, 2019, 12:27 AM Holger Vogt h_vogt@users.sourceforge.net
wrote:
Related
Support Requests: #43
Can you please check this: https://electronics.stackexchange.com/questions/453551/current-controlled-switch-with-negative-current
On 2019-08-19 06:34, Samir Sabri wrote:
[..]
Instead of driving the switch directly from a network current,
add a B-source to control it indirectly. The B-source equation
allows one to apply an arbitrary expression to the node voltages
and branch currents that are to set the switch state. Adding the
B-source allow to use either a current or voltage controlled
switch.
-marcel