Overview

The TwinCAT PLC Solar Position Algorithm library (SPA) offers an option for calculating the sun position exactly at almost any time.
The times for sunrise, solar apex and sunset can also be determined.
In addition to the sun angles an angle of incidence can be issued, if the point of reference has a certain inclination. The sun angles themselves refer to the horizontal at the point of reference.

The algorithm is based on a technical report by the U.S. National Renewable Energy Laboratory (NREL). The theoretical inaccuracy of the sun angles between the year -2000 and 6000 is specified as +/-0.0003°.
Based on this the function block of the TwinCAT Solar Position Algorithm library assumes an inaccuracy of +/-0.001° for the sun angles.

Sun angles

The position of the sun at a fixed observation point is normally determined by specifying two angles.
In order to calculated the sun angles using the TwinCAT Solar Position Algorithm library, the date, time, longitude, latitude and further parameters have to be specified, depending on the required accuracy.
The graphic illustrates the meaning of the main terms in this context:

Overview 1:

 

The sun position represented by two angles.

Zenith

The zenith angle of the sun is defined as the angle between the vertical above the observer and the connecting line between the observer and the sun.
In some cases the altitude is as used to indicate the sun elevation angle. The following applies: 90° - zenith angle = altitude

Azimuth

The azimuth coincides with the horizon. North is 0°, with the value increasing in clockwise direction (east = 90°, south=180°, west=270°).

 

Longitude and latitude

The latitude is specified as the distance of a place on the surface of the earth from the equator to the north or to the south in degrees. The latitude can assume a value from 0° (at the equator) to ±90° (at the poles). A positive sign thereby indicates a northern direction and a negative sign a southern direction. The longitude is an angle that can assume values up to ±180° starting from the prime meridian 0° (an artificially determined North-South line). A positive sign indicates a longitude in an eastern direction and a negative sign in a western direction. Examples:

Place

Longitude

Latitude

 

Sydney, Australia

151.2°

-33.9°

Overview 2:

New York, USA

-74.0°

40.7°

London, England

-0.1°

51.5°

Moscow, Russia

37.6°

55.7°

Peking, China

116.3°

39.9°

Dubai, United Arab Emirates

55.3°

25.4°

Rio de Janeiro, Brazil

-43.2°

-22.9°

Hawaii, USA

-155.8°

20.2°

Verl, Germany

8.5°

51.9°

Time scale

Specification of the correct time is particularly important. Various time scales are in use. The Solar Position Algorithm is based on Universal Time (UT1).

Universal Time (UT1)

Between 1928 and 1968 was the UT was the accepted world time. It is also referred to as universal solar time. It is determined through astronomic observation of the angle of rotation of the earth and corresponds to the mean local time of the observatory at Greenwich (prime meridian). This parameter is derived from the earth's rotation and takes into account fluctuations and long-term slowdown and is therefore not strictly a uniform measure of time. On the other hand, it is always synchronised with the actual change-over between day and night.

International Atomic Time (TAI)

The International Atomic Time is specified by more than 50 time institutes worldwide, based on their atomic clocks. An atomic time is based on an atomic standard time that can be assumed to be exactly uniform.

Coordinated Universal Time (UTC)

The coordinated world time UTC has been used as the standard world time since 1968. This is the time referred to by GMT in everyday usage. Greenwich Mean Time (GMT) was the original world time before 1928.
UTC continues to use the observatory at Greenwich (prime meridian) as point of reference. The earth's time zones are derived from the coordinated world time (UTC+1 = Central European Time). In contrast to UT1, its second cycle matches the exactly uniform second cycle of the International Atomic Time (TAI). Leap seconds are used to compensate the difference between UTC and UT1. The difference between the UT1 reference time is always less than one second.
The coordinated world time UTC is therefore a compromise between UT1 and TAI.
The following formula is used to convert a time from UTC to UT1: UT1 = UTC + DUT1

Terrestrial Time (TT)

Also referred to as Terrestrial Dynamical Time (TDT). This time is used as the basis for calculating astronomic events and is based on the exactly uniform seconds of the International Atomic Time (TAI). The following applies: TT = TAI + 32.184

 

Leap Seconds

To synchronise the coordinated world time UTC with UT1, a leap second is added when required. This additional second is specified by the International Earth Rotation and Reference Systems Service (IERS) at irregular, non-predictable intervals. It ensures that the difference between the two time scales is always less than one second. (In the past such additional leap seconds have always been added on 31 December or 30 June after 23:59:59 UTC.)
DUT1 denotes the remaining difference. The following applies: DUT1 = UT1 - UTC
This value is derived from observations that are continuously reported.

Delta T

Delta T is the difference between Terrestrial Time and Universal Time. The following applies: Delta_t = TT - UT1
This parameter can be specified as fDelta_t at the input for function block FB_SPA. It is derived from observations that are continuously reported. A standard value is 66 seconds.
 

 

Similar products

  • Time switching functions with lower accuracy such as FB_CalcSunPosition and FB_CalcSunriseSunset from the TwinCAT Building Automation library

 

Documentation last updated: 08.11.2011