Auxiliary Digital Control Unit for Capacitor Banks

. This paper addresses the conception of a prototype based in an implementation of a microcontroller proposed as an alternative solution to programmable logic controllers for controlling a capacitor bank. The control considered is in accordance with the Portuguese Energy Services Regulatory Authority. The prototype uses information concerned with the date and time for the accomplishment of industrial schedules. The equipment for the prototype is implemented on a printed circuit board designed and tested for industrial application and is in accordance to current standards for harmonic disturbances.


Introduction
Industrial utilities loads are usually dominated by asynchronous electric motors requiring a magnetizing field, implying that a component of power, known as reactive power, must be supplied.The reactive power is associated with an oscillating energy flow from the electric grid to the motor and vice-versa.This flow carries energy to be supplied to the motor during a part of a cycle and returned to the electric grid during another part of the cycle.The reactive power is not converted into mechanical power in the motor but needed for the accomplishment of the desired conversation of energy.If excessive reactive power is supplied by electric grid, the grid is loaded with too much flow of energy unnecessary for delivering work.More losses of energy into the grid are to be expected, mainly due to the Joule effect, than the one strictly associated with the electric energy for conversion into mechanical energy.So, penalty costs are currently imposed to industrial utilities connected to the electric grid to promote the mitigation of the impact of the flow of reactive power into the grid [1].The Energy Services of the electric grid in Portugal is an activity regulated by the Energy Services Regulatory Authority (ERSE), offering a range of tariff options, through energy levels and schedules for the use of Energy Services.This offer encompasses the purposes to improve energy efficiency usage within the electric grid by the mitigation of the flow of reactive power.Power factor of an installation is defined as the ratio between the active power and the apparent power required by the loads connected to the installation.Power factor of an electrical installation can be seen as a measure of how efficiently the flow of electrical power supplied carries the delivering of the active power associated with electric energy need to be converted into the appliances [2,3].
Power factor compensation must be considered by industrial utilities to comply with regulation to preserve within the established limits the reactive power supplied by the electric grid.So, contributing to improve energy efficiency usage within the electric grid means as much as possible avoiding penalty costs due to an excessive supply of reactive power.Several solutions are in used for power factor compensation systems, being a predominant one based on the installation of a capacitor bank (CB).Industrial timetables on the use of the Energy Services are accomplishment through equipment that contains internal clocks, allowing to perform actions in a suitable predetermined schedule.Some of the industrial equipment using Energy Services on timetable are hardware based in programmable controllers (PLCs), for instance, some of the power factor compensation systems.Manufacturers of these power factor compensation systems are not necessarily manufacturing the PLCs.So, for these manufacturers compatibility must be the considered in the design phase of the power compensation systems, for instance, trade-offs are needed due to the interfacing with commercial PLCs.
This paper proposes an alternative solution to control a CB, replacing the PLC by a microcontroller in the equipment of the power factor compensation systems, accordingly with ERSE.The alternative solution is a contribution for manufacturer of the power factor compensation system giving more autonomous design over the equipment and added proprietary on the final solution.The alternative solution is implemented in the developed prototype and tested in accordance with industrial use.

Relationship to Industrial and Service Systems
Industrial Revolutions have led to new human paths and a latest industrial revolution, i.e., the Industry 4.0, is believed to be on the way of driving a novel path.Industry 4.0 refers to a further evolving stage in the organization and management of the entire value chain process involved in manufacturing industry.Industry 4.0 promotes the connection of physical systems such as sensors, actuators infrastructures and enterprise assets, both to each other and to the Internet [4,5], i.e., Cyber-Physical Systems (CPS).The main characteristics are decentralization and the autonomous behavior of the production process, towards smart factory and smart industry.A sustainable-oriented decentralized organization in a smart factory focuses on the efficient allocation of products, materials and energy.This concept towards holistic resource efficiency is being described as one of the essential advantages of Industry 4.0 [6][7][8][9][10].Energy management and energy efficiency have a core roll Industry 4.0.The regulations and specific power needs have an increasing importance to drive the smart industry.Motivated by a mix of environmental factors, cost challenges and regulations the attention for pro-active energy consumption capabilities has never been higher.In the light of the current energy scenario, industrial clients who are required to follow the regulations have a major interesting in energy efficiency.The proposed solution in this paper provides an alternative design for power factor compensation, which is one of the concerns regarding energy efficiency.This solution based on microcontrollers is foreseen to progress in the sense of being equipping with communication devices that allow an easy integration into a smart industry, i.e., connected with the internet by CPS.This integration comes in the sense of providing a means for the intelligent energy allocation, which is a goal of the industry 4.0.

Prototype Conception
The prototype controls the switching on/off from a CB (from the power supply of the varmeter controller), and/or controls the switching of a step capacitor according to predetermined schedules.The prototype is equipped with a varmeter relay (VR) and satisfies the following requirements of: withstanding electromagnetic interference, harmonic disturbances, and thermal variations due to being placed in the neighborhood of the VR; withstanding voltages from 350 VAC to 450 VAC; withstanding environmental testing of avionics hardware [11]; having three relay outputs, 5 A and 400 VAC, that can be reconfigured to in landing the CB or to force a CB step into service; having two inputs, one time selector/viewer to allow the user to select schedules and a display input/output status and a communication port.A photo of the prototype final assemble is shown in Fig. 1.The hardware of the equipment is implemented in a designed electronic board in accordance with the architecture showed in Fig. 2. The main purpose of the microcontroller is satisfaction of the ERSE requirements on reactive power, accordingly to time tables.A Real-Time Clock (RTC) is used instead of the internal clock of the microcontroller, due to having higher precision and the lack of needing an external power supply.The prototype also has: one Secure Digital (SD) card to save the user decisions; one Liquid Crystal Display (LCD); buttons to visualize and interact with the user; one buzzer for warnings; one Universal Serial Bus (USB) for input and output.Finally, the following protocols are required for: • The Peripheral Interface (SPI) used by microcontrollers to communicate with one or more peripherals components over short distances in master-slave model.For the communication to coexist is normally required in all the devices four signal lines: Master In Slave Out (MISO), Master Out Slave In (MOSI), Serial Clock (SCK) and Chip Select (CS) [12]; • The Inter-Integrated Circuit (I2C) also working with the master-slave model.This protocol contains their own pins to establish communication, the Serial Data (SDA) and the Serial Clock (SCL).The SDA is the pin that transfers the data and receives it (bi-directional), while SCL controls the timing between the devices, to ensure a reliable communication from the SDA [12]; • The Universal Serial Bus (USB), a simple protocol that allows the transfer of data between computers and peripheral devices.On the computer is installed the host controller, while in the peripheral is installed the device controller.The host carries the polling to allow communication with all devices, authorizing communication only if the bandwidth has less than 90% occupation.The host uses the serial mode communication with four lines, power, ground and a pair of twisted wires with differential voltage [13]; • The Universal Asynchronous Receiver/Transmitter (UART) protocol, having an asynchronous communication, works with two pins: the transmission (Tx) and the receiving (Rx) [14].A Future Technology Devices International (FTDI) is used to convert the USB protocol into UART to allow the communication between the microcontroller and the USB peripheral.
The printed circuit board (PCB) with the prototype is showed in Fig. 3.In Fig. 3 PCB design shown is made through the use of the software Eagle CAD and the components are implemented and the values computed to ensure the correct performance of the system, for instance, capacitors are added next to each power pin.The schematic for the bypass capacitors for the microcontroller is showed in Fig. 4. The schematic for the low-pass filter for one input is showed in Fig. 5.In Fig. 4 the capacitors implement the bypass operation used to reduce high current frequencies in a high impedance path, diverging the current into another path using a capacitor, discarding current noise that usually exists in electronic circuit feeds, preventing the injection of unwanted signals into the system.In Fig. 5 is shown the low-pass filters used at the input buttons to allow low frequencies and attenuating frequencies with higher than the cut frequency.The cut frequency (fc) is selected to be higher than the expected frequency at the input button and simultaneously lower than the lower frequency used in all the system.The lowest frequency present in the system is the PWM, which has a default value the 490 Hz [12].Bypass capacitors of 0.1 µF are chosen in accordance with usual design practice [15,16].
The software algorithm uses the arduino platform, with C/C++ language and is organized in several routines, to perform specific tasks.An essential part for a feasible prototype is the approach used as an interface between the user and the prototype.A SD card is used for this approach to store the user information about the decisions to be carried out by the system.So, the user information is stored in the SD card in an Excel document that allows the user to input the information.This Excel is used to create several .txtfiles to be read by the equipment to implement the schedules.As a user alternative interface, and LCD and manipulated buttons are available.The information entered by the manipulated buttons is likewise stored in the SD card.

Excel Sheets and Buttons
The Excel document is design with three sheets as follows: the first is for the configuration of the user decisions; the second is for the holidays according to the geographical implementation of the equipment; the third is for the desired schedules.The sheet for ERSE configuration is showed in Fig. 6.On alarm mode, when the input is not active, the output is functioning normally, when the input is active, all the outputs are turned off and a beep is trigged.On control mode the user can chose how the output works, only controlled by the input, by the input and the schedules or only by the schedules.The user makes decisions by clicking in an Excel sheet, depending on the previous decisions the options of the sheet fields change.On the sheet for the holidays the user types the necessary information about the holidays, setting the date and time.Under programming specifications, time is set always to zero hours, zero minutes and zero seconds.The final sheet is divided by legal winter/summer time and further subdivided into regions and tariffs.A change of information due to the ERSE entity is easily to be introduced in the Excel sheet and parsed by the system.
When the device is turned on it starts to verify the existence or the absence of the configuration document.If it does not exist, questions are asked through an LCD, to which the user responds by the interface manipulated by buttons.Eventually, new questions are arise depending on the previously given answers.The user makes the decision, selecting the button corresponding to option one, two or three.The buttons are arranged in order from top to bottom.So, the first button counting from top, selects the option 1 and so on.

Results
The device is placed on the outside of the capacitor bank cabinet as seen in Fig. 1.The device is not covered by any shield but is enough secured in what respects to possible electromagnetic interferences.Several tests on the prototype to verify the correct operation of the device are in accordance with the expected performance for industrial applications.The outputs such as the switching on/off the CB from the power supply of the varmeter controller and/or putting a step capacitance are rehearsed according to two types of inputs.The outputs could be set from a predetermined schedule or by buttons or even by both.Also, the check for correct operation of the device using the LCD, the visual feeding of the equipment (LEDs) and the sound signaling (buzzer) is in accordance with the practical application.

Conclusions
This paper presents the conception of a prototype implementation of an original study as an alternative solution to control a capacitor bank using a varmeter controller, according to the schedules provide by the Regulator of Energy Services in Portugal.The prototype uses a microcontroller on a developed circuit board, thus replacing the conventional use of a PLC.The prototype offers two different interface solutions between for the user.One of the solutions uses an Excel document to obtain information about the decisions to be carried out by the system.The other, uses an LCD and the buttons available, to obtain the user information.The information coming from both solutions are stored to be read and write through an SD card.The establish architecture for the device hardware considered all the procedures to build the PCB and protocols needed and the design the PCB is made through the use of the Eagle software.The experimental results shows that the hardware and software implemented is suitable for industrial application, assuring the performance characteristics and conveniently mitigating the use of reactive power.Also, this conception brings to the manufacturer of the power factor compensation system a full proprietary of the final solution, giving more autonomous control over equipment final solution.Future work is further concerned with innovation possibility in the software and a convenient adaptation for power system on conventional aircrafts.