Tuning PID after adding new decks

Discussions and questions about the Crazyflie Nano Quadcopter
Post Reply
thasu
Beginner
Posts: 28
Joined: Wed Oct 18, 2017 7:16 am

Tuning PID after adding new decks

Post by thasu » Tue Oct 30, 2018 8:14 am

Image

I have made following upgrades in CF2.

1) A custom built deck is mounted at the top.
2) 500mAh battery is added. Weight - 12g, length - 45mm

Apart from these a flow deck is attached and the overall flying weight is 42g.

Now the CF seems to be unstable when flying. Basically it can maintain the stability well enough when hovering. It becomes unstable and crash when I try to change the moving direction using set_hover_point command. At first I thought this as a problem with the flow deck since there were not enough patterns on the floor. But the problem is same with good patterns and lighting conditions. Most of the times it topples upside down when crashing. As per my knowledge I think the cg has moved higher with the new upgrades.

What can I do to increase the stability ? Would it be enough tuning PIDs to overcome this problem?

tobias
Bitcraze
Posts: 1738
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Tuning PID after adding new decks

Post by tobias » Tue Oct 30, 2018 2:32 pm

That is a fancy deck! Please publish the results you get with it!

Re-tuning the PID is the first thing you should try but there is a chance that there is not enough thrust to stabilize it.

thasu
Beginner
Posts: 28
Joined: Wed Oct 18, 2017 7:16 am

Re: Tuning PID after adding new decks

Post by thasu » Wed Nov 14, 2018 12:30 pm

This is what I have achieved so far.

https://www.youtube.com/watch?v=2xft3J2ja0o&t=35s

marcus
Bitcraze
Posts: 597
Joined: Mon Jan 28, 2013 7:02 pm
Location: Sweden
Contact:

Re: Tuning PID after adding new decks

Post by marcus » Mon Nov 19, 2018 7:31 pm

Nice video and deck! I've been working on putting together some 3D plotting of the sensors when moving around, I'll post a screenshot when I have something that looks presentable.

In the video when you move around it seems as if there's "walls" created sometimes when rotating. Have you checked why that is?

marcus
Bitcraze
Posts: 597
Joined: Mon Jan 28, 2013 7:02 pm
Location: Sweden
Contact:

Re: Tuning PID after adding new decks

Post by marcus » Thu Nov 22, 2018 9:11 am

Tried running the multi-ranger and plotting the data. The plot is 3D, but since the flight is at 20cm fixed height it's kind of 2D.
Attachments
20181121_141251.jpg

thasu
Beginner
Posts: 28
Joined: Wed Oct 18, 2017 7:16 am

Re: Tuning PID after adding new decks

Post by thasu » Sun Nov 25, 2018 4:08 pm

There is no proper method to identify the out of range readings in VL53L1X. When an obstacle is not within the range, sensor gives random values. That's the reason to mark the cells as occupied at unnecessary places.

Are you plotting the points with respect to the height to make a 3D plot?

The biggest problem is the pose correction with a limited number of sensors. Are you using any kind of pose correcting method or just plotting the points around the estimated position from EKF?

marcus
Bitcraze
Posts: 597
Joined: Mon Jan 28, 2013 7:02 pm
Location: Sweden
Contact:

Re: Tuning PID after adding new decks

Post by marcus » Mon Nov 26, 2018 8:22 pm

Ok, thanks for the info. I haven't looked that much into the limiting but it sounds interesting. For the plot in the image I limited the distance to 2 m.

Yes, it's plotted in 3D but I was at the same height (the boards around wasn't very high). But I'm hoping to get some time trying to fly in an environment where I get go a bit up and down. I've cleaned up the example a bit and posted it here.

I haven't tried any correction, I'm just plotting the points around the estimated position from the EKF.

thasu
Beginner
Posts: 28
Joined: Wed Oct 18, 2017 7:16 am

Re: Tuning PID after adding new decks

Post by thasu » Tue Nov 27, 2018 6:17 pm

The problem is that the error accumulates with the distance when there is no pose correction. Currently I'm working on several methods for pose correction. The hardest part is to correct the pose using a limited number of ToF sensors. I will update the thread about the progress.

Apart from that have you tried to maintain a constant altitude over obstacles with different heights?

Post Reply