欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 汽车 > 时评 > 802.11 中 scrambler的matlab仿真

802.11 中 scrambler的matlab仿真

2024/10/23 6:55:38 来源:https://blog.csdn.net/little_soldier/article/details/141903263  浏览:    关键词:802.11 中 scrambler的matlab仿真

802.11a和802.11n中的scrambler仿真不可以直接用matlab中的comm.Scrambler函数。因为这个函数实现的是multiplicative scrambling,而802.11a和802.11n中的scrambler使用的是additive scrambling。additive scrambling使用异或操作进行扰码,multiplicative scrambling使用乘法而非异或操作来对数据进行扰码。

所以进行仿真的时候,要使用comm.PNSequence生成一个PN序列,然后对输入数据进行XOR操作即可。

代码如下:

%% scramble
genPoly = 'x^7 + x^3 + 1';       % Generator polynomial
shift = 7;                       % Shift value for output
spf = 48;                        % Samples per frame
initState = [1 0 1 1 1 0 1]';    
pnSeq = comm.PNSequence( ...Polynomial=genPoly, ...InitialConditionsSource="Input Port", ...Mask=shift, ...SamplesPerFrame=spf, ...OutputDataType="logical");
pnsequence = pnSeq(initState);
scrData = xor(data_Payload_bit,pnsequence);

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com