📄 iirfloatcoeff.h
字号:
/*
* Copyright (c) 1998,2000 TriMedia Technologies Inc.
*
* +------------------------------------------------------------------+
* | This software is furnished under a license and may only be used |
* | and copied in accordance with the terms and conditions of such |
* | a license and with the inclusion of this copyright notice. This |
* | software or any other copies of this software may not be provided|
* | or otherwise made available to any other person. The ownership |
* | and title of this software is not transferred. |
* | |
* | The information in this software is subject to change without |
* | any prior notice and should not be construed as a commitment by |
* | TriMedia Technologies. |
* | |
* | this code and information is provided "as is" without any |
* | warranty of any kind, either expressed or implied, including but |
* | not limited to the implied warranties of merchantability and/or |
* | fitness for any particular purpose. |
* +------------------------------------------------------------------+
*
* Module name : iirFloatCoeff.c
*
* Created : 01/14/99
*
* Last update : 01/14/99
*
* Description : This program contains sets of coefficients
* in floating point.
* cutoff frequencies: 80 Hz to 120 Hz
* in 5 Hz steps
* each for low and high pass
*
* Important: There is no b0 mentioned since this is assumed to
* be 1. This file is for the case study on
* optimizing IIR filters only.
*
*/
#ifndef _IIRFLOATCOEFF_H_
#define _IIRFLOATCOEFF_H_
/* --------------------------- includes ------------------------ */
#include <stdlib.h>
/* --------------------------- defines ------------------------- */
/* ------------------------------------------------------------- */
/* The coefficients refer to: */
/* H(z) = (a0*z^0 + a1*z^1 + a2*z^2)/(b0*z^0 + b1*z^1 + b2*z^2). */
/* b0 is always 1 !!! The coefficients are calcuated for a */
/* second order IIR Butterworth filter. */
/*****************************************************************/
/* defininition of the coefficients */
/*****************************************************************/
float coeffLib[90] =
{
/* for 80 Hz => coeffLib[0] !!!!!!!!!!!!!!!!!!!!!!!!!!!! */
/* lowpass filter */
3.229454E-0005, /* a0 */
2.0000288383896643E+0000 * 3.229454E-0005, /* a1 */
3.229454E-0005, /* a2 */
-1.9838618943467736E+0000, /* b1 */
9.8399107530713081E-0001, /* b2 */
/* highpass filter */
9.919822E-0001, /* a0 */
-2.0000000009388499E+0000 * 9.919822E-0001, /* a1 */
9.919822E-0001, /* a2 */
-1.9839001651853323E+0000, /* b1 */
9.8402873706072569E-0001, /* b2 */
/* for 85 Hz => coeffLib[1] !!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
/* lowpass filter */
3.623962E-0005, /* a0 */
2.0065789473684212 * 3.623962E-0005, /* a1 */
3.623962E-0005, /* a2 */
-1.9828531742095947E+0000, /* b1 */
9.8299884796142578E-0001, /* b2 */
/* highpass filter */
9.914832E-0001, /* a0 */
-2.0000000000000000E+0000 * 9.914832E-0001, /* a1 */
9.914832E-0001, /* a2 */
-1.9828939437866211E+0000, /* b1 */
9.8303890228271484E-0001, /* b2 */
/* for 90 Hz => coeffLib[2] !!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
/* lowpass filter */
4.083198E-0005, /* a0 */
2.0000228086581666E+0000 * 4.083198E-0005, /* a1 */
4.083198E-0005, /* a2 */
-1.9818447334691882E+0000, /* b1 */
9.8200806416571140E-0001, /* b2 */
/* highpass filter */
9.909845E-0001, /* a0 */
-2.0000000009397954E+0000 * 9.909845E-0001, /* a1 */
9.909845E-0001, /* a2 */
-1.9818877885118127E+0000, /* b1 */
9.8205034900456667E-0001, /* b2 */
/* for 95 Hz => coeffLib[3] !!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
/* lowpass filter */
4.529953E-0005, /* a0 */
2.0052631578947366E+0000 * 4.529953E-0005, /* a1 */
4.529953E-0005, /* a2 */
-1.9808361530303955E+0000, /* b1 */
9.8101782798767090E-0001, /* b2 */
/* highpass filter */
9.904859E-0001, /* a0 */
-2.0000002407087041E+0000 * 9.904859E-0001, /* a1 */
9.904859E-0001, /* a2 */
-1.9808814525604248E+0000, /* b1 */
9.8106241226196289E-0001, /* b2 */
/* for 100 Hz => coeffLib[4] !!!!!!!!!!!!!!!!!!!!!!!!!!!! */
/* lowpass filter */
5.035941E-0005, /* a0 */
2.0000184935180219E+0000 * 5.035941E-0005, /* a1 */
5.035941E-0005, /* a2 */
-1.9798276089131832E+0000, /* b1 */
9.8002905026078224E-0001, /* b2 */
/* highpass filter */
9.899878E-0001, /* a0 */
-2.0000000009407413E+0000 * 9.899878E-0001, /* a1 */
9.899878E-0001, /* a2 */
-1.9798754462972283E+0000, /* b1 */
9.8007593769580126E-0001, /* b2 */
/* for 105 Hz => coeffLib[5] !!!!!!!!!!!!!!!!!!!!!!!!!!!! */
/* lowpass filter */
5.531311E-0005, /* a0 */
2.0043103448275863E+0000 * 5.531311E-0005, /* a1 */
5.531311E-0005, /* a2 */
-1.9788188934326172E+0000, /* b1 */
9.7904086112976074E-0001, /* b2 */
/* highpass filter */
9.894898E-0001, /* a0 */
-2.0000000000000000E+0000 * 9.894898E-0001, /* a1 */
9.894898E-0001, /* a2 */
-1.9788691997528076E+0000, /* b1 */
9.7909021377563477E-0001, /* b2 */
/* for 110 Hz => coeffLib[6] !!!!!!!!!!!!!!!!!!!!!!!!!!!! */
/* lowpass filter */
6.079674E-0005, /* a0 */
2.0043103448275863E+0000 * 6.079674E-0005, /* a1 */
6.079674E-0005, /* a2 */
-1.9778103828430176E+0000, /* b1 */
9.7805380821228027E-0001, /* b2 */
/* highpass filter */
9.889920E-0001, /* a0 */
-2.0000002410723088E+0000 * 9.889920E-0001, /* a1 */
9.889920E-0001, /* a2 */
-1.9778630733489990E+0000, /* b1 */
9.7810530662536621E-0001, /* b2 */
/* for 115 Hz => coeffLib[7] !!!!!!!!!!!!!!!!!!!!!!!!!!!! */
/* lowpass filter */
6.628036E-0005, /* a0 */
2.0035971223021583E+0000 * 6.628036E-0005, /* a1 */
6.628036E-0005, /* a2 */
-1.9768018722534180E+0000, /* b1 */
9.7706794738769531E-0001, /* b2 */
/* highpass filter */
9.884946E-0001, /* a0 */
-2.0000000000000000E+0000 * 9.884946E-0001, /* a1 */
9.884946E-0001, /* a2 */
-1.9768569469451904E+0000, /* b1 */
9.7712159156799316E-0001, /* b2 */
/* for 120 Hz => coeffLib[8] !!!!!!!!!!!!!!!!!!!!!!!!!!!! */
/* lowpass filter */
7.224083E-0005, /* a0 */
2.0033003300330030E+0000 * 7.224083E-0005, /* a1 */
7.224083E-0005, /* a2 */
-1.9757933616638184E+0000, /* b1 */
9.7608280181884766E-0001, /* b2 */
/* highpass filter */
9.879973E-0001, /* a0 */
-2.0000002413150124E+0000 * 9.879973E-0001, /* a1 */
9.879973E-0001, /* a2 */
-1.9758508205413818E+0000, /* b1 */
9.7613883018493652E-0001 /* b2 */
};
/* ------------------------------------------------------------------------ */
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -