Coder Social home page Coder Social logo

ewan-xu / pyaec Goto Github PK

View Code? Open in Web Editor NEW
284.0 5.0 95.0 12.11 MB

simple and efficient python implemention of a series of adaptive filters. including time domain adaptive filters(lms、nlms、rls、ap、kalman)、nonlinear adaptive filters(volterra filter、functional link adaptive filters)、frequency domain adaptive filters(frequency domain adaptive filter、frequency domain kalman filter) for acoustic echo cancellation.

License: Apache License 2.0

Python 100.00%
python adaptive-filters kalman-filter frequency-domain-filtering acoustic-echo-cancellation nonlinear-adaptive-filter volterra-filter functional-link-adaptive-filter

pyaec's Introduction

pyaec

pyaec is a simple and efficient python implemention of a series of adaptive filters for acoustic echo cancellation.

About

This project aims to use the simplest lines of python code to implement these adaptive filters, making it easier to learn these algorithms.

List of Implementioned Adaptive Filters

Time Domain Adaptive Filters

  • Least Mean Squares Filter (LMS)
  • Block Least Mean Squares Filter (BLMS)
  • Normalized Least Mean Squares Filter (NLMS)
  • Block Normalized Least Mean Squares Filter (BNLMS)
  • Recursive Least Squares Filter (RLS)
  • Affine Projection Algorithm (APA)
  • Kalman Filter (KALMAN)

Nonlinear Adaptive Filters

  • Second Order Volterra Filter (SVF)
  • Trigonometric Functional Link Adaptive Filter (FLAF)
  • Adaptive Exponential Functional Link Adaptive Filter (AEFLAF)
  • Split Funcional Link Adaptive Filter (SFLAF)
  • Collaborative Functional Link Adaptive Filter (CFLAF)

Frequency Domain Adaptive Filters

  • Frequency Domain Adaptive Filter (FDAF)
  • Partitioned-Block-Based Frequency Domain Adaptive Filter (PFDAF)
  • Frequency Domain Kalman Filter (FDKF)
  • Partitioned-Block-Based Frequency Domain Kalman Filter (PFDKF)

Requirements

  • Python 3.6+
  • librosa
  • pyroomacoustics

Usage

python run.py

Author

ewan xu [email protected]

Some Reference Books And Papers

  • Kong-Aik Lee, Woon-Seng Gan, Sen M. Kuo - Subband Adaptive Filtering Theory and Implementation

  • Simon Haykin - Adaptive Filter Theory

  • F.Kuech, E.Mabande, and G.Enzner, "State-space architecture of the partitioned-block-based acoustic echo controller,"in 2014 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 2014, pp. 1295-1299: IEEE

  • A.Gurin, G.Faucon and R.Le Bouquin-Jeanns, "Nonlinear acoustic echo cancellation based on Volterra filters", IEEE Trans.Speech Audio Process., vol. 11, no. 6, pp. 672-683, Nov. 2003

  • V.Patel, V.Gandhi, S.Heda, and N.V.George, “Design of Adaptive Exponential Functional Link Network-Based Nonlinear Filters,” IEEE Transactions on Circuits and Systems I: Regular Papers, vol. 63, no. 9, pp. 1434–1442, 2016.

  • D.Comminiello, M.Scarpiniti, L.A.Azpicueta-Ruiz, J. Arenas-Garcia, and A. Uncini, “Functional link adaptive filters for non-linear acoustic echo cancellation,”IEEE Transactions on Audio,Speech, and Language Processing, vol. 21, no. 7, pp. 1502–1512,2013

pyaec's People

Contributors

ewan-xu avatar jasonzhang892 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pyaec's Issues

Volterra svf returns error signal

Why does your Volterra return the error signal instead of a filtered one?

def svf(x, d, M=128, L=10, mu1=0.2, mu2=0.2): nIters = min(len(x),len(d)) - M L2=int(L*(L+1)/2) u = np.zeros(M) u2 = np.zeros((M,L2)) w = np.zeros(M) h2 = np.zeros(L2) e = np.zeros(nIters) for n in range(nIters): u[1:] = u[:-1] u[0] = x[n] u2_n = np.outer(u[:L],u[:L]) u2_n = u2_n[np.triu_indices_from(u2_n)] u2[1:] = u2[:-1] u2[0] = u2_n x2 = np.dot(u2,h2) g = u + x2 y = np.dot(w, g.T) e_n = d[n] - y w = w + mu1*e_n*g/(np.dot(g,g)+1e-3) grad_2 = np.dot(u2.T,w) h2 = h2 + mu2*e_n*grad_2/(np.dot(grad_2,grad_2)+1e-3) e[n] = e_n return e

Real-time

你好,假如我要使用“nlms”进行实时处理,每次输入大小为512,那么在nlms中参数N应该修改为多大?

卡尔曼滤波的两个噪声方差怎么估计?

非常感谢,这个工程真的很棒。
关于卡尔曼滤波中需要的 observation noise variance 和 process noise variance 在实际场景中有没有比较的好估算方式?
时域,频域 和 分块频域的估计方式是一样的吗?

关于分块kalman 滤波

请问博主,在频域分块kalman算法里,更新滤波器系数时,对于constrain matrix GL您在代码里好像没有体现出来啊,另外,为啥计算X(k)P(k)XH(k)时候先计算X2之后要按行求和啊,X2 = np.sum(np.abs(self.X) ** 2, axis=0)
Re = 0.5 * self.Rm * X2 + np.abs(E) ** 2 / self.N

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.