Effacer les filtres
Effacer les filtres

discrete baseband channel model

11 vues (au cours des 30 derniers jours)
Jose Iglesias
Jose Iglesias le 8 Mar 2023
Commenté : Jose Iglesias le 16 Mar 2023
Creating Matlab code for the following problem statement shown below. This is for a discrete baseband channel model lth (complex) channel filter tap. There is an iteration for the gains (a) and the delays (tau) and their values are shown below in the Matlab code that needs revising. I want it to run through each value of a and tau from the first to the last for the iteration.I need help tweaking the code so it can plot the amplitude of the channel model vs l. The Matlab code that needs revising is shown below. The bandwith is 200 kHz.Thank you in advance.
% Define the range of l values
l = -5:5;
f = 100000;
W = 200E3;
tau = [.2387 4E-6 3.40E-6 3.667E-6 3.59E-6];
a = [.2387 -.2 -.2341 -.217 -.222];
a*b = a(i)*exp*(-i*2*pi*f*tau(i));
% Compute the discrete baseband channel model h
h = zeros(size(l));
for idx = 1:length(l)
for i = 1:length(a)
h(idx) = h(idx) + (1i*a(i)*b(i)/W)*sinc(l(idx)-tau(i)*W);
% Plot the amplitude of h vs l
stem(l, abs(h));
title('Amplitude of the Discrete Baseband Channel Model');

Réponse acceptée

Zuber le 15 Mar 2023
I understand that you want to plot the amplitude of the channel model vs l. In the code, the variable a*b’ is not a valid variable name, and is replaced by ‘a_b’ in the code below. The definition of a*b’ accesses the index of vector ‘a’ and ‘tau’, so it should be inside the for loop. Also, the code for h(idx) is not as per the definition of ’. Following code can be used to get the correct ‘a_b’ and ‘h’ values : -
for idx = 1:length(l)
for i = 1:length(a)
a_b = a(i)*exp(-1i*2*pi*f*tau(i));
h(idx) = h(idx) + (a_b*(idx/W)*sinc(l(idx)-tau(i)*(idx/W)*W));
I hope this resolves your query.
  1 commentaire
Jose Iglesias
Jose Iglesias le 16 Mar 2023
Thank you very much for your help!

Connectez-vous pour commenter.

Plus de réponses (0)




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by