df2#
- class diffsptk.SecondOrderDigitalFilter(sample_rate, pole_frequency=None, pole_bandwidth=None, zero_frequency=None, zero_bandwidth=None, **kwargs)[source]#
- See this page for details. - Parameters:
- sample_rateint >= 1 [scalar]
- Sample rate in Hz. 
- pole_frequencyfloat > 0 [scalar]
- Pole frequency in Hz. 
- pole_bandwidthfloat > 0 [scalar]
- Pole bandwidth in Hz. 
- zero_frequencyfloat > 0 [scalar]
- Zero frequency in Hz. 
- zero_bandwidthfloat > 0 [scalar]
- Zero bandwidth in Hz. 
- **kwargsadditional keyword arguments
 
 - forward(x)[source]#
- Apply a second order digital filter. - Parameters:
- xTensor [shape=(…, T)]
- Input waveform. 
 
- Returns:
- yTensor [shape=(…, T)]
- Filtered waveform. 
 
 - Examples - >>> x = diffsptk.ramp(4) >>> df2 = diffsptk.SecondOrderDigitalFilter(16000, 100, 200, 1000, 50, 5) >>> y = df2(x) >>> y tensor([0.0000, 1.0000, 2.0918, 3.4161, 5.1021]) 
 
See also