You are on page 1of 69

Development of tracking Logic for Heliostat based

on feedback by camera
Submitted in partial fulfilment of the requirements
of the degree of

Master of Technology
by

Nishant Kumar
(11D170018)

Supervisors:
Prof. Shireesh B. Kedare
Prof. Harish K. Pillai

Department of Energy Science and Engineering


Indian Institute of Technology Bombay
July 2017

i
Declaration
By submitting this report, I declare that the entirety of the work contained therein is my own,
original work and where other’s idea or words are included, I have adequately cited and
referenced the original sources. I also declare that I have adhered to all principles of academic
honestly and integrity and have not misrepresented or fabricated or any data/fact/idea in my
report. I understand that any violation of the above will be cause for disciplinary action by the
Institute and can also evoke penal action from the sources which have not been properly cited
or from whom proper permission has not been taken when needed.

---------------------

Nishant Kumar

11D170018

4 July 2017

i
Abstract
Concentrating solar power (CSP) is one of the most efficient way to store large amounts of
renewable energy. CSP plants use mirrors or lenses to focus large amount of sunlight onto a
receiver. Heliostat is one of such device that includes a mirror, usually a plane mirror, which
turns so as to keep reflecting sunlight toward a predetermined target, compensating for the
sun's apparent motions in the sky. In a heliostat field, the distance between heliostat and
receiver can be as long as one kilometre, that can amplify small angular tracking errors to a
high image offset. So, high tracking efficiency is needed to minimize offset losses.

This report presents a control application of a heliostat tracker that is able to follow the sun
with high accuracy and redundancy without the necessity of either a precise procedure of
installation or recalibration. The tracking mechanism should track a single prototype as well
as multiple heliostats at large heliostat field.

KEYWORDS: Solar Thermal, Central Receiver Configuration, Heliostat, Tracking,


Image processing, Image Acquisition, Four Cameras

ii
Table of Contents
Declaration .................................................................................................................................. i
Abstract ......................................................................................................................................ii
List of Figures ............................................................................................................................ v
List of Tables ............................................................................................................................ vi
Nomenclature ...........................................................................................................................vii
Chapter 1. Introduction .......................................................................................................... 1
1.1. Central Receiver configuration (Heliostat Field) ........................................................ 1
1.2. Heliostat tracking ........................................................................................................ 2
1.3. Heliostat tracking errors .............................................................................................. 3
1.4. Objectives .................................................................................................................... 4
1.5. Structure of the report ................................................................................................. 4
Chapter 2. Literature Review................................................................................................. 5
2.1. Heliostat Errors ........................................................................................................... 5
2.2. Solar tracking .............................................................................................................. 5
2.2.1. Passive solar trackers ........................................................................................... 6
2.2.2. Electro-optical sensor feedback tracking ............................................................. 6
2.2.3. Microprocessors running solar algorithms........................................................... 6
2.2.4. Closed Loop Tracking with Real-Time Error Feedback...................................... 6
2.2.5. Model Based Open Loop Tracking with Delayed Error Feedback...................... 8
2.3. Summary ..................................................................................................................... 9
2.4. Gap analysis ................................................................................................................ 9
2.5. Objectives of the project ........................................................................................... 10
Chapter 3. Experimental setup............................................................................................. 11
3.1. Target screen ............................................................................................................. 12
3.2. Heliostat .................................................................................................................... 12
3.3. Control System .......................................................................................................... 13
3.3.1. Arduino Mega .................................................................................................... 14
3.3.2. Communication .................................................................................................. 14
3.3.3. Motor controller ................................................................................................. 15
3.3.4. Imagining Device ............................................................................................... 16
3.4. Summary ................................................................................................................... 16
Chapter 4. Methodology ...................................................................................................... 17

iii
4.1. Geometry of the system............................................................................................. 17
4.1.1. Calculation of sun vector ................................................................................... 17
4.1.2. Calculation of Mirror and Image vector ............................................................ 17
4.1.3. Mirror vector ...................................................................................................... 18
4.1.4. Adjusted mirror and vector ................................................................................ 18
4.1.5. Image vector....................................................................................................... 19
4.1.6. Correction in Mirror vector ................................................................................ 20
4.2. Open Loop tracking................................................................................................... 20
4.3. Close loop tracking.................................................................................................... 21
4.3.1. Detection principle ............................................................................................. 21
4.4. Image processing ....................................................................................................... 24
4.5. Tracking Logic .......................................................................................................... 26
4.6. Calibration ................................................................................................................. 28
4.7. Summary ................................................................................................................... 30
Chapter 5. Results ................................................................................................................ 31
5.1. Open loop Heliostat tracking..................................................................................... 31
5.2. Close loop Heliostat tracking .................................................................................... 33
5.2.3. Point image at the centre .................................................................................... 33
5.2.4. Point image at random position on screen ......................................................... 34
5.3. Summary ................................................................................................................... 42
Chapter 6. Conclusion and future work ............................................................................... 43
6.1. Conclusion................................................................................................................. 43
6.2. Future work ............................................................................................................... 44
References ................................................................................................................................ 45
Appendix 1-Test Setup and Technical Datasheet .................................................................... 47
A1.1. Receiver ...................................................................................................................... 47
A1.2. Heliostat ...................................................................................................................... 47
A1.3. Driver .......................................................................................................................... 48
A1.4. Stepper Motor ............................................................................................................. 48
Appendix 2 - MATLAB Programming.................................................................................... 49
Acknowledgment ..................................................................................................................... 61

iv
List of Figures
Figure 1.1: PS 10 a 10 MW thermal power plant in southern Spain (CSP powerplant,2017)..... 2
Figure 1.2: Tracking angles in heliostat ...................................................................................... 2
Figure 3.1: Layout of the experiment ....................................................................................... 11
Figure 3.2: Heliostat machine................................................................................................... 13
Figure 3.3: Schematic of electronics control system ................................................................ 13
Figure 3.4: Arduino Mega micro controller .............................................................................. 14
Figure 3.5: Xbee S2 ................................................................................................................... 15
Figure 3.6: FTDI module ........................................................................................................... 15
Figure 3.7: Motor controls ....................................................................................................... 15
Figure 3.8: Logitech C920 HD pro webcam, without and with filter ........................................ 16
Figure 4.1: Heliostat Geometry ................................................................................................ 17
Figure 4.2: +20 due south tilted X-Z plane of heliostat geometry............................................. 19
Figure 4.3: Geometry of error and their compensation ........................................................... 20
Figure 4.4: Logic map of open loop tracking system .............................................................. 21
Figure 4.5: Colour map of intensity variation of circumsolar region ........................................ 22
Figure 4.6: circumsolar region at different mirror positions .................................................... 22
Figure 4.7: Mirror as seen by camera 1 & 3 at different position ............................................ 23
Figure 4.8: Log (intensity ratios) vs distance ............................................................................ 23
Figure 4.9: circumsolar region at different mirror position ...................................................... 24
Figure 4.10: Masked image (1 & 2) .......................................................................................... 24
Figure 4.11: Processed image through boundary intensity limit .............................................. 25
Figure 4.12: Pixel value distribution of masked image & boundary limit ................................. 25
Figure 4.13: Image feedback logic ............................................................................................ 26
Figure 4.14: tracking logic for close loop tracking .................................................................... 27
Figure 4.15: (1) Image pointing at the centre of the screen. ................................................... 28
Figure 4.16: Heliostat calibration: Image searching for C3 ...................................................... 29
Figure 4.17: Heliostat calibration: Image searching for C1 ...................................................... 29
Figure 4.18: Heliostat calibration: 11 identified positions for data collection ......................... 30
Figure 5.1: Instantaneous error through time ........................................................................... 32
Figure 5.2: Cumulative error vs time ....................................................................................... 32
Figure 5.3: Heliostat pointing at centre of screen .................................................................... 34
Figure 5.4: Image captured during calibration ......................................................................... 36
Figure 5.5: Image captured during calibration ......................................................................... 37
Figure 5.6: Average intensity vs x ........................................................................................... 38
Figure 5.7: log (M3/M1) vs x .................................................................................................. 38
Figure 5.8: Average intensity vs z-axis log ............................................................................. 39
Figure 5.9: (M3/M1) vs z ......................................................................................................... 39
Figure 5.10: Average intensity vs X-axis (2nd calibration) ...................................................... 40
Figure 5.11: log (M3/M1) vs x 2nd calibration ......................................................................... 41
Figure A1.1 :Technical details of NEMA 23 bipolar stepper motor .......................................... 48

v
List of Tables
Table 2.1: Classification of different tracking mechanism .......................................................... 5
Table 5.1: Classification of different tracking mechanism ........................................................ 31
Table 5.2: Time taken by each process in closed loop tracking ................................................ 33
Table 5.3: Time taken by each process in calibration (X=number of use) ................................ 35
Table 5.4: Intensity data for calibration experiment X-axis ...................................................... 35
Table 5.5: Intensity data for calibration experiment Z-axis ...................................................... 39
Table 5.6: Intensity data for calibration experiment X-axis (2nd calibration) ............................ 40
Table 5.7: Error Data for Heliostat tracking of Point (-600mm, -450mm) ................................ 41
Table A1.1: Receiver details ..................................................................................................... 47
Table A1.2: Heliostat details ..................................................................................................... 47
Table A1.3: Micro stepping driver details................................................................................. 48

vi
Nomenclature
α S , αI , αM Elevation angle of Sun, image and mirror in degrees from horizontal plane
containing South and East
ϒS ,ϒI , ϒM Azimuth angle of Sun, image and mirror in degrees from South. East of
South is positive.
γb Altitude offset of heliostat
αb Azimuth offset of heliostat
̂𝑏
M Bias adjusted mirror unit vector
̂ 𝐴𝐷𝐽
M Adjusted mirror unit vector
⃗C Correction vector
⃗S,I, ⃗M
⃗⃗ Sun, image and mirror vector

Ŝ,Î, M
̂ Sun, image and mirror unit vector
θi Incident angle (sun rays)
𝜀𝑝𝑡𝑁 , 𝜀𝑝𝑡𝐸 Pedestal tilt angles
𝜀𝑁𝑂 Non- orthogonality angle
Jx/Jy Mirror angle equivalent to half screen length/height
J The heliostat angle value required to move the image from centre of the
screen to either of the sides
R Perpendicular distance between screen mount and center of heliostat
mirror
Rs, Rv The static component and the varying component of R
H Relative height of screen center with respect to center of mirror
K The projection of mirror offset in tilted Y-Z plane
C1, C2, C3, C4 Cameras mounted around screen (left, bottom, right, top)
𝑚𝑜𝑓𝑓 Mirror offset
Ɵ𝑠 Angle heliostat-screen plane make with south, 1820 for this experiment
H𝑟 Height of the heliostat with respect to ground
Hℎ Height of the receiver screen with respect to ground

vii
Chapter 1. Introduction
In recent times, much of emphasis in Energy sector is on taping Renewable energy, that also
makes it ‘World’s fastest growing form of energy (Sieminski, 2011).A global transition from
fossil fuels toward renewable energy is in process, motivated mostly by a growing awareness
about environmental degradation, climate change and the challenge of finite fossil resources.
With the increasing global energy demand, along with growing populations and infrastructure
development, especially in the developing world (Sieminski, 2011),One of the greatest
challenges of our time is to find efficient and cost-effective ways to harness alternative forms
of energy. One of the other alternative is nuclear power, which could play a significant role in
the medium term during the transition to renewable energy. However, it cannot be a prime
source in longer run due to cost uncertainty and challenges associated with waste management
and possibility of arms proliferation. Photovoltaic (PV) and wind power are already cost
competitive with coal and gas in some instances and can help to reduce the use of conventional
fuels. Unfortunately, the discontinuous nature of PV and wind coupled with our inability to
store electrical energy at a significant scale make these technologies unsuitable for base load.

Concentrating solar power (CSP) converts solar radiation into thermal energy and that can be
used in industrial utility, household utility or for electricity generation. Unlike electricity,
thermal energy can be stored more efficiently and economically even at utility scale. This set
apart CSP from other renewable energy technologies, enabling it to provide base load power
in sunny parts of the world.

This chapter starts off giving a background for solar energy and shows how CSP fits into this
category. The project’s objectives, methodology and scope are then discussed before ending
with an overview of the rest of the document.

1.1. Central Receiver configuration (Heliostat Field)


The Central Receiver configuration’s concentrator consists of a large array of heliostats
(tracking mirrors), as per figure 1.1. Each heliostat periodically adjusts its orientation in two
axes to compensate for the earth’s movement relative to the sun, thereby continuously directing
incident sunlight onto a centrally located tower mounted receiver. The receiver absorbs the
concentrated sunlight and converts it to thermal energy which is carried away by a heat transfer
medium (typically steam or molten salt) to drive a turbine or to be stored for later use

1
Figure 1.1: PS 10 a 10 MW thermal power plant in southern Spain (CSP powerplant,2017)

1.2. Heliostat tracking


Each heliostat has a control system that periodically adjust its orientation such that the
coordinate of reflected sunbeam on target remains fixed throughout the day. The notion of
tracking is that mirror vector always bisects the angle between image vector and sun vector as
shown in fig 1.2. The heliostat usually has dual axis tracking mechanism, there are many dual-
axis modes, such as altitude-azimuth, radial-pitch-roll and azimuth-pitch-roll. The altitude-
azimuth mode is the most commonly used with azimuth being the primary axis and the altitude
as the secondary axis.

Sun Vector (S)


Mirror Vector (M)
Image Vector (I)

Figure 1.2: Tracking angles in heliostat


Control systems for heliostat fields are designed to accurately direct sunlight at a specific target.
The control systems monitor and adjust the amount of thermal power reaching the receiver by
changing the target. The receiver converting solar heat into power needs to operate in a specific
temperature range-too little and the power conversion is inefficient, too much and expensive
damage could occur. It is the job of the control system to operate the concentrating solar power
(CSP) system at this most profitable point of power generation

2
Many heliostat systems use open-loop tracking to accomplish these goals. They stay on target
by following a pre-set course given their known positions in the field and the known course of
the sun in the sky. The other method is Closed loop in which the feedback to the control system
is provided by assessing mirror vector or/and image vector.

Heliostat Control system follows this path for tracking

1 Collecting pointing error data over a short period of time in calibration mode

2 Using error data to estimate for the misalignment parameters

3 Feeding parameters back to the model to predict errors in the future

4 Adjust pointing direction with predicted errors to compensate misalignments in mirror


steering mode

1.3. Heliostat tracking errors


Sources of error in heliostat tracking can be grouped as:

1.Errors in calculation of Sun Vector


The altitude and azimuth angles of the sun are determined by using formulae as described in
Duffy and Beckman. These formulae do not take account of refraction of sunlight due to
atmospheric conditions. Therefore, theoretical value of sun vector differs from real value.
2.Fixed error in mechanical design:
The ideal heliostat should have coinciding azimuth and altitude axis, and the mirror plane
should also lie on that. But the actual mechanical design has various offsets i.e. altitude-
azimuth axis offset, mirror-pivot offset etc. These errors have to be compensated in the
control system for accurate tracking.
3.Errors arising from imperfect installation
Tracking controls take heliostat position as primary input for computation of image vector
and mirror vector. Error may arise if heliostat is not fixed to a desired location and
orientation. As the precision level require in tracking is very high, probability of these error
is also increased.
4.Random errors arising from other varying sources.
These include imperfection of mirror surface, degradation of components and external forces
such as wind. There could be more sources so instance, severity and pattern cannot be
deciphered or predicted accurately. The approach to resolve this error would be more
rigorous in open loop control systems. Closing the open loop could to a large extent provide
immunity from such errors.

3
1.4. Objectives
This project’s objective is to develop and demonstrate a heliostat tracking architecture that
have high accuracy and redundancy. Control system should be governed by the real-time
tracking feedback compensating for the relative Earth-Sun movement to maximize the
reflection of sunlight onto a stationary receiver. The system should track heliostat at a very
high precision with tracking error as low as 0.1mrad. The objectives identified to achieve the
larger aim of designing self-learning control of heliostats include:

1) Development of Camera based feedback mechanism, that can identify tracking error
2) Development of computer programme that can analyse the errors and can communicate
them with the user.
3) Development of tracking logic that can accept error data based on Sun position formulas
as well as feedback mechanics as input and can produce tracking controls for high
precision tracking with minimum time lag

1.5. Structure of the report


In chapter 2, Literature survey is done which focus on determination of different errors in
heliostat tracking and prevalent techniques that have been evolved to compensate these errors.
The review is done on different types of control architecture developed in past. In chapter 3
gives the detailed description of experimental setup along with the schematic of connection of
the microcontroller with rest of the components. In chapter 4, all the calculations, logic and
processes involved are discussed. In Chapter 5, states the results of open loop tracking and
results of closed loop corrections using Camera feedback mechanism. Chapter 6 concludes the
work done and state recommendation for future work

4
Chapter 2. Literature Review
This chapter reviews work done by various researchers and relevant to the control of heliostats
in central receiver systems (CRS). The fundamentals of earth-sun geometry are discussed and
solar angles are defined. The basics of solar tracking, heliostat tracking, error correction, CRS
development trends and the current state of the art in heliostat field control systems are
discussed.

2.1. Heliostat Errors


Many researchers including Yogev, (1999) and Quero, (2007) have counted 5 different errors
in heliostat geometry. These inbound errors in heliostat structure result in tracking errors. These
five errors are:

1. Pedestal tilt
2. Azimuth and elevation bias offset
3. Non-orthogonality between the altitude and azimuth axis
4. Mirror pivot offset
5. Encoder reference errors

2.2. Solar tracking


Clifford, MJ. (2004) discuss a range of commercial solar trackers and distinguishes between
actively powered- and passively powered actuation. The Actively powered trackers track with
electric motors and hydraulics which require an external power source and the passively
powered includes devices that work with kinetic potential energy (springs or weights) or by
thermal expansion of materials being heated by the sun. Tracking mechanisms are categorised
according to open- versus closed-loop control, as per Lee (2009).

Table 2.1: Classification of different tracking mechanism


Actively powered Passively powered
mechanisms mechanisms

Open-loop tracking Microprocessor-based solar Clockwork mechanisms


algorithms

Closed-loop tracking Electro-optical feedback Trackers using thermal


sensors expansion actuators

5
Rubio (2007) categorizes solar tracking methods by their respective control mechanisms as
follows. These methods were used in earlier stages of Open loop heliostat tracking experiments
by researcher.

1. Passive tracking (using self-powered actuators)


2. Active tracking with electro-optical sensor feedback
3. Microprocessors running solar algorithms.

2.2.1. Passive solar trackers


Open-loop passive trackers typically make use of clockwork mechanisms and do not need
sunlight to work whereas closed-loop passive systems use sunlight to provide the required
feedback energy. For the closed loop, a pair of opposing solar powered actuators are typically
positioned to receive equal solar radiation only when the tracking device points directly at the
sun. Misalignment with the solar vector causes a negative feedback force which serves to
continuously track the sun

2.2.2. Electro-optical sensor feedback tracking


These systems rely on sunlight falling on light sensors to provide alignment error feedback
signals to a closed-loop electronic control system. The control system regulates power supplied
to motors or hydraulics that act to realign the system toward the solar vector. Solar Position
Algorithms

2.2.3. Microprocessors running solar algorithms


These algorithms estimate the sun’s declination angle and various equations for solar time for
a full day at a time. These early algorithms yield solar angle uncertainties in the range of several
tenths of degrees. Grena (2007) developed an algorithm by adding several correction factors,
notably atmospheric refraction correction to old algorithms for the solar elevation angle. This
algorithm is very much computational efficient and has a maximum uncertainty of 0.0027
degrees. The Solar Position Algorithm (SPA) by Reda (2008) is by far the most accurate to
date. It has a maximum tracking uncertainty of 0.0003 degrees (0.005 mrad) from 2000 BC to
6000 AD. Heliostat Tracking and Control.

2.2.4. Closed Loop Tracking with Real-Time Error Feedback


2.2.4.1. Local Feedback
Roos (2007) describes controlling a 25 m2 target aligned heliostat with local feedback obtained
from an electro-optical sun tracking sensor. Since the heliostat normal angle needs to always
bisect the sun to heliostat to receiver angle, the sensor was connected to the heliostat’s primary

6
axes via a 2:1 mechanical reduction. Experimental results yielded a daily mean normal vector
tracking accuracy of 3.3 mrad.

Quero (2007) proposes a method for providing local error feedback to each heliostat by
measuring its reflected beam angle. Electro-optical sensors, each having a collimator structure
is placed between each heliostat and the receiver. Misalignment of the error reflected image
results in a corresponding beam angle deviation measured by the sensor. This scheme requires
very accurate alignment during installation, but can also be periodically calibrated using an
electronic offset procedure.

Pfahl (2009) proposes a local feedback tracking method which measures the relative angles
between the heliostat normal, the receiver and the sun by using an imaging device mounted on
the heliostat. A small hole in the mirror surface allows an image to form on a plane behind the
hole, similar to how a camera works. An image sensor measures the centre-offsets of the images
made by the receiver and the sun. This provides simultaneous angle feedback of the sun and
the receiver relative to the heliostat normal vector. The programme allows for continuous
adjustment of the heliostat until its normal vector bisects the angle between the sun and the
receiver.

2.2.4.2. Receiver Feedback


Yogev (1999) describes a scheme for directly measuring individual heliostat aiming errors by
‘looking back’ from the receiver to the field. A set of four cameras is positioned at opposite
ends of the receiver aperture (above, below, left and right). The operating principle is that
misaligned heliostats appear unequally bright to cameras located at opposing ends of the
receiver. For example, if a heliostat aims at the top-left corner of the receiver, it will appear
brighter to the camera located above the receiver than to the camera below. The same goes for
left vs. right. During each control period, a set of cameras are commanded to simultaneously
take a picture of the same field section. Control signals for multiple heliostats can then be
calculated by comparing the relative brightness values of image sections that correspond to
specific heliostats in the field.

Kribus (2004) further developed the above-mentioned principle and presents a detailed
correction methodology with test results showing individual heliostat tracking errors reduced
to 0.1 - 0.3 mrad. However, the fact that this method has so far not seen widespread use is an
indication of the image processing challenges and practical difficulties associated with
operating cameras close to a high flux receiver.

7
Convery (2011) described a new method for identifying individual heliostat reflections from
among many others in a field. Piezoelectric actuators are attached directly to heliostat mirror
surfaces to induce specific vibration signatures.

2.2.5. Model Based Open Loop Tracking with Delayed Error Feedback
Open loop tracking uses no real-time error feedback. The required heliostat normal vector is
calculated at regular intervals along with actuator control signals to keep realigning the
heliostat.

Baheti & Scott (1980) derived a basic movement model to account for a heliostat’s pedestal
tilt, azimuth- and elevation axes bias and drive wheel radius tolerance. It was claimed that
fabrication tolerances (for orthogonal axes alignment) and rotary encoder alignment could be
easily controlled, so these sources were not included in the model. A closed-loop solar tracking
sensor was used to periodically point the heliostat normal vector directly at the sun. Heliostat
pointing errors were then obtained at each measurement interval by comparing the commanded
heliostat position with the ‘real’ solar position as calculated by a solar algorithm. This data was
used to estimate coefficients for the error model and resulted in final RMS error reductions of
10: 1 and 5: 1 for azimuth- and elevation tracking respectively.

An improvement to Baheti’s model was patented in 1986 by McDonnell Douglas. This model
included error sources previously described by Baheti & Scott and added a rotation element
caused by non-orthogonality of a heliostat’s principle axes.

Stone (1999) developed a mechanism (solar one) by manually adjusting their pedestal
mounting bolts with the aid of a very accurate electronic inclinometer. This was expensive and
proved to be ineffective in reducing long term tracking errors. Later, a heliostat beam
characterization system (BCS), analogous to a modern digital camera, was used to capture
reflected solar images on a calibration target located on the tower below the receiver Elevation-
and azimuth-axis offsets (bias adjustments) were calculated based on three reflected beam
measurements per day. This replaced the need for structural adjustments, but was still time
consuming.

A machine vision system for automatically determining heliostat beam error offsets is
described by Camacho et al. (2012). The strategy is based on the BCS system used at Solar
One. A modern digital camera is used for image acquisition and digital image processing
techniques for calculating the reflected beam centroid relative to the intended aim point is
presented.

8
Ravindra, (2015) and Sushant (2015) have designed two similar experiment, in which cameras
are used for closed loop feedback. One experiment used four cameras mounted along the
receiver while other used a single camera facing the receiver. In Ravindra method tracking
errors were determined by using four cameras at each side of dummy. Average intensity values
were being evaluated for each heliostat image and compared from the values obtained from the
opposite camera. The image was pointed at center of screen by adjusting equal intensity value
on opposite cameras. Detection of error was successfully presented while correction and
application was not fully completed.

2.3. Summary
Precise tracking of heliostat is must for maximum efficiency of solar thermal plant. In passive
tracking sunlight is not necessary for feedback while in Active tracking sunlight is necessary
as the later use light sensors for closed loop. In heliostat tracking eight errors sources are
identified in this literature survey. In Closed loop tracking feedback is given to controls system
about error in position of image vector or heliostat normal vector while in open loop initially
mathematical algorithm is been feed to the system not further feedback is provided. As open
loop mechanism does not compensate for time varying error (major source of error) and does
not have any feedback mechanism that lead to a very low precision in tracking. In local
feedback closed loop mechanism the sensors are placed on or near mirror while in receiver
feedback closed loop mechanism sensors are located on or near Target surface mechanism.
Different types of sensors like Photodiode, infrared sensor, sound sensors, camera etc, are used.
The most precise system yet developed consist four cameras located at receiver looking onto
heliostats. Ravindra,2015 successfully detected position of heliostat in a constrained
experiment condition.

2.4. Gap analysis


Heliostat tracking by image acquisition from four cameras is shown to be the most accurate
and efficient tracking system. The system developed by Ravindra,2015 had two manual
feedbacks arrangement for the system to work properly. Initial masking, that has to be updated
multiple times within a day was non-feasible in real setup. The calibration of the heliostat in
order to make it point anywhere in the screen was also a manual action. Further, the experiment
couldn’t complete correction in real time. So, one of the main Aim of this project is to tackle
each of these hindrances independently

9
2.5. Objectives of the project
1) Development of a logic system based on 4 cameras to detect current position of heliostat
and the error in position
2) Development of tracking system that can point at center of receiver and can track it with
time
3) Optimization of tracking logic to achieve tracking error of less than 0.1mrad
4) Development of tracking system that can point at any position on receiver and can track
that position with time

10
Chapter 3. Experimental setup
In this chapter, experimental setup is described in detail. This chapter describes reasoning of
selecting different components and also problem created by them during experiment

New Solar Terrace was selected as a site of experiment as it has full day sun radiation. A target
surface made of Ply-wood was fixed, to be used as a dummy screen. Four cameras were
installed at mid-points of each sides of the screen. A miniature heliostat was already designed
by Ravindra, (2015) and Sushant (2015), the same machine was used in this experiment, it was
placed at distance of10m from the screen due south. The heliostat has two stepper motors that
control its two axes - azimuth and altitude, it is controlled by a micro-stepping driver. A
Heliostat Controls system was designed from scratch using readily available electronic
components.

. Fig 3.1 describes the basic layout of the experiment 4 cameras placed at each side of the
dummy screen send image to the computer. Computer then process the image, compare the
average intensity values of opposite cameras, and determine the position of image with respect
to the centre Correction angle is then calculated using a comprehensive algorithm (in detail
section: 4.5). The correction angle then transmitted to Motor controls wirelessly as both these
systems are at a significant distance. The motor controls then rotate the motor according to

Receiver screen

Processing unit
USB Dock

Wireless
transmitte
r
Wireless receiver

Heliostat Motor drivers


Figure 3.1: Layout of the experiment

11
input correction angles. The system checks for the error again, and whole process reiterate. If
the direction of error changes the correction angle is halved. The iterations follow until a
minimum correction value is reached, for this experiment the values is ~0.04 degree (7mm
error on screen). The whole cycle revives after a fixed delay for another round of correction.

3.1. Target screen


A target surface was required to simulate the receiver. Surface of the target is made of a
1800mm x 1800mm plywood with black paint on front screen (fig 3.2). The target was fixed
on south facing side wall with support of a mild steel frame. Although the wall had a +20 toward
east (1820 from south) error in north-south axis, the error was also passed on to screen. Four
Logitech webcams were installed on centres of each side of the screen

Figure 3.2: Dummy Screen

3.2. Heliostat
A miniature heliostat was designed and fabricated by previous Ravindra, (2015) and Sushant
(2015). Heliostat have two NMEA size 23 bipolar stepper motors set at 25000
steps/revolution,1:8 reduction worm gears were used as the drive. That put the motor at
~0.0020 /step or 0.03 mrad/step. A 250 mm x 250 mm mirror is mounted on heliostat (fig 3.4).

The combined motor and gear has a holding torque of 64 kg-cm. Mirror centre to altitude axis
offset is 0.75 cm. Output torque is more than sufficient to move the mirror. The azimuth axis
is facing downwards and fixed to a bushing bolted to the base plate.

12
Four wires of each of the motors are connected to motor output terminals on the micro stepping
drivers. Two limit switches are located for each axis are provided such that they get tripped at
pre-determined angles. In this case, altitude trips at -1 degrees and azimuth at -90 degrees. It
prevents heliostat to rotate at unclearly high angles.

Figure 3.2: Heliostat machine

3.3. Control System


Controls system was developed such that components are easy to procure and relatively easy
to execute. The system composes primarily of five different components, these are- Arduino
mega board for main controls, Two-Xbee board for communication with computer, joystick
for initial image feedback and gross calibration at different stages of experiment, a switch board
for switching between different modes and two motor stepper drivers for controlling two
motors of heliostat

Figure 3.3: Schematic of electronics control system

13
3.3.1. Arduino Mega

Arduino Mega (Fig 3.4) forms the main part of the heliostat controller. It is relatively cheap
and readily available micro-controller, it has biggest support library and resources among,
those are very handy when one is designing something new. Arduino Mega is a microcontroller
based on Atmega-2560 chip. It has 54 digital inputs/outputs, 16 Analog inputs, 4 hardware
serial ports (UARTs) and USB interface it runs on 7 to 12 v DC supply.

Figure 3.4: Arduino Mega micro controller


The program of Arduino is on C++ and was programmed on Arduino IDE. Arduino also
features timers, interrupts and is capable of performing mathematical operations on board also.
It doesn’t have graphic processing capability, which makes Arduino incapable of performing
on board image processing. Because of this image processing was performed on MATLAB on
PC

3.3.2. Communication
Two Xbee series-2 modules mounted on FTDI shield were used for communication (Fig 3.5).
FTDI shield is used to communicate between USB and Serial (Fig 3.6). Xbee s-2 was
configured into route mode with baud rate 9600. Communication module was powered by
connecting 3.3v input voltage point on Arduino. For communication with Arduino Rx of Xbee
is connected to Tx and Tx of the Xbee is connected to Rx of the Arduino

14
Figure 3.5: Xbee S2

Figure 3.6: FTDI module


3.3.3. Motor controller
Two M542 micro-stepping drivers were used to drive the stepper motors. Supply voltage can
be given up to +50VDC and can give output current up to 4.2 A as whole the power delivered
by the driver is more than sufficient. It has selectable resolutions from 400 to 25000 steps per
revolutions.

Figure 3.7: Motor controls

15
3.3.4. Imagining Device
Logitech C920 HD pro webcam is used for taking image of reflection on the receiver (Fig. 3.8).
Camera is being operated in its default resolution 640x480. All internals settings such as
exposure, brightness, focus mode, hue and saturation are automatic. Welding glass was used
as filter to reduce the intensity of heliostat. Four cameras with filter were placed on each side
of the screen.

Figure 3.8: Logitech C920 HD pro webcam, without and with filter

3.4. Summary
Layout of the experiment was described; the experiment composes five different
systems/devices. A dummy screen that acts as a receiver, 4 cameras attached to screen for
image acquisition, computer for image processing, motor control system for driving the motor
and a communication system for data transfer between computer and motor controls. Details
of each component was presented.

16
Chapter 4. Methodology
This chapter explain various methods and calculations used in the experiment. The goal of this
chapter is to establish ground for high accuracy tracking.

4.1. Geometry of the system


Geometry of the system is predominantly governed by laws of reflection. In which Sun vector
(𝑆̂) acts as incident ray and Image vector (𝐼̂) as reflected ray while mirror vector (𝑀
̂ ) act as
normal vector. In ideal condition Mirror vector will always bisect angle between Sun and Image
vector, however in practical this condition doesn’t hold due to various errors (see 2.2). In
subsequent sections each above mentioned vectors are computed using empirical formulas and
mathematics.

4.1.1. Calculation of sun vector


There are many algorithms available for sun tracing but the most efficient algorithm available
is Solar Position Algorithm (SPA) by Reda (2008). The error in SPA in terms of standard
deviation of solar azimuth and elevation angles is specified to be within 5 µrad (0.0003 °,) in
ideal conditions, for a very period from-2000 to 6000. In this experiment, a MATLAB program
was prepared based on the above-mentioned algorithm

4.1.2. Calculation of Mirror and Image vector


The geometry of the system in Spherical coordinates is defined in Fig. 4.1.

z (Up)

𝐼̂
γI x'

̂
𝑀
αI 𝛾𝑀 x'
𝛼𝑀 R
x
𝛼𝑆 (North)

𝑆̂
γS
x'
y (East)
Figure 4.1: Heliostat Geometry

17
4.1.3. Mirror vector
In fig. 4.1, Heliostat geometry is defined in spherical co-ordinates. The radial distance (R) is
defined as perpendicular distance between screen mount and varying centre of heliostat mirror.
R can further be defined as R=Rs +Rv. Where Rs is the static component that is when mirror is
directly facing north, value of Rs in this system is 10000 mm. further the varying component
Rv is function of Mirror vector and mirror offset. As described in fig 4.1 -

̂ ) can be described by azimuthal angle- (αM ) and elevation angle- (γM )


Mirror vector (𝑀

̂ = (R, αM , γM )
𝑀 (3.1)

The solar vector (𝑆̂) is described by its azimuthal angle- (αS ) and altitude angle- (γS )

𝑆̂ = (R, αS , γS ) (3.2)

The Image vector (𝐼̂) is described by azimuthal angle- (αI ) and elevation angle- (γI )

𝐼̂ = (R, αI , γI ) (3.3)

̂ ) is the angle bisector of the angle between Sun vector (𝑆̂)


The ideal Mirror normal vector (𝑀
and (𝐼̂ ). The required Mirror normal vector (𝑀
̂ ) can be calculated as

𝑆̂ + 𝐼̂
̂=
𝑀 (3.4)
2

4.1.4. Adjusted mirror and vector


Unluckily these formulas take in account that there are no errors in heliosts (section 2.2).
Though this is not the practical case, so one has to incorporate these errors in calculation of
mirror vector equations.

The azimuth- and elevation angle offsets and pedestal tilt is added to the angle components of
̂ as follows
𝑀

α𝑀𝑏 = α𝑀 + αb (3.6)

γ𝑀𝑏 = γ𝑀 + γb (3.7)

Although in this system there is no need to incorporate azimuth- and elevation angle offsets or
pedestal tilt as this heliostat operates on difference of angle rather than absolute values. The
error value (Δα𝑀𝑏 ) would automatically cancel out during calculation of difference
( α1 𝑀𝑏 − α0 𝑀𝑏 ).

Δα𝑀𝑏 = α1 𝑀𝑏 − α0 𝑀𝑏 = (α1 𝑀 + α1 b )−(α0 𝑀 + α0 b ) = α1 𝑀 − α0 𝑀 (3.8)

18
4.1.5. Image vector

𝑆̂ 𝐼̂ Target
̂
𝑀

2430 mm (Hr)
Heliostat
75 mm
R
1085 mm (Hh)

Figure 4.2: +20 due south tilted X-Z plane of heliostat geometry

Figure 4.2 describes the experimental setup as seen from right side, the frame is +20 tilted
toward east. the frame of reference makes an angle of Ɵ𝑠 (1820) with south.

The Image unit vector (𝐼̂) is described by azimuthal angle- (αI ) and elevation angle- (γI ).
Unlike the ideal case the mirror centre have some offset with heliostat centre. To incorporate
that one has to redefine Image vector as a function of Mirror offset (𝑚𝑜𝑓𝑓 ). For calculation of
that one has to compute R and H (relative height of screen centre with respect to mirror)

Distance between Receiver and Heliostat pivot (Rs) is 10000 mm and the value of mirror offset
is 75mm. So, R and H can be defined as:

R = 𝑅𝑠 + 𝑅𝑣 = 𝑅𝑠 − 𝑚𝑜𝑓𝑓 X 𝑐𝑜𝑠 (𝛼𝑀 − Ɵs ) X 𝑐𝑜𝑠 (𝛾𝑀 ) (3.9)

Where cos (𝛼𝑀 − Ɵ𝑠 ) is the projection of Mirror offset in tilted X-Z plane, further cos
((γM )) is projection on x axis.

H = (H𝑟 − Hℎ ) − 𝑚𝑜𝑓𝑓 X 𝑐𝑜𝑠(𝛼𝑀 − Ɵs ) X 𝑠𝑖𝑛(𝛾𝑀 ) (3.10)

Where cos (𝛼𝑀 − Ɵs ) is the projection of Mirror offset in tilted X-Z plane, further cos
((γM )) is projection on z axis. Finally, elevation angle( γI )can be defined as -

γI = 𝑠𝑖𝑛−1 (H/R) (3.11)

K = 𝑚𝑜𝑓𝑓 ∗ 𝑐𝑜𝑠(𝛾𝑀 ) X 𝑠𝑖𝑛(𝛼𝑀 − Ɵ𝑠 ) (3.12)

Where K is the projection of mirror offset in tilted Y-Z plane. 𝛼𝐼 can be defined as -

𝛼I = 𝑠𝑖𝑛−1 (K/R) (3.13)

19
4.1.6. Correction in Mirror vector
In closed loop system sensors provide feedback of mirror vector or image vector. In case of
four cameras the feedback is in form of Mirror vector. Correction vector is required for to get
̂ r) and ideal (𝑀
targeted image vector. The shift in the real (𝑀 ̂ ) Mirror vector is mathematical
quantification of the error. The real Mirror vector can be obtained as

𝑆̂ + 𝐼̂𝑟
̂𝑟 =
𝑀 (3.14)
2

The correction vector can be defined as

𝐶̂ = 𝑀
̂ −𝑀
̂𝑟 (3.18)

𝑆̂ + 𝐼̂𝑟
𝐶̂ = 𝑀
̂ − (3.19)
2

a - Sun Vector
a
b - Ideal mirror vector
c - Correction vector
b
c d - Real mirror vector
d e e - Ideal target vector
f – Correction in image vector
f
g - Real target vector
g

Figure 4.3: Geometry of error and their compensation

In fig 4.3 Geometry of error correction is shown. Correction vector is calculated by above
mentioned equations and then feeded to the motor controls system at a fixed time interval, the
correction in image vector is almost twice of mirror due to geometry

4.2. Open Loop tracking.


In open loop tracking, there is no feedback vis-à-vis any error or position of projected image.
In this system correction is feeded based on the changing position of sun as time lapse. For
that, the tracking angle i.e. Mirror vector is calculated using fixed image vector and Sun vector
obtained by Sun equation (Reda (2008)).

20
The heliostat is first positioned such that reflected image point at the centre, the mirror angles
at that moment are set as initial angles (Mi). Then onwards after a regular interval of time (5
̂ ) is fed to Arduino. Arduino compute the correction angle that is
min) new mirror vector (𝑀
difference between mirror vector and initial vector. New Mirror vector is set as initial vector
and the difference (ΔM) is forwarded to motor controls (see the logic flow chart as described in
fig 4.4). Then Motor controls rotate the motor equivalent to the difference angle

Calculation of Sun Vector (𝑆̂) using Solar


Algorithm
Motor controls

Calculation of Image vector (𝐼̂) assuming


fixed position of receiver

Feed ΔM to Motor

Calculation of (Required) Mirror vector Calculate ΔM=M -Mi


̂)
(𝑀 M =Mi
Feedback to Arduino

MATLAB Arduino

After a time- delay cycle continues

Figure 4.4: Logic map of open loop tracking system

4.3. Close loop tracking


As open loop tracking inherits significant tracking errors, one has to look for closed loop
tracking for high accuracy. The planned closed loop control of heliostat requires real time
detection of reflection of sunbeam on a target. The detected deviation from desired point is
processed to determine deviation of existing mirror vector. This deviation is then fed back to
the tracking controller to get reflection of sunbeam at desired point. The concepts and processes
behind detection technique are covered in following paragraphs.

4.3.1. Detection principle


Circumsolar region is the region around the sun as seen from earth. Its intensity reduces with
radial distance from the sun. In a circle of given radius with center at the Sun’s center, the
intensity is same and as the radius increase intensity reduces. Fig 4.5 is the intensity map of
circumsolar region of sun as seen directly by a camera. An image was captured using high

21
quality camera phone and after processing gradient of intensity variation is obtained. Figure
shows the variation in intensity of a sunlit sky as the radius changes. As one move away from
the center of sun the intensity decrease exponentially. In figure, maximum intensity value that
can be captured by 8-bit pixel is 255 which corresponds to red color and 0 is shown as blue.

Figure 4.5: Colour map of intensity variation of circumsolar region

P1 P2 P3 P4

Figure 4.6: circumsolar region at different mirror positions

22
The circumsolar region can be seen directly or through a mirror, in which case the mirror
simply acts as an aperture. By changing position of the mirror, different regions of the sky can
be seen. An experiment was conducted to visualize how intensity of mirror in image changes
with respect to moving sunbeam reflection along a horizontal line. Fig 4.6 shows the captured
circumsolar region as the mirror is rotated.

As the position of mirror is changed from P1 to P4 the circumsolar region captured by camera
changes significantly. At P1 the Brightness is the lowest and it increases to highest at P4. Fig
4.7 shows the image captured by camera at various position of Mirror. Its visible how the
intensity increases as it moves closer to centre of sun

C1

C3

Figure 4.7: Mirror as seen by camera 1 & 3 at different position


Pictures were also taken from camera placed at opposite side of the screen and the pattern of
Brightness is exactly opposite in that. At P4 brightness is highest while its lowest at P1 This is
explained by kirbus,2004 according to his findings the intensity of the reflected spot has a
pattern, the pattern is such that the log value of intensity of cameras placed at opposite sides
form a straight line as plotted in fig 4.8.
1

0.5

0
log(M1/M2)

-3 -2 -1 0 1 2 3
-0.5

-1
distance

Figure 4.8: Log (intensity ratios) vs distance

23
4.4. Image processing
The idea of image processing is to compute average intensity of heliostat glass as seen by
different cameras. Image processing should also address the issue of detecting multiple
heliostats in the field. For this a unique methodology was developed to calculate the average
intensity of circumsolar region reflected by sun, the two-step process highlights the heliostat
surface and compute the average intensity.

First a rectangular mask is formed to identify gross position of the heliostat, the mask is defined
at the of installation, the position of mask is the function of position of heliostat mirror

Figure 4.9: circumsolar region at different mirror position

1 2

Heliostat enclosed Rectangular mask without


in rectangular mask heliostat enclosed
Figure 4.10: Masked image (1 & 2)

Mask values for each camera has to be defined at the time of installation. Image is acquired by
camera and mask section is highlighted, one can imagine this as a window. Rest of the image

24
is out of bounds for further processing. Different mask values can be feeded to identify different
heliostat in the field. Because of this masking multiple heliostats can be identified and tracked
separately without any interference with one another. In fig 4.10 mask 1 highlight heliostat
while mask 2 highlight a different pixel location, a second heliostat can be positioned at masked
2 and both heliostat can be tracked separately.

Further Masked image is processed through threshold value, in which computed boundary
intensity limit eliminate all pixel below that value. After this process only heliostat surface is
highlighted

Figure 4.11: Processed image through boundary intensity limit


The principal of boundary condition is that it senses the sudden jump in the intensity values.
After analysing the pixel data sorted by value, the program identifies the sudden jump in pixel
values and it fixes the value at the mid-point of the trendline.

Boundary
limit

Figure 4.12: Pixel value distribution of masked image & boundary limit

25
4.5. Tracking Logic
Tracking error detection is performed by acquisition of four images of the heliostat field at the
fringe of the target, around the receiver aperture. Each image is converted into binary form,
and region of interest (RI) is identified. The average brightness of RI in the original image is
evaluated for each heliostat image and the brightness values (maximum and average) from
images on the opposite sides of the receiver are compared. A brightness imbalance between
the opposite images of a given heliostat indicates that the heliostat is not properly aimed, and
enables determination of the direction and magnitude of the required correction

RGB Picture Highlighted region Image filter


captured by camera based on mask highlighting only
pixel value >Ilim

Comparison of Calculation of
parameter of four average Intensity
images
Max Intensity = 194 Average Intensity = 154 Total pixel = 339

Figure 4.13: Image feedback logic


Opposite cameras intensities are compared and based on that, feedback is given to motor
controls to move left or right.M1 is the intensity of left side camera while M3 is the intensity
of right side camera. For pointing or tracking at centre of screen, the logic of tracking is
equating M1 and M3 i.e.M1=M3 or M3/M1 =1.

J is heliostat angle value required to move the image 920mm (half-length/height of the screen)
on the screen. When the feedback system initiates the direction is decided by the intensity
comparison and the value of J/16 is feeded. So, if M3/M1 >1, means the image is in right half
which means one have to feed M-J/16, for M3/M1 <1 the opposite is valid. The loop continues
unless the direction of intensity is not changed. Which means for M3/M1 >1, it will keep

26
feeding feed M-J/16 until M3/M1 >1 is observed. In case loop breaks means M3/M1 >1 a
feedback with opposite direction and half the value is given that is +J/32. The same logic
continues until the minimum error value is reached, in this experiment minimum error value is
J/128.

Set initial mirror vector values

Mirror vector (𝑀) calculation using Open loop Feedback to motor control
methodology, 𝑀 drivers M

loop initiates

Image processing
Image Feedback from 4
cameras Computation of image parameters

If M3/M1 >1, Feed M-J/16 Feed M+J/16 If M3/M1 <1,

𝐽 𝐽 𝐽 𝐽
loop 𝐶̂ = 𝑀 − −𝑀 =− 𝐶̂ = 𝑀 + −𝑀 =
16 16 16 16 loop
Break loop If M3/M1 <1 Break loop If M3/M1 >1

Feed M+J/32 Feed M-J/32

𝐽 𝐽 𝐽 𝐽
loop 𝐶̂ = 𝑀 + −𝑀 = 𝐶̂ = 𝑀 − −𝑀 =−
32 32 32 32 loop
Break loop If M3/M1 >1 Break loop If M3/M1 <1

Feed M-J/64 Feed M+J/64

𝐽 𝐽 𝐽 𝐽
loop 𝐶̂ = 𝑀 − −𝑀 =− 𝐶̂ = 𝑀 + −𝑀 =
64 64 64 64 loop
Break loop If M3/M1 <1 Break loop If M3/M1 >1

Feed M+J/64 Feed M+J/132

𝐽 𝐽 𝐽 𝐽
loop 𝐶̂ = 𝑀 + −𝑀 = 𝐶̂ = 𝑀 − −𝑀 =−
128 128 128 128 loop
Break loop If M3/M1 >1 Break loop If M3/M1 <1

Figure 4.14: tracking logic for close loop tracking

27
4.6. Calibration
By comparing Intensities of cameras placed in opposite sides one can track the centre of the
receiver. But for tracking of any other point (other than centre) on the receiver, a calibration is
required. According to Kribus (2004), the log value of ratio of intensities of opposite cameras
follows a straight-line pattern (fig 4.8). Any point on the screen can be tracked by comparing
the ratio of Intensities of cameras placed in opposite sides with the calibration data.

The downside of this method is that calibration data is only valid for limited time, that’s why
multiple calibrations are required in a single day. So, the aim is to perform calibration without
any manual feedback and without any complication. For that a program was developed on
MATLAB to do standalone calibration. Calibration in x-axix is explained in following
paragraphs. The same logic plays while calibrating z-axis.

First, heliostat image starts at the centre of the screen (fig 4.15 (1)). The image is then projected
on the right side by moving heliosts motor in the same direction. The aim is to point the image
on the right-side camera (Camera 3, C3). For that, first it travels a safe distance toward right
such that it does not cross the screen i.e. heliostat angle value smaller (~0.5 degree) than J (fig
4.15 (2)). J is the heliostat angle value required to move the image from centre of the screen to
either of the sides. After that image is set to move in small steps of J/32(~14mm) in the right
side (fig 4.16 (1)). As image approaches the camera 3 (C3) the intensity value of image captured
by C3 increases. Heliostat is permitted to keep traveling in right direction until intensity pattern
changes that means the intensity starts to decreases. Image stops there and mark that as position
of C3. (fig 4.16 (2))
C4 C4

C1 C3 C1 C3

(1) C2 (2) C2

Figure 4.15: (1) Image pointing at the centre of the screen.

28
C4 C4

C1 C3 C1 C3

(1) C2 (2) C2
Figure 4.16: Heliostat calibration: Image searching for C3

Heliostat retrace its path to centre, travels the same amount of safe distance it did before now
in left direction (fig 4.17 (1)). It follows same logic as described above to find location of
camera 1 (C1). Once it reaches the intensity pattern start to decrease, it stops there and mark
that as position of C1 (fig 4.17 (2)).
C4 C4

C1 C3 C1 C3

(1) C2 (2) C2
Figure 4.17: Heliostat calibration: Image searching for C1
After obtaining position of both the cameras (C1 & C2) placed at opposite side on the X-axis.
The programme now divides the distance from C1-C3 into 10 parts and identify 11 positions
(9 internal + 2 camera position) (fig 4.18). Then it travels from C1 to C3 stopping at each of

29
the 9 positions. During this process image is captured by both cameras and average intensity
data is recorded.
C4

C1 C3

C2
Figure 4.18: Heliostat calibration: 11 identified positions for data collection
Calibration of Y-axis is also performed using same logic. The log value of the data is plotted
and the pattern is observed. The data is used for tracking different points of the screen. It is
done by comparing the intensity data during tracking to the calibration data.

4.7. Summary
This chapter explains the processes, systems, calculations etc, that are essential in the tracking.
Chapter starts with defining Geometry of Heliostat tracking in Spherical coordinates. Then all
three vectors -Sun, Mirror vector and Image vector, basics of heliostat tracking are defined
individually. While Sun vector is obtained from an empirical formula, other two are vectors
calculated based on geometry. Then Correction vector is calculated using geometry itself.

Basis of Open loop tracking is explained and its limitations is also mentioned. Then onwards
it was established that circumsolar regions intensity decrease as one go away from the core,
and the decrement is an exponential function.

Image processing algorithm is explained, it is a two-stage process in which first it detects the
required heliostat from an array of heliostat. Then it highlights only the mirror part of the
heliostat. From that average intensity of the heliostat mirror is calculated.

At the end, tracking logic is explained for closed loop tracking. In closed loop tracking, if one
wants to track centre of receiver then intensities of opposite cameras have to be compared.
While, if one wants to track any other point on receiver calibration have to be performed and
tracking is done by comparing calibration data and intensity ratios of opposite cameras.

30
Chapter 5. Results
This chapter present all the results and observation obtained during the project

Experiment was performed in multiple stages in order to obtain error and correction at different
stages. First stage was open loop tracking that is tracking heliostat on standalone sun equation

5.1. Open loop Heliostat tracking


In open loop tracking, there is no feedback vis-à-vis any error or position of projected image.
Mirror vector is calculated using fixed image vector and Sun vector obtained by Sun equation
(Reda,2008.).

The experiment was carried on 22 May 2017 between 3:10 PM and 5:30 PM, after 5:30 PM
the projected image crossed over screen as error in Z-axis exceeded J. As there was no feedback
significant error was expected. The correction in X-axis and Z-axis is between 0.07-0.25 degree
and 1.12 -1.17 degrees respectively (Table 5.1) In fig.5.1 error in both Z-axis and Z-axis are
plotted

TABLE 5.1: Classification of different tracking mechanism


Correction angles Error (degrees) Cumulative Error
(degrees) (degrees)
Time X-axis Z-axis X-axis Z-axis X-axis Z-axis
3:08:52 PM 0 0 0 0 0 0
3:13:52 PM 0.07 1.17 0.02 0.22 0.02 0.22
3:18:52 PM 0.08 1.16 0.02 0.12 0.03 0.34
3:23:52 PM 0.08 1.16 0.02 0.2 0.05 0.54
3:28:52 PM 0.08 1.16 0.01 0.29 0.06 0.83
3:33:52 PM 0.08 1.16 0.02 0.07 0.08 0.9
3:38:52 PM 0.09 1.15 0.02 0.14 0.1 1.03
3:43:52 PM 0.1 1.14 0.01 0.23 0.11 1.26
3:48:52 PM 0.11 1.15 0.02 0.15 0.14 1.41
3:53:52 PM 0.12 1.14 0.02 0.18 0.16 1.59
3:58:52 PM 0.13 1.15 0.02 0.12 0.17 1.71
4:03:52 PM 0.14 1.14 0.01 0.14 0.19 1.84
4:08:52 PM 0.14 1.14 0.02 0.13 0.2 1.97
4:13:52 PM 0.16 1.15 0.02 0.07 0.23 2.04
4:18:52 PM 0.16 1.14 0.02 0.27 0.24 2.31
4:23:52 PM 0.16 1.14 0.04 0.27 0.28 2.59
4:28:52 PM 0.18 1.14 0.03 0.27 0.31 2.86
4:33:52 PM 0.18 1.14 0.04 0.26 0.35 3.12
4:38:52 PM 0.19 1.13 0.02 0.25 0.37 3.37

31
Correction angles Error (degrees) Cumulative Error
(degrees) (degrees)
Time X-axis Z-axis X-axis Z-axis X-axis Z-axis
4:43:52 PM 0.2 1.14 0.03 0.24 0.43 3.50
4:48:52 PM 0.2 1.13 0.04 0.08 0.46 3.64
4:53:52 PM 0.21 1.14 0.04 0.06 0.5 3.7
4:58:52 PM 0.22 1.13 0.04 0.21 0.54 3.92
5:03:52 PM 0.22 1.13 0.05 0.06 0.59 3.97
5:08:52 PM 0.23 1.13 0.03 0.11 0.62 4.08
5:13:52 PM 0.23 1.13 0.04 0.25 0.66 4.33
5:18:52 PM 0.24 1.13 0.04 0.2 0.7 4.54
5:23:52 PM 0.25 1.13 0.06 0.24 0.76 4.77
5:28:52 PM 0.25 1.12 0.05 0.07 0.81 4.84

Error
0.35
0.3
Error (degree)

0.25
0.2
0.15
0.1
0.05
0
0 20 40 60 80 100 120 140 160
Time (min)

X-axis Z-axis

Figure 5.1: Instantaneous error through time

Cumilative Error
6
5
Error (degree)

4
3
2
1
0
0 20 40 60 80 100 120 140 160
Time (min)

X-axis Z-axis

Figure 5.2: Cumulative error vs time

32
The error value in the tracking is directly related to the correction value. If the sun position
changes with higher degree the correction value would also be higher logically. That will lead
to higher potential of error value.

In the experiment, the error value starts at zero because at the start of the experiment the
heliostat is positioned to reflect at centre of the screen. From then in each 5-min cycle, the error
was there in both axes. The Y-axis error was much more compared to X-axis because the
correction in Y-axis is much more than X-axis. Both errors were in positive direction (i.e. east
in x-axis and north in Y-axis). As the time progress the errors stack up and ends up resulting in
a significant image offset of the centre.

To put the error angles in perspective, a 50 error is roughly equal to J (half length of the screen
i.e. 900mm). So, error of 0.030 in X-axis will lead to 5.4mm on screen, similarly error of 0.20
in Y-axis will lead to 36mm of image offset. After 29 cycles, the image crossed the screen in
Y-axis.

5.2. Close loop Heliostat tracking


Closed loop tracking had two goals - first was to point image at the centre and track it over
time and second was to point at any point at the screen and track it over time.

5.2.3. Point image at the centre


For the first case, to point the image at the centre of the screen, experiment was carried out on
June 7, 3:45 PM onwards: The heliostat was first positioned to point at centre for initial Mirror
value After that program was run in loops of 5-min tracking is carried to keep the image at
centre. Total time taken by each iteration was 16.2 sec, i.e. 8.1 sec for each axis. Time taken in
each process is tabulated in table 5.2.

TABLE 5.2: Time taken by each process in closed loop tracking


Process Time (sec)
Image capturing 3.2
Image processing 2.4
Feedback 2.5
Total (X2) 16.4

The image was at the centre after each iteration, there was a little bias in x coordinate of -0.2
degrees (-36mm) fig (5.3), due to imperfect positioning of cameras. On average, each cycle
took around 4-5 iteration (64.8sec-81.6sec) to achieve minimum error limit i.e. J/128 =

33
7mm.The image was successfully kept at centre with the pre-mentioned error (fig 5.3). This
was expected as there is hardly any complexity in comparing two intensities. The error after
5cycles (around 30 min) was -0.23 degrees.

Figure 5.3: Heliostat pointing at centre of screen

5.2.4. Point image at random position on screen


Pointing at a random position on screen is much more complex than pointing at centre, in above
experiment two intensities have to be equated i.e. M1 =M3 or M1/ M3 = 1. But in this
experiment that logic does not hold. So, for this experiment calibration route have to be
followed and the data of log10 (M3/ M1) will be used for tracking of any point at the screen.
The logic of calibration is described in detail in section 4.3.

Calibration of the heliostat


The Calibration process involves pointing the target on one of the two axes at pre- determined
coordinates and recording the mean intensity values of the heliostat area. As the calibration
values changes multiple times in a day a MATLAB program was developed to carry out this
whole process without any manual feedback. The program identifies opposite cameras then
divide the distance between them in 10 parts, then it rotates the motor from position1 to position
11 and compute average intensity for each position. Then the log10 (M3 / M1) value at each
position used to compute correction angle. (in detail 4.5)

The calibration is performed 9th June after 4:00 PM, Total calibration time 104.4 sec. Time for
image processing did not add up it happened in parallel to feedback. Time taken in each process
is tabulated in table 5.3

34
TABLE 5.3: Time taken by each process in calibration (X=number of use)
Process Time (sec)
Image capturing (X11) 1.6
Feedback(X10) 2.5
Image processing(X0) 3.5
Camera(C2) position detection 24.6
Camera(C1) position detection 32.8
Total 101.4

Calibration data is tabulated in table 5.4., M1 represent intensity of camera 1 and M3 represent
intensity of opposite side camera 3. As expected M1 goes from highest to lowest see fig 5.4
(A1-A4) and 5.5 (A1-A4) as one move towards camera 3, exactly opposite trend is observed
for M3 data (fig 5.4 (A5-A8) and 5.5 (A5-A8)). Calibration data include 11 positions Only 8
out of 11 images are shown due to space constrain, position 5,6 &7 are not shown (position 1-
4 are fig 5.4 (A1-A4) & position 8-11 are fig 5.5 (A1-A4))). Images with B header are BW
image of respective A header images, BW represent the intensity values.

The table in-between the figure (fig 5.4 & fig 5.5) comprises the intensity data of each column
(1-4). In the pics, one can relate the brightness of heliostat and intensity value.
TABLE 5.4: Intensity data for calibration experiment X-axis
Position M1 M3 M3/M1 log(M3/M1)
-2 247 138.7 0.56 -0.25
-1.6 242 144.7 0.6 -0.22
-1.2 222.2 151.6 0.68 -0.17
-0.8 206.4 160.4 0.78 -0.11
-0.4 190.3 169.9 0.89 -0.05
0 179.9 182.2 1.01 0.01
0.4 169.5 194.5 1.15 0.06
0.8 162.4 209.3 1.29 0.11
1.2 149.3 224 1.5 0.18
1.6 140.1 241.5 1.72 0.24
2 134.2 251 1.87 0.27

35
A1 A2 A3 A4

B1 B2 B3 B4

247 242 222.2 206.4


Average intensities
138.7 144.7 151.6 160.4

B5 B6 B7 B8

A5 A6 A7 A8

Figure 5.4: Image captured during calibration

36
A1 A2 A3 A4

B1 B2 B3 B4

162.4 149.3 140.1 134.2


Average intensities
209.3 224 241.5 251

B5 B6 B7 B8

A5 A6 A7 A8

Figure 5.5: Image captured during calibration

37
The average intensity values are plotted against horizontal coordinates (fig 5.6) for both
cameras. The values follow the expected pattern at low intensity but at extreme end of high
intensity, values deviate from trend. As one can see in fig 5.6, M1 flattens as it goes from -1.5
to -2.0. The reasoning for that is – as maximum pixel value has a cap of 255, so when heliostat
reaches higher intensity, average value tends to saturate. This issue can be resolved by using a
denser glass cover over cameras.

Log values of ratio of intensities (log (M3/M1 vs x) plotted with the distance (fig 5.7), apart
from extreme end log values follow the straight line.

Average intensity vs x
300

250
Average intensity

200

150

100

50

0
-3 -2 -1 0 1 2 3

M1
X M3

Figure 5.6: Average intensity vs x

log(M3/M1 ) vs x
0.4
0.3
0.2
log(M3/M1)

0.1
0
-3 -2 -1 0 1 2 3
-0.1
-0.2
-0.3
x

Figure 5.7: log (M3/M1) vs x

Similar calibration was carried out for z axis, this experiment was carried after 25 min
(4:35PM), due to delay by cloud hindrance. As the Sun was setting the average intensities went
down a little. The average at centre went down from 180 to 168. In this the saturation effect
was low as maximum intensity was less. Although the pattern was more or less similar to the
x-axis calibration. Log data (fig 5.9) was used for tracking experiment.

38
TABLE 5.5: Intensity data for calibration experiment Z-axis
Position M1 M3 M3/M1 log(M3/M1)
-2 241.31 135.7 0.56 -0.25
-1.6 221.21 136.4 0.62 -0.21
-1.2 201.93 139.7 0.69 -0.16
-0.8 185.19 147.1 0.79 -0.1
-0.4 171.27 156.2 0.91 -0.04
0 163.2 167 1.02 0.01
0.4 160.07 179.6 1.12 0.05
0.8 150.59 194 1.29 0.11
1.2 142.18 210.3 1.48 0.17
1.6 137.67 228.7 1.7 0.23
2 135.11 249.5 1.82 0.26

Average intensity vs z
300
250
Average intensity

200
150
100
50
0
-3 -2 -1 0 1 2 3
z
M1 M3

Figure 5.8: Average intensity vs z-axis log

log(M3/M1) vs z
0.3

0.2

0.1
log(M3/M1)

0
-3 -2 -1 0 1 2 3
-0.1

-0.2

-0.3
y

Figure 5.9: (M3/M1) vs z

39
A second calibration was carried out one hour later to the first calibration on 9th June 5:00 PM.
The calibration results are tabulated in Table 5.6, and average intensity are plotted in fig. 5.10.
Data when compared to first calibration, many differences were found. First the flattening at
the edges is diminished because of the lower average sunlight. Average intensity at internal
points went down significantly, the average intensity at mid-point went down from 178 to 162.
Secondly, the log values (fig 5.11) also decrease, the effect was less in extreme values because
of the flattening while it was quite high in internal points. This is because the gradient of
intensity in circumsolar plot is not that high compared to earlier calibration.
TABLE 5.6: Intensity data for calibration experiment X-axis (2 nd calibration)

Position M1 M3 M3/M1 log(M3/M1)


-2 240.6 135.3 0.56 -0.25
-1.6 221.95 135.6 0.61 -0.21
-1.2 195.64 138.5 0.71 -0.15
-0.8 179.13 145.6 0.81 -0.09
-0.4 169.08 154.2 0.91 -0.04
0 160.76 164.5 1.02 0.01
0.4 157.39 176.6 1.12 0.05
0.8 151.32 190.5 1.26 0.1
1.2 142.72 206.3 1.45 0.16
1.6 138.24 224.2 1.62 0.21
2 137.49 244.5 1.78 0.25

Average intensity vs x
300
250
Average intensity

200
150
100
50
0
-3 -2 -1 0 1 2 3
z
M1 M3

Figure 5.10: Average intensity vs X-axis (2 nd calibration)

40
log(M3/M1) vs z
0.3
0.2
0.1
log(M3/M1)

0
-3 -2 -1 0 1 2 3
-0.1
-0.2
-0.3
y

Figure 5.11: log (M3/M1) vs x 2 nd calibration

Tracking of heliostat
As at the extreme end calibration data was not accurate tracking was not carried at any
peripheral point. First heliostat was positioned such that it projects image at the centre of screen
for initial feedback. Then tracking was done by comparing log value of the ratio of intensity to
the calibration data. Then, the heliostat was set to point image at (-600mm, -450mm). the error
recorded is tabulated in table 5.7. The data shows as the time lapses the error in tracking
increases. This is because as the time lapses the log values goes down so image tend to go away
from the centre of screen. This happens on opposite side also, i.e. the error increases in positive
direction if a point in the right half is tracked. Error in X-axis were more because the X-axis
calibration was carried out much earlier compared to Z-axis.is higher in X-axis.

TABLE 5.7: Error Data for Heliostat tracking of Point (-600mm, -450mm)

Cycle X-axis (error) X-axis (error) in Z-axis (error) Z-axis (error) in


in mm degree in mm degree
1 48 -0.04 21 -0.01
2 55 -0.05 26 -0.01
3 62 -0.05 29 -0.02
4 73 -0.06 35 -0.02
5 78 -0.07 37 -0.02

Experiment were tried after the 9th June 2017 but because of the clouds no significant data was
collected.
Although it was established that during clear sky, while tracking centre of the receiver, high
level of tracking accuracy can be achieved. But in the case of tracking other points on the
receiver surface, a calibration had to be carried out. The obtained calibration data tend to be
significantly different within 30 minutes of obtaining it. This change leads to a significant error
in tracking.

41
5.3. Summary
In this chapter, all the results and observation were presented. First result of Open loop tracking
was shown, in which tracking error of up to 0.25degree in X-axis and 1.17 in Z-axis. The
cumulative error after two and half hour was recorded 0.84degree in X-axis and 4.81 in Z-axis.

Experiment Results of Closed loop tracking were discussed. While the tracking of centre of
screen the error observed in tracking was 0.02 degree in X-axis and close to zero degree in Y-
axis. It was established that while tracking centre of the receiver during clear sky very high
level of accuracy can be achieved.

Calibration was performed for tracking of any point on the screen. Tracking was performed on
a point (-650mm,450mm) on the screen, it was observed that error increases as time goes. This
was because the calibration data lose its hold with time and new calibration is required. the
calibration data start to be false within 30 min of performing it

42
Chapter 6. Conclusion and future work

6.1. Conclusion
Precise tracking of heliostat is a must feature for maximum efficiency of solar thermal plant.
Open loop tracking is not suitable for mirror as a tiny amount of angular error in heliostat can
result in big image offset due to large distance between receiver and Heliostat. In Closed loop
tracking cyclic feedback is provided to heliostat controls system about the error, and the system
then s directed to the correct that error. The most precise Closed loop system yet developed
consists of four cameras located at receiver looking onto heliostats. Average intensity of those
image acquired from cameras is compared to compute error in heliostat tracking.

In this Project, an experiment was designed to carry out the four-camera closed loop tracking
system. Following objectives were achieved during project

1. A logic system was developed on MATLAB that can compare intensities of images
captured by four different cameras placed on each side of the screen. The system was
optimized such that it only takes in account the mirror surface neglection all the
surroundings whatever it is. Position of image (reflected by heliostat on the mirror) can
be identified, weather it is on the centre of screen or not.

2. A tracking logic was developed that can point at center of the screen and track it with
time. This was achieved by equating intensity values of images acquire by cameras
places at opposite sides. Tracking involved iteration that minimizes error in each cycle,
usually 4-5 iteration were needed in this experiment to track the system the time taken
in one tracking cycle was around 65-80 sec, this time can be reduced drastically by
using better computing processor.

3. A calibration system was developed to compute the ratio of image intensities acquired
from opposite cameras. The log value of that ratio follows a straight-line pattern. The
data then used for tracking different points of the screen by equating the current
intensity ratios to the calibration data. The error within 30 minutes of the tracking to
the calibration time was detected below 0.03 degrees. Although, error was continuously
increasing with the time.

4. During tracking of center of the screen tracking errors of less than 0.1mrad (0.02
degrees) were observed. Although the limit of 0.1mrad couldn’t be satisfied while

43
tracking different points of receiver. The limit was only valid up to a limited time after
calibration

6.2. Future work


1. Validity of calibration was not tested as robustly as it should be. More experiment
should be carried out to test the time validity of the calibration data.

2. The system becomes handicapped once the cloud come, there was no backup logic
designed to overcome this problem. Work should be done to address this problem

3. Although the logic allows to track more than one heliostat in the field, but this was not
tested during my work, further experiment would be needed to prove this

44
References
Baheti, R. S. (1980). Design of Self-calibrating Controllers for Heliostats in a Solar Power Plant. IEEE
Transactions on Automatic Control (25.6), 1091-1097.
Camacho, E. F. (2012). Advances in Industrial Control. In Control of Solar Energy Systems (pp. 50-
69).
Clifford MJ, E. D. (2004). Design of a novel passive solar tracker. Solar Energy(77.3), 269-280.
Convery, M. (2010). System and Method for Aligning Heliostats of a Solar Power Tower. US Patent
Application , 0252024 A1.
De Rosa, A. V. (2005). In Fundamentals of renewable energy processes. Academic Press, Inc., Stanford
University.
Grena, R. (2007). An Algorithm for the Computation of the Solar Position. Solar Energy(82.5), 462-
470.
Jones, S. S. (1999). Analysis of Strategies to Improve Heliostat Tracking at Solar Two. Sandia National
Lab., Albuquerque, NM, US.
Konstantin, P. K. (2010). Assessment of Technology Options for Development of Concentrating Solar
Power in South Africa for the World Bank. Johannesburg: Fichtner GmbH & Co.
Kribus, A. Y. (2003). Continuous Tracking of Heliostats. International Solar Energy Conference
Proceedings. Journal of solar energy engineering (126.3), 842-849.
L. A. Díaz-Félix, M. E.-T.-D.-B. (2013). Evaluation of heliostat field global tracking error distributions
by Monte Carlo simulations. Energy Procedia (49), 1308-1317.
Lee, C. Y. (2009). Sun Tracking Systems: A Review. Sensors (9.5), 3875-3890.
Lipps F.W., V.-H. L. (1978). A cell wise method for solar central receivers systems. Solar energy(20),
505-516.
Mousazadeh, H. K. (2009). A Review of Principle and Sun-tracking Methods for Maximizing Solar
Systems Output. Renewable and Sustainable Energy Reviews(13.8), 1800-1818.
Pfahl, A. B. (2009). Method for controlling the alignment of a heliostat with respect to a receiver,
heliostat device and solar power plan. US Patent 0249787 A1.
Quero, J. M. (2007). Tracking Control System Using an Incident Radiation Angle Microsensor. IEEE
Transactions on Industrial Electronics. (54.2), 1207-1216.
Ravindra. (2015). Design and Development of Self Learning Heliostat Control. Mtech Project Report:
Indian Instituite of Technology, Bombay.
Reda, I. a. (2008). Solar Position Algorithm for Solar Radiation Applications. Solar energy (76.5), 560-
573.
Research and Innovation- csp power plant. (2017, july 3). Retrieved from European Commission:
https://ec.europa.eu/research/energy/eu/images/research/csp/power_plant.jpg
Roos, T. Z. (2007). A 25m2 Targetaligned Heliostat with Closed-Loop Control. SES Solar World
Congress(Vol. I–Vol. V), 1773-1781.
Rubio, F. O.-M. (2007). Application of new control strategy for sun tracking. Energy Conversion and
Management (48.7), 2174-2184.

45
Sieminski, A. (2011). International energy outlook. Retrieved from EIA:
http://www.eia.gov/forecasts/ieo/
Sushant. (2015). Design and Development of Feedback Control for Heliostat. Mtech Project Report:
Indian Instituite of Technology, Bombay.
Yogev, A. K. (1999). Control of a Heliostat Field in a Solar Energy Plant. U.S. Patent No. 5,862,799,
Washington, DC: U.S. Patent and Trademark Office.

46
Appendix 1-Test Setup and Technical Datasheet
A1.1. Receiver
Table A1.1: Receiver details
Breadth 1.83 m
Height 1.83 m
Thickness 6 mm
Azimuth rotation Available
Elevation rotation Available
Material Plywood
Colour Black

A1.2. Heliostat
Table A1.2: Heliostat details

Material Mild steel


Mirror 254*254 sq.mm
Azimuth axis motor NEMA size 23 bipolar stepper
Altitude axis motor NEMA size 23 bipolar stepper
Holding torque 64 Kg-cm
Offset 7.5 cm
Bracing plate thickness 8 mm
Azimuth motor shaft Type A
Altitude axis shaft Type B (two ended)
Azimuth reference -90 ֯
Altitude reference -1 ֯
Pedestal tilt error about N-S 5֯
Pedestal tilt error about E-W 80֯

47
A1.3. Driver
Table A1.3: Micro stepping driver details
Name Leadshine M542
Output current 1.0-4.2 A (peak)
Supply voltage 20-50 V DC
gic signal current 7-16 mA
Isolation resistance 500 MΩ
Weight 280 grams
Pulse frequency 300 KHz
Micro step 2-125
Enable Available

A1.4. Stepper Motor

Figure A1.1 :Technical details of NEMA 23 bipolar stepper motor

48
Appendix 2 - MATLAB Programming

Functions were written in MATLAB to achieve the objective of providing corrections in


altitude and azimuth angles to the modified heliostat controller. All the codes are included as
appendix. Stage wise functions are mentioned as follows

a) Initialization

a. Windowpos to manually define mask image.

b. Auto track to provide initial mirror vector value.

b) process

a. suncalc to get solar vector

b. autotrack1 to obtain mirror vector


c. logleangth calibration in x axis
d. logheight calibration in z-axis
e. avgint average intensity value

c) Detection

a. Get image to obtain image from cameras

b. Print image to plot the location on a scaled image to target for easy visual
verification of detection.

d) Main controls

a. Tracking4gui track in Realtime, take feedback of position to track.

e) Transmitting corrections

a. feedback forms the backbone and uses all functions involved in detection and
correction and transmits the results in an iterative fashion. It also serves to detect
inconsistencies in the corrections and stops transmission.

49
Main code
function [M,d,g] = tracking4gui(d,g,p,q)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
flag=0;x=0;
%p,q values
%%%%%%%%%%%%%

%define half screen value


[M,T,S,L1,H2] =autotrack(0);
F=[asind(92/L1) 0]; %half leangth angle

[V1,V3] = getimage1();

%%%%%%%%%%%%%%%%%%%%%%%%%%%%window%%%%%%%%%%%%%
[ c1,r1,c2,r2,c3,r3,c4,r4] = windowpos();
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%[avg2]
=avgint(V2,c2,r2);[avg4] =avgint(V4,c4,r4);

[avg1] =avgint(V1,c1,r1);

[avg3] =avgint(V3,c3,r3);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ratio = avg1/avg3;

%%%%%%%%%%%%%%%%%flag 0%%%%%%%%%%%%%%%%%%%%%%%%%%%
if ratio > p && flag==0 %projection is in left half
y=16; %dividing ratio
[M,ratio,d ] = core(x,y,F,d );
if ratio < 1
flag=1;
end
end

if ratio < p && flag==0 %projection is in right half


y=16; %dividing ratio
F=-[asind(92/L1) 0];
[M,ratio,d ] = core(x,y,F,d );
if ratio > 1
flag=1;
end
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%flag1%%%%%%%%%%%%%%%%%%%%%%%%%
if ratio > p && flag==1 %projection is in left half
y=32; %dividing ratio
[M,ratio,d ] = core(x,y,F,d );
if ratio < 1
flag=2;

end
end

50
if ratio < p && flag==1 %projection is in right half
y=32; %dividing ratio
F=-[asind(92/L1) 0];
[M,ratio,d ] = core(x,y,F,d );
if ratio > 1
flag=2;
end
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
flag=0;x=0;
%%%%%%%%%%%%%

%define half screen value


[M,T,S,L1,H2] =autotrack(0);
F=[0 asind(92/L1)]; %half leangth angle

[V2,V4] = getimage2();

%%%%%%%%%%%%%%%%%%%%%%%%%%%%window%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%[avg2]
=avgint(V2,c2,r2);[avg4] =avgint(V4,c4,r4);

[avg2] =avgint(V2,c2,r2);

[avg4] =avgint(V4,c4,r4);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ratio = avg4/avg2;

%%%%%%%%%%%%%%%%%flag 0%%%%%%%%%%%%%%%%%%%%%%%%%%%
if ratio > q && flag==0 %projection is in left half
y=16; %dividing ratio
[M,ratio,g ] = core2(x,y,F,g );
if ratio < 1
flag=1;
end
end

if ratio < q && flag==0 %projection is in right half


y=16; %dividing ratio
F=-F
[M,ratio,g ] = core2(x,y,F,g );
if ratio > 1
flag=1;
end
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%flag1%%%%%%%%%%%%%%%%%%%%%%%%%

51
if ratio > q && flag==1 %projection is in left half
y=32; %dividing ratio
[M,ratio,g ] = core2(x,y,F,g );
if ratio < 1
flag=2;

end
end

if ratio < q && flag==1 %projection is in right half


y=32; %dividing ratio
F=-[asind(92/L1) 0];
[M,ratio,g ] = core2(x,y,F,g );
if ratio > 1
flag=2;
end
end

Windowpos (mask values)

function [ c1,r1,c2,r2,c3,r3,c4,r4] = windowpos()


c1 = [335 365 365 335 ]; %position with respect to camera 1
r1 = [243 243 213 213 ];

c2 = [250 250 300 300 ]; %position with respect to camera 2


r2 = [190 190 140 140 ];

c3 = [325 375 375 375 ]; %position with respect to camera 3


r3 = [250 250 200 200 ];

c4 = [220 270 270 220 ]; %position with respect to camera 3


r4 = [315 315 265 265 ];

end

Autotrack

%get Sun vector


S= suncalc();

% S =[243.2893 14.9245];

% get image vector


% d= 10000; %distance between centre of screen and heliostat pivot
% h= 2460-(900+185); %relative height of screen
% az = 183.8; %azimuth angle fixed
%
% %change
% x=35;
% y=25;
%
% T=[(183.8+asind(x/d)) (90-asind((x+h)/d))];

52
T =[183.8 82.1];

c = (7.5/1010);

for i= 1:10000
M = (0.5*(S+T));
L1 =10000-(75*cosd(M(1)-183.8)*cosd(90-M(2))); %real leagnth between
centre of mirror and centre of screen
H1 =1085+75*cosd(M(1)-183.8)*sind(90-M(2)); %real height of center of
mirror
H2=2400-H1; %real relative height of
center of mirror
T(2)= 90-asind(H2/L1);
K1= 75*cosd(90-M(2))*sind(M(1)-183.8);
T(1)=183.8-asind(K1/L1);

end
M=round(M*100)/100;

end

Suncalc

function [S,Az,El] = suncalc1(x)


%%
%% Begin Code Sequence

T = now ;
T1=T-0.229167-x;
UTC = datestr(T1,'yyyy/mm/dd HH:MM:SS');
t = datestr(T1+0.22917,'yyyy/mm/dd HH:MM:SS');

Lat=19.135;
Lon=72.919;
Alt=0;
%compute JD from UTC or datevec
if ischar(UTC)
jd = juliandate(UTC,'yyyy/mm/dd HH:MM:SS');
else
[y,mo,d,h,mi,s] = datevec(UTC);
jd = juliandate(datestr([y,mo,d,h,mi,s],'yyyy/mm/dd
HH:MM:SS'),'yyyy/mm/dd HH:MM:SS');
end
d = jd-2451543.5;

% Keplerian Elements for the Sun (geocentric)


w = 282.9404+4.70935e-5*d; % (longitude of perihelion degrees)
%a = 1.000000;% (mean distance, a.u.)
e = 0.016709-1.151e-9.*d;% (eccentricity)
M = mod(356.0470+0.9856002585.*d,360);% (mean anomaly degrees)
L = w + M; %(Sun's mean longitude degrees)
oblecl = 23.4393-3.563e-7.*d; %(Sun's obliquity of the ecliptic)

%auxiliary angle

53
E = M+(180/pi).*e.*sin(M.*(pi/180)).*(1+e.*cos(M.*(pi/180)));

%rectangular coordinates in the plane of the ecliptic (x axis toward


%perhilion)
x = cos(E.*(pi/180))-e;
y = sin(E.*(pi/180)).*sqrt(1-e.^2);

%find the distance and true anomaly


r = sqrt(x.^2 + y.^2);
v = atan2(y,x).*(180/pi);

%find the longitude of the sun


lon = v + w;

%compute the ecliptic rectangular coordinates


xeclip = r.*cos(lon.*(pi/180));
yeclip = r.*sin(lon.*(pi/180));
zeclip = 0.0;

%rotate these coordinates to equitorial rectangular coordinates


xequat = xeclip;
yequat = yeclip.*cos(oblecl.*(pi/180))+zeclip*sin(oblecl.*(pi/180));
zequat = yeclip.*sin(23.4406.*(pi/180))+zeclip*cos(oblecl.*(pi/180));

%convert equatorial rectangular coordinates to RA and Decl:


r = sqrt(xequat.^2 + yequat.^2 + zequat.^2)-(Alt./149598000); %roll up the
altitude correction
RA = atan2(yequat,xequat).*(180/pi);
delta = asin(zequat./r).*(180/pi);

%Following the RA DEC to Az Alt conversion sequence explained here:


%http://www.stargazing.net/kepler/altaz.html

%Find the J2000 value


%J2000 = jd - 2451545.0;
hourvec = datevec(UTC);
UTH = hourvec(:,4) + hourvec(:,5)/60 + hourvec(:,6)/3600;

%Calculate local siderial time


GMST0=mod(L+180,360)./15;
SIDTIME = GMST0 + UTH + Lon./15;

%Replace RA with hour angle HA


HA = (SIDTIME.*15 - RA);

%convert to rectangular coordinate system


x = cos(HA.*(pi/180)).*cos(delta.*(pi/180));
y = sin(HA.*(pi/180)).*cos(delta.*(pi/180));
z = sin(delta.*(pi/180));

%rotate this along an axis going east-west.


xhor = x.*cos((90-Lat).*(pi/180))-z.*sin((90-Lat).*(pi/180));
yhor = y;
zhor = x.*sin((90-Lat).*(pi/180))+z.*cos((90-Lat).*(pi/180));

%Find the h and AZ


Az = atan2(yhor,xhor).*(180/pi) + 180;
El = asin(zhor).*(180/pi);
S = [Az,90-El];

54
S=round(S*100)/100;
end

function jd = juliandate(varargin)
% This sub function is provided in case juliandate does not come with your
% distribution of Matlab
[year month day hour min sec] = datevec(datenum(varargin{:}));
idx = month <= 2;
year(idx) = year(idx)-1;
month(idx) = month(idx)+12;
jd = floor( 365.25*(year + 4716.0)) + floor( 30.6001*( month + 1.0)) + 2.0
- ...
floor( year/100.0 ) + floor( floor( year/100.0 )/4.0 ) + day - 1524.5 +
...
(hour + min/60 + sec/3600)/24;
End

Autotrack1
function [M,T,S,L1,H2] = autotrack1(x)

S= suncalc1(x);

% S =[243.2893 14.9245];
E=[0 0]; %so that (0) can work
T =[182 7.9];
% T=T-E;

c = (7.5/1010);

for i= 1:1
M = (0.5*(S+T)); % ideal case
L1 =1000-(7.5*cosd(M(1)-182)*cosd(M(2))); % real leangth between screen
and mirro
H1 =108.5+7.5*cosd(M(1)-182)*sind(M(2)); % real leangth of mirror centre
H2=240-H1; % real relative height of
screen centre
T(2)= 90-asind(H2/L1)+E(2);
K1= 7.5*cosd(M(2))*sind(M(1)-182);
T(1)=T(1)-asind(K1/L1);

end
M=round(M*100)/100;

End

Loglength
%this function is used for calibration of x axis of the
heliost%%%%%%%%%%%%%%

[ c1,r1,c2,r2,c3,r3,c4,r4] = windowpos();
[M,T,S,L1,H2] =autotrack(0);
F=[asind(92/L1) 0]; %half-length angle

55
M=M+F+d;
feedback1(M); pause(2);

[V1,V3] = getimage1();
[avg3] =avgint(V3,c3,r3);
P=avg3-10;

%%%%%%%%%%%%%%%right extreme%%%%%%%%%%%%%%

i=0;

while i==0
feedback1(M); pause(2);
[V1,V3] = getimage1();
[avg3] =avgint(V3,c3,r3);

if avg3 < P
L2=M;
break
end
M=M+ F/32;
P=avg3;
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

M=L2-(2*F);
feedback1(M); pause(2);
[V1,V3] = getimage1();
[avg1] =avgint(V1,c1,r1);
P=avg3-10;

while i==0
feedback1(M); pause(2);
[V1,V3] = getimage1();
[avg1] =avgint(V1,c1,r1);

if avg3 < P
L1=M;
break
end
M=M+ F/32;
P=avg3;
end

gap=(L2-L1)/10;
logleangth = zeros(1,11);

for i=1:11
feedback1(M); pause(2);
[V1,V3] = getimage1();

56
[avg1] =avgint(V1,c1,r1);
[avg3] =avgint(V3,c3,r3);
logleangth(i)= avg1/avg3;
M=M+gap;

end

X=1:1:11;

plot(X,Log10(logleangth))

M=M-F;
feedback1(M);

logheight

%this function is used for calibration of z axis of the


heliost%%%%%%%%%%%%%%

[ c1,r1,c2,r2,c3,r3,c4,r4] = windowpos();
[M,T,S,L1,H2] =autotrack(0);

F=[0 asind(92/L1)]; %half-length angle

M=M+F+d;
feedback1(M); pause(2);

[V2,V4] = getimage2();
[avg4] =avgint(V4,c4,r2);
P=avg4-10;

%%%%%%%%%%%%%%%right extreme%%%%%%%%%%%%%%

i=0;

while i==0
feedback1(M); pause(2);
[V2,V4] = getimage2();
[avg4] =avgint(V4,c4,r4);

if avg4 < P
L2=M;
break
end
M=M+ F/32;
P=avg4;
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

57
M=L2-(2*F);
feedback1(M); pause(2);
[V2,V4] = getimage2();
[avg2] =avgint(V2,c2,r2);
P=avg4-10;

while i==0
feedback1(M); pause(2);
[V2,V4] = getimage2();
[avg2] =avgint(V2,c2,r2);

if avg2 < P
L1=M;
break
end
M=M+ F/32;
P=avg;
end

gap=(L2-L1)/10;
logheight = zeros(1,11);

for i=1:11
feedback1(M); pause(2);
[V2,V4] = getimage2();
[avg2] =avgint(V2,c2,r2);
[avg4] =avgint(V4,c4,r4);

logheight(i)= avg2/avg4;
M=M+gap;

end
X=1:1:11;

plot(X,Log10(logheight));

M=M-F;
feedback1(M);

avgint
% function [avg ] =avgint( I,c,r)

% I=imread('pic10.png');
c = [333 363 363 333]; %window (mask) position of screen
r = [332 332 302 302 ];

%%% getting image filtering heliostat window(mask) position %%%

I2=rgb2gray(I); % convert to black and white


BW = roipoly(I,c,r); %mask formation
BW=imcomplement(BW); %correcting mask by inverting it
I3=regionfill(I2, BW); %mask over BW image

58
% I4=bwareaopen(I4,(100)); % removing any small objects if needed
level = graythresh(I3); % getting threshold value
BW2 = im2bw(I3,level); % binary image based on threshold value for
refrence

%%% getting image filtering threshold value %%%

count =0;
d=size(BW);
I4=zeros(d);

for i=1:d(1)
for j=1:d(2)

if BW2(i,j) >0
I4(i,j)=I3(i,j);
count=count+1;
end
end
end

ratio=(d(1)*d(2)/count);

avg=(mean(mean(I4))*ratio);
%end

printimage

function printimage(P1,P2)

% P1=49;
% P2=50.5;
screen=zeros(400,400); %screen size

for i=197:203 %centre dot


for j=197:203
screen(i,j)=100;
end
end

for i = 1:9
k=40*i;
screen(:,k)=100;

end
for i = 1:9
k=40*i;
screen(k,:)=100;
end

59
for i=1:21
for j=1:21
k=round((P1*3.9216)-10+i);
l=round((P2*3.9216)-10+j);
screen(400-l,k)=100;
end

end

imtool(screen)

end

feedback

function [] = feedback1(a)

delete(instrfindall);
clear arduino
clear arduino1

arduino=serial('COM7','BaudRate',9600); % create serial communication


object on port COM4

fopen(arduino);
pause(1)
% a=[206.99 65.36];

input1=strcat(num2str(a(1)),',',num2str(a(2)),'-');
% input1=str2double(input1);

flushoutput(arduino);

fprintf(arduino,'%c',input1);
% fprintf(arduino,'%f\n',input1);
pause(2)

fclose(arduino);
delete(arduino);
clear arduino;
%
%
% S=str2num(fscanf(arduino1)); %#ok<ST2NM>
% pause(1)
%
%
% fclose(arduino1);
% delete(arduino1);
% clear arduino1;

End

60
Acknowledgment
I would like to express my utmost gratitude to Professor Shireesh Kedare and Professor Harish
Pillai for their invaluable guidance, motivation and mentorship. I would like to thank Mr
Keshav Kale, Mr Amar Singh Kharte and Mr. Chetan Karanjkar for utmost help in experiment
setup. Lastly, hearty thanks to Sushant for his relentless support and suggestion at the time of need
toward successful completion of this work. I would like to thanks to Ravindra Kumar (2013
Mtech), and Sushant Mandhaniya (2013 Mtech) for sharing their project experience.

Lastly, hearty thanks to Lokesh Dhundara (2012 DD), for his relentless support and suggestion at
the time of need toward successful completion of this work.

61

You might also like