In my previous question I use a system identification case as an example. Here I came across another question. I want to design a FIR filter of length $L$ to equalize an LTI system whose impulse response is $h(n)$ of length $N$, and my target response is $d(n)$ which is maybe a delayed $\delta(n-D)$. The problem can be formulated as finding the unknown $g(n)$ that satisfies $$ h(n)*g(n)=d(n) $$ Frequency domain deconvolution can be used. Calculate $N+L-1$ point FFT $$ H(k) \cdot G(k) = D(k) $$ Impose regularization we have $$ G(k) = \frac{D(k)H(k)^*}{H(k)H(k)^*+\epsilon(k)} $$
Now I have to transform $G(k)$ back to time domain by $N+L-1$ point IFFT. But I can't guarantee that the IFFT result will end up with $L-1$ point zeros. I can simply truncate the result as @Hilmar suggests, but I don't think this is mathematically correct.
I came up with a solution with the DFT matrix. Let $$ \mathbf{g}= \big[g(0), g(1), \ldots, g(N-1)\big]^T $$ be the time-domain vector of $g(n)$, and $$ \mathbf{G} = \big[G(0), G(1), \ldots, G(N+L-2)\big]^T $$ be the frequency-domain vector of $G(k)$, the DFT matrix $T$ represents the linear transform $$ \mathbf{Tg=G} $$ However, due to $g(n) $ and $G(k)$ have different lengths, this DFT matrix is not a square matrix, it is a truncated DFT matrix.
Finally, the FIR coefficients can be derived by the least-squares method $$ \mathbf{g}=\big(\mathbf{T}^H\mathbf{T}+\lambda \mathbf{I}\big)^{-1}\mathbf{T}^H \mathbf{G} $$
Since the final solution is a least-square solution, I can't guarantee that $N+L-1$ point FFT of $g(n)$ equals to $G(k)$.
Is it a good way to design FIR filters? Does it have any disadvantage? Any better way?