DSPRelated.com
Forums

symbol synchronization method for SDR in Matlab?

Started by algora March 16, 2011
hello, any of you has experience with different methods for symbol
synchronization so you can help me to implement one of them in a receiver
for bpsk modulation?
i've implemented a costas loop for carrier recovery and the code i've found
for symbol synchronization is too heavy and takes too much time. this is
the matlab code:

tnow=del*oversampling+1; tau=0; xs=zeros(1,length(y));           %
initialize variables
tausave=zeros(1,length(y)); tausave(1)=tau; i=0;
mu=0.05;                                    % algorithm stepsize
delta=0.1;                                  % time for derivative
while tnow<length(y)-del*oversampling       % run iteration
  i=i+1;
  xs(i)=interpsinc(y,tnow+tau,del);           % interpolated value at
tnow+tau
  x_deltap=interpsinc(y,tnow+tau+delta,del);  % get value to the right
  x_deltam=interpsinc(y,tnow+tau-delta,del);  % get value to the left
  dx=x_deltap-x_deltam;                     % calculate numerical
derivative  
  tau=tau+mu*dx*xs(i);                      % alg update (energy)
  tnow=tnow+oversampling; tausave(i)=tau;              % save for plotting
end
    
pam_rx=xs;                               % Decis&atilde;o de S&iacute;mbolo Recebido

bits_rx=pam_rx>0;                         %Estima&ccedil;&atilde;o dos bits recebidos;

ah, the interpsinc function is:
function y=interposinc(x, t, l, beta)
% interpolate to find a single point using the direct method
%        x = sampled data
%        t = place at which value desired
%        l = one sided length of data to interpolate
%        beta = rolloff factor for SRRC function
%             = 0 is a sinc
if nargin==3, beta=0; end;          % if unspecified, beta is 0
tnow=round(t);                      % create indices tnow=integer part
tau=t-round(t);                     % plus tau=fractional part
s_tau=srrc(l,beta,1,tau);           % interpolating sinc at offset tau
x_tau=conv(x(tnow-l:tnow+l),s_tau); % interpolate the signal
y=x_tau(2*l+1);                     % the new sample

if any of you have an idea of how i can do it without doing so many
interpolations, please help me.


On Mar 16, 3:22&#4294967295;pm, "algora" <cgalgora@n_o_s_p_a_m.uclv.edu.cu> wrote:
> hello, any of you has experience with different methods for symbol > synchronization so you can help me to implement one of them in a receiver > for bpsk modulation? > i've implemented a costas loop for carrier recovery and the code i've found > for symbol synchronization is too heavy and takes too much time. this is > the matlab code: > > tnow=del*oversampling+1; tau=0; xs=zeros(1,length(y)); &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; % > initialize variables > tausave=zeros(1,length(y)); tausave(1)=tau; i=0; > mu=0.05; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;% algorithm stepsize > delta=0.1; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;% time for derivative > while tnow<length(y)-del*oversampling &#4294967295; &#4294967295; &#4294967295; % run iteration > &#4294967295; i=i+1; > &#4294967295; xs(i)=interpsinc(y,tnow+tau,del); &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; % interpolated value at > tnow+tau > &#4294967295; x_deltap=interpsinc(y,tnow+tau+delta,del); &#4294967295;% get value to the right > &#4294967295; x_deltam=interpsinc(y,tnow+tau-delta,del); &#4294967295;% get value to the left > &#4294967295; dx=x_deltap-x_deltam; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; % calculate numerical > derivative &#4294967295; > &#4294967295; tau=tau+mu*dx*xs(i); &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;% alg update (energy) > &#4294967295; tnow=tnow+oversampling; tausave(i)=tau; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;% save for plotting > end > > pam_rx=xs; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; % Decis&#4294967295;o de S&#4294967295;mbolo Recebido > > bits_rx=pam_rx>0; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; %Estima&#4294967295;&#4294967295;o dos bits recebidos; > > ah, the interpsinc function is: > function y=interposinc(x, t, l, beta) > % interpolate to find a single point using the direct method > % &#4294967295; &#4294967295; &#4294967295; &#4294967295;x = sampled data > % &#4294967295; &#4294967295; &#4294967295; &#4294967295;t = place at which value desired > % &#4294967295; &#4294967295; &#4294967295; &#4294967295;l = one sided length of data to interpolate > % &#4294967295; &#4294967295; &#4294967295; &#4294967295;beta = rolloff factor for SRRC function > % &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; = 0 is a sinc > if nargin==3, beta=0; end; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;% if unspecified, beta is 0 > tnow=round(t); &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;% create indices tnow=integer part > tau=t-round(t); &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; % plus tau=fractional part > s_tau=srrc(l,beta,1,tau); &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; % interpolating sinc at offset tau > x_tau=conv(x(tnow-l:tnow+l),s_tau); % interpolate the signal > y=x_tau(2*l+1); &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; % the new sample > > if any of you have an idea of how i can do it without doing so many > interpolations, please help me.
Change the timing compensation to something simpler, like a zero-order, first-order, or a polynomial interpolator. The performance depends on your oversampling factor and your target SNR.