- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Identify Onset Point in Process
I am trying to identify the temperature in my process when densification of the part begins. I labeled this on the graph below with an orange line. I also want to identify the temperature when densification pauses, as labeled by the green line. Can someone help me to figure out a script to do this?
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Identify Onset Point in Process
Here is my first pass of a possible method for finding the Onset Point. The script calculated the below graph
Names Default To Here( 1 );
dt = Current Data Table();
dt << clear select;
// Set the number of places to look ahead for calculations
lookAhead = 6;
// Loop across all rows, finding possible Onset Points
// temp[x] < temp[x+1] & temp[x] < Mean of the next 6 values of temp - 1.5 STD of those points
// When found, select those rows
For( i = 1, i <= N Rows( dt ) - lookAhead, i++,
If(
:Temperature Actual[i] < :Temperature Actual[i + 1] & :Temperature Actual[i] >
Mean( :Temperature Actual[Index( i + 1, i + 1 + lookAhead )] )
-Std Dev( :Temperature Actual[Index( i + 1, i + 1 + lookAhead )] ) * 1.5,
Row State( i ) = Selected State( 1 )
)
);
// Get the list of the selected rows
suspectRows = dt << get selected rows();
// The target criteria for the Onset is where the max temp values for the suspect rows
maxTemp = Max( :temperature Actual[suspectRows] );
// Get the time value for the selected suspect Row
timeval = :"time (s)"n[suspectRows[Loc( :temperature Actual[suspectRows], maxTemp )[1]]];
// Clear all selected rows
dt << clear select;
// Generate the Graph Builder Chart
gb = Graph Builder(
Size( 534, 456 ),
Show Control Panel( 0 ),
Variables(
X( :"Time (s)"n ),
Y( :Temperature Actual ),
Y( :Ram Travel Actual, Position( 1 ), Side( "Right" ) )
),
Elements( Points( X, Y( 1 ), Legend( 5 ) ), Points( X, Y( 2 ), Legend( 9 ) ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model( 5, Properties( 0, {Line Color( 21 )}, Item ID( "Temperature Actual", 1 ) ) )}
)
)
);
// Add a verticle reference line at the calculated Onset Point
Report( gb )[AxisBox( 1 )] << add ref line( timeval, solid, green, "", 3 );
// Select the row in the data table that is the calculated Onset Point
Row State( suspectRows[Loc( :temperature Actual[suspectRows], maxTemp )[1]] ) = Selected State( 1 );
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Identify Onset Point in Process
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Identify Onset Point in Process
I am open to suggestions. Basically the onset of densification is the point when the ram travel changes a lot over just a few data points. Densification pauses when there isn't a change in the ram travel for a set number of points (I am not sure of a specific number.) I figured that I could modify the formulas suggested to deal with the final specifics. Does this help?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Identify Onset Point in Process
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Identify Onset Point in Process
That definition sounds like a good start. How do I then pull the temperature value that corresponds to the Onset Point on the Ram Travel?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Identify Onset Point in Process
If you could attach a sample data table, I would be able to put together a starting script to calculate the Onset Point
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Identify Onset Point in Process
I have attached a subset of my data. Please let me know if this isn't clear.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Identify Onset Point in Process
Here is my first pass of a possible method for finding the Onset Point. The script calculated the below graph
Names Default To Here( 1 );
dt = Current Data Table();
dt << clear select;
// Set the number of places to look ahead for calculations
lookAhead = 6;
// Loop across all rows, finding possible Onset Points
// temp[x] < temp[x+1] & temp[x] < Mean of the next 6 values of temp - 1.5 STD of those points
// When found, select those rows
For( i = 1, i <= N Rows( dt ) - lookAhead, i++,
If(
:Temperature Actual[i] < :Temperature Actual[i + 1] & :Temperature Actual[i] >
Mean( :Temperature Actual[Index( i + 1, i + 1 + lookAhead )] )
-Std Dev( :Temperature Actual[Index( i + 1, i + 1 + lookAhead )] ) * 1.5,
Row State( i ) = Selected State( 1 )
)
);
// Get the list of the selected rows
suspectRows = dt << get selected rows();
// The target criteria for the Onset is where the max temp values for the suspect rows
maxTemp = Max( :temperature Actual[suspectRows] );
// Get the time value for the selected suspect Row
timeval = :"time (s)"n[suspectRows[Loc( :temperature Actual[suspectRows], maxTemp )[1]]];
// Clear all selected rows
dt << clear select;
// Generate the Graph Builder Chart
gb = Graph Builder(
Size( 534, 456 ),
Show Control Panel( 0 ),
Variables(
X( :"Time (s)"n ),
Y( :Temperature Actual ),
Y( :Ram Travel Actual, Position( 1 ), Side( "Right" ) )
),
Elements( Points( X, Y( 1 ), Legend( 5 ) ), Points( X, Y( 2 ), Legend( 9 ) ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model( 5, Properties( 0, {Line Color( 21 )}, Item ID( "Temperature Actual", 1 ) ) )}
)
)
);
// Add a verticle reference line at the calculated Onset Point
Report( gb )[AxisBox( 1 )] << add ref line( timeval, solid, green, "", 3 );
// Select the row in the data table that is the calculated Onset Point
Row State( suspectRows[Loc( :temperature Actual[suspectRows], maxTemp )[1]] ) = Selected State( 1 );