Home > classes > @zero > cz2iir.m

cz2iir

PURPOSE ^

CZ2IIR return a,b IIR filter coefficients for a complex zero designed using the bilinear transform.

SYNOPSIS ^

function [a,b] = cz2iir(z, fs)

DESCRIPTION ^

 CZ2IIR return a,b IIR filter coefficients for a complex zero designed using the bilinear transform.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 DESCRIPTION: CZ2IIR return a,b IIR filter coefficients for a complex zero
              designed using the bilinear transform.

 CALL:        [a,b] = cz2iir(z, fs)

 INPUTS:      z  - zero object
              fs - the sample rate for the filter

 VERSION:     $Id: cz2iir.m,v 1.2 2007/07/18 13:58:45 ingo Exp $

 HISTORY:     03-04-2007 Hewitson
                 Creation

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [a,b] = cz2iir(z, fs)
0002 % CZ2IIR return a,b IIR filter coefficients for a complex zero designed using the bilinear transform.
0003 %
0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0005 %
0006 % DESCRIPTION: CZ2IIR return a,b IIR filter coefficients for a complex zero
0007 %              designed using the bilinear transform.
0008 %
0009 % CALL:        [a,b] = cz2iir(z, fs)
0010 %
0011 % INPUTS:      z  - zero object
0012 %              fs - the sample rate for the filter
0013 %
0014 % VERSION:     $Id: cz2iir.m,v 1.2 2007/07/18 13:58:45 ingo Exp $
0015 %
0016 % HISTORY:     03-04-2007 Hewitson
0017 %                 Creation
0018 %
0019 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0020 
0021 f0 = get(z, 'f');
0022 q  = get(z, 'q');
0023 
0024 w0 = f0*2*pi;
0025 w02 = w0^2;
0026 
0027 a(1) = (-q*w02/2 - 2*q*fs*fs - w0*fs) / (q*w02);
0028 a(2) = (-w02+4*fs*fs) / w02;
0029 a(3) = (-q*w02/2 - 2*q*fs*fs + w0*fs) / (q*w02);
0030 
0031 b(1) = 1;
0032 b(2) = -2;
0033 b(3) = -1;
0034 
0035 % END

Generated on Mon 03-Sep-2007 12:12:34 by m2html © 2003