|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#31
|
||||
|
||||
|
Re: Motion Profiling
Technically, acceleration is a function of current, not rate of change of current.
I suspect what you mean is you have a rate limiter on your motor commands? |
|
#32
|
|||||
|
|||||
|
Re: Motion Profiling
Correct.
|
|
#33
|
||||||
|
||||||
|
Re: Motion Profiling
If you try, I think you will find the motion profile algorithm takes less memory usage, is much more accurate, and makes PID much easier to tune.
|
|
#34
|
||||
|
||||
|
Re: Motion Profiling
I'm ruminating why a motion control algorithm plus PID would take less memory than a PID without motion control. What am I missing? |
|
#35
|
||||
|
||||
|
Re: Motion Profiling
Ether,
Without knowing exactly what Paul is thinking, I am assuming that the PID control algorithm does not work as well as expected and the necessary software additions required to get desirable PID performance are greater than the proposed motion profiling software and the "out of the box" PID software. Thoughts? |
|
#36
|
|||
|
|||
|
Re: Motion Profiling
Quote:
Without reading your implementation, I would also ask how your robot handles the case when both sides of the drivetrain are artificially or physically saturated and you have a heading error. You somehow have to deal with the heading error. You can either try to close the loop on heading so that you are still aiming for the same point in the x, y, theta configuration space, or you have to eliminate heading errors very quickly to avoid missing your goal. |
|
#37
|
||||||
|
||||||
|
Re: Motion Profiling
Ether,
What I meant was that the motion profile algorithm plus PID will take less memory than the method he was using to sense and control acceleration. The motion profile filter is very few lines of code and was designed to run real time back in the early 90s. It is very clean and fast. Paul |
|
#38
|
|||||
|
|||||
|
Re: Motion Profiling
I'll try the motion profiling method and post my results.
Edit: One question: What's the easiest way to tune velocity PID? Last edited by z_beeblebrox : 26-12-2012 at 10:53. |
|
#39
|
|||
|
|||
|
Re: Motion Profiling
I know that 254 has their drive code implemented into their 2011 robot code, but is there anybody willing to post drive code implementing this feature in the most stripped down form possible?
Being able to see this feature (in C++ or Java) singled out will really allow me to see what is going on here. I think it will help everybody gain a more pragmatic understanding of this motion profiling implementation. |
|
#40
|
|||||
|
|||||
|
Re: Motion Profiling
I looked through 254's code but was very confused. First, I don't really understand C++. Second, I don't think that this is the simplest implementation of motion profiling. I mostly understand how Paul's system works, but am not sure how his algorithms translate into real time motion profiling code.
Would it be possible for someone to post pseudocode for his motion profiling technique? |
|
#41
|
|||||
|
|||||
|
Re: Motion Profiling
Quote:
|
|
#42
|
|||||
|
|||||
|
Re: Motion Profiling
I've played around with the excellent Excel spreadsheet-simulators on the previous page, but I still have a couple more questions. Namely, in the way Paul proposed of designing a motion profile (the "double filter" scheme), how do the filters work, exactly? I see that the parameters T1 and T2 modify the filters, and I see that the filters' role appears to be to shape the motion profile (defining the acceleration and deceleration especially).
|
|
#43
|
||||||
|
||||||
|
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. |
|
#44
|
|||||
|
|||||
|
Re: Motion Profiling
Quote:
F2 is another low-pass FIR filter that imposes a rate limit on its input (which is the output of F1). As a result, a jerk (derivative of acceleration) limit is put on the output. The T2 parameter of F2 is the amount of time it takes to increase acceleration from 0 to the maximum defined by T1. You could in theory add an F3 or even more successive FIR filters and achieve smoothness down to an arbitrary order. Here are some examples... If T1 is equal to 400ms and T2 is equal to 0 (use 1ms in the spreadsheet to avoid divide by zero), you get an acceleration-limited velocity, but there are no limits on the jerk (you immediately go to maximum acceleration). If T1 is equal to 400ms and T2 is equal to 400ms, it takes the same amount of time to reach the maximum acceleration as velocity, so you get a triangular profile (as soon as you hit maximum acceleration it is immediately time to reduce acceleration) If T1 is equal to 400ms and T2 is equal to 200ms (or any number 0 < T2 < 400ms), you spend a non-zero amount of time at your maximum acceleration before reducing acceleration. Last edited by Jared Russell : 02-01-2013 at 09:43. Reason: Changed the language of "slow down" since it carries speed connotations |
|
#45
|
|||||
|
|||||
|
Re: Motion Profiling
How would this algorithm deal with changes in Vprog dynamically?
If another algorithm would like to impose velocity limits dynamically, would simply setting Vprog to the imposed velocity limit allow me to impose the limit, and would the trapezoid deal with it? Or do I need something else? |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|