Sie sind auf Seite 1von 5

Design of Microcontroller based PID algorithm for current

control and automating the Capacity test of Class 1 power


supplies used in nuclear applications
Jobby C Johnson, Saji Jacob George
Indira Gandhi Centre for Atomic Research , Kalpakkam
Email: jcj@igcar.gov.in, jacobg@igcar.gov.in

Abstract - Class 1 power supplies used in Nuclear Power Plant prescribed by IEEE and AERB [1]. Presently, a working
(NPP) have to be tested periodically to monitor its healthiness. personnel has been deployed for monitoring and recording the
Lead acid cells are mostly used in all these systems due to their discharge current during the capacity test of lead acid batteries.
high discharge capacity and maintainability. This paper explains Loads have been adjusted manually to keep the discharge
the development of automated battery discharge testing system
current under control. Hence it is proposed to have an
(BDTS) for performing the capacity test of lead acid batteries
using PIC microcontrollers. A custom load was designed as a part automated battery discharge system capable of current control
of automating the capacity test. Discharge current was measured at its specified discharge rate with data logging facility.
using a hall based current sensor and controlled through a PID B. Discharge test
controller. Battery parameters were logged in real time and
recorded for future investigations.
Battery is discharged at 10% of its capacity by connecting
to a suitable load for a test period of 10hoursand the test has to
Index Terms - NPP- Nuclear Power plant, BDTS-Battery be terminated on meeting any one of the below mentioned
Discharge Testing System, Proportional Integral and Derivative conditions [3].
(PID) controller, PIC micro controller, GUI-Graphical User 1. If the battery voltage falls below threshold voltage, Vt =
Interface. 1.85*No of Cells( Volts)
2. If the individual cell voltage falls below 1.75Volts.
I. INTRODUCTION
Stationary lead-acid batteries play an important role in
industries by providing normal control and instrumentation,
power and backup energy for emergencies and therefore
standard practices for battery maintenance, testing, and
replacement is required. Proper maintenance improves the
battery life and capable of satisfying its design requirements [1,
2]. There are a number of tests recommended in IEEE, NERC
and other standards for diagnosing the condition of the battery
banks [1, 3] which includes visual inspections, specific gravity,
float voltage and current measurements, discharge test,
individual cell condition, inter-cell resistance etc. Discharge
test (also known as capacity test) can accurately measure the
true capacity of a battery system [3]. 24V, 30V, 48V and 220V
batteries are the class 1 power supplies used in NPP. They are
used in both safety critical and safety related systems [4].
Fig. 1 Voltage Vs SOC [6]
Discharge rate is specified as Cx, where x indicates the
Fig. 1 explains the discharge curve of lead acid batteries
percentage of battery capacity [5]. This paper discusses the
for a unit cell. From Fig. 1, the cell voltage at fully charged
implementation of digital PID algorithm using microcontrollers
condition is above 2.1Volts and for completely discharged cell
to control the discharge current of lead acid batteries, controller
it is below 2Volts. The concentration of sulphuric acid
tuning and the development of associated hardware and
electrolyte reduces with discharging time.
software modules for automating the discharge test.
II. HELPFUL HINTS
A. Literature Survey
Commercially available dc electronic loads are not Block diagram of the developed BDTS is shown in Fig. 2.
microcontroller based control. They use analog comparator Discharge Current flowing through the load has been measured
circuits for switching power electronic devices to control the using hall effect based current sensor and the output of sensor
discharge current. These loads do not have the log facility to is fed to a PID controller. PID controller controls the current
record the battery parameters to study the performance of flow through the load with help of power electronic devices.
batteries which is mandatory for nuclear components as Few Peripheral devices interfaced have been interfaced to
controller which includes a) keypad- for operator control b)

ª*&&&
LCD display- for parameter status c) EEPROM- for data
logging d) alarms for annunciation. Data logged in EEPROM
have been transferred to PC via VB based software.

Fig. 4 Signal conditioner for current sensor

B.1 Differential amplifier design


Fig. 2 Block representation of BDTS Current sensor output is conditioned using operational
A. Selection of Load amplifier OPA07. A potential divider has been used to measure
24V/80W automotive lamps have been chosen as the load the battery voltage and fed to a unity gain differential amplifier
for testing batteries. The total current flowing through the load for high noise immunity. Analog signals have been digitized at
has been divided into two channels. Current flowing through microcontroller using 10bit ADC.
one channel has been held constant and the current in the other Sensitivity of current sensor = 56mv/A @ 5V
channel is regulated to keep the discharge current under control For zero current, output is = 2.5V.
as shown in figure 2. For a specific battery (rated voltage and For 23A, sensor output is = 3.78Volts.
Ah) a set of lamps have been formed in series–parallel Voltage at inverting input = 2.5Volts
combination inside the load bank with the help of high capacity Non inverting input = 2.5 to 3.78 Volts
bank selector switches provided in the panel. Figure 3 shows Differential gain = 5/1.3 = 3.8
the front panel of the designed BDTS. Front panel has LCD Assume R1=20K, therefore R3=3.8*20= 76K
display, push buttons, ammeter and voltmeter as functional aids
to operator.

Fig. 5 Controller board developed for BDTS

Fig. 3 Front panel of BDTS C. Differential amplifier design


The controller chosen for an embedded application should
B. Measurement of Battery parameters be least expensive r to reduce the overall cost of the system
Discharge current in the circuit is measured using current while fulfilling the system requirement [8]. Based on
sensor and the battery voltage is measured using potential availability, form factor, programming easiness, support, and
divider circuits. Allegro current transducer ACS709 is development environments [Authors], Peripheral Interface
connected in series to the load for measuring the discharge Controller (PIC184580) microcontroller has been chosen for
current. The current transducer has a measuring range up to the development of BDTS. PIC 18F4580 have inbuilt ADC,
37A. The hall sensor generates analog voltage, proportional to digital IO, USB interface and SPI/I2C interface required for
the current flowing through the input terminals [7]. Figure 4 BDTS. Microcontroller signal has been optically isolated from
shows the designed conditioner circuit. load circuits to prevent the EMI from switching loads.
Commands for the capacity test of battery has been given
through push buttons provided in the panel Figure 5 shows the B. PID Algorithm Implementation
controller board developed for BDTS. Analog version PID controller output signal is given by
EEPROM interfaced to microcontroller stores the battery equation 3.
parameters which includes discharge current, battery voltage
and Ah in real time. After the completion of test, the stored data ( )=( ∗ )+ ∗∫ + ∗ + 1(0) (5)
is transferred to PC with the help of serial to USB convertor and
1
VB based software. A text document will be generated by the ( )= ∗ ( )+ ∗ ∗ ( )+ ∗ ∗ ( ) (6)
software for the logged data.
Where Kp, the proportional gain, Ki, the Integral gain and
Kd, the derivative gain and e = error. Laplace transformation is
given in equation (6). Digital equivalent of Laplace
transformation has been analyzed using the backward
difference model and bilinear transformation and explained
below.
A.1 Backward difference model
z−1 1−z
= = (7)
Tz T
After mapping equation 4 becomes,
Fig. 6 PID controller loop ( ) = ((( ∗ + ∗ ^2 + )−( ∗
D. Closed loop current control + 2 ) 〖 ∗ 〗 ^(−1) + (8)
Figure 6 shows the PID control loop of battery discharge ∗ ^(−2) ) ∗ ( ))/ (1
system. The current measured using the current sensor has been − ^(−1) )
compared with the set value for a particular battery and the error ( )− ( − 1)
signal is fed to the PID algorithm to control the duty cycle of
= ( ∗ + ∗ + )
the generated PWM signal which controls the discharge current (9)
through the load. − ( ∗ +2∗ )∗ +
Mathematical expression for PWM signal is given by ∗ ∗ (
equation 1. PWM signal is given by, On simplifying,
= ,0 < < 0 ( ) = 1 ∗ ( ) + 2 ∗ ( − 1) + 3
(1) (10)
∗ ( − 2) + ( − 1)
= 0, 0 ≤ <
Where K1= Kp+ Ki + Kd K2= - (Kp+2Kd) + K3 = Kd.
Where T0 is Ton and T = Ton + Toff of PWM signal.
Average value is given by equation 2. A.2 Bilinear transformation model
1 2 ( − 1) 2 1 −
= = ∗ = ∗ (11)
∫ ( + 1) 1+
1 Applying on equation 4,
= + 0 (2) ( ) = 1 ∗ ( ) + 2 ∗ ( − 1) + 3
(11)
∗ ( − 2) + ( − 2)
∗ 0 Where K1= 2Kp + Ki + 4Kd, K2= 2Ki - 8Kd, K3 =4Kd +
=
Ki – 2Kp.
= (3) Referring to equation 6 and 8 the controller output at ith
instant depends upon i-1th output instant in back difference
Duty cycle of the PWM signal is given by equation 3. model and depends on i-2th output instant in bilinear
Therefore equation 1 can be modified as, transformation. For implementing bilinear transformation
= ∗ (4) additional memory has to be allocated in microcontroller. To
PWM signal from micro controller controls the switching reduce the memory usage and to reduce the computational
of active element in the circuit. complexity, a PID controller using back difference model has
been designed for controlling the battery discharge current.
III. PROGRAMMING Microcontroller measures the connected battery voltage
Programming of microcontroller has been done using C and display it in LCD. Using switches provided in the panel,
language supporting embedded application. CCS compiler has discharge test is initiated and PID controller takes the control.
been used for programming the PIC microcontroller for current Test will be stopped on meeting the termination condition..2.
control. For this work, only the first termination condition discussed in
section 1.A has been taken into consideration.
B. PID controller testing and tuning when Kc = 14. Time period of the sustained oscillations is
Figure 7 shows how current is controlled using PID found to be 2 seconds.
controller when PID parameters, Kp, Ki and Kd were set to 8,
0.85 and 0.2 respectively .The discharge current is oscillatory
in nature due to the frequent switching of power electronic
devices especially in the error band and it takes slightly more
time to settle at its desired value.

Fig. 8 Sustained oscillation at Kc = 14

New controller constants (Kp=8.4, Ki= 1 and Kd =0.25)


has been derived from critical gain and period as per table 1
and the response of the system is plotted in figure 9.

Fig. 7 PID response prior to tuning

To improve the dynamic performance and for reduced


oscillations, it has been decided to tune the PID parameters.
Selection of parameters to optimize the performance of
controller is called tuning of controller. Optimum performance
means fast response and stability of the system [9]. Numerous
tuning rules are available. The approach for tuning can be based
on mathematical model of the whole process or based on the
experimental approaches [10].
In this paper an experimental based approach has been
chosen for tuning. Ziegler-Nichols tuning method is preferred
especially when plant dynamics is not known. Ziegler-Nichols Fig. 9 Response of control system after tuning
tuning can be performed based on the experimental step
responses or based on the value of critical gain that results in The response of the tuned system is found to have reduced
marginal stability when only proportional control action is used. oscillations and error. Comparison of PID parameters before
In this paper, tuning is done based on the critical gain principle. tuning and after tuning are given in table 2.
In critical gain method, only proportional gain (Kp) is used.
TABLE II Comparison of parameters
Integral time period (Ti) is set to infinity and derivative constant
(Kd) set to zero. The value of Kp is increased from zero to a Gain Before tuning After tuning
critical value at which the control output exhibits sustained Kp 8.0 8.4
oscillation and this gain is called critical gain and corresponding
Ki 0.85 1.0
time period of the oscillation is called critical period Tc [11].
Kd 0.2 0.25
Table1 shows how the controller parameters are calculated
based on critical gain and period.
IV. RESULTS
TABLE I Controller constants, critical gain (Kc) and critical period (Tc)
Type of Capacity test has been conducted on 24V/180Ah battery
Kp Ti Kd
Controller with the help of designed system at C10 rate for 10hrs and the
P 0.5Kc ∞ 0 discharge curve is plotted against time as shown in figure 10.
PI 0.45Kc Tc/1.2 0 The discharge current (18A) has been controlled with in an error
band of ±50mA. The current flowing through the load settles
PID 0.6Kc 0.5Tc 0.125Tc
within 4 seconds to the desired discharge current with reduced
The practical results of critical gain method is shown in oscillations. The system outputs a log file which contains the
figure 8. Sustained oscillations of control output was obtained recordings of battery voltage, discharge current and Ah over the
entire period of test.
Research (IGCAR), Kalpakkam for his support. We thank Shri
C. Rajagopalan, Head, RHIDS/RIMMD for his encouragement
in taking challenging works. We sincerely thank Shri C.
Satheesh Kumar, Scientific Officer, PIED/MMG/IGCAR for
his valuable services and timely help.
REFERENCES
[1] IEEE Recommended Practice for Maintenance, Testing,
and Replacement of Vented Lead-Acid Batteries for
Stationary Applications, IEEE Standard 450-2010
[2] IEEE Standard for Qualification of Class 1E Lead Storage
Batteries for Nuclear Power Generating Station, IEEE
std35, 1986
Fig. 10 Battery discharge curve of 24V battery [3] Dinesh Chhajer et al ,Battery Discharge Testing:
Implementing NERC standards and field experiences, ,
V. CONCLUSION Megger, Dallas, April 2014
[4] PFBR, Preliminary Safety Analysis Report, Indira Gandhi
Microcontroller based current control system has been Centre for Atomic Research, Dept of Atomic Energy,
developed for conducting the discharge test of lead acid Kalpakkam, Feb 2004
batteries. PIC 18f4580 microcontroller has been used for this [5] Richard Perez, Lead Acid battery state of charge Vs
development. A custom DC load with lamps has been voltage, Home Power, Sept 1993
developed, fabricated and used for testing Class 1 power [6] R. S. Treptow , The lead-acid battery: its voltage in theory
supplies. PID controller has been implemented using backward and practice, J. Chem. Educ., vol. 79 no. 3, Mar. 2002
difference model and PWM method of controlling current has [7] High Bandwidth, Fast Fault Response Current Sensor IC
been achieved. The controller has been tuned using Ziegler In Thermally Enhanced Package, ACS709,Allegro
Nichols closed loop tuning method and experimented. The Microsystems, Rev 3, 2014
designed system has significantly reduced the work load on the [8] Application note by Freescale semiconductors
operating personnel. http://www.nxp.com/files/microcontrollers/doc/app_note/AN10
57.pdf
VI. FUTURE WORKS
[9] Sigurd Skogestad, Probably the best simple PID tuning
In the designed system, individual cell voltages have not rules in the world, Journal of process control, Sept2001
been accounted as a part of automating the discharge test. [10] Mohammad Shahrokhi and Alireza
Individual Cell voltages are also a critical parameter to be Zomorrodi ,Comparison of PID Controller Tuning
measured. For this a multi-channel data acquisition system is Method,
required. Further, a client-server network architecture can be [11] Brian R Copelan ,The Design of PID Controllers using
established for online monitoring of battery parameters while Ziegler Nichols Tuning, Technical note, March 2008
performing the discharge test. [12] M. Young, The Technical Writer’s Handbook, Mill Valley, CA: University
Science, 1989.
ACKNOWLEDGEMENT
Authors thank Dr. S Murugan, Head, RIMMD, Fast
Reactor Technology Group, Indira Gandhi Centre for Atomic

Das könnte Ihnen auch gefallen