A3XX: FBW: Switch Pitch Control to G-Based and add G Protections

This commit is contained in:
Joshua Davidson 2017-12-01 12:02:35 -05:00
parent 712afc6899
commit 6981745c24
6 changed files with 189 additions and 44 deletions

View file

@ -14,11 +14,156 @@
<!-- =============================================================== --> <!-- =============================================================== -->
<!-- Vertical --> <!-- Vertical -->
<!-- =============================================================== --> <!-- =============================================================== -->
<filter>
<name>IT-CONTROLLER: LOAD FACTOR CMD</name>
<type>gain</type>
<gain>1.0</gain>
<input>
<expression>
<sum>
<table>
<property>/controls/flight/elevator-input</property>
<entry><ind> 1</ind><dep>-0.5</dep></entry>
<entry><ind> 0</ind><dep> 1.0</dep></entry>
<entry><ind>-1</ind><dep> 2.5</dep></entry>
</table>
</sum>
</expression>
</input>
<output>/it-fbw/g-target</output>
<min>
<condition>
<not-equals>
<property>/controls/flight/flap-pos</property>
<value>0</value>
</not-equals>
</condition>
<value>0.0</value>
</min>
<min>-1.0</min>
<max>
<condition>
<not-equals>
<property>/controls/flight/flap-pos</property>
<value>0</value>
</not-equals>
</condition>
<value>2.0</value>
</max>
<max>2.5</max>
</filter>
<filter>
<name>IT-CONTROLLER: COMPUTED G</name>
<type>gain</type>
<gain>1.0</gain>
<input>
<expression>
<sum>
<product>
<property>/fdm/jsbsim/forces/load-factor</property>
<value>-1</value>
</product>
<div>
<value>-1</value>
<cos>
<deg2rad>
<product>
<property>/orientation/roll-deg</property>
<value>0.965</value>
</product>
</deg2rad>
</cos>
</div>
<value>1</value>
</sum>
</expression>
</input>
<output>/it-fbw/g-computed</output>
</filter>
<filter>
<name>IT-CONTROLLER: G ERROR</name>
<type>gain</type>
<gain>-1.0</gain>
<input>
<expression>
<dif>
<property>/it-fbw/g-target</property>
<property>/it-fbw/g-computed</property>
</dif>
</expression>
</input>
<output>/it-fbw/g-error</output>
</filter>
<pi-simple-controller>
<name>IT-CONTROLLER: G ELEVATOR</name>
<debug>false</debug>
<enable>
<condition>
<and>
<equals>
<property>/gear/gear[1]/wow</property>
<value>0</value>
</equals>
<equals>
<property>/gear/gear[2]/wow</property>
<value>0</value>
</equals>
<or>
<equals>
<property>/it-fbw/law</property>
<value>0</value>
</equals>
<equals>
<property>/it-fbw/law</property>
<value>1</value>
</equals>
</or>
</and>
</condition>
</enable>
<input>
<property>/it-fbw/g-error</property>
</input>
<reference>
<value>0</value>
</reference>
<output>
<property>/it-fbw/g-elevator</property>
</output>
<config>
<Kp>-2.5</Kp>
<Ki>-1.5</Ki>
<min>
<condition>
<less-than>
<property>/controls/flight/elevator-input</property>
<value>0</value>
</less-than>
</condition>
<property>/controls/flight/elevator-input</property>
</min>
<min>0.0</min>
<max>
<condition>
<greater-than>
<property>/controls/flight/elevator-input</property>
<value>0</value>
</greater-than>
</condition>
<property>/controls/flight/elevator-input</property>
</max>
<max>0.0</max>
</config>
</pi-simple-controller>
<filter> <filter>
<name>IT-CONTROLLER: PITCH RATE CMD</name> <name>IT-CONTROLLER: PITCH RATE CMD</name>
<type>gain</type> <type>gain</type>
<gain>1</gain> <gain>1.0</gain>
<input> <input>
<condition> <condition>
<and> <and>
@ -35,7 +180,7 @@
<expression> <expression>
<sum> <sum>
<table> <table>
<property>/controls/flight/elevator-input</property> <property>/it-fbw/g-elevator</property>
<entry><ind> 1</ind><dep>-5.0</dep></entry> <entry><ind> 1</ind><dep>-5.0</dep></entry>
<entry><ind> 0</ind><dep> 0.0</dep></entry> <entry><ind> 0</ind><dep> 0.0</dep></entry>
<entry><ind>-1</ind><dep> 5.0</dep></entry> <entry><ind>-1</ind><dep> 5.0</dep></entry>
@ -47,7 +192,7 @@
<entry><ind>-14.99999</ind><dep>0</dep></entry> <entry><ind>-14.99999</ind><dep>0</dep></entry>
</table> </table>
<table> <table>
<property>/controls/flight/elevator-input</property> <property>/it-fbw/g-elevator</property>
<entry><ind>1</ind><dep>5.0</dep></entry> <entry><ind>1</ind><dep>5.0</dep></entry>
<entry><ind>0</ind><dep>0.0</dep></entry> <entry><ind>0</ind><dep>0.0</dep></entry>
</table> </table>
@ -59,7 +204,7 @@
<entry><ind>30.00000</ind><dep>1</dep></entry> <entry><ind>30.00000</ind><dep>1</dep></entry>
</table> </table>
<table> <table>
<property>/controls/flight/elevator-input</property> <property>/it-fbw/g-elevator</property>
<entry><ind> 0</ind><dep> 0.0</dep></entry> <entry><ind> 0</ind><dep> 0.0</dep></entry>
<entry><ind>-1</ind><dep>-5.0</dep></entry> <entry><ind>-1</ind><dep>-5.0</dep></entry>
</table> </table>
@ -90,7 +235,7 @@
<expression> <expression>
<sum> <sum>
<table> <table>
<property>/controls/flight/elevator-input</property> <property>/it-fbw/g-elevator</property>
<entry><ind> 1</ind><dep>-5.0</dep></entry> <entry><ind> 1</ind><dep>-5.0</dep></entry>
<entry><ind> 0</ind><dep> 0.0</dep></entry> <entry><ind> 0</ind><dep> 0.0</dep></entry>
<entry><ind>-1</ind><dep> 5.0</dep></entry> <entry><ind>-1</ind><dep> 5.0</dep></entry>
@ -114,7 +259,7 @@
<expression> <expression>
<sum> <sum>
<table> <table>
<property>/controls/flight/elevator-input</property> <property>/it-fbw/g-elevator</property>
<entry><ind> 0.0</ind><dep> 1.5</dep></entry> <entry><ind> 0.0</ind><dep> 1.5</dep></entry>
<entry><ind>-1.0</ind><dep> 5.0</dep></entry> <entry><ind>-1.0</ind><dep> 5.0</dep></entry>
</table> </table>
@ -125,7 +270,7 @@
<entry><ind>30.00000</ind><dep>1</dep></entry> <entry><ind>30.00000</ind><dep>1</dep></entry>
</table> </table>
<table> <table>
<property>/controls/flight/elevator-input</property> <property>/it-fbw/g-elevator</property>
<entry><ind> 0</ind><dep>-1.5</dep></entry> <entry><ind> 0</ind><dep>-1.5</dep></entry>
<entry><ind>-1</ind><dep>-5.0</dep></entry> <entry><ind>-1</ind><dep>-5.0</dep></entry>
</table> </table>
@ -154,7 +299,7 @@
<expression> <expression>
<sum> <sum>
<table> <table>
<property>/controls/flight/elevator-input</property> <property>/it-fbw/g-elevator</property>
<entry><ind> 1.0</ind><dep>-3.5</dep></entry> <entry><ind> 1.0</ind><dep>-3.5</dep></entry>
<entry><ind> 0.0</ind><dep> 1.5</dep></entry> <entry><ind> 0.0</ind><dep> 1.5</dep></entry>
<entry><ind>-1.0</ind><dep> 5.0</dep></entry> <entry><ind>-1.0</ind><dep> 5.0</dep></entry>
@ -166,7 +311,7 @@
<entry><ind>-14.99999</ind><dep>0</dep></entry> <entry><ind>-14.99999</ind><dep>0</dep></entry>
</table> </table>
<table> <table>
<property>/controls/flight/elevator-input</property> <property>/it-fbw/g-elevator</property>
<entry><ind>1</ind><dep> 3.5</dep></entry> <entry><ind>1</ind><dep> 3.5</dep></entry>
<entry><ind>0</ind><dep>-1.5</dep></entry> <entry><ind>0</ind><dep>-1.5</dep></entry>
</table> </table>
@ -178,7 +323,7 @@
<entry><ind>30.00000</ind><dep>1</dep></entry> <entry><ind>30.00000</ind><dep>1</dep></entry>
</table> </table>
<table> <table>
<property>/controls/flight/elevator-input</property> <property>/it-fbw/g-elevator</property>
<entry><ind> 0</ind><dep>-1.5</dep></entry> <entry><ind> 0</ind><dep>-1.5</dep></entry>
<entry><ind>-1</ind><dep>-5.0</dep></entry> <entry><ind>-1</ind><dep>-5.0</dep></entry>
</table> </table>
@ -197,9 +342,9 @@
</filter> </filter>
<filter> <filter>
<name>IT-FBW: PITCH KP (P Gain)</name> <name>IT-CONTROLLER: PITCH KP (P Gain)</name>
<type>gain</type> <type>gain</type>
<gain>1</gain> <gain>1.0</gain>
<input> <input>
<expression> <expression>
<table> <table>
@ -213,9 +358,9 @@
</filter> </filter>
<filter> <filter>
<name>IT-FBW: PITCH TI (I Time)</name> <name>IT-CONTROLLER: PITCH TI (I Time)</name>
<type>gain</type> <type>gain</type>
<gain>1</gain> <gain>1.0</gain>
<input> <input>
<expression> <expression>
<table> <table>
@ -229,7 +374,7 @@
</filter> </filter>
<pid-controller> <pid-controller>
<name>IT-FBW: PITCH</name> <name>IT-CONTROLLER: PITCH</name>
<debug>false</debug> <debug>false</debug>
<enable> <enable>
<condition> <condition>
@ -281,10 +426,10 @@
</pid-controller> </pid-controller>
<filter> <filter>
<name>IT-FBW: PITCH OPTION</name> <name>IT-CONTROLLER: PITCH OPTION</name>
<debug>false</debug> <debug>false</debug>
<type>gain</type> <type>gain</type>
<gain>1</gain> <gain>1.0</gain>
<feedback-if-disabled>true</feedback-if-disabled> <feedback-if-disabled>true</feedback-if-disabled>
<initialize-to>output</initialize-to> <initialize-to>output</initialize-to>
<input> <input>
@ -381,7 +526,7 @@
</filter> </filter>
<filter> <filter>
<name>IT-FBW: PITCH TRIM</name> <name>IT-CONTROLLER: PITCH TRIM</name>
<debug>false</debug> <debug>false</debug>
<initialize-to>output</initialize-to> <initialize-to>output</initialize-to>
<enable> <enable>

View file

@ -18,7 +18,7 @@
<filter> <filter>
<name>IT-CONTROLLER: ROLL</name> <name>IT-CONTROLLER: ROLL</name>
<type>gain</type> <type>gain</type>
<gain>1</gain> <gain>1.0</gain>
<update-interval-secs type="double">0.05</update-interval-secs> <update-interval-secs type="double">0.05</update-interval-secs>
<input> <input>
<condition> <condition>
@ -221,9 +221,9 @@
</filter> </filter>
<filter> <filter>
<name>IT-FBW: ROLL KP (P Gain)</name> <name>IT-CONTROLLER: ROLL KP (P Gain)</name>
<type>gain</type> <type>gain</type>
<gain>1</gain> <gain>1.0</gain>
<input> <input>
<expression> <expression>
<table> <table>
@ -237,9 +237,9 @@
</filter> </filter>
<filter> <filter>
<name>IT-FBW: ROLL TI (I Time)</name> <name>IT-CONTROLLER: ROLL TI (I Time)</name>
<type>gain</type> <type>gain</type>
<gain>1</gain> <gain>1.0</gain>
<input> <input>
<expression> <expression>
<table> <table>
@ -253,7 +253,7 @@
</filter> </filter>
<pid-controller> <pid-controller>
<name>IT-FBW: ROLL</name> <name>IT-CONTROLLER: ROLL</name>
<debug>false</debug> <debug>false</debug>
<enable> <enable>
<condition> <condition>
@ -299,10 +299,10 @@
</pid-controller> </pid-controller>
<filter> <filter>
<name>IT-FBW: ROLL OPTION</name> <name>IT-CONTROLLER: ROLL OPTION</name>
<debug>false</debug> <debug>false</debug>
<type>gain</type> <type>gain</type>
<gain>1</gain> <gain>1.0</gain>
<feedback-if-disabled>true</feedback-if-disabled> <feedback-if-disabled>true</feedback-if-disabled>
<initialize-to>output</initialize-to> <initialize-to>output</initialize-to>
<input> <input>
@ -414,9 +414,9 @@
</filter> </filter>
<filter> <filter>
<name>IT-FBW: SPOILER</name> <name>IT-CONTROLLER: SPOILER</name>
<type>gain</type> <type>gain</type>
<gain>1</gain> <gain>1.0</gain>
<input> <input>
<condition> <condition>
<equals> <equals>
@ -448,9 +448,9 @@
</filter> </filter>
<filter> <filter>
<name>IT-FBW: LEFT SPOILER</name> <name>IT-CONTROLLER: LEFT SPOILER</name>
<type>gain</type> <type>gain</type>
<gain>1</gain> <gain>1.0</gain>
<input> <input>
<condition> <condition>
<and> <and>
@ -504,9 +504,9 @@
</filter> </filter>
<filter> <filter>
<name>IT-FBW: RIGHT SPOILER</name> <name>IT-CONTROLLER: RIGHT SPOILER</name>
<type>gain</type> <type>gain</type>
<gain>1</gain> <gain>1.0</gain>
<input> <input>
<condition> <condition>
<and> <and>
@ -564,7 +564,7 @@
<!-- =============================================================== --> <!-- =============================================================== -->
<filter> <filter>
<name>IT-FBW: YAW DAMPER/TURN COORDINATOR FEEDBACK IF DISABLED</name> <name>IT-CONTROLLER: YAW DAMPER/TURN COORDINATOR FEEDBACK IF DISABLED</name>
<enable> <enable>
<condition> <condition>
<or> <or>
@ -600,7 +600,7 @@
</condition> </condition>
</enable> </enable>
<type>gain</type> <type>gain</type>
<gain>1</gain> <gain>1.0</gain>
<input>0</input> <input>0</input>
<output>/controls/flight/rudder-fbw-cmd</output> <output>/controls/flight/rudder-fbw-cmd</output>
<min>-0.2</min> <min>-0.2</min>
@ -608,7 +608,7 @@
</filter> </filter>
<pid-controller> <pid-controller>
<name>IT-FBW: YAW DAMPER/TURN COORDINATOR</name> <name>IT-CONTROLLER: YAW DAMPER/TURN COORDINATOR</name>
<debug>false</debug> <debug>false</debug>
<enable> <enable>
<condition> <condition>
@ -666,7 +666,7 @@
</pid-controller> </pid-controller>
<filter> <filter>
<name>IT-FBW: RUDDER OPTION</name> <name>IT-CONTROLLER: RUDDER OPTION</name>
<debug>false</debug> <debug>false</debug>
<feedback-if-disabled>true</feedback-if-disabled> <feedback-if-disabled>true</feedback-if-disabled>
<initialize-to>output</initialize-to> <initialize-to>output</initialize-to>

View file

@ -638,7 +638,7 @@
<name>PITCH DEG SYNC</name> <name>PITCH DEG SYNC</name>
<debug>false</debug> <debug>false</debug>
<type>gain</type> <type>gain</type>
<gain>1</gain> <gain>1.0</gain>
<enable> <enable>
<condition> <condition>
<and> <and>

View file

@ -152,7 +152,7 @@
<name>ROLL DEG SYNC</name> <name>ROLL DEG SYNC</name>
<debug>false</debug> <debug>false</debug>
<type>gain</type> <type>gain</type>
<gain>1</gain> <gain>1.0</gain>
<enable> <enable>
<condition> <condition>
<and> <and>

View file

@ -131,7 +131,7 @@
<filter> <filter>
<name>Throttle Comparator</name> <name>Throttle Comparator</name>
<type>gain</type> <type>gain</type>
<gain>1</gain> <gain>1.0</gain>
<input> <input>
<condition> <condition>
<greater-than-equals> <greater-than-equals>
@ -286,7 +286,7 @@
<name>IDLE</name> <name>IDLE</name>
<debug>false</debug> <debug>false</debug>
<type>gain</type> <type>gain</type>
<gain>1</gain> <gain>1.0</gain>
<enable> <enable>
<condition> <condition>
<and> <and>
@ -337,7 +337,7 @@
<name>CLB</name> <name>CLB</name>
<debug>false</debug> <debug>false</debug>
<type>gain</type> <type>gain</type>
<gain>1</gain> <gain>1.0</gain>
<enable> <enable>
<condition> <condition>
<and> <and>
@ -378,7 +378,7 @@
<filter> <filter>
<name>Thrust Filter 1</name> <name>Thrust Filter 1</name>
<type>gain</type> <type>gain</type>
<gain>1</gain> <gain>1.0</gain>
<input>/controls/engines/throttle-cmd-pid</input> <input>/controls/engines/throttle-cmd-pid</input>
<output>/controls/engines/engine[0]/throttle-cmd</output> <output>/controls/engines/engine[0]/throttle-cmd</output>
<max> <max>
@ -390,7 +390,7 @@
<filter> <filter>
<name>Thrust Filter 2</name> <name>Thrust Filter 2</name>
<type>gain</type> <type>gain</type>
<gain>1</gain> <gain>1.0</gain>
<input>/controls/engines/throttle-cmd-pid</input> <input>/controls/engines/throttle-cmd-pid</input>
<output>/controls/engines/engine[1]/throttle-cmd</output> <output>/controls/engines/engine[1]/throttle-cmd</output>
<max> <max>

View file

@ -1 +1 @@
4048 4050