FM Broadcast modulator baseband decimation factor

9 visualizaciones (últimos 30 días)
Emilija Lazdanaite
Emilija Lazdanaite el 29 de Mzo. de 2018
Respondida: Trey Shenk el 13 de Dic. de 2022
Does anyone have experience with the FM Broadcast block in Simulink? I keep getting the error "The signal length (number of rows) must be a multiple of the decimation factor:[...]", but the online explanation of what the decimation factor is is not really clear.

Respuestas (2)

Abhishek Ballaney
Abhishek Ballaney el 29 de Mzo. de 2018
https://in.mathworks.com/help/comm/ref/fmbroadcastmodulatorbaseband.html
  2 comentarios
Emilija Lazdanaite
Emilija Lazdanaite el 29 de Mzo. de 2018
yes, I've read the documentation, it does not explain what the decimation factor is. It only says "The input length of the audio signal must be an integer multiple of the audio decimation factor." Is the decimation factor then the audioLength/audioSampleRate? Because the number i get as the decimation factor in the error message is not that ratio.
Quenten Switten
Quenten Switten el 8 de Abr. de 2020
Have you find the solution on this question?
I ask this because I have the same problem.

Iniciar sesión para comentar.


Trey Shenk
Trey Shenk el 13 de Dic. de 2022
You can find the decimation factor using the comm.FMBroadcastModulator system function "info." Here's a modified version of the Mathworks FM example, with the input truncated so that you need to adjust the length.
audio_data = audioread('guitartune.wav');
audio_fs = 44.1e3; %sampling rate of audio
fs = 240e3; % modulated output sampling rate
fmbMod = comm.FMBroadcastModulator( ...
'AudioSampleRate',audio_fs, ...
'SampleRate',fs);
% truncate audio_data so that it we need to adjust length for demo
audio_data = audio_data(1:661100);
% get the decimation factor
mod_info = fmbMod.info;
dec_factor = mod_info.AudioDecimationFactor;
% zero-pad if needed
zpad_num = dec_factor - mod(length(audio_data), dec_factor);
audio_data = padarray(audio_data, zpad_num, 'post');
% generate modulated signal
sig = fmbMod(audio_data);
% demodulate and listen to confirm settings
fmbDemod = comm.FMBroadcastDemodulator( ...
'AudioSampleRate',audio_fs, ...
'SampleRate',fs,'PlaySound',true);
fmbDemod(sig);

Community Treasure Hunt

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

Start Hunting!

Translated by