| Author |
Message |
August Reno
Guest
|
Posted:
Fri Dec 09, 2005 1:16 am Post subject:
Zero forcing EQ question |
|
|
Hello All!
I obtained a matlab code which do the zero forcing equalization on
an awgn channel, and plots the BER vs. SNR
Please look at this small code if it is correct, my question is:
where are the filter coefficients here or how can I obtain this, as I don't
see them ???
Thanks for you effort,
Reno
N: number of symbols we transmit
h: impulse response
snrDB: SNR in dB, actually:
snrdB_min = 1; snrdB_max = 10;
snrdB = snrdB_min:1:snrdB_max;
-----
function z = zf(N,h,snrdB)
lg=length(h);
y=sign(randn(1,N));
sk=filter(h,1,y);
snr=10.^(snrdB/10);
nu=normrnd(0,(1/sqrt(snr)),1,N);
x=sk+nu;
ykegalZF=filter(1,h,x);
aklinZF=sign(ykegalZF(1:N));
PelinZF=sum(abs(y-aklinZF)/2);
errorZF=PelinZF/N;
%semilogy(RSBdB, PelinZF,'r*'); hold on;
------- |
|
| Back to top |
|
 |
Fred Marshall
Guest
|
Posted:
Fri Dec 09, 2005 9:16 am Post subject:
Re: Zero forcing EQ question |
|
|
"August Reno" <a_reno@tiscali.it> wrote in message
news:dna3i9$5d0$1@namru.matavnet.hu...
| Quote: | Hello All!
I obtained a matlab code which do the zero forcing equalization on
an awgn channel, and plots the BER vs. SNR
Please look at this small code if it is correct, my question is:
where are the filter coefficients here or how can I obtain this, as I
don't see them ???
Thanks for you effort,
Reno
N: number of symbols we transmit
h: impulse response
snrDB: SNR in dB, actually:
snrdB_min = 1; snrdB_max = 10;
snrdB = snrdB_min:1:snrdB_max;
-----
function z = zf(N,h,snrdB)
lg=length(h);
y=sign(randn(1,N));
sk=filter(h,1,y);
snr=10.^(snrdB/10);
nu=normrnd(0,(1/sqrt(snr)),1,N);
x=sk+nu;
ykegalZF=filter(1,h,x);
aklinZF=sign(ykegalZF(1:N));
PelinZF=sum(abs(y-aklinZF)/2);
errorZF=PelinZF/N;
%semilogy(RSBdB, PelinZF,'r*'); hold on;
|
Just read the definition for "filter" and you'll see how the coefficients
are used.
The coefficients are "h" and are *inputs* to the function.....
Fred |
|
| Back to top |
|
 |
August Reno
Guest
|
Posted:
Fri Dec 09, 2005 5:16 pm Post subject:
Re: Zero forcing EQ question |
|
|
Thank you I figured it out!
August
"Fred Marshall" <fmarshallx@remove_the_x.acm.org> az alábbiakat írta a
következő hírüzenetben: QrmdnfzrdvW0mgTenZ2dnUVZ_tudnZ2d@centurytel.net...
| Quote: |
"August Reno" <a_reno@tiscali.it> wrote in message
news:dna3i9$5d0$1@namru.matavnet.hu...
Hello All!
I obtained a matlab code which do the zero forcing equalization on
an awgn channel, and plots the BER vs. SNR
Please look at this small code if it is correct, my question is:
where are the filter coefficients here or how can I obtain this, as I
don't see them ???
Thanks for you effort,
Reno
N: number of symbols we transmit
h: impulse response
snrDB: SNR in dB, actually:
snrdB_min = 1; snrdB_max = 10;
snrdB = snrdB_min:1:snrdB_max;
-----
function z = zf(N,h,snrdB)
lg=length(h);
y=sign(randn(1,N));
sk=filter(h,1,y);
snr=10.^(snrdB/10);
nu=normrnd(0,(1/sqrt(snr)),1,N);
x=sk+nu;
ykegalZF=filter(1,h,x);
aklinZF=sign(ykegalZF(1:N));
PelinZF=sum(abs(y-aklinZF)/2);
errorZF=PelinZF/N;
%semilogy(RSBdB, PelinZF,'r*'); hold on;
Just read the definition for "filter" and you'll see how the coefficients
are used.
The coefficients are "h" and are *inputs* to the function.....
Fred
|
|
|
| Back to top |
|
 |
|
|
|
|