This repository has been archived on 2021-09-26. You can view files and clone it, but cannot push or open issues or pull requests.
IDG-A32X/Systems/fbw-pitch.xml

627 lines
15 KiB
XML
Raw Normal View History

2017-11-27 23:28:09 +00:00
<?xml version="1.0"?>
<!--
##############################################
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
-->
<!-- Airbus A3XX FBW System -->
<!-- Joshua Davidson (it0uchpods) -->
<PropertyList>
<!-- =============================================================== -->
<!-- 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>
2017-12-04 02:34:56 +00:00
<property>/accelerations/pilot-g</property>
<div>
2017-12-04 02:34:56 +00:00
<value>1</value>
<cos>
<deg2rad>
<product>
<property>/orientation/roll-deg</property>
<value>0.965</value>
</product>
</deg2rad>
</cos>
</div>
2017-12-04 02:34:56 +00:00
<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>
2017-11-27 23:28:09 +00:00
<filter>
<name>IT-CONTROLLER: PITCH RATE CMD</name>
<type>gain</type>
<gain>1.0</gain>
2017-11-27 23:28:09 +00:00
<input>
<condition>
2017-11-29 04:11:23 +00:00
<and>
<equals>
<property>/it-fbw/law</property>
<value>0</value>
</equals>
<not-equals>
<property>/it-fbw/protections/overspeed</property>
<value>1</value>
</not-equals>
</and>
2017-11-27 23:28:09 +00:00
</condition>
<expression>
<sum>
<table>
<property>/it-fbw/g-elevator</property>
2017-11-27 23:28:09 +00:00
<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>
</table>
<product>
<table>
<property>/orientation/pitch-deg</property>
<entry><ind>-15.00000</ind><dep>1</dep></entry>
<entry><ind>-14.99999</ind><dep>0</dep></entry>
</table>
<table>
<property>/it-fbw/g-elevator</property>
2017-11-27 23:28:09 +00:00
<entry><ind>1</ind><dep>5.0</dep></entry>
<entry><ind>0</ind><dep>0.0</dep></entry>
</table>
</product>
<product>
<table>
<property>/orientation/pitch-deg</property>
<entry><ind>29.99999</ind><dep>0</dep></entry>
<entry><ind>30.00000</ind><dep>1</dep></entry>
</table>
<table>
<property>/it-fbw/g-elevator</property>
2017-11-27 23:28:09 +00:00
<entry><ind> 0</ind><dep> 0.0</dep></entry>
<entry><ind>-1</ind><dep>-5.0</dep></entry>
</table>
</product>
<table>
<property>/orientation/pitch-deg</property>
<entry><ind>-18</ind><dep> 5</dep></entry>
2017-11-27 23:28:09 +00:00
<entry><ind>-15</ind><dep> 0</dep></entry>
<entry><ind> 30</ind><dep> 0</dep></entry>
<entry><ind> 33</ind><dep>-5</dep></entry>
2017-11-27 23:28:09 +00:00
</table>
</sum>
</expression>
</input>
<input>
<condition>
2017-11-29 04:11:23 +00:00
<and>
<not-equals>
<property>/it-fbw/law</property>
<value>0</value>
</not-equals>
<not-equals>
<property>/it-fbw/protections/overspeed</property>
<value>1</value>
</not-equals>
</and>
2017-11-27 23:28:09 +00:00
</condition>
<expression>
<sum>
<table>
<property>/it-fbw/g-elevator</property>
2017-11-27 23:28:09 +00:00
<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>
</table>
</sum>
</expression>
</input>
2017-11-29 04:11:23 +00:00
<input>
<condition>
<and>
<equals>
<property>/it-fbw/law</property>
<value>0</value>
</equals>
<equals>
<property>/it-fbw/protections/overspeed</property>
<value>1</value>
</equals>
</and>
</condition>
<expression>
<sum>
<table>
<property>/it-fbw/g-elevator</property>
<entry><ind> 0.0</ind><dep> 1.5</dep></entry>
2017-11-29 04:11:23 +00:00
<entry><ind>-1.0</ind><dep> 5.0</dep></entry>
</table>
<product>
<table>
<property>/orientation/pitch-deg</property>
<entry><ind>29.99999</ind><dep>0</dep></entry>
<entry><ind>30.00000</ind><dep>1</dep></entry>
</table>
<table>
<property>/it-fbw/g-elevator</property>
<entry><ind> 0</ind><dep>-1.5</dep></entry>
2017-11-29 04:11:23 +00:00
<entry><ind>-1</ind><dep>-5.0</dep></entry>
</table>
</product>
<table>
<property>/orientation/pitch-deg</property>
<entry><ind> 30</ind><dep> 0</dep></entry>
<entry><ind> 33</ind><dep>-5</dep></entry>
</table>
</sum>
</expression>
</input>
<input>
<condition>
<and>
<not-equals>
<property>/it-fbw/law</property>
<value>0</value>
</not-equals>
<equals>
<property>/it-fbw/protections/overspeed</property>
<value>1</value>
</equals>
</and>
</condition>
<expression>
<sum>
<table>
<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>
</table>
<product>
<table>
<property>/orientation/pitch-deg</property>
<entry><ind>-15.00000</ind><dep>1</dep></entry>
<entry><ind>-14.99999</ind><dep>0</dep></entry>
</table>
<table>
<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>
</product>
<product>
<table>
<property>/orientation/pitch-deg</property>
<entry><ind>29.99999</ind><dep>0</dep></entry>
<entry><ind>30.00000</ind><dep>1</dep></entry>
</table>
<table>
<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>
</product>
<table>
<property>/orientation/pitch-deg</property>
<entry><ind>-18</ind><dep> 5</dep></entry>
<entry><ind>-15</ind><dep> 0</dep></entry>
<entry><ind> 30</ind><dep> 0</dep></entry>
<entry><ind> 33</ind><dep>-5</dep></entry>
2017-11-29 04:11:23 +00:00
</table>
</sum>
</expression>
</input>
2017-11-27 23:28:09 +00:00
<output>/it-fbw/pitch-rate</output>
</filter>
<filter>
<name>IT-CONTROLLER: PITCH KP (P Gain)</name>
2017-11-27 23:28:09 +00:00
<type>gain</type>
<gain>1.0</gain>
2017-11-27 23:28:09 +00:00
<input>
<expression>
<table>
<property>/velocities/mach</property>
<entry><ind>0.2</ind><dep>-0.26</dep></entry>
<entry><ind>0.9</ind><dep>-0.13</dep></entry>
</table>
</expression>
</input>
<output>/it-fbw/pitch-kp</output>
</filter>
<filter>
<name>IT-CONTROLLER: PITCH TI (I Time)</name>
2017-11-27 23:28:09 +00:00
<type>gain</type>
<gain>1.0</gain>
2017-11-27 23:28:09 +00:00
<input>
<expression>
<table>
<property>/velocities/mach</property>
<entry><ind>0.2</ind><dep>0.75</dep></entry>
<entry><ind>0.9</ind><dep>0.55</dep></entry>
</table>
</expression>
</input>
<output>/it-fbw/pitch-ti</output>
</filter>
<pid-controller>
<name>IT-CONTROLLER: PITCH</name>
2017-11-27 23:28:09 +00:00
<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>/orientation/pitch-rate-degps</property>
</input>
<reference>
<property>/it-fbw/pitch-rate</property>
</reference>
<output>
<property>/controls/flight/elevator-fbw-cmd</property>
</output>
<config>
<Kp>
<property>/it-fbw/pitch-kp</property>
</Kp>
<beta>1</beta>
<alpha>0.1</alpha>
<gamma>0</gamma>
<Ti>
<property>/it-fbw/pitch-ti</property>
</Ti>
<Td>0.005</Td>
<u_min>-1</u_min>
<u_max>1</u_max>
</config>
</pid-controller>
<filter>
<name>IT-CONTROLLER: PITCH OPTION</name>
2017-11-27 23:28:09 +00:00
<debug>false</debug>
<type>gain</type>
<gain>1.0</gain>
2017-11-27 23:28:09 +00:00
<feedback-if-disabled>true</feedback-if-disabled>
<initialize-to>output</initialize-to>
<input>
<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>
<property>/controls/flight/elevator-fbw-cmd</property>
</input>
<input>
<condition>
<and>
<equals>
<property>/it-autoflight/output/ap1</property>
<value>0</value>
</equals>
<equals>
<property>/it-autoflight/output/ap2</property>
<value>0</value>
</equals>
<or>
<equals>
<property>/gear/gear[1]/wow</property>
<value>1</value>
</equals>
<equals>
<property>/gear/gear[2]/wow</property>
<value>1</value>
</equals>
<equals>
<property>/it-fbw/law</property>
<value>2</value>
</equals>
</or>
</and>
</condition>
<property>/controls/flight/elevator-input-fast</property>
</input>
<input>
<condition>
<and>
<or>
<equals>
<property>/it-autoflight/output/ap1</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/ap2</property>
<value>1</value>
</equals>
</or>
<or>
<equals>
<property>/gear/gear[1]/wow</property>
<value>1</value>
</equals>
<equals>
<property>/gear/gear[2]/wow</property>
<value>1</value>
</equals>
</or>
</and>
</condition>
<value>0.1</value>
</input>
<input>
<condition>
<equals>
<property>/it-fbw/law</property>
<value>3</value>
</equals>
</condition>
<value>0</value>
</input>
<output>/controls/flight/elevator-fbw</output>
</filter>
<filter>
<name>IT-CONTROLLER: PITCH TRIM</name>
2017-11-27 23:28:09 +00:00
<debug>false</debug>
<initialize-to>output</initialize-to>
<enable>
<condition>
<and>
2017-11-29 04:11:23 +00:00
<or>
<equals>
<property>/it-fbw/law</property>
<value>0</value>
</equals>
<equals>
<property>/it-fbw/law</property>
<value>1</value>
</equals>
</or>
<or>
<and>
<greater-than-equals>
<property>/position/gear-agl-ft</property>
<value>100</value>
</greater-than-equals>
<or>
2017-11-27 23:28:09 +00:00
<equals>
<property>/it-autoflight/output/ap1</property>
2017-11-29 04:11:23 +00:00
<value>1</value>
2017-11-27 23:28:09 +00:00
</equals>
<equals>
<property>/it-autoflight/output/ap2</property>
2017-11-29 04:11:23 +00:00
<value>1</value>
2017-11-27 23:28:09 +00:00
</equals>
2017-11-29 04:11:23 +00:00
</or>
</and>
<and>
<greater-than-equals>
<property>/position/gear-agl-ft</property>
<value>50</value>
</greater-than-equals>
<equals>
<property>/it-autoflight/output/ap1</property>
<value>0</value>
</equals>
<equals>
<property>/it-autoflight/output/ap2</property>
<value>0</value>
</equals>
</and>
</or>
2017-11-27 23:28:09 +00:00
<less-than>
<property>/orientation/roll-deg</property>
<value>40</value>
</less-than>
<greater-than>
<property>/orientation/roll-deg</property>
<value>-40</value>
</greater-than>
<or>
<greater-than>
<property>/controls/flight/elevator-fbw</property>
<value>0.01</value>
</greater-than>
<less-than>
<property>/controls/flight/elevator-fbw</property>
<value>-0.01</value>
</less-than>
</or>
2017-11-28 00:59:40 +00:00
<less-than>
<property>/fdm/jsbsim/forces/load-factor</property>
<value>-0.5</value>
</less-than>
2017-11-29 04:11:23 +00:00
<not-equals>
<property>/it-fbw/protections/overspeed</property>
<value>1</value>
</not-equals>
2017-11-27 23:28:09 +00:00
</and>
</condition>
</enable>
<input>
2017-11-28 01:09:40 +00:00
<condition>
<greater-than>
<property>/controls/flight/elevator-fbw</property>
<value>0.01</value>
</greater-than>
</condition>
<value>1</value>
</input>
<input>
<condition>
<less-than>
<property>/controls/flight/elevator-fbw</property>
<value>-0.01</value>
</less-than>
</condition>
<value>-1</value>
2017-11-27 23:28:09 +00:00
</input>
<output>/controls/flight/elevator-trim</output>
<type>noise-spike</type>
<max-rate-of-change>0.01</max-rate-of-change>
</filter>
</PropertyList>