Autopilot configuration reference: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 366: Line 366:
  <max>30</max>
  <max>30</max>
</syntaxhighlight>
</syntaxhighlight>
This example shows how to use a table to vary an output with height. At sea level, the output is 0.045, at 22400 the output is 0.1196, and at 56000 ft the output is 0.7
<syntaxhighlight lang="xml">
<filter>
<name>GAy</name>
<debug>false</debug>
<type>gain</type>
<gain>1.0</gain>
<input>
<expression>
<table>
<property>/instrumentation/altimeter/indicated-altitude-ft</property>
<entry><ind>0.0</ind><dep>0.045</dep></entry>
<entry><ind>22400</ind><dep>0.1196</dep></entry>
<entry><ind>56000</ind><dep>0.7</dep></entry>
</table>
</expression>
</input>
<output><property>/autopilot/gain/GAy</property></output>
</filter>
</syntaxhighlight>


== Logic controller &lt;logic&gt; ==
== Logic controller &lt;logic&gt; ==
Line 548: Line 572:
</syntaxhighlight>
</syntaxhighlight>


=== Second order low pass filter &lt;double-exponential&gt; ===
The double exponential filter is a low pass filter like the exponential filter with a steeper slope of the filter diagram. It acts basically like two chained exponential filters and it is some times called second order filter.
The configuration is the same for exponential and double-exponential filters, just the type entry differs.
<syntaxhighlight lang="xml">
<filter>
  <type>double-exponential</type>
  <filter-time>0.16</filter-time>
  <input>/some/input</input>
  <output>/some/output/<output>
</filter>
</syntaxhighlight>




Line 564: Line 603:
</syntaxhighlight>
</syntaxhighlight>


=== Second order low pass filter &lt;double-exponential&gt; ===
The double exponential filter is a low pass filter like the exponential filter with a steeper slope of the filter diagram. It acts basically like two chained exponential filters and it is some times called second order filter.


The configuration is the same for exponential and double-exponential filters, just the type entry differs.
=== Lead-Lag filter &lt;lead-lag&gt; ===
The lead-lag filter  is a typical [https://en.wikipedia.org/wiki/Lead%E2%80%93lag_compensator] lead lag filter. As the name implies it is a combination of a lead (high-pass) filter and a lag (low-pass) filter.
 
Example: a lead lag filter k(s+a)/s+b).
The gain is k, filter-time-a is a, and filter-time-b is b.
 
In an autopilot is is often used to sharpen up the response to an input.
 
<syntaxhighlight lang="xml">
<filter>
<name>loc-deg leadlag</name>
<debug>false</debug>
<type>lead-lag</type>
<gain>5</gain>
<filter-time-a>5.0</filter-time-a>
<filter-time-b>1.0</filter-time-b>
<input><property>/autopilot/internal/loc-deg</property></input>
<output><property>/autopilot/internal/loc-deg-leadlag</property></output>
</filter>
</syntaxhighlight>
 
 
=== Integrator filter &lt;lead-lag&gt; ===
The integrator filter provides integration with time.
 
 
Example: an integrator filter k(1/s).
 
In this example, the normal input (<property>/autopilot/internal/p-deg_sec</property>)is disconnected and replaved by (output x 10) input when relay Rb is closed. This has the effect of rapidly ramping the integrator output to zero.  


<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml">
<filter>
<filter>
  <type>double-exponential</type>
<name>synthetic bank from roll rate</name>
  <filter-time>0.16</filter-time>
<debug>false</debug>
  <input>/some/input</input>
<type>integrator</type>
  <output>/some/output/<output>
<gain>1.0</gain>
</filter>
<input>
<condition>
<property>/autopilot/internal/Rb</property>
</condition>
<property>/autopilot/internal/p-deg_sec</property>
</input>
<input> <!-- zero integrator when Rb is not set -->
<expression>
<product>
<value>-10.0</value>
<property>/autopilot/internal/phi-deg_synth</property>
</product>
</expression>
</input>
<output><property>/autopilot/internal/phi-deg_synth</property></output>
<u_min>-180</u_min>
<u_max>180</u_max>
</filter>
</syntaxhighlight>
</syntaxhighlight>


=== Moving average filter &lt;moving-average&gt; ===
=== Moving average filter &lt;moving-average&gt; ===
6

edits

Navigation menu