why my deconvolution want fit my analytique form?

1 回表示 (過去 30 日間)
Rabih Sokhen
Rabih Sokhen 2022 年 2 月 4 日
コメント済み: Rabih Sokhen 2022 年 2 月 7 日
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])

採用された回答

Paul
Paul 2022 年 2 月 4 日
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.
  1 件のコメント
Rabih Sokhen
Rabih Sokhen 2022 年 2 月 7 日
okay deal
thank you

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSolver Outputs and Iterative Display についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by