Oscillations in hover for a compound helicopter build

Hi everyone,

I need some help with my Ardupilot heli build. It’s a compound helicopter with two ducted fans on each side that provide forward thrust as well as yaw balance. There is no tail rotor — it’s replaced by the two ducted fans. It flies well and feels stable overall, but when hovering there’s a noticeable oscillation that happens.

The heli uses three 700-size blades and weighs about 7.7 kg. I’ve adjusted several parameters including PSC_POSZ_P, PSC_POSZ_I, ATC_ANG_PIT_P, ATC_RLL_PIT_P, PSC_ACCZ_P, and HCOL_HOVER.

I’ve also tried the Autotune procedure, but without a buzzer or a ground station it’s difficult to tell when each cycle is complete, so I haven’t had success saving any of the adjustments.

The oscillation in hover became significantly worse after removing the rear rotor, which previously provided additional moment of inertia around the pitch axis. To verify this, I’ve flown the heli with both a perfectly centered center of gravity as well as when it’s moved forwards. When the center of gravity is perfectly centered, the pitch oscillation gets worse. However, if I add a bit of weight to the tail, the oscillation disappears almost completely.

In Acro mode the heli flies perfectly stable, as it does in Stabilize mode. In PosHold, it also flies well as long as it’s moving in any direction, even at low speeds.

By adjusting the parameters mentioned above, I’ve been able to get it to perform well in Auto mode too. However, it still refuses to hover steadily without the pitch oscillation.

I’ve provided a log from one of the flights - https://drive.google.com/file/d/1VaTFyPdCh2L7QnR3aV6Cs4kWuDAS98-V/view?usp=sharing

Any advice or tuning suggestions would be greatly appreciated!

As a tuning novice, I’m going to take a guess that your P gains may be too high at 0.09.

Hi!

First of all, where/how are you doing compound helicopter code? I’m looking to try this soon, my understanding is it hasn’t been added yet, so you must be doing this in a branch?

Second, you really shouldn’t be doing something like this without a GCS.

But on to your actual question:

It’s been a few years since I did this, just getting back into it so I’m a bit rusty. But I think you’re looking in the wrong place. Your root problem isn’t parameters, it’s that your helicopter is vibrating very badly. The controllers can’t even begin to work because they are responding to vibration. Your servos are going absolutely nuts, any attempt of flight control is lost in the noise.

Here’s a plot of your Servo 1 output, vs. your X-axis vibration. Your servos are responding to vibration.

I think you need to fix this first.

1 Like

Hey Rob! Thanks for the reply.

I am not sure this is the issue. The helicopter flies steady in any free mode. The servo rods, blades and everything else was checked and mechanically calibrated. I think it’s having vibrations because the serves are moving, not the other way around.

As for your other questions - I am using the regular branch of Ardupilot. However for the compound part I am forwarding the yaw signal, throttle signal and anything else needed from my Cube Orange to an ESP32 first where I’m doing the mixing with my own code then going to the actual EDFs.

If you want to share - what type of compound helicopter are you going to build and what issues do you think you will have?

Yeah… OK, cause and effect. What do you mean by “flies steady in any free mode”? What is a “free mode”?

Ok, so you’re doing this compound thing externally. Interesting. I’m planning on doing it internally on a branch.

I’m just looking at a standard compound with open props. At least for now. May do ducted fans later, but I don’t want to get into a complicated aero/mechanical project yet. I have a couple Goblin Fireballs I used as test beds.

This is because of how POSHOLD is implemented. It only uses the position controller while the pilot sticks are centered (i.e. holding position). when the pilot is moving the sticks then it follows some other logic that I am unfamiliar with. I don’t recommend using POSHOLD. It is a bastardized mode that I think moves between althold when the pilot is commanding movement and loiter when the sticks are centered.

I would recommend flying in loiter to see how the position controller is handling the tune in stabilize mode. Loiter uses the stabilize logic as the underlying attitude controller. However after looking at your acceleration max parameters, I know that the position controller will not do well and understand why you are seeing oscillations. What size helicopter is this? Why did you make the acceleration max so low? Is that necessary? You should really rely on the ATC_INPUT_TC parameter to slow the aircraft response, if that was what you were trying to do with the accel max parameters.

Also please set the FAST_ATTITUDE bit in the LOG_BITMASK parameter.

2 Likes

Good catch on the PosHold. You’re basically correct. PosHold, IIRC, was created by Marco Robustini because he wasn’t happy with Loiter performance circa 2015-2016. IMO, to a large degree the issue was more about a misunderstanding of the tuning of Loiter params, and defaults were very soft. He wanted pretty dynamic flight, but then be able to hold position at mid stick.

I think it basically goes between Alt_Hold and Loiter when the sticks are moved or centered. So the attitude controller should be like Stabilize when moving the sticks, and Loiter when sticks are centered. And there’s some transitory period between the two that I don’t understand.

So if the heli behaves OK when moving the sticks, and not well when centered, that does probably point to the Position Control parameters causing the problem.

1 Like

posHold is the best invention, I didn’t know was created by Marco Robustini, italian like me but I dont’t know him; the perfection of PosHold should be in wind condition, that sums the stick imput from zero to actual angle because if there is wind in stick zero in hover, the traditional hely is about 4/5 degree of roll or pitch, so when i put stick input to example 3 degree, the hely traslate a bit where is the wind, opposite to the stick deflection; now I don’t remembere a log with wind to post; if correct the input stick as a sum, not an absolute angle input, it will be perfect in precision of hely control that is anyway almost perfect.

edit: I correct myself, the idea of ​​adding degrees is not a good idea, as the wind can change and also the direction; the ideal would be to use a single solution, but adding some sort of feed forward, or trying to understand how the DJIs do it, which maintain the position but when you give a command they immediately tilt; currently I have to use both the Loiter and Post hold, so all in all it’s still a solution.

Thank you for your inputs, really appreciate them. I’m also a fan of PosHold’s behaviour as it allows for a more “manual” feel compared to Loiter. Here is some more info as the problem is still unresolved and is very frustrating as it’s preventing me from moving forward with my project:

⁃ I’m running the ESC in governor mode, but I can vary the RPMs. I’ve been experimenting a lot over the past few days with lower RPMs as I had a few very stable flights and I thought they were the result of lower RPMs. And while I can say that raising the RPMs mid-flight definitely worsens the oscillations and lowering them definitely makes things better, I cannot conclude that lower RPMs guarantee stable flight.
⁃ When oscillations begin, they can usually be brought back under control by moving the helicopter sideways and back and forth. But it doesn’t always work.
⁃ I’ve almost never experienced the oscillations while climbing after takeoff. I always climb 20-30 metres before moving sideways and that phase of the flight is almost always flawless. As soon as I stop climbing and hover, though, the oscillations begin.
⁃ I’ve recorded an interesting flight today and am sharing with you the log. The third take-off in that log was done in Stabilize mode. As you can see, everything was perfectly smooth - the climb, the hover, the manoeuvres. As soon as I switched into PosHold, the oscillations started. And even after calming them down and getting back to Stabilize, the heli never stopped shaking.
⁃ What’s most confusing is that I’ve had two or three flights that were done entirely in PosHold and were perfectly smooth. Sometimes you could see the oscillations starting and then dampen down.
⁃ I’ve increased the ATC accelerations mentioned by Bill to slow, then medium, then back to slow for all three axes. That didn’t seem to change much.

I’ve done dozens of adjustments to the ATC_ACCEL, ATC_ANG, ATC_RAT, the PSC parameters, they’ve improved things marginally but I’ve never managed to fully get rid of the oscillations. They put the heli in real danger as the shaking can get violent.

One parameter I’m confused about is the Zero Thrust Collective. My max collective is +12, min collective is -4. It’s measured and verified for each of the three blades. I have 0 in Zero Thrust Collective, however, measuring the blade pitch shows around -2.5. If I update the value (to let’s say -1), the blades move to -3.5. Is that the expected behaviour?

Please take a look at the log and let me know if you have any questions as I would love to finally get this settled.

Hey guys, I would really appreciate someone’s help here. I think I’ve tried everything and nothing solves the issue. I’ve done a bunch more test flights and I can definitely confirm that higher rotor RPMs lead to oscillations more easily and they become a lot more violent. I can share videos if you want me to.

I’ve also noticed that they can start even in Stabilize or Acro. It’s difficult to get them going but not impossible.

The t-rex copters can vibes without controller, choose quality blades could solve; I used also Kyosho and Mikado Logo, never Goblins though I know the inventor and I can visit the factory; I past some years tuning roll thinking to find parameters, then I seen impercettibile resonance caused by skids in roll axis

I’m sorry if I’m misunderstanding, (I’ll try to look at the logs later today when I have a bit more time) but all the tuning and filters will be tied to your rotor RPM. If you change the RPM but have the same PID tuning then problems like oscillations may happen. Arducopter doesn’t handle multiple head speeds like other fly-barless controllers do.

1 Like

Would it be feasible to add PID scaling based on headspeed?

Great question, but beyond my abilities. I know there was talk about using lua scripts to switch to different values but I lost track of where that ended.

@Wyand I am noticing the oscillation in the vertical axis during flights in POSHOLD. Please conduct a flight only in althold mode. I want to see if I can isolate this to just the vertical axis. It is possible that it is coupled between horizontal and vertical but this should help isolate it.

As for your other questions - I am using the regular branch of Ardupilot. However for the compound part I am forwarding the yaw signal, throttle signal and anything else needed from my Cube Orange to an ESP32 first where I’m doing the mixing with my own code then going to the actual EDFs.

This concerns me. Is your code only affecting the ducted fans? I think it would be ok if it is only used to control the ducted fans.

Post your data from the flight in althold. If there are no vertical oscillations then I can only assume that the vertical oscillations are a coupling from the horizontal axes. We will see.

On this video you can see a side view, as well as on-board view with slow rotor RPM as well as faster rotor RPM.

I’ll try to record a log today if the weather allows.

I think this should do. The whole flight was flown in AltHold. There was a little bit of wind, but I managed to move it between calm and oscillating states quite a few times. As you can see, it can hover very stable, but then as soon as oscillations occur, they don’t slow down. I have to move forward and often descend in order to get them under control and then perfectly stable flight resumes. This entire flight was done at fairly low rotor RPM.

So this is definitely in the z axis. So let’s fix that first. The vertical axis has two cascaded PID controllers. The inner loop is the acceleration and the outer is the velocity. I think you should lower the velocity quite a bit in order to tune the inner acceleration loop. Then you can raise the velocity gains.

Here is where I would start

PSC_ACCZ_P = 0.1

PSC_ACCZ_I = 0.3

PSC_VELZ_P = 0.5

PSC_VELZ_I = 0.0 (keep this at the default value of zero

PSC_POSZ_P = 0.1

The velocity and position P values are 1/10 of the defaults.

I lowered the accel P and I to 1/3 the defaults.

Only conduct these tests in althold. Be prepared to switch into stabilize if the oscillations get bad or some other odd thing happens. Hopefully this will eliminate the oscillations in althold. If they don’t go away then halve the accel P and I gains and the Velz P and POSz P gains. Then try again. Do this until you don’t see any oscillations. If you didn’t encounter oscillations after the initial values then you can raise the ACCZ P and I gains by 25% until you encounter oscillations. Then use the previous setting that did not cause oscillation. Next you would raise the VELZ P gain until you get oscillation. Then back off to the previous gain with no oscillation. Then finally POSZ P gain. Same process.

let me know how it goes.

2 Likes

Thanks a lot for the feedback, Bill!

I did a few tests today. First, with the values you suggested. I believe the stability was a bit better, but there were still oscillations. I also felt that the vertical controls were becoming very slow to respond in AltHold. I then further halved the values. That seemed to further improve the oscillations, but they still exist. However, now the vertical controls are fully unpredictable. The heli barely climbs and then continues climbing despite being told to hover or descend. Same thing on the way down. It can get bad enough that it actually breaks through the max altitude limit and switches into Smart RTL mode.

I’m uploading two logs, both of them with half the values you suggested. As you can see, the last flight was very interesting. The oscillations got so bad that the heli wouldn’t stop climbing. I had to switch into Stabilize at high altitude and during pretty severe shaking. Stabilize pretty much immediately damped all oscillations and I was able to land very smoothly. So despite the fact that you can see a bit of side-to-side oscillations in Stabilize because of wind or more aggressive manoeuvres, which I guess are due to the physical properties of the build and its moment of inertia, they die down rapidly. But in AltHold and PosHold they would get amplified by the PIDs.

So, in order to avoid the complete unresponsiveness on the Z axis, which parameters should I increase back and to what values? Just the VELZ?

A few more comments / questions:

  1. You asked about the Arduino running my code to balance the torque and provide forward thrust with the side propellers - yes, that code only affects the ducted fans, it doesn’t interact with collective or cyclic.

  2. Could you confirm what value Zero Thrust Collective should give once min and max collective are set? Is it supposed to be negative or should it sit at exactly zero degrees?

  3. Is there any reason to believe that TradHeli wouldn’t handle different rotor RPMs? Obviously if a notch filter is needed that would be a problem, but what if there’s no notch filter. Should any of the other parameters be affected?

Thank you for your time.

I haven’t had the chance to look over your data but it seems very odd that you are having these oscillations in the first place. Your set up is not that different from the many Heli’s that use these same setting and don’t see oscillations. What helicopter kit is the basis for your design or is this design completely homemade? I see that you are using the passthrough RSC mode . How are you holding constant rotor speed? Is that adjusting the governor for the ESC?

Again, this all seems very strange to have this problem to begin with.