This is obviously not a high pass response. Can I get some guidance on what I am doing wrong? I am able to get the equivalent Matlab design working, so I know the design is feasible. My conclusion is that I have not understood the documentation.

using DSP
fs=4*5000e6 # what unit? Hz or rad/sec or cycles/sec
# 4000e6 what unit? Hz or rad/sec or cycles/sec
responsetype = Highpass(4000e6; fs=fs)
designmethod = Elliptic(8, 1.0, 40.0)
fil=analogfilter(responsetype, designmethod)
# what unit? Hz or rad/sec or cycles/sec
rng=range(3100e6, stop=4200e6, length=500)
resp=freqs(fil, rng, fs)
using Plots
plot(collect(rng)/1e9, (abs.(resp)))

If you plot a larger range youâ€™ll see an HPF response â€“ I plotted from 100 MHz to 5 GHz. Still, the cutoff frequency seems to be wrong (around 1.2 GHz), and the passband ripple seems a little high.

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))))

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.

sure you do.
you asked for 40dB stop band ripple and got 40dB stop band ripple.
you asked for 1dB passband ripple, and that looks about like what you got.
the frequency cutoff looks like a radian/hertz problem, but after you accound for that itâ€™s in the right place.

That seems like too strong a statement. The /pi problem definitely seems buggish, and is almost certainly due to radian/hertz confusion, but otherwise it designed an elliptic filter for you and it looks like it met the design parameters.

I also think the demand for a sampling frequency for a continuous time filter is an interface design issue. Moreover, why should freqs also require an fs parameter for an analog filter?

You are correct that a filter is being designed, and it is elliptical. I wonder if its a problem with the documentation and I just donâ€™t fathom what the parameters mean.

I have to admit â€śhalf-cycles/sampleâ€ť is not particularly clear, and of course has absolutely no meaning for a continuous time filter.

Iâ€™m not even exactly sure what it means in the context of a digital filter.

A good question, why indeed.

Generally speaking the DSP library is very, very good. I did industrial strength work with it a while back and every time i thought i found a problem, the problem was me. lol.