Thanks. Here is an experiment and more detailed comments in the code.
# Test script to design an analog highpass elliptic filter with 8 poles and a cutoff
# frequency of 4000 Hz. Various pressing questions arise:
# 1. What is the scaling of parameters for cutoff frequencies?
# 2. Why does an analog filter need a sampling frequency at all?
# 3. Why does the freqs function need a sampling frequency at all? I can
# understand this for freqz, but 's'?
using DSP
using Plots
fs=4*5000e6 #Hz
# 4 GHz cutoff and a 20 GHz sampling freqency! Why 'fs" at all?
# Should there be a HighpassAnalog function?
responsetype = Highpass(4000e6; fs=fs)
# This at least is okay
designmethod = Elliptic(8, 1.0, 40.0)
# We want ANALOG, not digital
fil=analogfilter(responsetype, designmethod)
# Lets try to plot the response
rng=range(100e6, stop=4200e6, length=500)
resp=freqs(fil, rng, fs)
# The x-axis is in GHz
plot(collect(rng)/1e9, 20*log10.((abs.(resp))))
This gives the following plot
while if I scale the x-axis as
# The x-axis is in GHz scaled by π
plot(collect(rng)/1e9 * π, 20*log10.((abs.(resp))))
I get (voila!)
which does not make sense at all. However, there is clearly some factor of π missing in the DSP documentation as the cutoff is right where I want it to be in the plot. However I have no idea yet whether the filter is designed correctly.
I think the whole analogfilter design is broken. Please see the comments at the top of the code.