commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r11608 - in gnuradio/branches/developers/n4hy/pfb_iir2


From: n4hy
Subject: [Commit-gnuradio] r11608 - in gnuradio/branches/developers/n4hy/pfb_iir2: gnuradio-core/src/lib/general gnuradio-examples/python/apps/filter_design_tool
Date: Mon, 17 Aug 2009 12:03:31 -0600 (MDT)

Author: n4hy
Date: 2009-08-17 12:03:30 -0600 (Mon, 17 Aug 2009)
New Revision: 11608

Modified:
   
gnuradio/branches/developers/n4hy/pfb_iir2/gnuradio-core/src/lib/general/gr_iirdes.cc
   
gnuradio/branches/developers/n4hy/pfb_iir2/gnuradio-examples/python/apps/filter_design_tool/iirdestest.py
Log:
chebyshev order running but not right

Modified: 
gnuradio/branches/developers/n4hy/pfb_iir2/gnuradio-core/src/lib/general/gr_iirdes.cc
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_iir2/gnuradio-core/src/lib/general/gr_iirdes.cc
       2009-08-17 17:44:39 UTC (rev 11607)
+++ 
gnuradio/branches/developers/n4hy/pfb_iir2/gnuradio-core/src/lib/general/gr_iirdes.cc
       2009-08-17 18:03:30 UTC (rev 11608)
@@ -242,7 +242,7 @@
     Wp[0] = tan(M_PI*Wp[0]);
     Wa = Wp[0]/Ws[0];
     rtn[0] = ceil(acosh(sqrt((qs-1)/(qp-1)))/acosh(Wa));
-    rtn[1] = Wp[0]
+    rtn[1] = Wp[0];
     return rtn;
   }
   case gr_iirdes::BANDPASS: {
@@ -258,7 +258,7 @@
     Ws[1] = tan(M_PI*Ws[1]);
     Wp[1] = tan(M_PI*Wp[1]);
     for (int i=0;i<2;i++)
-      Wa[i]=(Ws[i]^2-Wp[0]*Wp[1])/(Ws[i]*(Wp[0]-Wp[1]));
+      Wa[i]=(Ws[i]*Ws[i]-Wp[0]*Wp[1])/(Ws[i]*(Wp[0]-Wp[1]));
     Wa[0]=fmin(Wa[0],Wa[1]);
     rtn[0] = ceil(acosh(sqrt((qs-1)/(qp-1)))/acosh(Wa[0]));
     rtn[1]=Wp[0];

Modified: 
gnuradio/branches/developers/n4hy/pfb_iir2/gnuradio-examples/python/apps/filter_design_tool/iirdestest.py
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_iir2/gnuradio-examples/python/apps/filter_design_tool/iirdestest.py
   2009-08-17 17:44:39 UTC (rev 11607)
+++ 
gnuradio/branches/developers/n4hy/pfb_iir2/gnuradio-examples/python/apps/filter_design_tool/iirdestest.py
   2009-08-17 18:03:30 UTC (rev 11608)
@@ -27,9 +27,16 @@
                               [.4],
                               .1,
                               60)
-print "Lowpass design, order and cutoff frequency = ",numbers,"\n"
+print "Butterpass Lowpass design, order and cutoff frequency = ",numbers,"\n"
 
+numbersC = gr.iirdes.chebyshevord(gr.iirdes.LOWPASS,
+                              [.3],
+                              [.4],
+                              .1,
+                              60)
+print "Chebyshev Lowpass design, order and cutoff frequency = ",numbersC,"\n"
 
+
 tf=[0.0976, 0.1953, 0.0976, 0.3333, -0.9428, 1.0]
 order = gr.iirdes.tf2order(tf)
 print "order of filter= ",order,"\n"





reply via email to

[Prev in Thread] Current Thread [Next in Thread]