I have a sparse (density = 0.2%), ill-conditioned system that I am trying to solve, with no luck.
I have a sequence of sampled data, where two of every 8 samples have been zeroed due to a bug. The sequence is two sinusoids in the presence of white noise.
What I'd like to do is determine the Signal to Noise Ratio of the original sequence. I understand that there is information that is forever lost, and so I won't get an exact answer, but that's acceptable, as long as I can get something reasonably close using the existing data, without any filtering (i.e. no interpolation).
Having a sequence with missing samples as I do is like multiplying the original sequence with a square wave (75% duty cycle, in my case). In the frequency domain, this is equivalent to a periodic convolution of regularly-spaced impulses with the DFT of my original sequence. Essentially, its like doing circular shifts on the input sequence, multiplying particular points by certain weights according to the square wave DFT, and summing them together. This can be represented as a linear system.
So I've generated the sparse matrix representing the convolution, and am now trying to solve
A is the sparse matrix,
x is the DFT of the original sequence, and
b is the DFT of the corrupt sequence.
Unfortunately, the sparse matrix is ill conditioned. Using matlab, neither
svds provided useful answers. The thing is, I know what the input sequence (and its DFT) look like. It's a DC component, two bin-centered sinusoids, and white noise. So I have an excellent initial guess, I just can't figure out a way to iterate on that. Also worth noting is that although the DFT is complex-valued, and these operations are all on complex numbers, I only care about the magnitudes.
If I solve
mag(A)x=mag(b) I get a decent result, but its slightly too optimistic, so I'm hoping an iterative solution on the complex values will be more accurate.
My criteria for an acceptable solution is one that minimizes the mean square error between the magnitudes of
Any help would be greatly appreciated! I have little experience in these sorts of linear systems, but am doing my best to learn the appropriate methods.
This is the code I'm using to test my method: https://pastebin.com/F3bArgnR