cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
slscolep
Level II

Mixture DOE - how to limit number of ingredients in final formula?

Dear All,

I am using JMP for the first time and I'm trying to run a DOE with 6 mixture factors (A, B1, B2, B3, B4, B5) and 1 categorical factor. This is a chemical formulation and I only can use a maximum of 2 ingredients of type B, i.e., the final formula must have just 2 or a maximum of 3 ingredients (A + 1 type of B or A + 2 types of B).
Sum of all type B must make up between 1% and 40% of the final blend.
Can you help me to set up this in JMP?
Thank you,

Sofia

25 REPLIES 25
slscolep
Level II

Re: Mixture DOE - how to limit number of ingredients in final formula?

@Mark_Bailey I used your script and changed just the upper limits of my factors (as below). The design stops working as I need - maximum of 2 B factors.

I don't understand why... I don't see in your Custom Design any condition to tell to JMP we can only use 2 B's. Can you help?

DOE(
    Custom Design,
    {Add Response( Maximize, "Y", ., ., . ), Add Factor( Mixture, 0.6, 0.99, "A", 0 ),
    Add Factor( Mixture, 0, 0.2, "B1", 0 ), Add Factor( Mixture, 0, 0.2, "B2", 0 ),
    Add Factor( Mixture, 0, 0.2, "B3", 0 ), Add Factor( Mixture, 0, 0.03, "B4", 0 ),
    Add Factor( Mixture, 0, 0.05, "B5", 0 ), Set Random Seed( 343091112 ), Number of Starts( 305 ),
    Add Term( {1, 1} ), Add Term( {2, 1} ), Add Term( {3, 1} ), Add Term( {4, 1} ), Add Term( {5, 1} ),
    Add Term( {6, 1} ), Add Term( {1, 1}, {2, 1} ), Add Term( {1, 1}, {3, 1} ), Add Term( {1, 1}, {4, 1} ),
    Add Term( {1, 1}, {5, 1} ), Add Term( {1, 1}, {6, 1} ), Add Term( {2, 1}, {3, 1} ),
    Add Term( {2, 1}, {4, 1} ), Add Term( {2, 1}, {5, 1} ), Add Term( {2, 1}, {6, 1} ),
    Add Term( {3, 1}, {4, 1} ), Add Term( {3, 1}, {5, 1} ), Add Term( {3, 1}, {6, 1} ),
    Add Term( {4, 1}, {5, 1} ), Add Term( {4, 1}, {6, 1} ), Add Term( {5, 1}, {6, 1} ), Set Sample Size( 42 ),
    Simulate Responses( 0 ), Save X Matrix( 0 ), Make Design}
);
 

Capturar.JPG

 

Thank you

Sofia

 

Re: Mixture DOE - how to limit number of ingredients in final formula?

I used the model order (2) to force binary blends but not require ternary blends or higher otherwise. I got this with the original proportion ranges:

 

mine.JPG

 

Notice that in every combination of two components and others a simplex is achieved so that only the pure blends (vertices) and binary blends (edge centroids) are required. You restricted the proportions a lot:

 

yours.JPG

 

JMP must now create higher order blends (higher than binary blends) in order to salsify the constraint that the sum is 1 and to maximize the optimality criterion.

 

Why did you change the range of these proportions?

slscolep
Level II

Re: Mixture DOE - how to limit number of ingredients in final formula?

I had to change the proportions because B4 and B5 have very low upper limits... It is not possible to use the same quantities than we use with B1, B2 and B3...

Re: Mixture DOE - how to limit number of ingredients in final formula?

Ok. Let's take one more stab at this. You still only have a 3 component blend. You just don't know the names of the last two components and their maximum values change. That last piece causes the issue.

 

So, maybe this approach will work:

I create a design with two mixture factors: First B Proportion which ranges from 0 to 1 and Second B Proportion which also ranges from 0 to 1.

This design will also have two 5-level categorical factors: First B Type and Second B Type, each with levels B1, B2, B3, B4, and B5. I create this design with all interactions. i have included that design here.

 

Now we need to add some columns to this design table. I will create True First B Proportion which has a formula:

Dan_Obermiller_0-1612376665530.png

Essentially, the first B proportion times the range of the B factor + the lower limit (which is 0.01).

 

I then create the column True Second B Proportion which is also a formula:

Dan_Obermiller_2-1612376999205.png

 

which can go from 0 to upper limit of any of the B ingredients. These formulas convert the 0 to 1 scale to the proper scales for the chosen B component.

 

I create column A which is a formula of 1-True First B Proportion - True Second B Proportion. Once I have the levels of the B components chosen, A is easy so does not need to be part of the "design".

 

I added the column properties to the "new" mixture component columns so JMP recognizes this new 3 component blend.

 

Your design and model will then need to be based on A, True First B Proportion, True Second B Proportion, First B Type, and Second B Type. You cannot fit all of the 2-way interactions (I haven't the time to explore exactly why). So I removed the True Second B Proportion*Second B Type interaction. You also have to remember that this is now a combined Mixture-Process model, so the First B Type and Second B Type effects do not appear on their own in the model.

 

Finally, this design is not really very good as I just went with the default of 36 runs. I did not tell JMP the entire problem, so the default number of runs is not adequate. I would recommend going higher, perhaps near 70 runs? Once you create the design and made the modifications you should evaluate it. I found the Fraction of Design Space plot to be the best tool for this situation.

Dan Obermiller
slscolep
Level II

Re: Mixture DOE - how to limit number of ingredients in final formula?

Thank you @Dan_Obermiller.

I'm trying to reproduce your steps. As it is the first time I am using JMP and also first time doing DOE I am taking some time to follow your steps. 

 

I created the design with two mixture factors and two 5-level categorical factors and selected 2nd level interactions. 

I made the table and added 3 new columns (True B proportions and A). Then I defined these 3 columns  as mixture components.

What do I need to do next in order to redesign based on these new columns?

 

Additionally, we should avoid First B Type = Second B Type as sometimes the sum of both will go above the respective upper limits. E.g.: B1 0.105 + B1  0.1.

Can we define a restriction or so?

Thank you

Sofia

Re: Mixture DOE - how to limit number of ingredients in final formula?

This is NOT a problem that I would recommend for a first time JMP user or someone that is new to designed experiments. This is a real challenge, and mixtures are challenging enough on their own! In fact, there is an element of your design that I am not able to have JMP automatically correct for, but more on that later.

 

I will go through the steps in more detail.

Add a mixture factor, A that ranges from 0.6 to 0.99.

Add a second mixture factor, First B Proportion, that ranges from 0.01 to 0.4.

Add a third mixture factor, Second B Proportion, that ranges from 0 to 0.4.

Add a Categorical factor with 5 levels, called First B Type. The levels are B1, B2, B3, B4, and B5.

Add another Categorical factor with 5 levels, called Second B Type. The levels are B1, B2, B3, B4, and B5.

 

Now, in the Model window, click on the Interactions button and choose 2nd.

JMP will deliver a message that it removes some of the model terms, but it misses one. Look through the model and select the First B Type*Second B Type interaction term and click the Remove Term button.

 

I am going to change the number of runs to 48, so type that in the User Specified field and click Make Design.

Note that I am not guaranteeing that 48 is a good number of runs here. I strongly encourage you to seek some statistical support within your company to evaluate the design. This is not something that can be taught through the community posts.

 

Once JMP finds a design, click Make Table.

This is your design. However, the First B Proportion and Second B Proportion values are on the wrong scale. So...

Create a new column called "True First B Proportion". It will be a formula column with this formula:

Match( :First B Type,
	"B1", :First B Proportion * 0.19 + 0.01,
	"B2", :First B Proportion * 0.19 + 0.01,
	"B3", :First B Proportion * 0.19 + 0.01,
	"B4", :First B Proportion * 0.02 + 0.01,
	"B5", :First B Proportion * 0.04 + 0.01,
	Empty(), Empty()
)

(You can see it graphically in the earlier post). This is simply taking the First B Proportion multiplied by the range for that specific B component + the lower bound of 0.01.

 

We now do a similar thing with the second B component. That column will be called "True Second B Proportion" and this formula is:

Match( :Second B Type,
	"B1", :Second B Proportion * 0.2,
	"B2", :Second B Proportion * 0.2,
	"B3", :Second B Proportion * 0.2,
	"B4", :Second B Proportion * 0.03,
	"B5", :Second B Proportion * 0.05,
	Empty(), Empty()
)

To run your design, use A, True First B Proportion, True Second B Proportion, First B Type, and Second B Type.

 

Now you could end up with the same B-type for first and second. Specifically, B1 and B1 again. It is also possible that the True First B Proportion is 0.2 and the True Second B Proportion is 0.2 also. However, there is no good way to prevent the first and second B types from being the same. Plus, in the design that I created I never had a situation where First B Type matched Second B Type where the sum of the proportions were higher than the allowable range for each component.

 

Because we changed the "design" from the original variables, we will need to add the Mixture column property, the Design Role column property, and the Factor changes column property to the True First B Proportion and Second B Proportion.

 

Finally, we will also need to rebuild the default model using the new columns. I turned this into two steps. Step 1 is to rename the current Model script to Old Model. Then, I went to Fit Model. I put Y into the Y role. Then from the Columns list I selected A, True First B Proportion, True Second B Proportion, First B Type, and Second B Type. I clicked Macros > Factorial to Degree. I then need to remove the following terms from the model: First B Type, Second B Type, and First B Type*Second B Type. Note that JMP will ask if you wish to remove other terms when you try to remove some of these. Choose NO for this case. I then clicked the red triangle by Model Specification and chose Save to Data Table.

 

The full result is the data table that I have attached.

Dan Obermiller
slscolep
Level II

Re: Mixture DOE - how to limit number of ingredients in final formula?

@Dan_Obermiller, thank you for your clear and detailed explanation, I was able to reproduce all steps!

However, there is an issue: the True B proportions are very low and the final mixture (A+ True First B+ True Second B) should be equal to 1 and it is not...total of 3 mixture factors ranges from 0.62 and 1.00.

 

PS - Is there a way to open the DOE dialog box at the end and see the final factors considered (the True Bs) and make any required adjustment to the design?

 

Re: Mixture DOE - how to limit number of ingredients in final formula?

Whoops! 

You did not get a valid design because I messed up! Here are the CORRECT steps:

 

Add a mixture factor, First B Proportion, that ranges from 0 to 1.

Add another mixture factor, Second B Proportion, that ranges from 0 to 1.

Add a Categorical factor with 5 levels, called First B Type. The levels are B1, B2, B3, B4, and B5.

Add another Categorical factor with 5 levels, called Second B Type. The levels are B1, B2, B3, B4, and B5.

 

Now, in the Model window, click on the Interactions button and choose 2nd.

JMP will deliver a message that it removes some of the model terms, but it misses one. Look through the model and select the First B Type*Second B Type interaction term and click the Remove Term button.

 

I am going to change the number of runs to 48, so type that in the User Specified field and click Make Design.

Note that I am not guaranteeing that 48 is a good number of runs here. I strongly encourage you to seek some statistical support within your company to evaluate the completed design (and we are not completed yet!). This is not something that can be taught through the community posts.

 

Once JMP finds a design, click Make Table.

The First B Proportion and Second B Proportion values are on the wrong scale. So...

Create a new column called "True First B Proportion". It will be a formula column with this formula:

Match( :First B Type,
	"B1", :First B Proportion * 0.19 + 0.01,
	"B2", :First B Proportion * 0.19 + 0.01,
	"B3", :First B Proportion * 0.19 + 0.01,
	"B4", :First B Proportion * 0.02 + 0.01,
	"B5", :First B Proportion * 0.04 + 0.01,
	Empty(), Empty()
)

This is simply taking the First B Proportion multiplied by the range for that specific B component + the lower bound of 0.01.

 

We now do a similar thing with the second B component. That column will be called "True Second B Proportion" and this formula is:

Match( :Second B Type,
	"B1", :Second B Proportion * 0.2,
	"B2", :Second B Proportion * 0.2,
	"B3", :Second B Proportion * 0.2,
	"B4", :Second B Proportion * 0.03,
	"B5", :Second B Proportion * 0.05,
	Empty(), Empty()
)

 

Create a column named A that is based on a formula. The formula will be "1 - True First B Proportion - True Second B Proportion".

To run your design, use A, True First B Proportion, True Second B Proportion, First B Type, and Second B Type.

 

Now you could end up with the same B-type for first and second. Specifically, B1 and B1 again. There is no good way to prevent the first and second B types from being the same. However, even when this does occur, the highest proportion of B will be is 0.21, which is only slightly above your maximum. If this is really a concern, modify the True Second B Proportion formula by lowering the multipliers by 0.01. This will keep the total at 0.20 or less, but will make the maximum of the True Second B Proportion be 0.01 lower.

 

Because we changed the "design" from the original variables, we will need to add the Mixture column property, the Design Role column property, and the Factor changes column property to column A, the True First B Proportion, and True Second B Proportion.

 

Finally, we will also need to rebuild the default model using the new columns. I turned this into two steps. Step 1 is to rename the current Model script to Old Model. Then, I went to Fit Model. I put Y into the Y role. Then from the Columns list I selected A, True First B Proportion, True Second B Proportion, First B Type, and Second B Type. I clicked Macros > Factorial to Degree. I then need to remove the following terms from the model: First B Type, Second B Type, and First B Type*Second B Type. Note that JMP will ask if you wish to remove other terms when you try to remove some of these. Choose NO for this case. I then clicked the red triangle by Model Specification and chose Save to Data Table.

 

The full result is the data table that I have attached.

Dan Obermiller
slscolep
Level II

Re: Mixture DOE - how to limit number of ingredients in final formula?

Thank you @Dan_Obermiller 

I was able to reproduce all steps and I changed the formula of the True Second B Proportion as you suggested because our upper limits area already very challenging. In case we find some of these upper limits are not feasible and we are not able to measure the results, should we keep results in blank or what should we do?

Other question, can we change the order of the runs?

Re: Mixture DOE - how to limit number of ingredients in final formula?

If you are not able to measure results, I see two options: leave it blank so that it is missing. This can often be disastrous to a designed experiment as they often have a minimum number of runs needed to reliably estimate the model. So, the other option is to modify the trial slightly in order to get a feasible result. If you do this, change the values of the factors to match what you actually did.

 

As for the run order, it should be randomized and not changed. If you want to change it, that means that you have a hard-to-change factor which should be accounted for in the design. A hard-to-change factor results in a split-plot design which affects the analysis. And while on the topic of run order, each row of the data table needs to be independent of all other rows. That means that each row is a COMPLETE run on its own. Each row should be a new formulation that is made. Making a single large batch of the formulation and dividing it should be avoided. Doing that does not provide the independence and results in that split-plot structure that I mentioned. The error in the model should include the variability caused by re-making the fornulation, too.

Dan Obermiller