Effacer les filtres
Effacer les filtres

why my deconvolution want fit my analytique form?

1 vue (au cours des 30 derniers jours)
Rabih Sokhen
Rabih Sokhen le 4 Fév 2022
Commenté : Rabih Sokhen le 7 Fév 2022
hy guys,
i am trying to deconvolute a signal to refind my 2 initial signals, however when a = sinc(f) my deconvolution want fit the analytic but if i replace my sinc with sin it fit very well, any idea about this or did i miss something in the code?
thank you in advance
code:
clear all
clc
dt=0.1;
t=-10:dt:10;
z=numel(t);
df = 1/dt;
f = linspace(-df/2, df/2, z);
ff = linspace(-df/2, df/2, z/2);
to=1;
a=to*sinc(to*f);
b=1./(1+1i*2*pi*f);
y_f=conv(a,b);
[bb,r]=deconv(real(y_f),a); %bb should be similar to b
[aa,r]=deconv((y_f),real(b)); %aa should be similar to a
subplot(131)
plot(real(y_f),'r')
title('y_f= \tau*sinc(\tau*f) * 1./(1+1i*2*pi*f)')
subplot(132)
plot(f,real(aa),'r')
hold on
plot(f,a,'*k')
subplot(133)
plot(f,real(bb),'r')
hold on
plot(f,real(b),'*k')
ylim([0 2])

Réponse acceptée

Paul
Paul le 4 Fév 2022
For a real and b complex, the theoretical equations should be (illusrated with short sequences)
a = rand(1,5);
b = rand(1,5) + 1j*rand(1,5);
y_f = conv(a,b);
aa = deconv(real(y_f),real(b)); % or aa = deconv(imag(yf),imag(b))
bbreal = deconv(real(y_f),a);
bbimag = deconv(imag(y_f),a);
% check
a - aa
ans = 1×5
1.0e+-15 * 0 -0.1110 0.2776 0 -0.3331
real(b) - bbreal
ans = 1×5
1.0e+-15 * 0 -0.0555 0.0555 -0.2220 0
imag(b) - bbimag
ans = 1×5
1.0e+-15 * 0 0 0 -0.1110 0.2220
As we can see,, even for these "simple" sequences deconv is not exact (which I gues is not surprising). Trying these equaations on the a and b in the Question resulted in a good reconstruction of a, but not of b, which blew up very quickly. Maye deconv is very numerically sensitive operation, at least for the given inputs.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by