Tuning PID after adding new decks

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

Tuning PID after adding new decks

Post by thasu »

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: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Tuning PID after adding new decks

Post by tobias »

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
Member
Posts: 31
Joined: Wed Oct 18, 2017 7:16 am

Re: Tuning PID after adding new decks

Post by thasu »

This is what I have achieved so far.

https://www.youtube.com/watch?v=2xft3J2ja0o&t=35s
marcus
Bitcraze
Posts: 659
Joined: Mon Jan 28, 2013 7:02 pm
Location: Sweden
Contact:

Re: Tuning PID after adding new decks

Post by marcus »

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: 659
Joined: Mon Jan 28, 2013 7:02 pm
Location: Sweden
Contact:

Re: Tuning PID after adding new decks

Post by marcus »

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
Member
Posts: 31
Joined: Wed Oct 18, 2017 7:16 am

Re: Tuning PID after adding new decks

Post by thasu »

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: 659
Joined: Mon Jan 28, 2013 7:02 pm
Location: Sweden
Contact:

Re: Tuning PID after adding new decks

Post by marcus »

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
Member
Posts: 31
Joined: Wed Oct 18, 2017 7:16 am

Re: Tuning PID after adding new decks

Post by thasu »

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