psambit9791 / jdsp

A Java Library for Digital Signal Processing
https://jdsp.dev
MIT License
240 stars 45 forks source link

Feature request: Implement LMS adaptive filtering + other adaptive filters #26

Closed SiboVG closed 2 years ago

SiboVG commented 2 years ago

Adaptive filtering is often used for signal noise reduction and some other cool DSP applications. The most often used one is the Least Mean Square (LMS) adaptive filter.

A very good adaptive filtering library in Python is padasip. It also has some code documentation on how the algorithm should work, both in code and on a documentation page.

Other potential good source: explanation of MATLAB LMS adaptive filtering implementation

psambit9791 commented 2 years ago

I have been looking at introducing adaptive filters to JDSP. Might be worthwhile implementing most used adaptive filters that the given library (padasip) has. Probably will be incorporated in a future release.

SiboVG commented 2 years ago

@psambit9791 am working on an LMS and NLMS adaptive filter for my application and both seem to be working. Still have to write some test and am also trying to do other adaptive filters from padasip. So you can assign this issue to me if you want

psambit9791 commented 2 years ago
psambit9791 commented 2 years ago

@psambit9791 am working on an LMS and NLMS adaptive filter for my application and both seem to be working.

@SiboVG I have created a checklist for the filters. You can tick the ones you have completed / are working on. Also, in terms of the class location, it will make sense to keep them inside the filter package under a subpackage classed adaptive. The new package name being com.github.psambit9791.jdsp.filter.adaptive.

SiboVG commented 2 years ago

@psambit9791 am working on an LMS and NLMS adaptive filter for my application and both seem to be working.

@SiboVG I have created a checklist for the filters. You can tick the ones you have completed / are working on. Also, in terms of the class location, it will make sense to keep them inside the filter package under a subpackage classed adaptive. The new package name being com.github.psambit9791.jdsp.filter.adaptive.

That's exactly how I've done it right now, with the adaptive-filter package ;) good that we're on the same wavelength

SiboVG commented 2 years ago

@psambit9791 I would suggest leaving out the LMF and NLMF filter. I've tried implementing it, but it gave very unreliable results (results diverged very often, both in my own implementation as in the padasip implementation), and is also a little used adaptive filter.

psambit9791 commented 2 years ago

@SiboVG What about RLS and GNGD? I am not sure how often adaptive filters are used in practice, especially the types.

SiboVG commented 2 years ago

RLS is more often used, especially for noise reduction. GNGD a bit less, but still way more than LMF (also find little documentation about LMF)


From: Sambit Paul @.> Sent: Monday, November 15, 2021 1:51:46 PM To: psambit9791/jDSP @.> Cc: SiboVG @.>; Mention @.> Subject: Re: [psambit9791/jDSP] Feature request: Implement LMS adaptive filtering + other adaptive filters (Issue #26)

@SiboVGhttps://github.com/SiboVG What about RLS and GNGD? I am not sure how often adaptive filters are used in practice, especially the types.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/psambit9791/jDSP/issues/26#issuecomment-968879878, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACUFHX6XTM54PYJDZIWP5ALUMD66FANCNFSM5HKHUCNA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

psambit9791 commented 2 years ago

I'll pick up RLS, AP and GNGD.

SiboVG commented 2 years ago

I can work on SSLMS and NSSLMS, since they are similar to LMS and NLMS

psambit9791 commented 2 years ago

@SiboVG Do you think it makes sense to create an abstract class called _Adaptive which implements common functionalities the way it works in padasip?

SiboVG commented 2 years ago

@SiboVG Do you think it makes sense to create an abstract class called _Adaptive which implements common functionalities the way it works in padasip?

Was also thinking about it; I think all of them will use the same methods, but that's maybe something we can do after every filter is implemented, because it might be that some filters need different parameters etc.