Synchropter build need help

Pitt,
I’m not sure I understand either what that means for the control movements. I agree that I think it is safe to start your test flights. Here are my suggestions for the more critical parameters
LOG_BITMASK =397310
RC_FEEL_RP = 50
RC1_DZ = 5
RC2_DZ = 5
RC3_DZ = 5
RC4_DZ = 5
ACRO_TRAINER = 0 I would suggest making this zero. this one is up to you
ATC_RATE_FF_ENAB, 1
ATC_HOVR_ROL_TRM, 0
ATC_RAT_RLL_I = 0 set to zero while doing initial P gain tuning
ATC_RAT_RLL_D = 0 set to zero while doing initial P gain tuning
ATC_RAT_PIT_I = 0 set to zero while doing initial P gain tuning
ATC_RAT_PIT_D = 0 set to zero while doing initial P gain tuning
ATC_RAT_YAW_I = 0 set to zero while doing initial P gain tuning
ATC_RAT_YAW_D = 0 set to zero while doing initial P gain tuning
ATC_RAT_RLL_FILT = 4
ATC_RAT_PIT_FILT = 4
ATC_RAT_YAW_FILT = 4

Be sure to set the trim value for the 3 servos on each head (H_SV#_TRIM) to provide a constant blade pitch angle for the entire revolution (i.e. swashplate is perpendicular to shaft). All control rods should be same length until you do your tracking. I know that my values didn’t carry over from my AC 3.3 version of software.

Good luck and let me know how it goes.

Done the P gain tuning with given parameters.
At first I got a low frequency oscillation (wobble) at low P gain. For reasons, I decided to ramp P gain up and it got better. Ramped up to somewhere near 0.19 when high frequency oscillation showed up. Turned the knob back 60deg and ended the tuning at 0.168.
What about I and D then?

Log: https://www.dropbox.com/s/lznxqxygoxettne/1%203-8-2017%207-48-18%20AM.bin?dl=0
Flying space is limited so I only did short lifts and near-ground hover. (having to wait for spool down is a pain, can’t do the top brake with this thing)

Also, yaw control is much better than I expected. I thought it would be very weak since the axes are very close to each other.

1 Like

Pitt,
Great News!! I’m a little surprised that you were able to get P gains that high. Hopefully the aircraft feels very responsive. So now you can try turning up the D gain and see how far you can get before the high frequency oscillations show up but I suspect you might only get to 0.003 before they crop up. Personally I don’t have any D gain on mine. after you get the D gain determined, then you can increase the I gain. There really aren’t any concerns with the high frequency oscillations with the I gain. This gain will help the aircraft hold attitude. I think if you get to 0.2 to 0.3 on the I gain, that should be enough. At that point, when you make an input what you should see is a quick response to get to the attitude and that once the aircraft achieves the attitude it holds it (it doesn’t wonder around the attitude more than 1 deg). It will be more apparent once you fly in winds how well the aircraft is tuned. I will look at your log when I get a chance but it sounds like things are looking much better.

Was reviewing your parameters and noticed the I term leak min parameter (ATC_RAT_XXX_ILMI) was 0. In order for the I gain to work in a hover, you will need to set this parameter to some non zero value. I would recommend 0.2 to 0.3. The IMAX and ILMI parameters were in centi-degrees in the AC3.3 but they changed to 0-1 as the range. I think it is a fraction of total angle that can be commanded. Also the leak rate on the I term is pretty high, I had made a change to my code to add a parameter that allowed me to adjust the leak rate. That way I could set it so I got the I-term to leak out in about 5 to 7 seconds. At that point, I leave the ILMI term zero. This mainly helps when you are taking off and landing to uneven terrain.

Did a quick tuning today on half-full battery.
D gain tuning went well…Do you have some kind of vision? Oscillation showed up at exactly 0.003! Although in a safe level.

I gain tuning went almost as well…I start with somewhere around 0.2 when it tried to rip itself apart, vibrating awfully on the ground. At first I thought something got loose but while inspecting ( servos powered), I saw swash plates off level.
When I turned knob to minimum (kI ~ 0), servos went doing tick-tock. I knew right away that there is something with I term. Set ATC_RAT_XXX_ILMI back to 0 and everything is fine again.
Turned I gain up to 0.8 without any problem.

Still not hovering perfectly, the heli tends to twitch a little when wind blows. Probably a little too high P

Logs
D tuning


I tuning

What does ATC_RAT_XXX_ILMI do exactly?

Wow! that is very interesting that you saw an instability with the I term that low. For future reference, please build up to any values I give you. I realize that I may have misled you saying that we typically don’t see instabilities with I term but it is always a good practice to build up to those values especially in your case with a new configuration. So I saw that you also looked at a lower value of the I term somewhere around 0.07. Did the oscillations go away or subside any?

Here is what I understand about the ILMI parameter. The integrator is allowed to build to the IMAX value if the aircraft is on the ground and not level. This causes the pilot to have to make several inputs on takeoff to keep the aircraft going straight up. A leaky integrator was added to Trad Heli to address this issue users were experiencing with takeoff on uneven terrain. The ILMI parameter was added to keep the leaky integrator from washing out all of the integrator error. So the value of 0 for the ILMI parameter essentially doesn’t allow the integrator to build while the aircraft is less than 5 m/s. Once it determines the aircraft is moving then the leaky integrator is turned off. Once it gets below 5 m/s then the leaky integrator is turned on again. The idea is to set the ILMI parameter to some smaller value so that the integrator doesn’t grow so large as to cause a huge problem when taking off from uneven terrain. Where at higher speeds the larger value of the integrator may be needed to hold attitude and thus the leaky integrator feature is turned off.

My suggestion is to set ILMI back to 0.2 and then ramp up the I term from 0.02 to the highest value where you don’t see the instability. The I term is meant to help hold the aircraft at the desired attitude which is really beneficial when flying in windy conditions.

As for the aircraft twitching when the wind blows, do you see the instability oscillations or just abrupt attitude changes that aren’t really oscillatory?

Point is I can turn kI to 0.8 (not 0.08) without instability at all (0.8 was knob max)
But that’s only when ILMI is 0.
Check the last spool up of 2nd log.

ILMI was set to 0.2 since before tuning kD (1st log)
and there was no problem while kI was 0.

Vibration occurred once kI is any number more than 0.
[will be uploading video]

I’m not sure. But it felt more like small oscillation which attenuated within 1-2cycles.
See in late 2nd log where I turn kD 0.002>0.001 and kP 0.168>0.160 which made it a bit better.
Will check this again tomorrow.

My BIG concern with the I term at 0.8 and the ILMI at 0 is that when you venture into forward flight, the leaky integrator goes away and then the oscillation will come back and at that high of a I term (0.8) will probably cause catastrophic damage. DO NOT go into forward flight with it set up this way. We need to figure this out. This in not typical for single main rotor helicopters from what I’ve read and experienced.

Do me a favor and set IMAX and ILMI to the same value. I’d say set them to 0.2. go fly and start with the I term at zero and increase in 0.02 increments to see if the oscillation comes back. Maybe the leaky integrator is some how playing into this since is leaks pretty fast.

Pitt,
I think I got to the bottom of the issue with not seeing the PID message in the log file. Please set your LOG_BITMASK =393214. Thanks!
Bill

Here is why I set ILMI back to 0

ILMI = 0.2
IMAX = 1(default)
The knob is assigned to tune kI (0.000~0.800)

Will do more test tomorrow, this time with IMAX also 0.2 right?
And Log bitmask 397310 -> 393214

Any idea how ILMI could cause vibration during take off?

yes, please set both IMAX and ILMI to 0.2. Right now I don’t why but what you showed me makes me think it is not an instability but some inherent issue with the control laws. Were you doing anything with the controls from 11 to 15 seconds to cause it to move or was it doing it on its own?

They’re moving on their own. I believe it’s my radio output fluctuation between exact 0 (Integrator disabled) and almost 0 (Integrator merely turns on)

Post the log file of that test please. I’ll try to look at it in the morning.

The one I took a video.
Log bitmask = 397310

Another 2 with bitmask = 393214


ILMI = IMAX = 0.2
I = 0.084
P= 0.16
D = 0.002

Log:

Got someone to hold the camera this time.
Take off was a bit scary but looked nice in the air with a few small oscillation now and then

So do you think having IMAX and ILMI the same value fixed or helped the problem you were seeing before? Do you see the twitching behavior on the bench with the ILMI and IMAX the same?

It helped, but as you might have seen in the video, landing skid was still drumming on the ground. That can’t be good. I will try lowering P or D tomorrow.

Yes, I still see twitching but much less.
I think it’s proportional to IMAX.

Pitt,
I would like to see another log of your bench test where you keep the sticks still and increase the I term with the knob to see if the uncommanded twitching exists with both ILMI and IMAX set to 0.2 and then do the same test with them both set to 1.0. This is not a stability problem. There is something inherent to the control laws that is causing this but i’m not sure what it is.

On a separate note, I was thinking about your yaw control at low collective settings, like when you are spinning up the rotor speed. With the control scheme that you are using (differential longitudinal cyclic) for yaw, you won’t have much if any yaw control on the ground unless you put in a little collective. Just wanted to make you aware of that in case you didn’t already know. But I’m sure you figured that out already.

By the way, did log bitmask (393214) give you required data?

Yes, I’m aware. It was even worse with reverser.
Now that you talk about it, since there is little yaw control, will there also be I term building up as well?
YAW_I is 0 for now. Yaw tuning is going to be… ugh

Yes it did give me the data I needed. Thanks!