The way I understand the problem is each sample of the output is a linear combination of the samples of the input.
Hence it is modeled by:
$$ \boldsymbol{y} = H \boldsymbol{x} $$
Where the $ i $ -th row of $ H $ is basically the instantaneous kernel of the $ i $ -th sample of $ \boldsymbol{y} $.
The problem above is highly ill poised.
In the classic convolution case we know the operator matrix, $ H $, has a special form (Excluding the borders) - Circulant Matrix. With some other assumptions (Priors) one could solve this ill poised problem to some degree.
Even in the case of Spatially Variant Kernels in Image Processing, usually, some form is assumed (Usually being block circulant matrix, and the number of samples of each kernel is larger than the number of samples in the support of the kernel).
Unless you add some assumptions and knowledge into your model the solution will be Garbage In & Garbage Out:
numInputSamples = 12;
numOutputSamples = 10;
mH = rand(numOutputSamples, numInputSamples);
mH = mH ./ sum(mH, 2); %<! Assuming LPF with no DC change
vX = randn(numInputSamples, 1);
vY = mH * vX;
mHEst = vY / vX;
See the above code. You will always have a perfect solution yet it will have nothing to do with mH
.
Now, if I get it right, you say I don't know $ H $ perfectly, but what I have is a pre defined options.
So let's say we have a matrix $ P \in \mathbb{R}^{k \times n} $ which in each row has a pre defined combination:
$$ H = R P $$
Where $ R $ is basically a row selector matrix, namely it has a single element with value $ 1 $ in each row and the rest is zero.
Something like:
mP = [1, 2, 3; 4, 5, 6; 7, 8, 9];
mH = [1, 2, 3; 7, 8, 9; 7, 8, 9; 4, 5, 6; 4, 5, 6];
% mH = mR * mP;
mR = mH / mP;
So our model is:
$$\begin{aligned}
\arg \min_{R, \boldsymbol{x}} \quad & \frac{1}{2} {\left\| R P \boldsymbol{x} - \boldsymbol{y} \right\|}_{2}^{2} \\
\text{subject to} \quad & R \boldsymbol{1} = \boldsymbol{1} \\
& {R}_{i, j} \geq 0 \quad \forall i, j \\
\end{aligned}$$
It is still exceptionally hard (Non convex) problem but with some more knowledge it can be solved by utilizing alternating methods where we break the optimization problem as:
- Set $ \hat{\boldsymbol{x}}^{0} $.
- Solve $ \hat{R}^{k + 1} = \arg \min_{R} \frac{1}{2} {\left\| R P \hat{\boldsymbol{x}}^{k} - \boldsymbol{y} \right\|}_{2}^{2} $ subject to $ R \boldsymbol{1} = \boldsymbol{1}, \; {R}_{i, j} \geq 0 \; \forall i, j $.
- Solve $ \hat{\boldsymbol{x}}^{k + 1} = \arg \min_{\boldsymbol{x}} \frac{1}{2} {\left\| \hat{R}^{k + 1} P x - \boldsymbol{y} \right\|}_{2}^{2} $.
- Check for convergence, if not go to (2).
Now each sub problem is convex and easy to solve.
Yet I still recommend you add better assumptions / priors.
Such as the minimal number of contiguous samples that must have the same PSF (Similar to 2D in images where we say each smooth area is smoothed by a single PSF).
Remark
We didn't employ the fact each element in $ R $ is either 0 or 1 as the straight forward use of that will create a Non Convex sub problem.
In case the number of PSF's is small we can use MIP solvers. But the model above assumed each row is a PSF so for large number of samples even in case we have small number of PSF'w the matrix is actually built by shifting each PSF as well. So we'll have large number in any case.
Another trick might be something like Solving Unconstrained 0-1 Polynomial Programs Through Quadratic Convex Reformulation.
Yet the simplest method would be "projecting" $ R $ into the space (Which is not convex, hence projection is not well defined). One method might be setting the largest value to 1 and zero the rest.
Update
In comments you made it clear you know the kernel per output sample.
Hence the model is simpler:
$$ \boldsymbol{y} = A \boldsymbol{x} + \boldsymbol{n} $$
The least squares solution is simply $ \boldsymbol{x} = {H}^{-1} \boldsymbol{y} $.
For better conditioning and noise regularization (Actually prior about the data, but that's for another day) you can solve:
$$ \hat{\boldsymbol{x}} = {\left( {A}^{T} A + \lambda I \right)}^{-1} {A}^{T} \boldsymbol{y} $$
This is a MATLAB code for proof of concept:
load('psfs.mat');
mA = psfs;
vY = y;
vX = x;
vParamLambda = [1e-7, 1e-6, 1e-5, 1e-4, 1e-3, 1e-2, 1e-1, 1];
numParams = length(vParamLambda);
vValMse = zeros(numParams, 1);
mAA = mA.' * mA;
vAy = mA.' * vY;
mI = eye(size(mA));
for ii = 1:numParams
paramLambda = vParamLambda(ii);
vEstX = (mAA + paramLambda * mI) \ vAy;
vValMse(ii) = mean((vEstX(:) - vX(:)) .^ 2);
end
figure();
hL = plot(vParamLambda, 10 * log10(vValMse));
xlabel('Value of \lambda');
ylabel('MSE [dB]');
This is the result:

t0
? $\endgroup$y(t)=conv(x(t),psf)
we have the set of PSFs (one for each location int
). So, you can think of this as breaking the convolution over the entire signal gridt
to many contributions, for example, each k-th element in the signal is dictated by a different PSF : y(t_k ) = conv (y( t_k) , PSF_k ) , etc. I am after a deconvolution \ deblur of the signal, to remove the effect of the different PSFs. In the example above, such de-blur will result in just two peaks, of the same widths and amplitude in the positions 3 and 15. $\endgroup$