I have set AUTOTUNE many times, first at level 6, then at level 7. But I always get poor PITCH control. The PID settings for PITCH are always different, but the essence does not change, I have altitude fluctuations during horizontal flight. The fluctuations in FBWA are smaller, but in Cruise they are very noticeable, which practically makes stable horizontal flight impossible. In cruise, these fluctuations lead to constant fluctuations in the Throttle level, which leads to shaking of the aircraft and even loss of stabilization. I tried to select I and D according to the manual tuning instructions, but in vain. In manual mode, the aircraft flies without any problems. The aircraft is very aggressive and fast. It has a speed range of 12-70 m/s. Adjustments are made at a speed of 30-35 m/s. The Scaling_Speed parameter is set to 30 m/s.
I really need help with the setup.
Something is bad here, you got oscillations in both pitch and roll and in cruise it is 90° offset between input and output.
Have you adjusted scaling airspeed before or after tuning? If you adjust the scaling airspeed you need to retune.
DO you have a log from the tuning flight?
Yes, I set everything up first, then did the tuning. I don’t quite understand what a 90 degree offset is? I have a tuning journal, I’ll post it a little later.
I made 2 new flights and 2 new settings. The oscillations still remain. The PID values have increased compared to the previous settings. I haven’t made any additional corrections yet, just AUTOTUNE. New_Tune_1 New_Tune_2
You have a problem in the airspeed sensor. I have attached the records where it is evident. I am also enclosing the reference where you can get more information.
How is a faulty sensor a problem with pitch oscillation?
By the way, I turned off the GPS in flight and the sensor malfunctioned just at the moments when the GPS was turned on.
Pitch seems to follow DesPitch well, so I don’t think it is a tuning problem with the attitude controller.
Pitch and throttle are increased to increase altitude, resulting in altitude overshoot, and pitch and throttle are decreased to decrease altitude, resulting in altitude undershoot, which is repeated.
I’ll try to configure TECS, but I think the problem is not only in this, but also in the PITCH controller. Indeed, in CRUISE the controller tracks the PITCH change well, but my question is why do oscillations occur at all? In FBWA mode, there are oscillations too, although DesirePitch has no oscillations, so this is a problem with the PITCH controller. Any other thoughts?
One of the key things you should check after your first flight is whether your CoG was in fact correct. Check your flight log and look at the state of the pitch integrator. The pitch integrator is in the PIDP.I field in your dataflash log.
If your plane showed a value of PIDP.I consistently above zero then your plane was needing to put in up elevator to stay level. Your plane is probably a bit nose heavy, or your elevator trim is incorrect.
If your plane showed a value of PIDP.I consistently below zero then your plane was needing to put in down elevator to stay level. Your plane is probably a bit tail heavy, or your elevator trim is incorrect.
For example, I show screenshots of logs that were obtained during the flight of the Paragon training aircraft and the F3B glider. The airframe has a rear centre, so the PIDP I parameter is below zero. This centre of gravity was chosen on purpose. In other screenshots, I show the accuracy of the flight in altitude. However, I didn’t fine-tune the PID parameters because my planes fly quite steadily on their own without a flight controller. When your object can fly itself, it only needs a flight controller to turn in the right direction during autonomous flight.
When setting up the aircraft, pay attention to the quality of the data from the IMU and the convergence in the EK3, which can be estimated by the parameters of the quaternion covariances. Perfect convergence is the proximity of these values to zero. As an example, I show a screenshot of such convergence.
My center of gravity is normal. You can see this on the graph. I checked and adjusted it. PIDP.I fluctuates around 0, so the problem is something else. In general, the plane flies well in MANUAL, very agile, powerful, although it weighs 5 kg, but I need FBWA and CRUISE modes, in which it constantly fluctuates.
As I showed you with your logs your aircraft has a problem with the airspeed sensor. As I also showed you with your configuration parameters (TECS_SPDWEIGHT) your aircraft uses pitch to correct speed errors.
Would you like to confirm the correctness of this hypothesis? First of all read the documentation for TECS_SPDWEIGHT and then change the current value from 1 to a lower value like 0.3. The result will be that speed errors will be attempted to be corrected by motor more than by pitch. In case of increasing this value by something close to 2 the pitch problems should increase.
Apart from all of the above a TECS setting will improve the flight behaviour of your aircraft (the PIDS setting is not everything, the TECS setting must also be taken into account).
Another way to check this is to disable (or not use) the airspeed sensor. As I understand that it is the source of the pitch problems, disabling it should make those pitch problems disappear.
Thank you very much for your answer. I know about the problem with the sensor, it is periodic and is related to the fact that the sensor loses data on the i2c bus. I will fix this one of these days. I also tried to fly without using the sensor and it did not give the desired result. Here is a fragment of another flight where the sensor was disconnected but the oscillations are still there. Also, without AISPEED and without GPS, it determines the speed very poorly and scales the deviation of the control surfaces poorly. But I will try to configure TECS.
I would like to add some more information. The plane is standing in a room on a table and I see these changes in pitch according to changes in airspeed. Is this normal at all?