For a range of LEDs I'd like to model their performance and predict the flux density across an area using manufacturers datasheets. Eventually I'd like to take various power measurements and calculate efficiency when it either isn't provided or isn't fully trusted.
Looking at a specific LED such as the Luminus SST-20-B and the angular pattern of radiant power is provided. I've read values from this graph into a pair of arrays (using more samples than provided below), fitted it to a poly curve and then represented it as a polynomial.
import numpy as np import matplotlib.pyplot as plt a = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90] i = [1., 0.985, 0.949, 0.878, 0.788, 0.661, 0.507, 0.349, 0.19, 0.043] curve = np.polyfit(a, i, 4) poly = np.poly1d(curve)
I plotted this polynomial against the datasheet values when deciding to use a 4th degree fit. I've seen some other methods in a paper using sums of cosines and guassians however, I'm unsure how to fit them, they seemed to require more coefficients and maybe a polynomial will be fine for my purposes.
I used this polynomial to calculate the relative power at each point across a plane by calculating the angle and distance from the LED for each point. I used the polynomial function to find the relative power at the relevant angle and then divided that by the radius squared to plot an image of relative flux density which looks pretty much like I would expect.
img = np.zeros((101,101)) height = 10.0 led_location = [50,50] for x in range(img.shape): for y in range(img.shape): distance = np.linalg.norm(np.subtract(led_location, [x, y])) angle = np.arctan(distance/height)*180/np.pi img[x][y] = poly(angle)/np.hypot(height,distance)**2 plt.imshow(img)
What I'd like to be able to do now is attached some real units to this flux density pattern as the datasheet for the SST-20-B provides a radiometric power of 710mW or photon flux of 2.68 μmol/s.
It's a long time since I've done maths at this level so I'm happy to believe what I attempt next is just plain wrong.
If I integrate to find the area between 0° & 90° can I multiply that by 2π in order to find the volume of all radiated flux and then scale the relative flux by this number?
integ = poly.integ() volume = 2*np.pi*(integ(90)-integ(0)) fig, ax = plt.subplots(figsize=(13, 10)) im = ax.imshow(img*2.68/volume) fig.suptitle('Flux Distribution from single LED') cbar = fig.colorbar(im, ax=ax) cbar.set_label('μmol/s')
Scaling the distance and height so the LED is 10cm away and 1px = 1cm gives values which seem logical but I'm quite concerned this might just be a fluke. I should have labelled the scale µmol/(m2s) in the linked image
Have I made any fundamental errors and if so what alternative methods should I be researching and looking at to correct them?