-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdemoLPandBP.jl
47 lines (38 loc) · 1.25 KB
/
demoLPandBP.jl
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
#Lowpass and Bandpass Demonstration Script
include("dsexample1_fn.jl")
#Reminder: nlev=M+1
function wait_for_user(dsm)
println("\nSimulation complete for modulator:\n\t$dsm")
println("\n*** Press ENTER to continue ***")
readline(stdin)
end
#2nd-order lowpass
dsm = RealDSM(order=2, OSR=16, M=8, Hinf=2.0, opt=0)
dsexample1(dsm, LiveDemo=true)
wait_for_user(dsm)
#5th-order lowpass
dsm = RealDSM(order=5, OSR=16, M=8, Hinf=2.0, opt=0)
dsexample1(dsm, LiveDemo=true)
wait_for_user(dsm)
#5th-order lowpass with optimized zeros
dsm = RealDSM(order=5, OSR=16, M=8, Hinf=2.0, opt=1)
dsexample1(dsm, LiveDemo=true)
wait_for_user(dsm)
#5th-order lowpass with optimized zeros and larger Hinf
dsm = RealDSM(order=5, OSR=16, M=8, Hinf=3.0, opt=1)
dsexample1(dsm, LiveDemo=true)
wait_for_user(dsm)
#7th-order lowpass; Hinf=2
dsm = RealDSM(order=7, OSR=8, M=16, Hinf=2.0, opt=1)
dsexample1(dsm, ampdB=-6.0, LiveDemo=true)
wait_for_user(dsm)
#7th-order lowpass; Hinf=8
dsm = RealDSM(order=7, OSR=8, M=16, Hinf=8.0, opt=1)
dsexample1(dsm, ampdB=-6.0, LiveDemo=true)
wait_for_user(dsm)
#6th-order bandpass
f0 = 1/6 #Normalized center frequency
dsm = RealDSM(order=6, OSR=16, M=8, f0=f0, Hinf=2.0, opt=1)
dsexample1(dsm, ampdB=-6.0, LiveDemo=true)
wait_for_user(dsm)
:END_OF_DEMO