Curve fitting only part of a waveform

I am taking some data from an Oscilloscope and I need to do a curve fit.  As you can see from the data in the attachment the data begins at 0 and ends a 10e-6.  I just want to curve fit the part from 5e-6 to 10e-6.   This is what I have tried
1) I take the waveform and use a "Get Waveform Components".  I then take the Y data and strip off the first half of the data from the array.  Then I  use a "Build Waveform" and put in the new Y data and the dt data to make the NEW waveform.  I then put it in to the Curve Fitting Express VI.  This works well for the slope, but of course the intercept is off because the data that was at 5e-6 is now at 0.  And the data at 10e-6 is now at 5e-6 since I stripped off the first 5e-6 of data and rebuilt the waveform.   I thought I could use the "t0" value in the "Build Waveform" to set the start of the NEW waveform to be 5e-6, but it seems that the "t0" is only for a timestamp (its a calendar data). 
2) I thought about converting the waveform in to X and Y data because it would be easy to shift the X data by just adding 5e-6 to each value in the X array.  But then it wouldn't input to the Curve Fitting Express VI. 
3) I thought about using the "Locations" input to the Curve Fitting Express VI, but I haven't really been able to get that to work. 
Thanks for any help. 
Solved!
Go to Solution.
Attachments:
graph.jpg ‏128 KB

Hello,
Check out these examples and online docs relating to curve fitting. Perhaps they will be of some use.
 5th-order Curve Fitting Using Curve Fitting Express VI
Linear Curve Fitting a Random Waveform Graph
Overview of Curve Fitting Models and Methods in LabVIEW
Introduction to Curve Fitting
Best,
National Instruments
Applications Engineer

Similar Messages

  • How to copy only part of the music media folder and library to another Mac

    Dear friends,
    I run iTunes in Mac OS. The iTunes music media folder is now located in an external HD because it´s quite large (2T). The problem is that I´got a second Mac and I´d like to copy -in this second Mac, only part of my music using only its internal  HD (300 Mb) . How can I do this copy while preserving art and play-lists?
    Thanks in advance

    tcynk00 wrote:
    how I can transfer only selected pieces of music (all library will not fit anyway)
    that's what playlists are for.
    and how to maintain transfer process in future when I want to change the music on my nano.
    add/delete track to/from the playlist you sync to your device.
    JGG

  • How can I apply curve fitting to simple BER measurement data?

    I am collecting simple BER data from a communications receiver for modulations such as PSK, CPM, etc. The data looks good but has the usual measurement noise, which I would like to spiffy-up for customer presentations.
    I have tried virtually all of the vi's in the LV Fitting palette, with little or no success. One of the NI AE's provided me with a GP Fit approach, but it has problems when you introduce error. I have attached a vi which demonstrates this, and also shows an attempt on my part to use the Least squares vi, with various functional estimates of the erfc vi. The vi also includes sample data.
    I see MatLab (and possibly Wolfram) has a function specifically for BER smoothing, but NI doesn't, as best I can tell. I feel certain that one or more of the LV fitting vi's can be coerced into working with the correct parameters - but so far I can't find them!
    Has anyone tackled this problem with good results?
    One other thing - has anyone else noticed that the formula used by the LV erfc (complementary error function) is *not* the standard model used for BER/radio communications applications?
    Appendix B of Digital Communications by B. Sklar gives the conversion:
    Q(x) = 1/2 erfc (x/sqrt(2)), where erfc (x) is the LabView vi block.
    Thanks,
    Mark

    Hi Eric,
    Well, BER is just data measured at certain input levels to a receiver. For digital communications systems, we typically use Eb/No to specify the input signal strength, and measure the BER at that level. This is analagous to signal-to-noise ratio (SNR) measurements in the analog domain.
    The BER values tend to run from between .01 and 10E-5, or even 10E-9 for high performance systems. As a result of the wide range of BER values, it is usually plotted on a logarithmic (y-axis) scale. Values of Eb/No are in the range of a few dB, up to perhaps 15~20 dB. So the x-axis is normally 'linear', although in dB.
    I have attached the vi's again, and if you run the LS BER fit vi, you will see the data plotted. If you turn off the noise, you can see a very nice plot - the curve fit vi works fine. But if you add noise (which simulates what you would measure in a real system), and run it several times, you will see all kinds of responses - depending on the noise parameters. What I am looking for is something that gives me a nice smooth graph even with the noise turned on (which is what my real data looks like).
    Thank you,
    Mark

  • Curve Fit of ODE, should I use Lev-Mar or Constrained Nonlinear Optimization?

    I wanna do a curve fitting of differential equations, following is the equations:
    dx/dt = u*x-a*x
    ds/dt = b*u*x+c*x
    dp/dt = d*u*x+e*x+f*p
    and u = um*s/(km+s+s^2/ki)
    I've tried "nonlinear curve fit( Lev-Mar)", but I met difficulties when writing the f(x,a) of Lev-Mar.
    Then I tried "Constrained Nonlinear Optimization", I found that the example "Estimate Nonlinear Spring Constant.vi"
    in the "labview\examples\math\curvefit.llb" was similar to the fitting I tried to do, but there was only one parameter
    need to estimate in this example,but what I need is to estimate 3 parameters.
    However,I modified the example to my equations, it failed again.
    How can I achieve this? is it possible to do this fit only using Labview VIs or need Matlab Script Node?
    Any help will be appreciated.

    I forgot to mention that in the equations above,  a,b,c,d,e,f is constant,
    and the data of x,s,p corresponding with the data of time is already known,
    and which parameters I wanna identify is um,km,and ki
    帖子被myafu在12-22-2006 01:33 AM时编辑过了

  • Gaussian Peak Fit and Nonlinear Curve Fit on small data differ from Origin Peak fit

    Hi all,
    I am developing a program in which I have to fit Gaussian curve on only 4 or 5 data points. When I am using Gaussian Peak Fit or Nonlinear Curve fit, it linearly connects all the points while other fitting software like Origin is fitting Gaussian curve on the same set of data I have attached two images One is from Labview with Gaussian Peak Fit and NonLinear Fit and other is from Origin.
    Data is
    X                       Y
    799.09857        257
    912.25256        641
    1026.00366     1516
    1137.92871     1118
    1253.43713     329
    Labview user
    Solved!
    Go to Solution.
    Attachments:
    Origin_Fit.PNG ‏21 KB
    Labview_fit.PNG ‏15 KB

    That looks like a plot of the input data.
    When I run it with your data I get a Gaussian curve which looks much like your Origin plot.
    The Plot 2 curve is from 128 points equally spaced along X and Y calculated from the Gaussian formula in the LV help using the output parameters from the fit.  Plot 1 is the Best Gaussian Fit output from the fit VI.  It only has five points.
    I used default values for everything except X and Y.
    Lynn

  • Nonlinear curve fit

    Hi everybody,
    I am trying to fit a custom nonlinear curve to my data. I want to fit a curve to the data twice. After the first fit, I want to use the coefficient a (6.57962) in my second curve fit as my coefficient b. When I try to use this and create a custom equation by string concetanete, everything seems fine but I do not get what I expect to get. To double check I used curve fitting express VI and I added 6.57962 as a coefficient in my equation and at the end a turns to be 6.752. However, this does not happen in my second curve fit. Does anybody have any idea what might be wrong? I cannot find my mistake, could you please help me?
    Thank you very much
    Attachments:
    Read.vi ‏129 KB
    read.png ‏66 KB

    The errors you get provide some clues, although they are not very explicit.
    The -23001:  Syntax error of parser  is usually a sign that your string describing the function is ill-formed or that there is a parameter mismatch. You have both.
    The string array constant feeding into the second Lev-Mar VI has two elements, the second one being an empty string.  Even though the string is empty, the parser expects two elements in the Initial Parameters array. But since your equation has only one parameter (a), the proper solution is to remove the blank element from the constant array.
    The other problem is that the first Initial Parameters array is empty.  Maybe you always enter two values but I did not know what to put in. 
    The second fit is somewhat sensitive to the initial Parameter value. Negative values do not work. 1 returns 6.753... 2 through 6 and 8 (integer values only) return 6.246... 7 returns the same result as 1. Values 10 and above return the value entere with error -20041 (singular matrix) appearing at >=12.
    The initial b parameter in the first fit does not matter over a fairly wide range.
    I also noticed that you seem to have a severe allergy to straight wires. Wires running all over the diagram and particularly behind other objects makes it very hard to read your code. Dataflow along the wires should generally be from left to right as much as possible. The code works the same regardless of the number of bends in the wires but straighter wires are much easier on the programmer.
    Lynn

  • Nonlinear curve fit help needed

    I am in need of some help trying to fit a set of data that requires the use of nonlinear curve fitting.  I have attached a txt file containing the data that needs to be fitted.  The first row contains the x-axis values while the second row contains the y-axis values.  The model for this set of data can be described by a single parameter, A, for the first five data points.  The remainder of the data points can be described by the model A+A1*exp((0.4-x)/A2), where A, A1, and A2 are all parameter.  As you can see the two models share the parameter A.
    I have determined some initial values for each of the parameters: A=176.32, A1=2133.4133, and A2=1.4936.
    I have spent the last couple of days trying to figure out how to use the Lev-Mar nonlinear curve fit vi but have had little success.  I have been doing LabVIEW programing for many years now and I have never felt as lost as I do now trying to understand how the Lev-Mar nonlinear curve fit vi works.  Any help you can provide with my data fitting would be greatly appreciated.
    Thanks.
    -Alonzo
    Solved!
    Go to Solution.
    Attachments:
    Data.txt ‏1 KB

    I think the problem is that the first 5 points are not part of the data sent to Lev-Mar.  Because of this the fitting process fits the remaining data very well, but the constant term is able to freely move.  I modified the model function to output A for the first 5 terms, and the complete function for the rest.  The offset found is now more reasonable.
    Also, your quote your model to be A+A1*exp((0.4-x)/A2), but what is implemented in the model VI seems to be A+A1*exp((x-0.4)/A2).
    -Jim
    Attachments:
    ExponentialFunction.vi ‏19 KB
    FitExponentialExample.vi ‏24 KB

  • Curve fit

    Hi! I want to ask how I can fit a curve and see this in the graph for the obtained 2d array.
    I can obtain a 2d array (x-y) as a result of loop iteration clicking "Next Step" button for 14 times. After that, I want to fit a curve for this 2d array as a function of y=f(x).
    Also, I want to see the formula, and also function coefficients for this curve.
    I have tried a curve fitting as can be seen from the attached picture. However, it always failed. I can not obtain purely x-y curve (y=f(x)). Also, I have attached the sample VI. Could anyone help me ? I'm looking forward to hearing from you.
    Solved!
    Go to Solution.
    Attachments:
    sample_the_latest_one.vi ‏182 KB
    blockdiagram.JPG ‏51 KB

    Could you attach a typical data file? Thanks!
    Even better, create an indicator on the 2D array leading to the second loop. Run the VI and start fitting so the indicator contains 2D data. Now make the new indicator a constant with typical data (right-click terminal...change to constant). Now save and attach the VI. 
    mechen wrote:
    I attached the second while loop to use its stop button. I defined its stop button as a "Curve Fitting" button as can be seen from the front panel.
    Why not make it a state machine with a single loop? Your data is already in shift registers, so it would be available in the main loop. All you need is another state. The way you program it, you cannot easily go back to reading new data without additional code. Your fitting loop still needs a small wait or an event structure. Fitting needs to be done only of one of the inputs changes and not millions of times per second. You also don't need to wire all inputs, only the ones you want different from the defaults.
    Why do you have two instances of the same 2D array diagram constant. This makes the code unmaintainable, because identical changes would need to be done in two different places if you need to modify things in the future.
    mechen wrote:
    My question is how I can obtain a graph for 2d array.
    The x-axis will be the first column of the 2d array. The y-axis will be the second column of the 2d array.
    If x is not spaced equally, you need an xy graph. Simply extract the two columns using "index array", then bundle them into an xy graph. Check the shipping examples.
    LabVIEW Champion . Do more with less code and in less time .

  • "Only Part I" for Goods receipt (MIGO) in excise invoice tab

    Dear Gurus,
    I have configured a material with all CIN configuration setting, while doing goods receipt for that material I want to capture excise invoice through excise invoice tab, for which i need to select " Only Part 1" in the invoice tab.
    But in my currrent senario while posting goods recipt, In excise invoice tab, I am not detting " Only part 1" option when i select excise invoice tab.
    How to configure "only part 1" option to appear in  excise invoice tab.
    Kindly help...
    Regards,
    Prashanth Pai

    Hi,
    Check in
    Tax on Goods Movements - India - Business Transactions - Incoming Excise Invoices -  Specify Which Movement Types Involve Excise Invoices -
    ensure that RG23A & RG23 C Register is maintained against the movement types you are using.
    Regards,
    Vikas

  • I use Windows Vista and Microsoft Outlook. After migrating to iCloud, the calendar of iCloud tranferred only part of my past Calendar items to the folder iCloud Calendar in my Outlook. How can I transfer all the entries?

    I use Windows Vista and Microsoft Outlook. After migrating to iCloud, the calendar of iCloud tranferred only part of my past Calendar items to the folder iCloud Calendar in my Outlook. How can I transfer all the entries? In iCloud's site all are there.

    If the calendar is on iCoud.com, all you would need to do to get it on your phone is go to Settings>iCloud on your phone, sign into your iCoud account and turn Calendars on.  The iCloud calendars will then download to your phone.

  • I have Office 2011 which includes Word.  Ever since downloading Mavericks, when I try to send a two-page word document, some recipients get only one page.  Also sometimes when I burn an image from iPhoto on to a disc, only part of the image appears.  Why?

    I have Office 2011 which includes Word.  Ever since downloading Mavericks, when I try to send a two-page Word document by email, some recipients get only one page.  Also when burning an image from iPhoto (usually no larger than 1mb) on to a disc, only part of it appears.  It appears to have been magnified so that only a part of the image appears.  Can anyone enlighten me as to what is happening?  And how to fix it??

    I have Office 2011 which includes Word.  Ever since downloading Mavericks, when I try to send a two-page Word document by email, some recipients get only one page.  Also when burning an image from iPhoto (usually no larger than 1mb) on to a disc, only part of it appears.  It appears to have been magnified so that only a part of the image appears.  Can anyone enlighten me as to what is happening?  And how to fix it??

  • I downloaded audiobook from iTunes. It comes in 2 parts. Part one will not play, only part 2. When I tried to sync to ipod or iphone it prompted,"file could not be reaf from or written to".Can I fix this issue?

    I just purchased and downloaded an audiobook from iTunes. I tried to sync it to iPhone 4 and iPod Classic but with both devices got a message"file could not be read from to written to".  Then I tried to play the audiobook in iTunes and realized that only part 2 of my 2 part download will play. Part 1 will not play. Is this why I got the message? Is there any way to get another try at downloading my audiobook I just paid $15 for??

    Click the Shuffle button at bottom left of iTunes window so the crossed arrows are not blue.

  • Excise Goods Receipt Without  Only Part I

    Hi,
    We have done a goods receipt for an excisable material.
    At the time of goods receipt, we could not select "Only Part I"
    Now we want to post the Vendor Excise Invoice,
    I just ran the T Code J1I5 with Classification ROP and I am able to update the RG Part I Register,
    Now I want to post the excise value using T Code J1IH. Here I am confused which button to select . Here we get options like Additional excise, Other adjustment.
    Request you to please guide.
    What is the best way to handle this type of situation.
    Regards,

    Hi PK,
             The amount what u are seeing in the top is the cumulative amount for that month. What u have to do before doing the MMPV that select the value based on the account for e.g RG23BED then select the line and press the create menu button in the tool bar and then it ask in which account need to post it (i.e) at the bottom account. u have to select the top and bottom are the same one then if u save it once the system take entire amount in the top and deduct the same from the bottom account.
    That means the amount in the register will get reduce. The amount what ever u did the utilisation that will go and sit in the PLA account. From the PLA account the amount will be disbursed to the excise department. If u have not done then your PLA account will be more that means u have to pay more to your excise department without set-off amount.Loss to company.
    a. we are in back-log mode right now, if we don't run J2IUN, what will happen?. Is this statutory? Or will it impact our financial?
    Not a problem all back -log can be utilised at one shot and if u not run the J2IUn your set-off amount cannot be get back from excise.It is statutory.Yes it will impact your financial means your paying the both input and out put tax to the excise.
    b. what if I run J2IUN after we complete all the backlogs or year end?
    You have to do as a monthly basis not a year basis.Last financial year back log cannot be utllised for this year.
    c. What query should I put across to our client to know about their existing process?
    Whether they have a set-off process (Earlier they used to call Modvet) or all input taxes are inventories. Only this transaction is right for all the set-off invoices.i am sure all the OEM will have the set-off requirement
    d What query should I put across to our FI Consultant regarding this T Code.
    Ask him whether he checked all the GL balance for all these registers for ex RG23ABED get Zero. whether he is checking the PLA account. The output tax and input tax is properly got off-set.All the Excise GL Need to be reconcile at the month end. This is very very important activities.
    e. Is this the job of MM User or FI User (so that I can accordingly impart the KT)
    Utilisation is MM activity but FI consultant need to be with u because the posting date what ever u are giving in the input selection screen for the J2iUN that he has to tell . What ever date u give them system will post the accounting doc for that period. so be carfrul.
    Thanks
    Ganesh

  • Moving only part of iphoto library to external hard drive

    I would like to only move part of my iphoto library to an external hard drive.  Trying to archive my older pictures.  I know how to move the entire library but not so sure on how to move only parts of the library.  Do i need to create a second archived library and move the pictures I want to archive to that archived libary and then move the archived libary to an external hard drive?

    Here's one way to do it:
    Make sure the drive is formatted Mac OS Extended (Journaled)
    1. Quit iPhoto
    2. Copy the iPhoto Library from your Pictures Folder to the External Disk.
    Now you have two full versions of the Library.
    3. On the Internal library, trash the Events you don't want there
    Now you have a full copy of the Library on the External and a smaller subset on the Internal
    Some Notes:
    As a general rule: when deleting photos do them in batches of about 100 at a time. iPhoto can baulk at trashing large numbers at one go.
    You can choose which Library to open: Hold down the option (or alt) key key and launch iPhoto. From the resulting menu select 'Choose Library'
    You can keep the Library on the external updated with new imports using iPhoto Library Manager

  • With 2 devices, how do I sync only part of the library on one device? That is, sync only music and not the podcasts.

    Trying to sync part of a library on one device and all of the library on another. Not finding any options to select only parts of a library to be sync'ed. Any help appreciated.

    In ipod menu in iTunes, tick the "manually manage music and videos" then select the items that you want to sync. Cheers!

Maybe you are looking for