(To be removed) Demodulate using BPSK method (2024)

Table of Contents
Description Creation Syntax Description Properties PhaseOffset — Phase of zeroth point of constellation 0 (default) | scalar DecisionMethod — Demodulation decision method 'Hard decision' (default) | 'Log-likelihood ratio' | 'Approximate log-likelihood ratio' VarianceSource — Source of noise variance 'Property' (default) | 'Input port' Variance — Noise variance 1 (default) | nonzero scalar OutputDataType — Output datatype 'Full precision' (default) | 'Smallest unsigned integer' | 'double' | 'single' | 'int8' | 'uint8' | 'int16' | 'uint16' | 'int32' | 'uint32' | 'logical' | ... DerotateFactorDataType — Data type of derotate factor 'Same word length as input' (default) | 'Custom' CustomOutputDataType — Fixed-point data type of output numerictype([],16) (default) | numerictype object Usage Syntax Description Input Arguments waveform — BPSK Modulated baseband signalcolumn vector | matrix var — Noise variance nonzero scalar Output Arguments data — Output signal datacolumn vector | matrix Object Functions Specific to comm.BPSKDemodulator Common to All System Objects Examples Demodulate BPSK Signal and Calculate Errors More About BPSK Hard-Decision Demodulation BPSK Soft Demodulation Extended Capabilities C/C++ Code Generation Generate C and C++ code using MATLAB® Coder™. HDL Code GenerationGenerate VHDL, Verilog and SystemVerilog code for FPGA and ASIC designs using HDL Coder™. Version History R2023a: To be removed See Also Functions Blocks MATLAB Command Americas Europe Asia Pacific

Main Content

(To be removed) Demodulate using BPSK method

expand all in page

comm.BPSKDemodulator will be removed in a future release. Use pskdemod instead. For information on updating your code, see Version History.

Description

The comm.BPSKDemodulator System object™ demodulates a signal that was modulated using the binary phase shift keying method. The object maps the points exp(jθ) or -exp(jθ) to 0 and 1, respectively. The PhaseOffset property specifies the value of θ in radians.

To demodulate BPSK-modulated signal data:

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

Syntax

bpskdemodulator = comm.BPSKDemodulator

bpskdemodulator = comm.BPSKDemodulator(Name,Value)

bpskdemodulator = comm.BPSKDemodulator(phase,Name,Value)

Description

example

bpskdemodulator = comm.BPSKDemodulator creates a demodulator System object that demodulates the input signal using the BPSK method.

bpskdemodulator = comm.BPSKDemodulator(Name,Value) creates a BPSK demodulator System object 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).

bpskdemodulator = comm.BPSKDemodulator(phase,Name,Value) creates a BPSK demodulator System object with the PhaseOffset property is set to phase, and the other specified properties 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 the constellation in radians, specified as a scalar.

Data Types: double

Demodulation decision method, specified as 'Hard decision', 'Log-likelihood ratio', or 'Approximate log-likelihood ratio'.

Data Types: char | string

Source of noise variance, specified as one of 'Property' or 'Input port'.

Dependencies

To enable this property set the DecisionMethod property to 'Log-likelihood ratio' or 'Approximate log-likelihood ratio'.

Data Types: char | string

Noise variance, specified as a nonzero scalar. The demodulation object expects a complex input signal. In the case of BPSK, the modulator outputs a complex signal with a zero-valued imaginary part. If you instead input a real signal to the demodulator, you must represent the noise power of a complex signal in the real-valued input signal by setting the variance value to twice the variance of the real-valued input signal.

When the noise variance or signal power result in computations involving extreme positive or negative magnitudes, see BPSK Soft Demodulation for demodulation decision type considerations.

Tunable: Yes

Dependencies

To enable this property set the VarianceSource property to 'Property'.

Data Types: double

Output datatype, specified as one of these options.

  • When you set this property to 'Full precision', the output data type is the same as that of the input when the input data type is single or double precision. If the input data is of a fixed-point type, then the output data type works as if you had set this property to 'Smallest unsigned integer'.

  • When you set the DecisionMethod property to 'Log-liklihood ratio' or 'Approximate log-liklihood ratio , the output data type is the same as that of the input and the input data type must be single or double precision.

    Note

    For integer data type inputs, the Fixed-Point Designer™ software is required when this property is set to 'Full precision' or 'Smallest unsigned integer'.

  • 'Full precision'

  • 'Smallest unsigned integer'

  • 'double'

  • 'single'

  • 'int8'

  • 'uint8'

  • 'int16'

  • 'uint16'

  • 'int32'

  • 'uint32'

  • 'logical'

Dependencies

To enable this property set the DecisionMethod property to 'Hard decision'.

Data Types: char

Fixed-Point Properties

Data type of derotate factor, specified as one of 'Same word length as input' | 'Custom'.

Dependencies

To enable this property set the DecisionMethod property to 'Hard decision'. Additionally, the object uses the derotate factor in the computations only when the input must be of a fixed-point type, and the PhaseOffset property value is not a multiple of π/2.

Data Types: char | string

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

Dependencies

To enable this property set the OutputDataType property to 'Custom'.

Data Types: fi

Usage

Syntax

data = bpskdemodulator(waveform)

data = bpskdemodulator(waveform,var)

Description

data = bpskdemodulator(waveform) applies BPSK demodulation to the modulated waveform and returns the demodulated input signal.

data = bpskdemodulator(waveform,var) uses soft decision demodulation and noise variance var.

Input Arguments

expand all

BPSK Modulated baseband signal, specified as a column vector or matrix of the same size as the input signal. For more information about the output datatype, see the OutputDataType property.

Data Types: double | single | fi
Complex Number Support: Yes

Noise variance, specified as a nonzero scalar.

The demodulation object expects a complex input signal. In the case of BPSK, the modulator outputs a complex signal with a zero-valued imaginary part. If you instead input a real signal to the demodulator, you must represent the noise power of a complex signal in the real-valued input signal by setting the variance value to twice the variance of the real-valued input signal.

When the noise variance or signal power result in computations involving extreme positive or negative magnitudes, see BPSK Soft Demodulation for demodulation decision type considerations.

Dependencies

To enable this property set the VarianceSource property to 'Input port'.

Data Types: double | single

Output Arguments

expand all

Output signal data, returned as a column vector or matrix. The OutputDataType specifies the data type for the output data.

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

Demodulate BPSK Signal and Calculate Errors

Generate a BPSK signal, pass it through an AWGN channel, demodulate the signal, and compute the error statistics.

Create BPSK modulator and demodulator System objects.

bpskModulator = comm.BPSKModulator;bpskDemodulator = comm.BPSKDemodulator;

Create an error rate calculator System object.

errorRate = comm.ErrorRate;

Generate 50-bit random data frames, apply BPSK modulation, pass the signal through an AWGN channel, demodulate the received data, and compile the error statistics.

for counter = 1:100 % Transmit a 50-symbol frame txData = randi([0 1],50,1); % Generate data modSig = bpskModulator(txData); % Modulate rxSig = awgn(modSig,5); % Pass through AWGN rxData = bpskDemodulator(rxSig); % Demodulate errorStats = errorRate(txData,rxData); % Collect error statsend

Display the cumulative error statistics.

fprintf('Error rate = %f\nNumber of errors = %d\n', ... errorStats(1), errorStats(2))
Error rate = 0.005600Number of errors = 28

More About

expand all

Extended Capabilities

Version History

Introduced in R2012a

collapse all

R2023a: To be removed

comm.BPSKDemodulator will be removed in a future release. Use the pskdemod function with the modulation order set to 2 to BPSK demodulate the input signal.

See Also

Functions

  • pskmod | pskdemod

Blocks

  • BPSK Demodulator Baseband

MATLAB Command

You clicked a link that corresponds to this MATLAB command:

 

Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.

(To be removed) Demodulate using BPSK method (4)

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a web site from the following list:

Americas

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom (English)

Asia Pacific

  • Australia (English)
  • India (English)
  • New Zealand (English)
  • 中国
  • 日本 (日本語)
  • 한국 (한국어)

Contact your local office

(To be removed) Demodulate using BPSK method (2024)
Top Articles
Latest Posts
Article information

Author: Gov. Deandrea McKenzie

Last Updated:

Views: 5968

Rating: 4.6 / 5 (66 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Gov. Deandrea McKenzie

Birthday: 2001-01-17

Address: Suite 769 2454 Marsha Coves, Debbieton, MS 95002

Phone: +813077629322

Job: Real-Estate Executive

Hobby: Archery, Metal detecting, Kitesurfing, Genealogy, Kitesurfing, Calligraphy, Roller skating

Introduction: My name is Gov. Deandrea McKenzie, I am a spotless, clean, glamorous, sparkling, adventurous, nice, brainy person who loves writing and wants to share my knowledge and understanding with you.