Difference between revisions of "Discrete Filter"

From T-VEC Wiki
Jump to: navigation, search
(How to Use)
 
Line 6: Line 6:
  
 
<table>
 
<table>
<pre>
+
<div style="text-indent:12">
Discrete Transfer Function:   
+
<br>
 
+
Discrete Transfer Function:  <br>
        A.z + B
+
    A.z + B<br>
        -------
+
    -------<br>
        D.z + C
+
    D.z + C<br>
 
+
where A, B, C, D are real numbers.<br>
where A, B, C, D are real numbers
+
<br>
 
+
Or, alternatively<br>
or Alternatively a
+
<br>
 
+
Discrete Filter:<br>
Discrete Filter:
+
    A + B.z<sup>-1</sup><br>
 
+
    ----------<br>
        A + B.z^-1
+
    D + C.z<sup>-1</sup><br>
        ----------
+
The output of the function is defined as <br>
        D + C.z^-1
+
    Oz<sup>0</sup> = A/D*In.z<sup>0</sup> + B/D*In.z<sup>-1</sup> - C/D*Out.z<sup>-1</sup><br>
 
+
Where <br>
 
+
     In.z<sup>0</sup> : current input<br>
The output of the function is defined as  
+
     In.z<sup>-1</sup>: previous input<br>
 
+
<br>NOTE: these 2 specifications are equivalent, one form is used by control engineers and the other is used by filter designers. <br>
    Oz0 = A/D*In.z0 + B/D*In.z-1 - C/D*Out.z-1
+
The output function definition is the same regardless.<br>
 
+
</div>
Where  
+
 
+
     In.z0 : current input
+
     In.z-1: previous input
+
 
+
NOTE: these 2 specifications are equivalent, one form is used by control engineers and the other is used by filter designers. The output function definition is the same regardless.
+
</pre>
+
 
</table>
 
</table>
 
 
==Approach==
 
==Approach==
 
To represent this in TTM it is necessary to state the semantics in terms of a function of current cycle input values and a previous cycle computed state variable (or multiple previous cycle state variables, in the case of z-equations of orders greater than 1). This requires the equation to be in a form similar to the expressions used to perform such a filter computation, computing the primary output and also computing a state variable output that you would also reference as an input (from the previous cycle's output computation).
 
To represent this in TTM it is necessary to state the semantics in terms of a function of current cycle input values and a previous cycle computed state variable (or multiple previous cycle state variables, in the case of z-equations of orders greater than 1). This requires the equation to be in a form similar to the expressions used to perform such a filter computation, computing the primary output and also computing a state variable output that you would also reference as an input (from the previous cycle's output computation).

Latest revision as of 16:28, 20 February 2007