# Input signal rescaling block

1. The input signal is limited and lies in range $$[-U;+U]$$. $$U$$ - unknown.
2. The output signal must be rescaled to be in the range $$[-1;+1]$$, i.e. is $$+1$$ if the input is at steady-state $$+U$$, and $$-1$$ if the input at steady-state $$-U$$.
3. Between $$-1$$ and $$+1$$ the output signal must also occupy some rescaled value.

What can be used as a block $$???$$ for such a conversion? Is there a linear / non-linear filter that does this, and such and which is described by the differential equation?

Remarks: Red line, just my fantasy about how the input signal changes

• You could use $y[k] = u[k]/U[k]$ where $U[k] = \max(U[k - 1], u[k])$. This will be wrong at the start but if that is acceptable it would be a simple solution that will be correct once the steady state value is reached for the first time. Commented May 4, 2021 at 15:26
• @SampleTime Good idea at first glance. Is there a continuous analogue of your proposal?
– dtn
Commented May 4, 2021 at 15:28
• I am not sure, maybe you can convert it to continuous time. But this is maybe difficult because it is a nonlinear equation. Commented May 4, 2021 at 15:30
• @SampleTime ibb.co/dK4cTPX Or maybe there is some trick that allows using the input signal and its sign to get at the output a signal of the same shape, but scaled? $+- 1/2$ is just my fantasy. :)
– dtn
Commented May 4, 2021 at 15:35
• I don't see how you would use the sign to identify the steady state value of $1/2$ in your image. The sign doesn't tell you anything new about the steady state value (except its sign of course). Commented May 4, 2021 at 17:26