Synchropter build need help

Did you reboot the Pixhawk after changing the NTCH parameter?

Yes, I did.
As you can see from 2 log files. It will start logging to new file only after reboot.

Sorry. I haven’t had a chance to look at the logs. Thought I’d ask since it doesn’t behave well if you don’t reboot the Pixhawk. Trying to get to work. :grinning: I’ll try and look at your logs later this morn.

I’m not familiar with this setting. Typically it starts a new log file when you arm the aircraft. Or you set it to log when disarmed. Is that what you have set?

It has been this way since I got it.
Yesterday, I cleared log files then went flying without rebooting and there was no log of that flight in it even after next reboot.

Just tried it again, still the same.
It will oscillate in roll axis even at 0.100 P gain.
Got worse at higher P gain.

It’s worth mentioning that with exact same PIDs on both pitch and roll, roll feels snappier while pitch feels smoother.

Pitt,
I looked at the log files. I don’t have a good answer as to why you are still seeing the oscillations. I went back and looked at your flight before the notch and it looks like the instability frequency was a little higher (closer to 6 hz in pitch and closer to 5.5 in roll.).
I want to back up and go back to your original concern for oscillations in the yaw axis. In the log you sent me before you had the issue with the flight controller, you were increasing the gain for pitch and roll was showing oscillations with gain values around 0.19. At that point I didn’t see any real yaw oscillations but expected they would be around the same frequency. So I had you set yaw at the same notch center frequency. I guess I would like to see a log with your pitch and roll gains at some value or you don’t get a lot of oscillations and then increase your yaw gain so that I can see the behavior with high yaw gains. For this flight set all of the notch filter frequencies to zero. Your situation is unique because of the configuration of your helicopter with the intermeshing rotors. I expect some coupling between the axes due to how you are controlling yaw.
I do have one question about your set up. Did you properly account for the coupling in control of the pitch and roll for the rotor systems? What I mean by that is that for a rotor system that is not teetering (teetering is when flapping hinge is over shaft), there will be inherent control coupling due to the rotor phase lag between control inputs and flapping response. Do your rotor systems allow for flapping with the hinge point over the shaft? This is difficult to explain but it may be creating coupling that we aren’t accounting for. Just thinking out loud.

So…next flight:
-Turn off notch filter
-Use known good PIDs
-Increase yaw P gain
-Post log of yaw instability
Correct?

About rotors system, I’m not sure if spindle in rubber rings counts as a teeter or not.
Since my rotors use conventional RC heli spindle in dampers (Gaui X3 to be exact), I assumed it has ~90deg phase lag as usual.
Better have a look yourself:
*Spindles(feathering shafts?), swashplates, dampers from Gaui X3
*Black DFC links from JR Forza 450
*The rest are custom parts




Yes, That data would be helpful. You may want to do a flight where you set the Roll Notch center frequency to 5.5 with the other two left at zero and just raise the roll P gain. Then do another flight where you set the pitch notch center frequency to 5.8 with the other two left at zero and just raise the pitch P gain. Maybe I got ahead of myself having you set all of the Notch center frequencies. Just remember to cycle power to the pixhawk each time you change the notch center frequency so as to reset the filters.

Yaw instability log:
4 1-1-2000 7-08-50 AM.bin (1.9 MB)

ATC_RAT_RLL_NTCH = 5.5
1 1-1-2000 7-22-42 AM.bin (713.2 KB)

ATC_RAT_PIT_NTCH = 5.8
2 1-1-2000 7-32-40 AM.bin (1.6 MB)

Yaw instability log
So here is what I learned on the yaw log. Your yaw instability frequency is very low around 2.5 hz. Unfortunately there is nothing I can do to help with that. What is more interesting is the instability manifests itself more in the roll axis than in the pitch axis. I would have thought that would be the other way around.

Pitch notch log
It appears you were able to get to 0.17 and even 0.22 looked pretty good with some lower instability frequency starting. This is typical of my helicopter.

Roll notch log
So it looks like you put the yaw P gain at 0.2 which is at a level that draws out the instability in yaw but maybe not as bad. It appears that the notch in roll is causing some changes to the dynamics and further exacerbating the instability. It is seen more in roll than in yaw. I suspect if you backed off the P gain in yaw, the instability in roll would calm down and you could then raise the roll P gain and tune it. however this puts you at a crossroad.

Due to the low frequency instability, there is not much that filtering can do to adjust that. I think you can certainly use the notch in pitch and achieve higher gains but in roll and yaw, I think you are stuck with the maximum gains you can achieve with out seeing significant oscillations. The only other thing that you could do is design the notch filter to only work on the gyro signal and not the error. That way you could notch the feedback signal and not affect your handling.

Maybe I can live with these PIDs as the responses are already acceptable except yaw.

I played with yaw PID a little today and found out that I need some amount of D to get rid of bounce/oscillation, the more D the less oscillation (got to 0.015++ without fast oscillation at all) but I’m afraid that high D will be hard on servos.
I gain doesn’t make any noticeable difference.

I can also clearly see that yaw and roll are mixing in some way.
2 possible causes I can think of are CG and the code.
Do you remember screwed mixer where there would be some cyclic phase shift when giving yaw command? It also appears in original Heli3.4.6 and I think what it does is to keep yawing axis perpendicular to level.
Any thought?

I remember seeing INS_GYRO_FILTER and INS_ACCEL_FILTER parameters. Are they worth playing with?

I would be concerned using those filters only for the fact that they will affect more than just the PID controller.

What do mean by CG causing this issue?

If CoG is way off to the front/rear and lower down, it can swing like a pendulum when yawing but that sounds very unlikely.

I don’t remember this. Please tell me where to find this in the AC3.4.6 code (file/subroutine name).

I don’t know where this line of code is.
Just hold rudder stick at disarm position and give full nose down input, you will see swash tilts left instead of forward.

After some more reading, I found that real K-Max uses both diff.cyc and diff.col.
So I modified my code and played with it a little.

// yaw factors
		_yawFactor[CH_1] = (_yaw_scaler * _yaw_mode) - cosf(radians(_servo1_pos - _swash1_phase_angle)) *_yaw_scaler * (1.0 - _yaw_mode);

The sweet spot seems to be at around 20%diff.col 80%diff.cyc where both roll oscillation and side-thrust are acceptable. Yaw becomes a lot more responsive that I have to set VFF to 0.

One weird thing is that oscillation (P~0.200 ,I=0, D=0) only occurs after quick small turns but not quick large turns.
Will try adding D, I, and lower filter freq later.

Update: With pitch notch filter enabled, I noticed that I got very minor rise in P gain. Oscillation started showing up at similar P gain to without notch filter. BUT with notch filter, I can rise it far higher before oscillation got out of control.

Also,
HERE GPS just arrived!
With these gain values, do you think it’s ready for loiter?
Before I get to that, where should I mount the GPS?
I asked on Pixhawk 2.1 page and got 2 options

  1. On a tail boom to the back
  2. Right on top of Pixhawk