Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
rayleighchan and mlseeq help....???

Subject: rayleighchan and mlseeq help....???

From: mahmud_dbm

Date: 15 Nov, 2009 12:38:01

Message: 1 of 5

dear sir,

1.
i'm facing a problem and i hope u can help me out as i've seen you previous posts in the related field.

i'm using matlab built in function mlseeq(x,chcffs,const,tblen,opmode) function.
(Equalize linearly modulated signal using Viterbi algorithm)

where "chcffs " is channel coefficient 'vector'

but if i use chan= rayleighchan(Ts,fd,tau,pdb); it creates a channel 'object' not 'coeff vector', but i need to find the 'coefficient vector' of this channel what i basically need to input to mlseeq function.

please give me any solution fot this.

Subject: rayleighchan and mlseeq help....???

From: Ethem Sozer

Date: 16 Nov, 2009 14:05:35

Message: 2 of 5

rayleighchan function creates a channel object that simulates a Rayleigh
fading channel. The following is an example of what you will see when you
first create one:

>> h = rayleighchan

h =

             ChannelType: 'Rayleigh'
       InputSamplePeriod: 1
         DopplerSpectrum: [1x1 doppler.jakes]
         MaxDopplerShift: 0
              PathDelays: 0
           AvgPathGaindB: 0
      NormalizePathGains: 1
            StoreHistory: 0
          StorePathGains: 0
               PathGains: 0.0510 - 0.1054i
      ChannelFilterDelay: 0
    ResetBeforeFiltering: 1
     NumSamplesProcessed: 0


You can use the filter method of this object to pass your signals through
the channel. In a script, it will look like this:

% Transmitted signal
x = myTransmitter();

% Simulate channel
r = filter(h, x);

At this point, the PathGains property of the channel object, h, contains the
channel coefficients used:

chCoeffs = h.PathGains;

You can use chCoeffs in the MLSE equalizer.

Note that the defualt channel has only one path. For an MLSE simulation you
will probably need to configure the channel object as a multipath channel.
You can get more details from the documentation. Try typing "doc
rayleighchan" in the comman prompt. Also, read the "Fading Channels"
section of the Communications Toolbox Users Guide.

Hth,
Ethem



"mahmud_dbm " <mahmud_dbm@yahoo.com> wrote in message
news:hdosn9$9h0$1@fred.mathworks.com...
> dear sir,
>
> 1.
> i'm facing a problem and i hope u can help me out as i've seen you
> previous posts in the related field.
>
> i'm using matlab built in function mlseeq(x,chcffs,const,tblen,opmode)
> function.
> (Equalize linearly modulated signal using Viterbi algorithm)
>
> where "chcffs " is channel coefficient 'vector'
>
> but if i use chan= rayleighchan(Ts,fd,tau,pdb); it creates a channel
> 'object' not 'coeff vector', but i need to find the 'coefficient vector'
> of this channel what i basically need to input to mlseeq function.
>
> please give me any solution fot this.

Subject: rayleighchan and mlseeq help....???

From: Aurele Marc

Date: 1 Dec, 2009 10:40:13

Message: 3 of 5

Hi Ethem,

I've read your message and i've tried to do exactly what you've said.
But i get bad results (BER around 0.5). And what is strange, if i remove the equalization, i get better results than with equalization.
The following code is the example that i've used:

Ts = 3/812560;
bitRate = 1/Ts;

%%--- Channel parameters --------------
tau = [0 0.2e-6 0.5e-6 1.6e-6 2.3e-6 5e-6];
pdb = [-3 0 -2 -6 -8 -10];
fd = 2.5;

% Create Rayleigh fading channel object.
randn('state',12345);
chan = rayleighchan(Ts,fd,tau,pdb);
delay = chan.ChannelFilterDelay;

M = 2; % DBPSK modulation order

% MLSE equalizer parameters
const = dpskmod([0:M-1],M);
tbLen = 36;

% Compute error rate for different values of SNR.
SNR = 0:2:20; % Range of SNR values, in dB.
MaxBlock = 1000;
for n = 1:length(SNR)
    for block = 1:MaxBlock
        tx = randint(148,1,M); % Random bit stream
        tx_pad = [tx;zeros(delay,1)]; % Pad the signal for delay introduced by the channel
        dpskSig = dpskmod(tx_pad,M); % DPSK signal
        fadedSig = filter(chan,dpskSig); % Effect of channel
        h_coeff = chan.PathGains; % Channel Coefficients
        rxSig = awgn(fadedSig,SNR(n)); % Add Gaussian noise.
        eqSig = mlseeq(rxSig,h_coeff,const,tbLen,'rst',1); % Equalize signal
        rx = dpskdemod(rxSig,M); % Demodulate.
        rx = rx(delay+1:end); % Remove the first delay symbols (compensation of channel's delay)
        % Compute error rate.
        % Ignore first sample because of DPSK initial condition.
        tx = tx(2:end); rx = rx(2:end);
        [nErrors, tmpBER(block)] = biterr(tx,rx);
        fprintf(1,'block BER = %g\n',tmpBER(block));
    end
    BER(n) = mean(tmpBER);
end

Why do i get bad results ? Is there any problem with the call of mlseeq function in the code ?

In addition, if i want uncorrelated fading channels, should i set ResetBeforeFiltering property to 0 or 1 ? (I think i should set to 1 but i'm not sure).

Any comment is welcome.
Thanks for your help







"Ethem Sozer" <esozer@mathworks.com> wrote in message <hdrm7h$pc7$1@fred.mathworks.com>...
> rayleighchan function creates a channel object that simulates a Rayleigh
> fading channel. The following is an example of what you will see when you
> first create one:
>
> >> h = rayleighchan
>
> h =
>
> ChannelType: 'Rayleigh'
> InputSamplePeriod: 1
> DopplerSpectrum: [1x1 doppler.jakes]
> MaxDopplerShift: 0
> PathDelays: 0
> AvgPathGaindB: 0
> NormalizePathGains: 1
> StoreHistory: 0
> StorePathGains: 0
> PathGains: 0.0510 - 0.1054i
> ChannelFilterDelay: 0
> ResetBeforeFiltering: 1
> NumSamplesProcessed: 0
>
>
> You can use the filter method of this object to pass your signals through
> the channel. In a script, it will look like this:
>
> % Transmitted signal
> x = myTransmitter();
>
> % Simulate channel
> r = filter(h, x);
>
> At this point, the PathGains property of the channel object, h, contains the
> channel coefficients used:
>
> chCoeffs = h.PathGains;
>
> You can use chCoeffs in the MLSE equalizer.
>
> Note that the defualt channel has only one path. For an MLSE simulation you
> will probably need to configure the channel object as a multipath channel.
> You can get more details from the documentation. Try typing "doc
> rayleighchan" in the comman prompt. Also, read the "Fading Channels"
> section of the Communications Toolbox Users Guide.
>
> Hth,
> Ethem
>
>
>
> "mahmud_dbm " <mahmud_dbm@yahoo.com> wrote in message
> news:hdosn9$9h0$1@fred.mathworks.com...
> > dear sir,
> >
> > 1.
> > i'm facing a problem and i hope u can help me out as i've seen you
> > previous posts in the related field.
> >
> > i'm using matlab built in function mlseeq(x,chcffs,const,tblen,opmode)
> > function.
> > (Equalize linearly modulated signal using Viterbi algorithm)
> >
> > where "chcffs " is channel coefficient 'vector'
> >
> > but if i use chan= rayleighchan(Ts,fd,tau,pdb); it creates a channel
> > 'object' not 'coeff vector', but i need to find the 'coefficient vector'
> > of this channel what i basically need to input to mlseeq function.
> >
> > please give me any solution fot this.
>

Subject: rayleighchan and mlseeq help....???

From: Saed

Date: 6 Feb, 2012 17:44:10

Message: 4 of 5

Hi,

Have you fixed the problem? I am using mlseeq but I am generating the Rayleigh fading channel using randn function. The problem I am facing is that, the performance of the mlsseq is worse than the MSE equalizer. I can provide the code I have.

Thanks
"Aurele Marc" wrote in message <hf2rqd$n5j$1@fred.mathworks.com>...
> Hi Ethem,
>
> I've read your message and i've tried to do exactly what you've said.
> But i get bad results (BER around 0.5). And what is strange, if i remove the equalization, i get better results than with equalization.
> The following code is the example that i've used:
>
> Ts = 3/812560;
> bitRate = 1/Ts;
>
> %%--- Channel parameters --------------
> tau = [0 0.2e-6 0.5e-6 1.6e-6 2.3e-6 5e-6];
> pdb = [-3 0 -2 -6 -8 -10];
> fd = 2.5;
>
> % Create Rayleigh fading channel object.
> randn('state',12345);
> chan = rayleighchan(Ts,fd,tau,pdb);
> delay = chan.ChannelFilterDelay;
>
> M = 2; % DBPSK modulation order
>
> % MLSE equalizer parameters
> const = dpskmod([0:M-1],M);
> tbLen = 36;
>
> % Compute error rate for different values of SNR.
> SNR = 0:2:20; % Range of SNR values, in dB.
> MaxBlock = 1000;
> for n = 1:length(SNR)
> for block = 1:MaxBlock
> tx = randint(148,1,M); % Random bit stream
> tx_pad = [tx;zeros(delay,1)]; % Pad the signal for delay introduced by the channel
> dpskSig = dpskmod(tx_pad,M); % DPSK signal
> fadedSig = filter(chan,dpskSig); % Effect of channel
> h_coeff = chan.PathGains; % Channel Coefficients
> rxSig = awgn(fadedSig,SNR(n)); % Add Gaussian noise.
> eqSig = mlseeq(rxSig,h_coeff,const,tbLen,'rst',1); % Equalize signal
> rx = dpskdemod(rxSig,M); % Demodulate.
> rx = rx(delay+1:end); % Remove the first delay symbols (compensation of channel's delay)
> % Compute error rate.
> % Ignore first sample because of DPSK initial condition.
> tx = tx(2:end); rx = rx(2:end);
> [nErrors, tmpBER(block)] = biterr(tx,rx);
> fprintf(1,'block BER = %g\n',tmpBER(block));
> end
> BER(n) = mean(tmpBER);
> end
>
> Why do i get bad results ? Is there any problem with the call of mlseeq function in the code ?
>
> In addition, if i want uncorrelated fading channels, should i set ResetBeforeFiltering property to 0 or 1 ? (I think i should set to 1 but i'm not sure).
>
> Any comment is welcome.
> Thanks for your help
>
>
>
>
>
>
>
> "Ethem Sozer" <esozer@mathworks.com> wrote in message <hdrm7h$pc7$1@fred.mathworks.com>...
> > rayleighchan function creates a channel object that simulates a Rayleigh
> > fading channel. The following is an example of what you will see when you
> > first create one:
> >
> > >> h = rayleighchan
> >
> > h =
> >
> > ChannelType: 'Rayleigh'
> > InputSamplePeriod: 1
> > DopplerSpectrum: [1x1 doppler.jakes]
> > MaxDopplerShift: 0
> > PathDelays: 0
> > AvgPathGaindB: 0
> > NormalizePathGains: 1
> > StoreHistory: 0
> > StorePathGains: 0
> > PathGains: 0.0510 - 0.1054i
> > ChannelFilterDelay: 0
> > ResetBeforeFiltering: 1
> > NumSamplesProcessed: 0
> >
> >
> > You can use the filter method of this object to pass your signals through
> > the channel. In a script, it will look like this:
> >
> > % Transmitted signal
> > x = myTransmitter();
> >
> > % Simulate channel
> > r = filter(h, x);
> >
> > At this point, the PathGains property of the channel object, h, contains the
> > channel coefficients used:
> >
> > chCoeffs = h.PathGains;
> >
> > You can use chCoeffs in the MLSE equalizer.
> >
> > Note that the defualt channel has only one path. For an MLSE simulation you
> > will probably need to configure the channel object as a multipath channel.
> > You can get more details from the documentation. Try typing "doc
> > rayleighchan" in the comman prompt. Also, read the "Fading Channels"
> > section of the Communications Toolbox Users Guide.
> >
> > Hth,
> > Ethem
> >
> >
> >
> > "mahmud_dbm " <mahmud_dbm@yahoo.com> wrote in message
> > news:hdosn9$9h0$1@fred.mathworks.com...
> > > dear sir,
> > >
> > > 1.
> > > i'm facing a problem and i hope u can help me out as i've seen you
> > > previous posts in the related field.
> > >
> > > i'm using matlab built in function mlseeq(x,chcffs,const,tblen,opmode)
> > > function.
> > > (Equalize linearly modulated signal using Viterbi algorithm)
> > >
> > > where "chcffs " is channel coefficient 'vector'
> > >
> > > but if i use chan= rayleighchan(Ts,fd,tau,pdb); it creates a channel
> > > 'object' not 'coeff vector', but i need to find the 'coefficient vector'
> > > of this channel what i basically need to input to mlseeq function.
> > >
> > > please give me any solution fot this.
> >

Subject: rayleighchan and mlseeq help....???

From: ammar

Date: 12 Feb, 2012 15:23:10

Message: 5 of 5

hi,,

i am also generate a rayleigh channel using randn,

and i make a good equlization for the channel

but i still have a problem with the result for CDMA system >> i got a very good result

so if u want i can read your code and try to fix your problem and i will used see if i can used it.

my email is >> eng_ammar_1988@yahoo.com

"Saed" wrote in message <jgp3ha$2ii$1@newscl01ah.mathworks.com>...
> Hi,
>
> Have you fixed the problem? I am using mlseeq but I am generating the Rayleigh fading channel using randn function. The problem I am facing is that, the performance of the mlsseq is worse than the MSE equalizer. I can provide the code I have.
>
> Thanks
> "Aurele Marc" wrote in message <hf2rqd$n5j$1@fred.mathworks.com>...
results ? Is there any problem with the call of mlseeq function in the code ?

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us