I would like to build a function approaching a ramp function with some parameters defining:
- the activation threshold
- the linear slope
- the 'distance' to the discontinuity, i.e how close we are from the ramp function.
I have started to work on this by combining rational and exponential functions, but I have trouble having isolating the very parameters that control all of this...


Hint:
As explained in this related post one of the simplest approximations to the ramp function (which is the integral of the Heaviside step) is the following $$ R(x) = {x \over 2}\left( {1 + {x \over {\sqrt {x^{\,2} + \varepsilon ^{\,2} } }}} \right)\quad \left| {\;\varepsilon < < 1} \right. $$