Main Content

Baseband File Writer

Write baseband signals to file

  • Baseband File Writer block

Libraries:
Communications Toolbox / Comm Sinks

Description

The Baseband File Writer block writes a baseband signal to a specific type of binary file. Baseband signals are typically down-converted from a nonzero center frequency to 0 Hz. Sample rate, which is determined by the input signal sample time and frame size, and center frequency are saved when the signal is written to a file.

Examples

expand all

Generate and write a QPSK-modulated signal to a file. Then, read the file and plot the constellation diagram of the signal.

The model cm_baseband_writer_ex1 generates a QPSK-modulated signal and writes the noisy QPSK signal to a file named bbw_example.bb.

Open a second model, cm_baseband_writer_ex2, to read the signal from the file and display the constellation diagram.

Ports

Input

expand all

This port accepts a baseband signal to be saved under the filename specified by the Baseband file name parameter. The saved signal is always complex.

Data Types: single | double
Complex Number Support: Yes

Parameters

expand all

To edit block parameters interactively, use the Property Inspector. From the Simulink® Toolstrip, on the Simulation tab, in the Prepare gallery, select Property Inspector.

Name of the baseband file to write, specified as a character vector.

To specify the location where the file is saved, click Browse.

Center frequency of the baseband signal in Hz, specified as a positive scalar or row vector. When this property is a row vector, each element is the center frequency of a channel in a multichannel signal. The vector length equal the number of columns in the input signal Port_1.

Data describing the baseband signal, specified as a scalar structure or object.

Data Types: struct | object

Number of samples to save, specified as a positive integer or Inf.

  • To write all of the baseband signal samples to a file, set this property to inf.

  • To write only the last NumSamplesToWrite samples to a file, set this property to a positive integer.

Code generation

On the first model run, simulate and generate code for the block using only MATLAB® functions supported for code generation. If the structure of the block does not change, subsequent model runs do not regenerate the code.

Interpreted execution

Simulate model using all supported MATLAB functions. Choosing this option can slow simulation performance.

Block Characteristics

Data Types

double | integer | single

Multidimensional Signals

no

Variable-Size Signals

no

Tips

  • The Baseband File Writer block writes baseband signals to uncompressed binary files. To share these files, you can compress them to a zip file using the zip function. For more information, see Create and Extract from Zip Archives.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2016b

expand all