A Tuning Method for PID Controller for an Integrating System with Time Delay

A proportional integral derivative (PID) controller is the most commonly used in integrating process, where the time delay is inevitable. In order to tune a PID controller, several factors should be taken into account such as time delay, mathematic model and the feedback signals. Some existed tuning methods failed to obtain the correct parameters with all the factors. The proposed tuning method presents some formulas, which considers all the factors. The proposed tuning method is also tested by practical circuit, which proved that the method can be applied for several cases, especially for the inductor current control.


Introduction
As the main part of electric vehicles, electrical driving system is the most important in the electrical system, which includes motor, power electronic components and control system.
Without any control, disturbance will result in change of the output in the driving system, which will also result in oscillation. The process that displays such counterintuitive behaviours is always known as the integrating process, of which the features make the process more challenging to control [1]. The electrical driving system also corresponds to the integrating process with time delay, such as the process from voltage to the current in the windings, the conversion from torque to speed or speed to position, where the measurement system and sensors always lead to time delay or phase delay.
In order to keep the output of driving system stable without overshoots or oscillations, proportional-integralderivative controller (PID controller) is the most commonly used. As a control loop feedback mechanism, if well tuned, a PID controller can keep the stability of the system effectively, without steady state error [2]. The tuning methods of PID controller can be classified with theoretical method and manual method. Theoretical methods should be used based on the known mathematic models of the controlled target [3]. But for the engineering processes that include uncertain factors such as time delay or extra filters, the existed methods cannot make sure that system can be stable [4], even the increase oscillation may be caused.
Manual methods are often based on the experience of the operators, which are also known as trial and error. The advantage of this type of methods is that the mathematic models of the process are not necessarily needed, but if the disturbance exists, the performance of the controller will be affected [5] , which means that the ability of anti-interference is weakened.
For the motors such as inductor motors or switched reluctance motors, of which the models are always simplified to the combination of inductors and resistors (R-L structure), and because of the inertial characteristic of inductors, a pure inductor has more phase angle than an R-L structure so that the model with a pure inductor has stronger generality for motors. In this paper, the pure inductor is used as the control variable.
The proposed tuning method for PID controller for the integrating process with time delay presents a new tuning method based on the relation among the value of inductance, the voltage of the system, the time delay and the parameters of the filters. The new formulas are also proposed to give an insight to the engineers what is really happening inside the process. PWM system and practical circuit are proposed to test the parameters obtained by the tuning method. The result is that the tuning method can be applied in the integrating process with time delay very well.

Tuning of PID Controller with Time Delay
The overshoot of the system mainly reflects the stability of the dynamic performance of the system. With the increasing overshoot, the amplitude between the maximum output and the steady-state value is larger, and the stability of the system is worse. It is generally considered that the smaller the overshoot is, the more stable the system will be obtained. In order to tune the system without overshoot, the block diagram is shown in Figure 1, and the open-loop transfer function of the process represented as follows.
Where Td is time delay, Kp is the proportional gain, Ki is the integral gain, Kd is the derivative gain, U is the voltage of the inductor, L is the value of inductance. The control system is tuned, assuming that the selected inductance (L) is 0.01H, and a voltage reference (U) of 10 V has been used, current frequency is 2.5 kHz, so that the time delay is 0.0004s. When Kp=1.35, Ki=17.66 and Kd=0.000165, the curve of simulation is shown in Figure 2. With the condition of the system without overshoot, the integrating gain (L/U) is kept constant and the time delay is changed, the system with PID controller is tuned. The result is shown in Table 1. With the same condition above, the time delay is kept constant and the integrating gain is changed. The result is shown in Table 2. It can be seen from Table 1 and Table 2 that the value of Kp and Ki are related to the time delay, the value of Kd, however, is almost independent with the time delay. At the same time, the value of Kd had the proportional relationship with the integrating gain, it can be concluded that 1 Where a, b and c are the constant coefficients. Equations (2)-(6) can be used as the universal formulas for the tuning method for PID controller. The values of a, b and c can be obtained from Table 2 and  Table 3. Based on the known integrating gain and time delay, the PID controller can be tuned by using the equations (4)-(6), and then the system can achieve no overshoot.

Tuning of PID controller with a low pass filter
Most of the measured converter signals are affected by switching noise and other disturbances. It is normal to place a low pass filter in the feedback circuit, and a 'filter' is a part of the dynamic of feedback control. The block diagram of the system is shown in Figure 3.  Where TF1 is the time constant of the filter. If TF1 is chosen too large, an unexpected phase delay will be occurred, if it is too small, the high frequency disturbance suppression cannot be obtained. As a result, the parameter can be assumed [6]. Where the corner frequency is equal to the sample frequency. It corresponds to a half value of the peak time of Based on the previous parameters of the PID controller, the step response of the PID controller with low pass filter, which used previous parameters ignoring the low pass filter can be shown as Figure 4. It can be seen that because of the low pass filter, an overshoot occurred, which means that the equivalent time delay is longer than before.
In the tuning process of the PID controller with low pass filter, as the low pass filter has a transfer effect on the current measurement, which can be equivalent to delay effect, where the time constant of the low pass filter is equivalent to time delay. According to the PID tuning method mentioned above, when the equivalent time delay is The step response of the system after tuning is shown in Figure 5.
It can be seen from Figure 5, the response time of the system increased but is without overshoot.

Tuning of PID controller with two low pass filters
In the practical circuit of PID controller system, the sensors are usually used to feedback the collected signal. In the sensor circuit, in order to reduce the impact of loop noise and limit the high frequency gain, the low pass filter is always necessary. This low pass filter, together with the filter mentioned above, forms the feedback filter system, as shown in Figure 6. The noise of the feedback signal can be eliminated by using a low pass filter, and a first order low pass filter can be used as the model of the sensor circuit filter. The control loop transfer function of the PID controller with two low pass filters can be established. In the sensor circuit of the controller system, in order to reduce the impact of loop noise and limit the high frequency gain, an extra low pass filter is always necessary, as shown in Figure 6.
Where TF2 is the time constant of the second filter. TF1 and TF2 can be chosen as TF1=TF2=6.37×10 -5 s (where the corner frequency is equal to the sample frequency).
Based on the previous parameters, the step response of the new PID controller with two low pass filters is shown in Figure 7. '' ln 2 0.000488 The parameters of the controller should be retuned. The step response of the system with retuning is shown in Figure 8.  Table 3, and the comparison of step response curves are shown in Figure  9.  As can be seen from the Table 3, all the phase margins are higher than 0 degree, which means that all the tuned controllers are working in the stable area. Figure 9 shows that after placing a filter, the response time increases, after placing another filter, the system response time further increases.

Application of PID controller in a PWM system
PID controller is usually applied in the PWM speed control system, for the current control in the integrating process, PWM can also be the technology for the switched mode of power conversion. Simulink/Matlab is used to test the obtained controller parameters by using the proposed tuning method. The simulation circuit is shown in Figure 10. As showed in Figure 10, the setup for the DC voltage source is 10 V, the inductance is set up with 0.01 H, the frequency of the PWM is 2.5 KHz, and the time delay is set with 400 μs. With the disturbance signal placed at 0.5s, the result is shown in Figure 11. Figure 11. The result of simulation of PWM system It can be seen from Figure 11 that with the response time less than 0.01s, the system achieves no overshoot and oscillatory, which means the tuned PID controller can keep the stability of the system effectively, without steady state error.

Application of the PID controller in a practical circuit
PID controller is usually applied in the PWM control system, as can be found in Figure 12, in order to build the test control circuit, Explorer 16 Development Board from Microchip and L298N full bridge driver are used to control the current in the inductor windings.

Figure 12. Circuit of current control of an inductor
With the obtained parameters of PID controller, the voltage is set up with 10 V and the value of the inductor is 0.01 L, as well as the frequency of PWM is 2.5 KHz. With the disturbance placed at 10 ms, the step response of the practical system is shown in Figure 13. A small resistor is connected in series with the load because of protection of the circuit, the result of the practical circuit is different from the one of the simulation result. The response time of the system is controlled within 0.0005s and no overshoot and oscillatory are achieved. It proves that for the practical system, the tuning method can also be applied and the result can meet the control requirement with stability.

Conclusions
A tuning method for PID controller based on time delay has been proposed, which can be especially used in integrating system.
As the result of the tuning method, the Kd is independent of the delay, Kp is inverse proportional and Ki inverse quadratic with the time delay. The lowpass filters are placed in the control system separately, the PID controller is retuned with the equivalent time delay, and the result of the tuning method can meet the requirement of the system response.
With the simulation tool, a tuned PID controller with low pass filters is tested in the PWM control system, of which the step response is observed. The response time is short and the curve is stable. It can be proved that with the tuning method the PID controller can also be applied in the PWM system.
The tuned PID controller with low pass filters is also tested by the practical control circuit, which is made by the PIC chip and the development board. The result of the experiment proved that the tuned PID controller obtained by the new method can also be applied in the practical control circuit and the stability of the system can be ensured.