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

kontrol.regulator.feedback.mode_decomposition() doesn't work well with relative order higher than two #36

Open
terrencetec opened this issue Jan 20, 2022 · 0 comments

Comments

@terrencetec
Copy link
Owner

terrencetec commented Jan 20, 2022

It gives negative gain and gain peak because of the phase.
It messes up kontrol.regulator.post_filter.notch() when it trys to compare peak gain and the static gain

gain_peak = q*k # magnitude at the resonance
# Choose modes that have peak higher than the DC gain.
gain_mask = gain_peak > k
fn = fn[gain_mask]
q = q[gain_mask]
k = k[gain_mask]
gain_peak = gain_peak[gain_mask]

As a temporary solution, I changed

    gain_mask = gain_peak > k

to

    gain_mask = abs(gain_peak) > abs(k)
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

1 participant