Main Content

comm.DBPSKModulator

Modulate using DBPSK method

Description

The comm.DBPSKModulator System object™ modulates a signal using the differential binary phase shift keying (DBPSK) method. The output is a baseband representation of the modulated signal.

To modulate a signal using the DBPSK method:

  1. Create the comm.DBPSKModulator 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

dbpskmod = comm.DBPSKModulator creates a modulator System object, dbpskmod. This object modulates the input signal using the DBPSK method.

dbpskmod = comm.DBPSKModulator(phase) additionally sets the PhaseRotation property to phase.

example

dbpskmod = comm.DBPSKModulator(___,Name=Value) creates a DBPSK modulator object using any of the previous syntaxes and sets properties using one or more name-value arguments. For example, OutputDataType="double" sets the data type of output to "double".

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 shift in radians, specified as a scalar. This value corresponds to the phase difference between previous and current modulated bits when the input is zero.

Data Types: double

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

Usage

Description

Y = dbpskmod(X) applies DBPSK modulation to the input data, X, and returns the DBPSK-modulated baseband signal, Y.

example

Input Arguments

expand all

Input data, specified as a scalar or column vector of bits.

Data Types: double | logical

Output Arguments

expand all

Output data, returned as a scalar or column vector. The data type of the output data depends on the OutputDataType property.

Data Types: double | single

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 DBPSK modulator and demodulator pair.

dbpskmod = comm.DBPSKModulator(pi/4);
dbpskdemod = comm.DBPSKDemodulator(pi/4);

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);

Process the signal. The process includes these steps:

  1. Generate 50-bit frames.

  2. DBPSK-modulate the signal.

  3. Pass the modulated signal through an AWGN channel.

  4. DBPSK-demodulate the noisy signal.

  5. Collect error statistics.

for counter = 1:100
    txData = randi([0 1],50,1);
    modSig = dbpskmod(txData);
    rxSig = awgn(modSig,7);
    rxData = dbpskdemod(rxSig);
    errorStats = errorRate(txData,rxData);
end

Display the error statistics.

ber = errorStats(1)
ber = 
0.0034
numErrors = errorStats(2)
numErrors = 
17
numBits = errorStats(3)
numBits = 
4999

Algorithms

When the PhaseRotation parameter is θ, these rules govern the modulation method :

  • If the first input bit is 0 or 1, respectively, then the first modulated symbol is exp(jθ) or -exp(jθ), respectively.

  • If a successive input bit is 0 or 1, respectively, then the modulated symbol is the previous modulated symbol multiplied by exp(jθ) or -exp(jθ), respectively.

Extended Capabilities

Version History

Introduced in R2012a