Filtering Test Data

Arguments

Following are the arguments that can be used in your durfilter statement.
 
Argument:
Description:
inputfile
Specifies the name of the RPC III Format or DAC Format file to process, or the prefix (job name) of a group of DAC files to process.
-b f1 f2
Specifies a band-pass filter. It takes two frequency values, f1 and f2, which are specified in Hertz. Only frequencies between f1 and f2 are passed using this filter option. Range: 0 < f1 < f2 <= Nyquist, where Nyquist is half the sampling frequency of the data.
-c channels
Specifies the channels in an RPC III file to filter, or a group of DAC files to filter. It takes one or more integer values separated by commas (,) or a colon (:). These integer values represent specific channel IDs or a range of channel IDs to process. This option is used in combination with the inputfile argument to specify a set of DAC files to filter.
-d factor
Specifies the decimation factor to be applied to the test data. It takes one integer value as the decimation factor. Decimation reduces the sampled rate of the data by this factor. For example, a factor of 2 halves the number of data points. A factor of 1 results in no change in the sample rate and this is the default.
Range: factor > 0
-h freq
Specifies a high-pass filter. It takes one frequency value, freq, specified in Hertz. Only frequencies above this cutoff frequency are passed.
Range:
0 < freq <= Nyquist, where Nyquist is half the sampling frequency of the data.
-l freq
Specifies a low-pass filter. It takes one frequency value, freq, specified in Hertz. Only frequencies below this cutoff frequency are passed.
Range:
0 < freq <= Nyquist, where Nyquist is half the sampling frequency of the data.
-n order
Specifies the order of the filter to apply. It takes one integer value as the filter order.
Default: order = 6. Range: order > 0.
-o outputfile
Specifies the file name for storing the filtered and/or decimated data. A default output file name composed of inputfile and the filtered/decimated specification will be given if you do not specify this option.
-s f1 f2
Specifies a band-stop filter. It takes two frequency values, f1 and f2, which are specified in Hertz. Only frequencies before f1 and beyond f2 are passed using this filter option.
Range: 0 < f1 < f2 <= Nyquist, where Nyquist is half the sampling frequency of the data.

Channel Selection

Typically, a group of DAC Format files acquired from one experiment or test are named with a common prefix representing the job name and a two- or three-digit suffix representing the channel ID before the extension (.dac). To apply the same filter to all or a set of DAC files from the same test, you specify the prefix or job name only in the inputfile argument and the channel IDs or range of channel IDs using the -c channels option. These arguments will then be used to compose the input file names for durfilter to process as <inputfile><channel_ID>.dac where channel_ID is one of the channel IDs specified.
For RPC III data, only the channels specified in the -c option will be filtered and written out if they exist.

Data Decimation

Decimation or downsampling can be an effective way of saving disk space or reducing the amount of data that Adams Solver needs to interpolate if the given set of data has been oversampled. It can also result in aliasing, however, a form of corruption in digital data. To ensure that aliasing does not occur, the maximum frequency in the data should be less than half the decimated data sample rate.
Decimation is performed after filtering (if both are specified) to ensure more effective downsampling of the test data.

Data Filtering

You can only specify one filter option in the durfilter argument list. The transfer function coefficient form of the MATLAB Butter function is used in each filter option. Also, a forward and backward pass is always performed to ensure no phase shift is introduced in the data.
For example, to perform a 6th-order high pass Butterworth filter with a cutoff frequency of 13 Hz and zero-phase shift on data sampled at 200 Hz, the following MATLAB syntax (or its equivalent) is used:
[b,a] = butter(6, 13/100, ‘high’);
y = filtfilt(b, a, x);
where:
b is the vector of numerator filter design coefficients and a is the vector of denominator coefficients of the transfer function.
x is the vector of test data
y is the vector of filtered data
6 is the specified filter order
13 is the specified cutoff frequency
100 is the computed Nyquist frequency (1/2 sampled rate)
In the transfer function coefficient form of the Butterworth filter, numerical problems can arise for filter orders as low as 4 due to round off errors or as high as 15. See http://www.mathworks.com/help/signal/ref/butter.html?s_tid=gn_loc_drop for more information. Filter orders between 6 and 8 should be sufficient for most applications.

Default Naming Convention of Filtered Files

If you do not specify the -o outputfile option, durfilter creates output file(s) of the filtered data with names composed of the inputfile prefix and filter specifications as follows.
For high or low pass filters:
<inputfile><h|l><order>_<freq>_<d><factor>_<channel_id>.dac
For band pass or stop filters:
<inputfile><b|s><order>_<f1>_<f2>_<d><factor>_<channel_id>.dac
For RPC III Format data, the _<channel_id> is left off the default output file name and the extension is .rsp.

Examples

Here are three examples of how to use durfilter.

Example 1

durfilter /disk/test/block.rpc –b 1 60 –n 8
All frequencies between 1 and 60 Hz are passed with an 8th-order filter on the data of each channel found in the RPC III file /disk/test/block.rpc. Because no outputfile specification is provided, the filtered data will be stored in file /disk/test/block_b8_1_60.rpc.

Example 2

durfilter rawdata –c 7:12 –l 120 –d2 –o filterdata
A 6th-order low-pass filter is performed on the input DAC files in column 1 of the table shown below. The filtered data is decimated by a factor of 2 and stored in the DAC files in column two of this table.
Input filename:
Output filename:
rawdata07.dac
filterdata07.dac
rawdata08.dac
filterdata08.dac
rawdata09.dac
filterdata09.dac
rawdata10.dac
filterdata10.dac
rawdata11.dac
filterdata11.dac
rawdata12.dac
filterdata12.dac

Example 3

durfilter beltest_ –c 101,102,103,201,202,203 –h 10 –n 8
An eighth-order high-pass filter is performed on the input DAC files in column one of the table shown below. Because no outputfile specification is provided, the filtered data is stored in DAC files with names composed of the given filter specifications as shown in column two of this table.
Input filename:
Output filename:
beltest_101.dac
beltest_h8_10_101.dac
beltest_102.dac
beltest_h8_10_102.dac
beltest_103.dac
beltest_h8_10_103.dac
beltest_201.dac
beltest_h8_10_201.dac
beltest_202.dac
beltest_h8_10_202.dac
beltest_203.dac
beltest_h8_10_203.dac

Filtering Test Data (Durfilter)

You use the durfilter tool of the Adams Durability toolkit to filtering test data stored in RPC III files or in one or more DAC files. The durfilter tool is only accessible from the durtk selection code in the Adams Program Menu. We recommend you filter your experimental data to remove unwanted frequencies before input to Adams Solver. durfilter uses the transfer coefficient function form of the Butterworth digital filter from MATLAB. Four filter options are available:
band-pass
high-pass
low-pass
band-stop (or notch)
A two-pass filter operation is performed to ensure zero-phase shift of the test data. Decimation of the test data is also available in durfilter.

Format

Following is the format of the filtering command using durfilter:
durfilter inputfile
[ -b f1 f2 | -h freq | -l freq | -s f1 f2 ]
[ -c channels ]
[ -d factor ]
[ -n order ]
[ -o outputfile ]