An Algorithm to Estimate Thermal Radiance Centre in the Sky Hemisphere for Automotive Solar Sensor Validation

There is a solar sensor used in vehicles to estimate thermal radiance source position (azimuth and elevation) in the sky hemisphere and the amplitude of irradiance. That data is used for adjusting climate control systems for maximum passengers comfort in vehicle cabin [1]. Producers of such sensors face the absence of standard on what is the position of radiance source in the sky hemisphere. At clear sky conditions, when the sun is at high altitude, the scattered radiance compared to radiance coming directly from the sun is relatively small and can be neglected. But in case of more complex situations, like partly cloudy conditions or low sun altitudes, the scattered radiance part gets significant or dominates [2]. At those circumstances there is no industry definition on what signal output should solar sensors give. That leads to unnecessary misunderstandings between the suppliers of solar sensors and vehicle OEM’s. The goal of this research was an attempt to clarify the statement “the position of the radiance source in the sky” by proposing an algorithm to estimate that position.


Introduction
There is a solar sensor used in vehicles to estimate thermal radiance source position (azimuth and elevation) in the sky hemisphere and the amplitude of irradiance. That data is used for adjusting climate control systems for maximum passengers comfort in vehicle cabin [1]. Producers of such sensors face the absence of standard on what is the position of radiance source in the sky hemisphere. At clear sky conditions, when the sun is at high altitude, the scattered radiance compared to radiance coming directly from the sun is relatively small and can be neglected. But in case of more complex situations, like partly cloudy conditions or low sun altitudes, the scattered radiance part gets significant or dominates [2]. At those circumstances there is no industry definition on what signal output should solar sensors give. That leads to unnecessary misunderstandings between the suppliers of solar sensors and vehicle OEM's. The goal of this research was an attempt to clarify the statement "the position of the radiance source in the sky" by proposing an algorithm to estimate that position.

The proposed algorithm
The proposed algorithm is based on the assumption that relative luminance distribution represents the distribution of radiance in the sky. This assumed to be proven by Norio Igawa and Yasuko Koga in their research [3]. It was confirmed by analysis of measurement data that both radiance and luminance distributions can be described by the same equation [3]. Having this stated, it is proposed that the centre of radiance distribution in the sky hemisphere could be calculated with the centre-of-mass-estimation equations by using luminance distribution data instead. Since luminance distribution represents radiance distribution, the centers of both distributions will be at the same point. And since an objective is to find the center coordinates, a relative luminance distribution is sufficient for that estimation. An instance of relative luminance distribution can be expressed as a two dimensional array of pixels. In practice such a distribution can be acquired with fish-eye lens equipped camera. Then the center coordinates of relative luminance distribution in a two dimensional plane can be found by the following equations: where xy L is a relative luminance of a pixel at coordinates x and y. It is then possible to calculate the center angular position in the sky hemisphere -elevation and azimuth, after acquiring center pixel coordinates. Resulting estimates could be used to evaluate automotive solar sensor measurements performance.
There are professional solutions that enable to measure radiance distribution in the sky, but it involves expensive and complex equipment like Sky Scanner MS-321LR (Eko Instruments co.). Proposed algorithm attempts to replace it with low cost alternative -standard DSLR camera equipped with fish eye lens.
Major drawback of the proposed algorithm is the short dynamic relative luminance range of DSLR camera. The range of each pixel color channel is limited to the amplitude of 255 and it does saturate when exposed to direct sunlight (Fig. 1). In addition exposure has to be set to be high enough to have detailed picture of the sky hemisphere.
The problem is solved by measuring scattered and full irradiance with pyranometer, thus acquiring the ratio between the saturated area and the non-saturated area radiance. The ratio then used in calculation of radiance centre of hemisphere by adjusting saturated pixels relative luminances where L x,y -relative luminance of saturated pixel at coordinates x and y; L´x,y -relative luminance of a non saturated pixel at coordinates x and y; I full -measured irradiance of full hemisphere; I scattered -measured irradiance of hemisphere with shadowed sun; n saturated -number of saturated pixels; φ -sun/saturated blob incandescence angle, kcorrection coefficient. Provided formula assumes that luminance distribution is uniform within saturated pixels. That is a reasonable approximation for the task.
Purpose of coefficient k is to compensate difference in the shape of radiance/luminance capturing body. Pyranometer has flat sensing element with maximum sensitivity at the zenith and zero sensitivity at the horizon. Fish eye lens is of a hemisphere shape. Sky dome radiance distribution mathematical model was created to evaluate the difference. The sum of all radiance vectors A sum is described by using cone surface area formula (Fig. 2 where A x -radiance at α incidence, A m -radiance at zenith. For pyranometer like reception A x will be For fish eye lens like reception A x will be: Therefore sum radiances A sum_p and A sum_i for each case will be: Correction coefficient for formula (3) calculated For 180° hemisphere shape of fish eye lens k equals 3. During the experimental work there was made a 10° cut just above the horizon to avoid obstacles like trees and houses and it reduces the k to 2.74. It must be noted that there is an approximation made when calculating correction coefficient with this model that sky dome radiance is uniform. This considered a reasonable approximation for the task.
Relative luminance of a pixel in the photo picture is calculated from R, G, B values extracted from corresponding pixel in the picture xy xy xy xy

Experimental
Series of experiments have been accomplished to put algorithm under test. It was attempted to estimate thermal radiance center in the sky by new algorithm, by industry standard solar sensor and by measuring radiance distribution itself. A test rig was built for the experiment. It consisted of:  DSLR camera equipped with fish-eye lens;  Pyranometer without shadow, to measure full irradiance;  Pyranometer with shadow, to measure scattered irradiance;  GPS receiver for having precise time;  A positioning system with spectrum analyzer;  PC with dedicated software for control tasks and data storage, built using typical design patterns [4].  A system was built to be reliable in long continuous measurement test sessions [5].
A separate investigation has been done to find out how uniformly fish-eye lens transfers the light to DSLR sensor. Investigation showed that relative luminance difference of the same source of luminance between the centre of picture and at 170º off centre is 25% and it does change linearly. Appropriate compensation for each individual pixel was made during picture processing.
There was taken 170º hemisphere for evaluation instead of 180º, since the area just above the horizon was filled with surrounding city obstacles. The fish eye lens that was used (MS Peleng 3.5/8A) does not allow capturing full hemisphere picture. It does cut it in two directions. Hence interpolation technique was used to extract the missing data from present picture pattern (Fig. 3). A linear transition formula was applied For radiance distribution measurement a USB4000 fiber optic spectrometer was used. It has spectrum measurements bandwidth of 200 to 1100 nm. Optical collimator at the end of the fiber wire had an acceptance angle of 2,7°. The hemisphere has been scanned at 145 equally spread zones, by employing specially built, PC controlled, positioning rig. Combining all 145 zones into 2D projection, corresponding to hemisphere picture, a sky hemisphere map of relative radiance has been acquired. It then was overlaid on hemisphere picture for comparison. Spectrum integration time had been adjusted dynamically by the software in order to have peak of a spectrum higher than 2/3'ds of maximum measureable value of 16 bit ADC to preserve signal resolution. Relative radiance energy was estimated by the following formula out of spectrum reading (Fig. 6) where E Z -relative zone Z radiance energy,  A -spectrum amplitude at wavelength λ, t i -spectrum measurement integration time. Since integration varies dynamically depending on radiation intensity, so does the total time of scan. At clear sky conditions having 800W/m2 global irradiation, scanning took around 60 seconds. At lower irradiation levels scanning time stretched. Hence weather conditions were picked having low wind velocity to have cloud composition as static as possible for the scan duration. GPS reading, picture of hemisphere and solar sensor reading are taken within a second after measurement cycle start. The system was put on the roof of four floor building to have as much obstacle-clear sky as possible. All instruments where mounted on a platform which was aligned to horizon plane. Solar sensor, positioning system and DSLR camera were aligned to each other, so that it would be possible to combine measurements of different devices together.
An example of relative radiance distribution estimated with the test rig showed in Fig. 5.   Fig. 7. An example of relative radiance scans During the measurement or relative radiance with spectrometer the problem of lack of dynamic range was experienced in the zones with sun present. It was solved the same way like with photo picture saturated pixels. The same algorithm implementation was used by turning Fig. 7 visual relative radiance representation into Fig. 1 like picture. Formula (3) was used to compensate saturated areas with by pyranometers acquired ratio between the saturated area and the non-saturated area irradiances. Numerous test sessions were made with different cloud compositions and sun positions in the sky hemisphere. Samples of typical hemispheres are shown in figure  8 with marks pointing to a location of thermal radiance centers estimated with proposed algorithm. Cross mark points to calculated position by using DSLR camera picture, square mark points to position calculated using radiance distribution scanner and round mark points to solar sensors measured position.

Conclusions
An algorithm was proposed how to estimate thermal radiance center in the sky hemisphere as an angular position of azimuth and elevation. Estimation of this position is relevant for producers of automotive solar sensors, who face the absence of standard on what is the position of radiance source in the sky hemisphere. Furthermore, current commercial sky hemisphere radiance distribution readers are too expensive for using them in industry validation processes. The proposed algorithm provides significant simplification and reduction in cost, therefore potentially could be used in industry validation process.