Okay, Im following the procedure
Ok but you need to check as mentioned by @amilcarlucas
Hello @amilcarlucas
I have followed the procedure step by step; Now I am stuck on step 16 in which I need custom PID to start flying for this vehicle. In the link provided, there is only written that
If you have a very small, or a very large vehicle that requires non-default PID values for a safe flight. Usually, smaller vehicles require lower than default PID rate values. Larger vehicles usually require higher than default PID rate values.
Repeat the steps from Section 6.1.1 to edit and upload the
16_pid_adjustment.param
file
Now I am not sure how to calculate the PID values for this copter. Please help me.
Thanks
There you need experience. Either you have experience, or you hire someone experienced to do that for you.
Can you post the configuration directory created by the software in a .zip file for me to take a look?
Do you have a good pilot, with fast reaction time?
Try these as a starting point:
ATC_ANG_PIT_P,6.0
ATC_ANG_RLL_P,6.0
ATC_INPUT_TC,0.20
ATC_RAT_PIT_D,0.006
ATC_RAT_PIT_I,0.12
ATC_RAT_PIT_P,0.12
ATC_RAT_PIT_SMAX,50
ATC_RAT_RLL_D,0.006
ATC_RAT_RLL_I,0.12
ATC_RAT_RLL_P,0.12
ATC_RAT_RLL_SMAX,50
ATC_RAT_YAW_SMAX,50
INS_HNTCH_ENABLE,1
INS_HNTCH_MODE,1
INS_HNTCH_REF,0.35
INS_HNTCH_FREQ,30
INS_HNTCH_BW,10
INS_HNTCH_FM_RAT,0.7
INS_LOG_BAT_MASK,1
INS_LOG_BAT_OPT,4
Most of those parameters should be added to the step 16. Some others belong to other steps.
Hello @amilcarlucas,
I have completed the first 15 steps outlined in the documentation. I’ve also prepared a configuration file OctaQuad Configuration.zip and plan to add the following parameters suggested by @xfacta:
ATC_ANG_PIT_P,6.0
ATC_ANG_RLL_P,6.0
ATC_INPUT_TC,0.20
ATC_RAT_PIT_D,0.006
ATC_RAT_PIT_I,0.12
ATC_RAT_PIT_P,0.12
ATC_RAT_PIT_SMAX,50
ATC_RAT_RLL_D,0.006
ATC_RAT_RLL_I,0.12
ATC_RAT_RLL_P,0.12
ATC_RAT_RLL_SMAX,50
ATC_RAT_YAW_SMAX,50
INS_HNTCH_ENABLE,1
INS_HNTCH_MODE,1
INS_HNTCH_REF,0.35
INS_HNTCH_FREQ,30
INS_HNTCH_BW,10
INS_HNTCH_FM_RAT,0.7
INS_LOG_BAT_MASK,1
INS_LOG_BAT_OPT,4
Would you please review my current configuration and these proposed parameters? I’m seeking guidance on the next steps to ensure the drone is properly tuned and ready for flight testing.
Thank you for your help, and I look forward to any suggestions or feedback you may have!
Do I have your permission to add your files as a new template in the GPL3 licensed software?
Yes you can add this
Could you explain why this value? In what units is SMAX expressed?
That parameter change should be done in file 07.
AFAIK those have no units. But on file 07 you can find the relevant documentation for it.
Have you seen the file? Is it good to go. Please let me know if anything is wrong.
Thank You
First, please add the parameter changes the @xfacta mentioned to the files I mentioned.
As @xfacta mentioned the params I started the testing of the drone.
Log Folder: Testing Logs
Test 1:
P & I = 0.12 and D = 0.006 but i still got some heavy oscillations which can be seen in Log 1 BIN and Video.
Test 2:
I reduced the P & I further to 0.1 but oscillations were becoming worse like boat oscillating in water from left to right and right to left which can be seen in Log 2 BIN and Video.
Test 3:
I started increasing PID. P & I = 0.11, D = 0.0055, still oscillating which can be seen in Log 3 BIN and Video.
Test 4:
I increased PID further to P & I = 0.14 & D = 0.007, some reduced oscillation can be seen in Log 4 BIN and Video.
Test 5:
As I am seeing reduced oscillations with increase in PID, I increased the PID further. P & I = 0.145 and D = 0.008 and motor control is becoming bit better as shot noise is reducing which can be seen in Log 5 BIN and Video.
Test 6:
P & I = 0.15 & D = 0.009, Oscillations reduced a bit further which can be seen in Log 6 BIN and Video.
Test 7:
P & I = 0.155 & D = 0.0095, Small oscillations at start and increased sometimes which can be seen in Log 7 BIN and Video.
Test 8:
P & I = 0.155 & D = 0.01, Small oscillations at start and increased sometimes which can be seen in Log 8 BIN and Video.
Test 9:
P & I = 0.155 & D = 0.015, Oscillations were slightly reduced but oscillated heavily in air also altitude increased suddenly with very low control on throttle. When I reduced the throttle to around 20% drone suddenly reduced altitude with oscillation and propeller tip touched the ground which can be seen in Log 9 BIN & Video.
Someone please help me with this manual tunning. whether I am entering values incorrectly or I should reduce the PID.
Please suggest what should I do further to get this drone stable for Autotuning.
Thank You So Much!!
I would suggest start from the methodic ardupilot configurator, to learn how to use it maybe try on a smaller drone and then switch to big one.
But I started using the software on big drone itself and it’s quiet straight forward and easy and organised step by step makes sure you can’t skip any important prams.
And then share the zip files that helps the experts from the community (developers) to advise you.
This is an octaquad right.
Yes this is an octaquad drone.
Also I am following steps mentioned in the Methodic Configurator. I have reached 16th step in which PID should be adjusted to get flight without oscillation. I have been trying to do that to that to proceed further for Autotune
This one looks the best in the videos and probably logs too.
Try a lower D term for pitch and roll:
ATC_RAT_PIT_D,0.0075
ATC_RAT_RLL_D,0.0075
Lower the thrust expo:
MOT_THST_EXPO,0.80
If those dont give better stability, try lowering ATC_ANG_PIT_P
and ATC_ANG_RLL_P
in small steps.
Adjust these:
FENCE_ENABLE,1 // check radius and altitude
LOG_BITMASK,180222
PILOT_THR_BHV,7
PSC_VELXY_D,0.25
Fence suits all copters but the smallest ones (especially the large ones) - you will NOT be able to arm in ANY mode until there is a GPS 3D Fix and Home can be set.
Better logging and throttle from mid-stick.
The PSC param will keep the position controller playing nice when you use Loiter.
I would probably disable the notch filter until you get a bit more stable flight and some more useful data in logs. Since the motor noise is quite low, around 20Hz, the notch filter is prone to affecting stability if not exactly right.
INS_HNTCH_ENABLE,0
The existing settings will all still be there for later, they dont get erased.
Later when you have more stable flight you can set these:
And once again, when you do have stable flight, you should be able to set these to help the copter get airborne smoothly, without it going sideways so much:
PILOT_TKOFF_ALT,200
WP_NAVALT_MIN,2
The voltage monitoring via CAN is not quite right, and certainly current is very wrong, but maybe the voltage will improve once the oscillations are fixed.
Very probable you have to INCREASE PI considerably, these slow rocking oscillations are most probably not due to too high PD, but not enough PI. I have been in similar situation, with very slow oscillations, and I started reducing P, that was a mistake in my case! I would slowly try and double PI, (like 0.18 0.21 0.25), but on this forum there are others with more experience!
I had behaviour similar to flight number 2 and 9, and I had to increase PI by a factor of 3 before it started looking good. But again, I am not an expert.
Also, in your logs you do not have ATT data which would be very helpful.
The motor output data shows clipping between 1200 and 1500 uS, i.e. it seems like MOT_SPIN could be too high? That could explain that you had soo little control with throttle