07-28-2014 04:02 PM
Please suggest code to find the time period of the process as shown in image.
or any example from which i can have idea.
Regards
MMS79
07-29-2014 08:01 AM
See the Pulse and Transition Measurements analysis functions and example code.
http://www.ni.com/example/30782/en/
http://zone.ni.com/reference/en-XX/help/371361K-01/lvwave/transition_measurements/
Also, for analyzing a transfer function or state-space model, there are functions in the NI Control Design & Simulation Toolkit.
http://zone.ni.com/reference/en-XX/help/371894G-01/lvctrldsgn/parametric_time_response/
07-29-2014 04:30 PM
A simplistic approach would be to low-pass filter both signals. Differentiate, and look for a threshold crossing that signifies a level change. You can subtract the indices of the threshold crossings and convert from samples to time to get td. After the first threshold crossing, threshold for a small value in the differentiated PV signal (i.e., where the slope returns to zero) to find the index of the "end" of the change. Find the Y values for both of these points to get the total change in PV and multiply by .63 and add that to the initial. Now use that value to threshold the raw (or filtered) PV signal to get that index. Again, subtract the indicies and convert to time; now you have tau.
YMMV. You may not need to filter (or even differentiate) the process signal; it just depends how clean and consistent it is.
Good luck!