bandPassAlpha

Return alpha for band pass

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

A band pass with bandwidth "w" is determined from a low pass

  1/(p^2 + a*p + b)

with the transformation

  new(p) = (p + 1/p)/w

This results in the following derivation:

  1/(p^2 + a*p + b) -> 1/( (p+1/p)^2/w^2 + a*(p + 1/p)/w + b )
                     = 1 /( ( p^2 + 1/p^2 + 2)/w^2 + (p + 1/p)*a/w + b )
                     = w^2*p^2 / (p^4 + 2*p^2 + 1 + (p^3 + p)a*w + b*w^2*p^2)
                     = w^2*p^2 / (p^4 + a*w*p^3 + (2+b*w^2)*p^2 + a*w*p + 1)

This 4th order transfer function shall be split in to two transfer functions of order 2 each for numerical reasons. With the following formulation, the fourth order polynomial can be represented (with the unknowns "c" and "alpha"):

  g(p) = w^2*p^2 / ( (p*alpha)^2 + c*(p*alpha) + 1) * ( (p/alpha)^2 + c*(p/alpha) + 1)
       = w^2*p^2 / ( p^4 + c*(alpha + 1/alpha)*p^3 + (alpha^2 + 1/alpha^2 + c^2)*p^2
                                                   + c*(alpha + 1/alpha)*p + 1 )

Comparison of coefficients:

  c*(alpha + 1/alpha) = a*w           -> c = a*w / (alpha + 1/alpha)
  alpha^2 + 1/alpha^2 + c^2 = 2+b*w^2 -> equation to determine alpha

  alpha^4 + 1 + a^2*w^2*alpha^4/(1+alpha^2)^2 = (2+b*w^2)*alpha^2
    or z = alpha^2
  z^2 + a^2*w^2*z^2/(1+z)^2 - (2+b*w^2)*z + 1 = 0

Therefore the last equation has to be solved for "z" (basically, this means to compute a real zero of a fourth order polynomial):

   solve: 0 = f(z)  = z^2 + a^2*w^2*z^2/(1+z)^2 - (2+b*w^2)*z + 1  for "z"
              f(0)  = 1  > 0
              f(1)  = 1 + a^2*w^2/4 - (2+b*w^2) + 1
                    = (a^2/4 - b)*w^2  < 0
                    // since b - a^2/4 > 0 requirement for complex conjugate poles
   -> 0 < z < 1

This function computes the solution of this equation and returns "alpha = sqrt(z)";

Syntax

alpha = bandPassAlpha(a, b, w)

Inputs (3)

a

Type: Real

Description: Coefficient of s^1

b

Type: Real

Description: Coefficient of s^0

w

Type: AngularVelocity (rad/s)

Description: Bandwidth angular frequency

Outputs (1)

alpha

Type: Real

Description: Alpha factor to build up band pass