Smoothing function between 2 constants with a variable

remarkablex

New member
Joined
Dec 17, 2018
Messages
5
Hi
I have 2 constants and one variable (x).


I need an easy ease - smooth transition function (something like "S" shape) between 2 constant values (c1 & c2) with a variable (x, from 0 to 10). So when the x is 0, target value will be "c1". When the x is 10, target value will be "c2".
And the proper smoothed target values in between 0 & 10 values of x variable.


c1: first value of the constant


c2: last value of the constant


y: our target value that we want to determine


m: Middle point of the constants that when the x is 5.






Which function or method do you suggest for put this datastogether? Sigmoid-like interpolation?
I couldn't bring this equation together with 2 constants, mid point and x variable.


Any help will be appreciated....

Best regards...
 
Hi
I have 2 constants and one variable (x).


I need an easy ease - smooth transition function (something like "S" shape) between 2 constant values (c1 & c2) with a variable (x, from 0 to 10). So when the x is 0, target value will be "c1". When the x is 10, target value will be "c2".
And the proper smoothed target values in between 0 & 10 values of x variable.


c1: first value of the constant


c2: last value of the constant


y: our target value that we want to determine


m: Middle point of the constants that when the x is 5.






Which function or method do you suggest for put this datastogether? Sigmoid-like interpolation?
I couldn't bring this equation together with 2 constants, mid point and x variable.


Any help will be appreciated....

Best regards...

Sigmoid might do it.
Logistic might be more natural.
I once used a least-squares Inverse Tangent for some runoff data related to death claims in a life insurance company. Auditors hated it. No one understood it well enough to remember what I had explained to them the previous month.

In other words, the sky is the limit. YOU must decide what is appropriate for your data. There are infinitely many ways to connect two points. Find a way that meets ALL these criteria.
1) It actually connects the two dots. (Rounding and precision can be problematic.)
2) It makes at least SOME theoretical sense. (Maybe Monotonic? Positive?)
3) You understand it. (Implementation Mechanics, Interpretation)
4) You can explain it to someone else with a relevant background.
5) You remember that you are creating a MODEL, not the truth to end all truth.

Even with those criteria, there are still infinitely many ways.

Let's see what you get!
 
Sigmoid might do it.
Logistic might be more natural.
I once used a least-squares Inverse Tangent for some runoff data related to death claims in a life insurance company. Auditors hated it. No one understood it well enough to remember what I had explained to them the previous month.

In other words, the sky is the limit. YOU must decide what is appropriate for your data. There are infinitely many ways to connect two points. Find a way that meets ALL these criteria.
1) It actually connects the two dots. (Rounding and precision can be problematic.)
2) It makes at least SOME theoretical sense. (Maybe Monotonic? Positive?)
3) You understand it. (Implementation Mechanics, Interpretation)
4) You can explain it to someone else with a relevant background.
5) You remember that you are creating a MODEL, not the truth to end all truth.

Even with those criteria, there are still infinitely many ways.

Let's see what you get!



Hi
I've found this Sigmoid equation


x = x0 + (x1 - x0)*(1 - sigmaD)

But I don't know how to start. Besides this equation makes a sharper transition like this;

smooth-transitions-constants.jpg

Actually I need more rasy ease transition like this one

interp-sinerp.jpg

Please help with equations, I'm really new into this and don't know how to put the values in the equation....
 
Can we get just a function that shows easily constant1, constant2 and variable? As I said I really can't figure it out
 
How have I never heard of these? Thanks, Halls.

Thank you. I have this data;

Untitled-1.jpg

Since v is our variable; I need to make a f(V) function, including c1, c2, cmid, vmin, vmax and vmid values.

Can I use this equation for that? If I want to put this data on this function, there are some parts missing.

EQQQ.jpg


  • e = the natural logarithm base (also known as Euler's number),
  • x0 = the x-value of the sigmoid's midpoint,
  • L = the curve's maximum value, and
  • k = the logistic growth rate or steepness of the curve
 
Thank you. I have this data;

View attachment 10702

Since v is our variable; I need to make a f(V) function, including c1, c2, cmid, vmin, vmax and vmid values.

Can I use this equation for that? If I want to put this data on this function, there are some parts missing.

View attachment 10703


  • e = the natural logarithm base (also known as Euler's number),
  • x0 = the x-value of the sigmoid's midpoint,
  • L = the curve's maximum value, and
  • k = the logistic growth rate or steepness of the curve

The idea is to solve for L and k that fit your needs.
 
So in this case L is c1.
x0 = Vmid or cmid?
But what about k? Formula says that k is growth rate. So will it be Vmax-Vmin?

Actually I don't think this formula sits for every situation.
 
Thank you. I have this data;

View attachment 10702

Since v is our variable; I need to make a f(V) function, including c1, c2, cmid, vmin, vmax and vmid values.

Can I use this equation for that? If I want to put this data on this function, there are some parts missing.

View attachment 10703


  • e = the natural logarithm base (also known as Euler's number),
  • x0 = the x-value of the sigmoid's midpoint,
  • L = the curve's maximum value, and
  • k = the logistic growth rate or steepness of the curve

In principle, there are three parameters (L, k, and x0), and three points (therefore three equations), so you could solve for the parameters; but I gave it a try and it doesn't look feasible in practice. And I see no reason for such a complicated function.

The real question is, what requirements do you have for the curve? What you drew here is not at all what I expected you to want; it also doesn't look at all like your chosen function, the logistic growth curve.

I expected you to want a curve that starts horizontal, curves downward, then curves back toward the horizontal. (Logistic growth can't start and end fully horizontal, but otherwise looks something like that.) Your graph starts sharply downward.

If you don't need the slopes to be as I described, why not just use a linear function (a straight line from C1 to C2, passing through the midpoint Cmid?

If you would like to start horizontal, you could use a parabola with its vertex at C1, then switch to a different parabola at Cmid, whose vertex is at C2. Or, looking rather similar, a cosine curve.

Any of these would be far easier to work out than the function you suggested.

If you don't have specific requirements, then we need to know something about the context of your problem, which can suggest likely implied requirements that you may not be aware of. Can you be more specific about your application, and why you need this transition?

Edit: Here is an example of the cosine curve:

FMH113837.jpg
 
Last edited:
Top