FM Radio (Transmitter + Receiver) in Matlab

Hello all. I want to design an FM radio (transmitter + receiver) using Matlab (not Simulink). Is it possible in Matlab? If yes, how? I am using stereo headphones as antenna on my laptop but I don't know how to get the signal from the headphone into Matlab code. Best regards.

5 Comments

It's possible using RTL-SDR device and RTL-SDR Support Package for Communication System Toolbox or analog devices like AD9361/ADE9364
Is it possible to use X310 device as well, from Ettus Research?
Thanks
x310 needs at least r2016b .
So, you're not actually wanting to use Matlab to do design, you want to use Matlab to implement the receiver.
Clearly, you're going to have to invest in some hardware.
Maybe while googling for that, consider also googling gnuradio and similar.
How do we design an FM transmitter and reciever using Simulink?

Sign in to comment.

 Accepted Answer

Ethem
Ethem on 20 Mar 2019
Edited: Darel on 25 Jun 2021

9 Comments

hello
Ethem can you answer me please
Iam using the RF Budget Analyzer in a project to measure the real Radio waves energy around us.
my laptop is toshiba tecra ( it has a mobile telephone built in it ) . in fact i dont have antina, but i modulate an old TV one.
the data was same with the antina and without using it .
my question is can i use my laptop without any ariel or antina ??
thank you in advance
Zina Al Shadidi
zina shadidi
It is likely that unless you add hardware, that at most you would be able to measure signal strength in the 2.4 GHz and 5 GHz ranges, using the built-in WiFi chips.
Only some WiFi chip manufacturers include the ability to ask about signal strength. With a laptop in particular, it is common for the manufacturer to use integrated chips that only do as much as the manufacturer needs at the time.
I would not expect that you would be able to access the signal measurements from your laptop's built-in phone, but I could be wrong about that.
Walter Roberson. thank you for reply
There are several SDR radios supported by Communications Toolbox. Full list is here:
If budget is an issue, you can get an RTL-SDR for about $20, including the antenna.
Hello Ethem How do we design an FM transmitter and reciever using Simulink?
Would i be able to transmit like music using this models?
Also could we use an awgn channel to transmit signals?
Ethem
Ethem on 15 Jun 2021
Edited: Ethem on 25 Jun 2021
@Mohammed Irfan Kalathil Parambil, you can transmit any signal with these models including music. It will just FM modulate and send through the SDR device. You will need an SDR device. See the list above. Regarding AWGN channel, since you will be using an SDR device, you will have a real channel. If we only consider the channel effects, assuming you have a line-of-sight setup and a short distance, it can be approximated as an AWGN channel. But, you will still see the hardware impairments, such as timing and frequency offsets. So, when you have SDR devices, you will never have an AWGN only channel.

Sign in to comment.

More Answers (1)

انتهى %For the option to change default settings, set cmdlineInput to 1. cmdlineInput = 0; if cmdlineInput % Request user input from the command-line for application parameters userInput = helperFMUserInput; else load('defaultinputsFM.mat'); end
% Calculate FM system parameters based on the user input [fmRxParams,sigSrc] = helperFMConfig(userInput);
% Create FM broadcast receiver object and configure based on user input fmBroadcastDemod = comm.FMBroadcastDemodulator(... 'SampleRate', fmRxParams.FrontEndSampleRate, ... 'FrequencyDeviation', fmRxParams.FrequencyDeviation, ... 'FilterTimeConstant', fmRxParams.FilterTimeConstant, ... 'AudioSampleRate', fmRxParams.AudioSampleRate, ... 'Stereo', false);
% Create audio player player = audioDeviceWriter('SampleRate',fmRxParams.AudioSampleRate);
% Initialize radio time radioTime = 0;
% Main loop while radioTime < userInput.Duration % Receive baseband samples (Signal Source) if fmRxParams.isSourceRadio if fmRxParams.isSourcePlutoSDR rcv = sigSrc(); lost = 0; late = 1; elseif fmRxParams.isSourceUsrpRadio rcv= sigSrc(); lost = 0; else [rcv,~,lost,late] = sigSrc(); end else rcv = sigSrc(); lost = 0; late = 1; end
% Demodulate FM broadcast signals and play the decoded audio
audioSig = fmBroadcastDemod(rcv);
player(audioSig);
% Update radio time. If there were lost samples, add those too.
radioTime = radioTime + fmRxParams.FrontEndFrameTime + ...
double(lost)/fmRxParams.FrontEndSampleRate;
end
% Release the audio and the signal source release(sigSrc) release(fmBroadcastDemod) release(player)

Categories

Find more on Communications Toolbox in Help Center and File Exchange

Tags

Asked:

on 11 Jul 2014

Answered:

on 22 May 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!