Borrar filtros
Borrar filtros

How can implement descrambler operation ?

5 visualizaciones (últimos 30 días)
murat alboga
murat alboga el 9 de Sept. de 2018
Editada: Phung Dao el 18 de Sept. de 2020
Hello,
I am trying to channel modelling in Matlab. I should complete descrambler processing in Receiver in order to recover original signal. I completed Scrambler part with XOR operation but I stuck about descrabler process. I shared below my scrambler process codes.
length = 1200;
binaryalph = [0,1];
randomData = randsrc(1,length,binaryalph);
seed = [[0,0,1,1, 1,1,1,1, 1,1,1,1, 1,1,1]
[0,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1]
[1,0,1,1, 1,1,1,1, 1,1,1,1, 1,1,1]
[1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1]];
initialState = seed(1);
% Generator polynomial for LFSR ( 1 + x^(-14) + x^(-15) )
generatorPolynomial = [1,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,1,1];
% Mask represents the value to tap from LFSR as output
mask = [1,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0];
% Create PN Sequence object having the recommended generator polynomial and
% given initialState
% scr = comm.Scrambler(length(generatorPolynomial),'1 + x^(-14) + x^(-15)',
h = commsrc.pn('GenPoly',generatorPolynomial, ...
'InitialStates',initialState, ...
'CurrentStates',initialState, ...
'Mask',mask, ...
'NumBitsOut',1);
% Number of bits to generate for scrambling must be equal to the number of
% bits in the input
set(h,'NumBitsOut',numel(randomData));
% Do bitwise xor between input bits and generated pseudo-random bits to get
% the scrambled output bits
scrambledBitVector = bitxor(randomData,reshape(generate(h),1,[]));
If someone show the way how can I descrambler operation or share the descrambler codes reallay appreciate that.
Thanks in advance?
PALES

Respuestas (1)

Phung Dao
Phung Dao el 18 de Sept. de 2020
Editada: Phung Dao el 18 de Sept. de 2020
Are you sure your scambler function works?

Categorías

Más información sobre Signal Operations en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by