A novel second order filter for the real-time trajectory scaling