transmit
Description
transmit(
continuously transmits the IQ waveform pd
,waveform
,"continuous")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(___,
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
pd
— Preamble detector
preambleDetector
object
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.
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
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
orplotThreshold
object functions, respectively, with thepd
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
pd
object uses a Farrow rate converter to achieve the sample rate that you specify by thepd.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 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
TransmitCenterFrequency
— Transmit center frequency in Hz
pd
.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 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
TransmitAntennas
— Transmit radio antenna
"RF0:TX/RX"
or
"RFA:TX/RX"
(default) | string constant
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 Device | Supported Antenna Port | Valid 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" | |
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 R2022a
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)