filter.1
来自「speech signal process tools」· 1 代码 · 共 325 行
1
325 行
.\" Copyright (c) 1986-1990 Entropic Speech, Inc..\" Copyright (c) 1991 Entropic Research Laboratory, Inc.; All rights reserved.\" @(#)filter.1 3.16 27 Mar 1997 ESI/ERL.TH FILTER 1\-ESPS 27 Mar 1997.ds ]W (c) 1991 Entropic Research Laboratory, Inc..SH NAMEfilter \- Performs digital filtering on a sampled data file..SH SYNOPSIS.B filter[.BI \-P " param_file"][.BI \-p " range"][.BI \-r " range"][.BI \-d " data_type"][.BI \-f " filtername"][.BI \-F " filt_file"][.BI \-x " debug_level"][.BI \-i " up/down"][.B \-z ].I in_file out_file.SH DESCRIPTION.PPThis program is considered obsolete and will be eliminated in futurenext Entropic software releases and replaced by the new program,currently called \fIfilter2\fR. See the manual entry for \fIfilter2\fR..PPThe program.I filtertakes the input sampled data file,.I in_file,and produces an output sampled data file,.I out_file,after performing a digital filtering operation on it.The output sampled data file is of type FEA_SD (5\-\s-1ESPS\s+1).\fIFilter\fR allows the user to change the data type of the output fileby using the \fB\-d\fR option; see below for more details.The program accepts "\-" for either the input file or the output fileto use the standard input and standard output, respectively. .PPThe program may implement either finite impulse response (FIR) orinfinite impulse response (IIR) filters.A set of numerator coefficients and (optionally) a set of denominator coefficients are specified either in the parameter file or in the FEAFILT file. Currently, only real filtersmay be used; if a filter is complex, it's imaginary part is ignored.The numerator coefficients then become the {a\di\u} and the denominatorcoefficients become the {b\di\u} in the followingz-domain transfer function:.nf a\d0\u + a\d1\uz\u-1\d + a\d2\uz\u-2\d + ... + a\dm-1\uz\u-m+1\d H(z) = ___________________________________ b\d0\u + b\d1\uz\u-1\d + b\d2\uz\u-2\d + ... + b\dn-1\uz\u-n+1\d.fiAn FIR filter corresponds to the case where, in the equation above, b\d0\u = n = 1.An FIR filter may also be specified by choosing the order of the denominatorto be zero, and entering no denominator coefficients at all..PPThe program uses a different initialization procedure for FIR filtersthan it uses for IIR filters. For FIR filtering, the first output will be computed from data samplesoccurring before the starting point in the input file (as defined by the parameter.I start, for example), if they exist. Data samples which would occur beforethe first sample in the input file are assumed to be zero.For IIR filtering, all inputs and outputs occurring before the startingpoint are assumed to be zero..SH OPTIONSThe following options are supported:.TP.BI \-P " param_file"uses the parameter file .I param_filrather than the default, which is.I params..br.TP.BI \-r " range"Perform the filtering operation on the specified range of points..I rangeis a character string which is interpreted in the formatunderstood by.I range_switch (3-ESPSu).\fBr\fP and \fBp\fP are synonyms..br.TP.BI \-p " range"Perform the filtering operation on the specified range of points..I rangeis a character string which is interpreted in the formatunderstood by.I range_switch (3-ESPSu).\fB\-r\fP is a synonym for \fB\-p\fP..br.TP.BI \-d " data_type"The argument \fIdata_type\fR is a character representingthe desired output data type in \fIout_file\fR: \fIb\fR for byte,\fIs\fR for short, \fIl\fR for long, \fIf\fR for float, and \fId\fRfor double. This data type conversion is oftenuseful when the input data type is short and the filtering operationproduces sample values greater in magnitude than 2\u15\d . The output type is real or complex in agreement with the input type; for example if\fId\fP is specified, the output type is DOUBLE if the input isreal and DOUBLE_CPLX if the input is complex..br.TP.BI \-f " filtername"If the coefficients are being read from the parameter file, then.I filternameis the body of the name of the variable that containsthe number of coefficients and the actual coefficients.This means that the coefficients will befound in the arrays.I filtername_numand.I filtername_denand the size of those arrays will be specified by.I filtername_nsizand.I filtername_dsiz,respectively.The default name in this case is.I filter..IPIf the coefficients are being read from a FEAFILT file, then.I filternameis the number of the filter record to use.The default name in this case is 1, the first record in the file..br.TP.BI \-F " filt_file"Read the coefficients from the FEAFILT file.I filt_filerather than from the parameter file.In this case the header of .I filt_fileis added to the header of the program output as a source file..br.TP.BI \-x " debug_level"A value of zero (the default value) will cause.I filterto do its work silently, unless there is an error.A nonzero value will cause various parameters to be printed outduring program initialization..br.TP.BI \-i " up/down"Perform interpolation filtering such that the output sampling rate isequal to .I (src_sf)*(up/down).Both .I upand.I downare integers.Effectively, the program increases the sampling rate to.I up*(src_sf),filters this signal with the specified filter, and then downsamples theresulting signal by a factor of.I down..TP.BI \-zBy specifying \fB\-z\fP,the \fIstart_time\fP generic value is reduced by the value of the\fIdelay_samples\fP generic header value, if it exists. This often helps time align a filteredsignal with the input signal. Note thatif \fIdelay_samples\fP is not defined in the input file header,a value of 0 is assumed..sp.SH ESPS PARAMETERS.PPThe values of parameters obtained from the parameter file are printedif the environment variable ESPS_VERBOSE is 3 or greater. The defaultvalue is 3..PPThe following parameters are read from the parameter file:.IP.I "start \- integer".IPThe first point in the input sampled data file that is processed.The samples are assumed to be numbered starting with one so thatsetting .I "start = 1"will cause processing to begin with the first sample..sp.I "nan \- integer".IPThe number of points in the sampled data file to process..sp.I "filtername_nsiz \- integer".IPThe number of numerator coefficients in the transfer function for the filter.I filtername..sp.I "filtername_dsiz \- integer".IPThe number of denominator coefficients in the transfer function for the filter.I filtername.A value of zero means that a denominator coefficient array need not beentered..sp.I "filtername_num \- float array".IPThe numerator coefficients. They are specified in order starting witha\d0\u..sp.I "filtername_den \- float array".IPThe denominator coefficients. They are specified in order starting withb\d0\u..sp.SH ESPS COMMONIf the inputis standard input, COMMON is not read. The following items may be read from COMMON:.IP.I "filename \- string".IPThis is the name of the input file. If the command line specifies only one filename, it is assumed to be the output filename and COMMON is read to get the input filename. If the input filename is specified on thecommand line, it must match \fIfilename\fR in COMMON or the otheritems (below) are not read..IP.I "start \- integer".IPThis is the starting point in the input file..IP.I "nan \- integer".IPThis is the number of points to process. .PPIf the output is standard output,COMMON is not written.Otherwise the following items are written to COMMON..IP.I "filename \- string".IPThis is the name of the output file..IP.I "start \- integer".IPThis is the starting point in the output fileand is always equal to one..IP.I "nan \- integer".IPThis is the number of points in the output file..PPESPS Common processing may be disabled by setting the environment variableUSE_ESPS_COMMON to "off". The default ESPS Common file is .espscom in the user's home directory. This may be overidden by settingthe environment variable ESPSCOM to the desired path. User feedback ofCommon processing is determined by the environment variable ESPS_VERBOSE,with 0 causing no feedback and increasing levels causing increasinglydetailed feedback. If ESPS_VERBOSE is not defined, a default value of 3 isassumed..sp.SH ESPS HEADERThe file header of.I out_filewill contain mostly the same information as is contained in that of.I in_file,except where they are altered by the parameters in the parameter file.The -i option changes the.I record_freqheader item.The filter coefficients will be stored in the output header as the.I filterzfunc..PPA generic header item \fIstart_time\fR (type DOUBLE), is addedto the output file header. It contains the starting time in seconds of thefirst point in the output file. This start time is relative to the originalsampled data file. This means that if the input file has a \fIstart_time\fRgeneric in it, the output file's \fIstart_time\fR value is computedrelative to the input file's \fIstart_time\fR. Also see the \fB\-z\fPoption..PPFor example, if the input file has a \fIstart_time\fR = 1.0 seconds,the input file's sampling frequency = 8000 samples/second, and the starting point in the input file = 2000, the output file's \fIstart_time\fR = 1.0 + 2000/8000 = 1.25 seconds. .SH SEE ALSO.PP.nf\fIfilter2\fP(1\-ESPS), \fInotch_filt\fP(1\-ESPS), \fIFEAFILT\fP(5\-ESPS), \fIatofilt\fP(1\-ESPS), \fIwmse_filt\fP(1\-ESPS), \fIiir_filt\fP(1\-ESPS), \fIblock_filter2\fP(3-\ESPS).fi.SH BUGS.PPDue to the direct form implementation of the IIR filter, this program isnumerically unstable and will not be supported in the next release.This program will be replaced by \fIfilter2\fR(1-ESPS). .SH AUTHOR.PPBrian Sublett; ESPS 3.0 modifications by David Burton..lpFEA_SD modifications by David Burton; multichannel and complex FEA_SD modifications by Bill Byrne.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?