LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Phase folding a signal over a specific frequency

Hello,

 

I was wondering if there were already any built in functions that allows me to phase-fold a sampled waveform over a given frequency. In my case I am sampling a noisy waveform in which I know the frequency and by phase-folding the signal can be extracted. I have attempted to write a VI which does this phase folding but maybe this sort of thing may have already been done due to it's helpfulness in signal processing. I didn't see anything in the signal processing pallette that does this (at least that was obvious to me!) but I have been impressed with some of the VI's within external packages suggested to me through this board.

 

My idea is that it would take in the input signal, sampling rate, and desired frequency to be folded over, and output the phase-folded signal. You would of course need to tell the VI how many bins in time you desire. 

 

Best

 

NKM

0 Kudos
Message 1 of 3
(2,754 Views)

What is phase folding? I have worked in signal processing for forty years and have never heard of it. A quick on-line search did not find anything very informative.

 

Lynn

0 Kudos
Message 2 of 3
(2,729 Views)

Hmm.. maybe there's different terminology ( I come from physics/astronomy ), but the aim is to 'fold' a sampled waveform over a given frequency. I think it is easiest to explain via an example. Say we sample a sinusoidal waveform with a period of 10 sec every 0.1 seconds. We then would assign each data point a value corresponding to the fractional phase starting at zero with the first sample. Mathematically we can write this as, 

 

fracphase = n * dt / P

 

n -> sample number, dt -> sampling rate (sec/samp), P -> period we are folding over (sec).

 

So in our example the fractional phase assigned to the data points would go like 0, 0.1/10, 0.2/10, 0.3/10... we want the the fractional phase to be restricted to 0 to 1.0 so we just need to subtract off the integer number of periods we have sampled over when we have sampled over a time longer than the period of the waveform. We then have a bunch of time indexes (the fractional phase values) for the sampled waveform which we can bin together and co-add. The idea is that the frequency we are folding over (and harmonics) will appear out of noisy data, and any other frequencies will be smeared out. Hopefully this makes sense as it's much easier to explain visually. I agree that there's not too much by doing a quick google search. 

 

FWIW I was able to get my code to work successfully. However, I imagine if this is built into some package it may be considerably faster than my code as I haven't done any optimization.

 

NKM

0 Kudos
Message 3 of 3
(2,715 Views)