Return scale factor for second order block
function scaleFactor2 import Modelica; input Real n1 "(z^2 + n1*z + n2)/(z^2 + d1*z + d2)"; input Real n2 "(z^2 + n1*z + n2)/(z^2 + d1*z + d2)"; input Real d1 "(z^2 + n1*z + n2)/(z^2 + d1*z + d2)"; input Real d2 "(z^2 + n1*z + n2)/(z^2 + d1*z + d2)"; input Real small = 100*Modelica.Constants.eps; output Real k "= (d2+d1+1)/(n2+n1+1), if numerator and denominator are not zero, otherwise special cases"; end scaleFactor2;