What's new

Calling all Eggheads

HeadHodge

Bula To Eternity
Now that spectrometers are relatively inexpensive and more easily obtainable by all, I've been investigating a way to use one to test kava as a cheap and easy alternative to HPLC equipment and techniques.

My knowledge on this topic is very limited and I've more and less run into a wall blocking my progress. So I'm posting this in hopes that there are others out there that can help break down the walls of my ignorance.

I've included two papers that have been written showing the feasibility of doing this, but they both lack the details needed for me to act on the concepts.

Based on my interpretation of both papers, they both use pretty much similar techniques to use reflective spectroscopy to analyse kava samples with results closely resembling those of HPLC testing.

It appears that the way they do it is to do spectral tests on a sample of kava. The result is an unintelligible spectral graph over a wide spectrum of wavelengths. In order to decode this graph they took the exact same kave and performed HPLC tests on it to get specific information that can be easily interpreted. They then use statistical analysis with this data to essentially map the HPLC to spectrometer test results to create a decoder ring that can be used to interpret the results of the spectral graphs obtained from the spectrometer tests.

They use reflective spectroscopy to analyse dry samples of fine kava powder, with the thinking that this would be the best way to do on site testing in Vanuatu.

But I would like to use absorptive spectroscopy by extracting kava in a solvent instead because the equipment needed is much cheaper.

What I really need right now is for someone to help me figure out how to recreate the techniques that the papers use to map the resulting spectral graphs to their equivalent HPLC test results.

Regards
 

Attachments

Groggy

Kava aficionado
Admin
I am sure verticity will be by sooner or later with thoughts.

EDIT: Just say his name three times and he will appear ;)
 

Rick.Sanchez

Kava Enthusiast
There's really no quick and dirty way to measure that. Absorbance is typically used if youre already looking at a relatively pure sample. I dont think theres any way to use an absorbance spectrum to measure kavalactone content without first isolating the individual kavalactones of interest. That's going to take some pretty hardcore organic chemistry skill. And even then, there's no guarantee it will work
 

verticity

I'm interested in things
OK, I'll try to help. But, please, the Politically Correct expression is Egghead-Americans ;)

If you want to do normal absorption spectroscopy, infrared is mostly out.
What I would suggest is the following:

- Get a UV-VIS spectrometer with a range of about 200-700 nm.

- Obtain pure samples of each kavalactone, and each flavokavain, from a chemical company that sells them as standards. This will be expensive, but you won't need very much

- Measure the UV-VIS spectrum of each pure KL and FK

- You will then have 9 spectra. Each spectrum consists of a series of wavelength/absorbance numbers that looks like:
wavelength = 200 nm, absorbance = 0.1
wavelength = 200.1 nm, absorbance = 0.2
wavelength = 200.2 nm, absorbance = 0.5
...[ad nauseum]...
wavelength = 699.9 nm, absorbance = 0.02
wavelength = 700 nm, absorbance = 0.01
[nauseum]

- Create a model with these 9 spectra by simply adding linear combinations of them together, with variable coefficients. To add two spectra, who I will name Floyd and Gertrude, together simply select coefficients for Floyd and Gertrude. For example, you can select the coefficient 0.5 for both of them. Then you go through each wavelength in Floyd and multiply the corresponding absorbance by 0.5. Do the same thing for Gertrude. Then you go through each of Floyd and Gertrude's wavelengths and add their absorbances together. This will result in a new, synthesized, spectrum, based on our model, in this case representing the average of Floyd and Gertrude. Now to do this with nine spectra, in addition to Floyd and Gertrude, you will also have spectra named Hubert, Sally, Eleanor, Teddy, Bob, Nora and Dweezil in your model. Your model looks like:
HedgeHog = C1 * Floyd + C2 * Gertrude + C3 * Hubert + C4 * Sally + C5 * Eleanor + C6 * Teddy + C7 * Bob + C8 * Nora + C9 * Dweezil
The numbers C1, C2, etc are variable parameters in your model, with the only constraint on them being that they must add up to one.

- Take the UV-VIS spectrum of an unknown kava sample. Use computational methods to find the best fit of your model to your unknown spectrum. Informally speaking, twiddle the 9 variable parameters around until you get a synthesized spectrum that best matches the unknown spectrum.
How do you define what the "best fit" is? Go through each wavelength of your synthesized spectrum, and each corresponding wavelength of your test spectrum, subtract one absorbance from the other, and square the result. Then add all those numbers together, resulting in a single value, for example, 80085. It is best if you use an 8-segment LED calculator for this calculation. That number is your goodness of fit metric. Your goal is to minimize that number by twiddling the variable parameters.
But how do I twiddle the variable parameters? you might ask. There are many many ways. You can use brute force with a computer. Try all possible combinations of C1, C2 etc, and select the best one. Or you can be all fancy and use one of the algorithms in this book:
http://www2.units.it/ipl/students_area/imm2/files/Numerical_Recipes.pdf
in Chapter 10 - Minimization or Maximization of Functions
If you are old school like me, you can get the FORTRAN edition which is what I used in grad school.
If you are a modern, swingin' Egghead-American, you can get the latest edition, which I think is in C++, God help us.

Clear as mud?
 

verticity

I'm interested in things
Obviously I have left out lots of details, like doing runs of multiple samples and averaging them for your model and unknowns, but that is the broad idea.
 

verticity

I'm interested in things
Oh, I almost forgot the punch line:
The values of the parameters C1, C2, C2, etc that you find after the model fitting process, represent the relative amounts of each KL and FK.
You can also add an additional parameter that you multiply the whole thing by to get different total absorbances. A normalization factor. This will let you know the absolute amounts of KLs and FKs. (Or in other words, you won't have to normalize the spectra before you do the fitting.)
How well this all will actually work in practice, I don't know. It will probably work to some extent, but will be a lot rougher than HPLC.
 

HeadHodge

Bula To Eternity
Obviously I have left out lots of details, like doing runs of multiple samples and averaging them for your model and unknowns, but that is the broad idea.
thanks, but what's wrong with using the same technique the two attached papers use? That is, use the results of a HPLC test and least square stats to find each lactone on the spectral graph?
 

HeadHodge

Bula To Eternity
thanks, but what's wrong with using the same technique the two attached papers use? That is, use the results of a HPLC test and least square stats to find each lactone on the spectral graph?
Once found, they report further test results to be close to HPLC quality
 

verticity

I'm interested in things
thanks, but what's wrong with using the same technique the two attached papers use? That is, use the results of a HPLC test and least square stats to find each lactone on the spectral graph?
Well, if you want to do it that way not exactly that way, but at least not using pure KL samples, you construct your model slightly differently. You get a bunch of kava samples, and get the HPLC results for each one. Also take a UV-VIS spectrum of each one. Now you construct a model of linear combinations of you standard samples, for example:
My Kava = C1 * Mo'i + C2 * Isa + C3 * Borogoru + ...
Choose many different standard kavas with very different KL profiles.
Fit your unknown spectrum using this model.
In this case, the coefficients you get will not tell you how much Mo'i, Isa, or Borogoru, etc is in the sample, they will tell you how much your unknown sample resembles the KL (and FK) profile of that particular kava. They definitely won't tell you the KL proportions. So you need to add that information into (that you got from the HPLC results into this model)
Each standard kava has a known KL and FK level. For simplicity I will just show 3 of the KLs. for example:
Mo'i = 0.5 * K + 0.1 M + 0.2 Y
So then your model is
My Kava = C1 * (0.5 * K + 0.1 M + 0.2 Y) + C2 * (0.2 * K + 0.3 M + 0.1 Y) + C3 * (0.2 * K + 0.3 M + 0.1 Y) + ...
Let's use the lower case letters k, m and y for the constant coefficients of the KLs in your model. Then you get:
My Kava =
C1 * (k1 * K + m1 * M + y1 * Y) +
C2 * (k2 * K + m2 * M + y2 * Y) +
C3 * (k3 * K + m3 * M + y3 * Y)

=

C1*k1 * K + C1*m1 * M + C1*y1 * Y +
C2*k2 * K + C2*m2 * M + C2*y2 * Y +
C3*k3 * K + C3*m3 * M + C3*y3 * Y

Let C1*k1 = a1, and C1*m1 = b1, etc, just so it looks simpler, and group all the K, M and Y coeffs together:
My Kava =
(a1 + a2 + a3) * K + (b1 + b2 + b3) * M + (c1 + c2 + c3) * Y

Lets call the sums like a1+a2+a3 just "a" and drop the asterisks:

My kava = aK + bM + cY

Those numbers, a, b and c (you know them now, after fitting your unknown to the model, and doing the algebra above) are the proportions of kavalactones.

Something like that.

Now: I don't know which way will make a better model. In theory using a model based on pure KLs would make a more accurate model, since you can vary the KLs independently in your fitting process, so you will be able to get better fits. (Technically speaking, the pure KL spectra are more analogous to what are called eigenfunctions than spectra of standard kava samples would be) On the other hand, a model based on HPLC tested standard samples will be a model of everything that is in the kava, so it might be better in some ways, although it could be very unwieldy if you use a large number of standards. Then you would have a large number of variable parameters in your model. It's hard to find the best fit that way.

Another thing I haven't mentioned much is that each number you get will a standard deviation. And you have to take care of making sure all those standard deviations get propagated when you do your calculations.. But I'll save that for a future lecture. LOL
 
Last edited:

verticity

I'm interested in things
The thing is, the IR reflectance spectra have a lot more peaks to work with. Basically when you take the spectrum between 200-2500 nm, they have found it is possible to make these correlations with KL content because there are lots of distinct peaks, mostly on the red end, that vary a bit for different cultivars. In the range 200-400 nm (UV), I'm sure there are correlations, but I'm just not sure how much structure you will be able to see there to make a meaningful fit of your model to. If there are too many peaks all overlapping each other, it might just be a shapeless blob in the 200-400 nm region, which you can fit a model to, but your error bars might be pretty big. I don't know. This is something that might or might not work in practice.
 
Last edited:

verticity

I'm interested in things
Now if you want to do it exactly like described in the papers, you need to use Partial Least Squares software. This is not to be confused with simple linear least squares. This is a highly complicated technique, that you would need to use canned statistics software for. You could probably use Matlab, or the R programming language. The papers don't contain enough detail for me to tell you exactly how they do it. You would really have to talk to the authors to get more practical details. If you ask, they might be willing to supply you with the actual software they used. But you would be employing it over a much more limited range of wavelengths, so that's why I am skeptical of how well it would work.
 
Top