Photosynthetic Spectral Quality Calculator (PSQC)

Discussion in 'LED and other Lighting' started by Ganjineer, Oct 3, 2016.


    Ganjineer Member

    I've been a lurker on RIU for a few months, soaking up as much information as I can. During this time frame I've built multiple grow concepts, re-built them, and now have one completed harvest under my belt. I'd like to thank the members of the forum for their contributions to my success. Because of this, I'd like to give back to this community with a tool I've developed called the Photosynthetic Spectral Quality Calculator.

    What is it?

    The Photosynthetic Spectral Quality Calculator (PSQC) is a piece of software I have developed to evaluate the photosynthetic "quality" of any spectrum of light. This tool can help you model different light concepts based on data from manufacturer datasheets.

    It's important to note that this tool is not specific to COB LED's, but rather any artificial light source. My goal for this project is to simplify the gathering of information and empower people to make their own choices with regards to their lighting. We all want the same thing... the best way to grow cannabis.

    What is it used for?

    The PSQC is used to evaluate the quantum efficiency of radiation (QER) and the luminous efficiency of radiation (LER). These two metrics are essential for modeling PPF and subsequently the PPFD of a light source. @alesh and @SupraSPL have already demonstrated the math behind this in this thread . Once you have QER and LER you can calculate the PPF of a light source using the following formula:

    • LE= luminous efficiency of your light ie. the lumens per watt (lm/W) of your LED at a given drive current
    • LER= luminous efficiency of radiation ie. the lumens per watt (lm/W) of a 100% efficient light source of the same spectrum
    • P= the power (W) that you are driving the LED at (Volts*Amps)
    • QER= quantum efficiency of radiation ie. the number of photosynthetically active photons per watt per second (umol/J) or (umol/W/s)
    • PPF= photosynthetic photon flux (umol/s)
    Math...great...okay, how do you actually use it?
    1. Digitize the spectral distribution you want to analyze from the datasheet. I used WebPlotDigitizer and it made the job extremely easy. You should digitize the entire visible spectrum(~380-~780), not just the PAR spectrum (400-700).
    2. Create an excel file with a sheet called "Spectral Distribution" with column A being the wavelength in nanometers and column B the relative intensity of that wavelength in decimal form (not percent! ie. 0.22 not 22%). I've added a file called "Example Spectrum" so that you can test run the program and check your formatting.
    3. Install the software, run it, and load your excel file that you want to analyze
    4. Ensure that the spectrum looks correct
    5. Hit "Run Calculator" and the software automatically determines the QER and LER (may take a few seconds)
    Fine and dandy! Where do I get it?

    The software can be downloaded from this link OR you can download the attachment in this post.

    Installation Instructions

    Dependancies: MATLAB runtime (automatic download) and Microsoft Excel (to make the excel file with your spectral distribution)
    1. Download the file and unzip it
    2. Run the PSQC_installer.exe file to install the program (This should also download the MATLAB runtime which is required to run the software, be patient, the runtime can take a few minutes to download)
    3. After installation you can run PSQC.exe from your program files or programs list
    Future Plans

    If people like the tool, then I am happy to make revisions/updates, which could add a greater degree of functionality. I do this stuff because I like to tinker, so please be patient (this ain't my day job). If people want to see the MATLAB source code then I will happily provide it, but I have no plans to convert this tool to C++ or Python because I'm simply not very adept with those languages. Feel free to comment on any errors you may see, I almost certainly will have made some mistakes.

    Attached Files:

    Last edited: Oct 3, 2016

    CobKits Well-Known Member Rollitup Advertiser

    mahiluana likes this.

    Ganjineer Member

    Quick note: I'm sure that the average RIU member will have little use for this, but I know there are other nerds out there who love modeling/designing/building as much as they love growing!
    mahiluana, CCCmints and MeGaKiLlErMaN like this.

    Ganjineer Member

    Attached Files:

    mahiluana likes this.
    Rocket Soul

    Rocket Soul Well-Known Member

    Nice work ganjineer!! Fancy that, i was just now thinking about this stuff: with some people adding red suplementation to their builds in the form of red diodes i was thinking about going about it in another way: vero decor series has a few ultra low K (1500!!!) spectrums in very high cri, where the red bump peaks arounf 650-660 nm, with very little else in the spectrum.
    But without the ler of the spectrum its very hard to get an idea if it really would be more efficient. Sadly im on android now with no possibility to run your software. Is there anyway i could entice you to check it outbif it doesnt take to much time and effort? Adding the datasheet just in case... Theres some really nice looking spectrums
    mahiluana likes this.

    Thirsk Member

    Thank you so much for putting all this together!! I really appreciate your hard work there :) :)
    The only thing that i could think of as an improvement would be taking the different spectrums of the most often used leds and hardcode it into the calculator because i think a lot of people will have a hard time figure out all the digitizing themselves ;)

    Nevertheless great thinking here :)
    Last edited: Jan 8, 2017
    mahiluana, Randomblame and Ganjineer like this.

    TogiX Active Member

    Now we just need to find a way to calculate green's overall advantage due to the sieve effect, since only this color can penetrate through to the inner chloroplasts.

    "Let us make the drastic assumption that the chloroplast is a sac containing a solution of chlorophylls at a concentration of 100 mol m–3. This value is chosen because (i) ordinary green leaves are a few hundred micrometers thick; (ii) 50–80% of their volume comprises cells; and (iii) chloroplasts occupy 5–10% of the cell volume.

    In other words, < 1% of the red or blue light is transmitted through the chloroplast. On the other hand, for wavelengths that are weakly absorbed, such as green light, T is considerable. When ε for green light is assumed to be 500 m2 mol–1, A and T would be 0.05 and 79.4%, respectively."

    ttystikk Well-Known Member

    Bump. This is too cool to disappear.
    mahiluana, lukio and MeGaKiLlErMaN like this.

    Ganjineer Member

    Thanks @ttystikk !

    I'd like to make some edits to version 1.1 in order to increase its functionality and usability. I really like @Rocket Soul suggestion about being able to combine/mix'n'match different spectrum.

    If anybody has any other suggestions or requests, I'm happy to put the time in where I can to make changes!
    mahiluana, Randomblame, lukio and 3 others like this.

    MeGaKiLlErMaN Well-Known Member

    Bump with the 3000K 90cri CXM-22 info. Looks a bit odd but the graph cuts it off and compresses a bit.
    QER 4.72414
    LER 355.463

    Heres the math.xlsx So one of these is a bit off.

    LER [lm/W]
    QER [µmol/J]

    Attached Files:

    Last edited: Mar 12, 2017

    Ganjineer Member

    Wow, I'm excited that somebody is finally putting this tool to good use.

    With regards to the math.xlsx data; a LER of 251 lm/w is extremely low for a white light source, so low that I'm inclined to believe that it is incorrectly calculated. If you can give me the excel sheet with the calculations I can take a look at it and see if I find any inconsistencies between our methods.

    MeGaKiLlErMaN Well-Known Member

    I've been using the 1.1 now, they are much closer now. Pm me if you like I'll be makeing a video soon of how to go though the whole process. It's a bit complicated as you know so I want to make sure I get everything spot on

    Abruzzi Member

    So if I understand correctly, this program calculates the photosynthetic activity between 380 and 780? Why not the full spectrum like the mc cree curve?

    Thirsk Member

    The idea with the video sounds really nice!! It would also be great if we could collect working files for the most popular cob-types, so everyone gets the insight without the need to digitize!

    Can you list just the main steps for a working calculation? :)
    Randomblame likes this.

    MeGaKiLlErMaN Well-Known Member

    The basic steps are at the top, but there's a stream lined method I have worked out that cuts out frustration
    mahiluana and Randomblame like this.

    Thirsk Member

    Sry my bad! read it months ago and forgot it was there ;)
    Sounds good! Would you be willing to share your Excell sheets with the forum? ;)

    MeGaKiLlErMaN Well-Known Member

    It's not mine, I can't remember the source but it's called math.xml I think

    Ganjineer Member

    Excellent. Yes, 1.1 has a pretty significant correction. The problem with version 1.0 was that LER was only being integrated over the PAR range. The problem is, LER is a measure of the maximum theoretical LUMINOUS efficiency, so in order to calculate it you have to consider the entire spectrum that is visible to humans. v1.1 corrects the integral ranges.

    Also, I'm more than happy to discuss the details with you for your video.

    The program calculates photosynthetic activity between 400 nm and 700 nm. The reason it is like that is because the traditional PAR spectrum has been defined as 400-700. In fact most PAR meters, that I'm aware of, only quantify light within this range. That being said, there is reason to believe that there are photosynthetically active wavelengths outside of that range (ie. Emerson effect). But, for the sake of comparison, I chose to go with the industry standard PAR range.

    The reason I developed this program was because of a deficiency in the industry with providing horticultural specific lighting data. Lighting manufacturers simply don't provide QER and LER that we need for calculating PPF. It was frustrating to me that there was no tool to calculate these without making inaccurate assumptions or doing some fairly advanced math which people don't have the appetite for. So, I made my own tool that the average person could use to obtain these values and make their own decisions.

    Abruzzi Member

    Thanks for your explanation Ganjineer. The reason why I asked this question is because I looked at some lab reports from the CSA Group. This is what they say about the PPF range:

    Photosynthetic Photon Flux: weighted equally by wavelength and summed between 350nm and 750nm.

    Yield Photon Flux: PPF weighted by action spectrum (average of 20 plant species as defined by McCree) and
    summed between 350nm and 750nm. (See section 6.0)

    They use a Sphere, spectroradiometer setup.

    But I understand why you choose to calculate the photosynthetic activity between 400nm and 700nm.

    Thirsk Member

    Hey again :)
    first things first: Your calculator is just great an the combination with WebPlotDigitizer works like a charm!
    But in my opinion this calculator could come in even more handy if you could implement umol/j a simple division and another edit field would do the trick.
    It would be nice if one could choose the integrating range of the photosynthetic activity :)

Share This Page