å=bãÄÉĮĮÉĮ=fåíÉę~ÅíáîÉ=jįåáíįęáåÖ=póëíÉã=Ņįę

=
=
=
â~ëëÉä=
ìåáîÉêëáíó=
=
éêÉëë=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
^å=bãÄÉÇÇÉÇ=fåíÉê~ÅíáîÉ=jçåáíçêáåÖ=póëíÉã=Ñçê=msJaáÉëÉä=
eóÄêáÇ=mä~åíë=áå=oìê~ä=^êÉ~ë=
Boonyang Plangklang
Die vorliegende Arbeit wurde vom Fachbereich Elektrotechnik/Informatik der Universität Kassel als
Dissertation zur Erlangung des akademischen Grades eines Doktors der Ingenieurwissenschaften (Dr.-Ing.)
angenommen.
Erster Gutachter: Prof. Dr.-Ing. Jürgen Schmidt
Zweiter Gutachter: Prof. Dr.- Ing. Albert Claudi
Tag der mündlichen Prüfung
Bibliografische Information Der Deutschen Bibliothek
Die Deutsche Bibliothek verzeichnet diese Publikation in der Deutschen
Nationalbibliografie; detaillierte bibliografische Daten sind im Internet über
http://dnb.ddb.de abrufbar
Zugl.: Kassel, Univ., Diss. 2005
ISBN 3-89958-128-8
URN urn:nbn:de:0002-1280
© 2005, kassel university press GmbH, Kassel
www.upress.uni-kassel.de
Umschlaggestaltung: 5 Büro für Gestaltung, Kassel
Druck und Verarbeitung: Unidruckerei der Universität Kassel
Printed in Germany
4. Februar 2005
Acknowledgements
A fundamental and unique debt is owed to Rajamangala University of Technology
(RMUT), (former was Rajamangala Institute of Technology, RIT), Thailand, which has
granted me the financial support for this thesis. I am most grateful and highly
indebted to Prof. Dr.-Ing. Jürgen Schmid for his valuable supervision, guidance, and
encouragement throughout the whole work.
My gratitude is also due to Prof. Albert Claudi for his strong support and useful
discussions throughout this thesis.
The main part of research has been done at the Department of Efficient Energy
Conversion (IEE-RE), University of Kassel, Germany, thus my thanks are expressed
to the research staffs and colleagues of IEE-RE.
To my family and friends, thanks for always being with me and for the love and
understanding.
Boonyang Plangklang
iii
Abstract
Autonomous PV-Diesel hybrid power supply systems are installed worldwide to
supply electricity in remote and rural areas where no grid exists and where
accessibility is often difficult. In this environment, it is also difficult to properly monitor
the PV-Diesel hybrid systems in a conventional way.
In order to keep the PV diesel hybrid system working properly and reliably, it is
necessary to include a monitoring system. The thesis will describe an interactive web
based technology with embedded Linux system for remote monitoring of the PV
diesel hybrid system.
In most remote monitoring systems, the information is collected from the remote
station to a master station. Most photovoltaic systems undergo some types of
monitoring at least a few years after their installation. Common systems in such rural
areas are supervised by yearly visits in conjunction with a data logger. Over the
lifetime of a system, the costs for supervision often significantly exceed the cost of
the system itself. Response time for maintenance, repair, and product improvements
are poor. There are already some other monitoring systems which have been
presented earlier such as SCADA (Supervision Control and Data Acquisition) or even
satellite-based systems. However, the recognized problems for those methods are:
high investment cost, needs for special software for client stations, and difficulty with
communication links.
Using the internet for monitoring is another option that becomes feasible lately.
However, to implement the internet with the hybrid system in remote and rural areas
is still inefficient in both technical terms and economical terms. Because of the
problem that there is no telephone line coverage and internet connection in remote
areas. Moreover, a typical computer for a web server consumes much energy.
To overcome these disadvantages, an embedded Linux module with an interactive
monitoring website has been investigated and developed in this thesis. It is a smallembedded Linux module for an Apache web server with an extremely low powerinput required. The embedded module provides a common web server and data
acquisition unit. The monitoring database can be stored in the web server and
connected to a workstation by a GSM modem. The communication will be based
upon GSM technology. The monitoring database can be accessed via a standard
web browser. When accessing the website, the operator can download monitored
data as well as upload important parameters to the system.
With the implementation of embedded web based technologies, investigations on
both, initial investment costs and running costs of monitoring system have been
performed. The ability to access the data and to change operation parameters online
via a standard web browser has been implemented.
The results of the implementation on the embedded Linux interactive monitoring
system will be considered as criteria to prove itself whether it is a suitable solution for
remote monitoring where there is a lack of infrastructure. The monitored data will be
analyzed to investigate the behavior of the PV diesel hybrid system in order to
optimize and improve the system.
iv
Zusammenfassung
Netzautarke PV-Diesel-Hybridsysteme sind weltweit installiert worden, um abgelegene
und ländliche Regionen mit elektrischer Energie zu versorgen, die weder über einen
Anschluss an ein elektrisches Energieversorgungsnetz noch über ein Telefonnetz
verfügen und die zudem oft schwer erreichbar sind. Noch immer ist es schwierig, diese
PV-Diesel-Hybridsysteme zu regeln und einen guten und zuverlässigen Betrieb
aufrechtzuerhalten.
Um ein PV-Diesel-Hybridsystem stabil und zuverlässig zu betreiben, ist es notwendig,
ein Überwachungssystem zu integrieren. In dieser Arbeit wird eine interaktive,
webbasierte Technik mit einem eingebetteten Linuxsystem für den Einsatz als
Fernüberwachung in einem PV-Diesel-Hybridsystem untersucht und entwickelt.
In den meisten Fernüberwachungssystemen werden die im überwachten System
aufgezeichneten Daten an ein Mastersystem weitergegeben. Die meisten PV-Systeme
werden
in
den
ersten
Jahren
nach
ihrer
Installation
verschiedenen
Überwachungsprozeduren unterzogen. Im Allgemeinen werden die Systeme in solchen
abgelegenen Gebieten in jährlichem Abstand mittels durchgeführter Kontrollbesuche in
Verbindung mit einem Datenlogger überwacht. Während der Lebensdauer der
Hybridsysteme übertreffen die Kosten für die durchgeführte Wartung und Vermessung
häufig deutlich die Kosten für die Systeme selbst. Die realisierbaren Reaktionszeiten für
Wartung, Reparatur und Systemverbesserungen sind in der Regel nicht
zufriedenstellend. Es existierten bereits früher präsentierte Überwachungssysteme wie
SCADA (Supervision Control and Data Acquisition) oder satellitengestützte Systeme.
Allerdings weisen diese Systeme bedeutende Nachteile auf: hohe Investitionskosten,
notwendige Anschaffung spezieller Software für die Clientsysteme und Probleme mit der
Kommunikation.
In jüngster Zeit ist als weitere Option die Nutzung des Internet zur Überwachung
hinzugekommen. Dennoch ist eine Implementierung des Internet in das Hybridsystem in
abgelegenen Gegenden sowohl in technischer als auch in ökonomischer Hinsicht noch
immer ineffizient, da vor Ort häufig weder eine Infrastruktur mit Telefonleitungen noch mit
Internetverbindungen existiert. Zudem benötigen handelsübliche Computer für
Webserver viel Energie.
Um diese Nachteile zu überwinden, wurde in dieser Arbeit ein eingebettetes Linuxmodul
mit einer interaktiven Überwachungswebsite untersucht und entwickelt. Es handelt sich
um ein kompaktes eingebettetes Linuxmodul für einen Apache Webserver mit sehr
geringem Energieverbrauch. Das eingebettete Modul stellt einen gewöhnlichen
Webserver und eine Datenerfassungseinheit bereit. Die aufgenommenen Daten können
in dem Webserver gespeichert werden und über ein GSM-Modem an eine Workstation
angeschlossen werden. Die Kommunikation basiert auf GSM-Technik. Auf die
Überwachungsdatenbank kann mit Hilfe eines Standard-Webbrowsers zugegriffen
werden. Während des Zugriffs auf die Webseite kann der Nutzer sowohl die
gespeicherten Daten herunterladen als auch wichtige Parameter an die
Systemkomponenten übertragen.
Mit der Implementierung, basierend auf eingebetteter Webtechnologie, wird der Einfluss
auf die Investitionskosten und die laufenden Kosten des Datenerfassungssystems
untersucht. Die Möglichkeit des Zugriffs auf die aufgezeichneten Daten und des Eingriffs
in Systemparameter online über einen Webbrowser wird ebenfalls implementiert, um die
Funktion des Überwachungssystems aufzuzeigen.
Die Ergebnisse der Implementierung in dem eingebetteten interaktiven LinuxÜberwachungssystem werden als Kriterium dafür herangezogen, ob es sich dabei um
eine geeignete Lösung zur Fernüberwachung abgelegener Systeme handelt. Die
aufgezeichneten Daten werden analysiert, um das Verhalten des PV-DieselHybridsystems im Hinblick darauf zu untersuchen, wie das System zukünftig verbessert
werden kann.
v
Contents
Chapter 1 Introduction….................................................................................... 1
1.1 Photovoltaics (PV) and trends .......................................................... 1
1.1.1 Development of costs over time.............................................. 3
1.2 Hybrid systems for rural and remote electrification ....................... 5
1.3 Monitoring of hybrid systems ........................................................... 6
1.4 Research objectives and methodology............................................ 7
1.4.1 Objectives ............................................................................... 7
1.4.2 Tools ....................................................................................... 8
1.4.3 Work Structure........................................................................ 9
Chapter 2 PV-diesel hybrid system technology............................................... 10
2.1 Introduction ........................................................................................ 10
2.2 System components .......................................................................... 12
2.2.1 Photovoltaic (PV) modules...................................................... 12
2.2.2 Battery Staorage .................................................................... 19
2.2.2.1 The lead-acid Batteries ............................................ 19
2.2.2.2 State of Charge (SOC) .............................................. 22
2.2.2.3 Gassing ..................................................................... 23
2.2.2.4 Freezing of electrolyte ............................................... 24
2.2.2.5 Cycle life of lead-acid batteries ................................ 25
2.2.2.6 The battery capacity .................................................. 25
2.2.2.7 Requirements for Solar batteries............................... 26
2.2.3 The Fuel Generator ................................................................ 28
2.2.4 Inverters for AC-coupled Hybrid systems................................ 31
2.3 Typical electricity demands in rural areas ....................................... 32
2.4 Energy losses of Hybrid systems ..................................................... 35
2.4.1 Capture losses........................................................................ 35
2.4.2 System losses......................................................................... 36
2.5 Overview of the Hybrid system selected for the project................. 38
2.6 Summary............................................................................................. 40
Chapter 3 Embedded Linux Module: software and hardware......................... 41
3.1 Introduction ........................................................................................ 41
3.2 Introduction to the operating system ............................................... 41
vi
3.3 Critisism of the operating systems .................................................. 41
3.4 Embedded operating system ............................................................ 42
3.5 Why Linux? ........................................................................................ 42
3.6 Embedded Linux ................................................................................ 43
3.7 Embedded Linux for the project ....................................................... 44
3.7.1 Embedded Linux requirements............................................... 44
3.7.2 Project requirements .............................................................. 45
3.7.3 Embedded Linux Selection..................................................... 46
3.8 Embedded Hardware Selection ........................................................ 47
3.9 Qverview of the web server .............................................................. 49
3.10 Hyper Text Transfer Protocol (HTTP)............................................. 50
3.11 HTML Document .............................................................................. 52
3.12 PHP Language ................................................................................. 52
3.13 Apache web server .......................................................................... 54
3.14 Summary .......................................................................................... 56
Chapter 4 The interactive monitoring website for the hybrid system ........... 57
4.1 Introduction........................................................................................ 57
4.2 Concept of monitoring by website ................................................... 57
4.3 Monitoring system components....................................................... 58
4.3.1 Monitoring unit........................................................................ 58
4.3.2 Data acquisition unit ............................................................... 59
4.3.3 Communication unit................................................................ 59
4.4 Monitored data and storage.............................................................. 59
4.5 Overview of the communication network ........................................ 60
4.5.1The Open Systems Interconnect (OSI) reference model......... 61
4.5.2 The TCP/IP reference model.................................................. 62
4.5.3 Comparison of both models and criticism............................... 63
4.6 Communication Link of the proposed monitoring system ........... 63
4.7 World Wide Web (The Client and Server Pair)................................. 64
4.8 The Interactive website ..................................................................... 65
4.9 The interactive monitoring website for hybrid systems................. 66
4.9.1 Data monitoring software programming ................................. 66
4.9.2 The interactive monitoring website ......................................... 68
4.10 Summary .......................................................................................... 69
vii
Chapter 5 Implementation and results.............................................................. 71
5.1 Introduction ........................................................................................ 71
5.2 Orientation .......................................................................................... 71
5.3 Implementation................................................................................... 72
5.3.1 Modem Dial-in ........................................................................ 75
5.4 Results of the interactive monitoring website ................................. 76
5.4.1 Download of the monitored data ............................................. 77
5.4.2 Set the parameters ................................................................. 79
5.5 Result of data analysis ...................................................................... 81
5.5.1 The monitored data from the battery inverter.......................... 81
5.5.2 The monitored data from the PV inverter ................................ 89
5.6 Summary............................................................................................. 90
Chapter 6 Conclusions....................................................................................... 91
References .......................................................................................................... 94
Appendix A : HTML and PHP script ................................................................. A-1
Appendix B : C programming of monitoring software ................................... B-1
Appendix C : Battery inverter: Sunny Island.................................................... C-1
Appendix D : PV inverter: Sunny Boy ............................................................... D-1
Appendix E : Embedded Hardware Module and Modem ................................. E-1
Appendix F : PV diesel Hybrid system components ...................................... F-1
viii
List of Figures
Figure 1-1: Development of the PV world market 1992 – 2003 ............................................. 1
Figure 1-2: Development of PV in different regions 1995 – 2003 .......................................... 1
Figure 1-3: The development of the PV world market by product category and the relevance
of small grid-connected PV systems (SGCS) ......................................................................... 2
Figure 1-4: Comparison of total installed PV capacity per capita and SGCS capacity in
various countries by the end of 2001 ..................................................................................... 3
Figure 1-5: Development of PV system prices in Germany, Austria, USA, The Netherlands,
Switzerland, and Japan 1990-2000 excl. VAT........................................................................ 4
Figure 1-6: (a) Development of PV modules system prices 1990-2000 excl. VAT,
(b) Development of PV non-module prices 1990-2000 excl. VAT ......................................... 4
Figure 1-7: Classification of power supply technologies for electrification..................5
Figure 1-8: Diagram of objectives and tools ...............................................................8
Figure 2-1: DC Bus Configuration ...........................................................................10
Figure 2-2: Switched hybrid system ........................................................................11
Figure 2-3: AC Bus Configuration ............................................................................11
Figure 2-4: Solar cell design ....................................................................................12
Figure 2-5: Characteristic of a Diode .......................................................................13
Figure 2-6: Equivalent circuit diagram of a solar cell ...............................................13
Figure 2-7: Equivalent circuit diagram of an ideal solar cell connected to a load ....14
Figure 2-8: Construction of the solar cell curve from the diode curve ......................15
Figure 2-9: Power curve and maximum power point (MPP) ....................................16
Figure 2-10: PV cell, module and array ...................................................................17
Figure 2-11: I-V curve at different irradiation levels .................................................17
Figure 2-12: Series PV cells with bypass diodes .....................................................18
Figure 2-13: I-V characteristic curve for series connection ......................................18
Figure 2-14: Basic equivalent circuit of the lead-acid battery for a current state .....19
Figure 2-15: Equivalent circuit of the battery regarding the dynamic and quasi-static
processes ................................................................................................................20
Figure 2-16: Discharge characteristic curves ............................................................2
Figure 2-17: Quasi-static equivalent circuit with representation of gassing .............24
Figure 2-18: Freezing limit of a lead-acid battery dependent on the state of charge 24
Figure 2-19: Cycle life as a function of deep of discharge (Source: VARTA special report 3/1987)
.................................................................................................................................25
Figure 2-20: Fuel consumption as a function of the diesel engine load ratio for an 80
kW generator ...........................................................................................................30
Figure 2-21: Three phase PV diesel hybrid system .................................................31
ix
Figure 2-22: Example of inverter efficiency versus capacity Pac/Pac(nom) [SMA] ....... 32
Figure 2-23: Load profile in Fitou, France ............................................................... 32
Figure 2-24: Load profile in the Starkenburg hut, Austria ....................................... 33
Figure 2-25: Load profile in the Energy Park, Pitsanulok, Thailand ........................ 33
Figure 2-26: Load profile in Muara, Indonesia ........................................................ 33
Figure 2-27: AC-coupled hybrid system for remote area ........................................ 34
Figure 2-28: Energy flow diagram for a typical PV diesel hybrid system ................ 37
Figure 2-29: Diagram of the PV diesel hybrid system of the project ....................... 38
Figure 2-30: Test facilities of the PV diesel hybrid system, installed at the DeMoTec
Hall, University of Kassel ....................................................................................... 39
Figure 2-31: PV modules for the system ................................................................ 39
Figure 3-1: Layers in a typical computer ................................................................. 41
Figure 3-2: Status of embedded Linux .................................................................... 43
Figure 3-3: Reasons of using embedded Linux ...................................................... 44
Figure 3-4: Layers in a typical Linux system ........................................................... 45
Figure 3-5: The monitoring system software requirements ..................................... 46
Figure 3-6: The embedded Module ......................................................................... 48
Figure 3-7: Diagram of the embedded Module ....................................................... 49
Figure 3-8: Serving a Web Document from a Web Server: (a) requests (b) serves 51
Figure 3-9: Embedded source code of a PHP script in a HTML document ............. 52
Figure 3-10: Web request processing with and without PHP .................................. 53
Figure 3-11: Apache market .................................................................................... 54
Figure 3-12: Web server cycle ................................................................................ 55
Figure 3-13: Apache request loop............................................................................ 55
Figure 4-1: The proposed interactive monitoring website system ........................... 57
Figure 4-2: Diagram of the bi-directional inverter for the project ............................. 58
Figure 4-3: Computer network ................................................................................ 60
Figure 4-4: The OSI and TCP/IP reference model .................................................. 63
Figure 4-5: The network layers of monitoring system ............................................. 64
Figure 4-6: Communication on the Web ................................................................. 65
Figure 4-7: Diagram of the Interactive Website with HTML and PHP combination . 66
Figure 4-8: Flowchart of the acquisition software .................................................... 67
Figure 4-9: Diagram of the interactive monitoring website for hybrid systems ........ 69
Figure 5-1: Diagram of the interactive monitoring website ...................................... 71
Figure 5-2: Diagram of the system connection of the project .................................. 72
Figure 5-3: Diagram of the battery connection and the temperature sensor ........... 73
x
Figure 5-4: Temperature sensor of battery ..............................................................73
Figure 5-5: Generator connection ............................................................................74
Figure 5-6: Picture of the realized monitoring system .............................................75
Figure 5-7: Dial-in diagram .......................................................................................76
Figure 5-8: Main page of the interactive monitoring website ...................................77
Figure 5-9: The link to download and set parameters on the website .....................78
Figure 5-10: password area .....................................................................................78
Figure 5-11: Data manager page .............................................................................78
Figure 5-12: Delete data menu ................................................................................79
Figure 5-13: Feature of parameter page on the website .........................................80
Figure 5-14: The webpage of setting parameters.....................................................80
Figure 5-15: Power from Battery, PV module, and Generator .................................82
Figure 5-16: Power from Battery and its SOC (State of Charge) .............................83
Figure 5-17: Charging method of the battery ...........................................................84
Figure 5-18: Switching operation depending on SOC .............................................84
Figure 5-19: Battery voltage, current, and temperature............................................85
Figure 5-20: System frequency (Fconv) and generator power (Pext) .....................86
Figure 5-21: Power from Battery and Gemerator without PV modules ...................87
Figure 5-22: Power from Battery and its SOC ..........................................................87
Figure 5-23: The Battery Voltage and the battery temperature ................................88
Figure 5-24: Pconc, Ppv, and its SOC without starting the generator ......................88
Figure 5-25: Power production of the PV module ....................................................89
xi
List of Tables
Table 2-1: Comparison between selection criteria of available batteries .............................. 28
Table 3-1: Examples of embedded Linux Kernel ................................................................. 47
Table 4-1: Examples of monitoring variables ....................................................................... 59
xii
Nomenclature
Cact
: The actual capacity of the battery [Ah]
Cp
: Parallel capacitor in equivalent circuit of battery [nF]
DOD
: The depth of discharge of battery in %
E IN
: Energy input to system [kWh]
E LOAD
: Energy supplied to the load [kWh]
E LOSS
: Energy losses [kWh]
E MG
: Energy generated by the motor generator [kWh]
E PV
: Energy generated by the PV array [kWh]
E OUT
: Energy output from system [kWh]
I
: Battery current, which should be provided [A]
IB
: Discharge current of battery [A]
Icell
: Current from PV cell [A]
Iph
: Photocurrent [A]
IPV
: Output Current of the PV-cell [A]
ID
: Diode current [A]
IO
: Dark current [A]
Impp
: Current at maximum power point of PV module [A]
IS
: Self-discharge current in battery [A]
Isc
: Current from PV cell when short circuit [A]
k
: Boltzmann constant [8.65*10-5 eV/K]
q
: elementary charge [1.6*10-19 As]
QBat
: The Ah-balance (i.e. net Ah discharged or charged since the last full
state of charge)
Cnom
: The nominal capacity of the battery (Ah)
QD
: The amount of charge able to be recalled from the battery [Ah]
QC
: The amount put in during charging [Ah]
xiii
Rin
: An internal resistor in equivalent circuit of the lead-acid battery
[Ohm]
Rload
: Pure resistance load [Ohm]
Rp
: Parallel resistance in equivalent circuit of battery [Ohm]
Rs
: Self-discharge resistance in the equivalent circuit of battery [Ohm]
RG
: A resistor of Zenor diode in the equivalent circuit of battery gassing
loss [Ohm]
RΩ
: Drop resistance in the equivalent circuit of the battery [Ohm]
SOC
: The state of charge (SOC) of the battery in percent [%]
t
: Charge or discharge time of the battery [h]
T
: diode temperature [K]
Tcell
: Temperature of the PV cell (C)
V
: Voltage [V]
VB
: Terminal voltage of the battery [V]
Vp
: A polarization voltage loss in the battery (V)
VC
: Average charging voltage [V]
VD
: The average discharge voltage [V]
VE
: A voltage source with an equilibrium voltage in the equivalent circuit
of the lead-acid battery [V]
Vin
: Internal loss voltage of the battery [V]
Vk
: Compensate value for calculation VE of the battery Vk = 0.84…0.88
Vmpp
: Voltage at maximum power point (MPP) of the PV module [V]
Voc
: open-circuit voltage of the PV cell [V]
Wp
: The maximum power output of the PV module [Watt]
ηI
: Columbic efficiency in %
ηΣ
: Overall efficiency of the battery in %
ηV
: Voltage efficiency in %
xiv
Glossary of Terms
AC
: Alternating current (AC), household utility current in most countries
is AC with a frequency of 50/60 hertz (60 complete cycles per
second).
AM
: Air mass
API
: An application program interface (API - and sometimes spelled
application programming interface) is the specific method prescribed
by a computer operating system or by an application program by
which a programmer writing an application program can make
requests of the operating system or another application.
ARP
: Address Resolution Protocol (ARP) is a protocol for mapping an
Internet Protocol address (IP address) to a physical machine
address that is recognized in the local network. There is a Reverse
ARP (RARP) for host machines that do not know their IP address.
RARP enables them to request their IP address from the gateway's
ARP cache.
ASCII
: ASCII (American Standard Code for Information Interchange) is the
most common format for text files in computers and on the Internet.
In an ASCII file, each alphabetic, numeric, or special character is
represented with a 7-bit binary number (a string of seven 0s or 1s).
128 possible characters are defined.
BIOS
: BIOS (basic input/output system) is the program a personal
computer's microprocessor uses to get the computer system started
after turning it on. It also manages data flow between the computer's
operating system and attached devices such as the hard disk, video
adapter, keyboard, mouse, and printer.
Bootdisk
: Bootdisk is an installation floppy disk for installation of Linux
Broadcast
: On the Internet, certain Web sites deliver original or redistributed
broadcasts from existing radio and television stations, using
streaming sound or streaming video techniques, to Web users who
visit the Web site or "tune it in" using a special program such as
RealPlayer. Like publicly available radio and television broadcasts,
Web broadcasts are available to anyone.
BUS
: In an electrical term, a bus is a transmission line on which electrical
power is dropped off or picked up at every device attached to the line
CD-ROM
: CD-ROM (Compact Disc, read-only-memory) is an adaptation of the
CD that is designed to store computer data in the form of text and
graphics, as well as hi-fi stereo sound.
xv
CGI
: The common gateway interface (CGI) is a standard way for a Web
server to pass a Web user's request to an application program and
to receive data back to forward to the user. When the user requests
a Web page (for example, by clicking on a highlighted word or
entering a Web site address), the server sends back the requested
page. However, when a user fills out a form on a Web page and
sends it in, it usually needs to be processed by an application
program. The Web server typically passes the form information to a
small application program that processes the data and may send
back a confirmation message. This method or convention for
passing data back and forth between the server and the application
is called the common gateway interface (CGI). It is part of the Web's
Hypertext Transfer Protocol (HTTP).
ChipDISK
: The chipDISK provides high capacity solid state Flash memory that
is electrically compatible with an IDE disk drive. ChipDISK modules
provide up to 500 Mbyte of formatted storage capacity and will be
expanded to even higher capacities in the future.
Client/server
: Client/server describes the relationship between two computer
programs in which one program, the client, makes a service request
from another program, the server, which fulfills the request.
CPU
: CPU (central processing unit) is the central unit in a computer
containing the logic circuitry that performs the instructions of a
computer's programs.
Day profile
: The load profile represents the load demand on day time, which the
power available from the PV generators.
DC
: DC (Direct current) is the unidirectional flow or movement of electric
charge carriers. The intensity of the current can vary with time, but
the general direction of movement stays the same at all times. As an
adjective, the term DC is used in reference to voltage whose polarity
never reverses.
DDP
: Deep discharge protection of the battery
Embedded
system
: An embedded system is some combination of computer hardware
and software, either fixed in capability or programmable, that is
specifically designed for a particular kind of application device.
Industrial machines, automobiles, medical equipment, cameras,
household appliances, airplanes, vending machines, and toys (as
well as the more obvious cellular phone and PDA) are among the
myriad possible hosts of an embedded system. Embedded systems
that are programmable are provided with a programming interface,
and embedded systems programming is a specialized occupation.
xvi
Ethernet
: Ethernet is the most widely-installed local area network (LAN)
technology. Specified in a standard, IEEE 802.3, Ethernet was
originally developed by Xerox and then developed further by Xerox,
DEC, and Intel. An Ethernet LAN typically uses coaxial cable or
special grades of twisted pair wires. Ethernet is also used in wireless
LANs. The most commonly installed Ethernet systems are called
10BASE-T and provide transmission speeds up to 10 Mbps. Devices
are connected to the cable and compete for access using a Carrier
Sense Multiple Access with Collision Detection (CSMA/CD) protocol.
FTP
: File Transfer Protocol (FTP), a standard Internet protocol, is the
simplest way to exchange files between computers on the Internet.
FTP is commonly used to transfer Web page files from their creator
to the computer that acts as their server for everyone on the Internet.
Gateway
: A gateway is a network point that acts as an entrance to another
network.
gcc
: The GNU Compiler Collection (GCC) is the GNU compiler. GCC is
the most important piece of open source software. Even other
languages, such as Perl and Python, are written in C, which is
compiled by the GNU compiler. Linux is possible because of GCC.
GCC compiles several languages, The fundamental language of
GCC is C.
Genset
: A generator set with a start and stop controller.
glibc
: glibc is the GNU C Library. It currently runs unmodified on GNU
Hurd systems and Linux i386, m68k, and alpha systems.
GNU
GNU is a Unix-like operating system that comes with source code
that can be copied, modified, and redistributed. The GNU project was
started in 1983 by Richard Stallman and others, who formed the Free
Software Foundation. Stallman believes that users should be free to
do whatever they want with software they acquire, including making
copies for friends and modifying the source code and repackaging it
with a distribution charge.
GSM
: GSM (Global System for Mobile communication) is a digital mobile
telephone system that is widely used in Europe and other parts of the
world. GSM uses a variation of time division multiple access (TDMA)
and is the most widely used of the three digital wireless telephone
technologies (TDMA, GSM, and CDMA). GSM digitizes and
compresses data, then sends it down a channel with two other
streams of user data, each in its own time slot. It operates at either
the 900 MHz or 1800 MHz frequency band.
Host
: A host is a computer with a Web server that serves the pages for
one or more Web sites.
xvii
HTTP
: HTTP (Hypertext Transfer Protocol) is the set of rules for
transferring files (text, graphic images, sound, video, and other
multimedia files) on the World Wide Web.
HTTPd
: Hypertext Transfer Protocol daemon, on the Web, each server has
an HTTPD or Hypertext Transfer Protocol daemon that waits in
attendance for requests to come in from the rest of the Web. A
daemon is a program that is "an attendant power or spirit"
(Webster's). It sits waiting for requests to come in and then forwards
them to other processes as appropriate.
HTML
: Hypertext Markup Language is the set of markup symbols or codes
inserted in a file intended for display on a World Wide Web browser
page. The markup tells the Web browser how to display a Web
page's words and images for the user. Each individual markup code
is referred to as an element (but many people also refer to it as a
tag). Some elements come in pairs that indicate when some display
effect is to begin and when it is to end.
ICMP
: ICMP (Internet Control Message Protocol) is a message control and
error-reporting protocol between a host server and a gateway to the
Internet. ICMP uses Internet Protocol (IP) datagrams, but the
messages are processed by the IP software and are not directly
apparent to the application user.
IDE
: IDE (Integrated Drive Electronics) is a standard electronic interface
used between a computer motherboard's data paths or bus and the
computer's disk storage devices. The IDE interface is based on the
IBM PC Industry Standard Architecture (ISA) 16-bit bus standard, but
it is also used in computers that use other bus standards. Most
computers sold today use an enhanced version of IDE called
Enhanced Integrated Drive Electronics (EIDE). In today's computers,
the IDE controller is often built into the motherboard.
IP
: The Internet Protocol (IP) is the method or protocol by which data is
sent from one computer to another on the Internet. Each computer
(known as a host) on the Internet has at least one IP address that
uniquely identifies it from all other computers on the Internet. When
we send or receive data (for example, an e-mail note or a Web
page), the message gets divided into little chunks called packets.
Each of these packets contains both the sender's Internet address
and the receiver's address.
Interactive
website
: A dynamic website that allows a client to view the webpage as well
as to write data into the webpage. In this, It works by a combination
of HTML and PHP script.
xviii
Internet
: The Internet, sometimes called simply "the Net," is a worldwide
system of computer networks - a network of networks in which users
at any one computer can, if they have permission, get information
from any other computer (and sometimes talk directly to users at
other computers). It was conceived by the Advanced Research
Projects Agency (ARPA) of the U.S. government in 1969.
I-V
: Current-voltage relation of the PV module
Link
: A link is a selectable connection from one word, picture, or
information object to another. In a multimedia environment such as
the World Wide Web, such objects can include sound and motion
video sequences. The most common form of link is the highlighted
word or picture that can be selected by the user (with a mouse or in
some other fashion), resulting in the immediate delivery and view of
another file. The highlighted object is referred to as an anchor. The
anchor reference and the object referred to constitute a hypertext
link.
Kernel
: The kernel is the essential center of a computer operating system,
the core that provides basic services for all other parts of the
operating system. A synonym is nucleus. A kernel can be contrasted
with a shell, the outermost part of an operating system that interacts
with user commands. Kernel and shell are terms used more
frequently in Unix and some other operating systems than in IBM
mainframe systems.
LAN
: A local area network (LAN) is a group of computers and associated
devices that share a common communications line or wireless link
and typically share the resources of a single processor or server
within a small geographic area (for example, within an office
building).
Linux
: Linux (often pronounced LIH-nuhks with a short "i") is a Unix-like
operating system that was designed to provide personal computer
users a free or very low-cost operating system comparable to
traditional Unix systems. Linux has a reputation as a very efficient
and fast-performing system. Linux's kernel (the central part of the
operating system) was developed by Linus Torvalds at the University
of Helsinki in Finland. To complete the operating system, Torvalds
and other team members made use of system components
developed by members of the Free Software Foundation for the GNU
Project.
Load profile
: Load profiles describe the electricity demand depending on time
xix
Memory
: Memory is the electronic holding place for instructions and data.
Memory is often used as a shorter synonym for random access
memory (RAM). This kind of memory is located on one or more
microchips that are physically close to the microprocessor in
computer. Memory is sometimes distinguished from storage, or the
physical medium that holds the much larger amounts of data that will
not fit into RAM and may not be immediately needed there. Storage
devices include hard disks, floppy disks, CD-ROM, and tape backup
systems.
mgetty
: Mgetty is a program that allows clients to make optimum use of their
modem or fax modem in a Unix environment.
MIME
: MIME (Multi-Purpose Internet Mail Extensions) is an extension of
the original Internet e-mail protocol that lets people use the protocol
to exchange different kinds of data files on the Internet: audio, video,
images, application programs, and other kinds, as well as the ASCII
text handled in the original protocol, the Simple Mail Transport
Protocol (SMTP). Servers insert the MIME header at the beginning of
any Web transmission. Clients use this header to select an
appropriate "player" application for the type of data the header
indicates.
Monitored
data
: The monitored data is the data of the hybrid system that has been
monitored by monitoring unit including several parameters.
MPP
: Maximum power point (MPP)
MPPT
:Maximum power point tracker (MPPT)
Network
: In information technology, a network is a series of points or nodes
interconnected by communication paths. Networks can interconnect
with other networks and contain sub networks.
Operating
system
: An operating system (sometimes abbreviated as "OS") is the
program that, after being initially loaded into the computer by a boot
program, manages all the other programs in a computer. The other
programs are called applications or application programs.
OSI
: OSI (Open Systems Interconnection) is a standard description or
"reference model" for how messages should be transmitted between
any two points in a telecommunication network.
PC/104
: It is an embedded computer, small size, and low power
consumption (http://www.pc104.org/).
Peripheral
: A peripheral (pronounced peh-RIHF-uh-ruhl, a noun truncation of
peripheral device), is any computer device that is not part of the
essential computer (the processor, memory, and data paths) but is
situated relatively close by. A near synonym is input/output (I/O)
device.
xx
PHP
: In Web programming, PHP is a script language and interpreter that
is freely available and used primarily on Linux Web servers. PHP,
originally derived from Personal Home Page Tools, now stands for
PHP: Hypertext Preprocessor, which describes as a "recursive
acronym."
POP3
: POP3 (Post Office Protocol 3) is the most recent version of a
standard protocol for receiving e-mail. POP3 is a client/server
protocol in which e-mail is received and held for user by user Internet
server. Periodically, users (or user client e-mail receiver) check their
mail-box on the server and download any mail. POP3 is built into the
Netmanage suite of Internet products and one of the most popular email products, Eudora. It is also built into the Netscape and Microsoft
Internet Explorer browsers.
PPP
: PPP (Point-to-Point Protocol) is a protocol for communication
between two computers using a serial interface, typically a personal
computer connected by phone line to a server.
PPPd
: PPPd is daemon of PPP. Daemon is a program that sits waiting for
requests to come in.
Processor
: A processor is the logic circuitry that responds to and processes the
basic instructions that drive a computer. The term processor has
generally replaced the term central processing unit (CPU). The
processor in a personal computer or embedded in small devices is
often called a microprocessor.
Protocol
: In information technology, a protocol (pronounced PROH-tuh-cahl,
from the Greek protocollon, which was a leaf of paper glued to a
manuscript volume, describing its contents) is the special set of rules
that end points in a telecommunication connection use when they
communicate.
PV
: Photovoltaic or solar module
RAM
RAM (random access memory) is the place in a computer where the
operating system, application programs, and data in current use are
kept so that they can be quickly reached by the computer's
processor.
RARP
: RARP (Reverse Address Resolution Protocol) is a protocol by
which a physical machine in a local area network can request to
learn its IP address from a gateway server's Address Resolution
Protocol (ARP) table or cache.
RAPS
: RAPS (remote area power supply) is off-grid electrification
technology.
Rootdisk
: Rootdisk is a floppy disk for installation of Linux after bootdisk.
xxi
RS232,
RS485
: Both are a standard serial communication interface that describes
the physical interface serial-data communication between computers
and related devices.
SGML
: Standard Generalized Markup Language, See ISO 8879
SGCS
: The small decentralised grid-connected systems
SCADA
: Supervision Control and Data Acquisition
SMTP
SMTP (Simple Mail Transfer Protocol) is a TCP/IP protocol used in
sending and receiving e-mail. However, since it is limited in its ability
to queue messages at the receiving end, it is usually used with one
of two other protocols, POP3 or Internet Message Access Protocol
that let the user save messages in a server mailbox and download
them periodically from the server. In other words, users typically use
a program that uses SMTP for sending e-mail and either POP3 or
IMAP for receiving messages that have been received for them at
their local server. Most mail programs such as Eudora let user
specify both an SMTP server and a POP server.
STC
: Standard Testing Conditions (STC) of PV module
STBH
: Represents the measured load profile for a typical alpine lodge.
With more productive appliances used during working hours, more
energy is used during the day when the sun shines.
Sunny Boy
: Sunny Boy is a PV inverter DC/AC from company SMA, Germany.
Sunny Island : Sunny Island is a bi-directional battery inverter from company SMA,
Germany.
TCP
: TCP (Transmission Control Protocol) is a set of rules (protocol)
used along with the Internet Protocol (IP) to send data in the form of
message units between computers over the Internet. While IP takes
care of handling the actual delivery of the data, TCP takes care of
keeping track of the individual units of data (called packets) that a
message is divided into for efficient routing through the Internet.
TCP/IP
: TCP/IP (Transmission Control Protocol/Internet Protocol) is the
basic communication language or protocol of the Internet. It can also
be used as a communications protocol in a private network (either an
intranet or an extranet).
Telnet
: Telnet is the way to access someone else's computer, if permission.
THD
: Total harmonic distortion
TransIndo
: The measured load profile, with an important evening peak is typical
for rural villages.
xxii
UDP
: UDP (User Datagram Protocol) is a communications protocol that
offers a limited amount of service when messages are exchanged
between computers in a network that uses the Internet Protocol (IP).
UDP is an alternative to the Transmission Control Protocol (TCP)
and, together with IP, is sometimes referred to as UDP/IP. Like the
Transmission Control Protocol, UDP uses the Internet Protocol to
actually get a data unit (called a datagram) from one computer to
another. Unlike TCP, however, UDP does not provide the service of
dividing a message into packets (datagrams) and reassembling it at
the other end. Specifically, UDP does not provide sequencing of the
packets that the data arrive in. This means that the application
program that uses UDP must be able to make sure that the entire
message has arrived and is in the right order.
Unix
: Unix is an operating system that originated at Bell Labs in 1969 as
an interactive time-sharing system. Ken Thompson and Dennis
Ritchie are considered the inventors of Unix.
URL
: A URL (Uniform Resource Locator, previously Universal Resource
Locator) - pronounced YU-AHR-EHL or, in some quarters, UHRL - is
the address of a file (resource) accessible on the Internet.
USB
: USB (Universal Serial Bus) is a plug-and-play interface between a
computer and add-on devices (such as audio players, joysticks,
keyboards, telephones, scanners, and printers). With USB, a new
device can be added to a computer without having to add an adapter
card or even having to turn the computer off.
Web Browser : A browser is an application program that provides a way to look at
and interact with all the information on the World Wide Web such as
Internet Explorer or Netscape.
Web server
: A Web server is a program that, using the client/server model and
the World Wide Web's Hypertext Transfer Protocol (HTTP), serves
the files that form Web pages to Web users (whose computers
contain HTTP clients that forward their requests). Every computer on
the Internet that contains a Web site must have a Web server
program. Two leading Web servers are Apache, the most widely
installed Web server, and Microsoft's Internet Information Server
(IIS).
Web services : Web services (sometimes called application services) are services
(usually including some combination of programming and data, but
possibly including human resources as well) that are made available
from a business's Web server for Web users or other Web-connected
programs. Providers of Web services are generally known as
application service providers. Web services range from such major
services as storage management and customer relationship
management (CRM) down to much more limited services such as the
furnishing of a stock quote and the checking of bids for an auction
item. The accelerating creation and availability of these services is a
major Web trend.
xxiii
Website
: A Web site is a related collection of World Wide Web (WWW) files.
Windows
: Windows is a personal computer operating system from Microsoft
that, together with some commonly used business applications such
as Microsoft Word and Excel, has become a standard for individual
users in most corporations as well as in most homes.
WWW
: A technical definition of the World Wide Web is all the resources
and users on the Internet that are using the Hypertext Transfer
Protocol (HTTP).
xxiv
Chapter 1: Introduction
Chapter 1
Introduction
1.1 Photovoltaics (PV) and trends
The decentralized use of PV is discussed as an important tool to cope with the
current environmental problems associated with electricity generation and electricity
use and to provide clean energy now and for the future [2]. In the last decade of the
20th century the world market penetration of PV has been increased tremendously
worldwide, see figure 1-1, 1-2.
Figure 1-1: Development of the PV world market 1992 – 2003
Figure 1-2: Development of PV in different regions 1995 – 2003
1
Chapter 1: Introduction
As shown in figure 1-1, the PV market has been increased rapidly by the end of 2003
the PV world market was about double of year 2001. Figure 1-2 indicated that the PV
market is growing in every region especially in Japan. Furthermore, it can be
considered that the development of the PV world market by product category, more
than 50% of the PV world production went to the small decentralised grid-connected
systems (SGCS) (see figure 1-3). While in 1990, there were mainly stand-alone
systems in remote areas and the application for communication and consumer
products were prevailing. At the end of the decade, SGCS became dominant as in
figure 1-3.
Figure 1-3: The development of the PV world market by product category and the
relevance of small grid-connected PV systems (SGCS) [2]
This development was brought about by means of a wide variety of promotion
strategies and dissemination programmes. Of special interest is that these initiatives
were launched by quite different organizations and institutions. Governmental bodies
on national and on local levels have launched strategies as well as electric utilities
and NGO's [2].
Figure 1-4 shows the total currently installed PV capacity per capita in various
countries. With respect to SGCS, it can clearly be seen from figure 1-4 that there are
tremendous differences between countries with a high density of population and/or
grid-connection (e.g. NE, DE, CH, JP) and countries with a low density (e.g. SE, AU,
FI). It can also clearly be seen that the most successful countries are those with the
most ambitious programmes: Switzerland, Japan and Germany, or where off-grid PV
is cost-effective: Australia.
2
Chapter 1: Introduction
Figure 1-4: Comparison of total installed PV capacity per capita and SGCS capacity
in various countries by the end of 2001 [2].
1.1.1 Development of costs over time
Most interesting is how the PV costs will develop in the future. To forecast PV trend
in future, it is also important to know the past development of investment costs.
Figure 1-5 indicates the development of the costs for small grid-connected PV
systems with a capacity of 3 kWp in some of the countries where comprehensive
promotion activities took place. From figure 1-5, it is very interesting that system
prices dropped substantially.
In figure 1-6a, the share of module costs is presented. It can be seen that in recent
years the non-module costs, e.g. of inverters, design and planning, assembling,
construction work, installation, were reduced to a larger extent than module costs.
This shows the importance of pursuing both, a further reduction in module prices as
well as in the design and installation costs.
PV module manufacture now must go to the next stage of development for further
cost reductions to occur larger manufacturing facilities to achieve better economies of
scale and higher automation, as well as manufacture of the lower cost PV types.
Photovoltaic presents itself that it is increasingly used worldwide. Advantage, the
price of PV module is decreasing substantially. These indicate that PV system is
potential in use for the future.
3
Chapter 1: Introduction
Figure 1-5: Development of PV system prices in Germany, Austria, USA, The
Netherlands, Switzerland, and Japan 1990-2000 excl. VAT [2]
(a)
(b)
Figure 1-6: (a) Development of PV modules system prices 1990-2000 excl. VAT,
(b) Development of PV non-module prices 1990-2000 excl. VAT [2]
4
Chapter 1: Introduction
1.2 Hybrid systems for rural and remote electrification
Energy represents a basic drive for the economic and social development of a
country. However, in many remote and rural areas have no access to electricity. In
order to contribute to rural development and the creation of job opportunities, energy
is urgently needed in remote villages.
The concept of remote site can be quite different in each country. Generally, remote
sites are locations far from the cities and from the places where most people live, and
often lack telephone line coverage and power grid supply. The price of conventional
energy sources in remote areas, such as candles, paraffin, gas, coal, batteries, is
often more expensive than in cities due to the remoteness of retailers. The provision
of grid electricity in remote areas is often associated with higher costs to the grid
supplier. Grid electrification in remote areas in many cases is financially inefficient
particularly due to the low consumption in remote areas [1, 4, 5].
Renewable energy sources such as solar energy provide realistic alternatives for
electrification in remote area. One of the most promising applications of renewable
energy technology is the Hybrid energy system. In the context of rural electrification,
PV hybrid energy systems combining renewable and conventional power sources
have a recognized potential for competitive electricity production. The widely used
term Hybrid system describes a stand-alone energy system, which combines
renewable and conventional energy sources with batteries for energy storage. The
use of batteries can enhance fuel savings by buffering part of the renewable energy
production for use at later times, thereby decreasing the net load on the diesel
generator, allowing the diesel to be turned off or being operated at its highest
efficiency, while re-charging the batteries.
Considering the application spectrum of renewable energies for electrification in
developing countries as in figure 1-7, it stretches from the supply of single consumers
and load groups via the decentralized electrification with isolated grids to the
expansion of interconnected grids.
Figure 1-7: Classification of power supply technologies for electrification [6]
5
Chapter 1: Introduction
The classification of power supply fields presented in figure 1-7 includes estimations
of the application potential for various energy sources throughout the total power
range. From this, PV-Hybrid system, which is combining different energy sources in
one supply system, offers the best possibility to use the locally available renewable
energies. Hybrid system technology mainly covers the stand-alone systems as well
as island grids of small and medium power ranges. Moreover, hybrid system can be
expanded to cover regional and trans-regional grids.
From the advantages as mentioned, thus the PV-diesel hybrid systems have been
increasingly used for supplying electricity in remote and rural areas worldwide. Issues
that arise when considering PV-diesel hybrid systems with battery storage include
the efficient use of renewable energy, fuel savings, system reliability, maintenance
requirements and component lifetime considerations [4].
1.3 Monitoring of hybrid systems
As the PV-diesel hybrid system is increasingly used to supply electricity in remote
areas. Thus, it has to be a technically reliable energy system to the consumer. To
keep the hybrid system working reliably, it is necessary to include a monitoring
system to continuously monitor the hybrid system. The usual goals of monitoring [9]
are to:
•
•
•
•
Ensure that the system is operating properly
Assess the performance of system components, pinpoint faulty devices or
devices operating below their nominal performance
Permit the calibration of tools
Reveal improvements to the design and increase the understanding of the
designer
In most remote monitoring systems, the information is collected from the remote
station to master station. Commonly systems in such rural areas are supervised by
yearly visits in conjunction with a data logger. But this method leads to the
inefficiency of response time for maintenance as well as the product improvements is
poor. There are already some monitoring systems have been presented earlier such
as SCADA (Supervision Control and Data Acquisition) or by satellite [10,11].
However, the known problems for those methods are: high investment cost, needs
special software for Client stations, and difficulty with communication link. These all
disadvantages make the hybrid system ineffective in economic performance.
As the internet has been a powerful source of information, the internet monitoring has
been introduced for the hybrid system [12]. Using internet web technology, all above
disadvantages can be eliminated. The communication TCP/IP network is used for the
internet monitoring system. In most case, this communication link already exists.
Thus, there will be no longer difficulty of communication link. The monitored data is
stored at web sever. The operator can access the monitored data via a standard
browser.
However, the internet monitoring is possible only where the internet connections are
provided. In the rural areas, where lack of infrastructure, it is difficult to implement the
internet monitoring. Moreover, a computer, which is installed a web server to provide
the monitored data, normally consumes much energy. This is a disadvantage for the
monitor system in remote area, where energy is limited.
Furthermore, the best and effective monitoring system should include a capability to
download data and to set the operation parameters online via a standard browser.
6
Chapter 1: Introduction
Therefore, the operator has an ability to enable immediate action to the hybrid
system when system needed. Thus, to fulfil all requirements, a suitable monitoring
system for the hybrid system in remote areas has to be developed.
1.4 Research objectives and methodology
As mentioned, it is a need to develop a suitable monitoring system for the hybrid
system in remote area, which provides the monitored data as well as a capability to
set the operation parameters online. Therefore, the reliability of the hybrid system
can be improved. The objectives and methodology for developing the monitoring
system will be described in next section.
1.4.1 Objectives
The objectives of the work are:
•
Development of a suitable and effective monitoring software for the PV-diesel
hybrid system in remote area using web base technology
•
Development of interactive monitoring website that provides a possibility to
download data as well as set operation parameters online via a standard web
browser
•
Implementation of a low power input hardware module for the web server
because it can reduce the energy consumption. As the advantage of opensources, the embedded Linux operating system is utilized for the website
monitoring system
•
As the PV-diesel hybrid system is used to supply energy in remote areas,
where lack of infrastructure and no internet connection, thus, the wireless
technology is provided for the communication, the GSM modem is selected for
the project
•
Implementation of the interactive monitoring website and analysis of the
monitored data to investigate its results
From the objectives of the work, the monitoring system will include the internet
technology to provide the monitored data at the website. The operators can access
the data via a web browser. As wireless communication networks expand and the
quality continues to improve, and the remote areas lack of telephone connection,
thus it becomes more attractive to use a network like GSM. Using this technology,
data is delivered directly to the main station and the network will not generate any
additional costs for operator.
The monitoring system in this project is comprised of a monitoring unit (sensor unit),
a data acquisition unit, and a communication unit. The data acquisition unit will
collect the monitored data from the sensor unit and store the data into web server.
The operators have an ability to download data as well as to set operation
parameters online via the website. Figure 1-8 shows overview of objectives and
tools.
7
Chapter 1: Introduction
Small
operating
system
Interactive
website
Objectives
Monitor Unit
Acquisition
the data
Interactive
web
monitoring
Low input
power
module
Web server
GSM
modem
Tools
PV-diesel Hybrid system with
Inverters from SMA
Embedded Linux,
C language, HTML,
PHP language,
Apache web server,
Embedded computer
Data
Storing
Software
Standard
browser
(NE or IE),
Over
GSM link
Embedded
Linux Module
Web-Server
Website
P
H
P
Figure 1-8: Diagram of objectives and tools
1.4.2 Tools
Figure 1-8 illustrates tools and methodology to develop the objectives of this work.
The methodology and tools in order to carry out this thesis are described as
following:
•
PV-diesel hybrid system: It is used to implement the interactive monitoring
website. The hybrid system is installed including PV arrays, generator, battery,
Sunny Boy inverter, Sunny Island (battery’s inverter), and load. The hybrid
system is used to supply electricity to a load simulating for remote areas’ load.
•
Interactive Monitoring Website: It is the core of work. The website is written by
the Hyper Text Mark-up Language, (HTML). HTML is a code text-formatting
language. It is used to publish Web pages. It is a SGML-based markup
language (SGML= Standard Generalized Markup Language. See ISO 8879). It
allows a Web-browser to determine how to display text and multimedia
images, and how to interact between the reader and the web server providing
the document. In order to have an interactive website, the PHP language is
embedded into the HTML document. The main goal of the PHP language is to
allow web developers to write a dynamically generated web-pages. It allows
the operators to construct data into a website. The web server, which provides
8
Chapter 1: Introduction
the interactive website, is Apache web server. It is free open-source software
for web server. The acquisition software, which is used to collect the data from
the hybrid system, is written in C language under Linux environment. The
communication is based on GSM modem technology over TCP/IP network.
•
Low-power input module: This is a small module which is used to install the
interactive monitoring website. It is controlled by embedded Linux operating
system. Embedded Linux operating system is a small operating system and it
is free. It fits to small memory storage at an embedded computer. The
embedded computer is a small computer that serves only for a specific set of
jobs unlike a general-purposed computer. The embedded computer is
developed based on the internet application.
•
A standard web browser is used to view the interactive monitoring website.
With the interactive website, the operators can investigate the faults and problem of
the hybrid system. This will help the operator to enable immediate action to the
hybrid system. Moreover, the interactive website will help to improve the hybrid
system and increase the understanding of the system.
1.4.3 Work Structure
The thesis is structured as following chapters:
Chapter 2 will review the hybrid system and its components. The specification of PVdiesel hybrid system, which is used to implement in this project, is presented in this
chapter.
Chapter 3 will describe the embedded system both hardware and software.
Chapter 4 will present the concept of interactive monitoring website. The
methodology and tools will be described in this chapter.
Chapter 5 will present the implementation and results of the project.
Chapter 6 will describe conclusions of the work.
9
Chapter 2: PV-Diesel hybrid system technology
Chapter 2
PV diesel hybrid system technology
2.1 Introduction
PV-diesel hybrid systems generate electricity by a combination of photovoltaic array
and a diesel generator. They can be categorized according to their configuration as:
A) DC- Coupled Hybrid System or DC Bus Configuration
The DC-coupled hybrid system (figure 2-1), the energy from diesel generator and PV
array is used to charge the battery bank. The inverter converts DC voltage from BUS
to AC voltage to the load. The capacity of battery bank and inverter should meet the
peak load demand. The capacity of diesel generator should also meet the peak load
and charging the battery bank simultaneously.
Figure 2-1: DC Bus Configuration
B) Switched hybrid system or DC-AC Bus Configuration
The switched hybrid system (figure 2-2), the battery bank can be charged by the
diesel generator and the PV array. The load can be supplied directly by the diesel
generator. If the diesel generator output-power exceeds the load demand, the excess
energy will be used to recharge the battery bank. During period of low electricity
demand, the diesel generator is switched off and the load is supplied by the PV
array, together with stored energy from the battery bank. When comparing the overall
conversion efficiency, the switched system is higher than the DC-coupled hybrid
system.
10
Chapter 2: PV-Diesel hybrid system technology
Figure 2-2: Switched hybrid system
C) AC-coupled hybrid system or AC Bus Configuration
The AC-coupled hybrid system (figure 2-3), the diesel generator can supply the load
directly. The battery bank needs a bi-directional inverter to supply the load. During
low energy demand, excess energy from PV array is used to charge the battery
bank. The bi-directional inverter can charge the battery bank also when excess
energy is available from the diesel generator. The AC-coupled hybrid system has two
major advantages over the DC-coupled and switched hybrid system. The capacity is
from inverter plus the diesel generator capacity, rather than individual component
ratings that limits the maximum load. Second, the capability to synchronize the
inverter with the diesel generator allows greater flexibility to optimize the operation of
the system. This configuration will be implemented for this project.
Figure 2-3: AC Bus Configuration
The Off-grid electrification technology options (remote area power supply RAPS) and
hybrid system options can be an economic alternative to remote grid extensions
11
Chapter 2: PV-Diesel hybrid system technology
where conventional energy is very expensive or if conventional electrification is not
suitable some time.
PV-diesel hybrid system is attractive for powering in remote area: reduction of
running cost compared to fuel genset system, reduced investment cost compared to
only renewable energy system, increased reliability due to redundancy of generators
[14, 15].
2.2 System components
This section will describe the different components of PV-diesel hybrid system to give
an understanding of components and some aspects of their operation, which is
important in operation a hybrid system. Note that apart from the component
operation, load management and efficient use of surplus energy are also important in
operation of system.
2.2.1 Photovoltaic (PV) modules
A PV cell converts sunlight into DC electricity. However, PV energy is only available
when enough irradiation is accessible. The PV panels are available in wide range up
to 100 Wp. In some cases, panels are up to 300 Wp [1]. The PV can become costeffective for small power requirement in remote areas. Lifetime of PV panels is
depending on their type in range of 10-20 years.
A PV cell is made of at least two layers of semiconductor material. One layer has a
positive charge, the other negative. When light enters the cell, some of the photons
from the light are absorbed by the semiconductor atoms, freeing electrons from the
cell’s negative layer to flow through an external circuit and back into the positive
layer. This flow of electrons produces electric current. Figure 2-4 shows the solar cell
construction.
Figure 2-4: Solar cell design
More clearly, the PV cell is a semiconductor device that can convert solar energy into
DC electricity through the photovoltaic effect. Cell types include monocrystalline
silicon, polycrystalline silicon, amorphous silicon (a-Si), gallium arsenide (GaAs),
copper indium diselenide (CuInSe2, „CIS“), cadmium telluride, or a combination of
12
Chapter 2: PV-Diesel hybrid system technology
two materials in a tandem cell. At present, only silicon cells are available in large
quantities on the market [5]. In principal, a solar cell is a large-area silicon diode.
Figure 2-5 shows the circuit diagram symbol for a diode.
Figure 2-5: Characteristic of a Diode
The diode characteristic is defined as equation 2-1.
⎛ qV
⎞
I D = I 0 ⋅ ⎜⎜ e kT − 1 ⎟⎟
⎝
⎠
with
ID
IO
q
V
k
T
(2.1)
diode current [A]
dark current [A]
elementary charge [1.6*10-19 coul.]
voltage [V]
Boltzmann constant [8.65*10-5 eV/K]
diode temperature [K]
When light hits a solar cell, free charge carriers are created due to the photovoltaic
effect. This allows current to flow through a connected load. Photocurrent, which is
internally generated in a solar cell, is proportional to the radiation intensity. Figure 2-6
describes the equivalent circuit diagram for a solar cell.
I ph
I PV
I PV
ID
VD
VPV
VPV
Figure 2-6: Equivalent circuit diagram of a solar cell
13
Chapter 2: PV-Diesel hybrid system technology
The mathematical process of an ideal exposed solar cell leads to the following
equation:
IPV
= Iph – ID
⎞
⎛ qV
= I ph − I 0 ⋅ ⎜ e kT − 1 ⎟
⎟
⎜
⎠
⎝
(2-2)
with
IPV
current [A]
Iph
photocurrent [A]
IO
dark current [A]
q
elementary charge [e=1.6*10-19 As]
V
voltage [V]
k
Boltzmann constant [8.65*10-5eV/K]
T
diode temperature [K]
In an imaginary experiment, the I-V characteristic curve for a certain incident
radiation will be constructed as Fig. 2-7 and 2-8.
Iph
Icell
Iload
V load
R load
ID
VD
Figure 2-7: Equivalent circuit diagram of an ideal solar cell connected to a load
14
Chapter 2: PV-Diesel hybrid system technology
Photo Current
Diode Current
Cell Current
4,00
I sc
4
3,50
2
1
ID
3,00
Current I [A]
3
2,50
2,00
1,50
1,00
3
0,50
1
2
V oc
4
0,00
0,00
0,05
0,10
0,15
0,20
0,25
0,30
0,35
0,40
0,45
0,50
0,55
0,60
0,65
0,70
Voltage V [V]
Figure 2-8: Construction of the solar cell curve from the diode curve
When the terminals are short-circuited (Rload = 0), the output voltage and the voltage
across the diode is zero. According to (2-2): since V = 0, no current ID flows (point 1
in Figure 2-8) therefore the entire photocurrent Iph generated from the radiation flows
to the output.
Thus the cell current has its maximum at this point with the value Icell and refers to the
so-called short-circuit current Isc.
Isc = Icell = Iph
(2-3)
If the load resistance is now continually increased, the solar cell voltage also
increases whereas the current remains constant. Up to a certain voltage value the
current flowing through the internal diode remains negligible, thus the output current
continues corresponding to the photocurrent (point 2 in Figure 2-8).
Until the diode voltage threshold is exceeded after the load resistance is further
increased, a rapidly increasing proportion of the photocurrent flows through the
diode. This current leads to power loss in the internal diode corresponding to an area
between the photocurrent curve and the cell current curve. Since the sum of the load
current and the diode current must be equal to the constant photocurrent, the output
current decreases by exactly this amount (point 3 in Figure 2-8).
For an infinitely large load resistance (open circuit), the output current is then zero
(Icell = 0) and thus the entire photocurrent flows through the internal diode (point 4 in
Figure 2-8). The open-circuit voltage Voc can be therefore derived again from (2-2).
Voc
=
⎛ I ph
⎞
kT
⋅ ln ⎜⎜
+ 1⎟⎟
q
⎝ Io
⎠
15
(2-4)
Chapter 2: PV-Diesel hybrid system technology
where:
q = magnitude of the electron charge [1.6 ⋅ 10-19 As]
k = Boltzmann’s constant [8.65 ⋅ 10-5 eV/K]
T = absolute temperature [K]
The quantity I 0 defines the so-called dark- or saturation current of a diode. It plays a
very large role of the performance of a solar cell.
In addition, typical value of the open-circuit voltage is located about 0.5 – 0.6 V for
crystalline cells and 0.6 – 0.9 V for amorphous cells.
Power of a solar cell is the product of current and voltage (I-V) and can be described
in a curve as shown in Figure 2-9. Although the current has its maximum at the shortcircuit point, the voltage is zero and thus the power is also zero. The situation for
current and voltage is reversed at the open-circuit point, so again the power here is
zero. In between, there is one particular combination of current and voltage, for which
the power reaches a maximum (graphically indicated with a rectangle area in Figure
2-9). The so-called maximum power point (MPP) represents the working point, at
which the solar cell can deliver maximum power for a given radiation intensity. It is
situated near the bend of the I-V characteristic curve. The corresponding values of
VMPP and IMPP can be estimated from Voc and Isc as follows [8]:
VMPP ≈ (0.75 – 0.9) Voc
IMPP ≈ (0.85 – 0.95) Isc
The maximum power rating is the power at the MPP, rated current Impp and rated
voltage Vmpp correspond to the MPP. The rated power is measured under Standard
Testing Conditions (STC), i.e. at an irradiation intensity of ISTC=1000W/m2, cell
temperature Tcell=25°C and air mass AM=1.5 and is reported in peak watts Wp. A
maximum point power tracker (MPPT) may be necessary in order to operate at the
optimum point on I-V curve.
Figure 2-9: Power curve and maximum power point (MPP)
16
Chapter 2: PV-Diesel hybrid system technology
To increase their utility, dozens of individual PV cells are interconnected together in a
sealed, weatherproof package called a module. To achieve the desired voltage and
current, modules are wired in series and parallel into what is called a PV array. The
flexibility of the modular PV system allows designers to create solar power systems
that can meet a wide variety of electrical needs. Figure 2-10 shows PV cells,
modules, and arrays.
Figure 2-10: PV cell, module, and array [16]
Every PV panel has its specific voltage-current relationship (IV-curve). The IV-curve
of same module can be different when there is different radiation. Figure 2-11 shows
IV curve of a PV cell with different irradiation rate.
200 W/m²
400 W/m²
600 W/m²
800 W/m²
1000 W/m²
4,00
3,50
Current I [A]
3,00
2,50
2,00
1,50
1,00
0,50
0,00
0,00
0,05
0,10
0,15
0,20
0,25
0,30
0,35
0,40
0,45
0,50
0,55
0,60
Voltage V [V]
Figure 2-11: I-V curve at different irradiation levels [8]
17
0,65
0,70
Chapter 2: PV-Diesel hybrid system technology
As mentioned, solar cells are wired in series and in parallel to form a PV module. The
number of series cells indicates the voltage of the module, whereas the number of
parallel cells indicates the current. If many cells are connected in series, shading of
individual cells can lead to the destruction of the shaded cell or of the lamination
material, so the module can blister and burst. To avoid such an operation condition,
bypass diodes are connected anti-parallel to the solar cells as in figure 2-12. As a
consequence, larger voltage differences cannot arise in the reverse-current direction
of the solar cells. In practice, it is sufficient to connect one bypass diode for every 1520 cells. Bypass diodes also allow current to flow through the PV module when it is
partially shaded, even if at a reduced voltage and power. Bypass diodes do not
cause any losses, because under normal operation, current does not flow through
them.
Figure 2-12: Series PV cells with bypass diodes
The I-V characteristic curve of the series configuration as shown in Figure 2-13 is the
result for a given radiation intensity, which is equal for three of solar cells.
Three Cells
Two Cells
One Cell
12.0
10.0
Current I [A]
8.0
6.0
4.0
2.0
0.0
0.0
0.2
0.4
0.6
0.8
1.0
1.2
1.4
1.6
1.8
Voltage V [V]
Figure 2-13: I-V characteristic curve for series connection
18
2.0
Chapter 2: PV-Diesel hybrid system technology
2.2.2 Battery storage
There are several different types of battery chemistry including liquid lead-acid,
nickel-iron (NiFe), nickel-cadmium (NiCad), alkaline, and gel-cell. Batteries are either
sealed or vented. Simply, there are only two principal types of batteries: starting and
deep-cycle.
Starting batteries are designed for high cranking power, but not for deep cycling.
Used as energy storage, they will not last long in a deep cycle application. Starting
batteries use lots of thin plates to maximize the surface area of the battery. This
allows very high starting current but lets the plates warp when the battery is cycled.
This type of battery is not recommended for the storage of energy in hybrid system.
However, they are recommended as starting battery for the back-up generator.
Deep cycle batteries are the type of battery best suited for use with inverters. The
physical dimension of the plates is thicker and the active material that holds the
charge is denser to increase cycle life. The “deep cycle” type of battery is designed to
have the majority of their capacity used before being recharged. They are available in
many sizes and in either “non-sealed” or “sealed” types.
Usual battery inverters are optimized for use with lead acid batteries that have a
nominal voltage of 2.0 volts per cell. NiCad/NiFe batteries (also called alkaline
batteries) have a nominal cell voltage of 1.2 volts per cell. The nominal voltage of a
NiCad/NiFe battery bank can be made the same as a lead acid bank just by juggling
the number of cells (10 cells for 12 volts, 20 cells for 24 volts and 40 cells for 48 volt
systems). However, the NiCad/NiFe battery bank must be charged to a higher
voltage to fully recharge and will drop to a lower voltage during discharging
compared to a similarly sized lead acid type battery [17].
2.2.2.1 The lead-acid batteries
A basic equivalent circuit of the lead-acid battery is modeled by a voltage source with
an equilibrium voltage (VE) in series with an internal resistor (Rin) (see Fig. 2-14). It
must be noted here that this configuration can describe only a current state because
the magnitude of VE and Rin are not actually constant, but is function of many
parameters such as state of charge (SOC), temperature, current density, and aging
of the battery.
IB
R in
V in
VE
VB
R load
Figure 2-14: Basic equivalent circuit of the lead-acid battery for a current state [8]
19
Chapter 2: PV-Diesel hybrid system technology
Furthermore, it is to consider that these parameters depend also on the current
direction (charging or discharge). When the battery were at rest or under open-circuit
condition VB = VE. When current is drawn from the battery, the voltage will be lower
than VE. When current is flowing into the battery, the terminal voltage will be higher
than VE. For example, at each moment during discharge phase the terminal voltage
can be derived as follow:
VB = VE – Vin
(2-5)
= VE – Rin⋅ IB
where:
VB
VE
Vin
Rin
IB
=
=
=
=
=
(2-6)
terminal voltage [V]
equilibrium voltage [V]
internal loss voltage [V]
internal resistance [Ω]
discharge current [A]
Obviously, higher discharge current results in reduction of the terminal voltage.
Therefore, to specify the state of the battery by the battery voltage, discharge current
should be also measured.
In PV systems, it is necessary to know the performance of the batteries for longer
period. Additional elements are therefore considered to explain a dynamic- and a
quasi-static process (Fig. 2-15).
RΩ
Cp
IB
I
Rp
Vp
RS
VE
VB Rload
IS
Figure 2-15: Equivalent circuit of the battery regarding the dynamic and quasi-static
processes [8]
Regarding the dynamic processes over voltages partly due to the chemical reaction
and any processes such as diffusion processes of ions in the electrolyte are
simplified summarized and are described as a polarization voltage (Vp) whereas a
voltage drop in the grid and in the electrolyte is represented by a resistance RΩ.
20
Chapter 2: PV-Diesel hybrid system technology
For the quasi-static processes, a capacitor Cp, which is connected in parallel to a
resistor Rp, disappears. This derived model corresponds to the Shepherd model,
which is perhaps the most spread model worldwide [8].
An additional loss in the battery is due to self-discharge, which is represented by a
resistor RS (Fig. 2-15). This resistance is responsible for the emptiness of charged
batteries after they are left for so long although they are never in use. Good solar
batteries should therefore have very high RS in order to keep this loss as small as
possible.
IB = I - IS
(2-7)
where:
I = battery current, which should be provided [A]
IS = self-discharge current [A]
Anyway, the rated voltage of the lead-acid battery cell amounts of 2V. A common
12V battery consists therefore of 6 series connected cells. In practical, the terminal
voltage varies according to operating condition. However, due to the fact that acid
concentration changes during charging and discharge as stated before, the
equilibrium voltage can be estimated with following empirical equations:
VE ≈ Vk + acid concentration [g/cm3]
(2-8)
where:
VE = equilibrium voltage [V]
Vk = 0.84…0.88 (dependent on battery types [6])
For example, regarding a battery with H2SO4 concentration 1.28 g/cm3 and Vk = 0.84
for Tudor batteries [8]: thus the equilibrium ≈ 0.84 + 1.28 = 2.12 V.
In case of discharge, the minimum voltage level acceptable for a lead-acid battery is
defined as discharge voltage threshold. Falling below this threshold is called deep
discharge, with which the battery may suffer damage. In case that the battery is left
longer after deep discharge, lead of the support structure is converted to leadsulphate in rough-crystalline form, which during charging can be only bad or cannot
be converted again anymore. As a result, the battery loses a part of its storage
capacity; besides loss of support structure arises as well.
In practice, harmful deep discharge is to be prevented: the consumers will be
compulsory disconnected from battery as soon as the discharge voltage threshold is
reached i.e. with the help of a so-called deep discharge protection (DDP). This
threshold is basically given in the data sheets by the manufacturer for different
discharge currents. Preferably, the value of this threshold should depend on the
discharge current. The relation between the discharge current and the voltage during
discharge for the lead-acid battery is presented in Figure 2-16.
21
Chapter 2: PV-Diesel hybrid system technology
Figure 2-16: Discharge characteristic curves [6]
Figure 2-16 shows the discharge profile of the VARTA-OPzS battery type at several
constant current rates. The typical end-of-discharge voltage at these discharge rates
can also be noticed where the voltage starts to drop steeply. Moreover, the end-ofdischarge voltage varies between 1.75-1.9 V, depending on the battery type and the
discharge current. Higher service capacity is obtained at the lower discharge rates.
At higher discharge rates, the electrolyte in the pore structure of the plate becomes
depleted, and it cannot diffuse rapidly enough to maintain the cell voltage. However,
intermittent discharge, which allows time for electrolyte diffusion will improve the
performance under high discharge rates [6].
2.2.2.2 State of charge (SOC)
One important parameter to define the energy content of the battery is the state of
charge (SOC). This parameter indicates how much charge is available in the battery
referring to its capacity. This definition includes a degree of ambiguity, because the
capacity here can carry different values, either the nominal capacity, or the actual
capacity. Recent work is carried out in order to analyze the different definitions of the
SOC and their reference values [6]. State of charge, operation state of charge,
relative state of charge etc., all of them are parameters that carry different
estimations for the energy content of the battery. The following two definitions are of
interest:
- State of charge (SOC): is the ratio between the difference of the rated
capacity on the one hand and the charge balance on the other hand, as can be seen
in equation (2-9).
22
Chapter 2: PV-Diesel hybrid system technology
⎛ C − QBat
SOC = ⎜⎜ nom
⎝ C nom
⎞
⎟⎟
⎠
(2-9)
QBat = ∫ Idt
where
t
Cnom : the nominal capacity of the battery (Ah) (i.e. C10)
QBat : the Ah-balance (i.e. net Ah discharged or charged since the last
full state of charge), and I is the main reaction current (A).
- Relative state of charge: is the ratio between the difference of the actual
capacity on the one hand and the charge balance on the other hand, as can be seen
in the following equation (2.10).
⎛ C − QBat
SOC = ⎜⎜ act
⎝ C act
⎞
⎟⎟
⎠
(2-10)
where
Cact is the actual capacity of the battery (Ah). This definition is used
throughout this work.
The ability to determine the battery state of charge in a system at any time is very
important from the point of view of the system operation. Knowing the state of charge
continuously makes the system energy management possible. In addition, for a
stand-alone photovoltaic system, the required battery capacity can be more
accurately determined which implies higher reliability of the energy supply and lower
system cost [6].
2.2.2.3 Gassing
With 2.3 – 2.4 V, namely the so-called gassing voltage, gas is developed at the
electrodes in the battery, by which the water is decomposed into hydrogen and
oxygen. Both gases mix together in the battery providing detonating gas (explosive!)
and escape through ventilation opening in the vent plug. With the gassing, the battery
loses also water, which must be refilled according to maintenance within regular
intervals. The gas is the unwelcome secondary reaction of the chemical conversion
during charging because current is consumed for the electrolysis and therefore the
storage efficiency of the battery is made worse unnecessarily.
After the gassing voltage is exceeded, voltage stays approximately constant. The
whole charging current during this period results in H2 and O2, which is defined as
loss. For this reason, gassing can be represented by a Zenor diode in series with a
resistor RG (Fig. 2-17).
23
Chapter 2: PV-Diesel hybrid system technology
I PV
R in
V in
RG
RS
VE
VB
IS
VG
Figure 2-17: Quasi-static equivalent circuit with representation of gassing [8]
The Zener diode is reverse biased and therefore does not conduct until the charging
voltage exceeds its breakdown voltage, namely the gassing voltage. Then it functions
as a voltage regulator by keeping the voltage across it constant and allows the whole
charging current to pass through, which is dissipated in RG as heat. It must be noted
that this concept can be applied only for lead-acid batteries because gassing
destroys gel batteries (sealed type of lead-acid batteries).
Continually, heavy gassing damages the battery, so that in the data sheet the
manufacturers give the so-called maximum charge voltage, which is not allowed to
be exceeded during charging. This voltage is situated about 2.3 – 2.4 V per cell (with
20 °C) corresponding to 13.8 – 14.4 V for 6 cells. In many battery types, small
gassing for a short time is however required to mix the electrolyte and to provide an
equal acid concentration for whole cell volume [8].
2.2.2.4 Freezing of electrolyte
For applications with low ambient temperature, the lead-acid battery must also be
protected against freezing of electrolyte. The risk of freezing depends on the state of
charge. Figure 2-18 illustrates the freezing limit as a function of the state of charge.
0°
Temperature [°C]
- 20°
- 40°
s lu s h y u n til h a rd
- 60°
- 80°
0
20
40
60
80
100
S ta te o f c h a rg e [% ]
Figure 2-18: Freezing limit of a lead-acid battery dependent on the state of charge [8]
24
Chapter 2: PV-Diesel hybrid system technology
2.2.2.5 Cycle life of lead-acid batteries
The cycle life refers to a capability of the battery to withstand a certain number of
charge/discharge cycles of given depth of discharge (DOD). Since the lifetime of the
battery also depends on the average depth of discharge during cycling (expressed in
percentage (%) of rated capacity), the cycling capability may be more conveniently
expressed by multiplying this average depth of discharge by the battery lifetime
expressed in number of cycles. The result is called the nominal cycling capability,
which is expressed as the number of equivalent 100 % nominal capacity cycles.
The starter battery typically has a low cycling capability of less than 100 nominal
cycles, which means that it is able to withstand for example 500 cycles of maximally
20 % depth of discharge. The battery appropriate for PV application requires a good
cycling capability of at least 500 nominal cycles, which means that it should be able
to withstand for example 1000 cycles of 50 % depth of discharge. Fig. 2-19 shows
the cycle life as a function of DOD.
100
Depth of discharge [%]
80
Industrial batteries
60
40
Consumer
(starter)
batteries
20
0
0
1000
100
2000
3000
4000
5000
Cycle life [cycles]
Figure 2-19: Cycle life as a function of deep of discharge (Source: VARTA special report 3/1987)
2.2.2.6 The battery capacity
Previously, the storage capacity of a battery is expressed in Ah (Ampere-hours)
showing how many hours a certain current can be taken from the charged battery
until the battery is discharged, i.e. until the battery voltage drops to the discharge
voltage threshold.
Nowadays, it might be more favorable to express a battery capacity in dischargeable
energy, namely Wh (Watt-hours) or kWh (kilowatt-hours). However, these two ways
of expressing the battery capacity are equivalent because they are related via the
battery voltage, i.e. Ah ⋅ V = Wh.
25
Chapter 2: PV-Diesel hybrid system technology
Unfortunately, the capacity of a battery is not a constant quantity, but depends on the
amount of discharge current. The manufacturers give therefore the rated capacity of
their batteries always with regard to a certain discharge current.
The so-called rated battery capacity refers to the capacity of the battery under given
standard conditions: it is common practical to define the rated capacity at 20 °C by
discharging the battery with a rated battery current (I10), which refers usually to a
constant current, with which the battery will be completely discharged in 10 hours.
Some battery manufacturers indicate the 100-hour discharge capacity for batteries
intended for PV applications. When comparing such capacity, it should be
remembered that, for a given battery, the 100-hour capacity is always at least 30 %
higher than the 10-hour capacity [6].
Besides, battery capacity is also affected by the temperature: it falls by about 1 % per
degree below about 20 °C. Moreover, extreme high temperatures accelerate aging,
self-discharge and electrolyte usage [8].
2.2.2.7 Requirements for solar batteries
Typical requirements for the battery to be used in long term storage are:
•
low specific kWh-cost, i.e. the stored kWh during the whole life of the battery
•
long lifetime
•
high overall efficiency
•
very low self-discharge
•
low maintenance cost
•
easy installation and operation
•
high power
- Specific kWh-cost
Usually it refers to a sum of investment and operation costs of the battery divided by
the stored kWh (kWhΣ) during its whole life. This cost is thus influenced by the
battery’s lifetime.
- Lifetime
The lifetime of the battery should be long, especially in order to keep the specific
kWh-cost and the installation cost low, particularly in remote areas.
- Overall efficiency
The overall efficiency (ηΣ) is derived from charge or columbic efficiency (ηI) and
voltage efficiency (ηV):
ηΣ = ηI ⋅ ηV
(2-11)
26
Chapter 2: PV-Diesel hybrid system technology
The columbic efficiency is usually measured at a constant discharge rate referring to
the amount of charge able to be recalled from the battery (QD) relative to the amount
put in during charging (QC). Self-discharge will affect columbic efficiency.
ηI = QD / QC
(2-12)
The battery will usually need more charge than was taken out to fill it back up to its
starting point. Typical average columbic efficiencies are 80 – 85 % for stand-alone
PV systems, with winter efficiencies increasing to 90 – 95 %, due to higher coulomb
efficiencies when the battery is at a lower state of charge and most of the charge
going straight to the load, rather than into the batteries.
The voltage efficiency is determined by the average discharge voltage (VD) and
average charging voltage (VC). VC is lower than VD particularly by internal resistance
of the battery.
ηV = VD / VC
(2-13)
The overall efficiency (ηΣ) should be as high as possible, to be able to pass the
biggest proportion of the energy in the battery, which is generated by the PV
generator, further to consumers.
- Self-discharge
The battery discharges itself even without load connected. This effect is caused by
secondary reactions at it electrodes and proceeds faster with higher temperature or
older battery. Thermodynamic instability of the active materials and electrolytes as
well as internal- and external short-circuits lead to capacity losses, which are defined
as self-discharge. This loss should be small, particularly according to annual storage.
- Maintenance cost
The maintenance, e.g. water refilling in case of lead-acid batteries, should be kept as
low as possible.
- Easy installation and operation
Since batteries are driven often also from non-experts. Easy installation and
operation are therefore favorable.
- Power
In special cases battery must be highly loadable for a short time, e.g. at the start of
diesel generators or in case of momentary power extension of PV systems.
There are many types of batteries potentially available for use in stand-alone PV
systems. Useful data of available batteries given in Table 2-1 shows approximated
values and are provided as a guideline.
27
Chapter 2: PV-Diesel hybrid system technology
Table 2-1: Comparison between selection criteria of available batteries [8]
Type
Pb
NiCd
NiFe
Cycle life Investment
until 80 %
cost
DOD
[€/kWh]
Specific
kWh cost
[€/kWhΣ]
ηI
[%]
Selfdischarge
[%/month]
Temp.
range
[°C]
500...1500
0.17…0.30
> 80
3…4
-15°...+50°
0.30…1.00
71
6…20
- 40°...+45°
0.33
55
40
85...350
1500...3500 650…1500
3000
1000
0°…+40°
Since many values are dependent on charge and discharge conditions, they have not
been standardized for PV applications and for test purposes until now. Therefore, the
comparison between batteries and selection of the most suitable one for each
application are not easy. Due to particular operating conditions with PV applications
in practical operation, the cycle life given by manufacturer (and in Table 2-1) for
cycling load can be reduced more than half.
According to Table 2-1, it follows that in most cases the lead-acid batteries would be
the best choices for PV applications. The selection of suitable choices is to orient in
application purpose.
2.2.3 The Fuel generator
Diesel generators are the most common electricity producers in a large number of
small and decentralized power systems throughout the world and especially in
developing countries [6].
Depending on the fraction of renewable energy in the total energy consumption,
using of diesel generator of the hybrid system can be considered [17] as:
•
High renewable energy penetration system: In this case, the generator is used
mainly as a back-up unit and will not necessarily be started every day.
•
Low renewable energy penetration system: The genset is the main generator
and runs many hours every day. Fuel consumption and maintenance should
be optimized to decrease costs.
•
Medium renewable energy penetration system: The generator usually runs
from time to time.
Even in high renewable energy penetration systems, the fuel generator might be
needed to increase temporarily the overall electrical power of the system in order to
run some occasional big loads. In this case, parallel operation of the genset with the
battery inverter(s) is required to allow adding the power of all controllable power
units.
The characteristics of the demand, the possibility to operate in parallel with battery
inverter, and the penetration level of renewable energy will determine the size of the
standby generator.
To consider the generator, it makes sense to consider at the standard. The
international standard ISO 8528 provides distinguishes three classes of diesel
generator sets as:
28
Chapter 2: PV-Diesel hybrid system technology
Class 1:
generator sets for consumers with minor requirements for stability in
voltage and frequency behavior. (Lighting systems and simple electric
drives)
Class 2:
generator sets for consumers, which require voltage stability similar to
public grids, although higher deviations are accepted during load
variation. (Lighting systems, electric pumps, fans and elevators)
Class 3:
generator sets for consumers with high requirements to frequency and
voltage stability. (Telecommunication installations, devices with
sensitive electronic circuitry)
Back-up power in high renewable penetration (small hybrid systems < 10 kW) is
usually provided by single phase fuel genset. Many types of small genset are
available on the market with different power output characteristics. Main
characteristics of these gensets are:
•
Grid quality: usually class 1
•
The gensets are not designed for continuous operation.
•
Several fuels options are available: LPG, diesel and gasoline.
•
Several types of AC current generators are used: permanent magnet
synchronous or capacity excited asynchronous
•
Mechanical or electronic governor. With a mechanical governor, the engine
speed will decrease with the increase of the output power. With an electronic
governor, fixed or variable engine speed is allowed.
•
Use of a frequency converter: Only some new gensets have an inverter for
conditioning the power output of the electrical machine.
•
Rotational speed: one speed (50 Hz), 2 speeds (low idle and 50 Hz) or
variable speed
•
Parallel operation with other genset: possible only with inverter technology
•
Parallel operation with the battery inverter: the grid will have the quality of the
genset
Furthermore, there are some points to consider:
•
Petrol, LPG or diesel: Most hybrid systems use diesel units which are more
robust. Domestic petrol generators of the kind used in homes and shops are
relatively cheap and easy to move around and can be used with LPG already
available for cooking. However, they are not meant for continuous operation
over a period of years and can only be recommended for high renewable
energy penetration hybrid systems.
•
Manual versus electric (automatic) starting: Hand starting is far less
expensive. However automatic starting may be needed when power cuts are
frequent and operators are absent at remote area.
•
Type of cooling: Air-cooled units are easier to maintain than units are with
water-cooling.
•
Mounting: A separately mounted fuel tank is often preferable to an enginemounted tank, which is subject to vibrations.
29
Chapter 2: PV-Diesel hybrid system technology
•
Meter: A meter to record the number of run-hours is a very useful feature. It
helps the operators plan preventive maintenance.
•
Soundproofing: Soundproofed enclosures are usually expensive. Locally
enclosures are often cheaper and, in the case of units installed outside, they
also provide protection against the weather.
•
Revolutions per minute (RPM): Generators with low RPM ratings, such as
1500 to 1800 RPM, are slow running and have longer working lives. (Models
with RPMs of less than 1000 are rarely available.) Faster running models, with
RPMs of 3000 to 3600, are found to require more maintenance and greater
fuel consumption. A cheap model with a high RPM may therefore not be a
better choice than a more expensive model with a low RPM.
•
Fuel consumption: Fuel consumption per hour is dominant running cost. The
fuel consumption of a diesel engine generally depends on the machine type
and construction characteristics. Its efficiency varies from 20 to 37 % at high
load levels. Fuel efficiency drops drastically at low load levels. Diesel fuel
consumption is a function of the engine load and revolution. Figure 2-20
shows typical fuel consumption for a diesel generator as a function of the load
ratio.
Figure 2-20: Fuel consumption as a function of the diesel engine load ratio for an 80
kW generator [6]
30
Chapter 2: PV-Diesel hybrid system technology
2.2.4 Inverters for AC-coupled hybrid systems
Power converters are used to convert DC power from PV panels and batteries to AC
power. The most common power conversion devices are electronic inverters, DC to
AC inverter, AC to DC inverter, and bi-directional inverter. The inverter is normally
only single phase for small power ratings and it is possible to be connected into three
phases as in figure 2-21.
Figure 2-21: Three phase PV diesel hybrid system
Figure 2-21 shows an AC-bus three-phase system with three battery inverters, PV
string inverters, and a diesel three-phase generator. Additionally the system contains
a supervisory control unit, which is in charge of the energy management.
For stand-alone application, the output waveform of inverters becomes important.
The deviation from the ideal sinusoidal voltage is normally described as total
harmonic distortion (THD). For high-quality power supply, the THD of the output
voltage should be less than 5 %, which corresponds with the quality of the public grid
[8].
A second and very important element for stand-alone applications, the ability to
provide and to absorb reactive power should be mentioned. Typical loads requesting
reactive power are electric motors. In some inverter designs handling of reactive
power is limited depending on the load type. In this case, the acceptable power factor
is defined. The maximum power of the inverter is given in Kilo-Volt-Amperes (kVA)
instead of Kilo-Watts (kW). The energy of the reactive power, which is to be absorbed
and afterwards re-injected to the load, is normally stored in capacitors of appropriate
sizes.
Inverter efficiency is generally low at low power level and good (80%-90%) at high
power levels depending on the inverter type, see Figure 2-22.
31
Chapter 2: PV-Diesel hybrid system technology
Figure 2-22: Example of inverter efficiency versus capacity Pac/Pac(nom) [SMA]
A way of alleviating the problem of low efficiency is to operate the inverters only at
preferred levels of output. One improvement is realized that some inverters include
the maximum power point tracker (MPPT). The maximum power point tracker
(MPPT) is used to force the output of PV arrays to their maximum instantaneous
power. The MPPT can improve system energy efficiency.
Furthermore, stand-alone inverters should also be able to blow fuses. This
requirement is perfectly fulfilled with only a few inverters.
2.3 Typical electricity demands in rural areas
Load profiles describe electricity demand depending on time. Load profile estimations
are an important criterion for the selection of an adequate power supply system for a
remote village. Load profiles may be different for each remote village. Figure 2-23 to
2-26 are load profile information in different areas in Europe and in South Asia
regions [13, 17].
Figure 2-23: Load profile in Fitou, France
32
Chapter 2: PV-Diesel hybrid system technology
Figure 2-24: Load profile in the Starkenburg hut, Austria
Figure 2-25: Load profile in the Energy Park, Pitsanulok, Thailand
Figure 2-26: Load profile in Muara, Indonesia
33
Chapter 2: PV-Diesel hybrid system technology
It can be seen form the load profiles that the electricity demands are different in each
area. With respect to the development of a hybrid system, it is necessary to
categorize load profiles. It is possible to work out as two main and several
subcategories:
• Remote electrification
(night load profile or multi user profile)
remote settlements on low power level (i.e. several households and schools)
the most common appliances are lamps, television sets and refrigerators
• Professional application (day load profile or single user profile)
high reliability professional applications (i.e. workshops, hospitals, restaurants
and hotels) depending of the application, mostly appliances with high load
demand
In order to be able to properly size the hybrid system to provide an adequate power
supply system for a remote village, the peak power, the daily energy consumption
and the annual energy growth should be estimated according with load profile
category. This is necessary in order to size both the generating plant and the
conductor used in the distribution system. The sustainability of the system will not be
guarantied if the capacity of the system is too small and leads to consumer
dissatisfaction. On the other side, a too large capacity would mean additional
investment costs and possibly too high tariffs.
The more reliable approach to assess demand is to survey households in adjoining,
already-electrified areas or in a region with similar economic activities, demographics
characteristics, etc. This would assess the average initial loads per household in
these areas as well as their historical load growth. In addition, with helping of several
sizing methods and tools that are currently presented [1,6,13], the development of
hybrid system can be realizably utilized to supply the adequate power to remote
areas. The figure 2-27 is an example of the PV-diesel hybrid system in remote area
called “MiniGrid system” [17].
Figure 2-27: AC-coupled hybrid system for remote area [17]
34
Chapter 2: PV-Diesel hybrid system technology
2.4 Energy losses of Hybrid systems
Stand-alone PV diesel hybrid systems are designed to be totally self-sufficient in
generating, storing and supplying electricity to the local electrical loads. Over time
period, the energy supply and demand have to be balanced. The following
calculation (2-14) shows the energy balance of a PV-Diesel hybrid system.
EIN ≈ EOUT
(2-14)
where
E IN = E PV + E MG
EOUT = E LOAD + E LOSS
E PV
Energy generated by the PV array [kWh]
E MG
Energy generated by the motor generator [kWh]
E LOAD Energy supplied to the load [kWh]
E LOSS Energy losses [kWh]
The energy that has to be supplied from the motor generator can be determined as:
E MG = E LOAD + E LOSS − E PV
(2-15)
The objective of efficient energy balance is to minimize the energy that has to be
supplied from auxiliary energy sources. Additionally, the motor generator should be
operated near its nominal power to achieve high fuel efficiency. As shown in equation
2-15, energy losses are influent the energy demand and supply of the system
therefore it is necessary to identify the energy losses in the system in order to avoid
those losses.
A classification of all relevant energy losses in a stand-alone PV hybrid system is
given as Capture losses and System losses [4]. Capture losses account for the part
of the incident radiation energy that remains un-captured and which is therefore lost
within a global energy balance. System losses define systematic energy losses that
are due to the physical properties of the system components or the entire installation.
Energy conversion losses or DC power line losses constitute important contributions
to this category.
2.4.1 Capture losses
Capture or irradiation losses translate the fact that only part of the incoming
irradiation is used for energy conversion. The losses are classified as follows:
•
Shading losses
Losses due to shading correspond to the reduced energy received by a
shaded module or array with respect to the un-shaded one under otherwise
identical conditions. This direct irradiation loss can furthermore lead to
mismatch losses within the PV generator, caused by the non-uniform
irradiation distribution over the entire array. This phenomenon will be
discussed in some more detail hereunder.
35
Chapter 2: PV-Diesel hybrid system technology
•
Module orientation losses
Orientation losses translate the irradiation loss caused by a module disposition
other than perpendicular to the incoming sun rays.
The losses can be considerably reduced by using a tracking system that
allows an automated adjustment of the module's tilt angle according to the
sun's position. Any mechanical tracking system, however, requires regular
maintenance and represents a potential reduction of the system reliability. For
this reason, tracking systems are usually not used for stand-alone PV systems
and a fixed orientation and tilt angle is chosen instead.
•
Spectral losses with respect to AM 1.5
The module characteristics as they are given by the manufacturer are
determined at standard reference test conditions (STC), e.g., at a standard
spectrum of AM 1.5. The deviation between the available irradiation spectrum
and AM 1.5 causes the so-called spectral losses.
•
Reflection losses
Reflection losses are irradiation losses at the surface of the PV module where
a part of the incident sunlight is reflected and therefore lost for the energy
conversion process.
•
Surface soiling
A dirty module causes energy losses due to a reduced transmission of
sunlight at the module's surface.
2.4.2 System losses
System losses cover all energy losses which occur during the conversion of incoming
energy (solar irradiation, fossil fuel) into usable AC electricity. The losses can be
classified as follows.
•
Inverter and battery charger conversion losses
Inverter losses are due to the inverter's DC/AC efficiency. Since stand-alone
inverters are powered from the local DC grid the stand-by consumption is
included in this category. The battery charger's AC/DC efficiency is generally
somewhat lower than the DC/AC inverter efficiency. Note that AC/DC losses
are only one part of the overall losses generated during battery charging from
an AC source; battery storage losses (see below) and subsequent DC/AC
conversion losses occur before the initially provided energy can be consumed
by an AC load.
•
Battery storage losses
Storage losses comprise all energy losses within a battery. They are described
by the charge and discharge efficiencies of the battery as well as the selfdischarge characteristics.
•
Auxiliary generator losses
The specific fuel consumption of the auxiliary generator depends on its
operating mode. The corresponding generator efficiency defines the auxiliary
generator losses with respect to a maximum efficiency.
•
PV-battery mismatch losses
36
Chapter 2: PV-Diesel hybrid system technology
In many stand-alone PV hybrid systems the PV generator is directly wired to
the storage battery (in particular, this is the connection scheme of our test
bed). Hence, the operating point of the modules is defined by the actual
battery voltage. PV-battery mismatch losses are due to the difference between
the actual operating voltage and the maximum power voltage Vmpp; the PV
array does not function at its maximum power point corresponding to the given
meteorological conditions.
Maximum power point tracker (MPPT) aims at reducing the PV-battery
mismatch losses. However, when using such a device, MPPT-losses due to
the DC/DC conversion efficiency of the MPP-tracker have to be considered.
•
PV array mismatch losses
PV array mismatch losses are caused by deviations between the shapes of
the I-V curves of interconnected modules which form the PV array. As a result
the overall power output of the array is smaller than the sum of output powers
of all individual modules at a given operating point.
PV array mismatch losses can be of different origins: (a) differences between
I-V curves do exist even for modules of the same type. They are caused by
small variations in the manufacturing process; (b) partial shading of the PV
generator does not only create mismatch losses due to the spatial variation of
the irradiation (see capture losses above) but also due to the resulting
temperature differences, leading to deviations of the I-V curves; (d) differences
in cable length and resistance of different strings or sub arrays may cause
additional mismatch losses.
•
Wiring losses
Wiring losses comprise all ohmic losses between system components. DC
cable resistances, relays, switches or any other connections contribute to this
energy loss. Blocking diodes in parallel strings of the PV generator also form
part of the wiring losses. Due to the usually low AC currents compared to DC
currents, AC wiring losses can generally be neglected.
Figure 2-28: shows an energy flow diagram for a typical PV diesel hybrid system.
Figure 2-28: Energy flow
diagram for a typical PV
diesel hybrid system [4]
37
Chapter 2: PV-Diesel hybrid system technology
2.5 Overview of the PV diesel hybrid system selected for the project
The hybrid PV-Diesel system for this project will be built according to a small AC bus
PV diesel hybrid system. The generation units include one diesel genset, one battery
storage unit, and several photovoltaic arrays. The low voltage distribution grid
provides electricity to three different houses. The PV fields are integrated in the roofs
of the houses and the distributed concept is the Sunny Island of SMA.
The PV diesel hybrid system for the project has the following components:
•
1 Battery unit: 60V, 300 Ah (Exide OPZV 300)
•
1 Battery inverter: 3.3 kW (SMA Sunny Island)
•
2 PV fields: 2 x 1 kWp (orientation: vertical south)
•
2 PV inverters: 2x 850 W (SMA Sunny Boy 850)
•
1 back-up genset: 3 kVA (Honda EX3000)
•
Loads: 2 fridges, ventilator, TV set, lights
•
Load controls: EIB relays and plug timers
Figure 2-29 to 2-31 illustrate the PV diesel hybrid system installed at DeMoTec Hall
University of Kassel for implementation of the project.
AC 1~ / 230V
~
~
~
=
Battery
=
=
fuel genset
Load 1
PV 1
Load 2
PV 2
Load 3
Figure 2-29: Diagram of the PV diesel hybrid system of the project
38
Chapter 2: PV-Diesel hybrid system technology
Figure 2-30: Test facilities of the PV diesel hybrid system, installed at the DeMoTec
Hall, University of Kassel
Figure 2-31: PV modules for the system
39
Chapter 2: PV-Diesel hybrid system technology
2.6 Summary
The PV diesel hybrid systems generate electricity by combination of photovoltaic
array and a diesel generator. They can be categorized according to their
configuration into three categories: DC-coupled hybrid system, Switched hybrid
system, and AC-coupled hybrid system. The main component of the system
comprises of PV module, battery, generator, and inverter.
PV-Diesel hybrid system is attractive for powering in remote area: reduction of
running cost compared to fuel genset system, reduced investment cost compared to
only renewable energy system, increased reliability due to redundancy of generators.
Comparison of AC and DC bus system are presented [17] that for a pure PV system
without fuel genset, the DC system is generally preferable, unless most of the energy
is consumed during the daytime. For hybrid systems, with a decreasing solar fraction,
the AC system becomes more and more efficient compared to the DC system. The
AC system should thus be recommended when the genset energy share is high and
when a lot of energy is used during the day, while the DC system should be preferred
for high evening consumptions and high solar fraction.
Load profiles are necessary in order to estimate an adequate power supply system
for a remote village. Load profiles are different for each remote village. The study of
load profiles must be done in order to properly design the hybrid system.
Energy losses in the system have to be identified in order to avoid those losses. A
classification of all relevant energy losses in a stand-alone PV hybrid system is given
as Capture losses and System losses.
The PV diesel hybrid system is installed for the project according to the AC bus
configuration and using the load profile of remote electrification.
40
Chapter 3: Embedded Linux module: software and hardware
Chapter 3
Embedded Linux Module: software and hardware
3.1 Introduction
As mentioned, the objective of the project is to develop the embedded interactive
monitoring website for PV diesel hybrid system in rural area. The web server, which
provides the monitored data, will be installed at rural site. The energy supply for the
web server is totally provided by the hybrid system. Therefore, the web server
module has to be a small and low-input power module, which called “embedded
module”. This chapter will describe the embedded module, software, and hardware.
3.2 Introduction to the operating system
An operating system is a program that acts an intermediary between a user of a
computer and the computer hardware (see figure 3-1). The purpose of an operating
system is to provide an environment in which a user can execute programs. The
main purpose of an operating is to make the computer system convenient to use and
user can use the computer hardware in an efficient manner.
An operating system is similar to a government. The components of a computer
system are its hardware, software, and data. The operating system provides the
means for the proper use of these resources in the operating system. Like a
government, the operating system performs no useful function by itself. It simply
provides an environment within which other programs can do useful work [37]. The
figure 3-1 shows relation layers of computer.
Users
Application Program
Operating system
Hardware
Figure 3-1: Layers in a typical computer
3.3 Criticism of the Operating Systems
Nowadays, most of the computers are using the Windows as their operating system.
Microsoft-designed computer operating system is a program that controls the basic
functions of personal computers. Windows 3.0, Window 3.1, and Window 3.11 were
the three earliest versions of Microsoft’s Windows operating system. The
disadvantages of the Windows are that it requires more disk space, memory, and the
41
Chapter 3: Embedded Linux module: software and hardware
faster processors for the tools for developing Internet web pages and operating
system.
UNIX is a well-known operating system. More than one person can run multiple
applications, making it a multi-user and multitasking operating system. With UNIX,
each user logs in using a login name. Optionally, the user must also supply a
password. If the computer is attached to a network, it has several other identifying
items, including a domain name and an IP address. UNIX will run on every platform
made.
Linux is a full-fledged operating system. It provides full multitasking in a multi-user
environment. It gives a high quality of software for a cost far lower than other
commercial versions of UNIX. The Linux operating system was invented by a college
student named Linus Torvalds in the early 1990s and it has become the dominant
Open Source computer operating system [7,36].
There are many advantages of Linux, it is cheap, almost all the distributions are
available in their entirety as free downloads. Linux is a low hardware requirements
operating system. Linux can run on an old 486 with 16 megabytes of ram. Linux will
boot and run (with full graphical user interface) in less than 4 megabytes of ram.
Linux is available under the GNU public license, which states that anyone is allowed
to copy, distribute, and modify it. Anyone is explicitly allowed to make and use as
many copies as they need, without ever having to buy.
Linux is now the world’s most advanced and progressive operating system. Based
upon the mature UNIX operating system, Linux is the combined work of some of the
best minds in the computer world, who have pooled their talents, resources, and
accomplishments for the common good of all [29].
3.4 Embedded operating system
An embedded system is a computer used to control equipment for a specific problem
or specification set of work [7,26]. A general-purpose computer usually has general
missions. An embedded system has a limited mission.
The embedded systems were first used back in the late 1960s in communications to
control electromechanical telephone switches. As the computer industry has moved
toward over the past decade, embedded systems have moved along with it, providing
more capabilities for tiny machines.
Operating systems for embedded systems began to appear in the late 1970s, and
today several dozen viable options are available such as VxWorks, pSOS, Neculeus,
Embedded Linux, and Windows CE.
3.5 Why Linux?
The power, reliability, flexibility, and scalability of Linux, combined with its support for
a multitude of microprocessor architectures, hardware devices, graphics support, and
communications protocols have established Linux as an increasingly popular
software platform for a vast array of projects and products [28].
Linux is openly and freely available. Its supporting software components have
evolved to meet the diverse needs of the markets and applications to which Linux is
being adapted. Thus, Linux is the best choice for low cost operation.
42
Chapter 3: Embedded Linux module: software and hardware
3.6 Embedded Linux
Linux is well suited for embedded Internet devices because of its support of
multiprocessor systems as well as the advantages of an open source. Unlike a
general-purpose computer, an embedded system only requires enough software to
actually get a specific set of jobs done. This means the software requires less
memory, which is important for the embedded system that is not included a hard
drive and has limited memory storage.
Embedded Linux is a subset of Linux, stripped down to include only those elements
of Linux that are useful on an embedded system. For example, embedded systems
typically use a FLASH disk in place of a hard drive to store the file system.
Embedded Linux boots in just a few seconds and fits into a few Megabytes of FLASH
memory. Embedded Linux carries any or all of the features needed in any particular
products and can run any Linux software that is suitable and useful on the target
embedded system. Figure 3-2 shows the state of embedded Linux in market.
Figure 3-2: Status of embedded Linux
Figure 3-2 indicates that embedded Linux is the most favourite for embedded
systems. Linux is a robust operating system that has proved itself to be highly
reliable. Embedded Linux is a high performance software that can be optimized for
particular applications by the inclusion of specialized features or real-time extensions.
It provides the peace of mind of knowing for the destiny of projects [7,26,28]. The
figure 3-3 shows the reason of using embedded Linux for embedded applications
from developers.
43
Chapter 3: Embedded Linux module: software and hardware
Figure 3-3: Reasons of using embedded Linux
Figure 3-3 shows that the freely available source code is the most reason of using
embedded Linux.
3.7 Embedded Linux for the project
As mentioned in objectives, the project needs a small-embedded operating system to
support the specific jobs of the monitoring system and as illustrated in previous
section that embedded Linux is suitable for an embedded project. In order to
implement an embedded Linux for the project, the requirements of embedded Linux
and the requirements of project have to be specified. This section will introduce the
embedded Linux to the project.
3.7.1 Embedded Linux requirements
An embedded Linux works the same principle as a typical Linux system. The typical
desktop Linux system has tree major software layers [7]: the Linux kernel, a C library,
and application code as in figure 3-4.
44
Chapter 3: Embedded Linux module: software and hardware
Applications that
use C library
C library
Linux kernel
Hardware
Assembly that
calls
kernel
directly
Figure 3-4: Layers in a typical Linux system
From figure 3-4, the kernel has complete control over the hardware. Its drivers talk
with the hardware on behalf of applications. The next layer up from the kernel is the
C library in a typical Linux system. Among other things, the C library calls the kernel,
passing the parameters from the application code to the kernel. Finally, the farthest
out from the hardware is the application code. The applications cause the Linux
kernel (or hardware in some applications) to perform the intended task.
When designing the embedded application, it is important to realize that it is not
possible to break this hierarchy. For some applications do not use C library, it is
possible to run in the kernel itself as kernel thread, but it is not portable. For the
monitoring system in this project, the application will use the C library.
3.7.2 Project requirements
As mentioned in chapter 1, the interactive monitoring website will use the internet
technology to provide the monitored data at the website. The operators can access
the data via a web browser. The communication is a GSM modem over TCP/IP
network. The monitoring system is comprised of a monitoring unit (sensor unit), a
data acquisition unit, and a communication unit. The data acquisition unit will collect
the monitored data from the sensor unit and store the data into web server. The
operators have possibility to download data as well as to set operation parameters
online via standard web browser. Therefore, the requirements of the system can be
specified as figure 3-5:
45
Chapter 3: Embedded Linux module: software and hardware
Acquisition software,
C language, RS 232, and
RS 485
Web Server
PHP compatible
Interactive Website
GSM modem over
TCP/IP
Figure 3-5: The monitoring system software requirements
3.7.3 Embedded Linux Selection
After approving the project requirements, the embedded Linux is prepared to serve
all requirements. The direction of development consists of kernel porting, source
code, and kernel version. Kernel ports must exist for all CPU architectures in order to
make flexible for selecting hardware. The smallest possible embedded Linux
application that uses all three software layers (kernel, C library, and application)
consists of a kernel loader, the kernel, and statically linked application programs (or
called static application). The simplest way to build an embedded Linux application is
to start with one of the many embedded Linux distributions available on the Internet.
To consider the various embedded Linux distributors, the following specific questions
have to be answered.
•
What is the size of embedded Linux?
•
What architectures are supported?
•
How easy is it to use?
•
How customizable and how difficult is it to customize?
•
How much does it cost?
•
How well is the document?
•
How well is the support?
•
What are the requirements to use it?
•
Can a new version of embedded Linux be installed without changes?
By searching in Internet, the white dwarf Linux is fit to the project. The kernel and
packages are available cover all the requirements of the hardware and software [38].
The write dwarf is small enough to load in 16MB of Flash, but dense enough to
contain the features that embedded applications demand including:
•
•
•
•
•
•
A graphical package-based installer
Compatible with glibc 2.1.x binaries
TCP/IP tools including ftp, telnet, ping, hostname, ftpd, telnetd
A stripped down Apache 1.3.x web server
gcc development tools for libc5
ppp drivers and scripts
46
Chapter 3: Embedded Linux module: software and hardware
This small embedded Linux can be installed over the Internet via FTP or from a CD. It
is designed to install directly to the ChipDISK or to an IDE Drive. White dwarf Linux
supports IDE (hard drives and CDROM), Ethernet, TCP/IP, Telnet, FTP and WWW
(Apache 1.3.x). These can prove that this embedded Linux can fulfill the needs of
project. Table 3-1 contains some examples of embedded white dwarf Linux kernel.
Package name
base
bash
ls
chmod
cp
mv
mkdir
cat
tar
Table 3-1: Examples of embedded Linux Kernel
Path
Description
base.tgz
This package installs the basic file
structure for wd linux
bin/sh -> bash
Standard full featured shell
bin/ls -> ls.gnu
Displays contents of working
directory
bin/chmod -> busybox
Changes permissions of files
bin/cp -> busybox
Copy
bin/mv -> busybox
Move file
bin/mkdir -> busybox
Make a directory
bin/cat
Prints content of file to screen and
then quits
bin/tar
GNU tar archiving tool
Furthermore, the source code is available online. To install the White dwarf Linux, the
installation method is also available online at http://www.whitedwarflinux.org.
3.8 The embedded hardware selection
Previous sections determined the embedded Linux to meet the goals of the project.
This section will select the hardware for the project. To meet the objectives of the
project, the specifications of the hardware are:
•
It is a low-input power module (less consumption without disk drive)
•
It supports the embedded Linux (Processor architecture)
•
It provides storage memory for the monitored data (memory requirements)
•
It is suitable for internet development (internet/web base)
•
It has enough interface for internet development (input/output)
Unlike a standard PC, the embedded computer is more difficult to meet all
requirements with constraint environments. It should be realized that there is no
universal platform that fits all needs. However, the advantage of embedded Linux is
that it supports for virtually every microprocessor type. The overall goals that should
be considered are better, faster, and cheaper.
•
Better: in this context would be a high-quality hardware solution that perfectly
matches the system requirements with the minimal number of components.
The idea choice would include all necessary memory and peripheral functions
onboard, occupy minimal space, and consume almost no power.
•
Faster: it is preferable to choose the product with faster processor.
•
Cheaper: it is obvious to select the lower cost with the higher volume.
47
Chapter 3: Embedded Linux module: software and hardware
The best idea to select the hardware is also to consider the hardware that has had
success with embedded Linux. The Internet provides useful information about
embedded Linux are the embedded Linux consortium (ELC: www.embeddedlinux.org/), Linux devices (www.linuxdevices.com), Embedded Linux Journal (ELJ:
www.embedded.linuxjournal.com).
From project requirements in figure 3-5, the suitable hardware that is selected for the
project is JUMPtec PC-104 MOPS520. The followings are the specifications of the
embedded module [27,42].
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
32-bit Am5x86® CPU with 16KByte write-back cache
16/32/64MB SDRAM (onboard memory)
Phoenix BIOS, 256KB Flash
Four serial ports, One parallel port, Two USB ports
Davicom DM9102A network controller, 32-bit Fast Ethernet
100/10BASE-T autonegotiated
PC/104-Plus ISA/PCI bus connection (expandable)
Four ISA PC/104 card-drive capability
Four PC/104Plus card-drive capability
Integrated Drive Electronics (IDE) interface
chipDISK 250 MB
Floppy drive
Keyboard and PS/2 mouse
Real-time clock with external battery support
Watchdog timer (WDT)
5V-only operation, 900mA , less than 5 watts consumption
( P=5x0.9= 4.5 Watts so less than 5 watts in operation)
Figure 3-6: The embedded Module
Figure 3-6 shows the embedded module PC-104 MOPS520, figure 3-7 is the
diagram of the embedded module.
48
Chapter 3: Embedded Linux module: software and hardware
Figure 3-7: Diagram of the embedded Module
All specifications of the PC-104 MOPS520 indicate that it supports the needs of the
project requirements and it consumes extremely low energy. So that the PC-104
MOPS520 is selected for the project because it can fulfil all requirements both
embedded software and hardware. After the embedded Linux and embedded
hardware are approved, next step is to consider for other operation software of
monitoring system.
3.9 Overview of the Web Server
A web server is a program that runs on a host computer that serves up websites. In
other words, the web server program sits around awaiting requests from visitors' web
browsers for objects that it has in its possession, and then sends these objects back
for the visitor's viewing pleasure. Objects that web servers can serve include HTML
documents, plain text, images, sounds, video, and other forms of data. Web servers
and browsers communicate using HTTP (Hypertext Transfer Protocol, described next
section), a simple and effective language for requesting and transmitting data over a
network. Thus, sometimes web servers are referred to as HTTP servers.
Web servers come in various shapes and sizes. They run under a variety of
operating systems, have varying levels of power and complexity, and range in price
from rather expensive to free. Web Server is easily mentioned as a machine sitting
somewhere in the server room with big processing power and memory. It comprises
of:
Whole Web Server = Computer Hardware + Operating System
+ Web Server Software + Info Content
49
Chapter 3: Embedded Linux module: software and hardware
Operating System distinguishes which platform (Windows, UNIX, AS/400, and
Mainframe) the web server is running on.
The Web Server Software is a continuously looping server waiting for requests by
web client (browsers or other) for documents over the network. It will parse the
request, classify the request, and take the corresponding actions. The actions might
be executing a script, returning a document, accessing a remote database, etc. The
web server has to understand the request from the clients so that they must speak
the same language or same protocol. In addition, the protocol used by web server is
Hypertext Transfer Protocol (HTTP).
A port is analogous to a telephone extension. When a client program connects to the
server on the network, it requests the server program's port. This port indicates
exactly which server program the originating client wants to connect to. Data then is
written to the outgoing port (on the client's computer) arrives at the server program's
incoming port, where it is read. The Web Server has a default port, if the client does
not specific which port to connect to, it will default to port 80. Another word for default
port is well known port. Thus, the well-known port of web server is 80.
Info Content is the information being served by a web server. It could be data info
from a local disk or data from database or remote location transparent to the clients.
3.10 Hyper Text Transfer Protocol (HTTP)
HTTP defines a simple request-response language. A web client establishes a
connection with a web server by using HTTP. HTTP also defines how to correctly
phrase the request and how the response should look like. It does not define how the
network connection is made or managed, nor how the information is actually
transmitted; it is done by the lower-level protocols such as TCP/IP.
An HTTP request consists of the following:
1. The method, which must be one of a set of legal action
2. The Universal Resource Identifier (URI), which is the name of the information
request
3. The protocol version
4. Optional supplemental information
An HTTP response consists of the following:
1. A status line, which indicates the success or failure of the request
2. A description of the information in the response, this is the meta-data or metainformation
3. The actual information requested
Note that, the server replies to the request with a description of what is being
returned, followed by the information requested.
From the point of view of a server, any document is just a stream of bytes delivered
over the Internet. A simple ASCII text document is the same as a complicated
multimedia presentation. It is up to the web client (browser) to decode and
50
Chapter 3: Embedded Linux module: software and hardware
understand the document, and to present it to the users. Figure 3-8a and b show a
diagram of serving a web document from a web server.
(a)
(b)
Figure 3-8: Serving a Web Document from a Web Server: (a) requests (b) serves
51
Chapter 3: Embedded Linux module: software and hardware
From Fig. 3-8, HTTPd stands for HTTP daemon. A daemon is a UNIX background
process that implements the server side of a protocol. HTTPd is the program that
runs on a UNIX platform to establish a web server. Daemons are unique to UNIX
(which some would call a demonic OS). On other platforms, such as Microsoft
Windows NT, the web server is a background process implemented as a system
service.
From figure 3-8 can be described steps of serving a web document from a web
server as:
1. The httpd waits for a request to arrive from a web client in the Internet.
2. When a user click on a hyperlink such as www.openloop.com/index.htm, the
network software (TCP stack) of the web client computer locates the server
computer (using DNS or host file) and sets up a bi-directional network (socket)
connection from the client to the server www.openloop.com.
3. The Web Server parses and understands the request is a GET for information.
4. The web server now understands the protocol (example: Netscape browser).
5. The web server will search in the file system for /index.htm. Success: The
document is sent, Failure: An error message will be sent:
6. Close file and the connection (socket), client will then receive the data.
3.11 HTML Document
HTML stands for HyperText Mark-Up Language. HTML is a simple, universal markup language that allows Web publishers to create complex pages of text and images
that can be viewed by anyone else on the Web, regardless of what kind of computer
or browser is being used. The programmer can write the text code to create their
document to the public.
3.12 PHP Language
PHP, which stands for "PHP: Hypertext Preprocessor" is a widely used Open Source
general-purpose scripting language that is especially suited for Web development
and can be embedded into HTML. Its syntax draws upon C, Java, and Perl. The main
goal of the language is to allow web developers to write dynamically generated web
pages quickly. An introductory example is in figure 3-9.
<html>
<head>
<title>PHP Test</title>
</head>
HTML language
<body>
<?php echo "Here is PHP<p>"; ?>
</body>
PHP Script
</html>
Figure 3-9: Embedded source code of a PHP script in a HTML document
52
Chapter 3: Embedded Linux module: software and hardware
From figure 3-9, PHP script is different from a script written in other languages like
Perl or C, instead of writing a program with lots of commands to output HTML,
programmer can write an HTML script with some embedded code to do something
(example Fig. 3-9: to output “Here is PHP”). The PHP code is enclosed in special
start and end tags that allow program to jump into and out of "PHP mode".
PHP is server-side technology. The person viewing the web page needs no special
programs or browser plug-in for PHP to work. PHP is compatible with all major web
browsers. It allows a web developer to dynamically construct a web page based on
data gathered from a third source (a database or otherwise) and then communicate
that data through almost any means provided by the Internet. The real benefit of this
is the developer can do these things with little or no knowledge of the inner workings
between the CGI (Common Gateway Interface) and the database they are
communicating with.
As mentioned before PHP is a hypertext preprocessor. In a less technical sense, this
means that when a user points a browser at the web site, PHP gets a chance to
make "last-minute" changes to the page before the user sees it.
Figure 3-10, a web server with PHP installed takes the extra step of allowing PHP to
process the requested document before displaying it to the user. From this extra
step, PHP can then perform any operation including access the database, send email messages, or open a connection to another Internet service such as another
web server.
Figure 3-10: Web request processing with and without PHP
53
Chapter 3: Embedded Linux module: software and hardware
3.13 Apache web server
The Apache Project is a collaborative software development effort aimed at creating
a robust, commercial-grade, featureful and freely available source code
implementation of an HTTP Web server. The special advantages about Apache are:
•
Powerful: Apache's performance and reliability is legendary.
•
Feature-Rich: The Apache server supports a host of features, including: XML
support, server-side includes, powerful URL-rewriting, and virtual hosting.
•
Modular: User will find a module that can add the functionality needed.
•
Extensible: Apache is open source. All the information needed is right there in
the source code and numerous online resources.
•
Popular: At the time of this writing, Apache holds a smidge under 60 percent
of the web server market (see, figure 3-11).
•
Free: This is one instance where users do not necessarily get what they pay
for.
Apache web server is the most web server that has been used nowadays as shown
in figure 3-11.
Figure 3-11: Apache market [44]
Apache web server works in cycle, a client request is followed by a server response.
Figure 3-12 shows the cycle of web server.
54
Chapter 3: Embedded Linux module: software and hardware
Figure 3-12: Web server cycle [45]
The Apache web server processes a request and creates of a response as: (see
figure 3-13)
Figure 3-13: Apache request loop [43]
From figure 3-13:
1. Apache web server wait for a request
2. When a request comes then post and read the request
55
Chapter 3: Embedded Linux module: software and hardware
3. URL translation
4. Header parsing
5. Access control
6. Authentication
7. authorization
8. Checking the MIME (Multipurpose Internet Mail Extensions)
9. Fix up and response the document to the client
10. Loop back to logging and clean up, wait for another request
Furthermore, the Apache project is an effort to develop and maintain an open-source
HTTP server for various modern desktop and server operating systems, such as
UNIX and Windows NT, so that the Apache is very well suited for implementation of
web server.
3.14 Summary
As the advantage of open-source and freely available options, Linux is now the
world’s most advanced and progressive operating system.
Linux is well suited for embedded system because of its support of multiprocessor
systems as well as the advantages of an open source, thus embedded Linux is
selected for the project. The white dwarf embedded Linux kernel is selected to
implement in the project because it can fulfill the project requirements.
An embedded system is a computer used to control equipment for a specific problem
or specification set of work. Unlike a general-purpose computer, an embedded
system only requires enough software to actually get a specific set of jobs done. This
means the software requires less memory. The software can fit to the embedded
systems that are not included a hard drive and have a limited memory storage. The
system without hard drive can reduce energy consumption. Thus, the embedded
system is utilized for the monitoring system.
The JUMPtec PC-104 MOPS520 is selected for the embedded hardware because it
supports all requirements of the project as well as it can work with the embedded
Linux.
With the advantage of open-source code, Apache web server is well suited for the
monitoring website. HTML document and PHP script is used to build a dynamical
website for the interactive monitoring website, which allowing the operator to
download data and upload new parameters to the website. This advantage can
increase the reliability and capability of monitoring system.
56
Chapter 4: The interactive monitoring website for the hybrid systems in rural areas
Chapter 4
The interactive monitoring website
for the PV diesel Hybrid systems in rural areas
4.1 Introduction
As illustrated in chapter 2, the autonomous PV-diesel hybrid system power supply is
used worldwide to supply electricity in remote and rural areas where no grid, no
telephone line coverage, and often difficult accessibility. Therefore, the monitoring
system for the hybrid system is parallelly much important in order to keep the hybrid
system working reliably. To meet the goals of monitoring, it is necessary to develop a
suitable monitoring system for the hybrid system. This chapter will propose an
interactive monitoring website for PV-diesel hybrid system.
4.2 Concept of monitoring by website
As mentioned, there are other types of monitoring systems (SCADA, satellite) that
have been presented in order to overcome the goals of monitoring already.
However, according to many well-known problems with these systems including high
investment costs, special software requirements for client stations, and difficulties
with communication links. Therefore these systems have not been recognizably
implemented.
With the website monitoring system proposed, all above problems can be eliminated.
The monitored data is stored in the web server, operators can access the data via a
standard web browser (see Figure 4-1), and the communication link uses a standard
GSM modem over a TCP/IP network. In most cases, this link already exists and
there is no need for any special software for viewing the system.
Figure 4-1: The proposed interactive monitoring website system
57
Chapter 4: The interactive monitoring website for the hybrid systems in rural areas
From Figure 4-1 when accessing the website, the operator can download monitored
data as well as upload important operation parameters to the hybrid system inverters.
Using of the web base technology with the advantage of free open-source software,
the monitoring investment is very low both initial costs and running costs.
4.3 Monitoring system components
The monitoring system in this project is comprised of a monitoring unit (sensor unit),
a data acquisition unit, and a communication unit. As wireless communication
networks expand and the quality continue to improve, it becomes more attractive to
use a network like GSM for communication. In this way, data is delivered directly to
the main station and the network will not generate any additional costs for operator.
Next section will describe all the monitoring system components.
4.3.1 Monitoring unit
This unit is used to measure the actual operating data of the hybrid system. With
current technology, this unit is included in the inverter. This project will include
components from the Sunny Family product line from SMA. Sunny Family products
incorporate microcontrollers that can monitor the data from the hybrid system
continuously. The Sunny Boy is a DC/AC inverter for PV modules and the Sunny
Island is a bi-directional DC/AC inverter for battery management, including charge
control characteristics. Figure 4-2 is the diagrams of the inverters.
Figure 4-2: Diagram of the bi-directional inverter for the project [23]
From diagram, the inverter measures the monitored data of the system and defines
the voltage set point for charging and can automatically activate a diesel generator.
The inverters are always ready for the data acquisition unit to acquire the monitored
data from the inverters at any time.
58
Chapter 4: The interactive monitoring website for the hybrid systems in rural areas
4.3.2 Data acquisition unit
This is an embedded Linux system module, which includes data acquisition software,
a web server (described in previous chapter), and a hardware connection for a GSM
modem. It requires very low input power. Apache web server is installed in the
module for the website. Communications between the acquisition unit and the
inverters can be with either a RS232 or RS485 interface.
The data acquisition software has two main tasks. First, it will download and record
all of the measured data, which in this project will occur in intervals of one minute.
Secondly, the software will receive new parameters sent from the website and then
send these parameters to the inverters. The data acquisition software or data storing
software will be described in the end of chapter.
4.3.3 Communication unit
It will be based on a GSM modem over TCP/IP network. The GSM technology is an
industrial wireless solution that should work in every GSM network around the world
[12]. In this project, the GSM modem is incorporated with RS232 interface that can
be controlled by Linux operating system.
4.4 Monitored data and storage
The first question to ask is; “what will be monitored?” This usually falls into three
categories:
•
System energy production (most basic information)
•
Detailed engineering information such as the performance of various
components (input, output of component)
•
More specific research-oriented information (depends on information required,
e.g. irradiation)
The needs of analysis dictate the monitoring variables. Table 4-1 shows some
examples of monitoring variables of the project.
Table 4-1: Examples of monitoring variables
Variable
Abbreviation
PV voltage
Upv-Ist
PV current
Ipv-Ist
AC voltage
Uac
AC Current
Iac
AC frequency
Fac
Battery Voltage
Ubatt
Battery Current
Ibatt
59
Chapter 4: The interactive monitoring website for the hybrid systems in rural areas
The measured monitored data will be acquired and stored in the memory of the
embedded module as a text file (example: data_date.txt), because the text file is
easy to be opened with several programs. The name of each file will be the date of
monitoring.
As a limited memory of the embedded module, the website will allow operators to
delete the data files via website to manage the memory storage.
Capacity of module’s memory storage is enough for storing the data about ten
months so that the operator has to download the monitoring data within ten months
otherwise the oldest data file will be deleted to provide space for next storing (in
matter of fact, this will not happen, the operators normally access the data at least
one a month).
Data analysis of system will start as soon as possible after the monitoring system
begins operating. It should then be done on a routine basis, for example once a
month. Not only this will show whether the hybrid system and monitoring system are
working properly, but also when problems occur, the operators can enable immediate
action to the system.
To implement the monitoring website, the communication network is a connection
between the remote station and main station. Thus, it is necessary to understand the
communication network. Next section will describe an overview of communication
network and a network for the monitoring website.
4.5 Overview of the communication network
A network of computers is a set of independent computers (called nodes), sites or
hosts connected together and they are able to exchange data with communication
lines [31] (see figure 4-3).
Figure 4-3: Computer network
60
Chapter 4: The interactive monitoring website for the hybrid systems in rural areas
Networks are classified by considering the technique of transmission into two groups:
•
broadcast
•
point-to-point (peer-to-peer, PPP)
Broadcast networks are characterized that all machines share the same transmission
(logical) channel. Therefore when a machine sends a message on such a network,
all machines without exception receive it. Machines on such a network are identified
using addresses.
Point-to-point (peer-to-peer) networks are characterized by communication channels
that link only two specific machines, that is to say that a message must jump from
one machine to another to reach its destination. This network will be considered for
project.
The basic concept of networks is the communication and the exchange of data
between users. The communication system is in charge of the information transfer
and the right delivery to the final user. In this context, it is necessary to set up rules
so that both sender and receiver can understand each other. These rules are
managed by mechanisms called protocols.
Protocols correspond to a given implementation of a layer. The set of layers and
protocols is called network architecture. There are two important network
architectures that are referred, the OSI (Open Systems Interconnection) and the
TCP/IP reference model.
4.5.1The Open Systems Interconnect (OSI) reference model
The OSI reference model was developed in the early 1970s by the International
Standards Organization (ISO). Provides a set of general design guidelines for datacommunications systems and also gives a standard way to describe how various
portions (layers) of data-communication systems interact.
The hierarchical layering of protocols on a computer that forms the OSI model is
known as a stack. A given layer in a stack sends commands to layers below it and
services commands from layers above it.
The seven layers in order from highest to lowest are Application, Presentation,
Session, Transport, Network, Data Link, and Physical (see figure 4-4).
•
The Application layer includes network software that directly serves the user,
providing such things as the user interface and application features. The
Application layer is usually made available by using an Application
Programmer Interface (API), which are made available by the networking
vendor.
•
The Presentation layer translates data to ensure that it is presented properly
for the end user, also handles related issues such as data encryption and
compression, and how data is structured, as in a database.
•
The Session layer comes into play primarily at the beginning and end of a
transmission. At the beginning of the transmission, it makes known its intent to
transmit. At the end of the transmission, the Session layer determines if the
transmission was successful. This layer also manages errors that occur in the
upper layers, such as a shortage of memory or disk space necessary to
complete an operation, or printer errors.
61
Chapter 4: The interactive monitoring website for the hybrid systems in rural areas
•
The Transport layer provides the upper layers with a communication channel
to the network. The Transport layer collects and reassembles any packets,
organizing the segments for delivery and ensuring the reliability of data
delivery by detecting and attempting to correct problems that occurred.
•
The Network layer's main purpose is to decide which physical path the
information should follow from its source to its destination.
•
The Data Link layer provides a system through which network devices can
share the communication channel. This function is called media-access control
(MAC).
•
The Physical layer provides the electro-mechanical interface through which
data moves among devices on the network.
4.5.2 The TCP/IP reference model
TCP/IP commonly refers to a network architecture, but this acronym also refers to
two protocols that are closely bound: a transport protocol, TCP (Transmission Control
Protocol), IP (Internet Protocol). The "TCP/IP model" is actually a network
architecture of four layers in which the TCP and IP protocols have a major role, since
they constitute the official and most common implementation. Consequently, TCP/IP
means two different things: the 4-layer network architecture, and the set of two
protocols, TCP and IP.
The TCP/IP reference model can be described as a four-layer network architecture
(see figure 4-4):
•
The application layer, contrary to the OSI model, this layer is immediately
bound to the transport layer, simply because the session and presentation
layers are useless. The OSI model without these 2 layers is really close to the
TCP/IP model.
•
The transport layer, It has the same role as the transport layer of the OSI
model: it is used to make peer entities dialog with one another. Officially, this
layer only has two possible implementations: the TCP protocol (Transmission
Control Protocol) and the UDP protocol (User Datagram Protocol). TCP is a
connection-oriented protocol. Its role is to split up the message to be
transmitted into a form the internet layer can handle. UDP is a simple protocol.
•
The internet or network layer, this layer is the key of the architecture. It
realizes the interconnection of remote (heterogeneous) networks without
establishing a connection. Its role is to inject packets into any network and
deliver them to the destination independently to one another. Because of the
major role of this layer in the packet delivery process, the critical point of this
layer is routing. For this reason, it seems like the network layer of the OSI
model.
•
The host-network or link layer, it seems to comprise both physical and data
link layers of the OSI model. Actually, this layer has not been really specified;
the only constraint of this layer is to allow a host to send IP packets of a
network. In more concrete terms, this implementation is typical of the
technology used to build the local network (LAN). For example, LANs use
Ethernet; Ethernet is an implementation of the host-network layer.
62
Chapter 4: The interactive monitoring website for the hybrid systems in rural areas
Figure 4-4: The OSI and TCP/IP reference model [46]
4.5.3 Comparison of both models and criticism
The TCP/IP and OSI models are both based on the concept of independent protocols
stacks. The functions from both are the same. The TCP/IP model is the real
reference in the Internet world. The protocols associated with the OSI model are
rarely used any more [21, 31].
The OSI model is perhaps the most studied and most unanimously accepted network
structure but it is not the model which it is really implemented and used. The
specialists, who analyzed this failure, determined four main reasons: Bad Timing,
Bad Technology, Bad Implementations, and Bad Policies [21].
4.6 Communication Link of the proposed monitoring system
Because the monitoring system needs to communicate only between the monitoring
unit at remote site and the main station, therefore communication network of the
proposed monitoring system is PPP network. The link will be based on a standard
GSM modem over a TCP/IP network as described in figure 4-5.
From figure 4-5, the server will provide the monitored data at remote monitor site.
The operator can access the information by HTTP (as described in chapter 3). The
communication network will be based on the TCP/IP network model.
63
Chapter 4: The interactive monitoring website for the hybrid systems in rural areas
Browser
Server
HTTP
HTTP
TCP
TCP
IP
IP
Peer-to-Peer
Peer-to-Peer
GSM Link
GSM Link
Main station
Monitor station
Figure 4-5: The network layers of monitoring system
4.7 World Wide Web (The Client and Server Pair)
As a standard website is used for accessing the monitored data, this section will
describe a principle of internet, which normally called “www”. The World Wide Web is
often called "WWW" or simply "the Web". It brings millions of people all over the
world for communication on the Internet. Users simply use the web browser and
"click" in order to display a wide variety of multimedia information. The web browser
can be viewed as a web client which help users to access the oceans of information
on the Internet. On the other hand, The Web Server serves information to thousands
of web clients.
The Web is decentralized. It uses the Internet to connect the client (the customer)
and the server (the provider). The Internet is composed of a wide variety of
computers and networks that interoperate so that data can be exchanged among
them.
The Web is made by the following key technologies:
•
The address system, Universal Resource Locators (URLs), allows retrieval of
different kind of information on the Internet
•
The Hyper-Text Transfer Protocol (HTTP) defines the language (protocol) of
how web clients and servers should exchange multimedia information
•
The Hyper Text Mark-up Language (HTML) allows users to view multimedia
hypertext documents
•
TCP/IP serves as the "low" level protocol on the Internet allowing HTTP and
other application level protocol running on top of it as in figure below:
Figure 4-6 shows a diagram of web communication. It gives an overview how the
web is made.
64
Chapter 4: The interactive monitoring website for the hybrid systems in rural areas
Figure 4-6: Communication on the Web
Note that a Web server has very little role in how the information (it delivers) is
displayed or used. Normally, the web server delivers information and the browser has
to use it properly.
4.8 The Interactive website
As mentioned the website for monitoring the hybrid system can be accessed through
a standard web browser. The GSM modem is used for the communication network.
By accessing the website, the operators have the possibility to view important
operating variables or download the monitored data to the main station. Moreover,
the operator can access a link on the website to adjust a parameter of the system
inverters. The ability of download data and adjust parameter to the website is called
“interactive website”.
To serve as an interactive website, the PHP script is embedded into the HTML
document. With this combination, the website will role as an interactive website.
The figure 4-7 shows the diagram of HTML and PHP combination in the interactive
website.
65
Chapter 4: The interactive monitoring website for the hybrid systems in rural areas
Figure 4-7: Diagram of the Interactive Website with HTML and PHP combination
The diagram in figure 4-7 shows how a browser, an HTML form, a PHP script, and a
web server interact via the Internet. It can be described as:
1. View the data: when the client accesses the web server, the web server will
cooperate to the PHP script. The PHP engine will interpret the HTML
information back to client.
2. Upload data: the client sends data to the web server, the web server will
cooperate and send data to PHP document, and the PHP engine will
assemble the data to the HTML document.
This combination is therefore utilized for the interactive monitoring website of the PV
diesel hybrid system.
4.9 The interactive monitoring website for the hybrid systems
The concept of interactive website is the combination of HTML document and PHP
script as shown in figure 4-7. Only different from the interactive website is that the
interactive monitoring website has a set of monitoring software. The data monitoring
software (also called storing software or data acquisition software) will be responsible
for monitoring the monitored data from the hybrid system inverters and record the
monitored data. Next section will describe the data monitoring software and a
combination of interactive website with the data monitoring software.
4.9.1 Data monitoring software programming
Data monitoring software or storing software is written in C language. As the Sunny
family inverter is used for the project, therefore the software will work compatibly with
Sunny Inverter’s commands. All SMA source codes are linked in to the library of
embedded Linux. The software will send a command to the inverters via RS-232
communications. The microcontrollers in the inverter will react to a command and
answer to the software. The software will receive the answer from the inverter then
66
Chapter 4: The interactive monitoring website for the hybrid systems in rural areas
will store the monitored data into the memory at the web server as a text file. Figure
4-8 is a flowchart of the software (code programming can be found in appendix B).
Start
- Detect Inverters
N
Found?
Y
- System ready
N
Failed 10
times
Y
- Check input command
from webpage
Any command?
N
-
- Check time to read the
monitoring data
N
Y
1 minute?
parse the
parameters
(set or end)
-
Setting
parameters?
Y
Y
-
Read the monitoring
data
Store data as text file
- Send parameters
to inverters
End
Figure 4-8: Flowchart of the acquisition software
67
N
Chapter 4: The interactive monitoring website for the hybrid systems in rural areas
From the flowchart can be described as following steps:
1. As soon as the program started, the software will detect for the system
inverters.
- If the software could not detect the inverters, it will try again ten times.
If it is still not able to detect the inverter, the software will end and send
error to the web server.
- If the software found the inverter, software gets ready for monitoring
2. When the software gets ready, it will read the data from the inverters in
interval of one minute then stores the data as a text file into the web server.
The name of data is the date of monitoring. After saving the monitored
data, the software will get ready again.
3. If the operator adjusted a parameter, the adjusted parameter will store at
the webpage. The software will receive a signal and read the adjusted
parameter then sends parameters to the inverter. The software waits for
the answer from the inverter and then sends the result of setting to the web
server.
4. The software will work in forever loop. To stop the software, the operator
will send a command to interrupt the software via internet.
4.9.2 The interactive monitoring website
The concept of interactive monitoring website is described as in figure 4-9 (code
programming can be found in appendix A). From figure 4-9, it shows that the
operator can request data from the interactive monitoring website as in a typical
website. The HTML document will serve for the request of data from the operator. To
send new parameters to the inverters, the PHP language will support for this action.
The serving process of interactive monitoring website from figure 4-9 can be
described as following steps:
1. Request data
1.1 The operator connect to the server via GSM modem
1.2 Using a standard web browser to request the data from the website
1.3 Web server (Apache) will deliver the requested data, which are stored by
monitoring software, from HTML document files to the web browser at
operator side
1.4 The web browser will display the data at operator side according to a kind
of web browser such as Internet Explorer (IE) or Netscape
2. Send parameters to inverter
2.1 After connecting to the server, the operator accesses to the link of
parameter
2.2 The server will deliver data to the operator side and the operator can view
the adjustable parameters
2.3 The operator enters new parameters to the web-page, with the
combination of HTML and PHP, the new parameters will be save to a
special webpage called “webpage for inverter’s parameter”
68
Chapter 4: The interactive monitoring website for the hybrid systems in rural areas
2.4 The monitoring software will check to this webpage if the parameters are
changed, the monitoring software will send all new parameters to the
inverter
GSM Link
Web Page
Send or request data
Apache
Web Server
HTML
PHP
Operator
Hybrid
system
Monitor
Software
Web Page
for
inverter’s
parameter
Figure 4-9: Diagram of the interactive monitoring website for hybrid systems
From figure 4-9, it can be concluded that the interactive monitoring website proposed
is suitable and can be utilized for monitoring of the PV diesel hybrid system in rural
area.
4.10 Summary
Energy represents a basic drive for the economic and social development of a
country. However, the remote areas, where lack of infrastructure, have no access to
electricity because the utility grid extension is not a cost-effective option and
sometimes technically not feasible. Therefore, the autonomous PV diesel hybrid
system power supply is used to supply electricity instead of utility grid in rural areas.
When the hybrid system is used, in order to keep the hybrid system working reliably,
it is necessary to include a monitoring system. The aim of monitoring is to collect the
monitored data from a remote station to a master station. The monitored data is the
data that the operators want to analysis for the reliability of the PV diesel hybrid
system.
69
Chapter 4: The interactive monitoring website for the hybrid systems in rural areas
Systems in such rural areas are supervised commonly by yearly visits in conjunction
with a data logger. But this method is not a cost effective option for monitoring. Other
types of monitoring systems have been also presented, such as the SCADA
(Supervision Control and Data Acquisition) as well as a system using satellite
technology. With these systems, there are already many recognized problems
including high investment costs, special software requirements for client stations, and
difficulties with communication links.
To eliminate all above problem, monitoring by website is proposed. The website
monitoring system can offer more advantages. The monitored data is stored in the
web server. The operators can access the data via a standard web browser. The
communication link uses a standard GSM modem over a TCP/IP network and
normally this link already exists. In addition, there is no need for any special software
for viewing the system.
The interactive monitoring website proposed is comprised of monitoring unit, data
acquisition unit, and communication unit. The monitoring unit is used to measure
actual operation data of the hybrid system. With current technology, this unit is
included in the inverter. The Sunny family inverter from company SMA is used for the
project.
The data acquisition unit is the embedded module, which includes Apache web
server with the interactive website, data acquisition software (storing software), and a
connection to GSM modem. This data acquisition software will read the monitored
data from the inverters and store the data into the web server.
The interactive website, with a combination of the programming HTML script and
PHP script, provides the monitored data into internet. The operator has an ability to
download the data and upload the operation parameters via online. This can improve
reliability of the hybrid system.
The concept of interactive monitoring website shows that it is very suitable to be
utilized for monitoring the PV diesel hybrid system in remote area.
70
Chapter 5: Implementation and results
Chapter 5
Implementation and results
5.1 Introduction
As mentioned the interactive monitoring website is comprised of a monitoring unit
(sensor unit), a data acquisition unit, and a communication unit. The monitored data
is stored in the web server. The operators can access the monitored data via a
standard web browser and the communication link uses a standard GSM modem
over a TCP/IP network. This chapter will implement the interactive monitoring website
and will describe its results.
5.2 Orientation
From the concept of interactive monitoring website of previous chapter, the
interactive monitoring website proposed can be interpreted as in figure 5-1. The web
server, website, and acquisition software (storing software) are installed into the
embedded Linux module.
Figure 5-1: Diagram of the interactive monitoring website
From Fig. 5-1, the operator at the main station can access the embedded Linux
module via a standard web browser. The communication network is a GSM modem
over TCP/IP network. The data storing software will be responsible for monitoring the
monitored data from the hybrid system inverters. The monitored data will be stored
into the web server as a text file in interval of one minute. The name of the monitoring
file is the date of monitoring.
71
Chapter 5: Implementation and results
5.3 Implementation
Once the acquisition software is complied and installed to the embedded module, the
embedded module can be connected to the system inverters. Figure 5-2 is a
connection diagram of the PV diesel hybrid system and embedded monitoring
module.
Figure 5-2: Diagram of the system connection of the project [SMA]
From figure 5-2, Sunny Island inverter is connected to battery to manage the battery
voltage. The inverter is also connected to a start unit of generator to start a generator
when the system needed. Furthermore, the inverter is designed to measure the
voltage and current of the hybrid system.
As the bi-directional inverter is a battery management of the system so that it has to
be particularly cared for connection, if the connection is failed, the system will not be
started.
Figure 5-3 is a battery connection diagram. The operator has to make sure that the
connection is correctly wired accordingly to the figure 5-3. In figure 5-4, it shows a
picture of battery temperature sensor.
72
Chapter 5: Implementation and results
Figure 5-3: Diagram of the battery connection and the temperature sensor [SMA]
Sensor
Figure 5-4: Temperature sensor of battery [DeMotecHall]
From figure 5-4, the temperature sensor of battery is connected to the inverter. This
is very important in order to detect the battery temperature to the battery inverter for
protecting from the over temperature damage.
Furthermore, the connection to a generator must be also particularly cared. As the
PV diesel hybrid system is an combination of solar energy and diesel generator.
When load is high and the energy from battery and PV module is not sufficient to
supply the load, the inverter will activate the diesel generator. Therefore, it has to be
73
Chapter 5: Implementation and results
sure that the connection is correctly connected. Figure 5-5 is a connection diagram
for generator.
Figure 5-5: Generator connection [SMA]
From figure 5-5, to start the generator, the inverter will activate the contactor K1. In
this case, the operator has to connect the start circuit correctly and accordingly to the
generator type. After the generator started then the inverter will measure the
generator voltage. When the generator can supply in rated voltage, the inverter will
connect the generator (K2) to the system power line. If the hybrid system is correctly
connected and configured, the hybrid system should be working.
After the hybrid system is working then the monitoring system is implemented next.
Either the monitoring system can be connected to the inverters before or after the
hybrid system is started. As mentioned the acquisition software requires the
monitored data from the inverters in interval of one minute and then stores the
monitored data in to embedded module. The operator can connect to web server and
can download the monitored data to main station via GSM modem over TCP/IP
network. The operators can access to website via a standard web browser on either
Linux system or Windows system.
Figure 5-6 shows a picture of test facilities for implementation of the interactive
monitoring website.
74
Chapter 5: Implementation and results
Linux system
Windows system
Modem
Laptop Windows
GSM Modem
Embedded Module
Figure 5-6: Picture of the realized monitoring system
5.3.1 Modem Dial-in
As the modem is used to communicate between the monitoring website and main
station, thus the embedded module is set up for dial-in modem. The operator can dial
in to the embedded module by phone number and then can access the information
on embedded module by a web browser.
When the operator, at a main PC with a modem connected, dials in the telephone
number of the GSM modem at embedded monitoring module, the modem at
embedded module answers the call and connects the PC to the embedded module.
Once the connection is connected, the embedded module sends a login prompt to
the PC. Then the PC logs in and accesses the embedded module. The program that
is used at embedded module to handle dial-in is called getty.
The getty is the program that is run for dial-in. It answers the telephone. There are a
few different getty programs with slightly different names. Only certain ones work with
modems for dial-in. This getty program is usually started at boot-time. It must be
called from the /etc/inittab file.
75
Chapter 5: Implementation and results
There are four different getty programs: mgetty, uugetty, getty_em, and agetty. To
choose from these must be used a program with modem dial-in. The agetty is the
simplest and weakest of the four and it’s mainly for use with directly connected textterminals. The mgetty supports for fax and voice mail but Uugetty doesn't. The
getty_em is a simplified version of uugetty. Thus mgetty is the best choice. The
mgetty was written as a replacement for uugetty which was in existence long before
mgetty.
Modem dial-in involves the following subsystems (see Fig. 5-7):
1. The mgetty is merely to "pick up" the phone when it rings and to set up the
serial line. After this, it invokes pppd for Internet dial-in.
2. The PPPd program encapsulates internet traffic (TCP/IP) into serial packets,
which can be sent over the modem line to the client. At the beginning of the
connection, it authenticates the user.
- File /etc/ppp/pap-secrets is the list of users allowed to login in over
modem. The password list is supplied.
- PPPd program forwards network traffic to its final destination via internet.
Figure 5-7 shows diagram of dial-in.
File Server
PPPd
Pick up the phone
mgetty
Modem
Dial-in Client
Figure 5-7: Dial-in diagram
5.4 Results of the interactive monitoring website
Once the monitoring website is entered, with combination of HTML and PHP script,
the interactive monitoring website can provide up-to-date monitored data (interval of
one minute) of the hybrid system. This is very important because the operator can
enable an immediate action to the system when needed. The interactive website also
provides a possibility to adjust the inverter parameter via online. Figure 5-8 shows a
feature at the main page of the interactive monitoring website.
76
Chapter 5: Implementation and results
Figure 5-8: Main page of the interactive monitoring website
After the operator connected to the embedded module, the operator can open a web
browser and then enter the address of web server to access the website. Once the
operator accesses to the website at the main page (see figure 5-8), the operator can
immediately see some important monitored data of the system. This can help the
operator to know that whether the system is working or not. The feature of the
website that shown in figure 5-8 is opened by Internet Explorer. The Internet Explorer
will be used through the project.
5.4.1 Download of the monitored data
On the main page of the website, the operator can find a link to download the
monitored data. The operator will need a password to access this link. Once the
operator enters the password, the operator will see a data manager page on the
website. Figure 5-9 to 5-11 show the download link and data manager page.
77
Chapter 5: Implementation and results
Figure 5-9: The link to
download and set
parameters on the
website
Figure 5-10: password
area
Figure 5-10:
Figure 5-11: Data
manager page
78
Chapter 5: Implementation and results
From figure 5-11, operator can download the monitored data from the data link on
this manager page of website by clicking on the monitored data file and save the file
to the main station. As mentioned, the embedded module has a limited memory so
that the operator should download the monitored data in routine and then should
delete the old monitored data in order to provide space for next monitoring.
To delete the old file, the data manager page provides a delete function for the
operator (see figure 5-12). If the operator does not delete the old data and if the
memory is full, the acquisition software will delete the oldest data in order to keep
space for storing the monitored data of next day.
To delete the old monitored data, the operator just has to click on the monitored data
that needs to be deleted and then clicks on a delete menu. Once the delete menu is
clicked, this will delete the selected monitored data. Figure 5-12 shows a delete
menu on the website.
Figure 5-12: Delete data
menu
5.4.2 Set the parameters
At the link; Set the Parameters, the operator can access a parameter webpage. To
access this webpage, the operator needs also a password. After the operator enters
to this page, the operator can select the inverter, which to be set. Once the operator
selects the inverter, all current values of all parameters will appear. This will help the
operator not to make a mistake for adjusting parameters.
Figure 5-13 shows the parameter webpage. The parameters of the inverter will
include a channel number, parameter name, and current value (see Fig. 5-13). These
three values are very important for setting a parameter. The operator has to enter
these three values correctly and accordingly to parameter type.
79
Chapter 5: Implementation and results
Figure 5-13: Feature of
parameter page on the
website
To set parameter, the operator has to know exactly what the operator want to do
otherwise the system will not work correctly when an improper parameter is inputted.
Note that, if the operator entered a wrong channel value according to parameter
name, the inverter will not accept the parameter.
Figure 5-14 shows a parameter menu on the website. From figure 5-14, the operator
has a possibility to set three parameters to the inverter at the same time. The reason
of providing only three parameters at the same time is that the inverter needs interval
time to receive parameter. It also depends mainly on time to transfer data between
web server and main station. If there are so many parameters sending to the inverter
at the same time, it will take so long to set all parameters then the web browser will
have an error. Therefore, it is not advantage to set many parameters at the same
time.
Figure 5-14: the webpage
of setting parameters
80
Chapter 5: Implementation and results
After sending the parameters to the inverter, the website will show the result of
setting parameters. If the parameters could not be successfully set, the operator can
try to set again. If the parameters were successfully set, the website will show the
result of new parameter values.
5.5 Result of data analysis
As mentioned, the monitored data is stored as a text file. Data analysis can be
started as soon as the operator finished downloading the monitored data to the main
station. Data analysis will be done on a routine basis, for example once a month.
This will help the operator to make sure that the system is working properly and when
problems occur, the operators can enable immediate action in time.
5.5.1 The monitored data from the battery inverter
A monitored data file can be implemented with several programs. The Excel program
is used to implement the monitored data file through this project. As mentioned, the
data analysis can indicate the reliability of the system and the operator can learn the
system behavior from the analysis. The file of the monitored data includes a time of
monitoring and other important parameters. Figure 5-15 is an analysis of the
monitored data: power converted from battery (Pconv), power from PV module (Ppv),
and power from generator (Pext).
From figure 5-15, it can be described as:
•
Graph begins at midnight, the power from battery has supplied the load. The
power from PV module is zero (no radiation).
•
In the morning, load is increasing. Unfortunately, the weather is not so good
on this day so that the power from PV module is not so high. The battery is still
a main power supply for the load. It has obviously seen that when the radiation
is high, the battery decreases the power to the load.
•
Until about 19.30 PM, the batter is empty so that the generator starts to supply
the energy to the system. It shows that the power from battery is negative at
this time. This indicates that the power from the generator also charges the
battery.
•
When the battery is full, the generator stops running. The battery supplies
power to the load.
The graph from figure 5-15 indicates that the hybrid system is working properly.
Furthermore, the operator can learn the behavior of the system in order to optimize
and design the new system in the future.
81
Chapter 5: Implementation and results
Figure 5-15: Power from Battery, PV module, and Generator
As in the figure 5-16 shows the power from battery (Pconv) and its’ SOC (State of
charge). As mentioned in chapter 2, the SOC indicates how much energy available in
the battery. The inverter will monitor the SOC of battery. If the SOC is low at the setpoint, the inverter will activate the generator. Figure 5-16 can be described as:
•
When the battery supplies power to load, the State of Charge (SOC) is
decreasing. In the morning, when the load is high, the power of battery to
supply the load is rapidly increasing. At this point, the SOC is also rapidly
decreasing.
•
When the SOC is at the set-point about 40% on the graph, the generator is
started to supply the system.
•
The power from generator also charges to the battery so the SOC is
increasing.
•
When the power from the battery reaches the high-level set-point about 80 %,
the generator stops running.
From graph on figure 5-16, it can make sure that the system is working. Moreover,
the operator has a possibility to change the set-point of the SOC via website in order
to optimize power for reliability.
82
Chapter 5: Implementation and results
Figure 5-16: Power from Battery and its SOC (State of Charge)
The battery management inverter of the hybrid system is very important. It monitors
the limit values for current, voltage, and temperature. It controls and monitors the
charge depending on its SOC. The battery is charged accordingly to the type of
battery. The operator has to enter a correct type of battery to the inverter. The final
charge voltage of the battery is adjusted to the respective battery temperature. Above
20° C, the charge voltage is decreased.
The inverter has four charging method as followings:
•
Normal charge (as often as possible)
•
Full charge (about one a mount)
•
Equalizing charge (about every 2-3 mounts)
•
Float charge (after charge completed)
Charging is initialized by the battery management when the battery state has been
reached. Figure 5-17 shows a diagram of battery charging method of lead-acid
battery. A normal charge is made when the SOC has fallen below 70%.
By default, a full charge is completed about every two weeks. The full charge leads to
complete charging of battery in order to avoid irreversible aging due to low SOC. An
equalizing charge is initiated about 180 days preventing the individual cells that have
charged different degree. Float charge is to switch off charging according to criteria
voltage of the battery.
83
Chapter 5: Implementation and results
180 days or 30 charge
throughputs
Normal charge
U=2.55 V
Equalizing charge
U=2.45 V
14 days or 8charge
throughputs
Full charge
U=2.55 V
Float charge
U=2.23 V
180 days or 30 charge throughputs
Figure 5-17: Charging method of the battery [SMA]
From figure 5-17, when the SOC is below 70% the normal charge is made. From the
normal charge, when the battery voltage reached 2.55 V. The charging method is
able to go for the float charge, the full charge, or equalizing charge. If period is not at
full charge or equalizing charge, the charging method will go to float charge. If period
is over 14 days, the charging method will go to the full charge. At full charge, it will
charge and keep the battery at 2.55 V for five hours then go to the float charge. If
period is over 180 days, the charging method will go to the equalizing charge. At
equalizing charge, it will charge and keep the battery at 2.45 V for ten hours then go
back to the float charge.
Moreover, the inverter has a switching operation. The SOC is determines the action
of charging. The inverter has eleven state relays to control the battery charging.
Figure 5-18 shows a diagram of switching operation depending on the SOC.
Figure 5-18: Switching operation depending on SOC [SMA]
84
Chapter 5: Implementation and results
From figure 5-18, when SOC is lower than 40%, relay N4 is switched on activating
the generator to charge the battery. If the battery is lower than 30%, relay L1 is
activated to switch off some consumers (in case, generator is not started). If SOC is
below 20%, relay L2 is activated to switch off all consumers. If SOC is below 10%,
the inverter is deactivated.
If the SOC is higher than 100%, relay 01 is activated to switch on dump load and if
the SOC still in creases the relay 02 is activated to switch off other power source (if
applicable).
However, the calculation of relay operation also respects to battery temperature and
the charging method as well as the set-point of SOC. The lead-acid battery is
working well in range of 40% - 70% of SOC. Therefore, the operator should adjust
the set-point in between this range.
As mentioned, battery temperature is one of the most important parameters of the
system. Figure 5-19 shows a graph of battery voltage (Ubat mean), battery current
(Ibat), and battery temperature (Tbat mean) of the system.
Figure 5-19: Battery voltage, current, and temperature
From the figure 5-19, it shows that the increasing of temperature depends on the
change of battery current. At night, battery temperature is decreasing because of the
weather and low load. In the morning, when battery supplies power to load, the
temperature is increasing a little bit according to the change of battery current. During
charging battery, the battery current and voltage are increasing rapidly so that the
temperature is also increasing rapidly.
This can be describes in term of battery current (Ibat) as: when the current flows, it
produces power (heat): P = i 2 R ; P is the power in term of heat, i is the battery
current, and R is the resistance of battery.
85
Chapter 5: Implementation and results
Figure 5-20 shows the system frequency (Fconv) and the generator power (Pext).
During the battery supplies power to the system with out the generator, the system
frequency is stable at 50 Hz. When the generator starts, the frequency is fluctuated.
This is a common phenomenon because of the process of synchronization.
Figure 5-20: System frequency (Fconv) and generator power (Pext)
The fluctuation of frequency is very important in the power system. It should be
considered according to standard of each country. The fluctuation depends strongly
on the efficiency of generator and inverter. From figure 5-20, the fluctuation is
between 49.87 to 50.1 Hz, which is acceptable.
Figure 5-21 shows the system without PV module. It is obvious that the battery is
empty on about midday and the generator has to start to supply the power to the load
as well as to charge the battery. From the figure 5-21, it can be described as:
•
The system is supplying the energy to the load as normal operation.
•
Load is increasing in the morning. All energy is from the battery. Until midday,
the battery is empty thus, the generator starts to supply to the system.
•
When the battery is full, the generator stops running about 16.30 PM and the
battery is supplying to the load.
From the graph 5-21, it is obvious that without PV module, the battery is empty very
early and the generator has to start very early. With this monitored data, the operator
can learn this behavior of the system for improvement in the future.
86
Chapter 5: Implementation and results
Figure 5-21: Power from Battery (Pconv) and Generator (Pext) without PV modules
Figure 5-22 is the power converted from the battery and its State of Charge. On the
graph, when the state of charge reached the set-point 40%, the generator is started
to supply the power to the system.
Figure 5-22: Power from Battery and its SOC (State of Charge)
87
Chapter 5: Implementation and results
Figure 5-23 shows the battery voltage and the battery temperature. It indicates that
the battery temperature is increasing when the battery voltage is changed especially
during the charging time.
Figure 5-23: The Battery Voltage (Ubat mea) and the battery temperature (Tbat mea)
Figure 5-24: Pconv, Ppv, and its SOC without starting the generator (Pext)
88
Chapter 5: Implementation and results
Figure 5-24 shows the system without running the generator. In this case, the system
receives the power from the PV module during the day. Until the end of the day, the
battery is not empty. The SOC did not reach the set-point so that the generator was
not stared on this day.
5.5.2 The monitored data from the PV inverter
The monitored data of PV inverter indicates energy situation from radiation. As the
PV diesel hybrid system is the combination of solar energy and diesel generator. It is
very important to analyze the monitored data for PV inverter in order to evaluate the
system ability and improve the system sizing.
The PV inverter completely consumes energy by itself. The PV inverter will activate
itself when radiation is high enough at the start voltage of PV inverter. When the PV
inverter is activated, PV power will be supplied to the system. The PV inverter will
deactivate itself when the PV voltage is lower than the stop voltage of PV inverter.
The start and stop voltage of PV inverter can be adjusted via website. Figure 5-25
shows a graph of PV power from the PV inverter.
From figure 5-25, PV inverter begins to connect the PV power to the system at about
9.00 AM when the sun radiation was high enough and disconnects from the system
at about 19.30 PM when the radiation was lower than the stop voltage. The PV
power is increasing when the radiation was high usually on midday.
Figure 5-25: Power production of the PV module
The many spikes in the center part of the graph because of the weather. The sky was
not so clear on the day of monitoring.
From data analysis, the operator can make sure that the system is working properly.
Furthermore, the operator can learn from the monitored data in order to optimize the
system and to keep the system working reliably.
89
Chapter 5: Implementation and results
5.6. Summary
A low input-power embedded module with an embedded Linux system is utilized for
an interactive remote monitoring website for a PV-diesel hybrid system. A GSM
modem over TCP/IP network, which allows the data to be transmitted directly to the
main station, is used. The monitoring system requires very low investment and
operation costs because of the open source software and there is no need for any
special software at the workstations. The operator can access the monitoring website
via a standard web browser.
The interactive monitoring website allows the operator to adjust parameters of
inverter via website as well as download the monitored data to the main station. The
operator has an ability to analyze up-to-date monitored data.
The ability to access, to analyze the up-to-date monitored data and to change
operation parameters online, improves the reliability of the hybrid system. The
operator can be sure that the hybrid system is working properly. The operator can
learn the behavior of the system from the analysis. In addition, these advantages can
improve the public’s image of renewable systems, piquing their interest in the PV
area.
The embedded interactive monitoring website shows itself to be a very suitable
solution, especially in remote areas where there is a lack of infrastructure.
90
Chapter 6: Conclusions
Chapter 6
Conclusions and outlooks
This thesis has addressed two points: the rapidly evolving technologies on electricity
generation with photovoltaic modules and the internet web based technology for
monitoring of PV diesel hybrid systems in remote areas.
The thesis has illustrated that in the last decade of the 20th century the world market
penetration of PV has been increased tremendously worldwide because PV can
provide clean energy without environmental problems. Moreover, in remote and rural
areas, a PV diesel hybrid system, which is a stand-alone energy system combining
solar energy and a diesel generator with batteries for energy storage, is used to
supply energy world wide. Because of that the provision of grid electricity in remote
areas is often associated with higher costs to the grid supplier. Grid electrification in
remote areas in many cases is financially inefficient particularly due to the low
consumption in remote areas. Therefore the PV diesel hybrid system is very suitable
for providing electricity in remote area.
When the PV diesel hybrid system is installed, in order to keep the hybrid system
working reliably, it is necessary to include a monitoring system. The work of this
thesis has mainly concentrated on an interactive monitoring website of the PV diesel
hybrid system installed in remote and rural areas.
The interactive monitoring website proposed and investigated in the thesis is
comprised of a monitor unit, a data acquisition unit, and a communication unit. The
concept of the proposed interactive monitoring website is that the monitored data is
stored in the web server at remote site. The operators can access the monitored data
via a standard web browser and the communication link uses a standard GSM
modem over a TCP/IP network. The interactive monitoring website allows the
operator to download the monitored data and upload operation parameters to system
components directly online via the website.
The monitoring unit of the website is used to monitor the actual operation data of the
PV diesel hybrid system. With current technology, this unit is included in the inverter.
The Sunny family inverter from the SMA Company has been used for the project.
The data acquisition unit of the monitoring website is an embedded system, which is
a small and low-input power consumption module. As an embedded system is a
system that has no a hard drive and has limited storage memory, an embedded
system requires an embedded operating system, which is a set of software only to
get a specific set of jobs done, this means the software requires less memory.
As the advantage of open-source and freely available options, Linux is the world’s
most advanced, progressive, and well suited for embedded operating systems.
Therefore, an embedded Linux operating system is implemented for the interactive
monitoring website.
The data acquisition unit of the monitoring website includes an Apache web server,
an interactive website, a data acquisition software, and a connection to the GSM
modem.
The Apache web server is a freely available source code implementation of an HTTP
Web server. HTTP defines a simple request-response language. A web client
establishes a connection with a web server by using HTTP.
91
Chapter 6: Conclusions
The interactive website is a dynamic website that allows the operator to view and
download data from the website as well as input some data to the website. The
interactive website is a combination of a HTML document and a PHP script.
The HTML document is a script language that allows Web publishers to create
complex pages of text and images that can be viewed by anyone else on the Web.
The programmer can write the HTML text code to create a website to the public.
PHP script is a widely used Open Source general-purpose scripting language that is
especially suited for Web development and can be embedded into HTML. The main
goal of the language is to allow web developers to write dynamically generated web
pages.
The thesis has illustrated that the interactive website, with a combination of HTML
and PHP script, is suitable for the monitoring system under investigation.
The thesis has developed an interactive monitoring website, which is a combination
of an interactive website and a monitoring software. The operator can request data
from the interactive monitoring website via a standard web browser. The HTML
document will serve for the request of data from the operator. To send new
parameters to the website, the PHP language will support this action.
The monitoring software is written in C language. All source codes are compiled and
linked into library of embedded Linux operating system. The software works
compatibly with Inverter’s commands. The monitoring software sends a command to
the inverters via RS-232 communications. The microcontrollers in the inverter react to
a command and answer to the monitoring software. When the software receives an
answer from the inverters it stores data into the memory at the web server as a text
file. Name of a file is the date of monitoring.
The implementation and its results in chapter 5 show that the interactive monitoring
website is suitable to be utilized for a monitoring system in remote areas. The
operator accesses the interactive monitoring website by a GSM modem. The
monitoring data as a text file can be accessed via a standard web browser. When
accessing the website, the operator can view and download the monitored data from
the website as well as upload important parameters to the system.
The operator has an ability to access the up-to-date monitored data and to change
operation parameters online. This can improve the reliability of the hybrid system.
The operator can be sure that the hybrid system is working and working properly. By
analysis of the monitored data, the operator can learn the behavior of the system
from the analysis in order to make an optimization of the system in the future. In
addition, these advantages can also improve the public’s image of renewable
systems, provoking their interest in the PV area.
The results in the thesis have shown that a low input-power embedded module with
an embedded Linux operating system can be utilized for an interactive remote
monitoring website for a PV-diesel hybrid system. With wireless communication
networks expanding, it is attractive to use a GSM network, which allows the data to
be transmitted directly to the main station.
Furthermore, because of using the open source software, the interactive monitoring
system proposed requires very low investment cost. It requires no additional
operation costs. There is no need for any special software at the workstations.
92
Chapter 6: Conclusions
The thesis illustrates that the embedded Linux interactive monitoring system shows
itself to be a very suitable solution, especially in remote areas where there is a lack of
infrastructure.
Outlooks
Future work, which related to this work, should be on:
•
Risks such as network availability and security issues of the internet should
also be considered.
•
The source code for both Linux and PHP are openly available and updated
time to time, so that the monitoring system can be optimized and improved in
future.
•
The Apache web server is updated from time to time, therefore it can be
optimized and improved for the monitoring system.
•
The embedded hardware for the project still has a memory-limited storage,
this can be considered for improving in future.
•
The new version of Sunny family inverter may need to be checked and proved
before implementation with the monitoring system.
•
The monitoring software is implemented only with Sunny family. To apply the
monitoring software to other types of system components, the software has to
be extended.
93
References
References
[1]
Gabriele Seeling-Hochmuth, Optimization of Hybrid Energy Systems
Sizing and operation control, a dissertation at University of Kassel,
Germany, 1998.
[2]
Report IEA-PVPS T7-06:2002, Market deployment strategies for PV
systems in the built environment, PVPS 2002
[3]
S. Thawatchai, State of world PV, Seminar KMITT Thailand 2003
[4]
Sascha Beverungen, Mini Grid Kit report-EMS strategy review, University
of Kassel, Germany, 2001.
[5]
Britta Buchholz, Smart Web Index and data exchange options, a
dissertation at University of Kassel, Germany, 2001.
[6]
W. Kleinkauf, Mohamed I. A. Ibrahim, Decentralized Hybrid Renewable
Energy Systems, a dissertation at University of Kassel, Germany, 2002.
[7]
John Lombardo, Embedded Linux, New Riders, 201 west 103rd Streeet,
Indianapolis, Indiana 46290, 2001.
[8]
J. Schmid, Photovoltaic systems Technology, teaching script, IEE-RE,
University of Kassel, Germany, 2002.
[9]
D. Thevenard, M. Ross, and G. Howell, A checklist for PV system
monitoring, Numerical Logics Inc. Waterloo, Ont. Canada 1998-15.
[10]
S. Krauter, T. Depping, Monitoring of Remote PV-Systems by Satellite,
conference PV in Europe, 7-11 Oct. 2002, Rome Italy.
[11]
C. Emrich, W. Wilson, and G. Ventre, Supervisory control and data
acquisition using the advanced communications technology satellite:
Lessons learned, Florida Solar Energy Center, 1679 Clearlake Road,
Cocoa, FL 32922-5703.
[12]
C. Nyman, Lars B. Mansner, PV system application using internet for
monitoring, conference PV in Europe, 7-11 Oct. 2002, Rome Italy.
[13]
Nipon Ketjoy, Photovoltaic-Diesel Generator Hybrid system at the Energy
Park, Naresuan University, Phitsanulok 65000 Thailand, 2001.
[14]
Daniel Hernandez Torrent, PV-Diesel Hybrid Systems-potentialdimensioning and rent ability in the Canary Islands, a master thesis at
University of Kassel, Germany, 1999.
[15]
Jan Keydel, Potential and chances for rural electrification with renewable
energy in Brazil, a master thesis at University of Kassel, Germany, 1999.
[16]
B. Plangklang. Solar energy for the future, ThaiSAC, Aachen, 2003
94
References
[17]
Michel Vandenbergh, Deliverable D7:Mini Grid Kit Manual, ISET
Koenigstor 59, 34119, Kassel, Germany, 2003.
[18]
Ingo Hahn, Softwareentwircklung eines innovativen
“Energiemanagement-System” fuer autonome
Energieversorgungsanlagen, a Master Thesis at University of Kassel,
Germany, 2001.
[19]
Gabler H., Wiemken E.: „Modelling of stand-alone PV-hybrid systems
and comparison of system concepts“, Proceedings of the 2nd World PV
Conference, July 1998
[20]
Rojer Messenger, Photovoltaic Systems Engineering, CRC Press LLC,
Florida 33431, 2000.
[21]
Andrew s. Tanenbraum, Computer Networks, fourth edition, Prentice
Hall, Upper Saddle River, NJ 07458, 2003.
[22]
Farh Sheriff, Dave Turcotte, Monitoring Photovoltaic Hybrid Systems in
Northern Remote Site, CANMET, 1615, Lionel-Boulet Blvd, P.O.Box
4800, Varennes
QC, Canada, 2002-014.
[23]
SMA, Sunny Family Brochure, SMA Regelsysteme GmbH,
Hannoversche Str. 1-5, 34266 Niestetal – Germany.
[24]
Yasuke Matsuoka, Introduction to TCP/IP, EE201A Spring/2003 UCLA.
[25]
Stig S. Bakken, PHP Manual, Published 01-09-2002, the PHP
Documentation Group.
[26]
Craig Hollabaugh, Embedded Linux, Hardware, Software, and
Interfacing, Pearson Education Corporate, 201 W. 103rd Street,
Indianapolis, IN 46290, 2002.
[27]
Product Manual MOPS520, Copyright © 2002 JUMPtec Industrielle
Computertechnik AG.
[28]
http://www.embedded-linux.org/
[29]
http://www.sixnetio.com/html_files/oems/ipm_embedded_linux.htm
[30]
http://www.sma.de/index_en.htm
[31]
http://www2.themanualpage.org/networks/networks_intro.php3
[32]
http://www.computerguru.net/tech/netw15.htm
[33]
http://www.onlamp.com/pub/a/php/2001/02/22/php_foundations.html
[34]
http://www.apache.org/
[35]
http://www.php.net/
95
References
[36]
http://www.linux.org.
[37]
http://www.joesessays.com/science/sci62.shtml
[38]
http://www.whitedwarflinux.org
[39]
http://www.embedded-linux.org/
[40]
http://www.linuxdevices.com
[41]
http://www.embedded.linuxjournal.com
[42]
http://www.emjembedded.com/products/single/pc104.html
[43]
http://csce.unl.edu/~llim/
[44]
http://www.hrz.uni-wuppertal.de/infos/hrz-info/hrz-info200102/node17.html
[45]
http://stein.cshl.org/~lstein/talks/perl_conference/apache_api/index.html
[46]
Yasuke Matsuaka, Introduction to TCP/IP, EE201A Spring/2003, UCLA
96
Appendix A: HTML and PHP script
A.1 HTML and PHP script, Index.php ............................................................... A-2
A.2 HTML and PHP script of manager page .................................................... A-4
A.3 HTML and PHP script of setting parameters page ................................... A-7
A.4 Software Installtion ..................................................................................... A-9
Appendix A: HTML and PHP script
Appendix A: HTML and PHP script
A.1 HTML and PHP script, Index.php
<html>
<head>
<title>Hybrid Monitoring</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<meta http-equiv="refresh" content="60">
<script language="JavaScript" type="text/JavaScript">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<p align="center"><strong><font size="5" face="Microsoft Sans Serif, MS Sans Serif, sans-serif">Welcome to
Hybrid System Mornitoring</font></strong></p>
<h2 align="center"><img src="pics/HB.jpg" alt="PV-Diesel System" name="image1" width="522" height="368"
border="0" usemap="#Map" id="image1"><map name="Map"><area shape="rect" coords="163,173,229,334"
href="web/pv.htm" target="_blank"><area shape="rect" coords="5,78,92,159" href="web/gen.htm"
target="_blank"><area shape="rect" coords="127,78,217,160" href="pass_set.htm" target="_blank"
alt="Parameter of SunnyBoy"><area shape="rect" coords="265,78,349,156" href="web/sunnyisland.htm"
target="_blank" > <area shape="rect" coords="299,176,358,336" href="web/batt.htm" target="_blank"></map>
</h2>
<table width="47%" border="2" align="center">
<tr>
<td width="30%" height="40" bgcolor="#66FF00"><div align="right"><font size="2" face="MS Sans
Serif"><strong>Ubatt</strong></font></div></td>
<td width="49%" bordercolor="#FF0000" bgcolor="#FFFF00"><div align="center"><font size="2" face="MS
Sans Serif">
<?
$FILE= fopen("/home/boonyang/projects/sunny_logger/status/mornitor_island.txt","r");
$FILE2= fopen("/home/boonyang/projects/sunny_logger/status/mornitor_boy.txt","r");
$text = fgets($FILE,16);
print("$text");
?></font></div></td>
<td width="21%" bgcolor="#99FF33"><strong><font size="2" face="MS Sans Serif">Volts</font></strong></td>
</tr>
<tr>
<td height="37" bgcolor="#66FF66"><div align="right"><font size="2" face="MS Sans
Serif"><strong>Ibatt</strong></font></div></td><td bordercolor="#FF0000" bgcolor="#FFFF33"><div
align="center"><font size="2" face="MS Sans Serif">
<?
$text = fgets($FILE,16);
print("$text");
?></font></div></td>
<td bgcolor="#99FF66"><strong><font size="2" face="MS Sans Serif">mA</font></strong></td>
</tr>
<tr>
<td height="39" bgcolor="#66FF99"><div align="right"><font size="2" face="MS Sans
Serif"><strong>Upv</strong></font></div></td><td bordercolor="#FF0000" bgcolor="#FFFF66"><div
align="center"><font size="2" face="MS Sans Serif">
<?
$text = fgets($FILE2,16);
print("$text");
?></font></div></td>
<td bgcolor="#99FF99"><strong><font size="2" face="MS Sans Serif">Volts</font></strong></td>
</tr>
<tr>
<td height="38" bgcolor="#00FFCC"><div align="right"><font size="2" face="MS Sans
Serif"><strong>Iac</strong></font></div></td><td bordercolor="#FF0000" bgcolor="#FFFF99"><div
align="center"><font size="2" face="MS Sans Serif">
<?
$text = fgets($FILE2,16);
print("$text");
?></font></div></td>
<td bgcolor="#99FFCC"><strong><font size="2" face="MS Sans Serif">mA</font></strong></td>
</tr>
A-2
Appendix A: HTML and PHP script
<tr>
<td height="38" bgcolor="#66FFFF"><div align="right"><font size="2" face="MS Sans
Serif"><strong>Uac</strong></font></div></td><td bordercolor="#FF0000" bgcolor="#FFFFCC"><div
align="center"><font size="2" face="MS Sans Serif">
<?
$text = fgets($FILE2,16);
print("$text");
?></font></div></td>
<td bgcolor="#99FFFF"><div align="left"><strong><font size="2" face="MS Sans
Serif">Volts</font></strong></div></td>
</tr>
<tr>
<td height="38" bgcolor="#66FFFF"><div align="right"><font size="2" face="MS Sans
Serif"><strong>Fac</strong></font></div></td><td bordercolor="#FF0000" bgcolor="#FFFFCC"><div
align="center"><font size="2" face="MS Sans Serif">
<?
$text = fgets($FILE2,16);
print("$text");
?></font></div></td>
<td bgcolor="#99FFFF"><div align="left"><strong><font size="2" face="MS Sans
Serif">Hz</font></strong></div></td>
</tr>
<tr>
<td height="38" bgcolor="#66FFFF"><div align="right"><font size="2" face="MS Sans
Serif"><strong>Pac</strong></font></div></td><td bordercolor="#FF0000" bgcolor="#FFFFCC"><div
align="center"><font size="2" face="MS Sans Serif">
<?
$text = fgets($FILE2,16);
print("$text");
?></font></div></td>
<td bgcolor="#99FFFF"><div align="left"><strong><font size="2" face="MS Sans
Serif">Watts</font></strong></div></td>
</tr>
<tr>
<td height="38" bgcolor="#66FFFF"><div align="right"><font size="2" face="MS Sans Serif"><strong>Error
Message</strong></font></div></td><td bordercolor="#FF0000" bgcolor="#FFFFCC"><div align="center"><font
size="3" face="MS Sans Serif">
<?
$text = fgets($FILE2,16);
print("$text");
fclose($FILE);
fclose($FILE2);
?></font></div></td>
<td bgcolor="#99FFFF"><div align="left"><strong><font size="2" face="MS Sans Serif"></font></strong></div></td>
</tr>
</table>
<table width="45%" height="34" border="3" align="center">
<tr>
<td bgcolor="#999966"><div align="center"><strong><font size="1" face="MS Sans Serif">Click 'refresh' menu
bar
to refresh values</font></strong></div></td>
</tr>
</table>
<p>&nbsp;</p>
<table width="22%" height="46" border="5" align="center">
<tr>
<td height="32" bordercolor="#336699"><div align="center"><font size="2" face="MS Sans Serif"><strong>
<a href="pass.htm">Download Data</a></strong></font></div></td>
</tr>
</table>
<table width="28%" height="44" border="5" align="center">
<tr>
<td height="30" bordercolor="#333399"><div align="center"><strong><font size="2" face="MS Sans Serif"><a
href="pass_set.htm">
Set the Parameters</a></font></strong></div></td>
A-3
Appendix A: HTML and PHP script
</tr>
</table>
<div align="center">
<p>&nbsp;</p>
<table width="75%" border="1">
<tr>
<td width="48%" height="26" bgcolor="#66FFCC"><div align="center">
<p><strong><font size="2" face="MS Sans Serif">Status of connection
: Server-Sunny</font></strong></p>
</div></td>
<td width="52%" bgcolor="#FF0000"><div align="center">
<p><strong><font size="2" face="MS Sans Serif">
<?
$FILE = fopen("/home/boonyang/projects/sunny_logger/status/connect_status.txt","r");
$text = fgets($FILE,50);
print("$text");
fclose($FILE);
?></font></strong></p></div></td>
</tr>
<tr>
<td height="23" bgcolor="#66FF99"><div align="center">
<p><strong><font size="2" face="MS Sans Serif">Status of Sunny</font></strong></p>
</div></td>
<td bgcolor="#FFFF00"><div align="center">
<p><strong><font size="2" face="MS Sans Serif">
<?
if(ereg("[0-9]",$text))
{
$FILE2 = fopen("/home/boonyang/projects/sunny_logger/status/sunny_status.txt","r");
$text2 = fgets($FILE2,40);
print("$text2");
fclose($FILE2);
}
else
print("Failed to connect");
?></font></strong></p>
</div></td>
</tr>
<tr>
<td height="23" colspan="2" bgcolor="#66FF99"><div align="left">
<p><font size="1" face="MS Sans Serif">#if the status of connection
between server and Sunny failed (not at night), there is a problem
with connection or cable disconnected, please go to the field-site.</font></p>
<p><font size="1" face="MS Sans Serif">#if the status of Sunny is Sleep, just fine, the sun
radiation may not be enough, if it sleeps so long
(not at night), sunny boy may be broken, please go to filed-site.</font></p>
</div></td>
</tr>
</table>
<p>&nbsp;</p></div>
</body>
</html>
A.2 HTML and PHP script of manager page (download and delete the data)
A.2.1 code programming of download page
<html>
<head>
<title>list</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
</head>
<body>
<form name="form1" method="post" action="delete.php3">
<font size="2" face="MS Sans Serif, Tahoma, sans-serif">
A-4
Appendix A: HTML and PHP script
<?
function puts($what, $color="black")
{
printf("<font color=$color> $what </font>");
}
if( $folder!="" )
{
$url = $url.$folder;
$path = $path.$folder;
}else
{
$url="http://localhost/data1/";
$path="/usr/local/httpd/htdocs/data254/";
}
$DIR=opendir($path);
echo("<b>Directory</b><br>");
print("URL=$url");
print("<br>Current Folder=$path<p>");
//print("<from name=form1 method=get action=delete.php>");
print("<input type=hidden name=path value=$path>");
print("<input type=hidden name=url value=$url>");
echo("<table border=0>");
echo "<tr bgcolor=yellow>";
echo "<td>Name</td><td> Size (byte)</td><td> exe</td>";
echo "<td> read</td><td> write</td><td> delete</td>";
echo "</tr>";
while($text=readdir($DIR))
{
if(($text!=".")&&($text!=".."))
{
echo "<tr>";
if(is_file($path.$text))
{
echo "<td><a href=",$url,$text,">",$text,"</a></td>";
echo "<td>",puts(filesize($path.$text),"blue"),"</td>";
echo "<td>";
if(is_executable($path.$text))
{
puts(" /","red");
}
echo "</td><td>";
if(is_readable($path.$text))
{
puts(" /","blue");
}
echo "</td><td>";
if(is_writeable($path.$text))
{
puts(" /","green");
}
echo "</td>";
print("<td><input type=radio name=del value=$text></td>");
}elseif(is_dir($path.$text))
{
print("<td><b>[ <a href=file_test.php3?");
print("folder=$text/&url=$url&path=$path>$text</a> ]</b><td>");
print("<td><input type=radio name=del value=$text></td>");
}
echo "</tr>";
}
}
print("<input type=submit name=Submit value='Delete selected file'>");
print("</table>");
closedir($DIR);
A-5
Appendix A: HTML and PHP script
?>
<p>&nbsp;</p>
<table width="28%" height="44" border="5" align="center">
<tr>
<td height="30" bordercolor="#333399"><div align="center"><strong><font size="2" face="MS Sans Serif"><a
href="index.php3">
Back to Main</a></font></strong></div></td>
</tr>
</table>
</form>
</font>
</body>
</html>
A.2.2 HTML and PHP script of deleting data
<html>
<head>
<title>delete file</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
</head>
<body>
<font size="2" face="MS Sans Serif, Tahoma, sans-serif">
<?
if ($del == "")
{
print("<b>Delete Nothing!</b><br>");
exit();
}
print("URL <b>$url</b><br>");
print("Current Folder <b>$path</b><br>");
if(is_dir($path.$del))
{
print("Delete Folder : <b>$del</b><br>");
if(!rmdir($path.$del))
{
print("Can not delete this folder!<hr>");
}else
{
print("Folder deleted!!<hr>");
}
}else
{
print("Delete file : <b>$del</b><br>");
if(unlink($path.$del))
{
print("File deleted!<hr>");
}else
{
print("Can not delete this file<hr>");
}
}
?>
<table width="28%" height="44" border="5" align="center">
<tr>
<td height="30" bordercolor="#333399"><div align="center"><strong><font size="2" face="MS Sans Serif"><a
href="file_test.php">
Back to File Manager</a></font></strong></div></td>
</tr>
</table>
</font>
</body>
</html>
A-6
Appendix A: HTML and PHP script
A.3 HTML and PHP script of setting parameters page
<html>
<head>
<title>set parameter sunny</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
</head>
<body>
<form name="form1" method="post" action="submit_island.php3">
<div align="center">
<p><strong><font size="5" face="MS Sans Serif, Tahoma, sans-serif">Sunny
Island</font></strong></p><p><strong><img src="pics/sunnyisland.jpg" width="120" height="150"></strong></p>
<table border="1">
<tr>
<td ><strong>Channel | Parameters | Values </strong></div></td>
</tr>
<?
$FILE =
fopen("/home/boonyang/projects/sunny_logger/status/show_parameter1.txt","r");
while (!feof($FILE))
{
echo "<tr>";
echo "<td>";
$text = fgets($FILE,60); // read all line
//fputs($FILE2,"$text"); // do not know yet
print("$text");
echo "</div></td>";
echo "</tr>";
}
fclose($FILE);
?>
</table>
<p><font size="2" face="MS Sans Serif">Please enter the parameters and value
you want to change,</font></p>
<p><font size="2" face="MS Sans Serif"> Maximum 3 parameters at one time..</font></p>
<table width="38%" border="1">
<tr>
<td><div align="center" bordercolor="#FF0000" bgcolor="#FFFF00"><strong><font size="2" face="MS Sans
Serif">Parameters</font></strong></div></td>
<td><div align="center" bordercolor="#FF0000" bgcolor="#FFFF00"><strong><font size="2" face="MS
Sans Serif">Channel</font></strong></div></td>
<td><div align="center" bordercolor="#FF0000" bgcolor="#FFFF00"><strong><font size="2" face="MS Sans
Serif">New Value</font></strong></div></td>
</tr>
<tr>
<td width="37%"><div align="center">
<select name="select">
<option> Uconv nom</option>
<option> Uext nom</option>
<option> Uext min</option>
<option> Uext max</option>
<option> Fonv nom</option>
<option> Fext nom</option>
<option> Fext min</option>
<option> Fext max</option>
<option> Iac chrg max</option>
<option> Iac dischrg max</option>
<option> Ubat min</option>
<option> Ubat max</option>
<option> tset full</option>
<option> tset equal</option>
<option> tcharge</option>
<option> tcharge full</option>
<option> tcharge equal</option>
<option> Ucharge</option>
<option> Ucharge full</option>
<option> Ucharge equal</option>
A-7
Appendix A: HTML and PHP script
<option> Diesel t2 begin</option>
<option> Diesel t2 end</option>
</select>
</div></td>
<td width="38%"> <p align="center">
<input name="textfield11" type="text" maxlength="15">
</p></td>
<td width="38%"> <p align="center">
<input name="textfield12" type="text" maxlength="15">
</p></td>
</tr>
</table>
<table width="51%" border="1">
<tr>
<td width="37%"><div align="center">
<select name="select2">
<option selected>------------</option>
<option> Uconv nom</option>
<option> Uext nom</option>
<option> Uext min</option>
<option> Uext max</option>
<option> Fonv nom</option>
<option> Fext nom</option>
<option> Fext min</option>
<option> Fext max</option>
<option> Iac chrg max</option>
<option> Iac dischrg max</option>
<option> Ubat min</option>
<option> Ubat max</option>
<option> tset full</option>
<option> tset equal</option>
<option> tcharge</option>
<option> tcharge full</option>
<option> tcharge equal</option>
<option> Ucharge</option>
<option> Ucharge full</option>
<option> Ucharge equal</option>
<option> Diesel t2 begin</option>
<option> Diesel t2 end</option>
</select>
</div></td>
<td width="38%"> <p align="center">
<input name="textfield21" type="text" maxlength="15">
</p></td>
<td width="38%"> <p align="center">
<input name="textfield22" type="text" maxlength="15">
</p></td>
</tr>
</table>
<table width="51%" border="1">
<tr>
<td width="37%"><div align="center">
<select name="select3">
<option selected>------------</option>
<option> Uconv nom</option>
<option> Uext nom</option>
<option> Uext min</option>
<option> Uext max</option>
<option> Fonv nom</option>
<option> Fext nom</option>
<option> Fext min</option>
<option> Fext max</option>
<option> Iac chrg max</option>
<option> Iac dischrg max</option>
<option> Ubat min</option>
<option> Ubat max</option>
<option> tset full</option>
<option> tset equal</option>
<option> tcharge</option>
A-8
Appendix A: HTML and PHP script
<option> tcharge full</option>
<option> tcharge equal</option>
<option> Ucharge</option>
<option> Ucharge full</option>
<option> Ucharge equal</option>
<option> Diesel t2 begin</option>
<option> Diesel t2 end</option>
</select>
</div></td>
<td width="38%"> <p align="center">
<input name="textfield31" type="text" maxlength="15">
</p></td>
<td width="38%"> <p align="center">
<input name="textfield32" type="text" maxlength="15">
</p></td>
</tr>
</table>
<p><strong><font size="5" face="MS Sans Serif, Tahoma, sans-serif"> </font></strong></p>
<input type="submit" name="Submit" value="Set Parameters">
</form>
<p>&nbsp;</p>
</div>
</body>
</html>
A.4 Software installation
After the embedded module is selected, the installation of the software can be proceeded.
The first installation is the embedded Linux operating system.
A.4.1 Embedded Linux installation
As
mentioned,
the
white
dwarf
Linux
is
freely
available
online
at
http://www.whitedwarflinux.org so that using online installation is powerful. After preparing
the hardware, the following is to install White Dwarf Linux:
1. Set the clock in the BIOS to the correct time.
If this is not done the system will end up getting a number of errors as the system
thinks that the hard drive of filesystem has gone too long without being checked.
Password and other utilities may also be affected by an incorrect date.
2. Download and create the white dwarf bootdisk and rootdisk images for installation.
Using a Linux machine to create:
dd if=wdboot.img of=/dev/fd0
Insert another clean floppy use these commands:
mkfs /dev/fd0
mount /dev/fd0 /mnt
cp root2.tar.bz2 /mnt
umount /mnt
From a DOS machine, use RAWRITE.EXE, at C prompt:
C:\> RAWRITE
Answer the prompts for the name of the file to write and the floppy to be written it to.
Do the same for the rootdisk.
3. Boot the JUMPtec with the bootdisk.
The following should appear during the boot process:
RAM disk driver initialized: 16 RAM disks of 5000K size hda: SunDisk SDTB128, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
A-9
Appendix A: HTML and PHP script
hda: SunDisk SDTB-128, 15MB w/1kB Cache, CHS=490/2/32
If the above information did not appear, it should be a hardware problem. It
should continue booting and then prompt for the rootdisk or cdrom.
4. Choose and Format of media.
- Type in partition using backspace as needed
- When it asks if a partition is not done, choose no, and do partition, then
choose yes to skip.
- Delete any existing partitions using the 'd' command
- Create a new partition using 'n'
- The partition number should be one and the size should be default
- Use the 'p' command to see the partition after creating it. It should show:
Command (m for help): p
Disk /dev/hda: 2 heads, 32 sectors, 490 cylinders
Units = cylinders of 64 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hd1
1
490 15664 83
Linux native
- Use the 'w' command to save changes and 'q' to quit if needed.
- If the partition needs to be formatted, chose yes at the next prompt
5. Choose network install
- Next, the installer will run the 'netconfig' command
- Answer all the questions regarding the network
-The following should appear after netconfig has finished:
eth0: Attempting TP
eth0: using 10Base-T (RJ-45)
- The installer will use ping to make sure that it can reach the selected host
6. Download the packages.
- The installer will install some required packages and allow the installer to
choose from a list
- After completion, remove all floppies
- Press the reset switch
Now the hardware should boot linux 2.4.18 (or 2.2.20) from the FLASH drive and setup for
the embedded Linux platform.
A.4.2 HTML and PHP Installation
After the embedded platform is ready, the web server and PHP script can be installed. To
install PHP package for website, some developing command tools in such as gcc, Makefile,
are needed. Therefore, it has to be sure that the developing command tools have been
installed.
This section will describe the software installation of Apace web server with PHP script. As
mentioned, the PHP script and Apache are open-source so that it is freely available in
Internet. The version of both is improving time to time so that the version number will be
omitted here by “xxx”. Following is the installation instructor:
1. gunzip apache_xxx.tar.gz
2. tar -xvf apache_xxx.tar
3. gunzip php-xxx.tar.gz
4. tar -xvf php-xxx.tar
5. cd apache_xxx
6. ./configure --prefix=/www --enable-module=so
7. make
8. make install
9. cd ../php-xxx
10. ./configure --with-mysql --with-apxs=/www/bin/apxs
11. make
12. make install
A-10
Appendix A: HTML and PHP script
- If operator decide to change the configure options after installation, just
need to repeat the last three steps.
13. Setup php.ini file:
cp php.ini-dist /usr/local/lib/php.ini
14. Edit the httpd.conf to load the PHP module. The path on the right hand side of the
LoadModule statement must point to the path of the PHP module on the system.
For PHP 4:
LoadModule php4_module libexec/libphp4.so
For PHP 5:
LoadModule php5_module libexec/libphp5.so
15. And in the AddModule section of httpd.conf, somewhere under the
ClearModuleList, add this:
For PHP 4:
AddModule mod_php4.c
For PHP 5:
AddModule mod_php5.c
16. Tell Apache to parse certain extensions as PHP. For example, let's have Apache
parse the .php extension as PHP
AddType application/x-httpd-php .php .phtml
It is also common to setup the .phps extension to show highlighted PHP
source, this can be done with:
AddType application/x-httpd-php-source .phps
Now a dynamic web server (Apache and PHP) is ready to be initialized for running the
server.
A.4.3 Initialization of Apache web server and PHP script
There are many possible ways to stop and restart the server. There are some typical lines
used in restarting the server, for different apache/Linux installations. It depends on the path
of system as:
/path/to/apachectl stop
to stop the server
/path/to/apachectl start
to start the server
Note that, it should be replaced /path/to/ with the path to the server on the system. After the
server started, it can now provide information at the server-side to the Internet-side. The wellknown method to provide information to Internet is Hypertext Mark-Up Language or HTML
Document.
A-11
Appendix A: HTML and PHP script
A-12
Appendix B: C programming of monitoring software
B.1 Code programming ..................................................................................... B-2
Appendix B: C programming of monitoring software
Appendix B: C programming of monitoring software
B.1 Code programming
/***** A program for a Sunny data-logger, monitoring ******/
#include "stdio.h"
#include "time.h"
/***** include source code from SMA ******/
//#include "string.h"
#include "include/os.h"
#include "include/smadata_layer.h"
#include "include/smadef.h"
#include "include/chandef.h"
#include "include/libyasdi.h"
#include "include/libyasdimaster.h"
/******** declare Sub program ****************/
void
void
void
void
void
PrintDevList( void );
DoCommands( int DetectCheck );
PrintChannelValues(WORD ChanMask, DWORD DevHandle, DWORD DevCount);
DoStartDetection( void );
SetParamValue( void );
/**************************************************************************
Description
: print out all channels of a device
Parameter
: ChanMask: the filter mask (see SMA-Data-Description)
Return-Value : (none)
void PrintDevList( void );
void DoCommands( int DetectCheck );
void PrintChannelValues(WORD ChanMask, DWORD DevHandle, DWORD DevCount);
void DoStartDetection( void );
void SetParamValue( void );
**************************************************************************/
void PrintChannelValues(WORD ChanMask, DWORD DevHandle, DWORD DevCount2)
{
FILE *out_file,*out_file2,*out_file3,*out_file4; // about file to store
the data
char *TimeDate;
static DWORD DateCmp, DateCmp2,DevCmp;
//char NameDate[16];
//static char NameDate[16];
//char dot_txt[4]=".txt";
struct tm *tblock;
time_t timer;
int SunnySleep=0;
char dir[50],DataTime[50];
char Upv[]="Upv-Ist",
Iac[]="Iac-Ist",
Uac[]="Uac",
Fac[]="Fac",
Pac[]="Pac",
Fehler[]="Fehler",
Ubat[]="Ubat",
Ibat[]="Ibat";
int res,ret,Check=0;
B-2
Appendix B: C programming of monitoring software
DWORD ChanHandle[100]; //Max 100 channels
char ChanName[200];
char DevName[200];
int i;
int ChanCount;
//DWORD DevHandle;
double Value;
char TextValue[30];
DWORD MaxValueAge = 10; /* maximum age of the channel value in
seconds...*/
printf("Device handle: %ld \n",DevHandle); // test
ChanCount = GetChannelHandles(DevHandle, ChanHandle, 100, ChanMask, 0);
GetDeviceName(DevHandle, DevName, sizeof(DevName)-1);
printf( "Device '%s' has %d %s%s channels:\n",
DevName,
ChanCount,
(ChanMask & CH_TEST) ? "(Test)" : "",
(ChanMask & CH_PARA) ? "Parameter" : "Spot" );
printf("Reading channel values, please wait...\n");
printf("-----------------------------------------------------\n");
printf("Channel handle |
Channel Name
| Channel value |\n");
printf("-----------------------------------------------------\n");
if(ChanMask==0x090f) // we will store in a file every day for data
{
timer=time(NULL);
//printf("The current time is %s.\n",asctime(localtime(&timer)));
tblock = localtime(&timer);
TimeDate = asctime(localtime(&timer));
//strcpy(DateCmp,TimeDate);
/******************** save data to directory ****************/
// /usr/local/httpd/htdocs/data1
sprintf(dir,"%s%d%s%s%d%s%d%s%d%s","/usr/local/httpd/htdocs/data",DevHandle
,"/","data_",tblock->tm_mday,"-",
tblock->tm_mon+1,"-",tblock->tm_year+1900,".txt");
//out_file = fopen(dir,"a");
if(DateCmp2 != tblock->tm_mday)
{
DevCmp=0; //set for writing description at first line
DateCmp2 = tblock->tm_mday;
}
/*************************************************************/
//ret=strcmp(DateCmp,dir);
//try to write data description at the
first line
if(DateCmp != tblock->tm_mday )
{
DevCmp++;
if(DevCmp>=DevCount2)
DateCmp = tblock->tm_mday; // just copy for comparing next time
out_file = fopen(dir,"a"); // here write the data description on the file
if (out_file == NULL)
{
printf(" Failed to open the file \n"); // for testing
}
else
{
fprintf(out_file,"
");
for(i=0;i<ChanCount;i++)
{
GetChannelName(ChanHandle[i],ChanName, 200);
fprintf(out_file,"%20s", ChanName);// description of storing data
}
fprintf(out_file,"\n");
B-3
Appendix B: C programming of monitoring software
fclose(out_file);
}
}
i=0;
while(isalpha(TimeDate[i])!=0 || (TimeDate[i]== 0x20) )
// need only the day and month
{
i++;
}
TimeDate[i]='\0';
/*********** write the reading time of data ***************/
sprintf(
DataTime,"%s%d%s%d%s%d %2d%s%2d%s%2d",TimeDate,tblock->tm_mday,"/",
tblock->tm_mon+1,"/",tblock->tm_year+1900,
tblock->tm_hour,":",tblock->tm_min,":",tblock->tm_sec);
/*** i=0;
while(TimeDate[i]!= '\n')// get rid of '\n' from timer
{
i++;
}
TimeDate[i]='\0'; ****/
out_file = fopen(dir,"a"); // try to put data to a file
out_file2 = fopen("status/sunny_status.txt","w");
out_file3 = fopen("status/mornitor_boy.txt","w");
if ((out_file == NULL)||(out_file2==NULL))
{
printf(" Failed to open the file \n"); // for testing
}
else
{
fprintf(out_file," %s", DataTime);// time of storing data
for(i=0;i<ChanCount;i++)
{
GetChannelName(ChanHandle[i],ChanName, 200);
if(SunnySleep !=100)
/*****if read data at night sunny not answer result = zero ****/
{ /* Get channel value... */
res = GetChannelValue(ChanHandle[i], DevHandle, &Value,
TextValue, 30, MaxValueAge);
if(res==0)
{
/* Status texts?*/
if (strlen( TextValue )==0)
sprintf( TextValue,"%f", Value);
}
else
{
if(ChanMask & CH_PARA)
{
//if(out_file2 != NULL)
fprintf(out_file2,"Error reading channel
value....Code=%d Sunny may sleep\n",res);
printf("Error reading channel
value....Code=%d\n",res);
//break;
}
//strcpy(TextValue,"<unkown>");
//strcpy(TextValue,"0.000000"); // here if can not, data is zero
SunnySleep=100;
fprintf(out_file2," Sunny Sleeps\n");
}
B-4
Appendix B: C programming of monitoring software
}
if(SunnySleep ==100)
strcpy(TextValue,"0.000000"); // here if can not, data is zero
printf("
%3ld
| '%16s' | '%s'\n", ChanHandle[i],
ChanName, TextValue );
fprintf(out_file,"%20s", TextValue);//put to file
/* below just copy only value that want to show at first page of website */
if((!(strcmp(ChanName,Upv)))||(!(strcmp(ChanName,Iac)))||(!(strcmp(ChanName
,Uac)))||(!(strcmp(ChanName,Fac)))||(!(strcmp(ChanName,Pac)))||(!(strcmp(Ch
anName,Fehler))) )
{
fprintf(out_file3,"%15s", TextValue);//put to file for
mornitoring at first web page
}
if((!(strcmp(ChanName,Ubat)))||(!(strcmp(ChanName,Ibat))))
{ if(Check!=1)
{
out_file4 =
fopen("status/mornitor_island.txt","w"); // open file one time
Check = 1;
}
fprintf(out_file4,"%15s", TextValue);//put to file for
mornitoring at first web page
}
/* below just copy only value that want to show at first
page of website */
// if(ChanHandle[i]==54 ||
ChanHandle[i]==58||ChanHandle[i]==59||ChanHandle[i]==60
//
|| ChanHandle[i]==56|| ChanHandle[i]==69||
ChanHandle[i]==74|| ChanHandle[i]==80)
// fprintf(out_file3,"%15s", TextValue);//put to file for
mornitoring
}
fprintf(out_file,"\n");
fprintf(out_file3,"\n");
if(Check==1)
{
fprintf(out_file4,"\n");
fclose(out_file4);
}
if(SunnySleep !=100)
fprintf(out_file2,"Sunny answers well\n");
fclose(out_file);
fclose(out_file2);
fclose(out_file3);
}
}
else // here just normal operation from SMA
{ if(ChanMask==0x040f)
// ask to show parameters we will also store to a file
{
sprintf( dir,"%s%d%s","status/show_parameter",DevHandle,".txt");
out_file=fopen(dir,"w");
if(out_file==NULL)
printf(" Failed to open the file \n"); // for testing
}
for(i=0;i<ChanCount;i++)
{
GetChannelName(ChanHandle[i],ChanName, 200);
if(SunnySleep !=100)
{ /* Get channel value... */
res = GetChannelValue(ChanHandle[i], DevHandle, &Value,
TextValue, 30, MaxValueAge);
B-5
Appendix B: C programming of monitoring software
if(res==0)
{
/* Status texts?*/
if (strlen( TextValue )==0)
sprintf( TextValue,"%f", Value);
}
else
{
if(ChanMask & CH_PARA)
{
/* if(ChanMask==0x040f)
{ if(out_file != NULL)
fprintf(out_file,"Error reading channel value....Code=%d\n",res);
} */
printf("Error reading channel value....Code=%d\n",res);
//break;
}
strcpy(TextValue,"<unkown>");
SunnySleep=100;
/*if(ChanMask==0x040f)
{
if(out_file != NULL)
fprintf(out_file,"Error while reading. Sunny did not answer\n");
} */
}
}
/* if(SunnySleep ==100)
{
strcpy(TextValue,"<unkown>");
}*/
if((ChanMask==0x040f)&&(out_file
{
fprintf(out_file,"%3ld| '%16s'
ChanName, TextValue );
}
printf("
%3ld
| '%16s'
ChanName, TextValue );
}if((ChanMask==0x040f)&&(out_file !=
fclose(out_file);
}
}
!= NULL)&&(SunnySleep !=100))
| '%s'\n", ChanHandle[i],
| '%s'\n", ChanHandle[i],
NULL))
/**************************************************************************
Description
: print out device list
Parameter
: (none)
Return-Value : (none)
**************************************************************************/
void PrintDevList( void )
{
DWORD i;
DWORD DevHandles[10];
DWORD DevCount=0;
char NameBuffer[200];
printf("-------------------------------------------\n");
printf("Device handle | Device Name \n");
printf("-------------------------------------------\n");
/* get all device handles... (max 10 devices)*/
DevCount
= GetDeviceHandles(DevHandles, 10);
for(i=0;i<DevCount;i++)
{
/* get the name of this device */
GetDeviceName(DevHandles[i], NameBuffer, 200);
B-6
Appendix B: C programming of monitoring software
printf("
%2ld
DevHandles[i],
NameBuffer);
| '%s'\n",
}
printf("-------------------------------------------\n");
printf("\n");
}
/**************************************************************************
Description
: Print out all status texts of a channel
Parameter
: ChanHandle: channel Handle
Return-Value : (none)
**************************************************************************/
void printStatTexts(DWORD ChanHandle)
{
int i;
int TxtCnt = GetChannelStatTextCnt( ChanHandle );
if (TxtCnt)
{
printf("All possible status texts of this channel:\n");
for(i=0;i<TxtCnt;i++)
{
char StatText[30];
GetChannelStatText(ChanHandle, i, StatText, sizeof(StatText)-1);
Trim(StatText, strlen(StatText));
printf("(%2d): '%s'\n",i,StatText);
}
}
}
/**************************************************************************
Description
: set a channel value
Parameter
: (none)
Return-Value : (none)
**************************************************************************/
void SetParamValue( void )
{
char Device[5],value[50]={0};
DWORD ChanHandle,DevHandle;
double ChanValue;
int iResult,i,dev,check=0;
FILE *in_file,*out_file_res;
printf("Writing Parameter:\n\n"); // to check
//printf("Device handle: ");
scanf("%ld", &DevHandle);
in_file=fopen("status/device.txt","r"); // read device from file
fgets(Device,5,in_file);
fclose(in_file);
sscanf(Device,"%ld",&DevHandle); //copy to device and transfer to integer
//DevHandle=1; //manual set
//printf("Channel handle: ");
scanf("%ld", &ChanHandle);
in_file=fopen("status/parameters.txt","r"); // read parameter
if (in_file == NULL)
{ printf(" Failed to open the file \n"); }
else
{
out_file_res = fopen("status/result_set.txt","w"); //write result to file
if (out_file_res == NULL)
printf(" Failed to open the file \n"); // to test
B-7
Appendix B: C programming of monitoring software
else
{
while((fgets(value,4,in_file)!= NULL)&&(check!=100)) //get
chanel from the file
{
//printf(" %s ",read_data);// just test
sscanf(value,"%ld",&ChanHandle);
//printf("Chanel:%ld",ChanHandle); // just test
printStatTexts(ChanHandle); // print status if there is error!
//printf("New channel value: "); scanf("%s", value);
//sscanf(value,"%lf", &ChanValue); // convert value to float
fgets(value,20,in_file); // we check also for ending of file
sscanf(value,"%lf", &ChanValue);
i=0;
while(value[i]== 0x20)// get rid of space from value
{
i++;
}
dev=i;
while(value[i]!= '\0')// copy
{
value[i-dev]=value[i];
i++;
}
/*Did the uses insert a text or a numeric value? */
if (value[0]> '9' || value[0]< '0')
{
//inserting text, find the status text index of that value
int TxtCnt = GetChannelStatTextCnt( ChanHandle );
int i;
ChanValue = -1;
for(i=0;i<TxtCnt;i++)
{
char StatText[30];
//strcpy(StatText,
GetChannelStatText(ChanHandle, i));
GetChannelStatText(ChanHandle, i, StatText,
sizeof(StatText)-1);
Trim(StatText, strlen(StatText));
Trim(value,strlen(value));
if (strcmp(value,StatText)==0)
{
ChanValue = i;
printf("Readed channel value: %f\n",
ChanValue);
break;
}
}
if (ChanValue == -1)
{
printf("Unkown status text!\n"
"Sorry, the channel can not be written!\n"
"Please type in a correct status text!");
return;
}
}
/*User has typed a numeric value, that easy: */
printf("Please wait...\n");
B-8
Appendix B: C programming of monitoring software
iResult = SetChannelValue(ChanHandle, DevHandle, ChanValue );
if (iResult==0)
{
printf("Ok, channel: %d was
written!\n",ChanHandle);
fprintf(out_file_res,"Ok, channel: %d was
written!\n",ChanHandle);//put to file
//fprintf(out_file,"%15s", TextValue);//put to file
}
else
{
printf("Error, channel was not written! Error
code=%d", iResult);
fprintf(out_file_res,"Error, channel was not
written! Error code=%d", iResult);
check=100;
}
}
}fclose(out_file_res);
}fclose(in_file);
}
/**************************************************************************
Description
: Start device detection (find all devices)
Parameter
: (none)
Return-Value : (none)
**************************************************************************/
void DoStartDetection()
{
int iErrorCode;
int DevCnt=0;
FILE *out_file;
printf("Count of devices to search:"); scanf("%d", &DevCnt);
printf("Searching, please wait...\n");
/* Execute a Master command and wait...*/
iErrorCode = yasdiDoMasterCmdEx( "detect", DevCnt,0,0 );
if (iErrorCode < 0) //Error?
{
printf("Sorry, but I have found only less than %d
devices...(please don't beat me)\n"
, DevCnt );
out_file=fopen("status/connect_status.txt","w");
if(out_file!=NULL)
fprintf(out_file,"Sorry, but I have found only less than %d
devices....(please don't beat me)\n"
, DevCnt );
else
printf(" Failed to open the file \n");// test
}
else
{
printf("Ok, I have found at least %d devices:\n", DevCnt);
out_file=fopen("status/connect_status.txt","w");
if(out_file!=NULL)
fprintf(out_file,"Ok, I have found %d devices:\n", DevCnt);
else
printf(" Failed to open the file \n"); // test
}
fclose(out_file);
PrintDevList();
}
B-9
Appendix B: C programming of monitoring software
/**************************************************************************
Description
: Interpret commands...
Parameter
: (none)
Return-Value : (none)
**************************************************************************/
void DoCommands( int DetectCheck )
{
FILE *out_file, *in_file;
char Cmd,begin[25],Restart[25],
command[]="begin",command2[]="restart", Device[5];
int res,res2;
DWORD DevHandle;
DWORD DevHandles2[10];// carefull for these 2 parameters
DWORD i;
DWORD DevCount=0;
BOOL bEnd = false;
struct tm *tblock1;
time_t timer;
int one_minute=0;
static DWORD DevCountSet, DevHandleSet[10];
char NameBuffer[200];
/* get all device handles... (max 10 devices)*/
DevCount
= GetDeviceHandles(DevHandles2, 10);
DevCountSet = DevCount; //copy to static
for(i=0;i<DevCount;i++)
{
DevHandleSet[i] = DevHandles2[i]; //copy to static
/* get the name of this device */
GetDeviceName(DevHandles2[i], NameBuffer, 200);
printf("
%2ld
| '%s'\n",
DevHandles2[i],
NameBuffer);
}
printf("-------------------------------------------\n");
printf("\n");
while(!bEnd)
{
if(DetectCheck<3) //check for whether connected or not
{
start:
Cmd = '?'; // here just for safety , should not happen
out_file=fopen("status/wait.txt","r");
if(out_file!=NULL)
{
fgets(begin,20,out_file); //start setting parameters
}else
printf(" Failed to open the file \n");
fclose(out_file);
/* out_file=fopen("status/restart.txt","r");
if(out_file!=NULL)
{
fgets(Restart,20,out_file); //restart the module
}else
printf(" Failed to open the file \n");
fclose(out_file);
*/
res=strcmp(begin,command); //set parameter, compare
res2=strcmp(Restart,command2); //restart?
B-10
Appendix B: C programming of monitoring software
if(res2==0)
{
int main(int argv, char **argc); /** not yet complete **/
}
timer=time(NULL);
// set time
tblock1 = localtime(&timer);
if((tblock1->tm_min==0)&&(one_minute==60))
{
one_minute=0; // set minute to zro when reached 60 minutes
}
if(tblock1->tm_min >= one_minute)
{
one_minute = tblock1->tm_min+1; // increase minute
/*if(one_minute>59)
{
one_minute=0;
}*/
Cmd ='a';
}
else if(res==0)
{
Cmd ='s'; // set parameter
}
else
goto start;
}
else
{
printf("Command ('?' for help): ");
start2:
scanf("%c", &Cmd);
if (Cmd=='\n') goto start2;
}
switch(Cmd)
{
case 'h':
{
int iHold = 0;
printf("freeze (0) or warmup (1) ?");
scanf("%d",&iHold);
DoFreeze(iHold==0);
break;
}
case 'e':
DoStartDetection();
break;
case 'd':
PrintDevList();
break;
case 'a':
/* get all device handles... (max 10 devices)*/
for(i=0;i<DevCountSet;i++)
{
printf("Device handle: %ld ",DevHandleSet[i]); // test
PrintChannelValues( 0x090f,DevHandleSet[i],DevCountSet );
/* only all spot channels */
}
break;
case 'p':
PrintDevList();
DevCount
= GetDeviceHandles(DevHandles2, 10);
B-11
Appendix B: C programming of monitoring software
for(i=0;i<DevCount;i++)
{
PrintChannelValues( 0x040f,DevHandles2[i],DevCount );
/* only all parameter channels */
}
break;
case 's':
SetParamValue();
// after setting parameters must print new
//
data in order to show on web
in_file=fopen("status/device.txt","r"); // read device from
//
file
if(in_file!=NULL)
{
fgets(Device,5,in_file);
}else
printf(" Failed to open the file \n");
fclose(in_file);
sscanf(Device,"%ld",&DevHandle); //copy to device and transfer to
//
integer
//DevCount
= GetDeviceHandles(DevHandles2, 10);
PrintChannelValues( 0x040f,DevHandle,DevCountSet );
/* only all parameter channels */
//PrintChannelValues( 0x040f,1 );
/* only all parameter channels */
out_file=fopen("status/wait.txt","w");
fprintf(out_file,"5555555555555"); // means finished setting
// parameters
fclose(out_file);
break;
case 'r':
yasdiReset();
break;
case 'q':
bEnd = true;
break;
case 'x':
DoMasterCmd("shutdown");
//bEnd = true;
break;
case '?':
default:
printf("Commands:\n");
printf(" ? => This list...\n");
printf(" e => Detection of connected devices <device
count>\n");
printf(" d => Print device list\n");
printf(" a => Show spot channel values\n");
printf(" p => Show parameter channel values\n");
// printf(" t => Show test channel values\n");
printf(" s => Write parameter\n");
printf(" r => Reset\n");
printf(" h => Stop/Start <0|1>\n");
printf(" x => ShutDown\n");
printf(" q => Quit\n");
break;
}
}
}
B-12
Appendix B: C programming of monitoring software
/**************************************************************************
Description
: This is the Start ("main")
Parameter
: (none)
Return-Value : (none)
**************************************************************************/
int main (int argv, char **argc)
{
FILE *in_file;
DWORD i;
DWORD dDriverNum;
DWORD Driver[10]; //Max. 10 used drivers ("COM-Ports?")
char DriverName[30],DeviceCount[5];
char IniFile[50]=".\\yasdi.ini";
int iErrorCode;
int DevCnt=0,DetectCheck=0;
FILE *out_file;
if (argv>=2)
{
strcpy(IniFile,argc[1]);
}
printf("************************************************************\n");
printf("
YASDI-Common-Shell-UI (Operating System: %s) \n",
os_GetOSIdentifier());
printf("************************************************************\n\n");
/* init Yasdi- and Yasdi-Master-Library */
yasdiMasterInitialize(IniFile, &dDriverNum);
/* get List of all supported drivers...*/
dDriverNum = yasdiGetDriver( Driver, 10 );
/* Switch all drivers online (you should only do one of them!)...*/
for(i=0;i<dDriverNum;i++)
{
/* The name of the driver */
yasdiGetDriverName(Driver[i], DriverName, sizeof(DriverName));
printf("Try to put Driver '%s' in online state...", DriverName);
if (yasdiSetDriverOnline( Driver[i] ))
printf("success\n");
else
printf("false\n");
}
printf("\n");
/*********** this is to give the amount of device to detect**************/
in_file=fopen("device_count.txt","r"); // read device from file
if(in_file!=NULL)
{
fgets(DeviceCount,5,in_file);
}else
printf(" Failed to open the file \n");
fclose(in_file);
B-13
Appendix B: C programming of monitoring software
sscanf(DeviceCount,"%d",&DevCnt);
/**** begin to detect device ****/
printf("Searching for : %d Device(s), please wait...\n",DevCnt);
/* Execute a Master command and wait...*/
//DevCnt = 2;
/*** if not detect do it again 2 times ***/
do
{
iErrorCode = yasdiDoMasterCmdEx( "detect", DevCnt,0,0 );
if (iErrorCode < 0) //Error?
{
printf("Sorry, but I have found only less than %d
devices....(please don't beat me)\n"
, DevCnt );
out_file=fopen("status/connect_status.txt","w");
if(out_file!=NULL)
fprintf(out_file,"I found less than %d devices\n", DevCnt );
else
printf(" Failed to open the file \n");// test
fclose(out_file);
}
else
{
printf("Ok, I have found %d devices:\n", DevCnt);
out_file=fopen("status/connect_status.txt","w");
if(out_file!=NULL)
fprintf(out_file,"0k, I have found %d devices:\n", DevCnt);
// 0k== zero K...in order to print in index.php
else
printf(" Failed to open the file \n"); // test
fclose(out_file);
}
DetectCheck++;
}while(iErrorCode<0 && DetectCheck<3);
PrintDevList();
/* Start "User interface"... */
DoCommands(DetectCheck);
/* Shutdown YASDI..., bye, bye */
yasdiMasterShutdown();
return (0);
}
B-14
Appendix C: Battery inverter; Sunny Island
C.1 The feature and diagram of Sunny Island ................................................. C-2
C.2 Electrical connection .................................................................................. C-3
C.3 Start sequence of generator ...................................................................... C-5
C.4 Diagram of generator options, Type 1, 2, and 3 ....................................... C-6
C.5 Diagram of External charging of Battery .................................................. C-9
C.6 Technical Data ............................................................................................ C-10
Appendix C: Battery inverter; Sunny Island
Appendix C: Battery inverter; Sunny Island
C.1 The feature and diagram of Sunny Island
C-2
Appendix C: Battery inverter; Sunny Island
C.2 Electrical connection
C-3
Appendix C: Battery inverter; Sunny Island
C-4
Appendix C: Battery inverter; Sunny Island
C.3 Start sequence of generator
C-5
Appendix C: Battery inverter; Sunny Island
C.4 Diagram of generator options, Type 1, 2, and 3
C-6
Appendix C: Battery inverter; Sunny Island
C-7
Appendix C: Battery inverter; Sunny Island
C-8
Appendix C: Battery inverter; Sunny Island
C.5 Diagram of External charging of Battery
C-9
Appendix C: Battery inverter; Sunny Island
C.6 Technical Data
C-10
Appendix D: PV inverter; Sunny Boy
D.1 The feature and diagram of Sunny Boy SWR 700 .................................... D-2
D.2 The technical data ...................................................................................... D-4
D.3 Parameter list .............................................................................................. D-5
D.4 Status parameters ...................................................................................... D-5
D.5 The Error message ..................................................................................... D-6
D.6 Setting parameters ..................................................................................... D-8
Appendix D: PV inverter; Sunny Boy
Appendix D: PV inverter; Sunny Boy
D.1 The feature and diagram of Sunny Boy SWR 700
D-2
Appendix D: PV inverter; Sunny Boy
D.1.1 Connection of PV string
D-3
Appendix D: PV inverter; Sunny Boy
D.2 The technical data
Input values (solar generator)
Input voltage range: UPV
Input current: IPVnom
125 .. 250 V DC
(corresponds with 700 WPACnom)
changeable to 100 .. 200 V DC
(corresponds with 560 WPACnom)
or
75 .. 150 V DC
(corresponds with 420 WPACnom)
depending on the input voltageca. 3.1 to 6.2 A
Output values (mains connection)
Nominal output power:
Working range, mains voltage:
Working range, mains frequency:
Output current distortion factor:
Phase shift factor:
EMC:
Mains retroaction:
Test voltage:
PACnom 700 W, 560 W, 420 W
UAC 196 - 253 V AC
FAC 49.8 - 50.2 Hz
KIAC < 3 %
(at KUmains < 2 %, PAC > 0.5 PACnom)
Cos ϕ
1
EN 50081, part 1
EN 50082, part 1
EN 60555, EN 55014
1.5 kV
Mains supervision:
automatic disconnection
device according to VDEW
Power consumption
Internal consumption during operation: ca. 4 W
Internal consumption during night operation: 0 W
Efficiency
Max. efficiency: ηmax ≥ 93 %
Size and weight
Size (W x H x D): ca. 322 x 290 x 180 mm
Weight: ca. 18.5 kg
Environmental conditions
Admissible ambient temperature range: -25 oC to +60 oC
Admissible relative air humidity: 0 .. 93 %, non-condensing
D-4
Appendix D: PV inverter; Sunny Boy
D.3 Parameter list
Table D.1 Measured parameters of Sunny Boy 750
Name
Unit
Description
Upv-Ist
V
PV-input voltage
Upv-Soll
V
PV-desired voltage of the internal
Upv-control
Iac-Ist
mA
Uac
V
Grid voltage
Fac
Hz
Grid frequency
Pac
W
Power fed to grid
Zac
mOhm
Grid impedance
Riso
mOhm
Isolation resistance
Ipv
mA
E-Total
kW/h
Energy yield
h-Total
Hour
Total operation hours
Netz-Ein
Hour
Total system starts up
Seriennummer
-
Sunny Boy serial number
Status
-
Status message
Fehler
-
Failure description for status “failure”
Current to the grid
Current from PV-panels
D.4 Status parameters
The Status parameter is the message that shows how Sunny Boy works. This is very
important for the operators to determine the status of the system. The Status
messages are in the table E.2.
Table D.2: Status Message
Status message
Stop
Descriptions
Manual system stop
Offset
Offset calibration of the electronics
Warten
Grid connections are not fulfilled (yet)
D-5
Appendix D: PV inverter; Sunny Boy
Netzueb.
Checking grid (grid impedance)
Zuschalt
Electronics are connecting to grid
MPP-Such
PV voltage is determined and set
MPP
Sunny Boy is in constant voltage mode
U-Konst.
Sunny Boy is in constant voltage mode
Derating
Reduction of current fed to the grid
Stoer.
Failure
D.5 The Error message
The Fehler parameter is the message that shows the failures of Sunny Boy. The
failure messages are in table E.3.
Table D.3: Error Message
Error message
F-Bfr-Srr
Description
Communication between microcontrollers is
failing
F-EEPROM
EEPROM can not be read or written in
F-EEPROM dBh
EEPROM can not be read or written in
F-Fac-Bfr
BFR-frequency measurement – value out of
tolerable range
F-Fac-Srr
SRR-frequency measurement – value out of
tolerable range
F-dZac-Bfr
BFR-sudden change of impedance– value out of
tolerable range
F-dZac-Srr
SSR- sudden change of impedance– value out of
tolerable range
F-Imax
Internal over current
F-NUW-UAC
Different values between BFR and SRR for grid
voltage
F-NUW-FAC
Different values between BFR and SRR for grid
frequency
D-6
Appendix D: PV inverter; Sunny Boy
F-NUW-Mess
Different values between BFR and SRR for Vac,
Fac, and Zac
K1-Schliess
Relay test failed
K1-Trenn
Relay test failed
F-NUW-ZAC
F-Offset
F-Rechner
F-Riso
Different values between BFR and SRR for grid
impedance
Offset check for grid voltage or power
measurement failure
BFR or SSR controller failure
Isolation resistance out of tolerable range
F-Uac-Bfr
BFR-grid voltage measurement – value out of
tolerable range
F-Uac-Srr
SSR-grid voltage measurement – value out of
tolerable range
F-UpvMax
PV input voltage above the tolerable maximum
value
F-Zac-Bfr
BFR-grid impedance measurement – value out of
tolerable range
F-Zac-Srr
SSR--grid impedance measurement – value out
of tolerable range
F-Wathcdog
F-ROM
Watchdog for operation control triggered
Failure during ROM test
Special abbreviations:
BFR = Betribsfuehrungsrechner (Sequential Control System)
SRR = Stromregelungsrechner (Current Control System)
D-7
Appendix D: PV inverter; Sunny Boy
D.6 Setting parameters
The operators can set the operation parameter to the inverters. The parameters
which can be set are in following table.
Table D.4: setting parameters list of Sunny Boy 700
D-8
Appendix E: Embedded Hardware Module and Modem
E.1 The Embedded Hardware: MOPS/520 ....................................................... E- 2
E.2 GSM Modem: M20 ........................................................................................ E- 5
E.3 PPPd set up .................................................................................................. E- 9
E.4 Economics Calculation................................................................................ E-10
Appendix E: Embedded Hardware Module and Modems
Appendix E: Embedded Hardware Module and Modems
E.1 The embedded Hardware module MOPS/520
E.1.1 The feature, diagram, and mechanical dimensions
E-2
Appendix E: Embedded Hardware Module and Modems
E-3
Appendix E: Embedded Hardware Module and Modems
E.1.2 Technical data of MOPS520
E-4
Appendix E: Embedded Hardware Module and Modems
E.2 GSM Modem, M20
E.2.1 Feature
E-5
Appendix E: Embedded Hardware Module and Modems
E.2.2 Electrical description
E-6
Appendix E: Embedded Hardware Module and Modems
E.2.3 Configuration of M20
- SIM CARDS
There are 3 types of SIM cards
5 volt SIMs (older style)
3/5 volt SIMs
3 volt SIMs
• The M20 Terminal will not operate with a 5 volt SIM
• We believe (but have not yet confirmed) that The M20 Terminal will not operate with a
3/5 volt SIM
Refer to the document Telstra SIM Cards for Data Calls for further information on SIM
cards for data calls.
- OPERATING VOLTAGE
The current version of the M20 Terminal has supply voltage range of 8 to 15 volt DC.
The voltage range may be extended to 8 to 24 volts DC by connecting a 1-ohm ½ watt
series resistor in the supply line. The M20 Terminal must be protected with a 1.25 amp
fast blow fuse.
- IGNITION LINE
The M20 Terminal has a positive supply line and an ignition line. To turn the M20
Terminal ON and OFF either.
1. Connect the supply line permanently,
Turn the Terminal ON by pulse the ignition line ON for longer than 1 second then
leave it off.
Turn the Terminal OFF by issuing the ^SMSO AT Command.
2. Connect the supply line and the ignition line together
To turn the M20 Terminal ON connect these lines to the supply
To turn the M20 Terminal OFF disconnect these lines form the supply.
Note the operation of the M20 ignition line is different to that of the superseded M1
Terminal.
- CONFIGURING THE M20 TERMINAL
As with all modems, the M20 Terminal must be configured so that it can
- communicate to the PC or data device connected to its serial (RS232 port)
-communicate on the communications network (i.e. the mobile telephone network)
- BAUD RATE
The factory default baud rate of the M20 Terminal to the PC or data device is 19200.
The superseded Terminal, the M1 GSM modem, (factory default) baud rate to the PC or
data device is 9600 baud.
E.2.4 Set Up Procedure for M20
- SIM CARDS
A SIM is require that
1. Is 3 volt and
2. Has a non-transparent data number assigned to it.
- BAUD RATES
The mobile phone GSM (bearer service rate) will always be 9600 baud.
The Baud rates between the data device and the M20 Terminal and the M20 Terminal
(or line modem) at the receiving device (PC) can be different.
To ensure that the system always sends messages correctly the Baud rate of the M20
Terminal serial port ( RS232 port) should be locked to be the same as the data device it
is to be connected to.
- TO CONFIGURE THE M20 TERMINAL
User will need PC (with a terminal program such as Win Terminal, Hyper Terminal, Procom
etc).
1. M20 Terminal
(with connected aerial and power supply and a SIM which has a data
number).
E-7
Appendix E: Embedded Hardware Module and Modems
2. RS232 serial (modem) cable.
3. Another PC with a line modem attached or a second PC with M20 Terminal set up as
below will be needed to make a test data call to confirm the correct operation of the M20
Terminal.
- PROCEDURE
Connect an M20 Terminal to the serial communications port of the PC (using the serial
lead)
Note which serial communication port is being used ie COM 1, COM 2, COM 3 etc.
Turn ON the PC and the M20 Terminal
The M20 Terminal indicating LED will flash (at about 1 per second) whilst it
registers on the GSM network. After about 5 seconds the LED should
remain permanently on. The LED will continue to flash if the M20 Terminal
cannot connect to the network. This may be because the SIM is not correct
(check it is a 3 volt SIM)
Start the terminal program on the PC
To set up the computer so that it can talk to the M20 Terminal
In the terminal program choose [communications] [settings] or as appropriate for user
program, set the configuration for:
Connector/Port
Baud rate
Data bits
Stop bits
Flow control
COM 1 or COM 2 (nominate the port that are using )
19200
8
1
none
To set up the M20 Terminal so that it can talk on the mobile phone network
Type the following
1
2
3
TYPE THE FOLLOWING
AT&F [ENTER]
AT [ENTER]
AT&V [ENTER]
NOTE
Restore the M20 Terminal factory default set up
settings.
Should see OK This confirms the PC is talking to
the M20 Terminal
The current M20 Terminal settings are displayed.
Set the M20 Terminal for 3 wire serial
connection (no hardware control)
4
5
6
7
AT+IFC=0,0[ENTER]
AT&D0[ENTER]
AT&C0[ENTER]
AT&S0[ENTER]
8
ATS0=2[ENTER]
Turns hardware handshaking and software
hanshaking OFF.
M20 Terminal ignores the state of the DTR line.
M20 Terminal holds the DCD line on.
M20 Terminal holds the DSR line on.
Set the M20 Terminal to answer incoming calls
after 2 rings
To set up the M20 Terminal to send data on the
mobile phone network
9
AT+CBST=7,0,1[ENTER]
Select the mobile phone bearer service baud rate
(7) 9600 baud (v.32),
(0) Asynchronous modem, (1) non-transparent.
10
AT&W0 [ENTER]
E-8
Appendix E: Embedded Hardware Module and Modems
11
ATZ0 [ENTER]
Store the set up, in the M20 Terminal’s memory
Store the set up in memory location 0
Load the set up in memory 0 to be the current set
up
12
AT&V [ENTER]
The current M1 settings are displayed. Confirm
that they are as entered.
(It is recommended that the set up is printed for
future reference)
E.3 The PPPd set up
This is a short how-to for setting up PPPd for peer-to-peer communication.
- Required software:
--------------------* Functional Linux system with network ;-)
* mgetty (frontend) version 1.1.28 compiled with AUTO_PPP
accepts a phone call and passes control to pppd.
* pppd (backend) version 2.4.1
is responsible for PPP network things.
1. Overview of the server system
-------------------------------The server has a modem connected to a serial line.
0. The computer started and booted.
1. /sbin/init takes control and run boot scripts etc.
It also run mgetty to monitor the modem.
2. mgetty waits for rings on the phone line.
... someone call its number ...
3. mgetty tells the modem to pick up the call.
4. mgetty may introduce itself and waits for a PPP packet.
5. After a PPP packet has been detected, mgetty passes control
to pppd. After this it's a "normal" PPP session.
2. Setting up /etc/inittab and mgetty
------------------------------------"man mgetty" and "info mgetty" are guidelines!
Insert this line into /etc/inittab
S0:345:respawn:/usr/sbin/mgetty ttyS0
for the modem on ttyS0 (COM1, the first serial port), or
S1:345:respawn:/usr/sbin/mgetty ttyS1
for the modem on ttyS1 (COM2) and so on.
And put this line (if it doesn't exist) in
/etc/mgetty+sendfax/login.config
E-9
Appendix E: Embedded Hardware Module and Modems
/AutoPPP/ -
pppuser /usr/sbin/pppd auth +pap
3. Setting up pppd
-----------------"man pppd" and "PPP-HOWTO"
Create /etc/ppp/options.ttyS0 (or ttyS1 etc.) with these options:
asyncmap 0
netmask 255.255.255.0
proxyarp
lock
crtscts
modem
192.168.0.1:192.168.0.2
Let 192.168.0.2 is the client IP address and 192.168.0.1 the server.
Also put this line in /etc/ppp/pap-secrets
pppuser hostname "password" 192.168.0.2
pppuser is the user name on the client side.
Replace hostname with real host name!
4. Usefull URL
-------------http://www.linuxdoc.org
E.4 Economics Calculation
Price of the Embedded Module (MOPS/520) in percentage of the system
inverter (PV inverter), Sunny Boy:
E-10
Appendix F: PV diesel Hybrid system components
F.1 Layout of the PV diesel Hybrid system ..................................................... F-2
F.2 Genset technical data ................................................................................. F-3
F.3 Battery Sonnenschein 6 OPzV 300, dryfit A600 ........................................ F-3
Appendix F: PV diesel Hybrid system components
Appendix F: PV diesel Hybrid system components
F.1 Layout of the PV diesel Hybrid system
F-2
Appendix F: PV diesel Hybrid system components
F.2 Genset technical data
Genset
Honda
EX 3000
Generator
Type
Frequency converter
Capacitor
AC Output (kVA)
Rated
Maximum
Diesel Engine
Type
Max. power (kW)
Governor type
Fuel Tank Capacity (litres)
Continuous operating hours without
refuelling at rated load
Length (mm)
Overall dimensions
Width (mm)
Height (mm)
Dry Weight (kg)
F.3 Battery Sonnenschein 6 OPzV 300, dryfit A600
F-3
Synchronous
NO
NO
2.7
3.0
4-stroke petrol
5.8
mechanical
19
10.3
910
530
695
109
Appendix F: PV diesel Hybrid system components
F-4
Curriculum Vitae
Mr. Boonyang Plangklang was born in August 9, 1973, in the District of
Sawangdandin, province of Sakonakorn in the Northeast of Thailand. He received
the Bachelor degree of Engineering (B.Eng) in Electrical Engineering from the
Faculty of Engineering, Rajamangala Institute of Technology, Bangkok, Thailand, in
1996. He received a diploma in Instrumentation at Northern Alberta Institute of
Technology (NAIT), Edmonton, Alberta, Canada, in 1997. He graduated Master of
Science in Electronics System and Engineering Management at University of
Paderborn, division Soest, Germany, with the cooperation of Bolton Institute of
Higher Education, UK, by the DAAD scholarship in 2001. He is now a lecturer at the
Department of Electrical Engineering, Faculty of Engineering, Rajamangala
University of Technology, RMUT (former Rajamangala Institute of Technology),
Thanyaburi, Phatumthani, Thailand.