MathWorks - Mobile View
  • Sign In to Your MathWorks AccountSign In to Your MathWorks Account
  • Access your MathWorks Account
    • My Account
    • My Community Profile
    • Link License
    • Sign Out
  • Products
  • Solutions
  • Academia
  • Support
  • Community
  • Events
  • Get MATLAB
MathWorks
  • Products
  • Solutions
  • Academia
  • Support
  • Community
  • Events
  • Get MATLAB
  • Sign In to Your MathWorks AccountSign In to Your MathWorks Account
  • Access your MathWorks Account
    • My Account
    • My Community Profile
    • Link License
    • Sign Out

Videos and Webinars

  • MathWorks
  • Videos
  • Videos Home
  • Search
  • Videos Home
  • Search
  • Contact sales
  • Trial software
  Register to watch video
  • Description
  • Full Transcript
  • Related Resources

Waveform Generation Using MATLAB and SDR

Neil MacEwen, MathWorks

The Pluto Radio and Xilinx® Zynq®-Based Radio support packages from Communications Toolbox™ can be used to repeatedly transmit arbitrary signals onto the air using Software Defined Radio (SDR) hardware. Using a simple-to-use MATLAB® interface, any signal can be generated and downloaded onto the SDR hardware, from where it is repeatedly transmitted over the air. In parallel, the signal can be received and easily visualized, so the channel effects are visible on the received signal. First, a few lines of MATLAB code from WLAN Toolbox™ are used to generate a fully standard-compliant WLAN beacon signal. The SDR hardware is easily configured with a simple MATLAB object, and the generated signal is loaded onto the connected SDR hardware. The signal is then repeatedly transmitted onto the air. It is shown how the beacon signal appears on a laptop display as it scans for WiFi networks. In parallel, Simulink® is used to show how the spectrum of the transmitted signal can be viewed in real time. Next, a fully custom OFDM waveform is generated using the Communications Toolbox Waveform Generation App. Some null pilot signals are easily inserted to give the spectrum a distinctive shape before the signal is again loaded onto the attached SDR hardware and transmitted onto the air. The spectrum analysis setup from before is used in parallel to see the OFDM signal being transmitted in real time.

This video shows you how to generate and transmit standards-compliant and custom waveforms using MathWorks toolboxes and SDR connectivity. First, I will show you how to use WLAN Toolbox to generate and transmit an 802.11 beacon signal. Then I will show you how to use the Waveform Generator app to generate and transmit a fully custom OFDM waveform.

Let’s start by opening a simple Simulink model that we will use to display the real-time received spectrum. Note that this spectrum display can also easily be achieved in MATLAB. Looking at the receiver block parameters, I will configure the SDR device to sample at a sampling rate of 40MHz at a center frequency of 5.3GHz. Simply clicking play on this model will start the reception of samples from my attached hardware and display the spectrum analyzer. You can see some form of signal being transmitted 15MHz below my center frequency.

Returning to the MATLAB prompt, I will now generate my WLAN waveform with a prewritten script which is built on WLAN Toolbox functionality. The script returns a waveform sampled at 20MHz and configured to transmit at 5.3GHz. Next, I create the transmitter object I will use to configure the SDR device and transmit my waveform. I simply set the minimum set of parameters; namely, sampling rate, center frequency, and gain. Next, I resample my waveform to match my receiver sampling rate of 40MHz and call a single method on my transmitter object, which will download the waveform to my SDR device and transmit it repeatedly onto the air. You can see the sporadic beacon signals being transmitted, and, zooming in on the access point list on my laptop, you can see the TEST BEACON that has been transmitted. In a matter of a couple of minutes, I have generated and transmitted a fully standard-compliant WLAN waveform onto the air.

Next, I will generate and transmit a custom OFDM waveform. To do this, I will use the Waveform Generator app, which lets you generate, impair, visualize, and export modulated waveforms, including OFDM, QAM, PSK, and WLAN. To open the app, browse the available apps on the MATLAB toolstrip and select Wireless Waveform Generator. In the Waveform app, you can see that I have prepopulated an OFDM signal with some zero value pilots, giving a notch in the spectrum. I can generate the waveform and export it to the MATLAB workspace. Looking at the waveform, I can see that it has been sampled at 16MHz. Again, I resample the generated waveform to the sample rate the hardware is configured to use and transmit it onto the air using a single line of code. Again, we see in the received spectrum the clear notch that we generated with the Waveform Generator app. 

The functionality I have shown here is available in two different support packages for Xilinx Zynq-Based Radio hardware and Analog Devices Pluto Radio hardware. The support packages are free downloads based on Communications Toolbox. To find these support packages, you can search for “matlab sdr” in your favorite search engine. The MATLAB and Simulink SDR page should be at or near the top. On the page you can find out more details on the support packages shown in this video, or some of our other SDR support.

Related Products

  • Communications Toolbox

Learn More

Accelerate your SDR design by deploying to Xilinx Zynq SoC hardware
Use the Wireless Waveform Generator app to create, impair, visualize, and export modulated waveforms
Use the low-cost Analog Devices ADALM-Pluto Radio to work with RF signals
Related Information
Explore MATLAB and Simulink support for SDR

Feedback

Featured Product

Communications Toolbox

  • Request Trial
  • Get Pricing

Up Next:

23:53
Waveform Generation and Testing with Software-Defined...

Related Videos:

21:55
Getting Started with Software-Defined Radio using MATLAB...
22:13
Accelerating Signal Processing and Communications...
2:57
Design Wireless Systems with MATLAB and Simulink
46:17
5G/LTE/WLAN: Waveform Generation, Simulation, Measurement...

View more related videos

MathWorks - Domain Selector

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

Select web site

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
    • Deutsch
    • English
    • Français
  • United Kingdom (English)

Asia Pacific

  • Australia (English)
  • India (English)
  • New Zealand (English)
  • 中国
    • 简体中文Chinese
    • English
  • 日本Japanese (日本語)
  • 한국Korean (한국어)

Contact your local office

  • Contact sales
  • Trial software

Explore Products

  • MATLAB
  • Simulink
  • Student Software
  • Hardware Support
  • File Exchange

Try or Buy

  • Downloads
  • Trial Software
  • Contact Sales
  • Pricing and Licensing
  • How to Buy

Learn to Use

  • Documentation
  • Tutorials
  • Examples
  • Videos and Webinars
  • Training

Get Support

  • Installation Help
  • Answers
  • Consulting
  • License Center
  • Contact Support

About MathWorks

  • Careers
  • Newsroom
  • Social Mission
  • Contact Sales
  • About MathWorks

MathWorks

Accelerating the pace of engineering and science

MathWorks is the leading developer of mathematical computing software for engineers and scientists.

Discover…

  • Select a Web Site United States
  • Patents
  • Trademarks
  • Privacy Policy
  • Preventing Piracy
  • Application Status

© 1994-2021 The MathWorks, Inc.

  • Facebook
  • Twitter
  • Instagram
  • YouTube
  • LinkedIn
  • RSS

Join the conversation

This website uses cookies to improve your user experience, personalize content and ads, and analyze website traffic.  By continuing to use this website, you consent to our use of cookies.  Please see our Privacy Policy to learn more about cookies and how to change your settings.