- Messages
- 129
- Country
Hello. I posted a question about PID ( https://www.fsdeveloper.com/forum/threads/ap-speed-hold-pid-controller.437633/page-2 ) but got no response in its category. To the administrator of this website, under the Wiki, can the title"Autopilot" ( https://www.fsdeveloper.com/wiki/index.php?title=Autopilot_creation ) be removed? Or can the original author be contacted to replace the missing "autopilot.pdf?"
I have a few questions. My PID was "stolen" from some RC aircraft site and is extremely simple but seems to work. Although, as a pilot, I would find it insufficient for passenger comfort and how an aircraft (at least the way I was taught) is properly flown. For example, when banking at 30°, the lead-in to level out would start about 15° (half the bank angle) from desired heading. But perhaps as a PID trainer, it might be useful. Here are my PID equations for a heading change:
BTW, I changed the aircraft.cfg to have a Max_bank = 60, and FS behaves very much like a PID with no lead-in programmed in. Also, notice that on large heading changes, FS always starts a bit to the right even though the new heading is left of current heading.
P = error * Kp
I = (ErrorAccumulated + Error) * Ki
D =(Error - PreviousError) * Kd
anti-windupImax = some max value for I
Output = P + I + D
Notice that I do not have any time constants. The values above are just scanned at the gauge scan rate of 18Hz.
Question #1: What applicable formula would apply to the above?I see that the aircraft.cfg (for my PID test, I set max bank at 60) has the following:max bank = 25, max bank velocity = 3.5, max bank acceleration = 1.0
Question #2: How are these parameters applied in FS' PID's scheme?
Question #3: What percentage step change of a process variable would be considered extreme (i.e.: PV = 0° to 180°)?I actually applied the above to a real-world application. I made a split serial cable and I used Excel (VBA) to talk to a GPS through my laptop's COM port. I then applied the above PID and then output through the COM port to a stepper motor board. I then attached it to my yoke (in a Cessna 182). In order to get it to have the correct amount of leverage to the links, I had to add an "arm" or "throw" value, so my actual output = throw * (P + I + D).
Question #4: What proper terminology would be applicable to the "throw" variable?
Question #5: In the gauge (Co50!PFD), a "tracking line" is used with the following formulaA:Velocity world X, m/s) (A:Velocity world Z, m/s) atg2 (A:Magvar, radians) - (Alane heading degrees, gyro, radians) -
I see that it seems to trend what the ball does in a turn coordinator (A:TURN COORDINATOR BALL).
Question #6: Any idea what is being sought with the above formula and what is atg2 usefulness?
Question #7: What is an acceptable duration for an "event"; say a heading change of 90° or more?
I have a few questions. My PID was "stolen" from some RC aircraft site and is extremely simple but seems to work. Although, as a pilot, I would find it insufficient for passenger comfort and how an aircraft (at least the way I was taught) is properly flown. For example, when banking at 30°, the lead-in to level out would start about 15° (half the bank angle) from desired heading. But perhaps as a PID trainer, it might be useful. Here are my PID equations for a heading change:
BTW, I changed the aircraft.cfg to have a Max_bank = 60, and FS behaves very much like a PID with no lead-in programmed in. Also, notice that on large heading changes, FS always starts a bit to the right even though the new heading is left of current heading.
P = error * Kp
I = (ErrorAccumulated + Error) * Ki
D =(Error - PreviousError) * Kd
anti-windupImax = some max value for I
Output = P + I + D
Notice that I do not have any time constants. The values above are just scanned at the gauge scan rate of 18Hz.
Question #1: What applicable formula would apply to the above?I see that the aircraft.cfg (for my PID test, I set max bank at 60) has the following:max bank = 25, max bank velocity = 3.5, max bank acceleration = 1.0
Question #2: How are these parameters applied in FS' PID's scheme?
Question #3: What percentage step change of a process variable would be considered extreme (i.e.: PV = 0° to 180°)?I actually applied the above to a real-world application. I made a split serial cable and I used Excel (VBA) to talk to a GPS through my laptop's COM port. I then applied the above PID and then output through the COM port to a stepper motor board. I then attached it to my yoke (in a Cessna 182). In order to get it to have the correct amount of leverage to the links, I had to add an "arm" or "throw" value, so my actual output = throw * (P + I + D).
Question #4: What proper terminology would be applicable to the "throw" variable?
Question #5: In the gauge (Co50!PFD), a "tracking line" is used with the following formulaA:Velocity world X, m/s) (A:Velocity world Z, m/s) atg2 (A:Magvar, radians) - (Alane heading degrees, gyro, radians) -
I see that it seems to trend what the ball does in a turn coordinator (A:TURN COORDINATOR BALL).
Question #6: Any idea what is being sought with the above formula and what is atg2 usefulness?
Question #7: What is an acceptable duration for an "event"; say a heading change of 90° or more?