Main Content

transmit

Transmit waveform using preamble detector

Description

example

transmit(pd,waveform,"continuous") continuously transmits the IQ waveform waveform to the air using the preamble detector pd. Use this function to send a test waveform to the air while trying to detect and capture a signal of interest using the same preamble detector. To stop the transmission, call stopTransmission(pd).

transmit(___,Name=Value) specifies optional name-value arguments for the transmission, in addition to the input arguments from the previous syntax.

Examples

collapse all

Configure a preamble detector to continuously send a test waveform with a known preamble sequence and capture data samples of the transmitted waveform.

Define a preamble sequence with good correlation properties. For example, generate and normalize a Zadoff-Chu sequence of length 137.

seq = zadoffChuSeq(38,137);
preamble = seq/norm(seq,2); 

Generate a test waveform.

prePadding = complex(zeros(999,1),zeros(999,1));                  
postPadding = complex(zeros(1000,1),zeros(1000,1));               
testWaveform = [prePadding;preamble;postPadding;]; 

Create and configure a preamble detector object, specifying a radio setup configuration previously saved in the Radio Setup wizard.

pd = preambleDetector("MyRadio")
pd = 
  preambleDetector with properties:

            CenterFrequency: 2.4000e+09
                  RadioGain: 10
                   Antennas: "RF0:RX2"
                 SampleRate: 250000000
            CaptureDataType: "int16"
       DroppedSamplesAction: "error"
                   Preamble: 0
            ThresholdMethod: "adaptive"
             FixedThreshold: 0
    AdaptiveThresholdOffset: 0
      AdaptiveThresholdGain: 0
              TriggerOffset: 0

pd.SampleRate = 10.24e6;

Specify the preamble.

pd.Preamble = preamble; 

Send the test waveform continuously.

transmit(pd,testWaveform,"continuous", ...
    TransmitGain=40, ...
    TransmitCenterFrequency=2.45e9, ...
    TransmitAntennas="RF0:TX/RX");

Capture 10 ms of data of the transmitted waveform.

[data,timestamp,droppedSamples,status] = capture(pd,milliseconds(10),seconds(1));

Stop test waveform transmission.

stopTransmission(pd);

Input Arguments

collapse all

Preamble detector, specified as a preambleDetector object.

Note

The first object function call in which you specify this object as an input requires a few extra seconds to load the application onto the hardware.

IQ waveform to transmit, specified as a column vector of complex values. The waveform length must be relative to the onboard radio memory buffer size. The buffer has a capacity of 2 GB, which amounts to a total of 2^29 data samples.

Note

Transmit data samples and capture or plotted data samples are buffered in the onboard radio memory. Therefore, when specifying the transmit waveform, take also into account the data capture length or plotted data length that you specify when calling the capture or plotThreshold object functions, respectively, with the pd input.

If you specify a waveform with a single or double data type, you must scale the transmit data sample values to the range [–1, 1).

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

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: TransmitGain=50 applies a gain of 50 dB to the transmit waveform.

Transmit gain in dB, specified as a positive numeric scalar. The valid gain range depends on the radio device.

Radio DeviceTransmit Radio Gain

USRP™ N310

0 dB to 65 dB

USRP N320

0 dB to 60 dB

USRP N321

0 dB to 60 dB

Data Types: double

Transmit center frequency in Hz, specified as a positive numeric scalar. The valid center frequency range depends on the radio device.

Radio DeviceCenter Frequency

USRP N310

1 MHz to 6 GHz

USRP N320

1 MHz to 6 GHz

USRP N321

1 MHz to 6 GHz

Data Types: double

Transmit radio antenna, specified as a string constant. Use this table to identity a supported radio antenna port on the radio device and the corresponding string constant that you can specify for this input.

Radio DeviceSupported Antenna PortValid String Scalar

USRP N310

RF0 channel: TX/RX port"RF0:TX/RX" (default)
RF1 channel: TX/RX port"RF1:TX/RX"
RF2 channel: TX/RX port"RF2:TX/RX"
RF3 channel: TX/RX port"RF3:TX/RX"

USRP N320

RF0 channel: TX/RX port"RF0:TX/RX" (default)
RF1 channel: TX/RX port"RF1:TX/RX"

USRP N321

RF0 channel: TX/RX port"RF0:TX/RX" (default)
RF1 channel: TX/RX port"RF1:TX/RX"

Data Types: string

Version History

Introduced in R2022a

See Also

Functions