While in Loiter Mode: loss of altitude when executing a Yaw

Got it, I will endeavor to do that!

Thanks for the info.

Hey Shawn, the table you provided has some items listed that are at issue:
1 - MOT_BATT_ARM_Volt_Max.: this param. is not listed in the full param. list
2 - MOT_BATT_ARM_Volt Min.: this param. is not listed in the full param. list
3 - PSC_ACCZ_P: the table states to set to .2, .5 is the min. unless I override. Why should I have to override the min?

I dont see those in the spreadsheet: MOT_BATT_ARM_Volt_Max/min
The correct ones are:
BATT_ARM_VOLT
MOT_BAT_VOLT_MAX
MOT_BAT_VOLT_MIN

In the spreadsheet, PSC_ACCZ_P starts with 0.2 in there, but you put you’re own MOT_THST_HOVER value in after you’ve done a test flight or two and MOT_THST_HOVER has learnt a new value.
The warning about minimum can safely be ignored and some of those warnings in MissionPlanner are out of date.

GPS HDOP is one of the measures of GPS accuracy, lower is better. Below 1.0 is good. VDOP is there too but it’s more likely to wander a bit (altitude).
Number of sats alone is not an indicator of a reliable 3D fix.

So if HDOP starts out at 1.0 you may not have a suitable 3D fix at the start of the flight (it can take a while at ground level -> clutter, reflections) and goes down to 0.85 during flight that is a sign that GPS accuracy/reliability improved. Ideally you’d set those Fence params and wait till you could arm, then you’d know GPS assisted modes will work as expected, and RTL will work when you need it.

Thanks Shawn, not sure how I came up with "MOT_BATT_ARM_Max/Min?? Enter the MOT_THST_HOVER value (in my case .2657928).

One thing I noticed is after flying the craft some of this will acclimate over a few flights and become more stable over time…

Hi Shawn, well I made additional edits to the param list and conducted a test flight in preparation to conducting single axis auto tuning. Unfortunately things did not go well, I now have a serious twitch while in Stab., Loiter, or AltHld (only Roll twitch, I think). I did revert back to the some of the original param settings but the twitch continues (see below) but I have not been able to narrow it down to the specific param which is causing this twitch. So, I am coming back to you to see if you have any suggestions:

AUTOTUNE_AXES: Orignal Value: 7 Current Value: 1 (roll) Reverting to: 7 (roll,pitch,yaw)
AUTOTUNE_AGGR: Original Value: 0.1 Current Value: 0.1 Reverting to: 0.1 NC
ATC_THR_MIX_MAN: Original Value: 0.1 Current Value: 0.5 Reverting to: 0.1
PSC_ACCZ_I: Original Value: 1 Current Value: 0.4 Reverting to: 1
PSC_ACCZ_P: Original Value: 0.5 Current Value: 0.2657928 Reverting to: 0.5
The following parameters are secondary suspects, will revert to the original values for:
BATT_ARM_VOLT: Original Value: 0 Current Value: 11 Reverting to: 11 NC
BATT_CRT_VOLT: Original Value: 0 Current Value: 10.5 Reverting to: 10.5 NC
BATT_LOW_VOLT: Original Value: 10.5 Current Value: 10.8 Reverting to: 10.5
MOT_BAT_VOLT_MAX: Original Value: 0 Current Value: 12.6 Reverting to: 12.6 NC
MOT_BAT_VOLT_MIN: Original Value: 0 Current Value: 9.9 Reverting to: 9.9 NC
.bin file: https://drive.google.com/drive/u/0/folders/1oJu4VgNgmyL_zD6jq1j20pBN_rVmGqK6

Hey Shawn, I am attempting to research the Quad twitching I am now witnessing and put together a word doc. with some pre/post twitching (since I am un-educated regarding log file analysis this is a bit of a stab in the dark, but maybe helpful). Same link as the .bin file.
https://drive.google.com/drive/u/0/folders/1oJu4VgNgmyL_zD6jq1j20pBN_rVmGqK6

It’s a good idea to keep a record like you have started. I’ll check previous logs to see what else has changed apart from Filter values.

Motors are oscillating to minimum and maximum
image
and attitude is essentially out of control

Almost none of the parameters you list above affect the stability that drastically or at all.

You should be able to reduce these params to reduce that oscillation (reduced values shown here), try these first
ATC_RAT_RLL_P,0.10
ATC_RAT_RLL_I,0.10
ATC_RAT_RLL_D,0.005
ATC_RAT_PIT_P,0.10
ATC_RAT_PIT_I,0.10
ATC_RAT_PIT_D,0.005
If oscillations are reduced but not gone you could set them a little lower again.
Once oscillations are more under control you could possibly reduce these too
ATC_ANG_RLL_P,4.0
ATC_ANG_PIT_P,4.0
But these are already very low, and normally I’d expect these to go higher, like at least 6.0 or more.
Dont do big long test flights, just hover and move around gently, small tests where you can visually see if tuning is better or worse, then land and consider what changes to make.
Read through this:
https://ardupilot.org/copter/docs/tuning-process-instructions.html

EDIT: maybe set MOT_SPIN_MIN lower, to 0.13

If you can get the quad more stable by small adjustments of all those values, then autotune should be able to fix it up.

EDIT2: I couldnt access any of your previous logs

1 Like

Shawn, well everything has gone to h*** in a handbasket!

Trying to eliminate the twitch I decided to load the old parm. It went down hill from there. The Quad would not arm “ACCEL not cal message”, I ended up recal. the ACCEL and Mag. It will now arm (in fact I no longer have the issue of having to cycle pwr?). But now and even bigger issue. When I attempt to TO the Quad wants to pitch backwards (would end up flipping if I did not give it 70% forward pitch on the TX, unflyable!

Not even sure how to proceed now. Any suggestions?

We’ve all been there!

Connect to MissionPlanner and see if the HUD matches the actual movement of the craft.
Also use the MissionPlanner motor test to verify MotorA is front right, MotorB is back right and so on around clockwise.

You might have to redo the accel calibration.
Unfortunately, it’s not a good idea to reload a whole parameter set :frowning: There’s always something changed that you forgot about , or shouldn’t be changed.
It’s best to use a subset of parameters, just some tuning stuff if you’re going to jump back in time.
You can always use the params from that last log file and reload them - MissionPlanner will save them out as a self contained param file when you use MissionPlanner to download logs.

Eventually you’ll become much better and know what to look for. Sometimes I’ll sit and think about changing some params for hours or days before making changes. Best to stick to the tuning guide.

Thanks Shawn, I have watched the APM video on how to analyze params. but it is very out dated and really is marginally helpful. Do you have any suggestions regarding educating ones self regarding param analysis?

Hey Shawn, a few more questions.
1 - You say use MP to view motor rotation direction (I am certain that the mots./props are correct but I am attempting to test/verify anyway so as to eliminate possible causes).
When I attempt to use the MP motor test function (Quad secured to the ground) I hear the Pixhawk tones like the motor is going to activate, but nothing happens (tried Mot A-D and even mot. E-H? (Conditions: MP open and functioning, Mavlink connected [RF or USB connection does not make any difference]; Pixhawk fully powered i.e. LiPo power; Tx [On or Off, does not make any difference];
2 - One thing that has always concerned me is the quad icon shown on MP always shows a “+” config., yet I fly an “X” config. is this correct?
3 - Also, MP quad icon shown what looks like a red “1” what is that icon?
4 - Why does MP (Data/Messages) state that this is an OctaCopter when I have selected Quad X config.?
5 - Also, now that I attempted to do the MP motor rotation validation (#1 above), my Quad now emits the tones like it is ARMing but when I move the TX Thrtl stick to the lower right the props do not spool up?

Point 2 and 3 - where are you seeing this in MissionPlanner?

I don’t see the same effects in MissionPlanner - in motor test it doesn’t visually indicate what configuration I have, only the corresponding number of motors (A, B, C, D for four motors)
In that last log you have you parameters set correctly for Quad X.
image
You should only get the correct number of motor test buttons (four of them) or there is something very wrong. Ensure FRAME_CLASS is set to 1 and FRAME_TYPE is set to 1 then reboot.
Check SERVO1_FUNCTION=33 through to SERVO4_FUNCTION=36 and all other SERVOx_FUNCTION=0

With the motor test, you don’t even need your RC turned on, and you certainly don’t need to try and arm the motors like you normally would.
You DO need to operate the Safety switch if you have it connected, or set BRD_SAFETYENABLE,0 to disable the safety switch entirely.
Connected to MissionPlanner, select the motor test section, click the Test motor A button -> front right (Motor 1) should spin. The default 5% throttle might be too low, increase it slightly to get all the motors starting up reliably. Whatever you have to set here for reliable operation, say 8% for example, would become your MOT_SPIN_ARM, 0.08 in this example. Yours is currently 0.10 , which is perfectly OK.
In MP motor test, Motor B corresponds to the next motor around clockwise, Motor 4 in normal Ardupilot numbering. Motor C is Motor 2, Motor D is Motor 3. After you see this in action it becomes obvious.

The Arducopter motor NUMBERING corresponds to Servo out or Main out connectors: Motor 1 -> Main out 1 and so on…

Once you’re happy with the config on the ground and are ready for a flight test, you could set INS_GYRO_FILTER,20 since the quad seemed more stable that way. Then we can set about getting it stable enough for an Autotune and see which way the PIDs are going. Harmonic Notch Filter will help us here.

As the tune improves, we should be able to sneak that INS_GYRO_FILTER up in stages and get better Autotune results each time. So for “stage 1” lets set:
ATC_RAT_PIT_FLTD,15.00
ATC_RAT_PIT_FLTT,15.00
ATC_RAT_RLL_FLTD,15.00
ATC_RAT_RLL_FLTT,15.00
ATC_RAT_YAW_FLTT,15.00
INS_GYRO_FILTER,20.00

“Stage 2”
ATC_RAT_PIT_FLTD,15.00
ATC_RAT_PIT_FLTT,15.00
ATC_RAT_RLL_FLTD,15.00
ATC_RAT_RLL_FLTT,15.00
ATC_RAT_YAW_FLTT,15.00
INS_GYRO_FILTER,30.00

“Stage 3”
ATC_RAT_PIT_FLTD,20.00
ATC_RAT_PIT_FLTT,20.00
ATC_RAT_RLL_FLTD,20.00
ATC_RAT_RLL_FLTT,20.00
ATC_RAT_YAW_FLTT,20.00
INS_GYRO_FILTER,40.00

Actually I’ve been a bit mystified why this quad is so difficult to get flying and so unstable - usually with the parameters you’ve had it should fly OK, maybe not perfectly, but enough to run Autotunes and so on. It’s all learning, and there’s plenty of times I’ve been mystified by these sorts of things.

EDIT: the first log you posted had better flight and was probably able to do autotune, we’ve gone downhill since then :frowning_face:

1 Like

Can you post a photo or two of the quad? Just wondering if that will help explain anything.
Do the arms, motor mounts, or frame in general, seem very flexible? Or very stiff?

Shawn, the frame is the standard plastic frame that many use. The Quad has at least 30 flights on it and all have been excellent to very good until very recent history. Something I noticed is very odd, even though I selected Frame Type: “X” Quad , MP Mavlink window starts out showing Com8-1 QUADROTOR, but it reverts to COM8-1 OCTOROTOR (just noticed this). I am certain that I selected the config.: “X” and when I look at the frame type under the setup it does show the Quad image, but I do not understand why Mavlink starts out with Quad then changes to OCTO. If Pixhawk some how thinks this is a Octo then that might explain the pitch backward. Any comment on the motor test, I simply cannot get it to work. Also, the motor test shows selections provides for testing 8 motors (again this is a Quad not an Octo so why does MP offer 8 motor tests for a Quad??).Pic at https://drive.google.com/drive/u/0/folders/1oJu4VgNgmyL_zD6jq1j20pBN_rVmGqK6

I am still working on the info. you posted just prior to this. Regard my items 1 and 2. They come from MP, data tab, multirotor icon (see image uploaded).

Shawn, for sure there is something very wrong. I have now confirmed that when I initially start Mavlink it says COM8-1 QUADCOPTER, but once Mavlink establishes com. it changes to COM8-1 OCTOCOPTER and Motor Test presents eight selections “Test motor A - Motor H”. Under the Servo Output it shows 1 - 8.

Keep in mind that the Quad flew great, very stable in StabMode, and pretty rock solid in Loiter. I have flown at least 15 Auto Flight test flights, RTL, Stab., Loiter, AltHld nearly every flight. Things started to come unspooled when I began modifying the param. list in an attempt to proceed towards auto tune/notice filter tune.

**Also, something else "SERVO1_FUNCTION=33, The params list jumps from SERO1_Function to SERVO10_Funtion! The list then continues with SERVO2_Function-=37, SERVO3_=37, SERVO4_=37, SERVO5_37, SERVO6_=37, SERVO7_=37 and SERVO8_=37. So, the param list seems to be corrupted in some way that the config. (from my perspective knowledge looks like the config. is setup for an OCTOCOPTER!!)** I did manually, change / correct the SERVO5 - SERVO8 to “0” but Mavlink still continues to change from showing COM8-1 QUADCOPTER to COM8-1 OCTOCOPTER!! Even after modifying the param list and changing the SERVO5 - SERVO8=0, MP still shows “Test motor A - Test motor H” like MP thinks this is a OCTOCopter. Still cannot get the motor test to work.

It is beginning to look like something if very corrupted, if not in the parameter list but maybe the Pixhawk!? Any advice? Would it be worth reloading the 4.0.6??

OK, got Motor Test working, and I think this pretty much confirms that the Pixhawk/MP think this is an OCTOCOPTER. Even though I am certain I originally selected Quad, the image shown in SETUP/Mandatory Hardware/Frame Type shows Quad (it does not show OCTOCopter, see image uploaded.https://drive.google.com/drive/u/0/folders/1oJu4VgNgmyL_zD6jq1j20pBN_rVmGqK6

QUAD X config.
Test Mot. A= Works, correct spin (front right mot., CCW)
Test Mot. B=Does not work, nothing happens
Test Mot. C=Works, correct spin (rear right mot., CW)
Test Mot. D=Does not work, nothing happens
Test Mot. E=Works, correct spin (front left mot., CW)
Test Mot. F=Does not work, nothing happens
Test Mot. G=Works, correct spin (rear left mot., CCW)
Test Mot. H=Does not work, nothing happens
PS, I did need to chang Thrtl. to 10%, your great advice once again!

Making Progress, I think:
Shawn, one thing, I forgot to mention. When things were spooling out of control and the hole was getting deeper, I selected “Reset to Default” for the parameters list.

Here is where things are now:
1 - The FRAME_CLASS was set to 4 and FRAME_TYPE is set to 1. I modified the Class to 1.

The motor tests now work correctly:
Test Mot. A= Works, correct spin (front right mot., CCW)
Test Mot. B=Works, correct spin (rear right mot., CW)
Test Mot. C=Works, correct spin (rear left mot., CCW)
Test Mot. D=Works, correct spin (front left mot., CW)

But now when I attempt to operate the Quad I have a new issue. The Pixhawk Arms and Motors A, B and C spin up, but motor D does not spin up.

Maybe it would be best for me to try and reload what I believe was one of my last good param configs. and start testing over? What do you think would be the best course of action?

Ok Shawn, for sure making progress:
Went back to my saved config. file 22feb2021 (since it is probably the most stable file to begin the journey back). Loaded it and wrote to the Pixhawk. Double checked to make sure Frame Class was correctly set, it is. Made sure SERVO1-SERVO4 Function=33-36 and that SERVO5-SERVO8 Function=0.

Now able to manage TO, although a bit more challenging i.e. need to carefully watch attitude of the Quad, whereas before it was pretty effortlessly.

I will carefully load/test the more recent save configs. so as to mitigate having to redo a lot of work I have all ready done.

Not sure how things got corrupted i.e. Hex versus Quad copter. Maybe it was the selection of “Reset to Default” that screwed me up.

Not sure as yet as to the state of the twitch. I will probably conduct a quick test flight with the current config. and see if the twitch shows up.

Thank you very much for your help, you have been great!! Once I believe I am back to a more stable situation I will begin the AutoTune / Notch Tuning.