I am a student and working on a hardware implementation of a transceiver and going to check an algorithm of time recovery that includes symbol synchronization and sampling clock synchronization. The proposed algorithm has a problem in realisation in hardware and I was thinking to check the algorithm and whole simulation in Matlab and probably I could to fix and improve it.

In Matlab, I would like firstly generate a test signal which will be received. Before I asked here about the time recovery algorithms and it was explained to me excellent. Thank you, guys!

My simulation in Matlab:

  • 100 symbols with 4 samples
  • random noise
  • raised cosine filter


% create a random sequence of 1 or -1
N = 100;
bit_stream = rand(1,N)>0.5;
BPSK_symbols = 2*(bit_stream)-1; 

% Filter coefficients

% add 4 zeros 
for i = 1:length(BPSK_symbols )
   BPSK_symbols_zzeros(1) = BPSK_symbols (1);
   BPSK_symbols_zzeros(4*i)=BPSK_symbols (i);

% apply filter 
tx_signal = conv(filter_coeff,BPSK_symbols_zzeros);
% generate noise
noise = rand; 
% add noise
for j = 1:length(tx_signal)
   phi = 0.89 % pi/4
    tx_signal_w_phi(j) = tx_signal(j)*exp(sqrt(-1)*(phi_1))+0.7*norm*(randn+sqrt(-1)*randn); 

My result : red - inphase , green -quadrature

I think the result is wrong. If the phase offset is pi/4, I have to get I-Signal the same as Q-Signal, isn't it?

As you see, the max amplitude (peaks) are different.

Could someone help me to fix this implementation, because I can't understand where I have mistaken...

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.