Smooth step changes in a array
    7 views (last 30 days)
  
       Show older comments
    
Hello,
I'm currently working with a robot, and because of some calulations, the commanded signal has step changes which I want to somehow smooth this steps to a progressive curve. My question is if there is proper matlab tool which can help me with this task or if I have to do it manually. Here my data and a plot .
Thanks in advance
3 Comments
  Mathieu NOE
      
 on 13 Mar 2023
				hello 
you may want to implement a discrete low pass filter in your command signal 
the very simple first approach I can suggest is in the form a first order recursive filter 
a = constant between 0 and  1 
out_new = out_old*a + input*(1-a)
Answers (1)
  Swaraj
    
 on 5 Apr 2023
        There can be multiple ways of doing it. One common method is to use a low-pass filter which can remove high frequency components and smooth the signal.
You can go through the following Documentations for more details.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!