Biomedical Engineering Reference
In-Depth Information
FIGURE 5-59
Band-pass filter
response to white
noise.
where N is the number of elements in the averaging process, and h is the number of points
in the sequence.
5.5.6 Filter Time-Domain Response
The time-domain response of both analog and digital filters is obtained by exciting the
filter with the signal of choice and monitoring the output waveform. Common methods
of stimulating filters include white noise, impulses, steps, and ramps. All of these inputs
are easily generated in MATLAB, as is the filter. Figure 5-59 shows the response of a
Butterworth band-pass filter to white noise, as generated by the following code:
% Band-pass filter
% bandpass2.m
fs = 200e+03; % sample frequency (Hz)
ts = 1/fs; % sample interval (s)
fmat = 25.0e+03; % center frequency of filter (Hz)
bmat = 10.0e+03; % bandwidth of filter (Hz)
wl=2*ts*(fmat-bmat/2); % lower band limit
wh=2*ts*(fmat+bmat/2); % upper band limit
wn=[wl,wh];
[b,a]=butter(3,wn); % 6th order Butterworth band-pass filter
sig = randn(1,100); % normally distributed white noise
sig fil = filter(b,a,sig); % time domain implementation of the filter
subplot(211),plot(sig),ylabel('Signal (V)');
subplot(212),plot(sig fil),ylabel('Filtered Signal (V)'), xlabel('Sample (N)')
Search WWH ::




Custom Search