Giter Club home page Giter Club logo

Comments (6)

chipmuenk avatar chipmuenk commented on June 21, 2024

Thanx for filing the issue, this is a regression that came with one the last major reworks. For the moment, try switching between minimum and manual order to enter corner frequencies.

from pyfda.

josef-dunbar avatar josef-dunbar commented on June 21, 2024

Thank you for responding so quickly. I tried your solution and still do not see the F_PB and F_SB values having an affect on the filter. They also do not seem to be updating the "Show Specs" plot either. I am able to coerce your program to use alternate values of F_C by changing the default value in the fil[0] dictionary so I'm thinking it may just be an issue with updating the values in this structure. I'm really interested in getting this working, trying to wean a colleague off matlab, and this looks like the best tool out there for our work flow. I'll keep looking around to see if I can figure it out- though any direction is always appreciated.

from pyfda.

chipmuenk avatar chipmuenk commented on June 21, 2024

Thank you for your patience and your encouraging words - I'm very interested in feedback (and in getting colleagues to try python ;-) ! Currently, I'm finishing several fixes for the input widgets in a separate branch that I'm going to merge over the weekend. I'll try fix the bugs concerning the frequency specs then as well. The major suspects are the input_target_specs widgets, the calculation of design frequency specs from the target specs in the filter design routines and the spaghetti code of signals and slots that I'm currently untangling. Hopefully, things look better on Monday!

from pyfda.

chipmuenk avatar chipmuenk commented on June 21, 2024

Should be fixed in latest (pre-)release - please give it a try. Further feedback is most welcome!

from pyfda.

josef-dunbar avatar josef-dunbar commented on June 21, 2024

Looks great! Thank you for the update. I'm noticing some issues with numerical precision with tight filter constraints due to the use of the transfer function polynomial in the calculation of Group Delay and Frequency Response. I was able to get the Group Delay to behave better using ZPK in the calculation (code below). It seems that the Frequency Response can be tamed by using the coefficients from an analog filter though these coefficients then must be transformed for the phase and group delay plots.... If you're interested it might be worth wile to hold both the analog and digital filter coefficients in the dictionary.

'''
add to pyfda/plot_widgets/plot_tau_g.py (line 82) 
remove/comment out currently defined w and tau_g variables
'''
        zz = fb.fil[0]['zpk'][0]
        pp = fb.fil[0]['zpk'][1]

        G = np.zeros(rc.params['N_FFT'])
        w = np.arange(0,1, 1/rc.params['N_FFT']) * np.pi
        for i in range(zz.shape[0]):
            rz = np.abs(zz[i])
            az = np.angle(zz[i])
            G += (-rz*np.cos(w-az) + rz**2) / (rz**2 - 2*rz*np.cos(w-az) + 1)
        for i in range(pp.shape[0]):
            rp = np.abs(pp[i])
            ap = np.angle(pp[i])
            G -= (-rp*np.cos(w-ap) + rp**2) / (rp**2 - 2*rp*np.cos(w-ap) + 1)
        tau_g = G

from pyfda.

chipmuenk avatar chipmuenk commented on June 21, 2024

Thank you for the input - could you be so kind to file this as separate issue? And could you give an example which filter design method you mean? I've noticed precision issues as well when the magnitude response is less than ~ -250 dB .
I'll look at the difference between the algorithm in pyfda_lib.group_delay (where we should implement any changes) and yours. And I'd also like to try endolith's enhancements in scipy 0.16.

from pyfda.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.