First of all, I am not very good at math, and I am a programmer who develops (web)applications
I was working on a web-app which is used for training on a stationary bike, it is used with smart bikes of which the resistance can be controlled.
What I needed to build was a way to keep the output wattage within a range.
I have solved this in code by increasing and decreasing the value of the resistance around the min and max values.
Here is a crudely drawn graph of what it does.
Is there an equation which would plot this graph with the min and max values as the input?
And what would you call this graph with the 2 exponential curves?
Sorry if this question is unclear, or if this is not the correct place to ask.

Here is a solution.
Let $[m,n]$ be the [min,max] interval in which you want a flat part.
Take the following function:
$$\begin{cases}y&=&a+b \left(\sin(\ell(x)) - \ell(x)\right) \ \text{where}\\ \ell(x)&=&c \frac{2x-(m+n)}{n-m}\end{cases}$$
based on the "mother function" $y=\sin(x)-x$ with parameters allowing to modulate the curve in different ways : height, width, etc. ; one can take for example $a=5,b=1,c=1$ at the beginning.
Edit: Have a look at the green curve with parametric equations:
$$\begin{cases}x(t)&=&8-1.5t+\sin(t)\\y(t)&=&7+t+\sin(t) \end{cases}$$
that can maybe constitute a better basis for answering your issue.
Linear algebra remark:
This type of curve is obtained as an image of the "mother sine" curve by the following affine transform:
$$\pmatrix{x(t)\\y(t)}=\pmatrix{a&b\\c&d}\pmatrix{t\\ sin(t)}+\pmatrix{e\\f}$$
for certain well-chosen coefficients $a,b,...f$.