FM Broadcast modulator baseband decimation factor
5 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(2 个)
Abhishek Ballaney
2018-3-29
https://in.mathworks.com/help/comm/ref/fmbroadcastmodulatorbaseband.html
2 个评论
Quenten Switten
2020-4-8
Have you find the solution on this question?
I ask this because I have the same problem.
Trey Shenk
2022-12-13
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);
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Modulation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!