-
Notifications
You must be signed in to change notification settings - Fork 12
/
iir_designer_usage_examples.txt
60 lines (53 loc) · 1.55 KB
/
iir_designer_usage_examples.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
%///////////////////////////////////////////////////////////////
% Example 1
% 2nd order DC blocker, 20 Hz, sampling frequency = 44.1kHz
% Plots the filter response and sample signals
%///////////////////////////////////////////////////////////////
pkg load signal
order=2
f1=20
fs=44100
plot_results=true
design_iir_highpass_cmsis_butter(order,f1,fs,plot_results);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%///////////////////////////////////////////////////////////////
% Example 2
% Elliptical bandpass between 150 and 600 Hz, 1dB ripple, 60dB
% stopband attenuation
%///////////////////////////////////////////////////////////////
pkg load signal
order=4
ripple=1
att=60
f1=150
f2=600
fs=16000
plot_results=false
design_iir_bandpass_cmsis_elliptical(order,ripple,att,f1,f2,fs,plot_results);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%///////////////////////////////////////////////////////////////
% Example 3
& Same as frequencies sd example 2, but designed as Butterworth
% filter
%///////////////////////////////////////////////////////////////
pkg load signal
order=4
f1=150
f2=600
fs=16000
plot_results=false
design_iir_bandpass_cmsis_butter(order,f1,f2,fs,plot_results);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%///////////////////////////////////////////////////////////////
% Example 4
% 50 Hz notch filter,
% bandstop between 47 and 53 Hz, sampling frequency = 1kHz
%///////////////////////////////////////////////////////////////
pkg load signal
order=4
f1=47
f2=53
fs=1000
plot_results=true
design_iir_bandstop_cmsis_butter(order,f1,f2,fs,plot_results);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%