主要内容

comm.mskmodulator.

使用MSK方法调制

描述

Themskmodulator.object modulates using the minimum shift keying method. The output is a baseband representation of the modulated signal. The initial phase offset property sets the initial phase of the output waveform, measured in radians.

使用最小Shift键控调制信号:

  1. 定义并设置MSK调制器对象。看Construction

  2. Call调制信号根据道具erties ofcomm.mskmodulator.。The behavior ofis specific to each object in the toolbox.

Note

Starting in R2016b, instead of using the执行由System Object™定义的操作的方法,您可以使用参数调用对象,就像它是一个函数一样。例如,y = step(obj,x)y = obj(x)perform equivalent operations.

Construction

h = comm.mskmodulator.creates a modulator System object,H。This object modulates the input signal using the minimum shift keying (MSK) modulation method.

h = comm.mskmodulator(Name,价值)creates an MSK modulator object,H,每个指定属性设置为指定值。您可以以任何顺序指定其他名称值对参数(Name1,value1.,......,namen.,赋值)。

Properties

BitInput

假设位输入

指定输入是否为位或整数。默认为错误的

When you set theBitInputproperty to错误的,方法输入必须是具有双精度或签名整数数据类型和等于的值的列向量-1要么1

When you set theBitInputproperty to真的,方法输入需要0s和1s的双精度或逻辑数据类型列向量。

InitialPhaseOffset

初始相位偏移

将Radian中调制波形的初始相位指定为真实的数字标量值。默认为0

SamplesPerSymbol

Number of samples per output symbol

将输出的上采样因子指定为真实,正整数标量值。默认为8。The upsampling factor indicates the number of output samples that the step method produces for each input sample.

OutputDataType

数据类型输出

Specify output data type as one of双倍的|single。默认为双倍的

方法

使用MSK方法调制
对所有系统对象共同
发布

允许系统对象属性值更改

重置

重置系统对象的内部状态

例子

全部收缩

%创建一个MSK调制器,AWGN通道和MSK解调器。用一个% phase offset of pi/4.hMod = comm.MSKModulator('bitInpul', 真的,。。。'initialphaseoffset',pi / 4);havgn = comm.awgnchannel('NoiseMethod',。。。'信噪比(SNR)','SNR',0); hDemod = comm.MSKDemodulator('BitOutput', 真的,。。。'initialphaseoffset',pi / 4);% Create an error rate calculator, account for the delay caused by the Viterbi algorithmherror = comm.errorrate('收纳', hDemod.TracebackDepth);for计数器= 1:100%发送100个3位字data = randi([0 1],300,1); modSignal = step(hMod, data); noisySignal = step(hAWGN, modSignal); receivedData = step(hDemod, noisySignal); errorStats = step(hError, data, receivedData);endfprintf('Error rate = %f\nNumber of errors = %d\n',。。。errorstats(1),errorstats(2))
Error rate = 0.000000 Number of errors = 0

将零的二进制序列和GMSK调制器的输出映射。此映射还适用于MSK调制。

创建一个GMSK调制器,接受二进制输入,并且每个符号值具有脉冲长度和样品1。

gmskmodulator = comm.gmskmodulator('bitInpul',true,'pulselength',1,。。。'SamplesPerSymbol',1);

创建所有零的输入序列。调制序列。

x =零(5,1);y = gmskmodulator(x)
y =5×1complex1.0000 + 0.0000i -0.0000  -  1.0000i -1.0000 + 0.0000i 0.0000 + 1.0000i 1.0000  -  0.0000i

Determine the phase angle for each point. Use the打开function to show the trend.

Theta = unwrap(角度(y))
theta =5×10 -1.5708 -3.1416 -4.7124 -6.2832

A sequence of zeros causes the phase to shift by -π/2 between samples.

重置调制器。调制所有的输入序列。

重置(gmskmodulator) x = ones(5,1); y = gmskmodulator(x)
y =5×1complex1.0000 + 0.0000i -0.0000 + 1.0000i -1.0000  -  0.0000i 0.0000  -  1.0000i 1.0000 + 0.0000i

Determine the phase angle for each point. Use the打开function to show the trend.

Theta = unwrap(角度(y))
theta =5×10 1.5708 3.1416 4.7124 6.2832

一系列导致相位在样本之间偏移+π/ 2。

通过绘制具有不同脉冲长度和MSK的GMSK的眼图来比较高斯最小移位键控(GMSK)和最小移位键控(MSK)调制方案。

设定samples per symbol variable.

SPS = 8;

生成随机二进制数据。

data = randi([0 1],1000,1);

Create GMSK and MSK modulators that accept binary inputs. Set the肺长property of the GMSK modulator to1

gmskMod = comm.GMSKModulator('bitInpul',true,'pulselength',1,。。。'SamplesPerSymbol',sps);mskMod = comm.MSKModulator('bitInpul',true,'SamplesPerSymbol',sps);

Modulate the data using the GMSK and MSK modulators.

modsiggmsk = gmskmod(数据);modsigmsk = mskmod(数据);

通过具有SNR的AWGN频道通过调制信号30D b。

rxsiggmsk = awgn(modsiggmsk,30);rxSigMSK = awgn(modSigMSK,30);

Use theeyediagramfunction to plot the eye diagrams of the noisy signals. With the GMSK pulse length set to1,眼图几乎相同。

EyeDiaGram(RXSIGGMSK,SPS,1,SPS / 2)

Figure Eye Diagram contains 2 axes objects. Axes object 1 with title Eye Diagram for In-Phase Signal contains an object of type line. This object represents In-phase. Axes object 2 with title Eye Diagram for Quadrature Signal contains an object of type line. This object represents Quadrature.

eyediagram(rxSigMSK,sps,1,sps/2)

Figure Eye Diagram contains 2 axes objects. Axes object 1 with title Eye Diagram for In-Phase Signal contains an object of type line. This object represents In-phase. Axes object 2 with title Eye Diagram for Quadrature Signal contains an object of type line. This object represents Quadrature.

设定肺长property for the GMSK modulator object to3。由于属性是不可运送的,因此必须先发布对象。

发布(gmskMod) gmskMod.PulseLength = 3;

Generate a modulated signal using the updated GMSK modulator object and pass it through the AWGN channel.

modsiggmsk = gmskmod(数据);rxsiggmsk = awgn(modsiggmsk,30);

With continuous phase modulation (CPM) waveforms, such as GSMK, the waveform depends on values of the previous symbols as well as the present symbol. Plot the eye diagram of the GMSK signal to see that the increased pulse length results in an increase in the number of paths in the eye diagram.

EyeDiaGram(RXSIGGMSK,SPS,1,SPS / 2)

Figure Eye Diagram contains 2 axes objects. Axes object 1 with title Eye Diagram for In-Phase Signal contains an object of type line. This object represents In-phase. Axes object 2 with title Eye Diagram for Quadrature Signal contains an object of type line. This object represents Quadrature.

通过改变的实验肺长GMSK调制器对象的参数到其他值。如果将属性设置为偶数,则应设置gmskmod.initialphaseOffset.toPI / 4.和update the offset argument of theeyediagramfunction fromsps/2to0for a better view of the modulated signal. In order to more clearly view the Gaussian pulse shape, you must use scopes that display the phase of the signal, as described in theCPM相树例子。

算法

该对象实现了描述的算法,输入和输出MSK Demodulator Basebandblock reference page. The object properties correspond to the block parameters. For MSK the phase shift per symbol is π/2, which is a modulation index of 0.5.

Extended Capabilities

在R2012A介绍