Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Phase Coded Waveform

Phase-coded pulse waveform

Library

Waveforms

phasedwavlib

Description

The Phase-Coded Waveform block generates samples of a phase-coded pulse waveform with specified chip width, pulse repetition frequency (PRF), and phase code. The block outputs an integer number of pulses or samples.

Parameters

Sample rate

Specify the sample rate, in hertz, as a positive scalar. The value of this parameter must satisfy these constraints:

  • The ratio of Sample rate to Pulse repetition frequency must be an integer scalar or row vector of integers.

  • The product of Sample rate and Chip width must be an integer.

Phase code

Specify the phase code type to use in phase modulation. Valid values are:

  • Barker

  • Frank

  • P1

  • P2

  • P3

  • P4

  • Px

  • Zadoff-Chu

Chip width (s)

Specify the duration, in seconds, of each chip in a phase-coded waveform as a positive scalar.

The value of this parameter must satisfy these constraints:

  • The product of Chip width, Number of chips, and Pulse repetition frequency must be less than or equal to one.

  • The product of Sample rate and Chip width must be an integer.

Number of chips

Specify the number of chips in a phase-coded waveform as a positive integer. The product of the Chip width, Number of chips, and Pulse repetition frequency parameters must be less than or equal to one.

The table shows additional constraints on the number of chips for different code types.

If the Phase code parameter is...Then the Number of chips parameter must be...
Frank, P1, or PxA perfect square
P2An even number that is a perfect square
Barker2, 3, 4, 5, 7, 11, or 13
Zadoff-Chu sequence index

Specify the sequence index used in Zadoff-Chu code as a positive integer. This parameter appears only when you set Phase code to Zadoff-Chu. The value of the Zadoff-Chu sequence index parameter must be prime, relative to the value of the Number of chips parameter.

Pulse repetition frequency (Hz)

Pulse repetition frequency, PRF, specified as a scalar or a row vector. Units are in Hz. The pulse repetition interval PRI is the inverse of the PRF. The value of Pulse repetition frequency (Hz) must satisfy these constraints:

  • The product of Pulse width and Pulse repetition frequency (Hz) must be less than or equal to one. This is equivalent to the requirement that the pulse width is less than a pulse repetition interval. For the phase-coded waveform, the pulse width is the product of the chip width and number of chips.

  • The ratio of sample rate to any element of Pulse repetition frequency must be an integer. This is equivalent to requiring that the number of samples in one pulse repetition interval be an integer.

You can select the value of PRF by using block parameter settings or an input port.

  • When the Enable PRF selection input check box is not selected, you set the PRF using block parameters.

    • To implement a constant PRF, specify Pulse repetition frequency (Hz) as a positive scalar.

    • To implement a staggered PRF, specify Pulse repetition frequency (Hz) as a row vector with all strictly positive values. After the waveform reaches the last element of the vector, the process continues cyclically with the first element of the vector. When PRF is staggered, the time between successive output pulses is determined sequentially by the successive values of the PRF vector.

  • When the Enable PRF selection input check box is selected, you can implement a selectable PRF by specifying Pulse repetition frequency (Hz) as a row vector with positive real-valued entries. But this time, when you execute block, select a PRF by passing an index into the PRF vector into the PRFIdx port.

In all cases, when you use a varying PRF and choose Output signal format as Pulses, the number of samples per pulse can vary as well. When you choose Samples, the number of samples per pulse is fixed.

Enable PRF selection input

Check this box to select which predefined PRF to use during the simulation via input. Uncheck this box to use the Pulse repetition frequency parameter to define the PRF sequence used in the simulation.

Output signal format

Specify the format of the output signal as Pulses or Samples.

If you set this parameter to Samples, the output of the block is in the form of multiple samples. The number of samples is the value of the Number of samples in output parameter.

If you set this parameter to Pulses, the output of the block is in the form of multiple pulses. The number of pulses is the value of the Number of pulses in output parameter.

The value of Output signal format must be set to Samples when the Pulse repetition frequency (Hz) parameter is a row vector.

Number of samples in output

Number of samples in the block output, specified as a positive integer. This parameter appears only when you set Output signal format to Samples.

Number of pulses in output

Specify the number of pulses in the block output as a positive integer. This parameter appears only when you set Output signal format to Pulses.

Simulate using

Block simulation method, specified as Interpreted Execution or Code Generation. If you want your block to use the MATLAB® interpreter, choose Interpreted Execution. If you want your block to run as compiled code, choose Code Generation. Compiled code requires time to compile but usually runs faster.

Interpreted execution is useful when you are developing and tuning a model. The block runs the underlying System object™ in MATLAB. You can change and execute your model quickly. When you are satisfied with your results, you can then run the block using Code Generation. Long simulations run faster than they would in interpreted execution. You can run repeated executions without recompiling. However, if you change any block parameters, then the block automatically recompiles before execution.

When setting this parameter, you must take into account the overall model simulation mode. The table shows how the Simulate using parameter interacts with the overall simulation mode.

When the Simulink® model is in Accelerator mode, the block mode specified using Simulate using overrides the simulation mode.

Acceleration Modes

Block SimulationSimulation Behavior
NormalAcceleratorRapid Accelerator
Interpreted ExecutionThe block executes using the MATLAB interpreter.The block executes using the MATLAB interpreter.Creates a standalone executable from the model.
Code GenerationThe block is compiled.All blocks in the model are compiled.
For more information, see Choosing a Simulation Mode (Simulink) from the Simulink documentation.

Ports

Note

The block input and output ports correspond to the input and output parameters described in the step method of the underlying System object. See link at the bottom of this page.

PortDescriptionSupported Data Types
PRFIdxPRF selection index.Double-precision floating point
OutOutput waveform.Double-precision floating point

Introduced in R2014b

Was this topic helpful?