Smoothing non-smooth systems with the moving average transformation