# how to do smoothing a linear noise adc signal to a exponencial curve to increase and logarithmic to decrease

I am studying methods of signal smoothing obtained in an Analog Digital converter that is operated by a common potentiometer that generates a certain noise, such potentiometer is linear and I cannot change it to a logarithm.

The intention would be similar to converting a trapezoidal wave to a sine wave.

Below I present a graph with the curve I get today using a Single Exponential Smoothing I even tried it with Double Exponencial Smoothing but I still haven't got the formula right when coding it.

#elif SMOOTHING_TYPE == SMOOTHING_SINGLE
smoothing_low[index]  = (alfa_low  * value) + ((1 - alfa_low) * smoothing_low[index]);
smoothing_high[index] = (alfa_high * value) + ((1 - alfa_high) * smoothing_high[index]);
#elif SMOOTHING_TYPE == SMOOTHING_DOUBLE
uint16_t smoothing_low_old = smoothing_low[index];
smoothing_low[index] = (alfa_low * value)
+ ((1 - alfa_low) * (smoothing_low[index] - smoothing_y_low[index]));
smoothing_y_low[index] = upsilon_low * (smoothing_low[index] - smoothing_low_old)
+ ((1 - upsilon_low) * smoothing_y_low[index]);

uint16_t smoothing_high_old = smoothing_high[index];
smoothing_high[index] = (alfa_low * value)
+ ((1 - alfa_low) * smoothing_high[index] - smoothing_y_low[index]);
smoothing_y_high[index] = upsilon_high * (smoothing_high[index] - smoothing_high_old)
+ ((1 - upsilon_high) * smoothing_y_high[index]);
#endif