Matlab code and filterDesigner give different plots for the same setting of Chebyshev II bandpass filter?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello,
The image below shows the settings in the filterDesigner by using Chebyshev type II bandpass filter and the plots.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/385758/image.png)
The image below shows my hand code in MATLAB using the same settings for Chebyshev II bandpass filter.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/385763/image.png)
The plots are below and look different from the one in filterDesigner window:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/385768/image.png)
Are there something wrong in my hand code of the MATLAB?
댓글 수: 0
채택된 답변
Star Strider
2020년 10월 19일
I suspect that filterDesigner uses the second-order-section implementation of the filter.
You should, as well.
Change:
[b,a] = cheby2( ... );
to
[z,p,k] = cheby2( ... );
[sos,g] = zp2sos(z,p,k);
figure
freqz(sos, 2^16, Fs)
(where ‘Fs’ is the sampling frequency) and your filter Bode plot using freqz will likely approximate the filterDesigner implementation.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Filter Design에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!