cnpcshangbo / OS4-vertical-square-2017a

This is my project folder to support my YouTube video.
https://youtu.be/LWijMJMqVRI
2 stars 1 forks source link

Manully tuning PID loops #12

Open cnpcshangbo opened 6 years ago

cnpcshangbo commented 6 years ago

As shown in figure below, OS4 quadrotor contains many loops. If inner loop is not tuned well, tuning outer loop is meaningless. Therefore, we should start tuning from the roll, pitch and yaw loop.

First, we need to plot the drone’s roll, pitch and yaw loop curves, which includes setpoints and estimations. The Simulation Data Inspector (SDI) can help us get those figures.

image File link

cnpcshangbo commented 6 years ago

image This is the roll estimation and roll setpoint. This curve looks really ugly.

cnpcshangbo commented 6 years ago

To tune this loop, we need to change the setpoint to a step function first. Also, we need to make sure the initial value is 0. I changed the initial value to 0. The curve is like this: image