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

zpk2tf, tf2zpk representation #191

Open
meiyasan opened this issue Sep 25, 2023 · 4 comments
Open

zpk2tf, tf2zpk representation #191

meiyasan opened this issue Sep 25, 2023 · 4 comments

Comments

@meiyasan
Copy link

Hello,

I would be interested in using tf representation for a filter that I designed.

Is there any existing interface to turn tf coefficients into zpk representation and opposite ?

It seems I am not the only one in need. #148

I have found a zpk2tf method but it is marked as internal. This tf2zpk would be great feature to implement.
Could you advice on this ? @dancazarin

Thank you

@dancazarin
Copy link
Member

Hello,

If an external solution is appropriate, python's scipy.signal.tf2zpk is compatible by all means with KFR and can be used to transform from tf to zpk representation. Or do you need a builtin function to do this at runtime?

Internal functions are absolutely ok for using in your code but may be changed/removed in future versions without any prior notice (not part of stable API).

@meiyasan
Copy link
Author

meiyasan commented Sep 28, 2023

Right, indeed I need builtin. I am using C++ language in my programs.
I have just implemented SOS, ZPK and TF conversion today. (but using GSL for solving polynomials)
I can prepare a PR if you want to implement it.

@dancazarin
Copy link
Member

GSL is GPL-licensed and not compatible with a dual-licensed KFR. You can perfectly use GSL together with the KFR in your GPL-licensed project but pull request cannot be merged if the changes contains or depends on GPL-only code because of our commercial clients. All code that is contained in KFR repository must be allowed to be used/linked with closed-source proprietary software.

@meiyasan
Copy link
Author

meiyasan commented Oct 4, 2023

yes I definitely don't know whether kfr is able to solve polynomials, but this was the main limitation in my case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants