Problems with Assisted modes

Discussions about quadcopters/multi-rotors
cfnewbie
Beginner
Posts: 24
Joined: Wed Jun 17, 2020 8:51 am

Problems with Assisted modes

Post by cfnewbie »

Hi,

i am flying my quadcopter with crazyflie bolt, it is equipped with optical and local positioning deck.
it works perfectly fine when operating in normal mode, however when i turned on position or height hold mode, one of the motor at random will stop spinning or increase to max thrust, resulting in flip of death.

i couldnt think of any problem causing this as everything is calibrated nicely before each flight. Please help, thank you!
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Problems with Assisted modes

Post by tobias »

My suspicion is that the velocity and position controllers are not tuned. Maybe this thread can help a bit.
cfnewbie
Beginner
Posts: 24
Joined: Wed Jun 17, 2020 8:51 am

Re: Problems with Assisted modes

Post by cfnewbie »

Thanks Tobias, tried to mess around with the PID values of position and velocity controller, but the problem seems to get worst.
I am new to the crazyflie platform, may i know is there a tutorial on how to tune the PIDs accurately?
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Problems with Assisted modes

Post by tobias »

Unfortunately not but the approach is very similar to other quadcopter PID tuning guides. Did you try with the same values as suggested in the thread? Your build is probably more powerful then the Crazyflie 2.1 values so most likely the values should be lower. Did you also change the Kalman estimator weight value as discussed in the thread? I guess you are using the Flow deck?
cfnewbie
Beginner
Posts: 24
Joined: Wed Jun 17, 2020 8:51 am

Re: Problems with Assisted modes

Post by cfnewbie »

my build is similar to that in the thread but with 3 inch prop and 3500kv motor. i changed the PID values according to the thread but not the kalman estimator weight. I guess the problem could be caused by the flow deck cause i was flying over a blank flooring. I will test it again once get back to the workshop.
cfnewbie
Beginner
Posts: 24
Joined: Wed Jun 17, 2020 8:51 am

Re: Problems with Assisted modes

Post by cfnewbie »

Update: After verifying flow deck reading and changing the velocity and position PID according the thread, problem solved. The drone is able to hold its position and altitude well. However, there is noticeable vibration when the drone is holding its position.

May i know which parameter can i tune to reduce the vibration? TIA.
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Problems with Assisted modes

Post by kimberly »

Hi!

Tobias is on a long break now so I will try to see what I can do.

You probably would need to tune the attitude PID parameters, which can be found here in the firmware. Not sure if the attitude-rate or attitude should be tuned but probably would be good to slightly lower the P gain there in general and see what happens.
cfnewbie
Beginner
Posts: 24
Joined: Wed Jun 17, 2020 8:51 am

Re: Problems with Assisted modes

Post by cfnewbie »

Thanks Kimberly,

The drone's performance is all good but when switched to position mode, the control for roll and pitch will swap and the connectivity between the UWB and the LPS nodes are not stable, sometimes cant get the reading from the nodes. the LPS nodes are placed within a 2m^2 area. to fix these do i need to recalibrate or update the firmware of LPS nodes?
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Problems with Assisted modes

Post by kimberly »

Hmmm. Alright there are two things going on here:
  • Switching of roll and pitch: It switches to roll and pitch to x and y. Although it corresponds at first it is not the same, maybe you changed the yaw in the mean time to not be towards the x direction? This tutorial has a clear picture of an controller in position mode
  • Does the LPS become unstable only after the switch or is it unstable always? It is maybe a bit unclear what you are describing
For the LPS problems, it might be good to start an new forum thread if this is not related to the assisted modes
cfnewbie
Beginner
Posts: 24
Joined: Wed Jun 17, 2020 8:51 am

Re: Problems with Assisted modes

Post by cfnewbie »

    Solved the connectivity issue between LPS Nodes and the UBW, this is caused by placement of the UWB deck.
      i followed the controller guide for PosHold mode but the swapping of roll and pitch control always happen during mid flight in PosHold mode, the "actual yaw' value will change from 0 to 130 degs even when the 'target yaw' is 0. After landing the quad, the 'actual yaw' will change back to 0 slowly. Is it possible that this problem is caused by the magnetic interference? And is there anyway to solve this?
      Post Reply