help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Matlab Convolution and Deconvolution Error


From: Julius Smith
Subject: Re: Matlab Convolution and Deconvolution Error
Date: Thu, 16 Oct 2008 13:08:59 -0600

My guess is that the problem is due to 1/B being an unstable filter
(pole magnitude = 100 when B = [0.01 1]).  This fits with the
time-domain method working when A is shorter or B(1) is closer to 1.
The fft method just works over the unit circle, so it doesn't care
about stability (but it needs poles and zeros to be somewhat away from
the unit circle).  Deconvolution is traditionally restricted to cases
for which 1/B is stable. - jos

On Thu, Oct 16, 2008 at 1:54 AM, Francesco Potorti` <address@hidden> wrote:
>>I am using Matlab to perform convolution and deconvolution to discrete time
>>signals.
>
> Maybe you meant Octave?
>
>>          There seems to be an error when one of the signals is long(ie
>>there are many numbers in the array) and the first number in the other's
>>array is near to zero.
>>
>>This is a simple example of my problem(the actual numbers I am using are
>>more complicated)-
>>A = 0:100;
>>B = [0.01 1];
>>C = conv(A,B);
>>D = deconv(C,B);
>>subplot(2,1,1)
>>plot(A)
>>subplot(2,1,2)
>>plot(D)
>>
>>The two plots should be the same but they arent.  If you change A to a
>>smaller signal, ie maybe only 10 numbers long, then it works and if you
>>change the first number of B to something larger ie 1 then it also works.
>>How can I fix this problem, as I have been given set formulas to work with.
>>The numbers I am trying to convolve and deconvolve are both long and begin
>>with very small numbers.
>
> I did not get to understand why.  I should look more deeply into the
> deconv function.  However, it is not, as I had initially suspected, a
> problem with ill-conditioned deconvolution.  In Octave 3.0, if you do
> the deconvolution "by hand", it works:
>
> octave> A = 0:100; B = [.01 1]; C = conv(A,B); D = deconv(C,B);
> octave> la=length(A);lb=length(B);
> octave> D1=real(ifft(fft(conv(A,B))./fft(postpad(B,la+lb-1))))(1:la)
>
> Maybe the method used by deconv (which calls filter) makes the problem
> ill-conditioned somehow?
>
> --
> Francesco Potortì (ricercatore)        Voice: +39 050 315 3058 (op.2111)
> ISTI - Area della ricerca CNR          Fax:   +39 050 315 2040
> via G. Moruzzi 1, I-56124 Pisa         Email: address@hidden
> (entrance 20, 1st floor, room C71)     Web:   http://fly.isti.cnr.it/
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>
>



-- 
"Anybody who knows all about nothing knows everything" -- Leonard Susskind



reply via email to

[Prev in Thread] Current Thread [Next in Thread]