Forum Discussion
Altera_Forum
Honored Contributor
13 years agoHi guys,
I'm making good progress so far. However, I have to add a question to this topic regarding more the DSP theory of analyzing frequency modulated signals. Maybe somebody has some good advices for me. In the attachment you find pictures from my Excel analysis of my modelsim output (Modelsim only writes the interesting parts to Excel, so that the frequency spectrums are all close to each other. Here I have devided them with the blue vertical lines). I was generating 12 bit binary test data with matlab and 12 bit flattop window data as input to my FFT core. The core itself is still the buffered burst one with N=4096. The simulated sampling frequency is 25000 kHz. In my matlab script that I attached in a former post, I created the frequency modulated signal some kind like this: Xfm=Ac*cos(2*pi*Fc*t + (randn(1) * 0.25 + beta)*cos(2*pi*Fsig*t))+offset; (1) I had a little random factor in there to simulate a small frequency jitter. You can just disregard that since it has nothing to do with my question. So the most basic frequency modulation formula may be this: Xfm=Ac*cos(2*pi*Fc*t + beta*cos(2*pi*Fsig*t)); (2) If I generate my testdata from that formula, I can get really nice magnitude results from the FFT Core (see attachment No. 1). The magnitude of the peaks in my spectrum were increasing/decreasing according to the variation of the factor Ac. My modelsim simulation puts out the results like in the first attachment. The peaks on both ends of the frequency range have about the same magnitude.However, this result does not came coincidently but took me some adjustments in all the parameters I have (fft depth, sampling rate, frequency deviation ratio, etc.). I had a bad feeling about that because when I change some of those parameters, I get results like in attachment No. 2. There, the peaks on each freqency corner are of different magnitude. In order to get this simulation result I changed the test data generation formula like that: Xfm=Ac*cos(2*pi*Fc*t + beta*cos(2*pi*Fsig*t + randn(1) * 2))+offset; (3) The difference now is, that the samples I generate not all start at the same angle but at a random one. My question is, if there is a procedure to set up the fft correctly if all parameters are known, but you cannot determine at which angle the sampling of the data starts. Here is what i think: If I have a fm signal with a frequency deviation rate of say 15Hz, then it took the signal 66.67ms to make a whole rotation. So I have to sample at least that amount of time to get both ends of the frequency range. This would lead, at a sampling frequency of 25Khz to 1667 samples (rounded). With this number of sample in my fft, i would expect that it would lead to a spectrum shown in attachment No. 1. But it isn't. It shows a spectrum that may only have a peak at either of the upmost or downmost frequency. So I increased the number of samples to the point, where I am now (4096) in order to get two nice peaks at the upmost and downmost frequency. But now, as I described, if I change my test data formula from (2) to (3), i get the results displayed in attachment No. 2. So in the end my question is: How can I set up the parameters of a fft (Fs and N) in order to get results as close to attachment No. 1 if I know all the parameters of my Fm signal except the modulation depth (Ac) and the point in time where actually the sampling of my real world data starts. Additionaly, does it improve the result if I increase the amount of time (and therefore also samples) that I "look" on the Fm signal and how much time does it need to make a good magnitude determination regarding the whole frequency spectrum of my Fm signal. As I described, I use the flattop window for my analysis because it should be the best for magnitude determination (so says the literature). I know, it's a long post, but if somebody can give me some hints or can point me to some literature that handles exactly those questions I have, I would be very happy. Regards, Maik