<html>
<head>
<title>__IIR Filters_Russia</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
</head>
<body>
<p> Hi dear! <br> Tell me please where it is possible the detailed help to receive or where to read about digital filters? It is necessary as it is possible more precisely and more in detail what functions to use, what type of the filter is used in Scilab. How to print out on the screen coef. consecutive sections (stages) one for another. To not spend it is a lot of time for learning of functions, there is at you a pattern or such example where to substitute the values for result, time are very poorly necessary coef. of different types of realization of digital filters...<br> <br> In Help Scilab 5.2.2 only it:<br><em> -------------------------------------------------------------------------<br>hz=iir(3,'bp','ellip',[.15 .25],[.08 .03]);<br>[hzm,fr]=frmag(hz,256);<br>plot2d(fr',hzm')<br>xtitle('Discrete IIR filter band pass 0.15<fr<0.25 ',' ',' ');<br>q=poly(0,'q'); //to express the result in terms of the delay operator q=z^-1<br>hzd=horner(hz,1/q)
<br>-------------------------------------------------------------------------</em><br> <br> <br>2. Why there are mistakes of a conclusion of factors at 'bp' order = 2<br>When order = 4 or all is higher Coef. are printed on the screen, but only array not a 2 orders sections<br><br>I make so:<br><em>----------------------------------------------------------------------------------------------------------- </em><br><em> </em><em>clear</em><em><br></em><em>ftype ='bp'</em><em><br></em><em>fdesign ='cheb1' //'butt', 'cheb1', 'cheb2' and 'ellip'</em><em><br></em><em>fc1 = 800; // cutoff frequency</em><em><br></em><em>fc2 = 900;</em><em><br></em><em>fs = 11025; // Sampling frequency</em><em><br></em><em>fc1n = fc1/fs; // cutoff frequency normalized</em><em><br></em><em>fc2n = fc2/fs;</em><em><br></em><em>order = 2;</em><em><br></em><em>NUM_SIZE = order+3; //-BP!-order4...+5 order6...+7 order8...+9</em><em><br></em><em>DEN_SIZE = order+3;
//-HP!-order4...+1</em><em><br></em><em><br></em><em>hz = iir (order, ftype, fdesign, [fc1n fc2n], [.01 .01]);</em><em><br></em><em>num=coeff(hz("num"));</em><em><br></em><em>den=coeff(hz("den"));</em><em><br></em><em>[hzm,fr]=frmag(hz,1024);</em><em><br></em><em><br></em><em>plot2d(fr',hzm')</em><em><br></em><em>//plot2d(f, abs(hf))</em><em><br></em><em>printf(" ======= IIR Coef --- ftype: %s, fdesign: %s, order: %i =======\n",ftype,fdesign,order);</em><em><br></em><em>printf(" --- num: \n");</em><em><br></em><em>for i=1:NUM_SIZE,</em><em><br></em><em> printf("%.20f\n", num(NUM_SIZE-i+1));</em><em><br></em><em>end</em><em><br></em><em>printf(" --- den: \n");</em><em><br></em><em>for i=1:DEN_SIZE,</em><em><br></em><em> printf("%.20f\n", den(NUM_SIZE-i+1));</em><em><br></em><em>end</em><em><br></em><em>printf(" ============== END Coefficients
==============\n");</em><em><br></em><br><em>----------------------------------------------------------------------------------------------------------------------------------------------------</em><br> <br> <br>--<br>...TViT.......ICQ:285247380....... <a href="mailto:tvitklg@rambler.ru">tvitklg@rambler.ru</a></p>
</body>
</html>