stopTransmission
Add-On Required: This feature requires the Wireless Testbench™ Support Package for NI™ USRP™ Radios add-on.
Description
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.
Version History
Introduced in R2022aR2023b: Support for energy detector object
The function accepts an energyDetector
object as an input argument.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
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)