Advertisement
Guest User

Untitled

a guest
Dec 11th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. estimateChannelError = [];
  2. estimateCutChannelError = [];
  3.  
  4. for j = 1 : 3
  5. [basebandChannel, channel_response] = baseband_channel(transmitter_output_data, channel);
  6. basebandChannel = awgn(basebandChannel, noise(i), 'measured');
  7. pilot_ach = get_pilot(basebandChannel(1:68160), 2);
  8.  
  9. for p = 1 : 10
  10. estimateChannel_fdomain = pilot_ach(:, p) ./ pilot(:, p);
  11. estimateChannel_tdomain = ifft(estimateChannel_fdomain, N);
  12. estimateChannel_tdomain = [estimateChannel_tdomain(1 : CP); zeros([(N - CP) 1])];
  13. estimateCutChannel_tdomain = fft(estimateChannel_tdomain, N);
  14. channel_response_fft = fft(channel_response, 128).';
  15. estimateChannel_fdomain_error_part(p) = sum( abs(channel_response_fft - estimateChannel_fdomain).^2);
  16. estimateCutChannel_tdomain_error_part(p) = sum( abs(channel_response_fft - estimateCutChannel_tdomain).^2);
  17. end
  18. estimateChannelError = [estimateChannelError estimateChannel_fdomain_error_part];
  19. estimateCutChannelError = [estimateCutChannelError estimateCutChannel_tdomain_error_part];
  20. end
  21.  
  22. estimateChannel_fdomain_error(i) = mean(estimateChannelError);
  23. estimateCutChannel_tdomain_error(i) = mean(estimateCutChannelError);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement