Synchropter build need help

https://www.dropbox.com/s/qk0463mtc09kkbn/ILMI%20vs%20IMAX%20bench.bin?dl=0
I was wrong, the servo throw of twitching is actually proportional to (integral of?) aircraft attitude. it got better when aircraft was level then slowly build up again.
I played with IMAX and ILMI a bit. I hope the log keep track of all parameters changes.
Note that this log was logged without arming (if there is any difference?)

Weird, 397310 should provide more data, shouldn’t it?

A little off topic, is all this applicable for GSoC?

Unfortunately, I may not be able to see your parameter changes during a session but I am able to see the tuning parameter.

What does GSoC stand for?

Google Summer of Code.

Today I’ve been chasing the cause of inconsistent characteristic only to find out that vibration has been at crazy level for a while.
Can’t find the source yet.

Whether this project is applicable for GSOC, I don’t know. You should post that question on their discussion so that one of the developers could answer it.

Managed to reduce vibration down to flyable level.
It is more predictable now

Log: https://www.dropbox.com/s/yu43e2a5svzlzu9/1%2018-03-2017.bin?dl=0

That looks great. I have not looked at your log. Did you figure anything out with the uncommanded swashplate movement when the I gain and ILMI were non-zero? What did you have the Igain, ILMI, and IMAX set to for that flight?

I gain I think is around 0.12
There was some oscillation at the beginning of the flight. I turned the knob down a little (midair) and its gone.

About uncommanded movement, I can only think of I term jumping between used and not used.

-Doesn’t happen when kI is set to 0
-Only happen when kI is assigned to TUNE and knob at lowest and TUNE_LOW =0.000
-If knob is turned away from 0, the swash stays at tilted position

I assume that this is due to Ch6 swinging between 0.000 and very small value like 0.00001 then there is a code somewhere that stops I-term from adding when kI == 0(false), when kI swings to 0.00001(true) I-term(IMAX) is added and swash tilts.

Still can’t get rid of remaining vibration.
Changed bearings, levelled swash.
Logs show ±10 on X and Y which is barely flyable.
You can see skid bluring in the video(50cm carbon tube).

My SK720 shows that most are fore-aft vibration at its acceptable level.
Blades tracking are ok.

Any idea?
I think damping plate is the way to go.

So if you set the I term in the parameter list and not the knob, you don’t see this behavior?
I’m not sure what to say about the vibrations. I assume you have the Pixhawk mounted on some type of vibration absorber like foam pads?

That’s right.

Yes, still the same as when I posted a photo earlier, 4 blocks of thick white foam tape.

This issue with the I term and the knob is interesting but good to know you figured it out. As for the vibes, what’s the lowest frequency that you are seeing? you can try different head speeds to see if it is a frame resonance or not.

Turned out to be H_SV_MAN.
I used 3 (Mid collective) to level swash.
Tried entering 2 and 4 today (Min/Max collective) and its visibly off level.
So I used 1 (passthrough) to re-level swash, then it seemed better, not much but good enough


Some very tiny oscillation now and then, overall its great!

Log: https://www.dropbox.com/s/o7gpcw6azkb4dfh/1%2021-03-2017.bin?dl=0

From this vibration log, it’s flying at 1700 RPM (60% Throttle). 10% less than this it becomes unflyable.
More RPM is just worse.
SK-720 shows that the vibration is better than my Warp 360 with its 4mm-thick-metal plate + foam tape mount, so I think Cube (preferred name over Pixhawk 2) just needs better mount.

Take off oscillation got better after I lessen safety level of the skid, now I have to deal with yaw blow out (see the video).

I’m now satisfied with Pitch and Roll.
Now it’s time for yaw tuning.

Now that I have better understanding, I want to ask again: what XXX_FILT and _ILMI do?
My guess is that FILT prevents PID terms from chaning rapidly? How?
I really have no idea how ILMI works.
What value is recommended for yaw axis?

So the XXX_FILT is the cut-off frequency for a 1st order low pass filter. Essentially the filter allows the frequencies to pass through if they are lower than the cut-off frequency and anything above is attenuated. The further it is above the cut-off frequency the more it is attenuated. It is applied to the rate error between the requested rate and the actual aircraft rate. So like you say, it does attenuate the frequencies of the PID outputs higher than the cut-off frequency. So if you made inputs into the control system at a frequency above the cut-off frequency, you should not see them in the aircraft response or maybe at a reduced amplitude.

As for ILMI, this is a lower limit for the integrator. Where as IMAX is the upper limit for the integrator. So the integrator essentially is tracking the attitude error. It is integrating the rate error and stores it. With each loop in the controller, the rate error is multiplied by the time step to determine the attitude error and added to the existing error. So this value can grow without bound. The IMAX parameter limits the attitude error (integrator value). So if you were on unlevel terrain, in stabilize with stick centered you are commanding 0 deg attitude and the aircraft is not a zero. So the attitude controller will send a rate input to the PID controller to correct this but the aircraft is on the ground and so the PID controller keeps making a rate input and the integrator takes that input, multiplies it by the time step and adds it to the previous integrator value. So the integrator value quickly reaches IMAX. Then when you go to take off the aircraft quickly rolls to one side because of the integrator. So a leak was set up in the integrator to leak off the integrator value at a certain rate while the aircraft was stationary (moving less than 1 m/s). So while you are on the ground leaned to one side, the integrator can’t build up. However you want to have some attitude stabilization when you get into a hover, so the ILMI parameter was implemented to keep the integrator from being leaked to zero. It now leaks down to the value of ILMI. Then you might ask why not just set IMAX to the ILMI value and do away with the leak. At high forward speeds, a higher value of the integrator may be needed to hold attitude as compared to that which is needed in a hover.

Hopefully this helps.

I’m missing something here. What happens when there is no error? Say, the heli is hovering perfectly level. I-term can’t go to 0 so it will get the heli off level?

Also, about the filter, is there any downside to lowering cutoff frequency? Will it affect correction to quick movement?

The leak shuts off at the ILMI. The integrator still works normally if error builds in the opposite direction or goes to zero.
The filter can affect piloting frequencies and autopilot performance but I think it would have to be below 5 hz.

Any thought on yaw tuning?
I can’t get P gain any higher than 0.1
Raising D gain allowed me to get P gain higher (0.1)
Without D gain, the heli wagged when giving yaw input at lowest P gain and got worse when I rose P gain.
I-gain can go all the way up without problem (0.2++).
Still nowhere near locked in.

Also, tried balancing rotors (not just blades) but it didn’t make any difference.

Pitt,
my only suggestion is using my notch filter. Is the instability frequency above 4 hz? Sorry I can’t remember. If so, you can cherry-pick my notch filter into your PID library.

here’s how:
clone my repository onto your machine
https://github.com/bnsgeyer/ardupilot/tree/Copter-3.4
get into the directory for my repository on your computer
then checkout my 3.4 branch. type “git checkout Copter-3.4”

now add my ardupilot repository as a remote to your current repository
get into your the directory of your repository
type "git remote add ardupilot "

Fetch my changes
type “git fetch ardupilot”

cherry pick the commit that adds the notch
type “git cherry-pick 34c5dda”

lastly you can remove my repository
type “git remote rm ardupilot”

at this point the changes have been committed to your local repository. You can then push them to github when you are ready. there should not be anything that you changed in developing the dual configuration that would affect my notch merging cleanly with your repository

There will be 3 files changed, correct?

I merged it to my repo here:

From what I can see, there are 4 new parameters named XXX_NTCH
No idea what to do…
So I’ll wait for your explanation with :tada: 100th reply :sparkles: :laughing:

Here’s a link to a PDF that describes how to tune it.
https://drive.google.com/open?id=0B1F0ST10P14JV09OYnp5ckd0cms
Let me know if you have any trouble opening the PDF.