pqmf

Functions

int main(int argc, char *argv[])

pqmf [ option ] [ infile ]

  • -k int

    • number of subbands \((1 \le K)\)

  • -m int

    • order of filter \((2 \le M)\)

  • -a double

    • stopband attenuation \((0 < \alpha)\)

  • -i int

    • number of iterations \((1 \le N)\)

  • -d double

    • convergence threshold \((0 \le \epsilon)\)

  • -s double

    • initial step size \((0 < \Delta)\)

  • infile str

    • double-type filter-bank input

  • stdout

    • double-type filter-bank output

In the below example, the signal in data.short is decomposed into four subband signals.

x2x +sd data.short | pqmf -k 4 | decimate -l 4 -p 4 > data.sub
Parameters:
  • argc[in] Number of arguments.

  • argv[in] Argument vector.

Returns:

0 on success, 1 on failure.

See also

ipqmf

class PseudoQuadratureMirrorFilterBanks

Decompose signal into subband signals.

The input is the signal \(x(t)\) and the output is the \(K\) subband signals:

\[ \begin{array}{cccc} x_0(t), & x_1(t), & \ldots, & x_{K-1}(t), \end{array} \]
The impulse responses of the analysis filters are cosine-modulated versions of the prototype filter \(h(n)\):
\[ h_k(n) = 2h(n) \cos \left( (2k+1) \frac{\pi}{2K} \left( n-\frac{M}{2} \right) + (-1)^k \frac{\pi}{4} \right). \]
where \(M\) is the filter order. In the implemented algorithm, the prototype filter \(h(n)\) is represented as
\[ h(n) = g(n) w(n), \]
where \(w(n)\) is the Kaiser window and
\[ g(n) = \frac{\sin \left( n-\frac{M}{2} \right) \omega} {\pi \left( n-\frac{M}{2} \right)} \]
is the shifted impulse response of an ideal lowpass filter. The optimal angular frequency \(\omega\) is calculated based on a simple algorithm.

Public Functions

PseudoQuadratureMirrorFilterBanks(int num_subband, int num_filter_order, double attenuation, int num_iteration, double convergence_threshold, double initial_step_size)
Parameters:
  • num_subband[in] Number of subbands, \(K\).

  • num_filter_order[in] Order of filter, \(M\).

  • attenuation[in] Stopband attenuation in dB.

  • num_iteration[in] Number of iterations.

  • convergence_threshold[in] Convergence threshold.

  • initial_step_size[in] Initial step size.

inline int GetNumSubband() const
Returns:

Number of subbands.

inline int GetNumFilterOrder() const
Returns:

Order of filter.

inline bool IsValid() const
Returns:

True if this object is valid.

inline bool IsConverged() const
Returns:

True if built filter is in convergence point.

bool Run(double input, std::vector<double> *output, PseudoQuadratureMirrorFilterBanks::Buffer *buffer) const
Parameters:
  • input[in] Input signal.

  • output[out] Output subband signals.

  • buffer[out] Buffer.

Returns:

True on success, false on failure.

class Buffer

Buffer for PseudoQuadratureMirrorFilterBanks class.