Skip to content

Commit

Permalink
refs #2017, #2270: Add state events for voltage saturation
Browse files Browse the repository at this point in the history
See Modelica.Blocks.Nonlinear.Limiter for the best practice of limiter modeling with state events
  • Loading branch information
beutlich committed Oct 14, 2017
1 parent a50d97d commit 9d5bc99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Modelica/Electrical/Analog/Ideal.mo
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ If the input voltage is vin larger than 0, the output voltage is out.v = VMax.
end if;
in_p.i = 0;
in_n.i = 0;
v_out = smooth(0, min(vps, max(vns, V0*v_in)));
v_out = homotopy(actual = smooth(0, if V0*v_in<vns then vns else if V0*v_in>vps then vps else V0*v_in), simplified=V0*v_in);
annotation (defaultComponentName="opAmp",
Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,
100}}), graphics={
Expand Down

0 comments on commit 9d5bc99

Please sign in to comment.