# Spline-Based Formulas for the Determination of Equation of Time and Declination Angle

Authors: Fawzi Al-Naima; Bilal Abdul Majeed
Journal: ISRN Renewable Energy
 (2011)

---

## Abstract

This paper presents new approximation formulas for the determination of the equation of time and declination angle. The proposed approach is based on the cubic spline interpolation techniques defined for sixteen or twenty chosen knots over the whole year. The results obtained by the proposed formulas for both equation of time and declination angle show marked improvements in terms of speed and sum of squared errors and maximum absolute error over the whole year in comparison with other five existing methods for analytical evaluation of equation of time and two existing methods for analytical evaluation of declination angle.


---

## Body

## 1. Introduction

The quantity of solar radiation reaching any particular part of the earth’s surface is determined by the position of the point, time of year, atmospheric diffusion, cloud cover, shape of the surface, and reflectivity of the surface [1]. At any given time, the position of the sun relative to the plane of celestial equator describes the declination angle (DA) [2].Different time systems are in use. Legal clock time differs from solar time. Solar time is determined from the movements of the sun. This time system is usually called local apparent time (LAT). Local mean time (LMT), often called clock time or civil time, differs from the LAT. The conversion of time systems requires knowledge both of the longitude of the site and the reference longitude of the time system being used. The conversion also requires the application of the equation of time (EOT), which accounts for certain perturbations in the rotation of the earth about its polar axis [3].In the present work two new interpolating formulas are suggested for the determination of the EOT and the DA which are based on cubic spline functions. This form of interpolating technique has been successfully implemented for variety of engineering applications where fast and reliable evaluations of some mathematical functions are the main objectives [4–6].


## 2. Existing Formulas

### 2.1. Equation of Time (EOT)

The first expression for the EOT in minutes reported in [7] is given in terms of sine function defined over three different sections of the year as follows:(1)EOT(n)=-9.00sin⁡(n-128.648)-5,1<n<100=5.00sin⁡(n-10022.632)-1,100≤n≤242=18.6sin⁡(n-24239.248)-2,243≤n≤366.n is the day number of the year (e.g., n=1 on January 1 and n=33 on February 2).The second expression for the EOT in minutes reported in [8] is based on five terms of the Fourier expansion and is given by(2)EOT(n)=229.18[0.000075+0.001868cos⁡(w)-0.032077sin⁡(w)-0.014615cos⁡(2w)-0.04089sin⁡(2w)],
where w is the day angle in radian (w=2π(n-1)/365) and n is the day number.The third expression for the EOT reported in [9] is given by(3)EOT(n)=9.87sin⁡(2β)-7.67sin⁡(β+78.7°),
where β=360(n-81)/365 degrees, and n is the day number.The fourth expression for the EOT reported in [10] is given by(4)EOT(n)=229.18[-0.0334sin⁡(2π*n365.24)+0.04184sin⁡(4π*n365.24+3.5884)],
where n is the day number of the year (e.g., n=1 on January 1 and n=33 on February 2).The fifth and final expression for the EOT reported in [11] is given by(5)EOT(n)=9.87sin⁡(2β)-7.53cos⁡(β)-1.5sin⁡(β),
where β=360(n-81)/364 degrees and n is the day number.


### 2.2. Declination Angle (DA)

The first expression for the DA in degrees reported  in [2] is given in terms of the following sine function approximation formula:(6)DA(n)=23.45sin⁡(360(n+284)365),
where n is the day number of the year (e.g., n=1 on January 1 and n=33 on February 2).The second expression considered for the DA in degrees reported in [8] is based on the following seven-term-Fourier expansion:(7)DA(n)=57.296[0.006918-0.399912cos⁡(w)+0.070257sin⁡(w)-0.006758cos⁡(2w)+0.000907sin⁡(2w)-0.002697cos⁡(3w)+0.001480sin⁡(3w)],
where w is the day angle in radian, (w=2π(n-1)/365) and n is the day number.


## 2.1. Equation of Time (EOT)

The first expression for the EOT in minutes reported in [7] is given in terms of sine function defined over three different sections of the year as follows:(1)EOT(n)=-9.00sin⁡(n-128.648)-5,1<n<100=5.00sin⁡(n-10022.632)-1,100≤n≤242=18.6sin⁡(n-24239.248)-2,243≤n≤366.n is the day number of the year (e.g., n=1 on January 1 and n=33 on February 2).The second expression for the EOT in minutes reported in [8] is based on five terms of the Fourier expansion and is given by(2)EOT(n)=229.18[0.000075+0.001868cos⁡(w)-0.032077sin⁡(w)-0.014615cos⁡(2w)-0.04089sin⁡(2w)],
where w is the day angle in radian (w=2π(n-1)/365) and n is the day number.The third expression for the EOT reported in [9] is given by(3)EOT(n)=9.87sin⁡(2β)-7.67sin⁡(β+78.7°),
where β=360(n-81)/365 degrees, and n is the day number.The fourth expression for the EOT reported in [10] is given by(4)EOT(n)=229.18[-0.0334sin⁡(2π*n365.24)+0.04184sin⁡(4π*n365.24+3.5884)],
where n is the day number of the year (e.g., n=1 on January 1 and n=33 on February 2).The fifth and final expression for the EOT reported in [11] is given by(5)EOT(n)=9.87sin⁡(2β)-7.53cos⁡(β)-1.5sin⁡(β),
where β=360(n-81)/364 degrees and n is the day number.


## 2.2. Declination Angle (DA)

The first expression for the DA in degrees reported  in [2] is given in terms of the following sine function approximation formula:(6)DA(n)=23.45sin⁡(360(n+284)365),
where n is the day number of the year (e.g., n=1 on January 1 and n=33 on February 2).The second expression considered for the DA in degrees reported in [8] is based on the following seven-term-Fourier expansion:(7)DA(n)=57.296[0.006918-0.399912cos⁡(w)+0.070257sin⁡(w)-0.006758cos⁡(2w)+0.000907sin⁡(2w)-0.002697cos⁡(3w)+0.001480sin⁡(3w)],
where w is the day angle in radian, (w=2π(n-1)/365) and n is the day number.


## 3. New Approach

Polynomial approximation is most often recommended for function evaluation as any continuous function can be approximated in this way, and the implementation only consists of additions, multiplications, and powers [12]. This paper introduces a new approach for the fast   and reliable determination of the EOT and DA based on cubic spline polynomial interpolation functions. Instead of approximating a given function f(x) over an interval [a,b] by a single polynomial, one may divide [a,b] into n subintervals [a,x1],[x1,x2],…,[xn-1,b] and approximate f(x) by different polynomials on each subinterval. For example, we may recall that the repeated midpoint, trapezoidal, and parabolic rules for approximate integration result from the process of replacing the integrand by piecewise polynomial approximations of degrees 0, 1, and 2, respectively, with subintervals of uniform length. In the first case the approximation (a step function) generally is discontinuous at each division point xk; in the other two cases this statement applies instead to the derivative.For some purposes, particularly for numerical differentiation, it is highly desirable that the joins of the separate arcs be as smooth as possible. Specifically, if it is required that in each subinterval the approximations(x) be a polynomial of maximum degree 3; that is, s(x) agrees with f(x) at each of the n+1 points (x0=a, x1,x2,…,xn-1, xn=b) and that the first and second derivatives s′(x) and s′′(x) be continuous on [a,b]; then, s(x) is called a cubic spline [13–15]. Assume that the values of the EOT and DA at n days (x1,x2,…,xn), where x1 is 1 and xn is 366, are given to be (y1,y2,…,yn), respectively. Then the cubic spline functions are defined as set of third-degree polynomials that goes through each of the n data points (knots) and has continuous first- and second-order derivatives. Consider the subinterval (xitoxi+1), and let(8)hi=xi+1-xi,r=(x-xi)hi,t=1-r,(i=2,3,…,n-1).Then the cubic spline functionf(x) on this interval may be given by(9)f(x)=r⋅yi+1+t⋅yi+hi2⋅[(r3-r)⋅si+1+(t3-t)⋅si],
where si=f′′(xi)/6 (i=2,3,…,n-1),(10)s1=(h1+h2)⋅s2-h1⋅s3h2,sn=(hn-1+hn-2)⋅sn-1-hn-1⋅sn-2hn-2.In this forms1 is taken as linear extrapolation from s2 and s3 and sn as linear extrapolation from sn-1 and sn-2, respectively [14].Thesen spline coefficients (si, i=1,2,…,n) are then determined numerically by implementing a MATLAB program based on Gaussian elimination without scaling or pivoting [15].


## 4. Results and Discussion

The spline coefficients of (9) for the EOT and DA were determined by implementing a MATLAB program. Tables 1 and 2 show the 16 and 20 knots taken in calculating the spline coefficients, respectively. These knots were selected from the full tabular values of EOT and DA given in [16, 17].Table 1
Selected points for the 16 knots for EOT and DA.
Knot numberEOT (minute)DA (degree)XEOT (day no.)YEOT (minute)XDA (day no.)YDA (degree)11−3.41−23.07225−12.325−19.17350−13.950−11.57475−8.975−2.375100−1.51007.3561253.312515.7871502.615021.508175−2.217523.439200−6.220021.1310225−4.922515.17112501.82506.671227510.4275−2.951330016.0300−12.231432514.3325−19.55153504.6350−23.2316365−2.8365−23.20Table 2
Selected points for the 20 knots for EOT and DA.
Knot numberEOT (minute)DA (degree)XEOT(day no.)YEOT (minute)XDA (day no.)YDA (degree)11−3.41−23.07210−7.310−22.08330−13.330−17.88450−13.950−11.57570−10.270−4.33690−4.4903.5371100.911010.9781303.613017.2091502.615021.5210170−1.117023.4011190−5.019022.5512210−6.421019.1313230−3.923013.62142501.82506.67152708.8270−11629014.5290−8.671731016.3310−15.501833012.9330−20.63193504.6350−23.2320365−2.8365−23.20A comparative study was performed for the five expressions for EOT considered in (1) to (5) with the proposed spline formula of (9), respectively. A similar comparative study was also performed for DA for the two expressions of DA considered in equation (6), equation (7) with the proposed spline formula of (9), respectively.MATLAB programs were implemented to evaluate the Sum of Squared Errors (SSE), Maximum Absolute Error (MAE) and Average Absolute Error (AAE) calculated over the whole year for all the cases considered above with respect to the data given in [16, 17] which represents the reference values of the equation of time and declination angle. Further details for these expressions are given in the appendix. The results are shown in Tables 3 and 4 for the EOT and DA, respectively. A graphical representation of the errors over the whole year with reference to the tabulated data of [16, 17] for the six expressions of the EOT, and the three expressions of the DA are displayed in Figures 1 and 2, respectively.Table 3
Comparison parameters for the EOT.
Comparison parametersEquation (1)Equation (2)Equation (3)Equation (4)Equation (5)Spline20 Knot16 KnotSSE134.908033.018996.7194369.5704143.93660.70080.9068MAE1.60030.68041.10122.07911.38880.26580.2660AAE0.49940.26140.39270.79760.45870.00190.0025Table 4
Comparison parameters for the DA.
Comparison parametersEquation (6)Equation (7)Spline20knot20knotSSE213.069516.62520.2301213.0695MAE1.69640.33900.13281.6964AAE0.53600.17736.3055 × 10−40.5360Figure 1
Errors of EOT over one year.Figure 2
Errors of DA over one year.It can be seen from the results in Tables3 and 4 and also from the graphs of Figures 1 and 2 that the use of the cubic spline functions reported in this paper offers the best results in terms of sum of the squared errors and maximum errors. Hence, it can be concluded that the use of cubic spline functions promises to be very useful mathematical tools in applications where speed and accuracy are of the prime objectives.Many new high-performance field programmable gate array (FPGA) technologies provide built-in multifunction modules that have general applicability to a wide range of applications [18]. The fast and reliable determination of the EOT and the DA plays an important role in various fields of solar energy. It follows that the approach proposed in this paper may play an important role in the FPGA based applications used for the fast and accurate calculations of the position of the sun over the year [19].


## 5. Conclusion

The use of cubic spline approximation method has been developed for solar tracking applications as well as those concerned with classical navigation. The main benefits of using the cubic spline functions are the following (i) it is a relatively smooth curve, (ii) it never overshoots intermediate values, and (iii) interpolated values can be calculated directly without solving a system of equations. Cubic spline interpolation is a powerful data analysis tool. Splines correlate data efficiently and effectively no matter how random the data may seem.For systems requiring little data-processing capability such as microcontrollers and low-range microprocessors the spline approach can be the best choice. If the computation needs are greater, more powerful microprocessors, or even digital signal processors (DSPs), should be considered. This type of solution (microprocessors and DSPs) is very flexible as the development work mainly consists in generating programs. Which number of knots are to be chosen in the determination of the equation of time and declination angle remains to be a tradeoff between the computation speed and the acceptable error level.For getting higher performances, it may be necessary to develop specific algorithm. A first option is to use a programmable device, for example, a FPGA.



---

*Source: 217484-2011-11-20.xml*