Synchropter build need help

Few questions

  1. Does this apply to yaw axis as well?

  2. Do I need to redo all tuning? Or continue with my current PIDs?
    Note that pitch and roll responses are already very good, however it needed significant drop in P gain to not twitch in wind (around 0.100).

  3. How to determine the frequency of instabilities from log?

This will work for yaw as well if the frequency of the instability is greater than 4 hz. You can start from your current PID gains. I would suggest using this in pitch and roll as well. You can remove VFF gain as you add more P gain and that should help keep the response the same but enable more damping to the response.

To determine the instability frequency, plot the axis attitude or rate that you are determining the instability. So for roll axis, I would plot roll attitude or roll rate. For Roll attitude you can use the ATT message in the dataflashlog or for roll rate, you can use the gyr x from the IMU message. If the roll oscillations are small, it would be better to use the roll rate. next count the number or oscillations in 1 second (essentially a full cycle of a sine wave is one oscillation.) Use that number as your center frequency of the notch filter which is the XXX_NTCH parameter.

Pitt,
Howā€™s the tuning going? Did you get any further?

I have loads of problem with my FC.
Compass, USB problem, broken log file and now everything slowed down. Servos movement, getting parameters, etc all slowed.
With USB, MissionPlanner took 10sec to update radio input.
Verified that itā€™s not firmware.

Maybe you can take a look at this broken log?
Some data is broken such as RCIN/RCOU (please let me know if you can see them.)
I actually spooled it up but CH8 shows nothing.
Vibration blew my mind, itā€™s definitely not that bad in reality.

Local support is non-existent here so no further tuning for some time.

Pitt,
Did you purposely change your log bitmask to 655358? I canā€™t imagine that this is your problem but you are logging full IMU and the only messages Iā€™m seeing are the accelerometer and gyro messages at an extremely high sample rate. Change your Log bitmask back to 393214 and see if that helps. Thatā€™s all I can tell at this point. Let me know if that fixes it.

Yes, hoping it can capture anything useful
because the previous flight, the swash was ā€œbeatingā€ I can hear and see it twitching at ~1Hz (twitch, stop, switch, stop).
From my experience, this mostly caused by vibration. I increased the log rate so it can be used with FFT.
The following spool up (the one with 655368) looked horrible and unsafe to take off.

Also tried 0 (disable logging) without any difference.

Please convince me this is not normal.
Note how long MP took to update inputs data over USB.


And battery is 4S at storage voltage (15.4V)
MP took minutes to ramp up its reading.

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)