cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar

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?

 

dkraeuter_sunne_0-1619545507663.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

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

onset.PNG

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 );
Jim

View solution in original post

7 REPLIES 7
txnelson
Super User

Re: Identify Onset Point in Process

What are the rules or algorithm to use to detect this....or are you asking the Community to determine such rules?
Jim

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?

txnelson
Super User

Re: Identify Onset Point in Process

How about something like, the Onset Point has been reached if the mean of the next X number of points - the standard deviation of those X number of points is less than the current data value?
Jim

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?

txnelson
Super User

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

Jim

Re: Identify Onset Point in Process

I have attached a subset of my data. Please let me know if this isn't clear.

txnelson
Super User

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

onset.PNG

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 );
Jim