Hello guest, if you read this it means you are not registered. Click here to register in a few simple steps, you will enjoy all features of our Forum.
This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Angle mode PID tuning, too slow to stabilize and overshooting...
#1
Hi,
I am building a quadrotor for first time and I implemented rate mode successfully…  Big Grin
The problem is I can’t implement angle mode over the rate mode!  Confused
Rate mode works great, but when I enable angle mode, quadrotor is too slow to stabilize with some overshoot. It takes a few second to go to desired angle and when I release the stick, it returns in the same way…  Dodgy
This is what I did in code:

rate_needed = PIDcalculate(&pid_roll_stab, desired_angle, current_angle);
pwm_for_roll = PIDcalculate(&pid_roll_rate, -rate_needed , current_rate_gyro);

Rate PID has P,I coefficents and Angle PID has P for now…
I have not any blackbox log or video...  Cry
Thank you
Reply
Login to remove this ad | Register Here
#2
Hi there, im sorry but please could you explain more what's your equipment? I can see there two C programming functions, am I correct? Are you building your own firmware?
Reply
#3
(09-Jul-2016, 03:17 PM)Pippos Wrote: Hi there, im sorry but please could you explain more what's your equipment? I can see there two C programming functions, am I correct? Are you building your own firmware?

Sorry! you right...
Yes I'm building my own firmware...

Using GY85 as IMU, EKF for calculate angles and it give me the angle nicely...
My quadrotor is unbalanced, frame 650...
I'm using my own PID code (Tested with Rate mode)...
Rate mode is smooth , but angle mode is very slow...


Rate PID coefficents : 0.76 , 0.11 , 0.0 for P,I,D respectively.
Stabilizer PID coefficents : 0.5 , 0.0 , 0.0


Consider the quadrotor wants to go to disired angle (0) from angle -20 on one axis
It accelerates and goes to -15 very slow and waits a small time.. then the quadrotor accelerates from -15 to -9 and get slower until it arrive to -9, then accelerate again to go to 0 and gets slower until 0... 

Thanks
I have a problem with visiting this site, It says my IP address banned! I just signed up on this forum yesterday and I don't know why! Sorry if I make a mistake or breaking the rules...
Reply
#4
Maybe you are using an ISP IP range that are banned.

About your problem, am afraid I can't help you. I have never used Arduino before as I'm a programmer myself.
If from rate mode to an angle mode you are getting this problem try to narrow down the possibilities. Maybe the GY85 IMU its too slow processing the data? There are several howto guides online if you search.

Is this a homebrew project or you are following a guide?
Reply
#5
(10-Jul-2016, 12:02 PM)Pippos Wrote: Maybe the GY85 IMU its too slow processing the data? There are several howto guides online if you search.

Is this a homebrew project or you are following a guide?

I tested IMU and the whole proccess of reading, calculating angle is about 5ms.
The loop is runnung in about 10ms and the angle calculation sounds good... 


That's my university project, and should finish it in ten days  Confused
Thanks for your help.

One question, Maybe it related to I gain of rate PID? in angle mode, should rate PID has I gain?
I don't use arduino, I'm using mega2560 with codevision compiler...
Reply
#6
Ok, Now I have another question...
for Stabilizer Controller, should I use double-loop control or I can do this with one loop?
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Rate tuning B4tn 3 396 24-May-2023, 05:02 PM
Last Post: Rob3ddd
  PID Tuning Guide Oscar 5 26,942 03-May-2023, 12:06 AM
Last Post: hugnosed_bat
  Quad won't Arm Low Power Mode Unable to record videos Seanalami 3 548 27-Mar-2022, 11:13 PM
Last Post: SnowLeopardFPV
  TBS CROSSFIRE TX LITE is stuck in binding mode Seanalami 3 777 26-Mar-2022, 12:56 PM
Last Post: Seanalami
  A new angle the FAA is considering employing for enforcement Krohsis 4 429 21-Dec-2020, 06:47 PM
Last Post: SnowLeopardFPV


Login to remove this ad | Register Here