Synchropter build need help

Pitt
I seem to remember seeing that kind of lag when I had low P gain and high I gain values. Set your I gain values to zero and see if it still responds like that.
Just to verify, you did rule out that it is not due to the recent notch filter addition to the code?

0 I gain doesn’t fix it.

And I recompiled the code before adding notch filter, still slow.

I’ll be checking if I accidentally changed critical parameter(s) tomorrow.

Created another topic here:
http://discuss.ardupilot.org/t/pixhawk2-1-slow-down/16765

Got you a log
1 1-1-2000 8-43-20 AM.bin (479.5 KB)
Not very good, I had too small space today.

Can you guide me to determining frequency of instability?
I don’t know how to get horizontal axis to show time (second).

1 1-1-2000 9-59-56 AM.bin (3.2 MB)

Hi Pitt,
Sorry I haven’t been responding recently. I’ve looked at some of your logs but I couldn’t find anything that would have helped you. How are things going? Did you find a reason for your problem with the Pixhawk 2 not behaving properly?
Mission planner has been having issues with plotting data with time on the horizontal axis. In any case, here’s how I do it. I select the data from the message that I want to plot and it should plot on the graph in the Log Viewer. Then I select the Time checkbox located under the graph. At that point I right click on the graph and select “set axis to default scaling” or something like that. It replots the data with time on the horizontal axis. Let me know if this works.

Yup, as posted here: [Solved] Pixhawk2.1 slow down [custom firmware]
SCHED_LOOP_RATE somehow got changed to 50 from 400.

About log file, this is what I got when Use Time box is checked:


Only one vertical line regardless of scaling/zooming.

The log file is in my previous reply.

So you have to do it in the order I stated above. Load the log. Make sure time is not selected. Select you data and it should plot correctly without time. Then select time and then right click and have it replot to default scaling. If that is what you did and you are still seeing issues then maybe try a different parameter from another message. Like maybe the gyrx from the IMU message

I was able to look at your log. In your flight, I saw that you were changing pitch and roll P gain from 0.1 to 0.2 in a couple of steps. I can see that the oscillations in the aircraft increase as you increase the P gain. It appears that the oscillations in the pitch and roll axes are around 5 hz. Roll is a little closer to 4 hz. I recommend setting the NTCH parameter for pitch, roll and yaw to 5. The notch is wide enough that it should cover the roll axis. If you still see the instability in roll then take that NTCH parameter to 4.5. I would not use notch filter center frequencies (which is the NTCH Parameter) less than 4. I think it will significantly impact the aircraft handling qualities. From the log it looks like the yaw also sees this instability which makes sense since you are using differential cyclic pitch to yaw the aircraft. That is why I recommended putting the yaw notch center frequency to 5 as well. Try that out and take it slow in increasing the P gains. At some point, hopefully with P gains higher than 0.25, you may see the instability come back. But at P gains around 0.2, the handling of the aircraft should be satisfactory.

Let me know how it goes!

Leave original low pass filters at 4Hz?

Will try it tomorrow. :slight_smile:

yes. Leave the Low pass filters at 4 hz

Can you explain to me how ILMI helps in forward flight?
Just curious…I turned it to 0 for now since it makes taking off too exciting.

It doesn’t help in forward flight. It is designed to help in a hover because it retains the integrator to help with maintaining attitude. This is more of a benefit in hovering in windy conditions.

Result: Bad oscillation in roll, both at 5 and 4.5, none in pitch and yaw
Turning roll NTCH back to 0 fixed it.

Logs:
2 1-1-2000 7-16-50 AM.bin (1.3 MB)
1 1-1-2000 7-12-24 AM.bin (1.4 MB)

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.