Idea of adaptive control implementation in anti-corrosion protection systems of underground steel structures

Paweł Sokólski

SPZP CORRPOL, Gdańsk

Abstract: The paper discusses the use of modern control methods such as adaptive regulator in anti-corrosion protection systems. Based on available market solutions in the field of cathodic protection, an “intelligent” control system, which increases protection effectiveness, while minimalizing the currents flowing in the system, is proposed.

Keywords: adaptive control, identification, microcontroller, anti-corrosion protection

lectrochemical corrosion of underground steel structures caused by stray current is an important problem. All public transport systems such as trains and trams use the railways as one of the electric power transmission lines. However, it appears that some of the current flowing in the system (positive pole connected to the power line, the negative to the rails) also flows underground and by underground steel structures. Therefore, at the site of impact of this currents corrosion occurs. The device called drainage, is widely used to discharge of electricity from underground structures (eg. pipelines) which prevents the transition of iron ions from the line to the ground. It is necessary to perform number of time-consuming measurements to identify the characteristics of the object (the underground structure and the surrounding soil) and choose the appropriate settings in order to use the device. The purpose of this paper is to present the idea of an intelligent device, adapting to the place of its work and maintaining optimal operating parameters irrespective of the location, time of the day (change of intensity of trains and trams traffic), or changes in the system [1].

1. Assumptions and difficulties

The aim of the project is to develop and implement a control system of active anti-corrosion protection using methods of cathodic protection. The developed system should have three main characteristics:

1) The control system on the basis of signals from the system (fig. 1) should calculate control signal for the drainage that adjusts the value of the current flowing in the system. This means that the input values (voltage, potential), and the control value (current − through a specially designed actuator) are well defined and that no additional signals are available [2].

2) The control system should be able to function properly at any place of installation without prior measurements and initial configuration. The control system must adapt itself to the control object.

3) Object (drainage) must be controlled in an optimal manner because of the set criteria. It was decided to implement such a control system that would ensure the minimization of the current flowing in the system while meeting the requirements for cathodic protection (ensuring appropriate ratios).

Fig. 1. Installation schema
Rys. 1. Schemat instalacji

The main difficulty with “controlled drainage”, with such assumptions, is the lack of knowledge about properties of the control object. The aim is to design a control algorithm that works correctly regardless of the place of installation. For this purpose, it is necessary to identify parameters of the environment in which a drainage is mounted. The nature of interactions, the device should prevent, is also unknown. This causes the need for a thorough examination of the signals which affect the process that takes place in order to determine the control method appropriate to compensate them. Both of these models − the control object model, and the model of interactions (stray currents) − must be available for the drainage control process. Therefore, it is necessary to continuously measure the parameters and continuously update models in memory in the form of characteristic, or a set of parameters. This approach allows to use the device without conducting long-term research and measurements in the area where the device is to be mounted, to ensure that any change in the parameters of the system (eg. tram timetable change changes daily course of stray currents) will be taken into account. This explains the use of identification algorithms and justifies the use of adaptive control in the discussed applications.

Another important issue, is the drainage control optimization. The optimization process in this case should be considered in two stages. Based on the model of impact changes throughout the day algorithm, should define the indicators describing degree of protection against corrosion. In view of the fact that there are periods during the day (e.g. night hours when tram/rail traffic is suspended), in which the impact of stray currents on the object is minimal and the periods of increased activity (e.g. peak hours), it may be that the value of the determined resultant coefficients allows to reduce the intensity of protection. It may be found that it is possible to ensure the full protection of the object, while reducing the current flowing in the system by calculating the optimal control signal for the whole day.

The second stage of the optimization is to determine the characteristics of the controller (a non-linear controller), which will ensure that the requirements for the time of day will be met. It is necessary to shape the system characteristics in a way to ensure an optimum use of
energy.

All of these assumptions and the characteristics of the drainage control algorithm require the existence of components responsible for the identification, adaptation and optimization. These algorithms (requiring machine learning) characterize this solution as “intelligent” (using methods of computational intelligence), and the entire device as “intelligent drainage”.

2. Idea

In order to process the set of tasks and meet requirements, the concept of multilayer, intelligent adaptive controller that allows the optimization of drainage control in anti-corrosion protection was developed. Figure 2 shows a diagram of the concept and the specified stages of the algorithm.

The control algorithm consists of three main layers:

1) Optimization of control with the horizon of 24 hours to determine the shape of the hazard rates of corrosion processes during the day. This layer develops trajectory (the desired coefficients in the function of time), which provides complete protection of the facility, while minimizing the adverse factors (eg too high currents). Coefficients developed by this layer are carried out by the next layer.

2) Short-term control optimization consists in shaping the characteristics of the controller in order to obtain the coefficients that have been calculated by the previous layer. Since the actuator in the form of a controlled drainage, allows to shape characteristics in any way, it is possible to calculate the optimal characteristics of the controller.

3) Direct control layer based on measurement of current adjusts control value so that the actual current in the circuit correspond to the optimal current calculated by higher layers.

Such implemented control structure allows the ongoing monitoring of the process taking into account the effects of daily changes in the system.

Fig. 2. Diagram of algorithm stages
Rys. 2. Diagram algorytmu

2.1. Trajectory during the day

In order to implement the first supervisory layer of the controller, it is necessary to collect enough data during the day to identify the interesting factors indicative of risk of corrosion. This means a continuous collection of data from the object leading to the collection of large amounts of information by the microcontroller. The storage of data collected in the sampling rate of the measuring device would require a very large memory size (data sampled at a period of several milliseconds for 24 hours).

Therefore, it was decided to divide the 24-hour period (in case it proves insufficient: for 48, 72, etc.) for which the collected data will be averaged.

Because of this, in the memory of the microcontroller only a small set of parameters corresponding to the time of the day is stored, and more specific current data vector, which will be continuously averaged for each point during the day. Then, using the received points by interpolation of zero, or the first order (depending on your needs), intermediate values between these points will be calculated. This approach will enable the analysis of changes of impacts throughout the day, while minimizing memory requirements of the control. Thus, the obtained characteristic of changes during the day is the basis for calculating the optimal control on the daily horizon. Because this characteristic is created by averaging the values, it may be inaccurate for certain periods during the day and vary significantly from the real values. It is assumed, however, that the control over the day should be optimal relative to the average values rather than instantaneous, so it is not necessary to know the exact value at any point in time.

In that case, however, if averaging data for each hour was not enough (satisfactory results will not be achieved) it is possible to increase the number of points per day for averaging.

On the basis of the obtained characteristics of change during the day, it is possible to calculate the changes of the corresponding intensity of protection that will ensure compliance with established criteria while optimizing operation of the device. The result of this stage of the algorithm is the characteristic defining change in the value of the specified parameter (significant from the point of view of cathodic protection) per day in 24 (or more) points.

2.2. Object characteristics

To allow the realization of the assumed trajectory of protection (based on interactions in the course of a day), it is necessary to identify the control object, which consists of the underground structure along with the surrounding land and the electrodes. For this purpose, it is necessary to carry out measurements of the voltage and the potential occurring in the system. Sample characteristics obtained from measurements are shown in Fig.3. Voltage-potential characteristics are linear, however, the voltage values occurring in the real object are random, so that the intensity of some values is greater than the other, as illustrated in presented example characteristics [3].

This characteristic can be approximated by a straight line. However, the distribution of the probability of data values in the chart has a significant impact on the values of coefficients responsible for the cathodic protection effectiveness (the desired value is calculated in the previous step of the algorithm). This is due to the fact that the value of the mean calculated from the total waveform. Therefore, it is necessary to determine the probability distribution of occurrence of data values in addition to calculating the linear approximation. Figure 4 shows an example of the result of the identification of the controlled object in two characteristics: a linear waveform voltage-potential characteristics and the probability distribution of occurrence of voltage values (in the absence of draining the probability distribution of a given voltage is associated with significant from the point of view of cathodic protection distribution of the probability of a given value of the potential).

Fig. 3. Measured object characteristics
Rys. 3. Charakterystyka obiektu otrzymana na podstawie pomiarów

With such problem of identification it is possible to use the method of least squares (LSM) to determine the characteristics of the examined parameters [4]. But while a linear approximation of the course is not a significant problem, it may be problematic to determine a probability distribution.

Fig. 4. Object identification
Rys. 4. Identyfikacja obiektu

It turns out that the probability is not always possible to be described by a normal distribution. Therefore, an attempt to approximate the value of the likelihood function as a gauss function leads to large errors. It may be necessary to obtain an empirical distribution profile in a table with a resolution of 0.1 or 0.01 V. The profile of the probability distribution (as opposed to recording in the form of a series of parameters which describe a normal distribution) requires reserving a large area memory, however, it helps to avoid errors due to erroneous assumptions. Another major problem in the identification of the probability distribution is that from the standpoint of the cathodic protection the potential values occurrence probability distribution is important, and not the voltage in the circuit, which can be easily measured. While these values are closely related when the drainage system is not working, working drainage distorts the characteristics (Fig.5) and the direct determination of the distribution based on it is impossible.

Fig. 5. Object characteristic distorted by the working drainage
Rys. 5. Charakterystyka obiektu zniekształcona przez działanie drenażu

On the basis of the obtained characteristics (without the use of drainage system) it is possible to determine the risk factors characterizing the corrosion processes of the system. Using the characteristics daily optimal values of these coefficients for a given time of day are calculated. Knowing the control object model, and the setpoint defined by optimization algorithm, it can be specified how the controller should behave, in order to obtain the desired result coefficients. Figure 6 shows a comparison of the average potential (as one of the factors used in corrosion hazard analysis) in two cases: without a drainage, and with a drainage. As it can be seen, the collapse of the characteristic caused by the switching on the device resulted in a significant decrease in the average value, by moving it in areas where corrosion processes run slower, or stops completely.

Fig. 6. A The change of the average potential after use of a drainage [1]
Rys. 6. Zmiana wartości średniej potencjału po zastosowaniu drenażu [1]

At present, this method is associated with long-term measurements in the place where drainage is to be applied in order to determine the appropriateness of its use, and its operating parameters. The aim of the intelligent drainage project is to use of such a control system that will be able to change the parameters of the device so that they are optimized for the place of installation and the time of the day. It is important that the machine should “learn” how to work and carry out the calibration on an ongoing basis without interference from outside. External interfaces should be used only for monitoring and measurement purposes, while the intelligent drainage adapts itself to work in a place where it was installed all by itself.

3. 2. Controller characteristics

Controlled drainage, which is an actuator in described system, allows to shape the potential-voltage characteristics (on the base of the control signal from the microcontroller) and allows to control the current flowing in the system. Figure 7 shows an example of the characteristics possible to obtain with the use of controlled drainage. This characteristic has three specific breaking points representing change in the behavior of the device. The section from the beginning of a curve to the point A is the passage in which the drainage is turned off and is not a subject to control. Point A according to the technical solution is at
voltage of 0.7 V (in the case of application of diodes), or 0 V, in the case of application of a MOSFET transistors. Although this area is not the subject to regulation and developed control system has no effect on the position of the point A and course of the characteristics to the left of it, this area is important because of the factors that should be maintained as a result of drainage work.

Fig. 7. Schematic illustration of the controlled drainage work [1]
Rys. 7. Schematyczna ilustracja pracy drenażu sterowanego [1]

This area has a significant impact on the analyzed system (for example, the average value), which significantly affects the formation of the rest of the characteristics of the device. It may also occur that in the case of the actual characteristics of the entire system being shifted, the area of the negative voltage does not occur at all. From the point of view of the control system characteristics in the section AB, BC, and from point C to the end are important. Controlled drainage allows to change the slope of any segment AB, determine the potential at which there is a horizontal section BC and the position of the point C, at which the re-breakdown of the characteristics occurs. The location of these points is arbitrary, however, limited current endurance of the device greatly limits the area in which the points can be located. Reducing potential (section AB), keeping it at a constant level (BC), or moving the entire characteristic (section C to the end of the curve) is associated with the current flow in the circuit. Restrictions imposed on the actuator have an influence on the maximum slope of the line segment AB, due to the existence of their own resistance. The point C and the breakdown of the characteristic are always present when the maximum current that can flow in the system is no longer able to compensate the potential increase caused by external impact.

These phenomena (non-zero resistance and the maximum possible current) limit the area in which the control algorithm can locate points B and C (assuming a constant position of the point A arising from the construction of the device). This area is limited by the characteristics of the object without drainage (drainage does not allow deviations in the opposite direction, which would have a negative effect and would increase the rate of corrosion). Figure 7 shows the area (in gray), where points B and C can be located. The lower limit is a special case when the unit is operating at full capacity, and the points B and C overlap.

In the drawing the sample characteristics of work was applied and points B’ and C’ were marked. Since the location of those points could vary in the work area, there is an infinitely large number of possible characteristics. The task of optimizing algorithm is to calculate such a position of points B’ and C’ to achieve the requirements of the higher layer, analyzing interactions change during the day, while minimizing currents flowing through the underground. Moreover, the presented characteristics are obtained by using the characteristics of the controlled drainage configured to hold potential at a preset level (segment B’C’), but because any of these points can be located anywhere (and hence: reducing, maintaining, increasing the potential within a limited range) it is possible to pursue any course, for example parabola.

Theoretical and practical verification is required of whether this characteristic shape change can have a positive impact on the process of optimization. While it is possible that the use of more complex waveforms can significantly increase the computational complexity, in the practical implementation of the optimization, the use of a polynomial may be easier to implement (using known techniques) rather than to try to solve the problem of optimization based on the curve resulting from the combination of many segments.

The result of this part of the algorithm is the desirable characteristics of potential (E) on the voltage (U), which provides meeting the requirements, while minimizing the flowing currents. This characteristic is accurately reflected in the value of current that must flow in the system for a given value of the measured voltage. Maintaining the current in accordance with the optimum characteristics for a given area and a given time of day is carried out by the direct control layer.

Figure 8 shows schematically how the discussed control algorithms are linked together, and how it will be implemented in drainage control, except for the part responsible for the identification of individual models.

Fig. 8. Control loop in the proposed intelligent drainage control system [1]
Rys. 8. Pętla sterowania w projektowanym systemie sterowania inteligentnego drenażu [1]

It is assumed that variability of daily course of interactions and characteristics of an object without the applied drainage is known. In this case, on the basis of what time of the day it is, the desired value of one of the parameters characterizing the corrosion processes (eg, the average value of the potential) is determined directly from the optimal course stored in the memory.

Knowing the value which should be maintained, optimal drainage control model is determined. On the basis of actual voltage, a the setpoint for current to be realized by the system is calculated.

The control system having direct current setpoint and the actual value coming from the measurement modulates pulse width (Ipwm) of the control signal to maintain the real value of current at the set level.

3. Hardware platform

In order to implement the control algorithm presented above, it was decided to use an 8-bit microcontroller platform. Microcontroller running in the configuration shown in fig. 9 must be characterized by the appropriate features.

Fig. 9. The implementation of the control system hardware
Rys. 9. Realizacja sprzętowa układu sterowania

Voltage and current measurement is performed by a system included in a drainage device and control signal is implemented by current pulse width modulation. As the input signal drainage voltage is applied in the range
of 0−5 V proportional to the duty cycle signal. This configuration means that the microcontroller is required to be equipped with at least 3-channel analog-to-digital converter and voltage PWM system, which enables together with suitably chosen capacitor to implement the function of digital-to-analog converter.

Another requirement is that the microcontroller should allow implementation of discussed algorithms. This is connected with a sufficiently large program memory and main memory for fast processing of large amounts of information, and data collection. It is important that the software used to program the microcontroller allows the high-level programming language such as C. Proposed algorithms require the use of complex mathematical operations, the implementation using lower-level languages such as assembler, could make the project implementation impossible.

Although these are the qualities sufficient for proper implementation of the control system, the project also required to allow a microcontroller to exchange data with a PC. To do this it is required that the micro-controller was equipped with a UART port allowing RS-232 standard interface communication. Connection to the microcontroller allows monitoring, an analysis of work and the collection of characteristics developed by the identification algorithm (test and measurement function).

4. Summary

This paper presents the concept of the use of modern control methods in an unusual application of cathodic protection of steel structures underground system. The use of digital technology and devices to enable adaptation for unknown parameters of the plant can significantly reduce the time needed to implement a system of protection and increase its effectiveness through the optimal selection of the parameters. The use of auto-tuning algorithms will also eliminate the impact of human errors caused by the lack of professional service.

Considering that corrosion is causing huge material losses and the risks associated with damage to steel structures (tanks, pipelines, etc.) research to optimize protection from the destructive effects of stray currents appear to be justified.

Acknowledgements

Paper has been realized within the program of the Innovative Economy POIG.01.04-22-004/11 “Developing new solutions for active corrosion protection with cathodic protection” co-financed by the European Union.

References

1. Sokólski W., Sokólski P., Intelligently controlled drainage, [in:] Proceedings of XII National Conference − Corrosion Measurements in Electrochemical Protection, Jurata, 2012, 155-166.

2. Sokólski W., Charakterystyki drenaży elektrycznych, [in:] Proceedings of VI National Conference − Corrosion Measurements in Electrochemical Protection, SEP, Jurata, 2000, 151.

3. Sokólski W., Metoda korelacyjna badania prądów błądzących. Piętnaście lat doświadczeń, [in:] Proceedings of IV National Conference − Corrosion Measurements in Electrochemical Protection, SEP, 1996, Jurata; “Ochrona przed Korozją” 5/1997, 126–130.

4. Sokólski P., Implementacja krzepkich metod estymacji dla celów regulacji predykcyjnej typu MPC, master’s thesis, Gdańsk University of technology, Gdańsk, 2011.

Sterowanie adaptacyjne w ochronie przed korozją stalowych konstrukcji podziemnych

Streszczenie: W artykule przedstawiono propozycję zastosowania nowoczesnych metod sterowania, takich jak sterowanie adaptacyjne, w ochronie przed korozją. W oparciu o dostępne na rynku rozwiązania z zakresu ochrony katodowej zaproponowano system „inteligentnego” sterowania w celu zwiększenia skuteczności ochrony, przy jednoczesnej minimalizacji płynących w układzie prądów, dzięki dokładnej znajomości obiektu sterowania.

Słowa kluczowe: sterowanie adaptacyjne, identyfikacja, mikrokontroler, ochrona przed korozją

Paweł Sokólski, MSc Eng

PhD candidate at Gdansk University of Technology at the faculty of Electrical and Control Engineering and student of Mechatronics at the faculty of Mechanical Engineering. In professional work focuses on industrial informatics and control engineering in cathodic protection.

e-mail: sokolski.p@gmail.com