Autopilot configuration reference: Difference between revisions

Jump to navigation Jump to search
A little styling
(A little styling)
Line 328: Line 328:
== filter ==
== filter ==


=== gain ===
=== Pure Gain <gain> ===
A gain filter multiplies the difference between the <input> and <output> values by a given factor. The multiplier or gain is specified by the <gain> element. More than one <gain> element formatted as in [[Autopilot_Configuration_Reference#Input_Values|Input Values]] may be present. The first with a <condition> element evaluating as true will define the used gain.
A gain filter multiplies the difference between the <input> and <output> values by a given factor. The multiplier or gain is specified by the <gain> element. More than one <gain> element formatted as in [[Autopilot_Configuration_Reference#Input_Values|Input Values]] may be present. The first with a <condition> element evaluating as true will define the used gain.


Line 338: Line 338:
  </filter>
  </filter>


=== exponential ===
=== First Order Low Pass Filter &lt;exponential&gt; ===
The exponential filter is a typical [http://en.wikipedia.org/wiki/Low-pass_filter low pass filter]. The magic euler number and the associated mathematical funtion exp() plays a major role here. As the name implies, lower frequencies can pass this filter while higher frequencies are cut. The frequency where only half of the input signal reaches the output is called cutoff frequency. This cutoff frequency is defined by the parameter &lt;filter-time&gt; and resolves as cutoff-frequency = 1/(2*pi*cutoff-frequency).
The exponential filter is a typical [http://en.wikipedia.org/wiki/Low-pass_filter low pass filter]. The magic euler number and the associated mathematical funtion exp() plays a major role here. As the name implies, lower frequencies can pass this filter while higher frequencies are cut. The frequency where only half of the input signal reaches the output is called cutoff frequency. This cutoff frequency is defined by the parameter &lt;filter-time&gt; and resolves as cutoff-frequency = 1/(2*pi*cutoff-frequency).
Example: a 1Hz first order low pass filter  
Example: a 1Hz first order low pass filter  
Line 348: Line 348:
  </filter>
  </filter>


=== double-exponential ===
=== 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 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.  


Line 359: Line 359:
  </filter>
  </filter>


=== moving-average ===
=== &lt;moving-average&gt; ===
=== noise-spike ===
=== Rate Limit Filter &lt;noise-spike&gt; ===
A better name for a noise spike filter would probably have been "rate limit filter". This is exactly what it does: limit the rate of change of the output value. The relevant configuration element is &lt;max-rate-of-change&gt; setting the maximum rate of change of the output property per second.
A better name for a noise spike filter would probably have been "rate limit filter". This is exactly what it does: limit the rate of change of the output value. The relevant configuration element is &lt;max-rate-of-change&gt; setting the maximum rate of change of the output property per second.


Line 371: Line 371:
  &lt;/filter&gt;
  &lt;/filter&gt;


=== reciprocal ===
=== Reciprocal Filter &lt;reciprocal&gt; ===
Compute the reciprocal (1/x) value of the input property. If x is zero, no computation is performed. The optional &lt;gain&gt; element may be used to scale the value. Output computes as gain divided by input.
Compute the reciprocal (1/x) value of the input property. If x is zero, no computation is performed. The optional &lt;gain&gt; element may be used to scale the value. Output computes as gain divided by input.


Line 382: Line 382:
  &lt;/filter&gt;
  &lt;/filter&gt;


== pid-controller ==
== PID Controller &lt;pid-controller&gt; ==
The [http://en.wikipedia.org/wiki/PID_controller PID controller] is the swiss army knife of automation and this implementation is suitable for most situations. It has a builtin anti-windup logic, and usage of <max> and <min> elements for clamping the output is mandatory. The most important thing to know is that this controller 'does not' compute absolute output values but an offset from the current value of the output property. This can lead to unexpected behavior if the current value of the output property is unknown when the controller is enabled. This behavior is different to that of the pi-simple-controller.
The [http://en.wikipedia.org/wiki/PID_controller PID controller] is the swiss army knife of automation and this implementation is suitable for most situations. It has a builtin anti-windup logic, and usage of <max> and <min> elements for clamping the output is mandatory. The most important thing to know is that this controller 'does not' compute absolute output values but an offset from the current value of the output property. This can lead to unexpected behavior if the current value of the output property is unknown when the controller is enabled. This behavior is different to that of the pi-simple-controller.
The xml element creating a pid controller is <tt><pid-controller></tt>.
The xml element creating a pid controller is <tt><pid-controller></tt>.
Line 411: Line 411:
|}
|}


== pi-simple-controller ==
== PI Controller &lt;pi-simple-controller&gt; ==
This controller implements a PI controller. Other than the PID controller, it computes absolute output values, regardless of the value of the output property. It can by configured as an I-only, P-only or PI-controller. It has anti windup logic if <min> and <max> elements are present.
This controller implements a PI controller. Other than the PID controller, it computes absolute output values, regardless of the value of the output property. It can by configured as an I-only, P-only or PI-controller. It has anti windup logic if <min> and <max> elements are present.
The xml element creating a PI controller is <tt><pi-simple-controller></tt>
The xml element creating a PI controller is <tt><pi-simple-controller></tt>
Line 424: Line 424:
|}
|}


== predict-simple ==
== Predictor &lt;predict-simple&gt; ==


== Proposed extensions ==
== Proposed extensions ==

Navigation menu