반응형
250x250
Notice
Recent Posts
Recent Comments
Link
«   2026/01   »
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Archives
Today
Total
관리 메뉴

폴크(FOLC)

치수 계산하기 - smooth filtering 7 본문

카테고리 없음

치수 계산하기 - smooth filtering 7

folcjin 2025. 6. 28. 10:34
728x90
반응형

Elliptic 필터(= Cauer filter)는 가장 급격한 주파수 전이 특성을 가지는 IIR 필터입니다. 동일한 필터 스펙(통과대역, 저지대역, ripple, 차단 감쇠)을 만족시키는 필터 중 **가장 낮은 차수(order)**로 구현 가능

- 실시간 DSP, 고정밀 신호 처리, 자원 제약 환경 등에 매우 유리합니다.

 

Elliptic Filter란?

  • 통과대역과 저지대역 모두에 ripple이 존재.
  • **Elliptic 함수 (Jacobian elliptic function)**을 이용해 설계.
  • Butterworth, Chebyshev보다 더 적은 차수로 동일 성능 구현 가능.

설계 파라미터

요소설명
Order (차수) 필터의 sharpness 및 정확도 결정
Passband ripple (rpr_p) 통과대역에서 허용되는 최대 리플 (dB)
Stopband attenuation (rsr_s) 저지대역에서 요구되는 최소 감쇠량 (dB)
Cutoff freq 컷오프 주파수
Sampling rate 디지털 필터이므로 필수
 

 

주파수 응답 형태

  • Rn : nth-order elliptic rational function (특수함수)
  • 통과대역/저지대역 모두에서 잔류 리플 존재
  • 가장 빠른 roll-off 제공

 

예제

#include <vector>

class EllipticIIR {
public:
    EllipticIIR(const double* b, const double* a, int order)
        : b(b), a(a), order(order) {
        w.assign(order, 0.0);
    }

    double process(double x) {
        double y = b[0] * x + w[0];
        for (int i = 1; i < order; ++i) {
            w[i - 1] = b[i] * x + w[i] - a[i] * y;
        }
        w[order - 1] = -a[order] * y;
        return y;
    }

private:
    const double* b;
    const double* a;
    int order;
    std::vector<double> w;
};

#include <iostream>

const double b_ellip[5] = {
    0.01967436, -0.01713698, 0.0332899, -0.01713698, 0.01967436
};
const double a_ellip[5] = {
    1.0, -3.03300954, 3.81179517, -2.29109673, 0.55535694
};

int main() {
    EllipticIIR filter(b_ellip, a_ellip, 5); // 4차 → 계수 5개

    for (int i = 0; i < 50; ++i) {
        double input = (i % 2 == 0) ? 1.0 : -1.0;  // 고주파 성분 포함 신호
        double output = filter.process(input);
        std::cout << "input: " << input << "\toutput: " << output << std::endl;
    }

    return 0;
}

728x90
반응형
사업자 정보 표시
사업자 등록번호 : -- | TEL : --