Help with Kubelka Munk equations in Excel

In summary, the conversation discusses the use of the Kubelka-Munk equation for paint samples and the process of calculating it in Excel. The formula used in the calculation seems to be correct and the fact that non-zero values are obtained when the OBS vector is populated with random values suggests that the calculation is working. The OBS vector should contain the known K/S values for the paint samples, with a 1 at the end to account for the constraining condition. It is recommended to double-check the input values and formula, and consult the paper and link for guidance.
  • #1
Supershandy
1
0
TL;DR Summary
Not entirely sure if the equations I put in are working, Although I won't know what the answer is until I put in the data, I could do with a few pointers and help to determine if the answer I'm getting is correct
Hello everyone.

I'm trying to do a Kubelka Munk equation for paint samples and would like to do the calculation in Excel first before moving it over to a programming language outside of MATLAB. I have Spectroscopic scans of the samples and put them into a database where the K/S values have been determined. But this is where I get stuck.

Taking ideas from the following link and paper - Spectrophotometric color formulation based on two-constant Kubelka-Munk theory

Starting from page 24 of the document, I have the KSCOEFS array completed and populated with 33 mixtures that have their paint concentrations and K/S values. From this I need to find a solution vector KANDS by multiplying the KSCOEFS with itself and then creating the inverse which is then multiplied by the KSCOEF and then the OBS vector. I use the following formula in excel in a 10 x 1 matrix

={MINVERSE(MMULT(TRANSPOSE([KSCOEFS]),KSCOEFS))*TRANSPOSE([KSCOEFS])*[OBS]}

Now, because the OBS vector is populated with zeros (with a constraining 1 at the end), the only answer that is provided in the whole KANDS solution vector is 0, which I'm not sure is correct or not which also means that I'm unsure if the equation works. I then populated the OBS vector with some readom values and it started spitting out numbers.

The paper is a little vague on what should be in the OBS vector and with no working example it's hard to tell if I'm actually doing it correctly?

I've attached an example excel file that has one part of the KSCOEF array for the wavelength at 400nm as well as the OBS and solution Vector. I'm not looking for an answer, but more a general idea if I'm actually doing it correctly or not as it has been a very long time since I've done Matrix Multiplications.
 

Attachments

  • K-S Help.xlsx
    45.6 KB · Views: 139
Physics news on Phys.org
  • #2


Hello there,

From what I can see, you seem to be on the right track with your calculation in Excel. The formula you are using looks correct, and the fact that you are getting non-zero values when you populate the OBS vector with random values suggests that your calculation is working.

As for the OBS vector, it should contain the known K/S values for your paint samples, with a 1 at the end to account for the constraining condition. This is to ensure that the solution vector you obtain is a valid solution for the Kubelka-Munk equation.

I would suggest double-checking your input values and the formula you are using, as well as consulting the paper and the link you mentioned for any additional guidance. It may also be helpful to try out your calculation on a small subset of your data to see if the results are consistent.

Overall, it seems like you are making good progress with your Kubelka-Munk equation in Excel. Keep up the good work and don't hesitate to ask for help if you encounter any further difficulties. Best of luck!
 

FAQ: Help with Kubelka Munk equations in Excel

What is the Kubelka Munk equation?

The Kubelka Munk equation is a mathematical model used to describe the behavior of light in a turbid medium, such as a paint or ink film. It takes into account the absorption and scattering of light within the medium, and is commonly used in colorimetry and spectrophotometry.

How do I use the Kubelka Munk equation in Excel?

To use the Kubelka Munk equation in Excel, you will need to input the necessary parameters such as the absorption coefficient, scattering coefficient, and layer thickness. You can then use the equation in a cell to calculate the reflectance or transmittance of the medium at a given wavelength.

What are the limitations of using the Kubelka Munk equation in Excel?

Excel is a versatile tool for data analysis, but it may not be the best option for complex calculations such as the Kubelka Munk equation. Excel has a limit on the number of nested functions it can handle, which may make it difficult to perform multiple calculations within the equation. Additionally, Excel may not have the necessary precision for highly accurate results.

Are there any resources available for help with using the Kubelka Munk equation in Excel?

Yes, there are many online resources available that provide step-by-step instructions and examples for using the Kubelka Munk equation in Excel. You can also refer to scientific literature or consult with a colleague or expert in the field for guidance.

Can I use the Kubelka Munk equation in Excel for any type of medium?

The Kubelka Munk equation is primarily used for turbid media, but it can also be applied to other types of materials such as pigments, dyes, and coatings. However, the accuracy of the results may vary depending on the properties of the medium and the assumptions made in the equation.

Back
Top