Hi there i'm looking for help again :)
I'd like to stabilize the speed of a plane at a certain value (like 32 m/s for example) using the elevators (so basicly by letting them pitch up and/or down). I have tried a pid-controller so far and tuned it according to a method named "Ziegler-Nichols" (to which i found a tutorial on youtube), but the trouble is, it doesn't really work. In other cases (rollangle and slipangle stabilization) it ran pretty fine, but here it does not and i have no idea what to do about it.
I intend to stabilze the IAS at a given value so the the plane self regulates it's IAS towards that value from speeds that may be quite a bit lower or higher than the desired one. So set this pid-controller as an input for the elevator:
PID(32, IAS, 0.009, 0.00113, 0.0172)
Now for the issue: When i use it as written, it just pitches fully upward (not even depending on the plane flying faster or slower than it's supposed to be). It seems the i-controller is responsive for that behavior as when i set it to zero, the controlling appears principally work, but the IAS alway stabilizes at a speed quite a lot lower or higher than given (dependant on the desired speed being lower or higher than the planes "natural" cruising speed). I think i should actually add some i-control value to it, especially when regulating something reacting as slowly as a small civil plane's flight speed, but even very small values for i mess the whole thing up again. So if anybody here has already encountered or even solved a similar problem i'd appreciate your help :)
what your probably need is something along the lines of
clamp(PID(32, IAS, 0.009, 0.00113, 0.0172),lowerlimit,upperlimit)
wherein the limits are a fraction of 180, to prevent it from trying to pitch too much