egue technikrom final_8_12_13
TRANSCRIPT
Utilizing DeltaV to Perform PAT Calculations Real Time
Real-Time Non-Linear Regression
Chromatography Endpoint Detection
Photography & Video Recording Policy
Photography and audio/video recording is not permitted in any sessions or in the exhibition areas without press credentials or written permission
from the Emerson Exchange Board of Directors. Inquiries should be directed to:
Thank you.
Presenters
Michael Hausladen
Director of Manufacturing Technology, BMS
Paul Brodbeck
Engineering Manager,
Control Associates, LBP
Introduction
Chromatography Project Functional Requirements Chromatography Elution Modeling Prototyping Implementation Results Summary
Chromatography Project
BMS Syracuse Scientist: Mike Hausladen Pilot Plant Chromatography Skid Modification Purpose:
– Scale-up laboratory endpoint detection– Ensure process robustness
• Minimize incorrectly determined collection end-point
– Pilot scale model of full scale production system– Demonstrate capability for full scale production
Focus of this presentation: Robust chromatography elution end-point determination
Chromatography Basics
The basics of bind and elute chromatography:– Modify the conditions of the mobile phase to cause binding
or elution of the product (protein)– Aqueous systems: pH and conductivity
Stationary
Phase
Mobile phase:
1. Flush and prep column
2. Load protein on column
3. Wash
4. Elute protein
5. Clean and sanitize column
6. Store column
Monitor elution for product fraction
• UV adsorbance @ 280nm
• Collect the desired portion of the elution peak
Elution Curve
0
10
20
30
40
50
60
70
80
90
100
mAU
Worse case chromatographygenerated in the lab. Data is not smooth., has multiple peaks.
z
w
h
The whole point – determine h (peak height) real time – to
calculate percent of peak maximum collection end-point
Percent of peak max (h) stop collecting
product
BMS Requirements
Robust endpoint of Elution Determination - real time Peak Maximum Calculation
– Endpoint = Percent of Peak Maximum• Model Predict Peak Max. of absolute optical density.• Percent of Peak Max lookup table of Sialic Acid vs. load material.
3 Models – in DeltaV Controller– Smoothing (1st Order Filter) Model– Linear Regression Algorithm - Polynomial Fit – Non-Linear Model
• Extreme Value Function fit with Real-time Data
– Column Volume (mobile phase volume) vs. UV absorbance Alarming/Auto-Switching
– Limits to ensure that the Peak Maximum is not determined early. – Ensure data is fitting the model with a sufficient level of accuracy. – Limits end Model if the algorithm is not converging.
Focus of this presentation is on the non-linear model real-time fit of the Extreme Value Function
Implemented
3 Models– Smoothing Model– Polynomial Fit – Non-Linear Model
1 Algorithm– Newton-Raphson
System Integrator Process
Select Model Equation Basic Curve Fitting
– Least Squares Error (LSE)
Select Numerical Method Algorithm– Gradient Descent– Newton Raphson– Levenberg-Marquardt
Machine Learning Parallel Grey Box Modeling Math
– Linear Algebra– Vector Based Programming Languages (MATLAB)– Solving of Partial Differential Equations
Research – Internet Literature– Example Programs– Textbook – Numerical Methods by Dahlquest &
Bjorck
Program Construction– Flowchart
DeltaV CALC Block Limitation
– 2000 lines per scan
– 64 If-Then loops per block
– 256 field arrays
– Dynamic Reference delays
Excel Solver
– Troubleshooting
– Math Checking
– Convergence Issues
Switch Gradient to Newton
– Bad Hardware
– Convergence Issues
Final Program
Model Statistics
IQ/OQ
Levenberg-Marquart Future
Numerical Integration
Non-linear Models
Controller vs. Application Station
Other Approaches– synTQ, MATLAB, SoftPhase
Summary
Non-Linear Model
Extreme Value Function: is an equation that approximates a chromatography peak
Using a dataset of x’s (volume of mobile phase) and y’s (elution response – UV adsorbance )– Determine h, w, and z that give the best approximation of the peak– From h, determine endpoint
There are many mathematical functions for the representation of chromatographic peaks, extreme value function chosen for simplicity (Journal of Chromatography)
Elution Curve Fitted
0
10
20
30
40
50
60
70
80
90
100
mAU
fit
z
w
h
The whole point – determine h (peak height) real time – to
calculate percent of peak maximum collection end-point
Percent of peak max – stop collecting
product
Numerical Method – Basic Curve Fitting
Minimize the Squares of the Error– Least Squares Error
Curve fitting, minimizing error, finding best solution/ best fit
Analytical solutions for simple fit Iterative numerical solution required for complex
equations– Initial guess required– Convergence satisfied?
Solving in multidimensional space
Numerical Methods – Solving Least Squares
Gradient Descent– Make Initial Guess Xi-1
– New Guess: Xi = Xi-1 – e * F’(Xi-1)– e is tuning constant
• Too low = slow convergence, Too high = unstable
Newton - Raphson– Make Initial Guess Xi-1
– New Guess: Xi = Xi-1 - F’(xi-1)/2*(F’’(xi-1))– Can be unstable with a poor initial guess
Levenberg-Marquardt– Start with Gradient, end with Newton
Iteratively repeat, check for convergence
Sq
uare o
f Erro
r
Math
In order to mathematically determine the slopes of a multi-parameter system need to calculate the partial differentials.– Partials are slopes in n-dimensional space
Linear Algebra– When solving multivariate we need vectors, arrays or
matrices.– Solutions become complex when dividing matrices
Vector Based Programming– Matlab, Python, Octave, …
Partial Differentials – 3D Slopes
Solving the Extreme Value Function
Need to solve for h, z, w.– h = maximum peak height.– w = peak width.– z = retention time of column.
Vectorization Required Challenge here is dividing by a
Matrix Complex Linear Algebra Determinants Easy in Matlab Not so Easy Otherwise
Research
Internet Literature– Methods for Non-Linear Least Squares Problems1
• Nomenclature difficult• Theoretical
– Wikipedia– Dr. Math
• Least Squares Regression for Quadratic Curve Fitting2
– Example Programs• L-A Algorithm by Pradit Mittrapiyanuruck
– MATLAB• L-M Method for Non-Linear Least Squares by Henri Gavin
– MATLAB, extra code… weighting, CHI, R^2, lamda
Textbook – Numerical Methods by Dahlquist & Bjorck – 5.2.1 Numerical Linear Algebra– 5.6 Iterative Methods– 6.9.2 Newton-Raphson’s Method…– 10.5.1 Non-Linear Optimization Problems (Hessian)
Project Challenges
DeltaV Limitations Other Obstacles
No matrix math functions 2000 lines per scan 64 loops per scan Dynamic reference time
delay 256 cell arrays max Hardware problem
Literature for Matlab Solving Diff. Eq.’s Notation theory Matrix Algebra Numerical Methods Least Squared Error
Program Flowchart
Program – DeltaV CALC Block
Math – Solving PDE’s
Solving PDE’s
Prototyping in MS Excel
h = 15
z = 0.24
w = 270
Model Performance
Trust Zone 5 Second scan time 1000 pts each scan Model converges to solution each scan 40% MX Controller Usage @ 5 sec scan 90% MX Controller Usage @ 1 sec scan
IQ/OQ Validation
6 6.5 7 7.5 8 8.5 9 9.5 100
0.1
0.2
0.3
0.4
0.5
0.6
0.7
Raw Data
Excel Prediction
DeltaV NonLinear
DeltaV Linear
Levenberg-Marqaudt Future Enhancement
Prototyped in Matlab Tested in DeltaV Ready to be upgraded Faster, more robust
Implemented Models
All 3 running simultaneously Auto Switch to best Model Non-Linear Model is primary Polynomial Model is secondary Smoothing Model last All 3 models tested within X% of each Monitor all 3 and Alarm if > X% Error
Other Options for Future
MATLAB– OPC communication– Runs in App station
synTQ– $$$– MATLAB or other math package
Soft Phase– Requires C, C++, C#, or VB
Controller vs. Application Station– Controller slightly more robust
• If App Station goes down Model still runs in controller
– Application Station• Run at higher speeds• Reduced controller memory & capacity
Summary DeltaV
Non-linear was successfully implemented to predict elution endpoint
Model updates 1000pt every 5 seconds Model is capable of handling model non-convergence Model passed IQ/OQ
Thank You for Attending!
Enjoy the rest of the conference.