Align the two signals and measure the Phase Shift

Hello

I do an experiment in which I use the NI USB-6221 DAQ card. The jury is able to make 250 k samples/second. I want to measure two voltages in a circuit and find the phase shift between them at frequencies between 1 and 10000. First I ouputted a wave sinusoidal frequency variable through the Commission and applied to a test circuit. Then I used the Board to measure the two tensions consecutively (thus reducing the maximum sampling frequency at 125 k). I used the signals align VI and measured the two phases and then calculates the phase shift (VI attached in Phase 1). It worked well for the test circuit I built in which the phase shift went way logarithmique.20 degrees ~84.5 degrees and then stabilized. At frequencies above 5 000 Hz phase shift must have remained constant, but it varies more or less 1 degree. When the phase shift is 84.5 degrees, present a degree of variability is not particularly explicit. When I asked my program on the circuit that I really wanted to measure, the phase shift went from-. 5 degrees up to about 1.2 degrees. The change in the values of phase shift at high frequencies (> 3000) was environ.2 degrees. Given the small phase shift, this variation is unacceptable. Now I tried to use a sequence to each blood individually (increase the maximum sampling frequency to 250 k) and then align the two signals and measure the phase of each shift. When I use align it and re - sample Express VI to realign the two signals, I get the message "error 20333 analysis: cannot align two waveforms with dt even if their samples are not clocked in phase." Is it possible to align two signals I describe here? I enclose the new VI as Phase 2

Matthew,

I think I have an idea for at least part of the problem.

I took your program data and deleted stuff DAQ.  I have converted the Signal on the chart control and looked then what was going on with the signal analysis.

The output of the Waveforms.vi line has two waveforms, like the entry.  However, arrays of Y in the two waveforms are empty!  It does not generate an error. After some head scratching, reading the help files and try things out, that's what I think is happening: the time t0 two input signals are 1,031 seconds apart. Since the wavefoms contains 1,000 seconds of data, there is no overlap and may not align them.

I changed the t0 on two waveforms are the same, and it lines up.  The number of items in the tables is reduced by one. Then I increased the t0 of 0.1 seconds on the first element. The output had both greater than the entry by dt t0 t0 and the size of the arrays was 224998.  Reversing the t0 two elements shifts the phase in the opposite direction.

What that tells me, is that you can not reliably align two waveforms which do not overlap.

I suggest that you go to 2-channel data acquisition and that it accept the reduced sample rate.  You won't get the resolution you want, but you should be able to tell if something important happens.

You may be able to improve the equivalent resolution by taking multiple steps with a slight phase shift. This is similar to the way that old oscilloscopes of sampling (analog) worked. Take a series of measures with the signal you are currently using.  The make enough average to minimize changes due to noise. Then pass the phase of the signal of excitement to an amount that is smaller than the resolution of phase of sampling rate and repeat the measurements.  Recall that I calculated that for a 5 kHz signal sampled at 125kHz, you get a sample every 14.4 degrees. If shift you the phase of 1 degree (to the point/mathematical simulation), you get a different set of samples for excitement.  They are always separated by 14.4 degrees.  Take another series of measures. Transfer phase another degree and repeat.  As long as your sampling clocks are stable enough so that frequency does not drift significantly (and it shouldn't with your equipment), you should be able to get near resolution of what you need.  The trade-off is that you need to perform more measurements and may need to keep track of the phase shifts between the various measures.

Lynn

Tags: NI Software

Similar Questions

  • measurement of phase shift between two periodic signals acquired

    Hello

    I don't know how to explain my problem, but I'll give it my best shot. I'm two signals from sensors in tension. Two periodic signals have the same frequency, but a different amplitude. Normally they have a difference of phase of 0 or 180 degrees. The thing I have to let labview to check is if the signals are completely in phase or out of phase (180 degrees) completely. I am acquiring the wizard scene DAQ in a while loop. Does anyone have an idea how I can do this?

    To summarize: are the two things I need to know

    -l'amplitude (maybe just pick max max min distance)

    -If both signals are moving in the same direction (when the two signals are in phase) or if they move in the opposite direction (counter phase) - the exact phase angle value is not so important

    THX

    Thanks for the reply. After a night to think about the problem, I came up with a home-made solution. I used the point by point max and min vi to calculate the distance from crest to crest of my signals. Then, I used the time derivative of point by point to calculate the variation of the signal of the two signals. If the signals are in phase (both are increasing or decreasing at the same time with the other), then the two derivatives have the same sign (accept on the summits, of which I have excluded from the comparison). If the signals are out of phase (when one increases, the other is decreases and vice versa) then the two derivatives are opposite in sign. According to this, I can get all information that I need. If anybody should know a better way to achieve the same result, please say, but to know that it seems to work.

  • determine the difference in phase between a reference signal and measure

    Hello

    I use a PXI-1000 b with two cards DAQ, PXI-6133 and I need to measure the difference in phase between a reference sinusoid, acquired on a map and an acquis of the sinusoid measured on the other card.  So far, my idea is simply to acquire samples of N of these two signas as waveform data, then compare.  My problem is that I see a way to extract the information from the relative phase.  How would I do that?  Is there a better way to achieve this end?

    Hey GlenS

    Check out this link. Use it a Subvi spend an entry as the data acquisition card entry and the other your reference wave. It should work.

    Good luck

    -laboratory

  • variable phase shift between two analog output signals

    Hey! I would drive two different piezo elements with an sine - / square signals and have a phase shifted output signals. After some trail and error, I was able to get a second analog output on my card PCI-6221 (using LabView 8.2) also allowed me to have different amplitudes for both signals. However, I could not output signal having a frequency different and most importantly to my request to have one of the signals variably shifted phase.

    Thanks for the very useful suggestion. I have attached the file .vi installation I've run so far.

    Hello!

    A way to generate waveforms is using the analog waveform Toolbox. I created an example VI that is attached and that shows you a way to use the base generating function VI. I saved for LabVIEW 8.2.

    I hope this helps!

  • Two synchronized USRPs receive the same sine wave emitted by an another USRP, there is a phase shift random and obvious between the signals received from the 2 receivers

    Hello world!

    First of all, I use a USRP as a transmitter to emit a sine wave (the signal is exp(j2*pi*f*t)), and then I use the external clock to synchronize the two USRPs (Ref as PPS in are connected to the clock) as receivers. Receivers are in sync, and they are at the same distance from the transmitter, I thought that the signal they receive should have a nearly the same phase. However, in practice, the phase shift is big enough, and this problem really confuses me.

    It's the received signals of 2 receivers.

    Yes. What you observe is expected.

    Near the bottof of this document read the area 'alignment Phase vs Phase coherence '.

    http://www.NI.com/white-paper/14311/en/

    And also, for the alignment phase, see the following 'Angle of arrival detection with NI USRP '.

    https://decibel.NI.com/content/docs/doc-25716

    Erik

  • measurement of the phase of the signal

    Hi all

    I'm trying measureme the phase of the sine wave.

    I produced sine waveform and give '' measure spectral '' VI express to measure the magnitude and phase. The block of spectral measure gives picture of the spectrum amplitude and phase with the difference in frequency of 1 Hz.

    The input signal is 10 Hz sine wave. so I checked the 10th item in the table of phase and amplitude. I'm getting the right size. but I get different values for phase measurement

    For example, if the input signal of 0 degrees phase shift, the spectral measure gives as-90 degree. If the input signal has the phase shift of 20 degrees, the measure blocks gives as-70 degrees.

    I can't able to find that how to pass this phase-90 degree occurs.

    Kindly help to solve. I thank in advance.

    with respect,

    Renaud V

    Renaud V,

    The spectral measurement VI uses the FFT internally. In the detailed help for the FFT, the following definition is displayed:

    Note that exp(-j*2*pi*theta) = cos(2*pi*theta) - i * sin(2*pi*theta). This phase shift is defined in respect to the cosine, and non sine, explaining the 90-degree turn.

    Lynn

  • 200560 error during the generation of the two signals of AO

    Hello

    I am trying to send out two signals and I get error 200560 to "wait until done" vi.

    I was wondering if there is no solution for this problem.

    BTW, the vi is attached.

    Thank you

    Pooya

    You have your clock set to continuous samples. I don't know if you can use 'Wait until what' If you the task will never happen. Set your click on over and see what happens.

  • Two signals to two graphs of waveform

    Hi all!

    I had some problems with my data acquisition software.

    I got two signals and I show two signals to two different graphic signals.

    How to separate the signals?

    There is an entry called "table". Just this thread in the 2D DBL table. Drag the bottom of the table Index down so that you have a second output sub-table. Wire of your graphics. Fact. No need to plug anything on the index entries.

  • Meter with two adjustable phase shift

    Hello

    In this experimental device, I have a print head a TTL pulse-controlled piezoelectric ink jet delivering uniform droplets on a surface. I use the "time" version of the counter output vi (high-/ low-time) because it allows me to very easily change the characteristics of the droplets. I use a strobe approach for imaging the droplets as they are ejected. Basically, a strobe LED light is pulsed at a frequency that exactly matches that of the inkjet printhead. A CCD camera is used in order to imager droplets, who seem "frozen" on the screen due to the stroboscopic effect. Strobe LED is triggered by a train of pulses TTL (two pulse trains come from exits of meter on my USB-6353 X Series DAQ board).

    Of course, I could trigger both the inkjet Printhead and the strobe light with the same output of counter, which would ensure that their frequencies match. But it's really nice to have a 'strobe delay' that allows adjustment of the phase shift between the strobe triggers and printhead. The hardware supplied with the print head has this feature of strobe delay as an external button. It is useful, because you can basically lead through time by turning the button and view the formation of droplets when it leaves the end of the nozzle.

    I have a vi that may trigger sometimes the printhead and the flash, but I can't understand how to adjust a phase shift between the two, while the program is running. It should be possible, but I can't get it. I would really appreciate help with this. Attached is the draft code and a diagram which may help to explain what I want to do

    Thank you very much

    -Matt

    No - forget the INITIAL DELAY.  It's only for the (first) INITIAL pulse.

    You already want to adjust the time / low-time already, no?

    So having a new control called PHASE SHIFT, from scratch.

    Have a variable called OFFSET PHASE CURRENT, from scratch.

    When the PHASE SHIFT is modified (by the user), understand the difference between where he wants to be and where you are (control - PHASE CURRENT OFFSET) and add a lot of time the low TIMES, but only during a cycle.  Basically you're stretching of a cycle.  Store the new value in the course of PHASE SHIFT variable for next time.

  • Transformed Hilbert phase shift of 90 degrees

    I am usig transformed from Hilbert to provide me with a shift of the phase of the signal of a UHF radar unit.

    When I try to get the soft wave phase I get nothing. But when I replicate the output of the HIlbert and do a sinus I have the orginal without the phase shift wave.

    When I use a simulated sine wave and use the transformed Hilbert for her, I get a wave that is shifted by 90 degrees.

    So can you please help me with some splitters using Hilbert.

    There the best solutions for the phase shift?

    If you get a point at a time, use the version ptbypt as already mentioned. It includes a configurable size buffer.

  • Phase shift USRP N210 WBX has not remained constant

    Hello

    Here's the anouced;

    After setting the RF front end, each local oscillator can have a random phase offset by separators in the VCO/PLL channels. This shift will remain constant after initialization of the device and will remain constant until the device is closed or re-look.

    However,.

    I found the phase shift has not remained constant for some USRP N210 with WBX in system of synchronized receivers USRP N2x0 20 minutes.

    I'm currently building the measurement system of synchronized phase using USRP N200 x 2, x 2 OCTOCLOCK N210.

    CH1 and ch2 is connected with the MIMO cable

    Ch3 and ch4 is connected with the MIMO cable

    CH2 and ch4 is connected OCTCLOCK wiith 10 MHz and PPS.

    All entries were coupled to the SG not sincronized exit.

    attached screenshot shows the results observed for 200 minutes. .

    Right end indicates derivative of phase offset for 200 minutes;  white line is ch2 - ch1, red line is ch3 - ch1, green line is ch1 - ch4.

    It seems that each pair MIMO has kept the same phase offset but pairs diffreent MIMO.

    Is - this results?

    Here's the configulation in LabVIEW Block diagram.

    I tried like and found my phase USPR N210 WBX offset remains constant.

    http://forums.NI.com/T5/USRP-software-radio/USRP-time-and-phase-synchronization-for-source-localizat...

    My vi can be a bad thing.

    Sorry for the bad because of my misunderstanding infromation display.

    After fixing my mistakes of Vi, I'll show them.

  • Cisco Aironet 1131AG and measure access points to the power of the wireless signal?

    / * Style definitions * / table. MsoNormalTable {mso-style-name : « Table Normal » ; mso-tstyle-rowband-taille : 0 ; mso-tstyle-colband-taille : 0 ; mso-style-noshow:yes ; mso-style-priorité : 99 ; mso-style-qformat:yes ; mso-style-parent : » « ;" mso-rembourrage-alt : 0 à 5.4pt 0 à 5.4pt ; mso-para-marge-top : 0 ; mso-para-marge-droit : 0 ; mso-para-marge-bas : 10.0pt ; mso-para-marge-left : 0 ; ligne-hauteur : 115 % ; mso-pagination : widow-orphelin ; police-taille : 11.0pt ; famille de police : « Calibri », « sans-serif » ; mso-ascii-font-family : Calibri ; mso-ascii-theme-font : minor-latin ; mso-hansi-font-family : Calibri ; mso-hansi-theme-font : minor-latin ;}

    / * Style definitions * / table. MsoNormalTable {mso-style-name : « Table Normal » ; mso-tstyle-rowband-taille : 0 ; mso-tstyle-colband-taille : 0 ; mso-style-noshow:yes ; mso-style-priorité : 99 ; mso-style-qformat:yes ; mso-style-parent : » « ;" mso-rembourrage-alt : 0 à 5.4pt 0 à 5.4pt ; mso-para-marge-top : 0 ; mso-para-marge-droit : 0 ; mso-para-marge-bas : 10.0pt ; mso-para-marge-left : 0 ; ligne-hauteur : 115 % ; mso-pagination : widow-orphelin ; police-taille : 11.0pt ; famille de police : « Calibri », « sans-serif » ; mso-ascii-font-family : Calibri ; mso-ascii-theme-font : minor-latin ; mso-hansi-font-family : Calibri ; mso-hansi-theme-font : minor-latin ;}

    We have about forty points of access Cisco Aironet 1131AG spread over four floors and they all have a static IP (BVI1) on the same SSID, customers will be on its own virtual local area network (dhcp on 3750 switch) and they use several channels (1,6,11).  Cisco Wireless Control System is pending. This wireless network should support roaming for customers (there will be Wi - Fi tags of multiple AeroScout and wireless laptops). To measure the strength of the wireless signal and wireless coverage on each floor. My questions are:

    1. How to measure the strength of the wireless signal: we must meet at least three APs available with signal excellent (I guess for the WCS needs that will determine the position of the client in the building)? We thought to use NetStumbler and a few laptops with wifi and measure as many points as we can as simpler thing. Or should we use something like Cisco Aironet Client adapters for our mobile phone and then use Cisco Aironet Client Utility (is it worth buying for our analysis and measurement)? Any other idea?
    2. What signal level should we consider for a good wireless (dBm)?
    3. That we should propose for authentication, authorization and management accounting? What happens to the roaming wireless? I did not quiteunderstand WCS, WDS and WLC-that should be used for above tasks?

    Thanks in advance.

    "Use the command on the AP" sh dot11 associations "will give you the clients associated with success.  If you add the MAC address of the client at the end of the command, you will get detailed information.  Look under "Signal Strength" and "Signal to noise".  Under the strength of the Signal, you want a value of-75 dBm or lower (lower values the better).  -76 dBm and is bad.  Under Signal-noise, you want a value of 25 dBm or more (values higher the better).

    To measure the strength of the signal, I use Airmagnet, but you can use Netstumbler or Cisco Wireless Site Survey.

  • The best way to draw the difference of phase vs. time of two signals

    I have three channels (time, force, displacement) of approximately 1 000 seconds of a sinusoidal test load test data (sampling rate was 100 Hz).  I would draw the difference in phase between the force and displacement (perhaps using a second window 30) according to time.  I tried using a few different analysis functions, but I get what looks like random noise (phase difference between force and displacement is very small and the difference in amplitude is very fantastic - 4 orders of magnitude).  Any suggestion would be appreciated! -Jim

    Hi Jim,.

    The phase channel resulting, that you get with the function FFT DIAdem is in the frequency domain.  If you select a channel data and time in the FFT dialog box, you will get a frequency channel that results as well as the Phase channel resulting.  If you select only a weather channel of waveform data in the FFT dialog box, you will get a Phase of waveform frequency channel resulting.

    Brad Turpin

    Tiara Product Support Engineer

    National Instruments

  • Measurement of Phase difference of audio - learning how to set the reference

    I'm trying to measure the difference in phase between two audio inputs. (Left and right channel of my sound card)

    Both are free running 1 kHz audio samples that come in and out of phase.

    When the samples are in phase, everything seems to work fine and shows no phase difference.

    However once that signals start to emerge from the +-10deg phase the result keeps jumping around.

    It seems to be the fact that it is changing the reference to determine the phase.

    When I view the phase of the output of a channel is a sawtooth waveform, from 250deg and then wraps round to-110deg

    What I want, it's an entry set to 0 degrees and see the other inputs of difference of phase against it.

    Is there a way to give a signal as being the reference or another strategy?

    Thanks in advance for any help.

    PLEASE NOTE THAT THE acquire.jpg IS ACTUALLY THE VI.

    It wouldn't download like the vi. Please rename extension to acquire.vi to see.

    Finally managed to find the problem.

    Red rooster, I tried to replace your entries simulated with audio inputs card his real world and things turned out horribly.

    It doesn't seem to be a translation between the two. (Perhaps because of my understanding of Labview garbage)

    LabVIEW uses the internal reference of the DAQ cards in order to make phase measures.

    That's what all use the phase VI of measure and which lack of cards not NI - DAQ.

    That's what I thought that missed me first place but there's no way I can see simulations your own.

    To work around the problem, I used zero crossing detectors in order to compare the time ahead or lagging behind the benchmark for the calculation of phase.

    I got the core of the detector from somewhere on the forum but have lost the actual page. (my apologies to the author who deserves the credit)

    Anyway, hope this hepls someone.

  • Audition performs the subtraction of two signals?

    I'm just surprised that this feature is not widespread among all sound editing software out there.

    Just as we are able to perform the SUM of 2 channels (i.e. mix), we should be able to perform their SUBTRACTION.

    TIA,

    -Ramon

    Travis,

    It may be late to answer you, but yes you can. Simply to "reverse" a copy of your file wav and "Mix dough/overlap" with the original. The result will be 0.

    Now if you have two different recording, one for an A + B signal and the other with report to subtract B which is a bit more complicated because the two recording received these signals of different paths. This is likely to lead to the difference in frequency response and phase. Lets assume that it is not the case, you will first need to align the two record sources. You can do this in audition 3 using the convolution product, as shown in this video:

    How to make the audio loop perfect using Adobe Audition - YouTube

    Then, reverse the recording with the B signal and 'Paste Mix' together.

    You can do more research on adaptive filtering and the RMS, LMS filter if you want to compensate for the different audio track.

    Good luck!

Maybe you are looking for