Model-free and model-based control approaches for batch...
Transcript of Model-free and model-based control approaches for batch...
1
McMaster University
Model-free and model-based control approaches for batch and continuous
crystallization systems
Zoltan K. Nagy
Davidson School of Chemical Engineering
Purdue University, West Lafayette, IN
May 20, 2019
Dalian University of Technology
Dalian, P.R. China
2
Acknowledgments
2
3
Crystallization Downstream processes Final product
Crystallization Control - Motivation
Control of crystal properties is critical for product functionality and operational efficiency
Many technology and economic drivers
70% of all solid products & 90% of APIs involve a crystallization step
Control of crystalline properties (CSD, shape, polymorphic form, purity, etc.) important
Product effectiveness (dissolution, bio-availability, tablet stability)
Efficient downstream operations (filtration, drying)
4
Quality-by-Control (QbC) paradigm
3
55
Batch Crystallization Control
Temp., Solv./Antisolv. Ratio
Metastable limit
(uncertain boundary)
Solubility curve
Operating Curve
Model-based and Direct Design approaches
PAT
o CSD (property)o Shapeo Polymorphic formo Purity
r2 (µm)
f(r 1
, r2)
r1 (µm)
Governing phenomena: Growth, Nucleation, Dissolution, etc.
Objective: Find operating curve and seed recipe to optimize:
6
Crystallization control approaches
1.Nagy, Z. K., et. al. 2013 Chemical Engineering Research and Design 91(10): 1903–22.2.Nagy, Z. K., and E. Aamir. 2012 Chemical Engineering Science 84: 656–70.
4
7
Crystallization product engineering via real-time feedback control Sensor integration and Crystallization Process Informatics System
. . .
...
Automated Intelligent Decision Support and Control
System
RAMANFBRM
Imaging
ATR-UV/Vis, FTIR
Continuous real-time monitoring using in-situ & in-line Process Analytical Technologies
Complementarity & redundancy in measurements data reconciliation & robust control
Automated/adaptive operation to design particles with tailored made properties
Quality-by-control (QbC)
Model-based and model-free design & control approaches
Automated Intelligent Decision Support and
Control System
CryPRINSComposite PAT array
Real-time control
Nagy, et al.,ChERD, 2013
Sample
UPLC
FilterReal-time
8
Crystallization product engineering via real-time feedback control Sensor integration and Crystallization Process Informatics System
. . .
...
Automated Intelligent Decision Support and Control
System
Automated Intelligent Decision Support and
Control System
CryPRINSComposite PAT array
Real-time control
Nagy, et al.,ChERD, 2013
Sample
UPLC
Filter
Continuous real-time monitoring using in-situ & in-line Process Analytical Technologies
Complementarity & redundancy in measurements data reconciliation & robust control
Automated/adaptive operation to design particles with tailored made properties
Quality-by-control (QbC)
Model-based and model-free design & control approaches
Real-time
5
9
CryPRINS: industrial software platform
DNC starts
SSC starts
Commercial software for rapid design and control of batch crystallization processes
Complete picture and control of crystallization processes
Used by GSK (US, UK), Pfizer, AZ, BASF, Ranbaxy, etc.
Integrated with KMS & SOPs
Enables efficient QbD & introduces Quality-by-Control (QbC)
Ongoing evaluation and extension to continuous crystallization
Nagy, Zoltan K., and Richard D. Braatz. 2012. Annual Review of Chemical and Biomolecular Engineering.
10
Model-based crystallization design and control
more details at crysiv.github.io
Szilagyi & Nagy, 2016. CACE.
6
11
Direct design of Crystallization Processes using supersaturation control
11
T
time
SSC adapts temperature (antisolvent addition) profile to follow path in phase diagram
Results in temperature vs. time profile
T
time
Fujiwara et al., J.of Proc. Control, 2005; Nagy et al., JPC, 2008; Nagy&Braatz, Annu. Rev. Chem. Biomol. Eng., 2012
*( )S C C T= -
*( ) arg( ( ) ( ) 0)SP spT t S C t C T= - + =
spS
Measured
12
Supersaturation control of an industrial crystallizer
12
0 10 20 30 40 50 60 7040
50
60
70
80
90
100
110
120
130
140
Temp (C)
Coc
entr
atio
n (m
g/m
L so
lutio
n)
Experiment: 4 Nov, 2009 - SS Control Run 1
Operating profile
Solubility curveStart
End
Seed Linear cooling (0.05 C/min) Supersaturation control
Seeding
0
10
20
30
40
50
60
70T
em
pe
ratu
re (C
)
100 150 200 250 300 350 400 450-0.06
-0.05
-0.04
-0.03
-0.02
-0.01
0
0.01
0.02
Time (min)
Su
pe
rsa
tura
tio
n (
g/g
)
SupersaturationSSC set pointTemperature (C)
Seed addition
SS set ppoint =0.01
7
1313
MSZW experiments
Concept of PAT based robust scale-up
1 mL 1 L 1 m3
???
Automated MSZW experiments under varying operating conditions (extreme change in hydrodynamics)
Scale up 1mL to 1L extrapolate results
Combined with experimental design
1414
Feedback Control Based Robust Scale-up of Pharmaceutical Crystallization
MSZW experiments under varying conditions (agitator, 1 mL - 1 L, cooling, etc.)
Automated PAT-based robust operating zone (ROZ) determination
Select operating curve in ROZ and implement using SSC
Implement resulting temperature profile using temp. control on large scale
Potential to reduce costs and development time
Temperature C
Con
cent
ratio
n g/
g w
ater
10 20 30 40 500.02
0.03
0.04
0.05
0.06
0.07
Uncertainnucleationzone
Uncertainsolubility curve
Example of robustoperating curve
Robust operating zone
Seeding
S
Time (min)
0 100 200 300 40020
30
40
50
8
15
Robust scale-up via feedback control
500 µm
Product at 1 L lab scale
FBRM
ATR-UV/Vis
500 µm
Similar product at 100 L pilot scale
Laboratory scale (1 litre) Large scale (100 litre)
Determine ROZ
Apply SSC
Temperature control
16
Model-free adaptive Control of Crystal Size Direct Nucleation Control
Hypothesis:Crystal size can be controlled by controlling the number of nuclei present in the system during crystallization
“Direct Nucleation Control” (DNC) approach
Temperature (or solvent:anti-solvent)
So
lute
con
cen
trat
ion
Generate nuclei by anti-solvent / cooling
Dissolve excess nuclei by solvent / heating
Maintain supersaturation for growth by continuous anti- solvent / cooling
Adaptive & model-free
control
Adaptive & model-free
control
1.Abu Bakar et al., CGD, 20092.Woo et al., CGD, 2009
3.Saleemi et al., CGD 2012; CrystEngComm 2012
9
17
UV/Vis
FBRM
Raman
NIR
Direct Design and Rapid Scale-up of Crystallization via Model-free Adaptive Feedback Control
200 m200 m
PAT
arr
ay
Experimental evaluation on industrial scale
Product of typical operation (linear cooling)
Product using Direct Nucleation Control (DNC)
0 10 20 30 40 50 60
0.05
0.1
0.15
0.2
0.25
Temperature (C)
Conce
ntr
atio
n (g/g
)
Operating curve
Solubility
Automatic solubility determination or calibration
Primary nucleation
Secondary nucleation
AstraZeneca, UK
100 L
500 L
0
10
20
30
40
50
60
Te
mp
era
ture
(C
)
0.1
0.15
0.2
Co
nc
en
tra
tio
n (
g/g
)
0 500 1000 15000
5000
10000
15000
Time (min)
To
tal C
ou
nts
/s
Total Counts/sTemperature (C)Concentration (g/g)
DNC Start
Set point 6000 counts
1.Nagy, Zoltan K., et.al. 2011. Proc. Int.Workshop Ind. Cryst., 18th, Sept 7–9.2.Saleemi, Ali N. et al. 2012. International Journal of Pharmaceutics 430(1–2): 56–64.
18
10 20 30 40 50 600.05
0.1
0.15
0.2
0.25
Temperature C
Co
nc
en
tra
tio
n (
g/g
)
Concentration (g/g)Solubility
10 20 30 40 50 600.05
0.1
0.15
0.2
0.25
Temperature C
Co
nc
en
tra
tio
n (
g/g
)
Concentration (g/g)Solubility
Automated scale up using the DNC approach
ADNC adapts number of cycles to achieve same product CSD at different scales
More cycles at large scale due to more pronounced secondary nucleation
1 L scale
(1+4 cycles)
100 L scale
(1+7 cycles)
200 m200 m
Saleemi, Ali N. et. al. 2012. Crystal Growth and Design 12(4): 1792–1807.
10
19
DNC of an industrial pharmaceutical crystallization Accidental seeding
DNC adapts operating profile to eliminate effect of accidental seeding
0
10
20
30
40
50
60
70
Te
mp
era
ture
(C
)
0.1
0.15
0.2
Co
nc
en
tra
tio
n (
g/g
)
500 1000 1500 20000
0.20.4
0.8
1.2
1.82x 10
4
Time (min)
To
tal C
ou
nts
/s
Total Counts/sTemperature (C)Concentration (g/g)
Target count = 4000
Accidental seeding
Saleemi, Ali,N. et. al. 2012. Cryst. Eng. Comm. 14(6): 2196.
20
DNC to reduce variability due to changing seed qualityInfluence of Seed Quality on Product CSD
Seed prepared using various methods Sieve range 106-125 μm used for all three seeds
Crystalline seed, sieved
Milled, washed & sieved
Milled & sieved
Seeds(106-125 μm )
Products
Same Crystallisation conditions
Aamir, E., et. al. 2010. Crystal Growth and Design 10(11): 4728–40.
11
21
DNC detects inconsistency in seed
Automatically triggers heating (dissolution) cycles
Subsequent dissolution eliminates consolidated agglomerates
0
10
20
30
40
50
60
70
80
Tem
per
atu
re(
C)
0.05
0.1
0.15
0.2
0.25
Co
nce
ntr
atio
n (
g/g
)
100 500 1000 1500 20000
0.4
0.8
1.2
1.6
2
x 104
Time (min)
To
tal
Co
un
ts/s
Total Counts/s
Temperature(C)
Concentration (g/g)
Setpoint = 4000 counts/s
Seed addition
Seeds(106-125 μm )
Product of typical operation (linear
cooling)
Product using DNC
DNC to reduce variability due to changing seed qualityInfluence of Seed Quality on Product CSD
QbC increases the acceptable robust QbD space (seed variability)
Aamir, E., et. al. 2010. Crystal Growth and Design 10(11): 4728–40.
22
DNC for consistent in situ seed generation (application for industrial crystallization)
Automatic in situ seed generation via DNC and then supersaturation control
Eliminates problems related to inconsistency in seed
0 20 40 600.05
0.1
0.15
0.2
0.25
Temperature (C)
Co
nce
ntr
atio
n (
g/g
)
Concentration (g/g)SolubilitySSC set point
External seeding
Hierarchical cascade DNC-SSC control: Direct nucleation control (DNC) –
control number of counts
Supersaturation control – drives process in phase diagram (using ATR-UV/Vis)
In situ seed via DNC200 m 200 m
Primary nucleation
12
23
Oiling out – very limited scope for solvent (oiling out solved but poor particle characteristics)
Drug AZ7009 (cardiovascular drug) – characteristic smell (solvent with very low odour threshold)
Tablets had characteristic odour difficulty in blind trials, longer term compliance issues
Type II inclusionType I inclusion
SEM
PVM
Saleemi et. al., Int. J. of Pharmaceutics; 2012
NN O
OHO
CN
NH
OO
Application of QbC: DNC to eliminate solvent inclusion and agglomeration of an anti-arrhythmic cardiovascular drug
24
ADNC results for AZ7009
10
20
30
40
50
Tem
per
atu
re (C
)
0.01
0.02
0.03
0.04
0.05
0.06
0.07
Co
nce
ntr
atio
n (
g/g
)
0 150 300 450 600 7500
5000
10000
15000
Time (min)
To
tal C
ou
nts
/s
Total Counts/sTemperature (C)Concentration
Target counts = 8000
DNC start
Nucleation
0 10 20 30 40 500.02
0.03
0.04
0.05
0.06
0.07
Temperature ( C)
Co
ncen
trat
ion
(g/g
) Nucleation
Cycle 3
End
ADNC start
Cycle 1
Cycle 2
Product with DNC
No agglomeration
No solvent inclusion
Better size uniformity
Better aspect ratio
Better purity
Fast development time– QbD: 2-3 months
– QbC: 2-3 daysOriginal product
Saleemi et. al., Int. J. of Pharmaceutics; 2012
13
25
QbC in biopharmaceutical crystallization Rapid design of antibiotic vancomycin crystallization
Demethyl vancomycin produced from fermentation of bacteria (Amycolatopsisorientalis).
Hydrochloride is used to treat infections caused by Gram-positive bacteria.
Problem:
– Content of residual solvent is double than the requested level.
Target:
– Develop a crystallization process producing bigger crystals with minimal agglomeration.
Original product
Product with DNC
26
Vitamin B12 (cyanocobalamin)
Raw material from fermentation of bacteria (Propionibacteriumfreudenreichii), containing about 15% impurities.
Original process requires three or more cooling crystallization steps to achieve a requested purity, which leads to a low yield.
Microscope image of VB12 Raw MaterialMolecular structure
Simone, E., et. al. 2016. Journal of Chemical Technology and Biotechnology 91(5): 1461–70.
14
27
Improvement in purity using different feedback control strategy
SamplePurity
(%)Improvement in
purity (%)
Raw material (slow cooling) 93.61 0Supersaturation control over raw
material in water96.29 2.68
Supersaturation control over crystallized material in water
97.47 1.18
Temperature cycling (DNC) over purified material
97.69 1.24
Quality-by-control (QbC)
Number of crystallization steps decreased from 3-4 to only 2
Same/better purity higher yield, better CSD
QbC provides:
Better CSD
Higher yield
Same/better purity
Simpler process
Shorter batch time
Simone, E., et. al. 2016. Journal of Chemical Technology and Biotechnology 91(5): 1461–70.
28
Shape manipulation via temperature cycling
Heating and cooling cycles allow dissolution of fines and growth of the larger crystals
Temperature cycling was also found to affect the surface properties of the crystals and the degree of solvent inclusion
Prolonged temperature cycling can have a large impact on the shape of the original crystals since different faces of the same crystal have different relative growth and dissolution rates.
Original crystal
TEMPERATURE CYCLING OF AN ADIPIC ACID CRYSTAL (Lovette et al. 2012)
1 day cycling 2 days cycling 3 days cycling
Slow growth
Temperature cycling allows in situ shape manipulation without compromising crystal purity (additives)
1.Abu Bakar et al., Crystal Growth and Design, 20102.Lovette et al., AIChE Journal, 2012 3.Saleemi et al., International Journal of Pharmaceutics, 2012
15
29
Shape evolution (PVM images)
300 μm 300 μm 300 μm 300 μm
Initial irregular shape distribution
Increase in crystal size while cycling
Change in shape from plate to diamond-like
Simone, E., et. al. 2017. Crystal Growth and Design 17(4): 1695–1706.
T cycling
The (100) face intercepts chains of succinic acid molecules linked by hydrogen bonded carboxylic acid dimers (polar face)
Water molecules interact with the (100) face, inhibiting growth along the direction perpendicular to this face
Temperature cycling generates a diamond shape
Face (110) and (01-1) outgrow face (100)
30
Real-Time Image Processing Based Online Feedback Control System (IA-DNC)
Borsos, Á., et. al. 2017. Organic Process Research & Development 21(4): 511–19.
16
31
Example of IA-DNC results
In situ & real-time imaging and IA
100
101
102
0 50 100 150 200
Time [min]
Asp
ect
Rat
io
0
0.2
0.4
0.6
0.8
Borsos, Á., et. al. 2017. Organic Process Research & Development 21(4): 511–19.
32
0
500
1000
1500
2000
2500
3000
3500
To
tal c
ou
nts
(#/
sec)
0
100
200
300
400F
orm
II R
aman
pea
k
0
500
1000
1500
2000
Fo
rm I
Ram
an p
eak
0.005
0.01
0.015
So
lute
co
nce
ntr
atio
n (
g/g
so
lv.)
0 20 40 60 80 100 1200
10
20
30
40
50
60
Time (min)
Tem
per
atu
re (
°C)
temperaturesolute conc.Raman form IRaman form IItotal counts
Form II(impurity)
Form I (desired)
Real-time feedback control of polymorphic purity using Raman and supersaturation control (Active polymorphic feedback control – APFC)
Nucleation of mixtures of polymorphs
Automatic dissolution cycles eliminates metastable form
SSC maintains operating path in phase diagram where stable form can only grow
Hierarchical cascade control
temperature
Mixture of form I & II
After nucleation
Product
Pure form I10 20 30 40 500
0.005
0.01
0.015
0.02
Temperature (°C)
So
lute
co
nce
ntr
atio
n (
g/g
so
lv.)
solubility form Isolubility form IIexperiment
nucleation of mixture of form I & II
Dissolution cycle eliminates form II
SSC keeps operating
curve within solubility
curves
Simone, E., et.al. 2014. Crystal Growth and Design 14(4): 1839–50.
17
33
Effect of temperature cycles on surface properties
Different surface properties (flowability, compressibility, friability etc.)Bakar, A., et. al. 2010. Crystal Growth and Design 10(9): 3892–3900.
34
No
Wet Mill
Down-stream Wet
Mill
Up-stream Wet Mill
QbC via integrated continuous unit operations Continuous crystallization with & without wet milling
Size reduction unit Breakage Secondary nucleation
In situ seed generator Primary nucleation
Clear feed solution
Clear feed solution
Clear feed solution
Yang, Y., et. al. Cryst. Growth & Des. 2015, 15, 5879–5885.
18
35
0 1 2 3 4 5 6 7 8 9 10 11
24
26
28
30
32
34
Total Counts Mean Chord Length, Sqr Wt
No. of Residence Time [-]
Te
mp
era
ture
[o C
]
0
4000
8000
12000
16000
20000
Mea
n C
hord
Le
ng
th [m]
Co
unts [#
/s]
0
20
40
60
80
100
120
Steady-stateStartup
(a)
0 1 2 3 4 5 6 7 8 9 10 11
24
26
28
30
32
34
Total Counts Mean Chord Length, Sqr Wt
No. of Residence Time [-]
Te
mp
era
ture
[o C
]
0
4000
8000
12000
16000
20000
Me
an C
ho
rd Le
ng
th [m]
Co
unts [#
/s]
0
20
40
60
80
100
120
Steady-stateStartup
(b)
0 1 2 3 4 5 6 7 8 9 10 11 12
24
26
28
30
32
34
Total Counts Mean Chord Length, Sqr Wt
No. of Residence Time [-]
Te
mp
era
ture
[o C
]
0
4000
8000
12000
16000
20000
Me
an C
ho
rd Le
ng
th [m]
Co
unts [#
/s]
0
20
40
60
80
100
120
Steady-stateStartup
(c)
No
Wet Mill
Down-stream Wet
Mill
Up-stream Wet Mill
100 μm
100 μm
100 μm
Continuous MSMPRC with/without wet milling (paracetamol)
Yang, Y., et. al. Cryst. Growth & Des. 2015, 15, 5879–5885.
36
10 1000
1
2
3
4
5
6
Cou
nts
[#
/s]
Chord Length [m]
Steady-state 1 Steady-state 2
8 9 10 11 12 13 14 15 16 17 18
18
20
22
24
26
28
30
32
34
36
38 Mill Jacket Temperature Set-point Total Particle Chord Counts Mean Chord Length, Sqr Wt
No. of Residence Time [-]
Te
mpe
ratu
re [
o C]
4000
8000
12000
16000
Mea
n C
hord
Len
gth
[m]
Cou
nts [#
/s]
50
60
70
80
Steady-state 1
Steady-state 23.3 RT
With ADNC
ADNC Steady-state 1 ADNC Steady-state 2
ADNC provides high quality control of size distribution, in situ seed generation and reduced start up time
ADNC Set-point
Multistage MSMPR with wet milling and automated feedback control
19
37
Multi-stage MSMPRC with wet milling
… …
ADNC Primary
nucleation
GrowthSecondary nucleation,
breakage
Growth
ADNC
Yang, Y., et. al. Cryst. Growth & Des. 2015, 15, 5879–5885.
38
Sequential milling-DNC
4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 640
20
40
60
80
100
120
140
10k rpmmilling
Temperature Total counts DNC set-point Mean, no wt.
Time [h]
Tem
per
atur
e [o
C] Seeding
5k rpmmilling
Counts [#/s]
Mean chord length [m
]
-100000
-50000
0
50000
100000
150000
-10
-5
0
5
10
15
20
25
30
35
40
45
50
1 10 100
Cou
nts
[#/s
ec]
Chord Length [m]
0
1000
2000
3000
4000
5000
DNC
After linear cooling After 5k rpm milling After 10k rpm milling After DNC
Milling
Seeded linear cooling 5k RPM milling 10k RPM milling Sequential milling-DNC
in situ rotor–stator immersion wet milling
Seeding (5%) linear cooling WM (5k for 30 min) WM (10k for 30 min) DNC
Final product with narrow CLD and significantly reduced 2D AR
Yang, Y., et. al. Int. J. of Pharm., 533 (1), 49-61, 2017
20
39
0 4 8 12 16 20 24 28 32 36 40 4420
40
60
80
100
120
140
Temperature Total counts DNC set-point Mean, no wt.
Time [h]
Te
mp
era
ture
[oC
]
Cou
nts [#/s]
Mean chord length [m
]
-100000
-50000
0
50000
100000
150000
-10
-5
0
5
10
15
20
25
30
35
40
45
50
Milling angular speed was kept at 10k rpm and the DNC set-point was 48000±5000 #/sec.
Numerous thermo-cycles to dissolve the fines generated by milling.
Mean CL increased slowly average crystal size increased slowly
Relatively low AR was reached while average crystal size increased
Simultaneous milling-DNC can be used to improve size and shape simultaneously but it is not practical due to the long batch time (for nucleation dominated systems but may work better for growth dominated systems)
Simultaneous milling-DNC
40
Model-based control approaches
21
41
Model-Based Optimal Control Design
Find recipe that gives crystals with desired properties
Supersaturation profile (i.e., temperature, antisolvent addition)
Seeding recipe (initial condition) and/or addition protocol (dynamic profile)
Additives (initial condition) and/or addition protocol (dynamic profile)
Pose as generic optimization problem, e.g.,
Supersaturation
Seed recipe
Additives
optimize f(CSD)
Uncertainties can be considered - robust approaches available
Properties of CSD – f(moments)
Shape of CSD – reverse engineering (distribution shaping control) dissolution rate, bioavailability, filtration time, etc.
Shape of crystals
Quality of product (minimize aggregation, breakage)
Temperature
Anti-solvent
Evaporation rate
Objective Function
Model-based control approach
Subject to:
o Model equations
o Operational, quality, safety, & productivity constraints
42
Rapid design of combined cooling-antisolventsystem - Experiment vs Simulation
0
5
10
15
20
25
30
0
5
10
15
20
25
30
Coolin
g end t
ime [m
in]Antisolvent start time [min]
280
300
320
340
360
380
400
420
440
0
5
10
15
20
25
30
0
5
10
15
20
25
30
Cooling s
tart tim
e [min]Antisolvent end time [min]
150
200
250
300
350
400
450
500
151 ±3164 ±8
125 ±3151 ±3
137 ±4170 ±8
Tem
per
atu
re
Mas
s o
f an
tiso
lven
t
Timet1 t2
Tem
per
atu
re
Mas
s o
f an
tiso
lven
t
Timet1 t2
Cooling first Antisolvent first
t1 t2t2 t1
Mean size maps (micron)
Rapid design of combined system via simplified model-based optimization
Map can be used for process & product engineering
22
4343
Crystallization Control via Dynamic Seeding
Seed as an actuator rather than initial condition
Seed distributed and added at regular intervals during the batch
Arbitrary target shape can be achieved using uni-modal seed
2, ,
( )1
min{ ( ) }d
S
f
N
v i v im t
it
f f=
-å
Modelled as sequence of crystallization batches
Initial condition mixture of seed (CSD previous batch + new seed)
Predicted CSD Target CSD
Nagy & Aamir, CES 2012
44
Distribution shaping control via SSC and seed recipe optimisation (MINLP)
44
2
, ,, ,1
min ( ( ) )d
seed
N
v i v imi
f ff b
f=
-å
1
1;GN
ii
w=
=å 0 f<
min max
0 0.05 (0)seed slurrym C m< <
,max( )batch f
C t C£
, ,31 ,
1( ) ( ; , )
GNseed i
n seed i m i iislurry c v m i
m wf L L L
m k Ls
r =
= å
1 ,1 1 ,[ , , ,..., , , ]G G Gm N m N Nw L w Lb s s=
s.t.
Optimize and seed recipe (sum of CSDs)
Mixture of sieved seed fractions
Better packing or tailored dissolution
Seed fraction 1 … Seed fraction NG
Predicted CSD Target CSD
0 100 200 300 4000
0.002
0.004
0.006
0.008
0.01
Particle Size (m)
Vo
lum
e p
df
( m
-1)
Optimal seedCSD, 4 sieves
Experimentalseed CSD
0 200 400 600 800 10000
0.5
1
1.5
2
2.5
3
3.5x 10
-3
Particle Size (m)
Vo
lum
e p
df
( m
-1)
Target CSDExp.CSD
Simulated CSDwith exp. seed
200 μm
200 μm
Seed
Product
Aamir & Nagy, CES 2010
23
45
15
20
25
30
35
40
Te
mp
era
ture
(C
)
0 50 100-4
-2
0
2
4
6
8x 10
-3
time (min)
Sup
ersa
tura
tion
(g
/g)
In situ fine removal via controlled dissolution
0 200 400 6000
0.005
0.01
0.015
0.02
0.025
t = 0 min
Particle size (m)
Vol
ume
(m
-1)
Target CSDSimulated CSD
Seed CSD
0 200 400 6000
0.005
0.01
0.015
0.02
0.025
t = 12 min
Particle size (m)
Vol
ume
(m
-1)
Target CSDSimulated CSD
0 200 400 6000
0.005
0.01
0.015
0.02
0.025
t = 32 min
Particle size (m)
Vol
ume
(m
-1)
Target CSDSimulated CSD
0 200 400 6000
0.005
0.01
0.015
0.02
0.025
t = 39 min
Particle size (m)
Vol
ume
(m
-1)
Target CSDSimulated CSD
0 200 400 6000
0.005
0.01
0.015
0.02
0.025
t = 59 min
Particle size (m)
Vol
ume
(m
-1)
Target CSDSimulated CSD
0 200 400 6000
0.005
0.01
0.015
0.02
0.025
t = 65 min
Particle size (m)
Vol
ume
(m
-1)
Target CSDSimulated CSD
0 200 400 6000
0.005
0.01
0.015
0.02
0.025
t = 74 min
Particle size (m)
Vol
ume
(m
-1)
Target CSDSimulated CSD
0 200 400 6000
0.005
0.01
0.015
0.02
0.025
t = 90 min
Particle size (m)
Vol
ume
(m
-1)
Target CSDSimulated CSD
0 200 400 6000
0.005
0.01
0.015
0.02
0.025
t = 100 min
Particle size (m)
Vol
ume
(m
-1)
Target CSDSimulated CSD
Growth & nucleation
Dissolution
DSC with Growth, Nucleation and Dissolution
Optimal Temp ProfileOptimal Temp Profile
SupersaturationSupersaturation
0 200 400 600 8000
1
2
3
4
5
6
7
x 10-3
Particle Size (m)
Vol
ume
pdf (m
-1)
CSD withoutDissolutionCSD withDissolution
15 20 25 30 35 400.04
0.05
0.06
0.07
0.08
0.09
0.1
Temperature (oC)
Co
ncen
tratio
n (w
t fra
ctio
n)
OptimisedTemperatureProfileSolubility Curve
Fines dissolutionFines dissolutionNucleationNucleation
“In situ dissolution loop”“In situ dissolution loop”
Uni-modal CSD achievable ONLY by using
controlled dissolution
Uni-modal CSD achievable ONLY by using
controlled dissolution
1.Aamir & Nagy, CGD 20112.Nagy, CACE 2009
46
Nonlinear model predictive growth rate control using full PBM
Constant growth rate control (evaporative crystallisation)
First pilot-scale implementation of full PBM-based NMPC*
NMPC = repeated model-based real-time optimization
Mesbah, Nagy, et. al., AIChE J, 2011; IEEE TCST, 2011
24
47
Full PBM-based NMPC with MHE/GHE including sensor model for crystallization systems
t = tk
(actual processtime)
t = tbatch
(batchtime)
t = 0(starting
time)
t
TT
=T
i
past future
Availableexperimental
data
RHE
NMPC
Temperature profileoptimization
GHE: kinetics readjustment
𝑆𝑆𝐸 𝑲𝑷 =𝑆𝑆𝐸 𝒘𝟏𝑆𝑆𝐸 𝒘𝟐𝑆𝑆𝐸
Mass balance Growth rate Nucleation rate
NMPC: end-point optimization
𝑆𝑆𝐸=𝐶𝐿 𝐶𝐿
𝐶𝐿
(1)
(2)
(3)
L2,obs
L1,obs
L2
L2
L1
x
y
z
“AR” ( )PVM“AR” ( )PVM
“CLD” ( )FBRM“CLD” ( )FBRM
Chord lengths
Chord length [ m]�
Count [n
o/s
]
Rotating laser beam
Full mechanistic model including sensor models
Feasible computation due to parallel implementation on GPU
GHE provides real-time model identification and continuous model validation
NMPC re-optimizes operating profile with updated model
Model-based process design & Quality-by-Control (QbC)
0 2 4 6 8
x 104
24
25
26
27
28
29
30
31
32
33
34
35
Time [s]
NM
PC
tem
pera
ture
pro
file
[o C]
Optimal temperature profile
Target CLD
Szilagyi & Nagy, CACE, 2016; CGD 2017
48
MPC setup, used PAT tools
Actu
al te
mpera
ture
Setp
oin
t
Absorbance
FBRM
UV-VISThermo-regulatorThermo-regulator
CryPRINSRHE+
N-MPCRHE+
N-MPCIcFBRM
Chord
Length
Dis
tributio
n
Software part
Experimental and measuring instruments
Scheme of the model based adaptive-predictive control system for cooling batch crystallization
25
49
MPC: NMPC product PVM images
NMPC (upper) product and linear cooling (bottom, same temperature gradient and batch time): strong nucleation, much less growth
50
Particulate product design via multi-objective optimization and simultaneous control of crystal size, shape and purity
*Majumder and Nagy, CES 2013; Borsos et al. CGD, 2015
5000 s
0 s
2000 s
4000 s
3000 s
Variation in impurities yields variations in product crystal shape and purity
Morphological multi-dimensional PBM with multi-impurity adsorption model (MIAM)
Simulates CSD, shape distribution and purity for crystallization systems in presence of impurity (high industrial impact)
Novel QbC approaches for shape control and competitive purity control via control additive dosing
MIAM model describes face-specific competitive adsorption of multiple impurities
Coupled with PBM describes variation of shape, size in purity for crystallization in impure media
𝑥
26
51
0 1 2 3 4 5 6 7-70
-60
-50
-40
-30
-20
-10
0
10
20
30
Temperature Measured ASA concentration from online UPLC Measured PCM concentration from online UPLC At-line measured ASA crystallization product purity Predicted ASA crystallization product purity
Time [h]
Tem
pera
ture
[o C
]
0
100
200
300
400
500
600
700
800
Crysta
l AS
A purity [-]
Conce
ntration [mg/g]
0.1% ASA seeds
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1.0
1.1
1.2
1.3
1.4
ASA: Acetylsalicylic acid, aspirin, APIPCM: Paracetamol, impurity
Aspirin (API) with impurity (PCM)
Crystals are sampled during experiment, purity analyzed at-line by UPLC
At-line crystal purities agree with on-line predicted crystal purity
Yang, Y.; Zhang, C.; Pal, K.; Koswara, A.; Quon, J.; McKeown, R.; Goss, C.; Nagy, Z. K. Cryst. Growth Des., 2017
0
0 0
( ) ( )
( ) ( ) ((
) ))
(t
t t
C API C APIPurity t
C API C API C imp C imp
The proposed approach is an efficient wayto measure product purity in real-time
Simultaneous Monitoring of API and Impurities
52
Model-based feedforward + real-time IA-based feedback control for intelligent additive dosing for AR control
Real-time impurity profiling using on-line UPLC
AR measurement (Perdix/PVM)
Continuous crystallization
Aspect ratio control (ARC)
Desired aspect ratio (AR)
Raw material with variable
impurity concentration
Compensating additive
Impurity conc.
PI0
1
x 10-5
00.51 x 10-
0
2
4
6
8
Additive concImpurity conc
Asp
ect
Ra
tio
1
2
3
4
5
6
7
No control AR = 8
SDC AR = 1
Consistent product shape despite variable impurity profile (QbC of shape via tailored and dynamic additive recipe)
Systematic control of shape variation due to changing impurity profile using counter GM dosing
27
53
1 2 3 4 5 6 7 8 9 102
2.5
3
3.5
4
4.5
5
5.5
6
6.5
7
7.5
Batch
AR
1 2 3 4 5 6 7 8 9 102
2.5
3
3.5
4
4.5
5
5.5
6
6.5
7
7.5
Batch
AR
Systematic control of shape variation due to changing impurity profile using counter GM dosing
Consistent product shape despite variable impurity profile (QbC of shape via tailored and dynamic additive recipe)
No Active Impurity Control (AIC) With Active Impurity Control (AIC)
54
QbC in Cascade MSMPR systems
28
55
Combined cooling and antisolvent crystallization (CCAC) in multistage MSMPR cascade
Design:
Multistage MSMPR cascade,using temperature control orantisolvent addition control, or bothfor a certain stage.
Objectives:
Steady-state optimization
To improve the crystal propertiesproduced during steady-state (e.g.maximum size).
Start-up optimization
To achieve the minimum start-upduration time and the amount ofwaste.
0 100 200 300 400 500 6000
100
200
300
400
500
600
700
Time [min]
L n [m
]
stage 1
start-up steady-state
Increase steady-state product quality (mean size)
Shorten start-up duration time and reduce waste
56
Steady-state optimization of an MSMPR cascade for aspirin crystallization
1 stage
2 stages
3 stages
Batch (∞ stages)
T1 [℃] 25 25 26 -
T2 [℃] 25 25 -
T3 [℃] 25 -
F1 [ml min-1] 3.65 1.05 0.0 -
F2 [ml min-1] 2.60 1.6 -
F3 [ml min-1] 2.1 -
τ1 [min] 30 10.74 6.6 -
τ2 [min] 19.26 11.4 -
τ3 [min] 12.0 -
V1 [ml] 259.5 64.98 33.0 -
V2 [ml] 166.60 75.0 -
V3 [ml] 104.0 -
Ln [µm] 257 369 450 705
CVn [-] 1.00 0.79 0.68 0.25
1
, , ( 1,2,3)0
:
i i in
T F i
Objective
max L
1 2 3
:
( ) 25
Constraints
T T T
T end C
3.65 / min
30 min
i
i
F ml
2530
3540
4550
25
50
75
1000
0.2
0.4
0.6
0.8
Temperature [C]
Ethanol mass fraction [-]
CA
spri
n [g/
g s
olve
nt]
25
30
35
40
45
50
25
50
75
100
Tem
pera
ture
[C]
Ethanol mass fraction [-]
0.1
0.2
0.3
0.4
0.5
0.6
Solubility [g/g solvent]
29
57
Start-up optimization
0 50 100 150 200 250 3000
2
4
Time [min]
Flo
w r
ate
[ml/m
in]
stage 1
0 50 100 150 200 250 3000
2
4
Time [min]
Flo
w r
ate
[ml/m
in]
stage 2
0 50 100 150 200 250 3000
100
200
300
400
500
600
Time [min]
L n [m
]
stage 1stage 2
t99
= 143 min
Waste = 156.6 g
0 50 100 150 200 250 3000
2
4
Time [min]
Flo
w r
ate
[m
l/min
]
stage 1
0 50 100 150 200 250 3000
2
4
Time [min]
Flo
w r
ate
[ml/m
in]
stage 2
0 50 100 150 200 250 3000
100
200
300
400
500
600
Time [min]
L n [m
]
stage 1stage 2
t99
= 83.0 min
WITHOUT dynamic profiles WITH dynamic profiles
Waste = 80.4 g
58
NMPC of Cascade of MSMPR
Inputs:
u1: Antisolvent flow rate at stage 1 (F1) [ml/min]
u2: Antisolvent flow rate at stage 2 (F2) [ml/min]
u3: Temperature at stage 1 (T1) [oC]
u4: Temperature at stage 2 (T2) [oC]
Outputs:
y1: Mean size at stage 2 [microns]
y2: Yield at stage 2 [-]
Controlled variables
Control method Manipulated variables
Mean sizeYield
Nucleation (/first-stage) control
F1, T1
Growth (/second-stage) control
F2, T2
Antisolvent control F1, F2
Temperature control T1, T2
Global control (non-square MPC)
F1, F2, T1, T2
5 different control strategies
4 can be multi-loop or multi-variable, last only multi-variable
30
59
0 100 200 300 400 500 600 7000123
F1 [
ml/m
in]
0 100 200 300 400 500 600 700250300350400
Mea
n si
ze [
m]
0 100 200 300 400 500 600 7000.68
0.70.72
Time [min]
Yie
ld [
-]
(a)
0 100 200 300 400 500 600 70025
30
T2 [C
]
0 100 200 300 400 500 600 700350360370380
Mea
n si
ze [
m]
0 100 200 300 400 500 600 700
0.60.65
0.7
Time [min]
Yie
ld [
-]
(d)
0 100 200 300 400 500 600 700234
F2 [
ml/m
in]
0 100 200 300 400 500 600 700250300350400
Mea
n si
ze [
m]
0 100 200 300 400 500 600 7000.68
0.6850.69
Time [min]
Yie
ld [
-]
(b)
0 100 200 300 400 500 600 70025
30
T1 [C
]
0 100 200 300 400 500 600 700200300400
Mea
n si
ze [
m]
0 100 200 300 400 500 600 700
0.66
0.68
Time [min]
Yie
ld [
-]
(c)
Input step change
Outputs responses
Inverse response
Oscillation
Nonlinear and
complex
There are strong interactions among the four inputs and the two outputs.
F1F2
T1 T2
Size Size
SizeSize
Yield Yield
Yield Yield
Yang & Nagy, CES, 2015
Analysis of system dynamics
60
NMPC – attainable regions for control
100 200 300 400 500 600 700 8000
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Mean size [m]
Yie
ld [-
]
12
3
Nucleation ControlGrowth ControlAntisolvent ControlTemperature ControlGlobal Control
0 100 200 300 400 500100
300
500
Siz
e [
m]
0 100 200 300 400 5000.5
0.75
1
Yie
ld [-
]
(a) 21 1 3Set-point:
Yield
Size
0 100 200 300 400 500
0
5
10
Sta
ge 1 a
ntis
olven
tadd
ition
rate
(F1) [m
l/min
]
0 100 200 300 400 500
0
5
10
Sta
ge 2 a
ntisolvent
add
ition ra
te (F
2) [m
l/min]
Time [min]
(b)
F1
F2
Point Yield Size
1 Medium Medium
2 High Small
3 Low Large
Antisolvent control
Pareto fronts: tradeoff between yield and size
Attainable region depends on control approach
Best control depends on operating point
Systematic design of optimal control structure
31
61
QbC in PFC systems
62
Continuous plug flow crystallizer with controlled dissolution segments
T
Length
Spatially distributed operating profile (heating/cooling or antisolvent/solvent)
Alternating controlled segments of growth and dissolution cycles (GDCs)
COBC
Majumder & Nagy, AIChE J, 2013
32
63
Determination of optimal # of PFC segments
Simultaneous design and control (design for better control) - MINLP
Simplified (practical profile) only 5 segments of variable length but negligible performance degradation
Convergent spatial cyclic temperature profile
Optimal # of segments for best control
Majumder & Nagy, AIChE J, 2013
64
510
1520
25
0
100
200
3000
0.01
0.02
0.03
No. of Segments [-]Size, L[m]
Vol
ume
dens
ity, f v [
#/ m
2 ]
Controlled Dissolution through Spatial Temperature Cycling
Optimal CSD - controlled dissolution Optimal CSD - no dissolution
Optimal operating trajectory with no dissolution
10 15 20 25 30 35 400.04
0.05
0.06
0.07
0.08
0.09
0.1
0.11
Temperature, T [o C]
Con
cent
ratio
n, C
[g/
g of
sol
vent
]
SolubilityOperating curve
Optimal operating trajectory with dissolution
Fine crystals
No fines in product
More agile process, better product quality
Desired target quality in steady state only achieved using suitable control (QbC)
Simultaneous design and control
Majumder & Nagy, AIChE J, 2013
33
65
Multi-objective optimization of a multi segment multi addition plug flow crystallization (MSMA-PFC) array
Feed Product
Flufenamic acid
75 80 85 90 950.18
0.19
0.2
0.21
0.22
0.23
L43
[m]
CV
1 2 3 40
10
20
30
40
50
60
70
80
90
Num. of segments
Ant
isol
vent
[m
l/min
]
50 100 150 2000
50
100
150
200
250
L [m]
f v [1/
m4 ]
1 Injection2 Injections3 Injections4 InjectionsOptimal
Pareto optimal front – trade-off between two objectives
Optimal antisolventaddition
Non-convex performance landscape
Robustness analysis
Sensitive
Sensitive
Fundamental understanding of the spatial distribution and sensitivity of key crystallization mechanisms better crystallizer design and optimal operation
66
Optimization of position of addition
Case 1: equally distributed
Case 2: equal spatial, optimized
Case 3: optimized location & amount
34
67
Fouling:
– change in heat transfer (increased energy use)
– decreased residence time (loss in yield and quality)
– blockage (emergency shutdown)
PFC model with encrust formation
WallEncrust
Tube sider
Z
Ro
Rt
Rf Heat transfer
PBM
Material balance
Thermal resistance
Encrust thickness
Anti-fouling control (AFC) for continuous PFC
1.Koswara, A., and Nagy, Z. K., 2015. IFAC-PapersOnLine 28(8): 193–98.2.Koswara, Andy, and Zoltan Kalman Nagy. Patent US20170312795A1.
68
Periodic AFC implementation
1.Koswara, A., and Nagy, Z. K., 2015. IFAC-PapersOnLine 28(8): 193–98.2.Koswara, Andy, and Zoltan Kalman Nagy. Patent US20170312795A1.
35
69
Response of Periodic AFC
Arrows indicate evolution of
operating curve in time
temperature (C)
Con
cent
rati
on (
g/g)
Con
cent
rati
on (
g/g)
1.Koswara, A., and Nagy, Z. K., 2015. IFAC-PapersOnLine 28(8): 193–98.2.Koswara, Andy, and Zoltan Kalman Nagy. Patent US20170312795A1.
70
On-Off Feedback Control
• The Encrust and CSD controller assures state of control.
• The CSD feedback controller detects the upper and lower bounds and trigger the point of collection (blue).
• Example of level-1 control, in which an active process control system is used to monitor CQAs in real-time.
• Process will work indefinitely due to QbC approach
Koswara, A., and Nagy, Z. K., 2015. IFAC-PapersOnLine 28(8): 193–98.
36
71
Summary Many economic drivers for better control of pharmaceutical
manufacturing processes
“Academic” methods are available to precisely design and control solid product attributes
Exemplified in the case of crystallization and solid drug product manufacturing (via simulation, laboratory, pilot and industrial scale)
Advanced control enables better implementation of QbD and opens new opportunities for agile, reconfigurable and robust manufacturing
Continuous manufacturing and novel integrated processes for process intensification
QbT QbD QbC ?