How to build and use a LowPass (or HighPass) Filter in real-time in a time domain simulation?
Show older comments
I'm new to control aspects and have not worked with filters before. I've been reading up on the documentation provided by Matlab regarding the filters but I'm not sure if I can or know enough to implement a filter to get the desired outcome. The problem is as follows.
I'm simulating motion of a body in time-domain, where I solve ODEs in a for loop at every time step (using rk4 approach). Within the for loop at each time step, I calculate certain coefficients and use them as inputs in solving the ODEs in my rk4 scheme. One of these coefficients (say alpa) turned out to be very oscillatory with more than one frequency. Following is an illustration of that parameter.

I suppose using a filter to get rid of the noise would be the solution here. However, I don't know how to read the value of alpha at each time step, filter the noise and use the filtered alpha as an input to the ODE system. How can I go around this?
Accepted Answer
More Answers (0)
Categories
Find more on Numerical Integration and Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!