-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comparing to Matlab's implementation #8
Comments
I have no idea. I would suggest to plot history of the weights (or weights updates). And check if they start from the sam origin (zeros probably). Also you can try to recalculate increments for few steps manually - print first few errors and weight increments to find if it is consistent with LMS rule. Please keep me updated if you find anything. |
OK, thanks, I'll try to debug step by step. I just wanted to confirm that the way I set it up was correct, particularly the reshaping of x using pa.input_from_history and f.run(d[m-1:], xx). |
Fair point. I have not check the validity of that line (I thought you are sure with this one). And probably this could be really the source of a problem. You can easily check how is it done in Python, if you print
And it should work the same with your data:
However, I am not sure how to check this in Matlab. Let me know what you find, I am really curious. |
It seems that the Matlab fir filter you use is completely different (and more sophisticated), than the Padasip LMS implementation. Try comparison against the https://www.mathworks.com/help/dsp/ref/dsp.lmsfilter-system-object.html. |
Hi
I have been trying to implement the padasip library to switch to python from Matlab. In order to do this I took the data generated and predicted by the Matlab example and ran them in python with padasip. As you can see from the attached plot the results are pretty different. (Matlab's output, y_mat (red trace) and padasip's output in purple.). Matlab seems to converge better using the same input parameters.
Could you please take a quick look and tell me if the code is correct? If so, what could be the difference in the algorithm?
I'm also attaching matlab's x, d and y arrays.
Thank you very much.
matlab's d
matlab's x
matlab's y
The text was updated successfully, but these errors were encountered: