Deconvolution using FFT - a classical problem

58 views (last 30 days)
Vijayananda
Vijayananda on 19 Feb 2026 at 17:06
Edited: Matt J about 1 hour ago
Hello friends, I am new to signal processing and I am trying to achive deconvolution using FFT. I have an input step function u(t) applied to an impulse response given by . The output function is . I am trying to convolve g and u to get y as well as deconvolve y and g to get u. However, I quite cannot get the right answers. I understand that the deconvolution process is ill-posed and I have to use some kind of normalization process but I am lost. I also apply zero padding to twice the length of the input signals. Any sort of guidance will be appreciated.
After using deconvolution in the fourier domain:
Y = fft(y)
G = fft(g)
X = Y./G
x = ifft(X)
I am getting an output shown below:
Which is not the expected outcome. Can someone shead light on what is happening here? Thank you.

Answers (2)

Matt J
Matt J on 19 Feb 2026 at 20:20
Edited: Matt J on 19 Feb 2026 at 20:49
dt=0.001;
N=20/dt;
t= ( (0:N-1)-ceil((N-1)/2) )*dt; %t-axis
u=(t>=0);
g=3*exp(-t).*u;
y=conv(g,u,'same')*dt;
Y = fft(y);
G = fft(g);
X = Y./G;
x = fftshift(ifft(X,'symmetric')/dt);
figure;
sub=1:0.3/dt:N;
plot(t,3*(1-exp(-t)).*u,'r.' , t(sub), y(sub),'-bo');
xlabel t
legend Theoretical Numeric Location northwest
title 'Output y(t)'
figure;
plot(t, u,'r.' , t(sub), x(sub),'-bo'); ylim([-1,4])
title Deconvolution
xlabel t
legend Theoretical Numeric Location northwest
  7 Comments
Matt J
Matt J about 1 hour ago
Edited: Matt J 12 minutes ago
Did you mean "integrate" in the context of summation?
What I really meant was, when you use a DFT to discretize a continuous Fourier Transform integral of some finite duration signal s(t), what the DFT does is always equivalent to treating the right half of the sample vector as drawn from the negative time axis, and the left half as drawn from the positive axis. Shifting the sampling interval in the continuous domain or redefining where t=0 is won't change that.
Vijayananda
Vijayananda about 2 hours ago
Edited: Matt J about 1 hour ago
Hello friends @Paul, I am trying to solve an inverse heat transfer problem. In a semi-infinite medium which is supplied with a constant heat flux , the temperature distribution is given by:
This is an LTI system. The impulse response of the system is given by:
and the constant heat flux in the step form is q" given the signal starts from t = 0.
So we can write:
In fourier domain:
Z = G*Q
I have analytical forms for all three functions as shown below.
and
I am getting temperature by convolving g and q. No issues. However, when I try to get either g, or q back from the other signals, I am running into error. Division in the fourier domain is ill posed and there are zeros in the denominator. I am not sure how to rectify these. If you add noise to the signals, solving becomes more difficult. The code is attached to this comment.
clc
clearvars
dt = 1e-6;%sampling period
df = 1/dt;%sampling frequency
t = 0:dt:1-dt;%Time vector
qmax = 1e5;%W/m2 maximum step heat flux
alpha = 3.56E-6;%m2/s diffusivity
k = 15; %W/m-k thermal conductivity
x = 1e-5;%m junction depth
DeltaT = (((2*qmax)/k).*sqrt((alpha*t)/pi).*exp((-x*x)./(4*alpha*t)))-(((qmax*x)/k).*(1-erf(x./(2*sqrt(alpha*t)))));
g = sqrt(alpha./(pi*k*k.*t)).*exp((-x*x)./(4*alpha.*t));
g(1) = 1e-9;%to replace NaN at t = 0
q = qmax*ones(length(t),1)';
n = length(DeltaT);
m = length(g);
%Analytical function plots
% figure
% subplot(3,1,1)
% plot(t,DeltaT,LineWidth=2)
% title("Temperature")
% subplot(3,1,2)
% plot(t,g,LineWidth=2)
% title("Impulse response")
% subplot(3,1,3)
% plot(t,q,LineWidth=2)
% title("Heat flux")
%Zero padding to get linear convolution from circular convolution
qpad = paddata(q,n+m-1);%padded heat flux
gpad = paddata(g,n+m-1);%padded impulse response
temppad = paddata(DeltaT,n+m-1);%padded temperature
% Perform fourier transform
G = fft(gpad);
T = fft(temppad);
Q = fft(qpad);
% Convolve heat flux and impulse response
Z1 = dt.* G.*Q;
% Convolve temperature and impulse response
Z2 = df.* T./G;
% Convolve temperature and heat flux
Z3 = df.* T./Q;
% Back to time domain
z = (ifft(Z3)); %change Z3 to Z2 and Z1 for other outputs
znew = z(1:length(t));
plot(t,znew)

Sign in to comment.


Matt J
Matt J 22 minutes ago
Edited: Matt J 20 minutes ago
Since you are trying to deconvolve in the presence of noise, it would make sense to use a regularized deconvolver like deconvreg or deconvwnr. These are from the Image Processing Toolbox, but there is no reason they wouldn't apply to one-dimensional signals as well.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!