Measuring the area under a torque waveform produced by a rotating shaft.

I am measuring a torque waveform that a shaft produces as it spins up to speed. I am using the waveform vi's in Labview to calculate the total time of the waveform. Is there an easy way to calculate the area under the waveform? The hope is that we wil be able to figure out the amount of work done.

Here is a VI that should do the trick. It is a basic integral of your waveform.
Christian L
NI Consulting Services
Christian Loew, CLA
Principal Systems Engineer, National Instruments
Please tip your answer providers with kudos.
Any attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system,
or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject
to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense
Attachments:
waveformpicture.vi ‏80 KB

Similar Messages

  • I need to measure the area in a JPEG

    My JPEG is 600 x 600 dpi.
    It includes a ruler and a cross section of a part,  The background is black.  The surface I am concered with border on the black background; it is the "white" outline of the part.  I need to find the "AREA" of this collection of "WHITE" color.Like the shell of a 2D egg.
    How do I do this?
    It would be great to configure the SCALE reference for the picture, drag a "SELECTION" box over the area, use a "EYE DROPPER" selection tool to click on the white of the outline, and click on "MEASURE" as in Photoshop.
    It didn't work in Photoshop and I'm asking if Illustrator can calculate the area?
    What steps are involved?
    Is it aslo possible to measure Max Width and Max Height?
    What Adobe product would work?
    Thank you

    cadsvc,
    You may try this way (depending on version), working in points/pixels:
    1) Place a copy of the image in a new document;
    2) Filter/Effect>Colors>Inverse to turn the desired area black;
    3) Click the border of the area with the Live/Auto Trace Tool, and Select the resulting area (with the black arrow);
    4) If the area has undesired holes in it, Object>Compound Path>Release and delete the paths of the former holes;
    5) See the W and H values in the Transform panel/palette;
    6) See the area in the Info panel or use the free Telegraphics Pathearea filter, see below.
    http://www.telegraphics.com.au/sw/
    Edit: Seemingly, the Telegraphics website no longer shows it, but you can find it under Graffix Path Area here:
    http://dzineblog.com/2010/09/10-popular-free-plugins-and-shareware-for-adobe-illustrator.h tml

  • How do you measure the change in area of an irregular shape?

    Hello everyone,
    This irregular shape is previously unspecified (other than the fact that it is white on a black background). Changes in the area would cause a motor to either speed up (increase) or slow down (decrease).
    I'm completely new to Labview and I'm still trying to figure out the jists of it. I have been playing around with the vision assistant. Any help would be appreaciated.
    Thanks.

    Just create a binary image using automatic thresholding (or fixed threshold if it is a constant), then use particle measurement to measure the area of the particle.  If it returns multiple particles, you probably want the largest one.  You might have to clean up the binary image by removing edge particles, etc. before using particle measurement.
    You should be able to measure the area several times a second easily, possibly at the frame rate of the camera.
    Bruce
    Bruce Ammons
    Ammons Engineering

  • Regression area under the curve

    hello
    i was trying to get the area under the curve. mathematically the
    integration can b done directly from 'numeric integration' vi. but what
    my problem is i cant define the time t1 to t3( as i need to set the
    threshold level to eliminate noise). what i previously did was defining
    the threshold level, find the 2 point of t1 and t2. but i left out the
    coloured portion. using regression will it help to get t3?if yes. how
    this will b done?
    thanks
    regards
    Attachments:
    graph(dt)1.PNG ‏8 KB

    This has been going on for a while:
    http://forums.ni.com/ni/board/message?board.id=170&message.id=226483#M226483
    http://forums.ni.com/ni/board/message?board.id=MathScript&message.id=145#M145
    http://forums.ni.com/ni/board/message?board.id=170&message.id=227008#M227008
    If I understand this correctly, you use a threshold to find the peak, but then you want the entire area, including the "wings".
    As I said before, if you pick the baseline right, your integration boundary does not need to be exact and can be significantly outside because the areas outside the peak will average to zero.
    If you have a mathematical model for the peak (e.g. gaussian), you can fit it and calculate the area from the fit.
    LabVIEW Champion . Do more with less code and in less time .

  • Integrate area under multiple curves

    I have a VI that will detect peaks (centroid) and their amplitudes from waveform data. I would like to also integrate the areas under each peak. I used the trigger/gate vi and the numeric integration vi to integrate the area under the first peak, but cannot get integration of later peaks. I am also wondering why I get the message: NaN when I try to use Simpson's integration rule (I am using trapezoid rule). The VI "read voltage make table" is attached.
    Attachments:
    read voltage make table.vi ‏601 KB

    I took a quick look at your VI. The reason you are only integrating the first peak is that the Trigger and Gate Express VI only triggers once. You need to put you data into a loop with a shift register and extract the section containing each peak. Then integrate each section separately (possibly in the same loop).
    I like to put the data acquisition and data processing (peak detection and integration) in separate, parallel loops. This can help avoid missed data and is easier to maintain. Look at the examples for State Machines.
    NaN often comes from dividing by zero. I do not recall the Simpson's rule algorithm, but if your data can have vertical segments you might see an infinite slope which could produce a divide by zero error.
    Lynn

  • How can i find area under a closed curve

    I am having set of Y-values w.r.t X-values.When i am using numerical integration.vi to measure area, it is showing wrong answer.Is there any other vi to find the area under a closed curve.

    Is the dt constant between your values? The numerical integration.vi needs them to be...
    What's the correct answer depends on how you are to interpolate between the points. The numerical integration.vi allows you to select between a number of approaches (Simpson's rule, trapezoidal etc..). It does not allow integrating the values as if it were a histogram...If that is what you want to do then all you need to do is to add the values and then multiply the result by dt...
    When you say that the answer is incorrect, could you give an example array, dt and correct result?
    If the curve is supposed to be a special function you could use regression analysis to find the formula of the curve and then integrate that...
    MTO

  • Calculating area under a curve - trapezium rule

    Hi,
    I'm trying to calculate the 'area under the curve' using the trapezium rule for a set of data points. i.e. I have a set of values, sampled at irregular intervals.
    create table measurements (
      measurement_value integer,
      measurement_time timestamp
    insert into measurements (measurement_value,measurement_time) values (50,TIMESTAMP'2011-01-01 00:00:00');
    insert into measurements (measurement_value,measurement_time) values (40,TIMESTAMP'2011-01-01 01:00:00');
    insert into measurements (measurement_value,measurement_time) values (40,TIMESTAMP'2011-01-01 03:00:00');
    insert into measurements (measurement_value,measurement_time) values (50,TIMESTAMP'2011-01-01 03:30:00');
    insert into measurements (measurement_value,measurement_time) values (40,TIMESTAMP'2011-01-01 05:00:00');
    insert into measurements (measurement_value,measurement_time) values (40,TIMESTAMP'2011-01-01 06:00:00');
    insert into measurements (measurement_value,measurement_time) values (60,TIMESTAMP'2011-01-01 07:00:00');I'd like to calculate the area of the 'curve' where the value was below a threshold of, e.g. 45.
    I can use the trapezium rule and assume a straight line between subsequent measurement, i.e. for the first 2 data points, the value drops from 50 to 40 linearly over the hour, and so the area for those measurements is (30min * 5)/2. For the 2nd and 3rd data points, the area is (120min * 5), for the 3rd and 4th, the area is (15min * 5)/2. And so on. The values are not necessarily round numbers, almost any value is possible.
    I've started by using 'lead' to obtain the subsequent measurement value and time, but I'm getting stuck dealing with the end points and non-trivial interpolation. Does anyone have any pointers to get me going?
    Thanks,
    Dan Scott

    Maybe this will do it:
    SELECT SUM(CASE
                WHEN curr_value > :threshold AND next_value < :threshold
                THEN -- Area of rectangle specified by threshold
                     (new_measurement_time_sec-curr_measurement_time_sec)*:threshold
                   + -- Area of remaining trapezoid
                     ABS((next_measurement_time_sec - new_measurement_time_sec)*((next_value - :threshold)/2))
                WHEN next_value > :threshold AND curr_value < :threshold
                THEN -- Area of rectangle specified by threshold
                     (next_measurement_time_sec-new_measurement_time_sec)*:threshold
                   + -- Area of remaining trapezoid
                     (new_measurement_time_sec - curr_measurement_time_sec)*((:threshold - curr_value)/2)
                WHEN (:threshold < curr_value AND :threshold < next_value)
                  OR (:threshold > curr_value AND :threshold > next_value)
                THEN (next_measurement_time_sec-curr_measurement_time_sec)*:threshold
                ELSE -- Area of trapezoid
                     ABS((next_measurement_time_sec - curr_measurement_time_sec)*((next_value - curr_value)/2))
           END)  AS area
    FROM   (
             SELECT measurement_time
                  , curr_measurement_time_sec
                  , next_measurement_time_sec
                  , curr_value
                  , next_value
                  , (:threshold - LEAD(intercept) OVER (ORDER BY measurement_time))/LEAD(slope) OVER (ORDER BY measurement_time) AS new_measurement_time_sec
             FROM   ( SELECT measurement_time        
                           , TO_CHAR(measurement_time,'J')*24*60*60 + TO_CHAR(measurement_time,'SSSSS') AS curr_measurement_time_sec
                           , TO_CHAR(LEAD(measurement_time) OVER (ORDER BY measurement_time),'J')*24*60*60 + TO_CHAR(LEAD(measurement_time) OVER (ORDER BY measurement_time),'SSSSS') AS next_measurement_time_sec
                           , measurement_value                                        AS curr_value
                           , LEAD(measurement_value) OVER (ORDER BY measurement_time) AS next_value
                           , REGR_SLOPE(measurement_value, TO_CHAR(measurement_time,'J')*24*60*60 + TO_CHAR(measurement_time,'SSSSS')) OVER (ORDER BY measurement_time) AS slope
                           , REGR_INTERCEPT(measurement_value, TO_CHAR(measurement_time,'J')*24*60*60 + TO_CHAR(measurement_time,'SSSSS')) OVER (ORDER BY measurement_time) AS intercept
                      FROM   measurements
           )Results:
    SQL> var threshold NUMBER;
    SQL> exec :threshold := 45;
    SQL> /
          AREA
    1191437.2The units are the time values were converted to seconds since January 1, 4712 BC (roughly).
    Edited by: Centinul on Jul 7, 2011 10:39 AM

  • Area under normal curve

    I need to calculate the area under a normal (gaussian) curve between two given limits. Is there some algorithm or freely usable library which I could use to calculate this? I've searched around but so far have come up with nothing.

    , i.e., something relatively close to
    the precision of 'double'. Why do you need it to be so precise? After all, when you're dealing with statistics there's always a level of probability. Even if you had double precision, would that make the final result more accurate?
    I expect there's
    probably some asymptotic approach that approaches the
    desired precision in some fixed number of
    iterations.
    Probably so. Just out of curiosity I wanted to measure the change in area as the number of points grew by a factor of 10. here are the results:
    0.9746011459589066 numPoints: 80
    0.9803552459545505 numPoints: 800 area - oldArea: 0.005754099995643913
    0.9808610053578404 numPoints: 8000 area - oldArea: 5.05759403289896E-4
    0.9809109343345651 numPoints: 80000 area - oldArea: 4.992897672473351E-5
    0.9809159208101573 numPoints: 800000 area - oldArea: 4.986475592216877E-6
    0.9809164193936031 numPoints: 8000000 area - oldArea: 4.985834457515992E-7
    0.980916469248969 numPoints: 80000000 area - oldArea: 4.985536594670492E-8
    Basically, if you use 10 times as many points from one to the next, you get an extra decimal place of accuracy. So if you can live with 4 decimal places of accuracy, then maybe this method is ok, otherwise the computation becomes expensive.
    Here is the code:
    public class ATest {
         public static void main(String[] args) {
         double oldArea = -1;
         for (int k = 0; k < 6; k++) {
              double dx = 0.1 / Math.pow(10, k);
              double x1 = -4.0;
              double x2 = 4.0;
              int numPoints = (int) Math.round((x2 - x1) / dx);
              double area = 0;
              for (int i = 0; i < numPoints; i++) {
                   int j = (i + 1) % numPoints;
                   double xi = x1 + i * dx;
                   double xj = x1 + j * dx;
                   double yi = calcFunction(xi);
                   double yj = calcFunction(xj);
                   area += xi * yj - xj * yi;
              if (area < 0) area = -area;
              area = area / 2;
              if (oldArea != -1) {
                   double dif = area - oldArea;
                   System.out.println(area + " numPoints: " + numPoints + " area - oldArea: " + dif);
              else
                   System.out.println(area + " numPoints: " + numPoints);
              oldArea = area;
         private static double calcFunction(double X) {
              double SIGMA = 1.0;
              double SIGMA_SQ_2 = SIGMA * SIGMA * 2;
              double C = 1.0 / Math.sqrt(Math.PI * SIGMA_SQ_2);
              double MU = 1.0;
              double xmu = X - MU;
              return C * Math.exp(-1 * xmu * xmu / SIGMA_SQ_2);
    }

  • How can I calculate area under a curve?

    I would like to use an integral equation to obtain positive and negative areas from graphed data. For example, I have a graph representing power for a 24 hour period and want to integrate the curve to obtain daily energy.

    One common way to approximate the area under a curve is to divide it into a series of trapezoids, with the area of each calculated as avg height x width. Then sum the areas.
    So with this table:
    x     

    trapezoid
    1
    0
    3
    2
    6
    11
    3
    16
    23
    4
    30
    39
    5
    48
    59
    6
    70
    83
    7
    96
    218
    You could use this formula in C2, filled down through the rest of the body cells in that column:
    =IFERROR((B3+B2)÷2×(A3−A2),"")
    This calculates the area of each trapezoid.
    The first row is defined as a Header Row, the last row as a Footer Row.  It's important not to have blank row(s) before the Footer Row. The sum formula in the Footer Row in C9 is:
    =SUM(C)
    Of course, the greater the number of x-y data points the better the estimate of the area under the curve.
    SG

  • Regarding Area Under Curve of ROC-ODM

    Which method is used by Oracle Data Miner to calculate the Area Under Curve(AUC) of ROC? either trapezoidal or other ? Please reply me

    Using the trapezoid method, the numerical integration is rather direct.
    See the attached vi.
    You can't get the function described by the X and Y arrays. You need to know the function from start ! However, you can always fit a function to the data. Polynomial curve fitting is quite popular. Of course this is something you could have done : fit a polynomial, then integrate it. With a large number of points (such as yours), the result will not be better than the trapezoid method.
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Area.vi ‏30 KB

  • Area under ink cartridges covered in black ink

    The are under the ink cartridges (when they are all the way to the right) is so covered with black ink, it rubs off on the plastic rollers and leaves big vertical black streaks on EVERY page.

    Hi , I understand that under the cartridges, it is covered in black ink. I will certainly do my best to help you. There would be a reservoir under the cartridges that should catch the extra ink, if it is full, you may have to have the printer serviced or use something to soak up the excess ink if you are out of warranty. I have included a document for fixing print quality issues, run the cleaning tool, to see if it may help.Fixing Print Quality Problems for the HP Photosmart Premium Fax All-in-One Printer Series (C410a, C410b, C410c, C410d, C410e). If the issue continues, please Contact HP Support for further assistance. Fill in the model number and the form to receive a case number for quicker assistance. If you appreciate my efforts, please click the 'Thumbs up' button below. Thank You.
      

  • Area under Curve -- ROC-- Classification

    Dear All,
    I had applied classification technique and plot the ROC curve, the Oracle Data miner calculates the Area under Curve of that ROC, anyone please tell me on which formula does the Area under curve is calculated....

    which formula is used to calculate the area under ROC curve in oracle data miner

  • Area under curve

    i am having the hardest time calculating area under a closed curve using basic maths. I have tried the integrate function (by splitting the curve in two and then adding the two). I am not susre of the answer so i am using basic math functions to code the thing in. So far i have:
    L1 = globusedchn
    CALL FORMULACALC("CH(L1):=CH('D')*CH('F')")
    CC(L1)="MULTIPLIED POINTS"
    CN(L1)="MULTPTS"
    R4 = 0
    R1 = CHDX(1, L1)
    R2 = CHDX(2, L1)
    R3 = R2 - R1
    R4 = R3 + R1
    A = R4
    FOR I = 2 TO CL(L1)
    L2 = I
    R5 = CHDX(L2, L1)
    R6 = CHDX(L2+1, L1)
    R7 = R6 - R5
    R8 = R7 + A
    A = R8
    NEXT
    CALL MSGBOXDISP(R8 & " = new area")
    maybe its my data but i keep getting R8 as 0. Any pointers will be greatly appreciated. Thanks ~sn

    Hi shefalika,
    It looks to me like the ChnIntegrate() function is the one to use. Note that the entire area under the curve is just the last value of the integrated curve. I included your original data in the ZIP file attached below, along with a quick VBScript which loads the data, creates 2 new channels which are the integral of channels 2 and 3 vs. channel 1, respectively, and loads a REPORT layout to show the results.
    The REPORT layout shows the raw data curves twice, once as a thick red line and then again as vertical blue spikes. This gives you the visual respresentation of the area under each curve being blue. I then included on each of the 2 graphs a text box which displays the last value of the integrated channel for that raw data curve. This is not a static value but an embedded @ function in the REPORT layout, specifically:
    Area Under Curve = @str(ChDX(CL('Area1'), 'Area1'), 'd')@
    for the 1st graph. Note that the area under the curve value is pulled explicitly from the channel named "Area1", so if you rename the integrated channel, you will need to change the channel reference in each of these 2 embedded @ formulas in the REPORT layout. The str() function formats the string result to not show any decimal points in the results (you could use 'd.ddd" instead, for instance). The ChDX(row, channel) function returns the value from the "row-th" data row of the "channel" data channel.
    Also note that several items in this example are built with DIAdem 9.1 features. If you need an earlier version of the example, let me know and I can build it again in DIAdem 8.1.
    Ask if you have further questions,
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments
    Attachments:
    Area Under Curve.zip ‏12 KB

  • How to measure the duration

    Hi all
    I would like to know how to measure the duration for which the "over temperature" is in on state in the example "Temperature system Demo.vi"
    i would also like to measure the transisent in a sine waveform.
    thanks in advance.
    with regards,
    McFerra
    Attachments:
    Temperature System Demo.vi ‏49 KB

    Hi McFerra,
    Find the attach vi that can solve your question..
    enjoy..
    DoN't FoRgEt To cLiCk KuDoS.....!!!
    Greeting from India,
    Malhar
    Attachments:
    Temperature System Demo.vi ‏46 KB

  • Measuring Multiple Areas in Acrobat

    Hi! I am wondering if anyone knows how to do the following in Acrobat. I need to be able to measure multiple areas of a PDF and then have those areas sum to an amount. And then derive a percentage of space that those areas occupy within the page. I've seen the measuring tool that Acrobat provides where you draw each line, but I'm wondering if there is some other way to measure the areas using a click and drag tool.

    Most units for the tools are in the Preferences:
    If you are talking 2D:
    Edit>Preferences>Catagories Pane>Measuring (2D)
    If you are talking 3D:
    Edit>Preferences>Catagories Pane>Measuring (3D)
    If you are talking Geo:
    Edit>Preferences>Catagories Pane>Measuring (Geo)
    If you are talking Units & Guides:
    Edit>Preferences>Catagories Pane>Units & Guides

Maybe you are looking for