Let's Break It Down: A Guide To Optimizing Your Extraction Operation


Most extraction artists make the “best” cannabis extract that exist. I, on the other hand, have no idea what the “best”’ extract is, though I do know how to find the “optimal” extract. I think we all agree that an extract with lots of terpenes and a high THC concentration is desirable. Now, I would like to suggest that extraction is not an art but a process. If we are talking about science, not art, we can use methods and protocols from related industries to optimize our extraction process, design of experiment (DoE) for example.

I intend to provide an in-depth walk-through of how to optimize your extraction operation and will use examples of my work as vice president of extraction here at OutCo. Keep in mind though that this applies to any process or solvent. We extensively used the design of experiment concept to optimize not only the yield but also the composition of the cannabis extracts, as we at OutCo care deeply about the quality and effectiveness of our products and recognize our obligation to both our patients and the cannabis community.

"However, with the growing complexity in extraction systems and increasing competition, the trial-and-error method should be replaced by modern techniques."

In science and especially chemistry, it is always important not only to achieve one’s scientific goals but also to optimize the parameters surrounding them. Chemists always long for simplicity, purity and yield. These factors become even more critical in our industry, where financial targets, time constraints and, with growing importance, cost of raw material require better yields.


And we should not forget that most of the United States uses the term medical marijuana for a reason. Therefore, any extract producer should not only aim for the highest yields but consistent, high-value extracts. However, with the growing complexity in extraction systems and increasing competition, the trial-and-error method should be replaced by modern techniques.

As a fun fact, the concept of design of experiment 1, 2 is quite old, having been created by Sir Ronald A. Fisher, the British statistician, evolutionary biologist and geneticist (1890–1962), who laid the foundations for modern statistical sciences. Fisher first demonstrated the most important means of experimental design in a rather frivolous sounding application: 1 how to test the hypothesis that the order in which tea and milk are added into a cup can be distinguished by a lady. Regardless of its silliness, this first example set the standard for experimental design.3

Design of experiment is used to gather as much useful information about the effects of variables on a certain output or response in an effective and economical way.3 In extraction these are the influences that different factors, like temperature, pressure or solvents have on the reaction outcome.

We now need to define a few terms to better understand the process of planning and executing a DoE.

Definition of Terms

System
The system can be defined as an independent group of items that form a “unified whole.” The system is expressed by its inputs, outputs and borders and, finally, the processes that happen inside these borders. In our case, it is the CO2 supercritical fluid extractor (SFE) and all surrounding processing steps, like milling.


Inputs
Inputs are all quantities and qualities that can influence the system. It is essential to give a brought definition as the factors that influence the system, and the ones which do not, are not known initially. For example, pressure and temperature come to mind, but also room temperature, time of day, or the person that operates the machine might be important.

Factors
A factor is an input that does influence the system. It is an important part of research to find all factors as unknown factors are often uncontrolled. Examples of important factors are filling weight and runtime.

Outputs
Outputs are all quantities and qualities that can be influenced by the system. Again, it is important to give a brought definition to not limit the sight at the beginning of an experimental study. The important quantities and qualities that are influenced by the system will be called response.

Responses
Responses are influenced by the system, and the knowledge of these are very important. Examples for responses would be yield of THC, terpene concentration or water weight.

Optimization

How do we go about optimizing a process? Some of the factors we can influence are temperature, pressure and time, as defined in table 1 below, along with our outcome definitions.

T: Temperature or set point of the chiller.

P: Set point of extractor pressure

t: Run time

Next, we must decide what we are actually looking for. Let’s start with:

YpR: Yield of oil recovered per run. Important if you have limited resources.

YpW: Yield of oil produced per week. Important if you have unlimited resources. This is different than YpR, as it is a measure of time, not batches.

CC: Cannabinoid concentration as a percentage of total oil. A high number here indicates less waxes and other impurities and, therefore, will cut down on the need for additional cleaning steps.

TC: Terpene content as a percentage of total oil. This is important to keep track of when aiming to produce a flavorful oil.

EE: Extraction efficiency as a percentage of cannabinoids removed from the raw material. This answers the question: have we left any THC behind in the plant?

How do we go about optimizing a process? Some of the factors we can influence are temperature, pressure and time, as defined in table 1 below, along with our outcome definitions.

Figure 1 

Experiment

Run Time (h)

THC (g)

1

4

53

2

8

103

3

18

263

4

34

367

Raw

n/a

500

Should we just keep going? Maybe if we increase the pressure, we can extract faster? It turns out we can,4,5 but then we must do the runtime experiment again. And what about temperature? And the other factors? It will require quite some work to zero in on the optimal conditions.


Experiment Design

We used the above-mentioned DoE principles to optimize our extraction process.
First, we need to define the problem: We have a 20L, 2,000psi SFE with a single separator.
Second, the responses to be measured will be yield of THC (in grams) and terpene ratio (%).

Next, the factors we will change are temperature and pressure, while holding all other factors constant, including runtime, starting material type, starting material weight, grind size and operator.

We have found that the particle size of the ground cannabis flower has a direct influence on yield. Therefore, it is strongly recommended to use a grinder or mill that can control for particle size. We have even come across cases where the operator influences on the process. For example, the people filling the extractor might differ in the way they pack the column.
A few other points should be considered in the planning of the DoE, and some are more important and practical in the specific case of SFE optimization.


Comparison
When seeking the best protocols, we should be able to prove that they are better than other types. Use your standard protocol as a benchmark and compare all DoE results to it.

Replication
Repeated experiments and measurement under the same conditions. Replication increases precision by providing variance and standard deviation measurement.

Blocking
A block is a group of experimental units that are similar to each other. This way, known but irrelevant sources of variation that exist between experimental units can be reduced. Run the full DoE in one push, don’t place the experiments on hold for weeks or months. This way one prevents influences by broken equipment or difference in raw material.

Orthogonality
Testing only orthogonal (independent) factors greatly reduces the number of experiments needed. We tested the orthogonal factors pressure and temperature. The factors time and flow rate are related and, therefore, would be a bad choice for testing against one another.

Factorial Experiments
While orthogonality only tests the influence of one independent factor, a factorial experiment investigates the effects and interactions of several factors. This is an integral part of the mathematical workup described below.

 

Execution

Considering all these points, we arrive at a design with the following limits: Temperature 34˚C to 60˚C and pressure 1,100 to 1,900 psi (figure 2). Please note the choice of units, both metric and imperial. Take it as a metaphor for the current state of cannabis: Still torn between worlds.

To cover all possible pressure and temperature combinations efficiently, we chose a star design and replicated the central point conditions to establish variance. Only if we get the same results under the same conditions every time, can we be sure of our outcome.

"In this simple example, we found, with only six experiments, that high pressure with high temperature is best for high THC yields and that low pressure and temperature is best for a high terpene percentage in the extract."

In figure 2, the table shows all experimental conditions, their results for THC yield and terpene percentage. A quick glance at the dataset indicates that the THC yield increases with increased pressure, while the terpene ratio appears to be favorable at lower temperatures. Results for experiments C1 and C2 are in good agreement, demonstrating the good quality of the data collected.

Figure 2

Expt. no.

Temp (˚C)

Pressure (psi)

THC (g)

% Terpenes

A

34

1100

2.0

63.4

B

34

1900

334

6.3

C1

47

1500

17.9

39.5

C2

47

1500

18.1

36.0

D

60

1100

0

0

E

60

1900

144.2

10.2

Analysis

Although only five distinct experimental conditions from an infinite number of combinations were tested, we could have run hundreds more experiments to find the optimal conditions or use mathematical tricks to predict these missing combinations. Design of experiment using a mathematical operation called Taylor expansion (figure 3) calculates a response surface to estimate the results for all other factor combinations. The Taylor expansion considers second order behavior, namely the correlation between temperature and pressure and their influence on the system. All factors are paired with a coefficient ß to scale their influence on the system.

 

Figure 3

Y=bX

b=(X’X)-1X’Y

a=bX

Y is the result (response) matrix, X is the parameter (factor) matrix, b is the coefficient matrix and a is the Taylor expansion. The matrix algebra in figure 3 cannot be performed in common spreadsheet programs, but MatLab or Mathematica can easily handle these operations. There also is the option of using dedicated DoE software that takes one through the whole process. Such programs are easy to find through a quick web search.

The Taylor expansion for THC yield shows a strong correlation between pressure and THC yield (+xP), as we had predicted from the initial data set and an inverse correlation between temperature and THC yield (-xT) (figure 4). This can be explained by the effects that pressure and temperature have on CO2 density.1,2

 

And here is the response surface. We can clearly see that the highest point on the surface, and with the best conditions, is at the highest pressure and highest temperature of your test area. We are now boxed in, as we cannot raise the temperature or increase the pressure as our instrument is at its limits of operation.

Figure 4

a= - 47.95 xT + 119.05 xP - 46.95 xTxP

Figure 5

a= - 14.875 xT - 11.725 xP + 16.825 xTxP

In this simple example, we found, with only six experiments, that high pressure with low temperature is best for high THC yields and that low pressure and temperature is best for a high terpene percentage in the extract. We now must choose the best process for our needs. Maybe we want to extract just the terpenes from the plant, then the conditions of experiment A would be optimal. Or, if we want to have high THC yields with a high terpene percentage, then we have to find the balance between the two opposing processes.

Conclusion

In closing, I want to reiterate that this example of optimizing extractor conditions at OutCo is just that: an example of how design of experiment can be used in process optimization. The basic principles of choosing and controlling for factors and measuring responses applies to any extraction system. For SFE with higher pressure capability, the pressure factor can be adjusted. When you are using an ethanol extraction process, consider varying solvent temperature and soak time. Additionally, you might want to look at the CBD to THC ratio or color of extract as an optimization factor.

Further Reading:
1 Fisher, R.A., The Design of Experiments. Second Edition. 1937: Oliver and Boyd
2 Stansbury, W.F., Development of experimental designs for organic synthetic reactions. Chemometrics and Intelligent Laboratory Systems. 36 (1997) 199
3 Griffiths, D., Understanding Data, Principles & Practice of Statistics. 1998: Jacaranda Wiley Ltd.
4 J. of Supercritical Fluids 52 (2010) 6
5 J. of Supercritical Fluids 55 (2010) 603