chirp signal - Frequency spectrum characteristics I am confused with my own intuition of the frequency response of a chirp signal.

In this case, the chirp signal is a frequency modulated signal with initial frequency starting at 100 Hz and ending at 300 Hz for 2 seconds.


Since the signal contains equal amounts of frequencies from 100Hz
to 300 Hz, the magnitudes of the frequencies should be equal? However, in the plot below, the frequencies at 100Hz and 300 Hz
have higher magnitude than the middle frequencies e.g. at 200Hz?
Should the plot be just a straight line?
Also, why does it appear that the middle frequencies are denser?
Is it correct to assume that since there are more frequencies in the
middle e.g. 100ish to 200ish than the end frequencies of 100Hz and
300Hz, then this should explain the increased density?


What is wrong with my assumptions?
Also do not neglect the fact that you are using a discretely sampled signal. You can create a 'cleaner' chirp by explicitly modifying the magnitude such that you have a perfectly clean magnitude and then convert it into the continuous signal using ifft. If you do fft of a signal generated with trig functions you will inevitably end up with artifacts due to the simple fact that your values are discretized and so may not fit exactly into the same fft bin when you transform them.