AMP:Copter3.2@TradHeli - how to set PosHold, ACRO, Yaw

Hello,
I’m quite new to APM and I’m trying to make it work on 450 size flybarless heli.
Step-by-step I’m studying APM info and tuning heli and until now I was able to setup heli to fly properly in STAB mode (probably). Anyway, there are some things that are not clear to me, yet, so I’d like to ask following questions:

  1. Today I’ve tested PosHold mode. It worked just fine except for one thing - the RPMs of rotor were too low in my opinion. Heli was precisely holding it’s position, but after I’ve switched back STAB mode it started rapidly descent - I was able to stop descent just near the ground with much power. How to fix this? E.g. is it possible to set throttle/RPMs to constant value, lets say to 80% of max, and move heli up-and-down just by collective pitch?

  2. How to setup correctly ACRO mode to make heli lock in last position (not to level like in STAB mode)? There are some infos at page copter.ardupilot.com/wiki/tradit … er-tuning/ , but for example I’m missing AXIS_ENABLE parameter in my parameters list (no idea if it’s not valid anymore or I’m really missing it).

  3. Yaw PIDs are probably not set to best values - can someone read this from log and make me any suggestions how to make it better? Tested on STAB mode

I’m attaching log with current parameters from last flight in STAB mode - PosHold mode log was not saved I’m affraid…

Thank you in forward for your help!

[quote=“sobi”]…

  1. Today I’ve tested PosHold mode. It worked just fine except for one thing - the RPMs of rotor were too low in my opinion. Heli was precisely holding it’s position, but after I’ve switched back STAB mode it started rapidly descent - I was able to stop descent just near the ground with much power. How to fix this? E.g. is it possible to set throttle/RPMs to constant value, lets say to 80% of max, and move heli up-and-down just by collective pitch?

    [/quote]

just thinking - will setting of parameters

or

to higher values fix this issue?

How do you have your ESC wired up? How are you controlling the throttle signal?

Ok, looking at your param file, you have H_RSC_MODE set to 1, which means Ch8 passthrough. So if you have this set up properly, then your motor speed should be controlled from Ch8 in your Tx. You are not logging much, so I can’t see what your Ch8 values are.

For your Acro question, that wiki page is slightly out of date. Axis_Enable is no longer used with AC3.2. This feature is always turned on. The rest of your settings:

ACRO_BAL_PITCH,0
ACRO_BAL_ROLL,0
ACRO_TRAINER,0

Will turn off all self-leveling and angle limits, so you should get a full acro performance.

For yaw, your Rate_Yaw_I term is very low at 0.015. This should probably be 0.1 to 0.5. Start with 0.1, that will help. Your P and D terms are in the ballpark. Maybe they could be higher, but impossible for me to say without actually flying it myself. Your Rate_Yaw_Imax is also a bit low at 2000, this should be 4500. You can only set it that high in the Advanced Parameters/ Full Parameters List tab.

Finally, you aren’t using any Rate_Yaw_FF. You should try 0.01 to 0.05.

-to low throttle/rpm issue - i’m going to use governor mode in next tests so it’s probably not an issue for me anymore
-to other things you wrote - thank you for your advice, I’ll try to use suggested parameters and let you know how it was working with them…

btw: I was missing in documentation part of “how to set heli mechanically with APM” and how to make heli hover over one place in STAB mode - I had to play with AHRS parameters (AHRS_TRIM_X, AHRS_TRIM_Y) to keep heli tilt on to right to compensate heli forces. I’m not sure if it was correct solution anyway

Yes, it is normal to have to autotrim a heli (which changes the AHRS Trim params) to get a heli to hover in Stab mode, and compensate for the tail rotor thrust by leaning right.

Well snow is gone here, but I’m again on the start of tuning of APM 3.2 at my 450 heli because my last tests in December failed.
What I did was that I’ve started to use ESC in Governor mode => higher RPM => heavy oscillations of heli due to balls oscillation on landing gear, see youtube.com/watch?v=jpmtp8nanes.
I had to change the landing gear to something firm and consequently I’ve also tried to play a bit with gains in APM.

So, the input condidions are:

  1. I’ve got configured 450 heli with governor (RPMs of governor are driven by ch8 value),
  2. STAB mode works correctly.

To the point - today I’ve tried to use ALT HOLD mode, but the altitude suddenly dropped after I’ve switched to this mode. My question - can anybody tell me the reason and what should I do to fix this issue?
I’m attaching quite verbose log file, my current APM parameters and some screenshots from Log Analyser. ThrOut channel means collective pitch value I guess.
Thank you for any advice.

I suspect the problem is that your vibrations are quite a bit too high, which is why you’re having problems in Alt Hold.

Are you sure? Vibrations graph while ALT HOLD attached.
What should be the limit values, that would be OK in your opinion?

Next iteration was more stressing for heli, because it was jumping up&down, but less stressing for me, because heli was not falling down like the stone.
I’ve added one more anti-vibration foam under my APM Mini and changed following parameters:

  1. throttle/collective pitch for hovering in % x 10
    THR_MID 500 -> 700
  2. max. ascent/descent speed in cm/s
    PILOT_VELZ_MAX 250 -> 150
  3. throttle PIDs
    THR_ACCEL_P 0.3 -> 0.75
    THR_ACCEL_I 1 -> 1.5

Well, I’d like to make some conclusion to this thread - maybe it will helpful to someone else.
Actually, I did many iterations (APM config change -> test -> results analysis) and I think that finally I made it work - it’s definitely not perfect, but it works. Most important things I’ve learned in this process IMHO are:

  1. You have to tune modes in order
    Stabilise -> AltHold -> Loiter or Poshold and you can’t skip any of these steps

My hints for Stabilise mode tuning:
-set your logs bitmask to see useful data in flashlogs of APM, I’m using value

-if you have CPPM 450 size Heli and APM is approx. leveled with heli body, you can start tuning with AHRS values

AHRS_TRIM_X,0.08 AHRS_TRIM_Y,-0.05 to make heli fly close to level flight
-my final list of parameters for Stabilise mode tuning:

H_COL_MAX,1680 H_COL_MID,1520 H_COL_MIN,1330 RATE_PIT_D,0.0005 RATE_PIT_FF,0.02 RATE_PIT_I,0.1 RATE_PIT_IMAX,500 RATE_PIT_P,0.04 RATE_RLL_D,0.0005 RATE_RLL_FF,0.02 RATE_RLL_I,0.15 RATE_RLL_IMAX,500 RATE_RLL_P,0.03 RATE_YAW_D,0.001 RATE_YAW_FF,0.01 RATE_YAW_I,0.1 RATE_YAW_IMAX,4500 RATE_YAW_P,0.2 -please note, that there are many factors, that affect those values, so they will be most probably not the same at you

AltHold mode tuning:
-analyse dataflash logs from stabilize mode and find the throttle required to hover your heli - CTUN -> ThrOut & Alt
-set this throttle value to

THR_MID parameter
-if the value reuqired for hovering differs too much, your heli will drop down (or jump up) when AltHold mode is activated
-set parameter

PILOT_VELZ_MAX to value not too high for beginning (e.g. 170 cm/s), because if your heli is going down too fast, it can get to “vortex ring effect”
-if you are testing max. speed of descent (throttle/collective pitch stick down), make sure, that will not cut-off throttle (and turn off governor like in my case :slight_smile:)
-my final list of parameters for AltHold mode tuning:

THR_MID,700 TRIM_THROTTLE,440 PILOT_VELZ_MAX,170 THR_ACCEL_D,0 THR_ACCEL_I,0.85 THR_ACCEL_IMAX,800 THR_ACCEL_P,0.425 THR_ALT_P,1 THR_DZ,100 THR_MAX,1000 THR_MIN,0 THR_RATE_P,4
Loiter & PosHold mode tuning:
-actually not finished yet, my parameters are probably far away from perfect values:

LOITER_LAT_D,0.3 LOITER_LAT_I,0.05 LOITER_LAT_IMAX,2000 LOITER_LAT_P,3 LOITER_LON_D,0.3 LOITER_LON_I,0.05 LOITER_LON_IMAX,2000 LOITER_LON_P,3

  1. Try to make vibrations of heli as low as possible. Anyway, the values shown by Rob in other thread are extremely low (and really hard to achieve). Example of vibrations levels that work for me fine are attached.

  2. Avoid usage of helping landing gear with balls on carbon rods - they can start to oscillate and make your heli unstable in flight. You can rather use landing gear from one-size-bigger heli (e.g. 500 landing gear for 450 size heli)

  3. Use external compass placed on tailboom if you are getting bad magfield values from GPS with integrated compass (or compass integrated in flight controller).

  4. Make sure that you configure position of compass correctly, otherwise you’ll get toilet-bowl effect for Loiter mode - definitely… Compare the heading with real compass heading before you test Loiter mode

This is my video of PosHold mode in a bit windy conditions - quality is quite bad, because of frame vibrations (and low light conditions)
[youtube]https://www.youtube.com/watch?v=oO13RAuLjcw[/youtube]

And last but not least - thanks to Rob and whole APM team for your effort in this Open Source project.

My final values for loiter mode tuning copied from other user on dyidrones.LOITER_LAT_D,0.7 LOITER_LAT_I,1 LOITER_LAT_IMAX,400 LOITER_LAT_P,0.8 LOITER_LON_D,0.7 LOITER_LON_I,1 LOITER_LON_IMAX,400 LOITER_LON_P,0.8Video from test of auto mode. Launch in Stabilise mode, RTL mode with autoland was manually engaged after end of mission.
[youtube]https://www.youtube.com/watch?v=puWfOcjuBho[/youtube] Max. speed during mission about 45 kph.

Hi Sobi,
I’ve been following your posts and was wondering where on your heli do you have the controller mounted?
I ended up moving mine to below the battery tray, using 4 - 2cm squares of zeal gel, this is on a blade 600x.
I will post mine vibrations log tonight.
Thanks

Hi, I’m using APM mini mounted on DIY anti-vibration mount just under beginning of tail boom.
It’s temporary solution for my vibrations fight - hopefully I’ll use just foam later.
I can post photo of my setup in the evening if you are interested in.

Sobi,
Yes I would like to see a picture of your mount, I had mine (pixhawk) on top of the frame behind the main shaft but had to move it due to vibrations.
It is now under the battery tray directly below the main shaft ( per the setup guide), this was a huge improvement and really helped.
It is much closer to COG now, I’m including a picture and my latest vibration graphs done at hover.
The four 2 cm squares of zeal gel was also a major improvement… :smiley:

Nice vibration levels. The main issue at me looks to be excentric bearing of swash plate.
I hope that it’s gonna get better when I change it.

Sobi,
Thank you for your compliment, its been a long road for me!
Looking at your mount it appears to be a sandwich type using zip ties to create a compression is that correct?
One thing I did while trying to get rid of vibrations was to read thru other auto pilots set up guides in hopes of finding something useful to me.
And I did, one guide said to mount the auto pilot as close to the COG as possible to limit the amount of movement.
This made sense to me and that’s when I moved the location of the pixhawk to where you see it now, things started getting much better after that in a very big way.
I then had to find the source of vibrations one at a time and get rid of them, I read thru the forum to find the common source’s and then looked at my set up.
Here is a list of the major changes that I did and were very very big in reducing vibrations for me.

  1. Moved the pixhawk to current location
  2. Blade tracking - added turn buckles for pitch links and used a digital gauge to get it to within 0.1 deg. of each other.
  3. Put the main shaft with the head and blades on in my dubro prop balancer to check balance, the balance was dead on so no issues there. (did the same with tail blades)
  4. Removed stock foam tape from pixhawk mount and used 4 - 2cm square pieces of zeal gel to mount the pixhawk.
  5. Improved wiring set up. (just a bit of slack and no tension on wires)
  6. Replaced stock main gear and pinion with lynx heli main gear and pinion (better quality), also balanced stock auto rotation gear while on the main shaft in dubro balancer.
    Did this looking at it from a hub imbalance stand point and corrected for it.

By far numbers 1,2,4 and 6 had the greatest effect and got me where I am today, and I was able to finally tune the heli without vibrations causing many many weird and skewed results that sent me down all the wrong paths…
I have alti. hold and loiter set up and bench tested, they appear to work properly and will be tested in flight next but I had to clear up the vibes first… just waiting for good weather… and no wind :mrgreen:

I like the looks of your landing gear (very sturdy) and am wondering what it is from??
Also it looks like you have a gopro mount and FPV setup??
Best of luck, Mark

Marc, thank you very much for your hints - storing to my notes. I’m just wondering - where did you get that zeal gel tape from?
And yes, you are right in all of your observations of my heli. That landing gear is made of HK600GT landing skind and …ehm… rest of broken nordic skiing poles.
I’m keeping my fingers crossed for your next tests.
Marian

Hi Marian,
I got the zeal gel here: [url][/urhttp://www.amain.com/rc-helicopters/kyosho-zeal-vibration-absorption-gyro-reciever-mounting-gel-1-sheet-kyoz8006/p19713l]

Hope the link comes thru…
Thank you Marian, today is the day I will find out if all the number crunching and testing works!!
Mark

Hi Sobi,
Alti. hold test did not go so well (heli jumping vertically about 1 foot) I did recover and land but it was a very rapid jumping.
I’m going to look into thro settings tonight, I’ll let you know what I find…