In gas-phase polymerization, the properties that matter most are often the ones you cannot measure quickly.
Polymer resin Melt Mass-Flow Rate (MFR, also known as melt index or melt flow index) and density are classic examples important for product quality and operating decisions. Unfortunately, unlike pressure, flow, or gas composition, they are not available as clean, continuous online measurements. They arrive through lab data, delayed and noisy, after the process has already moved on. That gap is exactly where a soft sensor becomes valuable.
We will walk through how to build soft sensors from scratch using the MFR and density example, going through the classic phases of data preparation, exploratory data analysis, feature selection, and model selection, and finally ending with performance visualization.
The companion notebook for this post is available as well!
Why These Two Properties Matter
MFR and density are natural soft-sensor targets in a gas phase polymerization because they sit directly at the intersection of quality and operation. These properties are sensitive to operating conditions, high momentum, and intermittently measured via the lab. If they drift, we often do not get feedback from the lab until hours later, which might mean off-grade production for a few more hours before getting back into specification again. That leaves the question: is there some way for us to get quicker feedback using other readily available measurements such as gas composition?
Start With the Process
Before fitting any model, it is useful to examine how the process actually moves. While differing by catalyst, Ziegler-Natta catalysts control chain length (and thus MFR) using hydrogen as a chain terminating agent.
Density of a polymer is determined by degree of branching. The degree of branching is controlled via comonomer incorporation.
Using a reduced order simulation of gas phase alpha-olefin polymerization, I've simulated 50 different trajectories at various operating conditions and MFR/density targets. Below shows one such trajectory, clearly showing significant response in both comonomer molar ratio and hydrogen molar ratio.

Collapse the First Problem to Steady State
Fluidized bed reactors have large inventories, which means they exhibit long and high-momentum dynamics. It is significantly more difficult to model unknown system dynamics than to model steady state behavior.
The first useful simplification is to collapse each scenario to a final steady-state summary. In the notebook, the last four hours of each trajectory are treated as the operating window for that target grade. The online measurements are averaged over that window, and the resulting sample becomes one row in a steady-state dataset.

Exploratory Data Analysis
Once the data is reduced to steady-state samples, the main relationships become easier to inspect. Taking a look at the pair-plot of various process conditions and melt index and density, it seems density and rM2 are linearly related, and melt index and rH2 is nonlinearly related.

Taking another angle, the spearman correlation also agrees that the strongest apparent predictor for melt index is hydrogen mole ratio rH2, and the strongest apparent predictor for density is comonomer mole ratio rM2.

While pressure also has a high correlation with MFR (0.74), it cannot be used as a predictor in the modeling without ignoring some very strong physical explanations. The catalyst specification of the simulation dictates that hydrogen has an inhibiting effect on productivity; any time hydrogen molar ratio increases (e.g., when raising MFR), production rate drops for some time before the underlying controller catches back up; whenever production rate suddenly drops, gas consumption drops as well, leading to increase in pressure until the system eventually equilibrates around the new steady state.
The example trajectory shown previously is a great counter example to the correlation story. In that transition, comonomer molar ratio also dropped significantly. Since we are intentionally removing a major component from the system, total pressure ended up dropping; if we blindly followed the correlation, total pressure should have increased as MFR increased!
This goes to show that data itself is not sufficient for successful soft sensor development - data and deep process understanding must meet to ensure a smooth and successful project. Atlas provides you both that data expertise and process understanding - reach out today to discuss your plant's performance!
The Simplest Models
One should always start with the simplest model when performing regression. Using the most promising variables identified previously, the corresponding linear models are simply:
where c_i are fitted coefficients, and \epsilon are model errors.
Validation Method
Since the dataset used for soft sensor modeling may not cover ALL operating conditions, it is important to ensure the resulting model is generalizable to unseen conditions. This is typically done by validating the model on a hold-out dataset. The hold-out dataset is not used in fitting/training at all. If a model performs well on training data but poorly on the hold-out data, it is clear the model overfitted and is not a good candidate for deployment.
The are other ways of model validation as well, such as cross validation and its variations. We will, however, simply hold out 40% of the 50 trajectories and use the remaining 60% for fitting/training.
Model Visualization
The fitted models are
Density error is mostly distributed around 0, which is a good indication that the model used is appropriate. Melt index, on the other hand, did not perform as well.


Fixing the MFR model
While the linear regression is a simple first-model, it was pretty obvious even from the pair-plot that it would not work so well for MFR. Afterall, visually, melt index against rH2 looks closer to an exponential relationship than a linear one. That suggests a log transform:
Once fit in log space and transformed back, the MFR model improves substantially. This is a useful reminder that better models do not always come from larger feature sets. Sometimes the variable was right from the start, and the only thing missing was the correct structure.

The notebook also tests whether adding rM2 improves the log-transformed MFR model. In this case, the fit did not improve. Please checkout the notebook if you are interested in the details!
Cumulative Property Estimation
Up to this point, the story has been a steady-state inferential modeling exercise. However, the steady state model does not provide meaningful feedback in a dynamic reactor where drifts happen over hours. Fortunately, it is possible to turn the steady state resin property models dynamic using simple physics.
Newly formed resin does not replace the bed instantly. It mixes into the existing material. It is possible to derive mixing rules that govern how the cumulative (i.e., mixed) property evolves as new materials are introduced. Those interested should checkout the notebook for more details.
Now, finally, we can see how the steady state models performed, comparing the cumulative property predictions with lab measurements.

In several trajectories, the resulting behavior is already quite good. In others, especially around some grades with melt index = 2, the mismatch is harder to ignore. It is clear that the process still contains dynamics or disturbances that the current model does not explain explicitly.
Conclusion
We have walked through the exercise of identifying and developing two soft sensors from scratch and arrived at a set of models that show mixed performance at various operating conditions. Despite the mixed performance, this set of soft sensors is ready for deployment; as long as the model offset is accounted for in some way (for example, via Kalman Filtering), they can be used to control rH2 and rM2 proactively with likely better results compared to purely relying on lab feedback. We will explore said application in the next blog.




