Open Rails

IIRFilter Methods

The methods of the IIRFilter class are listed below. For a complete list of IIRFilter class members, see the IIRFilter Members topic.

Public Static Methods

HzToRad Frequenc conversion from Hz to rad/s
RadToHz Frequency conversion from rad/s to Hz

Public Instance Methods

ComputeButterworth First-Order IIR Filter — Calculation by Freescale Semiconductor, Inc. ********************************************************************** In GDFLIB User Reference Manual, 01/2009, Rev.0 Butterworth coefficients calculation The Butterworth first-order low-pass filter prototype is therefore given as: w_c H(s) = --------- s + w_c This is a transfer function of Butterworth low-pass filter in the s-domain with the cutoff frequency given by the w_c Transformation of an analog filter described by previous equation into a discrete form is done using the bilinear transformation, resulting in the following transfer function: w_cd*Ts w_cd*Ts -1 -------------- + ------------ * z 2 + w_cd*Ts 2 + w_cd*Ts H(z)=------------------------------------- w_cd*Ts - 2 -1 1 + ------------- * z 2 + w_cd*Ts where w_cd is the cutoff frequency of the filter in the digital domain and Ts is the sampling period. However, mapping of the analog system into a digital domain using the bilinear transformation makes the relation between w_c and w_cd non-linear. This introduces a distortion in the frequency scale of the digital filter relative to that of the analog filter. This is known as warping effect. The warping effect can be eliminated by pre-warping the analog filter, and then transforming it into the digital domain, resulting in this transfer function: w_cd_p*Ts_p w_cd_p*Ts_p -1 ------------------ + ---------------- * z 2 + w_cd_p*Ts_p 2 + w_cd_p*Ts_p H(z)=------------------------------------- w_cd_p*Ts_p - 2 -1 1 + ----------------- * z 2 + w_cd_p*Ts_p where ωcd_p is the pre-warped cutoff frequency of the filter in the digital domain, and Ts_p is the pre-warped sampling period. The pre-warped cutoff frequency is calculated as follows: 2 w_cd*Ts w_cd_p = ------ * tan ( --------- ) Ts_p 2 and the pre-warped sampling period is: Ts_p = 0.5 Because the given filter equation is as described, the Butterworth low-pass filter coefficients are calculated as follows: w_cd_p*Ts_p a1 = a2 = ----------------- 2 + w_cd_p*Ts_p b1 = 1.0 w_cd_p*Ts_p - 2 b2 = ------------------ 2 + w_cd_p*Ts_p
Equals (inherited from Object)Determines whether the specified Object is equal to the current Object.
FilterOverloaded. IIR Digital filter function Call this function with constant sample period
GetHashCode (inherited from Object)Serves as a hash function for a particular type.
GetType (inherited from Object)Gets the Type of the current instance.
ResetOverloaded. Resets all buffers of the filter
ToString (inherited from Object)Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object)Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object)Creates a shallow copy of the current Object.

See Also

IIRFilter Class | ORTS.Common Namespace