transmit
Add-On Required: This feature requires the Wireless Testbench™ Support Package for NI™ USRP™ Radios add-on.
Description
transmit(
continuously transmits the IQ waveform detector
,waveform
,"continuous")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(___,
specifies optional name-value arguments for the transmission, in
addition to the input arguments from the previous syntax.Name=Value
)
Examples
Configure Preamble Detector and Capture Test Waveform
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
detector
— Preamble or energy detector
preambleDetector
object | energyDetector
object
Detector, specified as one of the following:
preambleDetector
objectenergyDetector
object (since R2023b)
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.
waveform
— IQ waveform to transmit
column vector of complex values
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 Device | Memory Buffer Size | Maximum Data Samples |
---|---|---|
USRP™ N310 | 2 GB | 229 |
USRP N320 | 2 GB | 229 |
USRP N321 | 2 GB | 229 |
USRP X310 | 1 GB | 228 |
USRP X410 | 4 GB | 230 |
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
, orplotDetectionSignals
object functions with thedetector
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 thedetector.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.
TransmitGain
— Transmit gain in dB
10 (default) | positive numeric scalar
Transmit gain in dB, specified as a positive numeric scalar. The valid gain range depends on the radio device.
Radio Device | Transmit Radio Gain |
---|---|
USRP N300 | 0 dB to 65 dB |
USRP N310 | 0 dB to 65 dB |
USRP N320 | 0 dB to 60 dB |
USRP N321 | 0 dB to 60 dB |
USRP X300 | 0 dB to 31.5 dB |
USRP X310 | 0 dB to 31.5 dB |
USRP X410 | 0 dB to 60 dB |
Data Types: double
TransmitCenterFrequency
— Transmit center frequency in Hz
detector
.CenterFrequency
(default) | positive numeric scalar
Transmit center frequency in Hz, specified as a positive numeric scalar. The valid center frequency range depends on the radio device.
Radio Device | Center Frequency |
---|---|
USRP N300 | 1 MHz to 6 GHz |
USRP N310 | 1 MHz to 6 GHz |
USRP N320 | 1 MHz to 6 GHz |
USRP N321 | 1 MHz to 6 GHz |
USRP X300 | 10 MHz to 6 GHz |
USRP X310 | 10 MHz to 6 GHz |
USRP X410 | 1 MHz to 8 GHz |
Data Types: double
TransmitAntennas
— Transmit radio antenna
"RF0:TX/RX"
or
"RFA:TX/RX"
(default) | string scalar
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 Device | Supported Antenna Port | String Scalar |
---|---|---|
USRP N300 | RF0 channel: TX/RX port | "RF0:TX/RX" (default) |
RF1 channel: TX/RX port | "RF1:TX/RX" | |
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 X300 | RFA channel: TX/RX port |
|
RFB channel: TX/RX port |
| |
USRP X310 | RFA channel: TX/RX port |
|
RFB channel: TX/RX port |
| |
USRP X410 | DB0 RF0 channel: TX/RX 0 port |
|
DB0 RF1 channel: TX/RX 0 port |
| |
DB1 RF0 channel: TX/RX 0 port |
| |
DB1 RF1 channel: TX/RX 0 port |
|
Data Types: string
Version History
Introduced in R2022aR2023b: Support for energy detector object
The function accepts an energyDetector
object as an input argument.
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
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:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
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
- United Kingdom (English)