Main Content

transmit

Transmit waveform using preamble or energy detector

Since R2022a

Description

example

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

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.

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

Generate a test waveform.

prePadding = complex(zeros(999,1),zeros(999,1));                  
postPadding = complex(zeros(1000,1),zeros(1000,1));               
testWaveform = [prePadding;zcseq*0.75;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: 153600000
            CaptureDataType: "int16"
       DroppedSamplesAction: "error"
                   Preamble: [16×1 double]
            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=30);

Capture 10 ms of data of the transmitted waveform.

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

Stop test waveform transmission.

stopTransmission(pd);

Input Arguments

collapse all

Detector, specified as one of the following:

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.

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).

The waveform length must be relative to the onboard radio memory buffer size.

Radio DeviceMemory Buffer SizeMaximum Data Samples

USRP™ N310

2 GB229

USRP N320

2 GB229

USRP N321

2 GB229

USRP X310

1 GB228

USRP X410

4 GB230

Note

  • The onboard radio memory buffers transmit data samples and capture or plotted data samples. Therefore, when specifying the transmit waveform, you must also account for the data capture length or plotted data length that you specify when calling the capture, plotThreshold, or plotDetectionSignals object functions with the detector input.

  • To avoid underflow during the transmission of a waveform of length less than 513 samples, the function reserves up to 1024 samples on the onboard radio memory.

  • If the detector object uses a Farrow rate converter to achieve the sample rate that you specify by the detector.SampleRate property, the object resamples the transmit waveform. The resulting waveform has an increased number of data samples. For more information, see Baseband Sample Rate in NI USRP Radios.

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

USRP X310

0 dB to 31.5 dB

USRP X410

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

USRP X310

10 MHz to 6 GHz

USRP X410

1 MHz to 8 GHz

Data Types: double

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

Radio DeviceSupported Antenna PortString 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"

USRP X310

RFA channel: TX/RX port

"RFA:TX/RX" (default)

RFB channel: TX/RX port

"RFB:TX/RX"

USRP X410

DB0 RF0 channel: TX/RX 0 port

"DB0:RF0:TX/RX0" (default)

DB0 RF1 channel: TX/RX 0 port

"DB0:RF1:TX/RX0"

DB1 RF0 channel: TX/RX 0 port

"DB1:RF0:TX/RX0"

DB1 RF1 channel: TX/RX 0 port

"DB1:RF1:TX/RX0"

Data Types: string

Version History

Introduced in R2022a

expand all