Main Content

comm.DQPSKModulator

Modulate using DQPSK method

Description

The comm.DQPSKModulator System object™ modulates using the differential quadrature phase shift keying method. The output is a baseband representation of the modulated signal.

To modulate a signal using differential quadrature phase shift keying:

  1. Create the comm.DQPSKModulator object and set its properties.

  2. Call the object with arguments, as if it were a function.

To learn more about how System objects work, see What Are System Objects?

Creation

Description

dqpskmod = comm.DQPSKModulator creates a modulator System object that modulates the input signal using the differential quadrature phase shift keying (DQPSK) method.

example

dqpskmod = comm.DQPSKModulator(Name=Value) sets properties using one or more name-value arguments.

example

dqpskmod = comm.DQPSKModulator(phase,Name=Value) creates a DQPSK modulator with the PhaseRotation property set to phase and the other specified properties set to the specified values.

example

Properties

expand all

Unless otherwise indicated, properties are nontunable, which means you cannot change their values after calling the object. Objects lock when you call them, and the release function unlocks them.

If a property is tunable, you can change its value at any time.

For more information on changing property values, see System Design in MATLAB Using System Objects.

Additional phase difference between previous and current modulated symbols in radians, specified as a real scalar. This value corresponds to the phase difference between previous and current modulated symbols when the input is zero.

Option to provide input in bits, specified as a numeric or logical 0 (false) or 1 (true).

  • When you set this property to false, the input to the System object requires an integer column vector with values in the range [0, 3].

  • When you set this property to true, the input must be a column vector of bit values whose length is an integer multiple of 2. This vector contains bit representations of integers in the range [0, 3].

Data Types: logical

Constellation encoding, specified as "Gray" or "Binary". This property controls how the object maps an integer or group of two input bits to the corresponding modulated symbol. When you set this property to "Gray", the object uses a Gray-encoded signal constellation. When you set this property to "Binary", the input integer m, between 0m3, shifts the output phase. This shift is (PhaseRotation + 2×π×m4) radians from the previous output phase. The output modulated symbol is exp(j×PhaseRotation + j×2×π×m4)×(previously modulated symbol).

Data Types: char | string

Data type of output, specified as "double" or "single".

Data Types: char | string

Usage

Description

y = dqpskmod(x) applies DQPSK modulation to the input data and returns the modulated DQPSK baseband signal.

Input Arguments

expand all

Input data, specified as an integer or column vector of integers or bits.

The setting of the BitInput property determines the interpretation of the input data.

Output Arguments

expand all

DQPSK-modulated baseband signal, returned as a column vector.

Object Functions

To use an object function, specify the System object as the first input argument. For example, to release system resources of a System object named obj, use this syntax:

release(obj)

expand all

stepRun System object algorithm
releaseRelease resources and allow changes to System object property values and input characteristics
resetReset internal states of System object

Examples

collapse all

Create a DQPSK modulator and demodulator pair.

dqpskmod = comm.DQPSKModulator(BitInput=true);
dqpskdemod = comm.DQPSKDemodulator(BitOutput=true);

Create an error rate calculator. Set the ComputationDelay property to 1 to account for the one bit transient caused by the differential modulation.

errorRate = comm.ErrorRate(ComputationDelay=1);

Run the processing loop. It consists of these main steps:

  1. Generate 50 2-bit frames.

  2. DQPSK-modulate.

  3. Pass the signal through an AWGN channel with a signal-to-noise ratio of 9.

  4. DQPSK-demodulate.

  5. Collect error statistics.

for counter = 1:100
    txData = randi([0 1],100,1);
    modSig = dqpskmod(txData);
    rxSig = awgn(modSig,9);
    rxData = dqpskdemod(rxSig);
    errorStats = errorRate(txData,rxData);
end

Display the error statistics.

ber = errorStats(1)
ber = 
0.0183
numErrors = errorStats(2)
numErrors = 
183
numBits = errorStats(3)
numBits = 
9999

Algorithms

expand all

Extended Capabilities

Version History

Introduced in R2012a