MATLAB Answers

How can I smooth a velocity signal?

5 views (last 30 days)
Fabian Gock
Fabian Gock on 23 Aug 2018
Answered: Jan on 23 Aug 2018
Please find the attached example file with a part of my given velocity signal.
I want to calculate the required Motor Torque for a car to follow this velocity signal. I do this calculating the longitudinal dynamics of the car and the calculation works just fine.
The Problem is, that for calculating the acceleration torque, I differenciate the velocity signal to get the acceleration at each point. If you look at points 60-70 you can notice, that there are inconsitencies due to fluctations in the velocity vector.
Interpolating the velocity vector made the problem rather worse than it helped. Due to this phenomenon in the acceleration signal, the resulting moment also fluctuates a lot in this areas. This leads to deviations when I try to validate it with measured torque signals.
Moving average filter also doesn't make it much better (cuts the peaks)
Is there any other help for that?
Thanks in Advance -Fabian


Adam Danz
Adam Danz on 23 Aug 2018
If you embed a figure, it will be a lot easier to help you. In your data, example_a and _v only have 90 and 91 data points so which points are 170-180?
Is your goal to smooth out the velocity signal or the acceleration signal? If you change those signals, will the correct torque be calculated?
Fabian Gock
Fabian Gock on 23 Aug 2018
Sorry about that. I've just fixed it.
KSSV on 23 Aug 2018
Have a look on function smooth

Sign in to comment.

Answers (1)

Jan on 23 Aug 2018
There is no general solution. Did you search in the net already? You find thousands of examples, which explain the problem of the amplification of noise when differentiating a velocity signal. This is the mathematical nature of this method.
If you want to filter the signal to reduce the peaks, the peaks will be reduced. The only reliable solution is to use sensors to measure the acceleration directly or to write an optimization methods, which keeps the wanted peaks and removes the unwanted ones, but it would be your turn to distinguish both. How can you tell what is noise and what is the signal?


Sign in to comment.





Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by