0
$\begingroup$

I would like to generate a trajectory for a quadrotor UAV and I am using an architecture which allows to do so only by specifying position, velocity and acceleration.

I only know that I want to do a circle in 2D (fixed z for example) and therefore I should give a sine wave on the x and a cosine on the y.

So far everything is ok. I am working in MATLAB/Simulink and therefore to generate the position I simply use an integrator block and I get it.

What about the Acceleration? If I do just a derivative of the velocity my trajectory is not working, I don't know why. Is there a better way to do that? A friend suggested me a second order filter to generate the trajectory but I don't know what he really means.

Could you please help me?

Thanks.

$\endgroup$
  • 1
    $\begingroup$ You should be able to do it analytically - maybe post your math here and we can see if there are mistakes? Using a filter would just give you the analytic result (assuming it is implemented correctly) with some lag, which is not ideal. $\endgroup$ – combo Aug 18 '17 at 22:08
2
$\begingroup$

With the method you describe you are bound to have non zero velocity or non acceleration (based on if you consider a + pi/2 offset or not).

Despite @combo answer I would suggest you a second order filter or heaven higher to generate a smooth trajectory up to the n-th order. Typically in my lab we try to impose up to smooth jerk or snap, for high agility maneuvers. I want to comment on the lag induced by such a filter, first of all it is small but most importantly it is irrelevant because it is in the planning side ! Let me elaborate, if you filter any signal in your control loop loop you induce delay, if this delay is not taken into account by advanced control scheme this results in instability, which is bad. However, what you try to do is to generate a feasible trajectory, so by using such a filter what happens is that your position input is such that you reach half the circle at a given time, then the filter output is going to be bit delayed this delay is constant an related to the time constant of your filter. If you have time constraints in your trajectory you can take it into account but by experience in the majority of application it is not necessary. So using a n-th order filter you just produce a smooth trajectory. Be careful to use as desired position the one given out of the filter so that it matches the velocity and acceleration.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.