Main Content

comm.BPSKModulator

Modulate using BPSK method

Description

The BPSKModulator object modulates using the binary phase shift keying method. The output is a baseband representation of the modulated signal.

To modulate a binary phase shift signal:

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

example

bpskmod = comm.BPSKModulator creates a modulator System object™ bpskmod, that modulates the input signal using the binary phase shift keying (BPSK) method.

bpskmod = comm.BPSKModulator(Name,Value) creates a BPSK modulator object bpskmod, with each specified property set to the specified value. You can specify additional name-value pair arguments in any order as (Name1,Value1,...,NameN,ValueN).

bpskmod = comm.BPSKModulator(phase,Name,Value) creates a BPSK modulator object bpskmod. The object's PhaseOffset property is set to phase, and the other specified properties are set to the specified values.

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.

Phase of zeroth point of constellation in radians, specified as a finite real scalar.

Output datatype, specified as either double, single or Custom.

Fixed-Point Properties

Fixed-point data type of output, specified as a numerictype (Fixed-Point Designer) object with a signedness of Auto.

Dependencies

This property applies when you set the OutputDataType property to 'Custom'.

Usage

Description

example

waveform = bpskmod(data) applies BPSK modulation to the input data and returns the modulated BPSK baseband signal.

Input Arguments

expand all

Input data, specified as a column vector or matrix.

Data Types: double

Output Arguments

expand all

BPSK Modulated baseband signal, returned as a column vector or matrix of the same size as the input signal.

Data Types: double
Complex Number Support: Yes

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

constellationCalculate or plot ideal signal constellation
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

This example creates binary data, modulates it, and then displays the data using a scatter plot.

Create binary data symbols

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

Create a BPSK modulator System object

bpskModulator = comm.BPSKModulator;

Change the phase offset to pi/16

bpskModulator.PhaseOffset = pi/16;

Modulate and plot the data

modData = bpskModulator(data);
scatterplot(modData)

Algorithms

Phase modulation is a linear baseband modulation technique in which the message modulates the phase of a constant amplitude signal. Binary Phase Shift Keying (BPSK) is a two phase modulation scheme, where the 0’s and 1’s in a binary message are represented by two different phase states in the carrier signal

sn(t)=2EbTbcos(2πfct+π(1n));n{0,1},

for (n1)TbtnTb, n=1,2, 3, where:

  • ϕn = πm, m∈{0,1}.

  • Eb is the energy per bit.

  • Tb is the bit duration.

  • fc is the carrier frequency.

In MATLAB®, the baseband representation of a BPSK signal is

sn(t)=cos(πn);n{0,1}.

The BPSK signal has two phases: 0 and π. The probability of a bit error in an AWGN channel is

Pb=Q(2EbN0),

where N0 is the noise power spectral density.

Extended Capabilities

Introduced in R2012a