# Creating Vertical Boundaries around Transitions Between Operating Modes

## Recommended Posts

• Seeq Team

Objective:

Take a signal for which you have pre-defined upper and lower limits that are determined by an operating mode or production grade. We want to create a vertical boundary around the transition region between the two operating modes that has the greater of the two upper limits and the lower of the two lower limits.

Assumptions:

1. A signal for operating mode, product grade, etc exists that can be used to create a condition for all operating modes. The signal can be string or numeric and will be referred to in the solution as \$mode.
2. A signal for the maximum (and minimum) limit by operating mode is available. These will be referred to in the solution as \$maximumAllModes and \$minimumAllModes.
1. If a signal does not exist for these limits, one can be created so long as the maximum and minimum limit are known (can be constant or variable) for each operating mode. This can be done in Seeq Formula using the splice() function.

Solution:

1. Use Seeq Formula and the following syntax to create a condition (\$allModes) for all operating modes.
1. In R.21.0.41 or greater, \$mode.toString.toCondition()
2. In versions prior to R.21.0.41, \$mode.toString().toCapsules(max capsule duration)
2. Create a new condition (\$transitionRegion) using Seeq Formula that captures the time for some period before and after the transition between capsules occurs. The following syntax grabs a three hour window after the start of each capsule and shifts it backwards by 0.5 hours to capture a small amount of time before and a larger chunk of time following the transition.
1. \$allModes.afterStart(3h).move(-0.5h)
3. Calculate the minimum limit during the transition region. Use Seeq Formula and the following syntax to find the minimum value of the \$minimumAllModes signal and create a new signal (\$minimumTransitionRegion) that apply that value over the condition \$transitionRegion.
1. \$minimumAllModes.aggregate(minvalue(),\$transitionRegion,durationkey())
4. Calculate the maximum limit during the transition region. Use Seeq Formula and the following syntax to find the maximum value of the \$maximumAllModes signal and create a new signal (\$maximumTransitionRegion) that apply that value over the condition \$transitionRegion.
1. \$maximumAllModes.aggregate(maxvalue(),\$transitionRegion,durationkey())
5. Use the boundaries tool to create a new boundary on the original signal with the upper and lower limits. Inputs into the boundaries tool are:
1. Primary signal = the original signal
2. Relationship type = boundary
3. Name = [anything you want] we use transition boundary
4. Upper signal = \$maximumTransitionRegion
5. Lower signal = \$minimumTransitionRegion

The output is a boundary around the transition region like shown in the attached screenshot.

## Create an account or sign in to comment

You need to be a member in order to leave a comment

## Create an account

Sign up for a new account in our community. It's easy!

Register a new account