Page 1 of 1

BigQuad used but the drone is very unstable

Posted: Sun Apr 11, 2021 8:24 am
by Allen
Hello!

I tried to use the BigQuad to build a bigger drone,and now, I successfully assembled a bigger drone.

when I didn't install the propeller,I tried to connect the drone to the client,and use the remote control to control it ,I sent some commands through the remote control,

but the drone shaked violently,then I realized that I need to change some parameters in the code,

so my question is what parameters do I need to change ,and where are they in the code ?

Is there any basis for changing the parameters? And how to evaluate a good parameter?

thank you very much!

Re: BigQuad used but the drone is very unstable

Posted: Mon Apr 12, 2021 11:37 am
by tobias
We are still lacking a tuning guide :oops:

Some pointers you can find in this post. There are tuns of guides on the internet though which might be a good start. Generally a bigquad/bolt will be more powerful so start by reducing RATE P,I and D by half end test. You can use the parameter framework to test them "live" but currently to make them stick you need to change pid.h and compile->flash.

Re: BigQuad used but the drone is very unstable

Posted: Wed Apr 14, 2021 2:09 am
by Allen
tobias wrote: Mon Apr 12, 2021 11:37 am We are still lacking a tuning guide :oops:

Some pointers you can find in this post. There are tuns of guides on the internet though which might be a good start. Generally a bigquad/bolt will be more powerful so start by reducing RATE P,I and D by half end test. You can use the parameter framework to test them "live" but currently to make them stick you need to change pid.h and compile->flash.

Thanks for your reply!
I have another question.I read other blogs,some of them mentioned kalman filter, I want to know if I want to make the bigger drone more stable,what should I do besides change the pid? For example the mass of the bigger drone and the thrust of the bigger drone. And how to change these values? In the config. mk or somewhere else?
Thanks!

Re: BigQuad used but the drone is very unstable

Posted: Fri Apr 16, 2021 8:57 am
by tobias
Hi,

The Kalman filter no longer needs the weight/thrust so nothing to do there. What might need tuning is the different position controllers. If you are using the PID (which is a good start) you should alter the BaseThrust here. The other PID position parameters should work but could also be tuned for e.g. more "aggressive" behavior.

So what should be enough to get you started is to define this in my config.mk file:

Code: Select all

# Bolt/bigQuad compile flags. Set CF_MASS in kg and DEFAULT_IDLE_THRUST to appropriate idle trust value.
CFLAGS += -DCF_MASS=0.1f
CFLAGS += -DENABLE_ONESHOT125
CFLAGS += -DSTART_DISARMED
CFLAGS += -DDEFAULT_IDLE_THRUST=5000
Tune pid.h and position_controller_pid.c which can be tested "live" using the parameters in the cfclient.

Re: BigQuad used but the drone is very unstable

Posted: Fri Apr 23, 2021 3:14 am
by Allen
tobias wrote: Fri Apr 16, 2021 8:57 am Hi,

The Kalman filter no longer needs the weight/thrust so nothing to do there. What might need tuning is the different position controllers. If you are using the PID (which is a good start) you should alter the BaseThrust here. The other PID position parameters should work but could also be tuned for e.g. more "aggressive" behavior.

So what should be enough to get you started is to define this in my config.mk file:

Code: Select all

# Bolt/bigQuad compile flags. Set CF_MASS in kg and DEFAULT_IDLE_THRUST to appropriate idle trust value.
CFLAGS += -DCF_MASS=0.1f
CFLAGS += -DENABLE_ONESHOT125
CFLAGS += -DSTART_DISARMED
CFLAGS += -DDEFAULT_IDLE_THRUST=5000
Tune pid.h and position_controller_pid.c which can be tested "live" using the parameters in the cfclient.
Thanks,but what does "f" mean in "0.1f"? :? my drone is probably 1kg.

Re: BigQuad used but the drone is very unstable

Posted: Fri Apr 23, 2021 8:52 am
by tobias
CF_MASS should be in kg so in your case 1.0f. "f" is to tell the compiler it is a floating point number.

Re: BigQuad used but the drone is very unstable

Posted: Wed Apr 28, 2021 10:02 am
by Allen
tobias wrote: Fri Apr 16, 2021 8:57 am Hi,

The Kalman filter no longer needs the weight/thrust so nothing to do there. What might need tuning is the different position controllers. If you are using the PID (which is a good start) you should alter the BaseThrust here. The other PID position parameters should work but could also be tuned for e.g. more "aggressive" behavior.

So what should be enough to get you started is to define this in my config.mk file:

Code: Select all

# Bolt/bigQuad compile flags. Set CF_MASS in kg and DEFAULT_IDLE_THRUST to appropriate idle trust value.
CFLAGS += -DCF_MASS=0.1f
CFLAGS += -DENABLE_ONESHOT125
CFLAGS += -DSTART_DISARMED
CFLAGS += -DDEFAULT_IDLE_THRUST=5000
Tune pid.h and position_controller_pid.c which can be tested "live" using the parameters in the cfclient.
hi,
I tried and only used the following code in config.mk:

Code: Select all

CFLAGS += -DCF_MASS=0.56f 
CFLAGS += -DENABLE_BQ_DECK
CFLAGS += -DSTART_DISARMED
CFLAGS += -DDEFAULT_IDLE_THRUST=5000
CFLAGS += -DENABLE_ONESHOT125
but when I control the drone in the client,the propeller did not turn.
Even when I only use these codes:

Code: Select all

CFLAGS += -DCF_MASS=0.56f 
CFLAGS += -DENABLE_BQ_DECK
CFLAGS += -DENABLE_ONESHOT125
the propeller did not turn,either.

And I am sure ESC is in oneshot125 mode.
Do I need to add other codes to the config.mk file? or what code do I need to delete?
Thank you!

Re: BigQuad used but the drone is very unstable

Posted: Thu Apr 29, 2021 7:31 am
by Allen
tobias wrote: Fri Apr 16, 2021 8:57 am Hi,

The Kalman filter no longer needs the weight/thrust so nothing to do there. What might need tuning is the different position controllers. If you are using the PID (which is a good start) you should alter the BaseThrust here. The other PID position parameters should work but could also be tuned for e.g. more "aggressive" behavior.

So what should be enough to get you started is to define this in my config.mk file:

Code: Select all

# Bolt/bigQuad compile flags. Set CF_MASS in kg and DEFAULT_IDLE_THRUST to appropriate idle trust value.
CFLAGS += -DCF_MASS=0.1f
CFLAGS += -DENABLE_ONESHOT125
CFLAGS += -DSTART_DISARMED
CFLAGS += -DDEFAULT_IDLE_THRUST=5000
Tune pid.h and position_controller_pid.c which can be tested "live" using the parameters in the cfclient.
when I add

Code: Select all

CFLAGS += -DCF_MASS=0.56f 
CFLAGS += -DENABLE_BQ_DECK
CFLAGS += -DDEFAULT_IDLE_THRUST=5000
CFLAGS += -DENABLE_ONESHOT125
to config.mk,the motor can turn.
After trying one by one, I found when I add

Code: Select all

CFLAGS += -DSTART_DISARMED
in the above program,the motor cannot turn...

so why?
thank you!

Re: BigQuad used but the drone is very unstable

Posted: Fri Apr 30, 2021 8:04 am
by tobias
Yes the START_DISARMED probably needs some explanation. It is a safety mechanism and you can decide if you like to use it or not. To arm the motors the parameter system.forceArm needs to be set to 1. This will arm the motors.