functionbaseFilter

Generate a ZerosAndPoles transfer function from a base filter description (= low pass filter with w_cut = 1 rad/s)

Information

Syntax

zp = baseFilter(analogFilter, order, A_ripple, normalized);

Description

This function constructs a ZerosAndPoles transfer function description of low pass filters with a cut-off angular frequency of one rad/s and a gain of one. Filters returned by this function are the starting point to construct other filters by transformation of the filter transfer function:

   zp(p) = 1 / ( product( p + a[i] ) * product(p^2 + b[i]*p + a[i]) )

using the following rules:

Desired filter Transformation
High pass filter replace "p" by "1/p"
Band pass filter replace "p" by "(p + 1/p)/w_band"
(w_band = (f_max - f_min)/sqrt(f_min*f_max))
Stop pass filter replace "p" by "w_band/(p + 1/p)"
(w_band = (f_max - f_min)/sqrt(f_min*f_max))
Filter with cut-off angular frequency w_cut replace "p" by "p/w_cut"

For more details see also [Tietze2002], pp. 815-852.

Example

  // Generate a Butterworth high pass base filter of order 3
  import ZP = Modelica_LinearSystems2.ZerosAndPoles;
  import Modelica_LinearSystems2.Types;

  ZP zp_filter;
algorithm
  zp_filter = ZP.Internal.baseFilter(Types.AnalogFilter.Butterworth, order = 3);

 // zp_filter = 1 /  ( (p + 1)*(p^2 + p + 1) )

Inputs

TypeNameDefaultDescription
Modelica_LinearSystems2.Utilities.Types.AnalogFilteranalogFilterModelica_LinearSystems2.Utilities.Types.AnalogFilter.CriticalDampingAnalog filter characteristics (CriticalDamping/Bessel/Butterworth/Chebyshev)
Integerorder2Order of filter
RealA_ripple0.5Pass band ripple (only for Chebyshev filter)
BooleannormalizedtrueTrue, if amplitude at f_cut = -3db, otherwise unmodified filter

Outputs

TypeNameDefaultDescription
ZerosAndPolesfilterFilter transfer function