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

@ -15,10 +15,155 @@
<!-- 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>
<name>IT-CONTROLLER: PITCH RATE CMD</name>
<type>gain</type>
<gain>1</gain>
<gain>1.0</gain>
<input>
<condition>
<and>
@ -35,7 +180,7 @@
<expression>
<sum>
<table>
<property>/controls/flight/elevator-input</property>
<property>/it-fbw/g-elevator</property>
<entry><ind> 1</ind><dep>-5.0</dep></entry>
<entry><ind> 0</ind><dep> 0.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>
</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>0</ind><dep>0.0</dep></entry>
</table>
@ -59,7 +204,7 @@
<entry><ind>30.00000</ind><dep>1</dep></entry>
</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>-1</ind><dep>-5.0</dep></entry>
</table>
@ -90,7 +235,7 @@
<expression>
<sum>
<table>
<property>/controls/flight/elevator-input</property>
<property>/it-fbw/g-elevator</property>
<entry><ind> 1</ind><dep>-5.0</dep></entry>
<entry><ind> 0</ind><dep> 0.0</dep></entry>
<entry><ind>-1</ind><dep> 5.0</dep></entry>
@ -114,7 +259,7 @@
<expression>
<sum>
<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>-1.0</ind><dep> 5.0</dep></entry>
</table>
@ -125,7 +270,7 @@
<entry><ind>30.00000</ind><dep>1</dep></entry>
</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>-1</ind><dep>-5.0</dep></entry>
</table>
@ -154,7 +299,7 @@
<expression>
<sum>
<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> 0.0</ind><dep> 1.5</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>
</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>0</ind><dep>-1.5</dep></entry>
</table>
@ -178,7 +323,7 @@
<entry><ind>30.00000</ind><dep>1</dep></entry>
</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>-1</ind><dep>-5.0</dep></entry>
</table>
@ -197,9 +342,9 @@
</filter>
<filter>
<name>IT-FBW: PITCH KP (P Gain)</name>
<name>IT-CONTROLLER: PITCH KP (P Gain)</name>
<type>gain</type>
<gain>1</gain>
<gain>1.0</gain>
<input>
<expression>
<table>
@ -213,9 +358,9 @@
</filter>
<filter>
<name>IT-FBW: PITCH TI (I Time)</name>
<name>IT-CONTROLLER: PITCH TI (I Time)</name>
<type>gain</type>
<gain>1</gain>
<gain>1.0</gain>
<input>
<expression>
<table>
@ -229,7 +374,7 @@
</filter>
<pid-controller>
<name>IT-FBW: PITCH</name>
<name>IT-CONTROLLER: PITCH</name>
<debug>false</debug>
<enable>
<condition>
@ -281,10 +426,10 @@
</pid-controller>
<filter>
<name>IT-FBW: PITCH OPTION</name>
<name>IT-CONTROLLER: PITCH OPTION</name>
<debug>false</debug>
<type>gain</type>
<gain>1</gain>
<gain>1.0</gain>
<feedback-if-disabled>true</feedback-if-disabled>
<initialize-to>output</initialize-to>
<input>
@ -381,7 +526,7 @@
</filter>
<filter>
<name>IT-FBW: PITCH TRIM</name>
<name>IT-CONTROLLER: PITCH TRIM</name>
<debug>false</debug>
<initialize-to>output</initialize-to>
<enable>

View file

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

View file

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

View file

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

View file

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

View file

@ -1 +1 @@
4048
4050