|
Re: Motion Profiling
Colin,
You can think of a linear filter as a damper. It takes instantaneous change and spreads that change out over the length of the filter. In the case of this particular filter, it takes a step instantaneous velocity (target velocity) and spreads it out over the filter length.
The double filter just smooths out the velocity transitions a l little more. It just takes the output from the first filter and filters that.
The implementation is pretty simple. You have two loops (while loops, or whatever suits your style). The outer loop runs until the filter is empty (contains all zeros). The inner loop runs based on Npts that is calculated based on the path distance and programmed velocity. This is basically how many times you input a "1" into the filter.
So, you run the planning algorithm until the filter is completely empty, inside that filter you add a 1 as the filter input for Npts. Each outer loop you shift each filter position to the next filter position.
The Excel file demonstrates this exactly.
__________________
In full disclosure I am the President of VEX Robotics, a division of Innovation First International.
|