Page 282 - Analog and Digital Filter Design
P. 282

Phase-Shift Networks (All-Pass  Filters)  2 79





                      of  modulus k',  where K  = cos 6, which can be found using the same program.
                      The modular angle, 6, can be found from the upper to lower passband frequency
                      ratio, oh/w,,:





                                                   (31
                             Hence k = sin 6 = sin  cos-'  -


                      The rejection of  the unwanted sideband can be found from the equation:



                                        tan(  6/2)
                                                   [ - : ' I
                             where 6 = 4q'  and q = exp   ~


                       These  values  are  also  calculated  in  the  computer  program  HILBERT.CPP,
                       given in Listing 9.2





                       ','  Hiibert.cpp-to find poles and zeroes for quadrature networks
                       II  using Jacobian functions sn  and cn. based on program given in
                       .I/  "mmerical P.ecipes  in C",  by  Press. et  a1  (Cambridge).
                       #include (rnath.h)
                       #include (iostrearn.h)
                       #define TOL 0.0i)OOl
                       #defme PI 3.1415926
                       #define  AF.FAY  2 0
                       void  jacobian(doub1e. double) ;
                       double integrate2(d~ublsi:
                       int rnain(voidi  ;
                       ,' (global variables
                       double  sn.  cn;
                       int main(v-oid)
                              excern double sn. cn;
                              doubie ratio;
                              double k, kk, angle.  q;
                              double kay, kaydash.del;
                              double u, rejeccion,rnc, ur,:<i;
                              double pole:
                              int  i, j, n;
                              cout <c "Enter filter order" c< endl;
                              cin >>  n;
   277   278   279   280   281   282   283   284   285   286   287