Stuck tuning and I want to learn more about flash logs

Don’t spend much money trying to make that frame work. The problem is knowing if you will get the harder plastic arms or not despite any claims of being official. Way back when I had aluminum arms and G10 arms on one of those frames. It was always mediocre. Assuming this is a stepping stone multirotor try the better props and get flying as best you can and have some fun.

1 Like

I see what your saying and it makes sense! There always has to be a stepping stone…

Btw, I just recieved the prop balancer and slapped the current cheap props on there and they are horribly unbalanced! This lil prop balancer is cooll af too. I got the little 8-9$ one and I can already see that this lil guy will be around for decades :grin:

So I’ve been watching videos of people balancing their props, and most of them add tape to balance, but I just saw some other guy scraping plastic off with a razor blade. Isnt this a horrible approach? You loose all the smoothness in this way, dont you? :face_with_diagonal_mouth: Idk, but adding a small piece of smooth tape seems intuitive to me.

I use fine sandpaper on all types of props. It has always worked well for me.

1 Like

You were sooooo right @dkemxr! the props make a huge difference! I tried three kinds, GemFan, DJI, and Master Airscrew. All three feel so much better… the flight felt so smooth and responsive. However, while the motor output means are a bit more aligned (M1=1499, M2=1485, M3=1566, M4=1574), I think the yaw bias is stil there.

On the last prop set I tired, which was the DJI set, I enabled auto tune just to see if it would work and right away it started twitching and adjusting PIDs! That never happened before. I must also say that I did switch out the GPS before trying the props… from a M7 to a HolyBro M8, so idk if that also had something to do with it.

Could the motors be the reason why there’s yaw bias, or is it pretty clear that it is frame twist? My next step is to swap out motor 2 because it always has the lowest output mean. Then, I will also try swapping out arms.

In any case, I’m excited as hell that the auto tune is kicking in. I cant wait to get her out on a big field an open her up. I wanna tune those PIDs!

1 Like

Ok, so I am a bit confused on why the auto tune does not save the parameters. I successfully completed the auto tune in all axes and I tested them out after completed. Then, landed but the parameters did not save. Is there something I am doing wrong?

I switched out of auto tune when it was complete to test the gains, and I liked them, so I left the switch in auto tune mode and then landed, which is the exact steps in the wiki.

Also, I enabled auto tune while I was in the Alt-Hld flight mode.

Maybe not. Does the log actually show it was in Auto Tune when it was disarmed? A common mistake is not understanding how Flight Modes override no matter how they are activated.
You can delate all those screen shots.

That makes sense. I will check the logs… I mustve overiden the auto tune by landing, I guess?

Yes, probably. If you have a switch configured for Auto Tune even if it’s high it will still be overridden by any change in flight mode from an assigned Channel or the Flight Mode channel. When Auto Tune completes land and disarm w/o changing modes. Then make another flight to test it.

Where would I check this in the log? It says something about “Land_repo_active” when I plot the throttle.

Graph anything and it will show flight modes.

It shows that the auto tune was a success before I landed.

I usually hit a land switch and a disarm switch, but all that will happen even without flipping switches if I manually land, correct?

Sure, but if you changed to land mode with a switch it’s not in Auto Tune anymore. It says right there Autotune off. When it finishes Land manually. It will be in the mode you switched from to enable Auto Tune. That’s it, no more to it.

1 Like

Thank you very much! I got it working with your guidance and now I am going to start the tune cycle. That is, manual PID tune, notch analysis & modification, re-autotune, and repeat until I get no oscillations and she flies tight and responsive.

Is that your general tune work flow?

Yes.
From default:
Set the Initial Tune Parameters and enable batch logging to collect data for the Notch Filter.
Make a short flight in AltHold until mid stick hover is learned.
Review the log for RC outputs oscillation, and general vibration.
Address vibration if excessive and if outputs oscillation is present drop the Rate PID’s.
Set the PSC_ACCZ_P&I from Hover throttle (CTUN>Tho)
Make another flight and confirm oscillation is reduced or gone. If not drop the Rate PID’s further.
When you have a decent looking log set the Notch Filter parameters and make another flight to check them.
Auto Tune (or Manual Tune if you have the chops for it).

1 Like

So one thing I am a bit confused on, is when I set the initial parameters with the calculator/helper, it said to set ATC_THR_MIX_MAN to 0.5, but i dont think that step is in the wiki… did I over look it? I did set it, but I havent noticed it in the wiki, unless I am missing it.

So right now, I have
ATC_THR_MIX_MAN = 0.5
ATC_THR_MIX_MAX = 0.5
ATC_THR_MIX_MIN = 0.1

Are these reasonable?

It’s in there somewhere in the manual tuning sections. Set it to 0.5 after decent stability has been accomplished and before Auto Tune. The other 2 can be left at default.

Got it!

Quick question, if I plot the FFT and check the magnitude option and the resulting graphs have a huge peak before filtering, but have nothing after filtering, does that mean I have a good filter and it has cleaned up all the noise?

If needed, here is the log

and here is the plot:

The ‘after’ plots are completely flat and idk what to make of it. This is the first time I checked the magnitude option.

Yes that is correct.
In the log I looked at for your other problem - the battery failsafe settings wrong and the ESCs shutting down - the HNOTCH params are correct and working.

1 Like

I appreciate it greatly @xfacta!

So just because the HNOTCH params are working correctly now doesnt mean that I am done with them, correct? As I continue tuning I have to revisit them and adjust or can I leave them as is?

Also, am I supposed to be adjusting the low pass filters as well e.g. INS_GYRO_FILTER and INS_ACCEL_FILTER?

The wiki says to find the peak which represents the motor rotational freq. but I am lost as to what to do with the peak’s frequency. For me, it seems like it is always at 75-80 Hz. Does this frequency corrispond to INS_HNTCH_FREQ and if so, does ardupilot automatically set that for me?

I guess I am confused, or might’ve missed, where the 60Hz lowpass gyro filter comes from in the wiki example. Was that just a trial and error value?

Leave the filter settings for now, they are correct and should continue on to be valid unless you change motors or props.
Move on to Autotunes and some test flights.
Ascents and descents are helpful too.

1 Like