Fourier Transform in Simulink

Hello,
I'm simply trying to add up an arbitrary number of sine waves and output the frequency chart with the blocks below:
fft.PNG
the matlab function is to perform the fftshift:
function y = fcn(u)
y = fftshift(u)
size(y)
end
But the output of the array plot doesn't seem to make sense, as I've chosen 10 Hz and 20 Hz within the Sine Wave block:
Capture.PNG
The output of the array plot I would suspect should show peaks at both 10 Hz and 20 Hz, but displays something I'm not quite understanding:
Capture2.PNG
Does anyone have any suggestions on something I'm simply missing here?

댓글 수: 2

Nikhil Sonavane
Nikhil Sonavane 2019년 12월 23일
Can you share your Simulink model so that it is easier for me to reproduce your problem?
Zjuv9021
Zjuv9021 2019년 12월 23일
Please see attached.

댓글을 달려면 로그인하십시오.

답변 (2개)

Nikhil Sonavane
Nikhil Sonavane 2019년 12월 26일

0 개 추천

The Matrix Block used isn't giving desired results as the Sum over field is not configured properly. Change the Sum over field to Specified dimension and select the Dimension as 2. For more information execute the following command in MATLAB command window and execute it-
openExample('dsp/TransformTimeDomainDataIntoFrequencyDomainExample')

카테고리

도움말 센터File Exchange에서 Simulink에 대해 자세히 알아보기

질문:

2019년 12월 20일

답변:

2019년 12월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by