Difference between revisions of "Discrete Filter"

From T-VEC Wiki
Jump to: navigation, search
(Model)
(Model)
Line 32: Line 32:
 
The "firstOrderFilter" function is defined generically in terms of filter coefficients A, B, C, and D and values for the previous input and previous output, as shown in the image below. This Function can be referenced by the output table called Discrete_Filter.
 
The "firstOrderFilter" function is defined generically in terms of filter coefficients A, B, C, and D and values for the previous input and previous output, as shown in the image below. This Function can be referenced by the output table called Discrete_Filter.
  
 +
===First Order Filter Function===
 
Use the approach as follows:
 
Use the approach as follows:
  
 
[[Image:firstOrderFilter_ttm.jpg|center|TTM firstOrderFilter]]
 
[[Image:firstOrderFilter_ttm.jpg|center|TTM firstOrderFilter]]
  
<table>
+
===Discrete Filter Condition Table===
<pre>
+
The coefficients are modeled as TTM constants. The state variables representing previous input and previous output are modeled as "inputs" to the model. The model for the output "Discrete_Filter" is specified in terms of these inputs so that they can be considered to be variables that wrap around from the output of one cycle to the input of the next cycle.
 +
 
 +
 
 +
 
 
[[Image:Discrete_Filter_ttm.jpg|center|TTM Discrete_Filter]]
 
[[Image:Discrete_Filter_ttm.jpg|center|TTM Discrete_Filter]]
</pre>
+
 
</table>
+
Additional aspects of filter-oriented requirements should probably be added to this model, such as an input representing the current RealTime Clock and the passing of an execution cycle (that is, the passing of a time duration value representing the "sample time" for the filter). But those extra details are would make this email more confusing than is necessary to simply answer your original question.
 +
 
 +
===How to Use===
 +
 
 +
If someone wanted to know how it would be possible to model debounce functions for the followign example:
 +
 
 +
:"Block X shall compute the signal Y passing the raw signal through a debounce with persistence time of 0.5 seconds"
 +
 
 +
A user could define the constants A, B, C, and D with proper values for your specific requirement.

Revision as of 13:20, 20 February 2007