Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential error in cauer band(pass|stop) center frequency calculation #716

Open
jcolafrancesco opened this issue May 10, 2024 · 1 comment
Labels

Comments

@jcolafrancesco
Copy link
Contributor

Context:

  1. For bandpass and bandstop filters, the qucsfilter interface is taking as input low and high corner frequencies
  2. The qf_cauer filter is, on its end, taking as input an alternative representation: bandwidth and center frequency.
  3. In the code, the conversion is done this way: https://github.com/ra3xdh/qucs_s/blob/f9b3441de7d42151d9c004cb7f5de466d5422183/qucs-filter/qucsfilter.cpp#L426C1-L426C73

Issue:
Basically, the center frequency is computed as the arithmetic mean between the two corner frequencies, although I really though we shall use the geometric mean here.

Looking at the transfer function of a generated filter, we can see a slight shift in frequency (1GHz to 2GHz band-pass):

Screenshot from 2024-05-10 11-55-06

With a small patch implementing a geometric mean, I obtain the following results:

Screenshot from 2024-05-10 11-54-16

This looks much more satisfying.

I'll prepare a pull request, but in the meantime, I'd be happy to have some confirmation by an RF expert.

@tomhajjar
Copy link

tomhajjar commented May 10, 2024

It's always best if a tool uses the same definition for variables for all choices.

As I stated before about this tool, in real life, you can't buy components with the values calculated by the tool. Also component "Q" and package parasitics isn't taken into account so the analysis will be flawed. The higher the frequency and narrower the bandwidth, the more the measured results will deviate.

The only way to have accurate simulations is to measure every component on a LCR meter capable of measuring at the actual filter frequency. Components must be measured using a jig replicating the PCB or circuit parasitics. Measured component data is then used to update the schematic. Manufacturers data is always suspect.

Attached is a filter I designed decades ago for an Intelsat satellite receiver. 70MHz BPF with amplitude and group delay equalization.

Intelsat 70MHz BPF

@ra3xdh ra3xdh added the filter label May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants