06-21-2011 09:55 AM
hello
I made a prog in LabVIEW is the compression of a signal. but my problem is that when I do FFT and IFFT after I not get the same signal with a large error.
is what my prog is powerful ??
06-21-2011 09:59 AM
here is my code vi
06-21-2011 10:07 AM
You've posted in the Feedback forum that discusses the forums and the software that runs the forums. You need to post in the LabVIEW board.
I'll notify Laura to see if the thread can be moved.
06-21-2011 10:22 AM - edited 06-21-2011 10:24 AM
Hopefully, this thread will be moved, so I can start replying here:
Your code makes absolutely no sense. What kind of compression do you have in mind? Can you point to a web site that describes the algorithm?
It almost looks like you want to keep only the major frequencies, but whatever you are doing seems silly and your order of operations does not seem correct. You are doing an FFT, throw away the phase information, and transform right back, again throwing away phase information then thresholding the backtransform. Makes no sense.
You could do an FFT, retain the complex components that have a magnitude above a threshold, then do a inverse real FFT to reconstruct the signal.
Also, you use charts instead of graphs.
06-21-2011 10:35 AM
altenbach wrote:You could do an FFT, retain the complex components that have a magnitude above a threshold, then do a inverse real FFT to reconstruct the signal.
Here's a quick draft (LabVIEW 8.0). Most likely it needs some tweaks. 😉
06-21-2011 10:44 AM
thank you so much i find the solution , i will send the .VI to see it after.
06-21-2011 10:49 AM
You also have significant spectral leakage, because (using your default values) the sample interval is not an integer multiple of your fundamental frequencies. If you would set fe=512, things look significantly better.
06-21-2011 11:05 AM
thank you so much
06-21-2011 03:32 PM
how can I calculate the compression ratio and PSNR (Peak Signal to Noise Ratio) ?
06-22-2011 05:20 AM
how can I calculate the compression ratio ?
is the formula:
TC = number of bits of the original signal / number of bits of the reconstructed signal