Caculate phase difference between two sine waves

Hey guys

Im having problems with this. I read most of it-related topics, but none of the solutions posted helped me.

I have this small circuit and im taking a few values of voltage using my pc sound card. Data acquisition works well. As you may know, the sine wave read in Terminal resistance has a different phase compared to the dinna wave read to capacitor terminal. I tested the file VI and I can confirm it in the charts that I see out there.

I had trouble identifing the difference in phase (in degrees) between the two waves.

I would appreciate if you could help me with this. Here is my file of VI in case someone can give me some suggestions on how to calculate the difference of phase in degrees. Also, in this VI, there are some tests I did with no good result at all.

Any help will be appreciated

Hi moreins,

I changed the code, check it! I gave two solutions that somehow work to calculate the phase difference.

I would like to know if this solution works for you or not. Good day!

Sincerely,

Krisna Wisnu

Tags: NI Software

Similar Questions

  • Difference between two data aquistion

    Hello

    I got a data aquistion system that is supposed to keep data acquisition selection until the difference between two points a lot. For example, I get voltage (mv) as 2.31, 2.32, 2.34. 2.33 2.32, 2.33 2.32. the data up to a point, say 0.1V higher or lower than the first. Thewhole procss stop. Thank you for your suggestions.

    Try this... (Labview 8.2)

  • difference between two dates in the year/month/day in Obiee

    Hi gurus,

    I know this question have been asked and answered several times but I have a requirement that is a little different, then the previous ones.

    I want to calculate the difference between two dates in OBIEE10g in year/month/day format similar to the below SQL output

    SQL > select end_date, start_date,

    trunc (months_between (end_date, start_date) / 12) years.

    months of mod (trunc (months_between (end_date, start_date)), 12).

    End_date - add_months (start_date, trunc (months_between (end_date, start_date))) days

    t

    Thanks in advance

    SK

    Search for this

    "TIMESTAMPDIFF IN THE FORM OF MTHS # YEARS."

    or else

    To get the current mandate of employees since the date of hiring in the form of # years # mths or # year (s) # month (s)

    Concat (concat (cast (TIMESTAMPDIFF (SQL_TSI_Month, "Employee attributes". (((' ' Hiring last Date employee ", CURRENT_DATE) / 12 as char),"Year (s)"), concat (cast (MOD (TIMESTAMPDIFF (SQL_TSI_Month,"Employee attributes". (((((' ' Hiring last Date employee ", CURRENT_DATE), 12) as char), 'Month (s)'))

    Concat (concat (CAST (TIMESTAMPDIFF (SQL_TSI_YEAR, "Employee attributes". (((' ' Hiring last Date employee ", CURRENT_DATE) as CHAR),"Year (s)"), concat (cast (MOD (TIMESTAMPDIFF (SQL_TSI_Month,"Employee attributes". (((((' ' Hiring last Date employee ", CURRENT_DATE), 12) as char), 'Mth (s)'))

  • difference between two timestamps

    Hi gurus,

    I have a procedure which has 2 input parameters of type timestamp. I need to find the difference between these two stamps and be converted to a timestamp and return. Help, please

    Diifernce between two timestamps is interval. You can not convert the difference between two timestamp timestamp and it makes no sense. What you expect:

    25/06/2014 11:25:37.524000 - 13:07:22.987654 20/06/2014

    SY.

  • Exact differences between two images

    I need to be able to tell the difference between two images of a pastel artwork.


    The first image is of the piece, to be hung on a wall or placed on a table.


    The second is a photo of the piece after it has been moved, shaken or vibrated during which time particles were moved.


    I tried superimposing the two images and see the difference between the layers.  The images never seem to perfectly align along the lines of reference drawn in ink on the piece, and I do not understand the presentation of grayscale of the layer mode of difference.  I would like to know if anyone has any photographic photoshopic, or insightful ideas on how to capture this specific detail of change.  Another big challenge is now the images themselves to the exact distance and exposure to the room at the before and after photos, especially if they were taken in two different places on different dates.

    Best I can think of is to load into Photoshop layers >, select the two layers and go Edit > auto alignment of layers.  Then to the blending mode of the layer from the top to the difference.

    You can test so that you know what to expect by opening an image and copy the layer of BG and setting the blending mode of the layer copied the difference.  It will show as a pure black.  Now make tiny changes to the upper layer.

  • How do the time difference between two dates?

    Hi all

    I use this query to get the time difference between two dates.

    Select to_timestamp ('2012-10-03 12:00 ',' YYYY-MM-DD hh)-to_timestamp ('2012-10-03 11:00 ',' YYYY-MM-DD hh) as double diff;

    but do not get the correct result.

    Thank you

    Left KEY... Left Padding of tanks.

  • Difference between two times

    I am building a working method in LiveCycle, and I want to track how long the procedure takes. To do this, I have two time fields, and then a third time field to find the difference between two time fields. Looking at other posts to discussion, I could find a Javascript code that was part of what I wanted, but I can't get the third time field to display in the format I want. I tried to change the habits of the fields and that did not work. Could someone offer some advice on how to change the format or help me with the code?  I couldn't figure to attach the actual file, but I have attached a picture of the PDF file and the Javascript code I used.  If you look at the TimeIn (hh: mm) and time (hh: mm) areas (on the photo, I have attached), you will notice that the TotalTime comes out like HMM, and I want that it out as hh: mm.

    Adobe Time Difference Example.jpg

    Javascript Time Difference Code.jpg

    Any help would be greatly appreciated!

    Thank you

    this.rawValue = (totalHrs > 9? String (totalHrs): '0' + String (totalHrs)) + ':' + (totalMins > 9? String (totalMins): '0' + String (totalMins));

  • How to find the difference between two dates in the presentation layer

    Hi gurus,

    Hello to everyone. Today, I came with the new requirement.


    I need to know the difference between a date and the current date in the formula column application presentation layer.by.



    Thank you and best regards,
    Prates

    Hi Navin,

    TIMESTAMPDIFF function first determines the timestamp component that corresponds to the specified interval setting. For example, SQL_TSI_DAY corresponds to the day component and SQL_TSI_MONTH corresponds to the component "month".

    If you want to display the difference between two dates in days using SQL_TSI_DAY, unlike butterflies SQL_TSI_MONTH and so on...

    hope you understand...

    Award points and to close the debate, if your question is answered.

    See you soon,.
    Aravind

  • Find the difference between two date and time

    Hi friends,

    I wanted to find the difference between two date and time, but my qury is slightest error "invalid number."

    select sql_step_num,proc_name,run_seqno,start_date,end_date,(to_char(start_date,'HH24-MI-SS') - to_char(end_date,'HH24-MI-SS') ) as ed  
    from eval.EVAL_RUNTIME_DETAILS
    where trunc(start_date) = trunc(sysdate) 
    order by sql_step_num;

    You try to get the feel between two char strings.
    And more difference between two dates gives a NUMBER of days.
    Try this:

    select sql_step_num,proc_name,run_seqno,start_date,end_date,numtodsinterval(end_date-start_date,'DAY') as ed
    from eval.EVAL_RUNTIME_DETAILS
    where trunc(start_date) = trunc(sysdate)
    order by sql_step_num;
    
  • Find the difference between two numbers (DBL)

    Hi all

    Is there a function in labview other than the subtraction function that can find the difference between the two numbers given?

    Thank you

    Davidson


  • What is the difference between a triangle wave, waveform of the triangle and the triangle pattern

    To generate a waveform of triangle, I have 3 vi I could use. Signal Processing-> generation of signals-> Triangle wave.vi, Signal-> signal generation processing-> Triangle Pattern.vi, programming-> wave->-> generation of waveform analog waveform-> Triangle waveform.vi.

    What is the fundamental difference between these 3. I understand that all 3 have a different set of entry and I can use them according to what combination of input data that I have. Are there any special cases for which each is used?

    You should get really understand DAQ and the difference between the data types. When you create a waveform data type, the data type includes timing information. For the acquisition of data the most important is the dt or the time between samples. You have configured the DAQ Assistant to use this information to generate the waveform. When you create the table 1 d, obviously it cannot contain information of timing and when you convert dynamic data, all you will get is a default dt 1.

    As indicated, you can use either feature, if you create the table 1 d, you will need to change the data to add to the dt you want.

    Look inside the basic function generator. It uses the lower level of triangular-wave function, you already mentioned. See how the timing information is added to the output of table D 1.

  • Difference between two numbers of laptop models

    Can someone tell me if there is a difference between these models of computers two laptops? As far as I can tell they are the same.
    M7-j120dx and M7-J010D. Thank you.

    Hello

    To the second machine:

    http://support.HP.com/us-en/document/c03770540

    You can check yourself, BUT I found at least 2 things that tell me that the first one is the best: it has screen FULL HD and better card WiFi (b/g/n a/c).

    Kind regards.

  • Difference between two dates

    Hello

    I have two columns both of them date data types.

    I would like to know the difference between these two dates.

    SELECTION INTERVAL ' + 2342 23:23:23 ' DAY (4) TO THE SECOND - INTERVAL ' + 102 13:13:13 ' DAY (4) SECOND FROM DUAL;

    But, I get this:

    '+ 2240 10:10:10.000000'

    I'd like to see the result in a year-month and jour-deuxieme groups. I can't do anything with + 2240 days...

    Thanks in advance!

    Hello Adme12

    You can use it.

    SET LINESIZE 110 PAGESIZE 20

    COLUMN today FORMAT A20

    COLUMN TOMORROW FORMAT A20

    COLUMN YEAR_MONTHS FORMAT A15

    COLUMN DAY_SEC FORMAT A30

    SET ECHO ON

    SELECT TO_CHAR (today, ' JJ.) MR. HH24:MI:SS' YYYY) LIKE TODAY

    , TO_CHAR (tomorrow, ' JJ.) MR. HH24:MI:SS' YYYY) TOMORROW

    NUMTOYMINTERVAL (MONTHS_BETWEEN (TOMORROW, TODAY), 'MONTHS') AS YEAR_MONTHS

    , NUMTODSINTERVAL (TOMORROW - ADD_MONTHS (TODAY, TRUNC (MONTHS_BETWEEN (TOMORROW, TODAY))), 'DAY') AS DAY_SEC

    Of

    (SELECT SYSDATE + INTERVAL ' + 102 13:13:13 ' DAY (4) ON THE SECOND THAT TODAY ' HUI)

    , SYSDATE + INTERVAL ' + 2342 23:23:23 ' DAY (4) ON THE SECOND TOMORROW

    OF THE DOUBLE

    )

    ;

    TODAY TOMORROW YEAR_MONTHS DAY_SEC

    -------------------- -------------------- --------------- ------------------------------

    23.04.2014 04:49 10.06.2020 14:59:10 + 000000006-02 + 000000018 10:10:10.000000000

    Of course, it is not so good that you have so many 0, but you can convert the result to a char (TO_CHAR) and you can enter.

    I hope this helps you!

    Kind regards

    David

  • Difference between two statement.

    I use 11.2.0.3 oracle version, and when I am running below pieces of code and expect similar results.

    Below is the variable declare package level as below.

    TYPE mycur IS REF CURSOR;

    Now mentioned below is my procedure inside the package. My question is, I want to understand the difference between the following two statement in the same procedure. as as statement: 1 give me several records to pk1, where as statement: 2 gives me the good result which is recorded under the outlet of the slider back.

    Statement: 1

    PROCEDURE p1 (pk1 in NUMBER,
    ret_cursor ON mycur)
    AS

    BEGIN
    Open Select ret_cursor *.
    A,.
    b,
    WHERE a.id = b.id
    AND (a.c1 = b.c1
    GOLD a.c2 = b.c2)
    AND a.c3 = pk1;

    END;
    /

    Statement: 2

    PROCEDURE p1 (pk1 in NUMBER,
    ret_cursor ON mycur)
    AS
    V_QUERY VARCHAR2 (4000);

    BEGIN
    V_QUERY: =.
    "SELECT."
    A,.
    b,
    WHERE a.id = b.id
    AND (a.c1 = b.c1
    GOLD a.c2 = b.c2)
    AND a.c3 = ' | PK1;

    Ret_cursor OPEN for V_QUERY;
    END;

    actually my mistake, I just the reason behind the question. I had published the name of the table variable / by their and are different than real.
    So the question was naming convention given by the developers, the name of the input variable looked exactly like that of the name of the column, it's why he estimated at something like 'and (1 = 1)'.

    The input variable name has been 'c3' as column name 'a' causing problem.

    a.C3 = c3

  • Difference between two rows in a table.

    Hi all

    I have a requirement where I need to calculate the difference of a column, but the values are in two rows.

    Its exactly like that, I'll have a table where I have stored incidents with their status and their modification dates

    example:
    Incident_Id: Status: Modified_Date (in seconds from a specific date)
    1: 1: 9080890
    1: 2: 9080999
    1: 3: 9081900
    2: 1: 10000900
    2: 2: 10001000
    2: 3: 10002000

    Now there I show the time spent by each incident in each State.

    That is to say for the State 1 I need the difference between the date of change of condition 2 and updated the date of status 1 Similarly

    2 necessary status the difference between the date of change of condition 3 and updated the status date 2 and so on.

    the real result, I need is like that

    Incident_Id: Status: Timespent
    1: 1: (modified_date (status2) - modified_date (status1))


    Please help me to write the query to do this.

    Kind regards
    Tauceef

    Can we assume that the lines are classified according TO the event status ?
    This (i.e. an Ordering) is necessary in order to systematically identify consecutive lines.

    Please try the analytical function LAG and less to the current value.

Maybe you are looking for