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

Implement the prewrapping in the butterworth filter #841

Merged
merged 2 commits into from
Apr 29, 2024

Conversation

GiulioRomualdi
Copy link
Member

This pull request introduces the prewrapping technique, enhancing the frequency response consistency of filters across continuous and discrete domains. By implementing this technique, we ensure uniform performance across different signal representations.

filter

The above plot demonstrates the application of the prewrapping technique, resulting in an improvement in the step response of the filter.

Additionally, this PR addresses an issue related to the setInput() method, particularly its compatibility with fixed-size Eigen::Vectors.

Important

By implementing the prewrapping technique, the Butterworth filter now produces results identical to those obtained using MATLAB with the following command:

[z_d,p_d,k_d] = butter(order, cutoff_frequency / (sampling_frequency / 2));

This equivalence holds when the same order, cutoff_frequency, and sampling_frequency parameters are used.

- Implement the prewrapping
- Remove an implementation of setInput() method
@GiulioRomualdi GiulioRomualdi enabled auto-merge (squash) April 29, 2024 12:43
@GiulioRomualdi GiulioRomualdi merged commit 783b8ae into master Apr 29, 2024
12 checks passed
@GiulioRomualdi GiulioRomualdi deleted the butterworth_prewrapping branch April 29, 2024 12:56
@GiulioRomualdi GiulioRomualdi changed the title Implment the prewrapping in the butterworth filter Implement the prewrapping in the butterworth filter Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants