I am having problems using the combination of conv and deconv
I have a large number of random processes which I convolve with its
fliped version, then I deconvolve the result obtained from
convolution with the fliped version of random process, the procedure
works for all but some specific cases.
The code below should help you understand the problem. %%%%%%% Code starts %%%%%%%%%%%%%%
input_stream1=[0 1 0 1];
% Value of m depends on the order of the modulation
% Extracting number of bits to be represented in a symbol
% Calculating phase angle depending on the decimal equivalent
% Formulae to find of the M-PSK signal
s1(k)=amp1*cos(2*pi*fc1*t + theta1(j));
diff = s1 - s_1
%%%%%%%%% Code ends%%%%%%%%%%%%%%%%%
The diff in this case should be zero but it is not, this problem
occurs for the input_stream1= 0 1 0 1 and 1 1 0 1 for all other 4 bit
combinations the diff is rightly zero. I am trying to find out as to
why am I not getting the diff as 0 for all cases.
Please can someone help me find out the problem.
Thanking you all in anticipation
conv and deconv functions
The deconv function is slightly trick. I will give you a hint and you can actually try and see if it helps.
Deconv is implemented by long division in Matlab. For this a filter is implemented with the arguments being fed as the coefficients of the numerator and denominator with the data being 1. Thus, the deconv is actually an impulse output of a filter with the arguments as coefficients of numerator and denominator. Now if the first coefficient is zero, it may not be accepted and maybe the function will alter the polynomial to overcome the situation resulting in an undesired output. This might explain for the [0 1 0 1] part and maybe the second input of [1 1 0 1] may have something to do with consistency of poles and zeros of the filter. Moreover, deconv is sensitive to noise and gives undesirable outputs in presence of noise.
An alternate solution could be by taking fft and ifft. Since convolution will be multiplication in frequency domain, things maybe a lot easier then.
In case you find a solution, then do share it on the group.