Keywords

1 Introduction

Machine learning consists of representation, evaluation and optimization. All systems have been represented computer’s language to handle in machine learning. These systems have to optimize automatically on evaluation function [1]. In this light, a PID control system is great application for machine learning. A PID control system is driven by computer and it has cost function that is composed of rapid response, robust, error and so on. This control system also needs to find suitable variables on cost function.

There are few researches to find parameters of PID controller. A step response shape or vibration period when system was critical stable state are used to find PID’s variables [2]. Or relay response also is used for PID’s variables optimization [3]. GA also was used to adjust controller’s parameters [4]. These studies are tuning methods to adjust unknown parameters because they are calculated in off-line condition.

To apply the machine learning algorithm to a PID control system, every optimization process can be programmed in a computer. This paper uses the hybrid GA to minimize object function on PID controller. This HGA is some kind of micro GA. Micro GA is a binary coded GA that can drive with small amount of program. So this GA has an advantage on running speed. And relay feedback method is applied to limit the solution domain. Usually population is generated randomly in the GA. When population is initialized, it is controlled by Ziegler Nichols method to increase the program’s speed. A range of fitness calculation also is limited by time constant on step response. Each process is confirmed by off-line example.

2 Learning of PID Controller

2.1 Controlled System

A Fig. 1 is a travel motor system. A travel motor is consisted of planetary gear and swash type hydraulic motor. This hydraulic motor has regulator that controlled motor’s speed with changing of swash angle. And regulator is connected with cylinder of EHA (electro-hydrostatic actuator). If EHA’s cylinder was controlled by electric motor, travel motor’s speed will be changed. A Fig. 2 is a hydraulic circuit of test bench. A displacement of EHA’s cylinder is sensed by LVDT (linear variable differential transformer) and this cylinder was driven by electric motor. Test bench has load cylinder to simulate regulator’s load.

Fig. 1.
figure 1

A suggested travel motor system

Fig. 2.
figure 2

Hydraulic circuit of test bench

This system that assume the travel motor was identified as follow

$$ {\text{G}}\left( {\text{s}} \right) = e^{ - 0.31916t} \frac{3.0107}{s + 0.0514} $$
(1)

2.2 Limitation of PID Parameter’s Solution Domain

It is important to limit the parameter’s solution domain in on-line GA. A variable’s searching area has been limited to reduce the learning phase for total system. If searching area has increased, learning phase is getting longer. And every variable has to locate in stable area to protect from damages. When controller has unstable parameter, the on line controlled system will be damaged. Usually GA initializes the first population randomly. This random chromosome will damage the controlled system when use the on-line GA.

This study uses a relay feedback method to find Ziegler-Nichols method. Park was used Ziegler-Nichols method to reduce the solution domain on PID controller with RCGA (real coded genetic algorithm) [5]. If Ziegler-Nichols method can be used on-line, it can reduce the solution domain effectively. And that answer is a relay feedback method.

Figure 3 is a Simulink program for relay feedback. And Fig. 4 is a result from Simulink program.

Fig. 3.
figure 3

Simulink program for relay response

Fig. 4.
figure 4

Result of relay response

Table 1 is variables of normal Ziegler-Nichols method when PID controller looks like Eq. (2) [6].

$$ {\text{C}}\left( {\text{s}} \right) = K\left( {1 + \frac{1}{{T_{i} s}} + T_{d} s} \right) $$
(2)

where, K is gain. T i is integral time and T d is derivative time.

Where, K u is as follow [5].

$$ K_{u} = \frac{4d}{\pi a} $$
(3)

where, a is an amplitude of system’s output and d is an amplitude of relay input. d is 1 and epsilon of relay function is 0.0001. a is 0.095 from Fig. 4, and K u is 1.3403. T u is cycle time of system’s output. T u is 2.187 from Fig. 4.

Table 1. Variables of normal Ziegler-Nichols method

Figure 5 is shown a step response at normal Ziegler-Nichols method.

Fig. 5.
figure 5

Step response at normal Ziegler-Nichols method

Table 2 is variables of modified Ziegler-Nichols method. This method can be supported more smoothed step response than original [3]. A Fig. 6 is a step response at modified Ziegler-Nichols method.

Table 2. Variables of modified Ziegler-Nichols method
Fig. 6.
figure 6

Step response at modified Ziegler-Nichols method (original VS. little overshoot)

A system’s characteristic equation is as follow when system’s block diagram is Fig. 7.

$$ T_{i} \left( {KT_{d} + \tau } \right)s^{2} + T_{i} \left( {K + 1} \right)s + {\text{K}} = 0 $$
(4)
Fig. 7.
figure 7

Block diagram for 1 order system with PID controller

Fig. 8.
figure 8

Step responses and its control outputs (generation 100 vs. 10000)

Each variable has to satisfy Eq. (5) to stable from the Routh stability criterion.

$$ {\text{K}} > 0, T_{i} > 0, T_{d} > - \frac{\tau }{K} $$
(5)

Therefore each variable is bigger than 0 and smaller than twice of modified Ziegler-Nichols method’s parameter.

2.3 Limitation of Time Range for Object Function

Learning time for on-line GA is proportional to time of object function’s calculation. Because an object function is generate from step response error on each chromosome. Each generation needs to calculate the fitness function for chromosome. If on-line GA has 100 generation, 20 chromosomes with 30 s step response, learning time of this system is almost 60,000 s. It is important to select time for object function.

A 5% settling time is about 3T (time constant) on 2 order system. A 2% settling time is about 4T at same condition. So in this study, limitation of time range is 5T in step response when PID’s parameters replace on little overshoot type.

2.4 Modified PID Controller

The original PID controller has a pure derivative. This derivative part will give a very large amplification of measurement noise. When measurement noise is amplified, system’s error is chattered. Therefore controlled system is getting unstable. By this reason, this study use modified PID controller as follow [7].

$$ {\text{u}}\left( {\text{t}} \right) = K(b\left( {r\left( t \right) - y\left( t \right)} \right) + \frac{K}{{T_{i} s}}\left( {r\left( t \right) - y\left( t \right)} \right) - \frac{{KT_{d} s}}{{1 + \frac{{T_{d} }}{N}s}}y\left( t \right) $$
(6)

where, b is acted on proportional term and a N is adjusted low-pass filter. b is limited from 1 to 10 in the hybrid GA. And N is limited from 1 to 20 at same condition.

2.5 Simulation with Hybrid GA

A micro GA is one of the BCGA (binary coded genetic algorithm). It has 5 populations and simple structure. This micro GA’s calculation’s running time is faster than real coded GA. So it was used for structural optimization [8]. Pham and Jin had suggested hybrid GA that based on micro GA. This hybrid GA is non-sensitive on strong chromosome in initial generation [9]. This study uses this hybrid GA.

Initial population is generated randomly. Each chromosome (variable) is limited on solution area. And each chromosome’s fitness was calculated by fitness function (object function). A reproduction operator is selected optimal chromosome that based on fitness value. A crossover operator is evolved the reproducted population. A mutation operator is scaned the unexpected solution area. If generation is increased, population is evolved by genetic operator and population’s chromosome goes to optimal value. A Table 3 is GA’s parameters for hybrid GA. And a Table 4 is results of hybrid GA when generation was changed. A Fig. 8 is shown that results of simulation are not quite different when its generation was 100 and 10000.

Table 3. GA’s parameters for hybrid GA
Table 4. Results if hybrid GA
Fig. 9.
figure 9

Step responses and its control outputs when a rate of generation and population was changed

Table 5 is results of hybrid GA’s simulation when number of object function’s calculation was fixed as 6000 times. A Fig. 9 is shown that results of simulation when the rate of generation and population was changed. If GA has been increased population, the result has been improved. But this study’s purpose is find the GA algorithm for machine learning and a microprocessor has limited on the memories. So the rate of generation and population was selected nearby a 1:1 in this study.

Table 5. Results if hybrid GA when a rate of generation and population was changed

3 Conclusion

Machine learning is a program that can optimize the control system from outer data without operator’s judgments. To apply the machine learning into the GA, it needs some techniques. This study uses the relay feedback method to generate GA population and make a fitness calculation window to reduce a learning phase. In the next study, a structure of hybrid GA was changed as a parallel GA to use the dual core DSP (digital signal processor, DelfinoTM F28377D, Texas instrument).