cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
Choose Language Hide Translation Bar
View Original Published Thread

识别过程中的起点

dkraeuter_sunne
Level IV

当零件开始致密化时,我正在尝试确定过程中的温度。 我在下面的图中用橙色线标记了它。 我还想确定致密化暂停时的温度,如绿线所示。 有人可以帮助我找出执行此操作的脚本吗?

 

undefined

 

This post originally written in English (US) has been computer translated for you. When you reply, it will also be translated back to English (US).

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

回复:识别流程中的起始点

这是我第一次尝试找到起始点的可能方法。脚本计算了下图

undefined

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

回复:确定过程中的起始点

我愿意提出建议。 基本上,致密化的开始是冲头行程在几个数据点上发生很大变化的点。 当压头行程在一定数量的点上没有变化时(我不确定具体的数量),致密化会暂停。我认为我可以修改建议的公式以处理最终的细节。 这有帮助吗?

This post originally written in English (US) has been computer translated for you. When you reply, it will also be translated back to English (US).

txnelson
Super User

回复:确定过程中的起始点

如果下一个X个点的平均值-那些X个点的标准偏差小于当前数据值,那么到达起始点怎么样?

This post originally written in English (US) has been computer translated for you. When you reply, it will also be translated back to English (US).

回复:确定过程中的起始点

这个定义听起来是一个好的开始。 然后,如何拉出与柱塞行程起始点相对应的温度值?

This post originally written in English (US) has been computer translated for you. When you reply, it will also be translated back to English (US).

txnelson
Super User

回复:识别流程中的起始点

如果你能附上一个示例数据表,我就能编写一个起始脚本来计算起始点

This post originally written in English (US) has been computer translated for you. When you reply, it will also be translated back to English (US).

回复:识别流程中的起始点

我已附上部分数据。如果不清楚,请告诉我。

This post originally written in English (US) has been computer translated for you. When you reply, it will also be translated back to English (US).

txnelson
Super User

回复:识别流程中的起始点

这是我第一次尝试找到起始点的可能方法。脚本计算了下图

undefined

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

This post originally written in English (US) has been computer translated for you. When you reply, it will also be translated back to English (US).