[SciPy-User] soft limiter function

Neal Becker ndbecker2 at gmail.com
Tue Mar 10 11:30:03 EDT 2015


Matt Newville wrote:

> Neal,
> 
> 
> On Tue, Mar 10, 2015 at 9:10 AM, Neal Becker <ndbecker2 at gmail.com> wrote:
> 
>> I'm looking for a parameterized set of functions, similar to logistic,
>> where
>> a parameter determines the 'sharpness' of the transition from the linear
>> region to the flat region.  I need to keep all the same scaling and
>> derivative near the origin - so like a family of logistic functions that
>> would overlay near the origin, but would become increasingly sharp
>> limiters
>> as the parameter was varied.  In the limit, would approach the ideal
>> limiter
>>
>>       x |x<1|
>> y = { 1 x > 1
>>      -1 x < -1
>>
> 
> This might be too simplistic, but have you considered the "classic"
> step-like functions (here, going from 0 to 1, but not necessarily at
> x=+/-1):
> 
>     arctan:     y(a) = 0.5 + arctan(a) / pi
>     error fcn:  y(a) = 0.5 * (1 + erf(a))
>     logistic:   y(a) = 1.0 - 1.0 /(1.0 + exp(a))
> 
>  where a = (x-x0)/sigma ?     That gives you a knob (sigma) to control the
> sharpness of the step.
> 
> --Matt

Thanks, but I also need the derivative near the origin to be 1 - cannot 
change the steepness near the origin

-- 
Those who fail to understand recursion are doomed to repeat it




More information about the SciPy-User mailing list