What's the control input range of CF

Firmware/software/electronics/mechanics
Post Reply
zhanghaijason
Beginner
Posts: 16
Joined: Fri Jul 28, 2017 9:07 pm

What's the control input range of CF

Post by zhanghaijason » Tue Oct 24, 2017 9:40 pm

Hello,
I am doing my control research with CF. Based on Whoenig's code, I made some modification. But I don't know the exact 4 control inputs range. In Whoenig's code, he set pitch roll in (-15,15), yaw rate (-15,15), thrust (10000,60000). Does anyone can tell me what's the exact ranges?

arnaud
Bitcraze
Posts: 1281
Joined: Tue Feb 06, 2007 12:36 pm

Re: What's the control input range of CF

Post by arnaud » Wed Oct 25, 2017 7:49 am

Hi,
If it is similar to the master code (which is very likely), roll/pitch are in degree. Yaw is in degree per seconds and the thrust is from 0 to 65535 with 0 meaning 0% and 65535 meaning 100%. There is no range limit for the roll/pitch/yaw setpoints, there is of course a limit in the Crazyflie physical capabilities to follow the setpoints :).

zhanghaijason
Beginner
Posts: 16
Joined: Fri Jul 28, 2017 9:07 pm

Re: What's the control input range of CF

Post by zhanghaijason » Wed Oct 25, 2017 8:15 pm

arnaud wrote:
Wed Oct 25, 2017 7:49 am
Hi,
If it is similar to the master code (which is very likely), roll/pitch are in degree. Yaw is in degree per seconds and the thrust is from 0 to 65535 with 0 meaning 0% and 65535 meaning 100%. There is no range limit for the roll/pitch/yaw setpoints, there is of course a limit in the Crazyflie physical capabilities to follow the setpoints :).
Thanks!

zhanghaijason
Beginner
Posts: 16
Joined: Fri Jul 28, 2017 9:07 pm

Re: What's the control input range of CF

Post by zhanghaijason » Wed Dec 06, 2017 10:08 pm

arnaud wrote:
Wed Oct 25, 2017 7:49 am
Hi,
If it is similar to the master code (which is very likely), roll/pitch are in degree. Yaw is in degree per seconds and the thrust is from 0 to 65535 with 0 meaning 0% and 65535 meaning 100%. There is no range limit for the roll/pitch/yaw setpoints, there is of course a limit in the Crazyflie physical capabilities to follow the setpoints :).
Hi Arnaud,
I am confused for the yaw rate. Since what we send to CF should be the yaw rate, does it mean that the inner attitude loop takes yaw rate as desired value? In other words, the reference of the inner attitude loop is roll, pitch, yaw or roll, pitch, yaw rate? From what CF receives, it should be yaw rate. However, from the firmware, controller_pid.c, it seems that it should be yaw.

arnaud
Bitcraze
Posts: 1281
Joined: Tue Feb 06, 2007 12:36 pm

Re: What's the control input range of CF

Post by arnaud » Thu Dec 07, 2017 10:14 am

Internally the absolute yaw is controlled, the yaw rate setpoint is accumulated internally to generate and absolute yaw setpoint: https://github.com/bitcraze/crazyflie-f ... _pid.c#L41.

Though this is implementation details, you do not have to control the yaw rate, using the generic setpoint packets it is possible to send an absolute yaw setpoint as well.

Post Reply