[docs]classExponentialFilter(Model):"""Exponential filter. Correct filters for signal with behavior 1 + amplitude * e^(-t/tau). """kind:Literal["exp"]="exp"amplitude:float"""Amplitude for exponential term."""tau:float"""Time decay in exponential in samples unit."""def_compute_filter(self)->tuple[list[float],list[float]]:"""Computing feedback and feedforward taps."""alpha=1-np.exp(-1/(self.tau*(1+self.amplitude)))k=(self.amplitude/((1+self.amplitude)*(1-alpha))ifself.amplitude<0elseself.amplitude/(1+self.amplitude-alpha))b0=1-k+k*alphab1=-(1-k)*(1-alpha)a0=1a1=-(1-alpha)return[a0,a1],[b0,b1]@propertydeffeedback(self)->list[float]:returnself._compute_filter()[0]@propertydeffeedforward(self)->list[float]:returnself._compute_filter()[1]