At the end of the last blog, we took note of an somewhat unexpected behavior where, during a MFR transition, the density controller automatically detected density drift and moved comonomer molar ratio.
Below shows one such MFR transition, where the density controller failed to predict the drift in density caused by MFR movements and had to rely on feedback action as lab results became available, leading to 6 hours of out of specification density production.

The original set of soft sensors we developed were effectively single-input single-output. We had observed during exploratory data analysis that rH2 was correlated with MFR and rM2 was correlated with density, and no other variables showed significant correlation with either resin properties. The pair-plots supported these observations as well.
However, once we actually applied the models for control, we saw that there is obviously some relationship between either rH2 or MFR with density.
In this blog, we will explore other predictors of MFR and density, incorporate them into the model, and re-deploy the upgraded models. We will also look into other ways of improving control performance when using soft sensors.
Improving the density model
We know either rH2 or MFR somehow affect density, but which one? Actually, it is well known that MFR has an effect on density; physically, this effect can be understood by thinking about packing efficiency of long rigid chains - the longer the chains, the more they tangle, and the less tightly they pack together.
Unfortunately, we cannot use MFR directly as a predictor for density since we do not have a good estimate of instantaneous MFR (recall that our model does exhibit varying degree of offset depending on the grade). On the other hand, hydrogen mole ratio rH2, which we know to be the primary driver of MFR, is readily available and measured on-line frequently.
Before we fit the model though, let's see if the residuals (i.e., the unexplained variance) of the model is at all correlated with either rH2 or MFR. If our eyes didn't lie to us, there should be some clear correlations.

Indeed, the Pearson correlation coefficient, which tells us if the variables have a linear correlation with each other (a value of -1 means perfectly negatively correlated, a value of 1 means perfectly positively correlated, a value of 0 means no apparent correlation), suggests there is a strong linear correlation of rH2 with the density model residual. That is,
where c_1 and d are the fitted coefficient and intercept, respectively. From the residual equation above, we can rearrange and write directly the new density model using rH2 as the additional predictor.
Fitting the new density model to the same dataset, we get the following. The errors/residuals are still mostly spread around 0, and a positive relationship between rH2/MFR and density emerged. That makes sense - more hydrogen leads to shorter chains, facilitating tighter packing and thus higher density.

Applying The Improved Density Model
Without further ado, let's apply the new density to the same MFR transition and see if it is any better! Conveniently, since we are working with simulations, it is possible to rerun the exact same transition with the same starting conditions. Actual evaluation in a real plant environment is bound to be more troublesome.

Check that out, the density controller now proactively increases rM2 as the MFR controller increased rH2, leading to a much stabler density trajectory! Nevertheless, it seems the rH2 overshoot caused by poor rH2 controller tuning did almost drive the MFR out of spec. Let's fix that...

After tuning the hydrogen controller (it was a standard PID controller), the MFR response now looks even better. This is a great example demonstrating the necessity of good inner loop tuning for successful deployment of advanced process control (APC) systems and the need for consistent loop monitoring to properly identify which control loops are drifting and potentially causing issues in its cascades. Atlas' Remote Resident is a cost effective way to offload all your loop monitoring, troubleshooting, and tuning needs at the fraction of the cost of a full time engineer. Reach out today to learn more about it!
Elephant In the Room - Lab Errors
Throughout the blogs in the soft sensor series, we have been relying on lab results are the ground truth for our analysis. However, anyone who has had the honor of dealing with labs know better to trust them blindly.
MFR and density lab results are especially prone to error and difficult to leverage due to two reasons:
- They are infrequent - resin samples are usually taken once every couple hours, making them few and far between. Retesting a sample is also slow.
- They are suspectable to variability due to sampling and preparation technique, and sometimes even interpretation method.
Thus, our current approach with IMC, which takes the entire model error as correction in the reference trajectory, is suspectable excess lab-originated noise propagating through the controller into the process.
In a future blog, we will explore how to overcome the noise issue using more advanced techniques such as Kalman Filters and its siblings, which take into account measurement and model variance when updating model parameters or estimates.




