Presentation on theme: "Capstone Spring 2009 – Team 5. Using CUDA for Solar Thermal Plant Computation. Solar Thermal Plants Background Problem Energy Solution Algorithm Polygon."— Presentation transcript:
Instructor: Dr.Bun yue Mentor: Dr.Michel Izygon Mr. Peter Armstrong
SOLAR THERMAL PLANT Solar Thermal power plants are used to generate electricity from the energy of the sun.
Background Structure 1. Central receiver A type of solar furnace. Receives the sunlight redirected by Heliostats. 2. Heliostat A type of mirror. redirects sunlight towards the central receiver.
Background. Field Generally huge Heliostats are placed in a radial stagger formation. For the purpose of computation the field is broken into grids containing cells.
Shading and Blocking. The sunlight being received by one heliostat can be blocked by the adjacent heliostats, causing shading and blocking. A field of heliostats suffers loss in efficiency caused by shading and blocking. For our purpose we assume that shading and blocking occurs only within a cell.
Shading. Shading is the loss of illumination on a given mirror due to the interception of the incident sunlight by a neighbouring mirror. 
Energy. The energy generated by a heliostat depends on many factors, one of them being the area of the heliostats. The energy generated from a solar thermal plant is directly proportional to the amount of sunlight reflected on to the central receiver.
Energy The amount of sunlight reflected onto the central receiver depends on the total area of the heliostats that is neither shaded nor blocked. To optimize the energy generated from a solar thermal plant, the total area of the heliostats that is shaded and blocked should be calculated.
Algorithm. An algorithm was designed by Mr. Peter Armstrong of Tietronix Software, Inc., to calculate the shading and blocking among the heliostats. This algorithm makes use of Vector Mathematics, including vector projection and a polygon clipping algorithm.
Algorithm. The algorithm calculates the co-ordinates of the heliostats for a given configuration of the grid at a certain location of the sun. These co-ordinates are used to find the interactions of the heliostats. The algorithm uses vector projections to find, if one heliostat shades or blocks another heliostat.
Algorithm. If a heliostat shades or blocks another heliostat, a polygon clipping algorithm is used to find the vertices of the unshaded region of the representative heliostat. This algorithm is applied for all the neighboring heliostats and the area is added to the running total of the area calculated.
Polygon Clipping. The area of the representative Heliostat that is shaded or blocked does not contribute towards the power generated. This area should be subtracted using a polygon clipper. The Original program designed by Tietronix Software, Inc. makes call to a general polygon clipping(gpc) library.
Polygon Clipping This gpc is a huge library designed at The University of Manchester. It has about 2500 lines of code. Most of the processing time for calculating the co- ordinates is taken by the gpc.
Problem. Solar thermal fields in general have considerably large number of heliostats. This computation algorithm takes significant amount of time to calculate shading and blocking for thousands of heliostat. The objective is to decrease this computation time.
Solution. To increase the efficiency of this computation algorithm, Tietronix Software, Inc. has proposed to create an application that computes the shading and blocking among the heliostats simultaneously. For this purpose, CUDA(Compute Unified Device Architecture), a parallel computing architecture was chosen.
Design As CUDA is extension to language c, the whole computation algorithm and the polygon clipping algorithm was first implemented in C and then later converted to CUDA.
Polygon Clipping Issue The gpc library used for the original computation could not be used for our purpose. As, the gpc library are located on the host, a call to the function on the host from the device is lot more time consuming. A polygon clipping algorithm that is more specific to the computation algorithm has to be designed.
Polygon Clipping The polygon clipping algorithm used for our design is a paper, Efficient clipping of arbitrary polygons proposed by GUNTHER GREINER and KAI HORMANN. This algorithm is chosen because, it is relatively more efficient than Sutherland Hodgman algorithm which is more commonly used. The data structures used for the polygons are very simple.
Polygon Clipping A doubly linked list is used in the algorithm to represent the polygons. The clipping algorithm involves the calculation of all the intersection points and the choosing among these points to create the desired polygon.
CUDA What is CUDA ◦ Scalable programming model and ◦ Software environment for parallel computing  ◦ Extension to the C programming language
CUDA What CUDA does Allows utilization of GPU Allows parallel execution of code Manages threads automatically CUDA Requires One or more Nvidia GPUs (Graphics Processing Unit) Nvidia’s CUDA API
CUDA Example Source: “Parallel Processing With CUDA” by Tom R. Halfhill 
Challenges with CUDA No communication from device to host No dynamic memory allocation on device during run Only Single Precision on our devices
References  Tom R. Halfhill. Parallel Processing With CUDA. Microprocessor, 01/28/08-01, www.nvidia.com/docs/IO/55972/220401_Reprint.pd f www.nvidia.com/docs/IO/55972/220401_Reprint.pd f  Greg Ruetsch, Brent Oster. Getting Started with CUDA. http://www.nvidia.com/content/cudazone/download/ Getting_Started_w_CUDA_Training_NVISION08.p df
References  Lipps, F. W.; vant-Hull, L. L., Shading and blocking geometry for a solar tower concentrator with rectangular mirrors, American Society of Mechanical Engineers, Winter Annual Meeting, New York, N.Y., Nov. 17-22, 1974, 7 p. NSF- supported research.  Peter Armstrong, An Algorithm For Shading And Blocking Computation Of A Field Of Heliostats Arranged In A Grid Layout.