Effacer les filtres
Effacer les filtres

Generating high frequency sine waves - weird amplitude modulation

8 vues (au cours des 30 derniers jours)
EDIT: I added another example as a zip-file of a figure: 100Hz to 10kHz, sampled at 48.4kHz. You can see prominent amplitude dips at 8kHz and 9600kHz. These amplitude effects are getting even worse with slight deviations from common sampling rate, e.g.19.99kHz instead of 20kHz.
Dear All,
I am supposed to generate sine wave signals for auditory stimulation in a range of 100Hz to 10kHz.
This is my code so far:
fs = 44100; % sampling rate
duration = 100; % in ms
values = 0:1/fs:(duration*1e-3);
stimsignal = []; % pre-allocate variable
for i= 1:100
stimsignal = [stimsignal zeros(1,round(fs*0.01)) sin(2*pi*i*1e2*values)]; % create signal train of 100ms sine wave chunks, 100 Hz up to 10kHz
end
It works all right, but as a result, the sine wave chunks higher than 800 Hz show weird amplitude modulation patterns. Can anyone give me some explanation for this and how to avoid it? Any alternative matlab function? OR is it a result of the Nyquists sampling theorem and it's there anyways... so you can only reduce it by increasing sampling rate?
Thanks in advance,
Florian
  2 commentaires
David Hill
David Hill le 21 Sep 2020
Yes, your sample rate needs to be higher
florian schertenleib
florian schertenleib le 3 Nov 2020
Thanks David for your answer,
increasing sample rate to e.g. 192kHz only weakens the effect shown above, other sampling rates like 48.8kHz show even worse amplitude effects (amplitude of 8kHz signals are decreased by more than 10% !).
I would like to understand the effect and see how you can find the optimal sampling rate which is not too high...
Has anyone seen this before? Is there a keyword for literature?
Kind regards

Connectez-vous pour commenter.

Réponse acceptée

Mathieu NOE
Mathieu NOE le 3 Nov 2020

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by