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).
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.
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.
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?
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.
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.
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.