Showing results for 
Search instead for 
Did you mean: 

Spectrogram from freq-domain magnitude, phase?

I have complex frequency-domain data that I would like to use to make a spectrogram (energy vs freq and time).  The frequency-domain spectrum is evenly sampled with respect to angular frequency, and contains both magnitude and phase information.  I also already have a program that calculates the complex time-domain waveform for the data.  Is there a way to generate the spectrogram of these data, either by using a combination of built-in functions, or some other method?

I have looked into using the built-in spectrogram function for this problem, but it seems to deal only with real data, and to assume that the given data is in the time domain.   It also doesn't seem to take a scale along with the amplitude values it reads... in this case, how can it properly display the time and frequency scales? 

Since I already have the phase of each frequency within my data, I think it should be possible to translate phase into time delay.  I'm just having trouble figuring out how to actually do this.  Does anyone have any ideas?  Thanks!
0 Kudos
Message 1 of 3


As you mentioned, currently the WVD doesn't support complex math. But the good news is that the vi is open source so you can edit it as you see fit. I think this is probably a great product suggestion and encourage you to visit the Product Suggestion Center. Thanks for your feedback!


Chris C

National Instruments

Applications Engineer

0 Kudos
Message 2 of 3


Thanks for replying to my message.  It turns out that for my application a Wigner distribution representation (not quite WVD) is more useful.  I needed to write this function from scratch, so while I was at it, I made it support complex math.  Now all I need is to get the units to work out - I've noticed that the FFT and IFFT I have to use for these waveforms don't keep track of units at all.   I think I will suggest this along with the complex math support for the WVD Spectrogram.

0 Kudos
Message 3 of 3