I have several monochromatic LEDs that are coupled with controlers (PWM), thermometers and light sensors (spectrometer).
For each LED:
- The controlers allow me to change the voltage/current applied to the LEDs, which, in turn, modulate the light's intensity (I call the value
Input
) - The thermometers measure the
Temperature
of the source - The spectrometer measures the actual light intensity at several wavelengths (typically 101 points between 400 and 700 nanometers), it measures the 'Spectral power distribution' (
SPD
) of the LED.
My objective is to build a robust representation of the LED behavior. I need this because I observed that the SPD variation is non-linear: it varies with the Input
but also with Temperature
, and the greater the Input
the greater the Temperature
.
The heatsink is an active cooling system so I can modulate the temperature and see the result in terms of Output
What typically happens is that the LED color (and SPD
) will change when the Temperature
changes: for the same Input
, if the Temperature
is low, the LED will have a greater overall Output
and its peak emission wavelength will be shorter (say 590 nanometers). When Temperature
rises the overall Output
will be smaller and the peak wavelength will be longer (for example 605 nanometers).
In practice, this means that a yellow LED will behave like a Red LED at higher temperatures. If I have a robust representation of this behavior, I can get a better prediction of my LED 'Output' and adjust my cooling system to get the color that I want.
_
For simplicity, I have restrained my analysis of the SPD
to only one wavelength in the following example. The idea behind this approach is that if I have a model of the system's behavior for each wavelength that depends on the same variables Input
and Temperature
, I will be able to represent my LED in every possible practical situation:
Output
corresponds to the value of one of the 101 channels of the spectrometer, 'Temperature' is an indicator of the LED temperature measured on the heatsink, 'Input' is the PWM control value applied to the LED, that varies between 1% and 100%.
There is a quite clear relationship between the 3 variables and I am searching for a function:
Output(Input, Temperature)
It seems quite clear that a 2nd degree polynomial function fits well with the relationship between Input and Output at a given Temperature:
And another 2nd degree polynomial can fit the varying parameters of the first function, in relation to Temperature:
How would you proceed to build a representation of such a system? Since I have hundreds of such Output
datapoints associated with Wavelength
, Input
and Temperature
, I thought that it would be useful to use matrices to represent the system with non-linear polynomials?