# Measurement and Modeling of 3D Solar Irradiance for Vehicle-Integrated Photovoltaic
## 2 Model
### Relation to the Conventional Solar Irradiance Model  
For a definition of the angle of the solar irradiance and module orientation, the reference axis should be local to the automobile [1]. Each axis moves by the movement of the vehicle, and is independent of the orientation of the sun. On the other hand, the relative position is unchanged, and thus a linear coordinate conversion dynamically synchronized to the location, direction, and speed of the car, monitored by a GPS, handles this situation. The coordinate is an orthogonal one (Figure 3).  
Supposing that the orientation of the car is independent of the sun's position and random, the standard and local irradiance parameters of the car body can be converted to the following nine equations [1]. Some functions and equations contain Boolean algebra, and they return one or zero depending on whether the operation results are true or false. The vehicle body was always assumed as level.  
\[Q_{roof}=Q_{Z} \tag{8}\]  
\[Q_{side}=\frac{Q_{X_{+}}+Q_{X_{-}}+Q_{Y_{+}}+Q_{Y_{-}}}{4} \tag{9}\]  
Figure 3: Three-dimensional irradiance around the car body [1].  
\[\Phi=\mathrm{if}\Bigg{(}Q_{Z}>Q_{th},\tan^{-1}\Bigg{(}\Bigg{|}\frac{\max(Q_{X+},Q_{ X-})}{\max(Q_{Y+},Q_{Y-})}\Bigg{|}\Bigg{)}_{NaN}\Bigg{)} \tag{10}\]  
\[D=\mathrm{if}(\min(Q_{X+},Q_{X-})+\min(Q_{Y+},Q_{Y-})<Q_{site},Q_{Z}>Q_{th},0) \tag{11}\]  
where \(Q_{roof}\) is the irradiance onto the car roof. \(Q_{side}\) is the averaged irradiance of the car sides. Since the orientation of the car is independent of the sun's orientation, the side irradiation may be regarded as the averaged value from four car sides. \(\Phi\) is the main angle of the solar beam onto the car roof. \(Q_{th}\) is the threshold of the effective measurement value of the irradiance. It must be greater than zero (non-zero value). \(NaN\) represents a missing or faulted value. \(D\) is the discriminant of the non-shaded condition. False (= 0) if the car roof is shaded. The function if(condition, \(x,y\)) returns \(x\) if the condition is true (non-zero), \(y\) otherwise. The function \(\max(A,\,B,\,C,\,...)\) returns the largest value from \(A,\,B,\,C,\,...\). The function \(\min(A,\,B,\,C,\,...)\) returns the smallest value from \(A,\,B,\,C,\,...\). Note that Equation (10) contains a two-dimensional vector calculation, and Equation (11) contains the Boolean algebra.  
The orientation angle of the principal solar beam, not always equal to the orientation angle of the direct beam, is calculated by the following equations.  
\[Q_{S1}=\max(Q_{X+},Q_{X-},Q_{Y+},Q_{Y-}) \tag{12}\]  
\[Q_{S2}=\max 2\mathrm{nd}(Q_{X+},Q_{X-},Q_{Y+},Q_{Y-}) \tag{13}\]  
\[a_{x1}=(Q_{S1}=Q_{X+})\frac{\pi}{2}+(Q_{S1}=Q_{Y-})\pi+(Q_{S1}=Q_{X-})\frac{3 \pi}{2} \tag{14}\]  
\[a_{x2}=(Q_{S2}=Q_{X+})\frac{\pi}{2}+(Q_{S2}=Q_{Y-})\pi+(Q_{S2}=Q_{X-})\frac{3 \pi}{2} \tag{15}\]  
\[G=mod\Bigg{(}\mathrm{if}\Bigg{(}(Q_{S1}>Q_{ths})\bigg{(}|\pi_{x1}-a_{x2}|= \frac{\pi}{2}\bigg{)}\tan^{-1}\bigg{(}\frac{Q_{S2}}{Q_{S1}}\bigg{)}\mathrm{ sign}(a_{x2}-a_{x1})+a_{x1}+Dir,NaN\Bigg{)},2\pi\Bigg{)} \tag{16}\]  
where \(Q_{S1},Q_{S2},\,ax_{1},\,and\,ax_{2}\) are parameters calculated by Equations (12)-(15) and are used in Equation (16). \(G\) is the orientation angle of the main solar beam. \(Dir\) is the orientation angle of the car. The function \(\max 2\mathrm{nd}(A,\,B,\,C,\,...)\) returns the second largest value from \(A,\,B,\,C,\,...\) The function \(\mathrm{mod}(x,\,y)\) returns the remainder on dividing \(x\) by \(y\) (\(x\) modulo \(y\)). The result has the same sign as \(x\). The function \(\mathrm{sign}(x)\) returns 0 if \(x=0,\,1\) if \(x>0\), and \(-1\) otherwise. Note that Equations (14)-(16) contain Boolean algebra.  
Mounting five orthogonally-arranged pyranometers, and applying Equations (8)-(16) to the monitored irradiance data, the three-dimensional solar irradiance around the vehicle may be modeled [27].