BigQuad used but the drone is very unstable
BigQuad used but the drone is very unstable
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!
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
We are still lacking a tuning guide
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.
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
tobias wrote: ↑Mon Apr 12, 2021 11:37 am We are still lacking a tuning guide
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
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:
Tune pid.h and position_controller_pid.c which can be tested "live" using the parameters in the cfclient.
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
Re: BigQuad used but the drone is very unstable
Thanks,but what does "f" mean in "0.1f"? my drone is probably 1kg.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:Tune pid.h and position_controller_pid.c which can be tested "live" using the parameters in the cfclient.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
Re: BigQuad used but the drone is very unstable
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
hi,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:Tune pid.h and position_controller_pid.c which can be tested "live" using the parameters in the cfclient.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
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
Even when I only use these codes:
Code: Select all
CFLAGS += -DCF_MASS=0.56f
CFLAGS += -DENABLE_BQ_DECK
CFLAGS += -DENABLE_ONESHOT125
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
when I addtobias 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:Tune pid.h and position_controller_pid.c which can be tested "live" using the parameters in the cfclient.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
Code: Select all
CFLAGS += -DCF_MASS=0.56f
CFLAGS += -DENABLE_BQ_DECK
CFLAGS += -DDEFAULT_IDLE_THRUST=5000
CFLAGS += -DENABLE_ONESHOT125
After trying one by one, I found when I add
Code: Select all
CFLAGS += -DSTART_DISARMED
so why?
thank you!
Re: BigQuad used but the drone is very unstable
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.