Power spectrum in simulink

Status
Not open for further replies.

derick007

Newbie level 5
Joined
Dec 2, 2015
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
76
I am trying to understand how the spectrum analyser in SIMULINK (MATLAB) works, by simulating a model which inputs a simple cosine wave into the spectrum analyser and then observing the power spectrum on the analyser. I have set the WINDOW function in the anayser to RECTANGULAR and the sampling frquency to 20 times the frequency of the cosine wave. Therefore if I set the simulation time and therefore WINDOW length (time) to one period of the cosine wave the analyser will get N=20 samples.

I have used EXCEL to manually calculate the power spectrum values for N = 20 and used the same resolution bandwidth as the analyser and plotted them on a graph along with the SIMULINK results - see attachment.

How can the SIMULINK analyser plot such a detailed graph with only N = 20 samples ?
 

Attachments

  • spectrum.jpg
    332.4 KB · Views: 50

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…