Okay, we're back again talking about using second-order models for response surface optimization, and in the previous class we talked about using the canonical of analysis for optimizing yield in our chemical process. That was the response y_1, but remember we have these two other responses, molecular weight and viscosity and we typically need to consider those as well. In a sense, we want to try to optimize all of our responses or at least find a setting of our design factors that keeps all the responses in desirable ranges. The textbook has a lot of reference material on this beyond what we're going to talk about, and there's also a much more in-depth treatment of multiple responses in the stand-alone book on response surface methods that I'm one of the authors of, it's referenced here. Remember that we have these two other responses, viscosity and molecular weight, y_2 and y_3 respectively from our previous example, so what I did was to simply fit models for those two responses. The response for viscosity is a quadratic and that's the equation that you see here in terms of coded units. Then the molecular weight response turned out to be a first-order model, and that's the equation that you see here and again, that's in terms of the coded units and I also showed you the natural units models for those responses as well. Here are some pictures of what these surfaces look like. Here is the contour plot and the response surface of viscosity, and when you look at this surface, notice how elongated it is in the time direction. There's an enormous amount of elongation here. This is virtually a stationary ridge type of system and you can see that ridge behavior here in both the contour plot and the response surface plot. Now, the molecular weight response was strictly first-order, and so this is the contour plot and response surface for that response, and no surprises, the contour plot are just parallel straight lines. So what do we need to do in this response? What do we need to do in this problem? Well, the manufacturer obviously wants to maximize the yield and the customer has some requirements on both molecular weight and viscosity. The customer wants the viscosity to be between 62 and 68, they actually have a target of 65. They'd like to have a target value of 65, and they want the molecular weight to be less than or equal to 3,400. One of the things that we can do when we have a relatively small number of design factors such as we have here, is we can overlay the contour plots for these different responses and that's what I did here. This is an overlay of the contour plots and I've arbitrarily chosen a yield of 78.5 because I don't want yield to ever be below 78.5, and so here is the yield contour, 78.5. Here are my viscosity contours of 62 and 68, and you notice there's two sets of those, one on either side of the ridge that we saw in that contour plot, and then here is the line with molecular weight at 3,400 and we need to be below that. So the open or unshaded area of this contour plot shows you the feasible regions in which we can operate this process, I'm going to eliminate that region. It's small and it might be difficult to control the process very accurately enough to be able to operate in that region, and actually to get right on the target of viscosity of 65 that the customer wants, you'd have to be running really pretty much right at that point, right there, and that could be very hard to do. If we go to this larger region down here, there's a lot more latitude in terms of where we might operate the process and still be very close to the target value of 65. There's a bigger operating window down here and so I would suggest that you might want to choose an operating window somewhere in this area down here. So graphical methods work really nicely when you only have a small number of design factors. Another approach is to use some sort of constrained optimization technique, mathematical programming type methods. That requires you to formulate the problem as a numerical optimization problem. For example, here you might want to maximize y_1, that's the yield, subject to constraints on your two variables, viscosity and molecular weight. The constraint on viscosity might be that y_2 is between 62 and 68, and on molecular weight that it's less than or equal to 3,400. Numerical optimization techniques can be used to solve this problem. Sometimes people call them mathematical programming techniques or nonlinear programming techniques. Various software packages can do this, JuMP can do this, Design-Expert can do this, Minitab can do this, you can also solve these types of problems in Excel. Here are two solutions that I got to this problem using actually a couple of different software packages, and why did I get two solutions? Well, because there are two regions that contain the optimum, and that first solution is in that upper smaller region and I don't like that solution very much. The second solution is in that larger region, but it's also very close to the boundary of the constraints, and so you might want to move away from that a little bit and get somewhere near to the center of that region. Now there is another approach that is very very popular and this is a desirability function approach. Again, this approach is used in a lot of software packages. JUMP, design, Expert, MiniTab, all have this desirability technique. Then how does this desirability technique work. It's a really great idea and it was proposed by two researchers named Derringer and Suich in a JQT paper back in the '60's. Basically what we do in the desirability function technique is we take each of our responses and we convert them into an individual desirability function that varies between zero and one. This desirability function is chosen so that if the value is ever outside of some feasible region, the desirability function is zero and if the response is ever on the perfect value, the optimum value, then this individual desirability function is one. So it varies over this range from 0-1 according to a function that you specify. Equation 11.11 is the desirability function if you want the response to be a maximum. Now L is the lowest limit of the response that you could want to have and T is the target, that's the maximum value. So if y is less than L rather the individual desirability is zero. If y is greater than or equal to T, the individual desirability is one, and if y is between L and T, it varies. Desirability varies between zero and one according to this function. I'm going to show you a picture that function in just a moment. By the way, when that constant r is equal to one, the desirability function is unity. This is what it would look like. This is the individual desirability function when the objective is to maximize that response, and r equal to one gives you a linear change of desirability, r less than one, r between zero and one gives you a shape that puts really less emphasis on being at the maximum and r greater than one penalizes you more severely for moving away from the target. This is the form of the desirability function when the response is to be minimized. So T is the target, in this case the minimum, and U is an upper bound or upper limit that you never want to exceed. So if y is less than T, desirability is one. If y is greater than U, the desirability is zero and then if y varies between U and T, we have individual desirability function that looks like this. Again, r is a weighting value. Just as we saw before, this is what the desirability function looks like now when the target is to minimize y and r equal to one makes the desirability linear, r greater than one makes the function less sensitive to departures from the target, and y greater than or equal to one makes the desirability function penalize you more severely for deviating away from the minimum value. Then of course you can have two sided functions. That's what you see being illustrated at the bottom here. Basically we have two one-sided functions with a target in the middle and then a lower limit and an upper limit that you simply don't want to exceed. So you can actually have two one-sided functions combined to produce a two-sided desirability function. The weights could be different, so you could have weights r1 on one side and weights r2 on the other. So you could weight the departure from the target differently. There may be problems where it's worse to be above the target than it is to be below the target. Then the way desirability functions operate is we take the product of the individual desirabilities as the objective function. We typically take the nth root of that product so that the magnitude of that desirability function is more readily interpretable, because remember, all of these individual desirabilities are going to be less or equal to one. So when you multiply a bunch of them together, the product gets pretty small and so taking the nth root of that scales them backup again. So basically it's another mathematical optimization problem. Choose the x's that maximize deep. You can see the beauty in this because if you ever choose a set of x's that gives you an undesirable value of any one of your responses, then one or more of these individual d's goes to zero and so the overall desirability goes to zero and that's not going to be a very good solution. So we tried that for our chemical process problem. We chose T as the target for yield with U being the undesirable value and we'd set the weights to unity. We set T equal to 65 for viscosity. Again, we use the lower and upper limits on viscosity to be 62 and 68 that's consistent with the specifications. Both the weights were equal to one. For the molecular weight we said, any value between 3,200 and 3,400 is acceptable. We found two solutions, just as you would expect. The first solution is in that upper region and it produces a yield of 78.8, target value of 65, and a viscosity of 32.87. Then here is the other solution and this is the one that's in that upper region, smaller region, and probably not as good a solution as you would like, but it's just difficult to operate there. Here are pictures of the desirability function. Here is that smaller region that we saw in the contour plots and here is that larger region that we saw in the contour plots. This is the region that I would choose to operate here, and I think that would be a much better set of operating conditions. So somewhere in here, this seems to me to be a reasonable set of operating conditions. This one is in that smaller upper region, probably more difficult to control your process at the desired levels in order to get the best results.