Other Applications of Renewable Energy System

*Renewable Energy - Technologies and Applications*

Potential: Updated Results", Thirty-Fifth Workshop on Geothermal Reservoir Engineering Stanford University,

[19] Serpen, U., N. Aksoy, T. Onur and E.D. Korkmaz, 2009, "Geothermal Energy in Turkey: 2008 Update" Geothermics, V. 38, pp. 227\_237.

[20] Brogi, A., Alcicek, M.C., Yalciner, C.C., Capezzuoli, E., Liotta, D.,

[21] Pfister, M., Rybach, L., Simsek, S., 1998, "Geothermal reconnaissance of the Marmara Sea region (NW Turkey): surface heat flow density in an area of active continental extension",

[22] Ministry of Energy and Natural Resources (MENR). Energy Statistics in Turkey. available from http://www. enerji.gov.tr (accessed date 26 May

[23] International Energy Agency (IEA). Energy Policies of IEA Countries: Turkey,2005 Review, OECD/IEA, Paris,

Tectonophysics 291, 77-89

Meccheri, M., Rimondi, V., Ruggieri, G., Gandin, A., Boschi, C., Buyuksarac, A., Alcicek, H., Bulbul, A., Baykara, M.O., Shen, C.C., 2016, "Hydrothermal fluids circulation and travertine deposition in an active tectonic setting: Insights from the Kamara geothermal area (western Anatolia, Turkey)", Tectonophysics 680

Stanford, California,

(2016) 211-232

2007).

2005.

**268**

**Chapter 17**

**Abstract**

Design of Three-Term

Microcontroller

digital to converter, liquid crystal display

**1. Introduction**

**271**

*Mostefa Ghassoul*

Controller Using a PIC18F452

Microcontrollers are used in almost any applications that come across one's mind, from small control applications such as home appliances to aerospace. Microcontroller-based controllers are cost-effective and flexible to modify the design to meet the requirement for any control of any industrial plant. Microcontrollers do not require external hardware interface, memories, counter/timers, and ADCs, because they are all integrated inside the chip. Those controllers could be programmed online and do not require any backup memories except for big applications. This chapter presents the implementation of the three-term PID controller using a Microchip PIC18F452 microcontroller. To read data into the controller, a 10-bit integrated ADC is used; and to read data out of the machine, an external 12-bit serial DAC is used. Before programming the PIC microcontroller, the task to be tested could be off-line using a software simulator to make sure that it is working according. When that is the case, it could be then fired into the controller on-line in a mater seconds. Not only that, if the user decides to use different algorithm, he only programs the controller again online.

**Keywords:** PIC microcontroller, PID, timer, Digital to analog converter, serial

constants, Kp, Ki, and Kd, the PID is set to give the most desired performance.

The PID (Proportional Integral Differential) algorithm is the most popular feedback controller used within the process industries. It has been successfully used for over 50 years. It is a robust easily understood algorithm that can provide excellent control performance despite the varied dynamic characteristics of process plant. It is designed to generate an output that causes some corrective effort to be applied to a process so as to drive a measurable process variable towards a desired value, known as the set point. The concept is based (as shown in **Figure 1**) on the re-input of the system own output according to certain laws (hence the name "feedback"). It is desired for the system output to follow the set point. All feedback controllers determine their output by observing the difference, called error, between the set point and the actual process variable measurement. The PID looks at (a) the current value of the error, (b) the integral of the error over a recent time interval, and (c) the current derivative of the error signal to determine not only how much of a correction to apply, but for how long. Each of those three quantities are multiplied by a (tuning constant) and added together. Thus the PID output is a weighted sum. Depending on the application one may want a faster convergence speed or a lower overshoot. By adjusting the weighting

## **Chapter 17**
