파일:Filters order5.svg

testwiki
둘러보기로 이동 검색으로 이동
    원본 파일 (SVG 파일, 실제 크기 702 × 648 픽셀, 파일 크기: 2 KB)

    이 파일은 위키미디어 공용에 있으며, 다른 프로젝트에서 사용하고 있을 가능성이 있습니다. 해당 파일에 대한 설명이 아래에 나와 있습니다.

    파일 설명

    설명
    English: Frequency response curves of four linear analog filters: Butterworth filter, Chebyshev filter of type 1 and 2 and Elliptic filter, each one as 5th order filter.
    Português: Curvas de resposta em frequência de quatro filtros lineares analógicos: Butterworth, Chebyshev tipos 1 e 2 e elíptico, todos de quinta ordem.
    Русский: Сравнение амплитудно-частотных характеристик фильтров 5-го порядка: Баттерворта, Чебышёва 1-го и 2-го типов и эллиптического.
    날짜
    출처 자작
    저자 Geek3
    다른 버전
    SVG 발전
    InfoField
     이 SVG 파일의 소스 코드 문법이 올바릅니다.
     이 벡터 그림은 Matplotlib(으)로 제작되었습니다.
      이 SVG 파일은 내장된 문자열을 사용하고 있으며 문서 편집기를 사용해서 쉽게 번역할 수 있습니다.
    소스 코드
    InfoField
    Python Matplotlib source code
    #!/usr/bin/python
    # -*- coding: utf8 -*-
    
    import numpy as np
    import scipy.signal as sig
    import matplotlib as mpl
    import matplotlib.pyplot as plt
    from math import *
    
    N = 5 # order of the filters
    band = 1.0 # cut-off normalized frequency
    Rpass = 1.0 # ripple in the pass-band (dB)
    Rstop = 20 # ripple in the stop-band (dB)
    frange = np.linspace(0, 2, 2001)
    color = 'r'
    fname = 'filters_order5.svg'
    
    mpl.rcParams['axes.grid'] = True
    plt.figure(figsize=(6, 5.4))
    
    (num, den) = sig.butter(N, band, analog=True)
    filterfy = sig.freqs(num, den, frange)
    plt.subplot(221)
    plt.title('Butterworth')
    plt.plot(filterfy[0], np.abs(filterfy[1]), lw=3, color=color)
    
    (num, den) = sig.cheby1(N, 1, band, analog=True)
    filterfy = sig.freqs(num, den, frange)
    plt.subplot(222)
    plt.title('Chebyshev type 1')
    plt.plot(filterfy[0], np.abs(filterfy[1]), lw=3, color=color)
    
    (num, den) = sig.cheby2(N, Rstop, band, analog=True)
    filterfy = sig.freqs(num, den, frange)
    plt.subplot(223)
    plt.title('Chebyshev type 2')
    plt.plot(filterfy[0], np.abs(filterfy[1]), lw=3, color=color)
    
    (num, den) = sig.ellip(N, Rpass, Rstop, band, analog=True)
    filterfy = sig.freqs(num, den, frange)
    plt.subplot(224)
    plt.title('Elliptic')
    plt.plot(filterfy[0], np.abs(filterfy[1]), lw=3, color=color)
    
    for ax in plt.gcf().get_axes():
        ax.set_xlim(*frange[[0,-1]])
        ax.set_ylim(0, 1.1)
        ax.set_xlabel('f/f$_0$')
        ax.xaxis.set_label_coords(0.65, -0.1)
        ax.set_ylabel('G', rotation=0)
        ax.yaxis.set_label_coords(-0.05, 1.0)
    
    plt.tight_layout(pad=1, w_pad=2, h_pad=2)
    plt.savefig(fname)
    
    def postprocess(fname):
        from lxml import etree
        with open(fname, 'r') as svgfile:
            tree = etree.parse(svgfile, etree.XMLParser(remove_blank_text=True))
        svg = tree.getroot()
        nsmap = '{' + svg.nsmap[None] + '}'
    
        # move all definitions to the front
        svg[:] = sorted(svg, key=lambda el: {False:0, True:1}[el.tag!=nsmap+'defs'])
        with open(fname, 'w') as svgfile:
            tree.write(svgfile,
                xml_declaration=True, pretty_print=True, encoding='utf-8')
    
    postprocess(fname)
    

    라이선스

    나는 아래 작품의 저작권자로서, 이 저작물을 다음과 같은 라이선스로 배포합니다:
    w:ko:크리에이티브 커먼즈
    저작자표시
    이 파일은 크리에이티브 커먼즈 저작자표시 4.0 국제 라이선스로 배포됩니다.
    이용자는 다음의 권리를 갖습니다:
    • 공유 및 이용 – 저작물의 복제, 배포, 전시, 공연 및 공중송신
    • 개작 – 저작물의 개작, 수정, 2차적저작물 창작
    다음과 같은 조건을 따라야 합니다:
    • 저작자표시 – 적절한 저작자 표시를 제공하고, 라이선스에 대한 링크를 제공하고, 변경사항이 있는지를 표시해야 합니다. 당신은 합리적인 방식으로 표시할 수 있지만, 어떤 방식으로든 사용권 허가자가 당신 또는 당신의 사용을 지지하는 방식으로 표시할 수 없습니다.

    설명

    이 파일이 나타내는 바에 대한 한 줄 설명을 추가합니다

    2,437 바이트

    image/svg+xml

    a6d7048868378774c920598bea178acacc34dff4

    파일 역사

    날짜/시간 링크를 클릭하면 해당 시간의 파일을 볼 수 있습니다.

    날짜/시간섬네일크기사용자설명
    현재2023년 10월 8일 (일) 22:572023년 10월 8일 (일) 22:57 판의 섬네일702 × 648 (2 KB)wikimediacommons>Hugo SpinelliChanged path to text. Now using Liberation Serif. Centered the label on the horizontal axis.

    이 파일을 사용하는 문서가 없습니다.