Design and Simulation of PID parameters self-tuning based on DC speed regulating system

The DC speed regulating system has many difficult issues such as system parameters and PID control parameters are difficult to determine. On the basis of model for a single closed-loop DC speed regulating system, this paper puts forward a method of PID parameters self-tuning based on the step response detection and reduced order equivalent. First, detect system step response and get response parameters. Then equal it to a second order system model, and achieve optimal PID control parameters based on optimal second order system to realize of PID parameters self-tuning. The PID parameters self-tuning process of DC speed regulating system is simulated with the help of MATLAB/Simulink. The simulation results show that the method is simple and effective. The system can obtain good dynamic and static performance when the PID parameters are applied to DC speed regulating system.


Introduction
DC motor is widely used because that it has wide speed range, high characteristics, and can be controlled easily.While the control of DC motor speed is the key to meet different applications.PID controller is widely used in DC speed regulation system because of its advantages of simple structure, good stability and reliable operation [1].There are many methods of PID, including position, increment, integral separation, anti integral saturation, variable speed integration, band filter etc. Tuning of PID parameters all depends on the system parameters in these algorithms [2].The speed control system can be influenced by many factors, such as friction disturbance, delay of PWM transform, speed measurement delay, etc, so it is difficult to tune PID parameters because that system parameters are difficult to determine in practically.
In this paper, the step response parameters of the system are obtained by measuring the step response of the DC speed regulation system.The equivalent system model parameters are obtained by using the two order system to equivalent original system, and the self tuning of PID parameters is realized based on the optimal two order system.The method can get the PID parameters which meet the requirements of the control system with one measurement in the case of unknown system parameters.

Mathematical model of DC motor
When the excitation is rated and the DC motor is no-load, its transfer function is In the type: T m -System electromechanical time constant, T l -Armature circuit electromagnetic time constant, C e -Motor potential constant.It is known that the DC motor of the rated excitation is a two-step linear link by (1), in which the parameters C e , Tl are determined by the motor used in the system and Tm is determined by the motor and load used in the system.

Mathematical model of PWM control converter
Whatever the PWM control converter, its drive voltage is all emitted by the PWM controller which can be simulated or digital.The structure diagram of PWM control inverter is shown in Figure 2. As shown in the figure, when the control signal U c is changed, the duty cycle of U g varies with the U c , then the output voltage of the PWM converter is also changed by the linear law, but there will be a certain delay, whose maximum value is a switching period T.The whole PWM control converter can be considered as a lagging link, whose transfer function is In the type: K pwm -Amplification factor of PWM device, T pwm -Delay time of PWM device.
When the switching frequency is 10kHz, T= 0.1ms, the time constant is small.It can be approximated as a first-order inertia link in the general electric drive system [4].Its transfer function is

Mathematical model of speed detection link
The speed detection link is composed of a speed encoder and a speed control algorithm.If the M/T method is adopted, the principle is shown in Figure 4 in which the sampling clock and the high frequency clock are all generated by the system timer.The following type can be got according to the principle of M/T method.

T T T T c n ' '
(5) So the M/T method can be regarded as a lagging link whose transfer function is In the type, The number of encoder grating Z is relatively large generally, so the motor speed is high, then ΔT 1 and ΔT 1 are relatively small and can be ignored.So T n ≈T c .In addition, the selection of Tc is small in order to improve the response speed of the speed control system, so the speed detection is simplified as a first-order inertia link whose transfer function is

Mathematical model of digital PID controller
PID controller is one of the most commonly used controller in automatic control system.When the sampling frequency is high enough in computer numerical control system, the controller can be designed according to analog controller firstly.Then the algorithm of digital controller can be obtained after being discrete.
The transfer function of the PID controller is shown in type (8) or (9).
In the type: In summary, the speed feedback closed-loop DC speed control system mathematical model is shown in Figure 4.The DC speed control system is a 4 order linear systemin the case of no introduction of PID control.

. regulation system
The system can be regarded as a black box in order to detect system parameters.The step response sequence ) (k n can be obtained from the output of the sampling system after adding step excitation to the system.

System type discrimination
The forward peak sequence VF max (k) and valley sequence VF min (k) can be obtained according to time.Then the reverse peak sequence VR max (k) and valley sequence VR min (k) can be obtained after reversing.We can identify the system type according to the number of peak and valley value of both forward and reverse.The discriminant method is shown in Table 1.
Under damping Equal amplitude oscillation Figure 5 and Figure 6 illustrates the distribution of peak and valley value of both forward and reverse in the under damped system or self excited system respectively.We only discuss the under damped system in this paper.The system parameters be properly adjusted to make other types of systemsbe a under damped system.

Determination of step response parameter
Setting the sampling period of the system as T s and the sampling time as T, the step response parameters can be obtained by n(k) [5].

System equivalence of two order systems
We use two order system shown in Figure 7 to equal the DC speed regulation system shown in figure 4 in this paper.
In the type, K, T 1 and T 2 are all Greater than 0.
If step excitation is set as R(s)=A/s,in which A represents excitation amplitude, the closed loop step response C(s) is Steady state value of step response Comparing the standard form (15) of the closed-loop transfer function of the unit feedback two order system with type (11), type ( 16) can be obtained.
T 1 and T 2 can be obtained by the type (16).

PID parameter tuning
Starting from the fast and stability of the system, we use the optimal parameters of the two order system as the basis for tuning the PID parameters, which requires that the open-loop transfer function of the system has basic form of the two order optimal design (18 , type (8) can be equal to The open-loop transfer function of the system withthe introduction of PID is In order to make (20) into (19), the PI regulator should be selected.Meanwhile, for the system to have a fast response, Following type can be got by comparing the coefficient of type ( 21) and (19).
We can determine K by PID normalized parameter tuning method.According to the empirical formula (23) of PID normalized parameter tuning method  22) and (25) to act as the parameters of the PID controller in the original system.Then the tuning of PID parameters is completed.

System simulation
Speed feedback single loop DC motor speed control system can be built in the MATLAB/Simulink environment, which is shown in Figure 8.The system parameters is supposed as follows.K pwm =1.8, T pwm =0.002s, C e =0.5,T m =0.05s, T l =0.02s,K n =1, T n =0.002s.The sampling period is T s =0.005s.Simulation time is T=0.8s.
Step excitation is 100rpm.The PID control is not used at first.The PID parameter is K p =1, K i =0, K d =0.The simulation model of equivalent two order system is shown in Figure 9.The PID control is not used at firstsimilarly.The PID parameter is K p =1, K i =0, K d =0.Other parameters are to be determined.At first, the step response of the DC speed regulating system is obtained before PID correction which is shown in Figure 10.The step response parameters of DC speed regulation system can be obtained according to O(t).The steady state is n(∞)=78.3375r/min.The natural frequency is ω n =61.4782rad/s.The damping frequency is ω d =61.0865rad/s.The damping coefficient is ξ=0.1460.The overshoot is M p =62.8975%.
Secondly, the equivalent two order system parameterscan be calculated according to the parameters of the step response of the DC speed regulation system.K 3 =3.6159,T 1 =0.0354s,T 2 =0.0342s.Its step response is shown in figure 10.Then the PID parameters can be obtainedbased on this.Finally, applying the PID parameters to the equivalent two order system and the original DC speed control system for simulation , can get the PID correction step response curveof the equivalent two order system E PID (t) and of the original DC speed control system O PID (t), which are shown in Figure 11.The step response parameter of the two models can be calculated according to the step response parameter of the PID correction which is shown in Table 2.

MATEC Web of Conferences
According to the simulation results, the PID parameters which are obtained by using two order equivalent and based on the optimal two order system can make the speed feedback single closed loop DC speed control system to obtain better control effect.It has the characteristics of good dynamic performance and high steady precision.
In addition, it also can realize the self tuning of PID parameters.

Conclusion
The PID parameter tuning is difficult in speed feedback DC speed control system because that system parameters are difficult to obtain and are easy to change, which makes the speed control system difficult to obtain good dynamic and static performance.This paper uses the two order system to equal the original system by measuring the step response of a DC speed regulating system, and then realizes the self tuning of PID parameters based on optimal two order system.The Simulink /MATLAB is used to simulate the self tuning method.The simulation results show that the tuning method has a strong ability of self tuning.The DC speed regulation system after being tuned has good dynamic and static performance, which can meet the requirements of engineering application.

Figure 1 Figure 1 .
Figure1is a single closed-loop DC motor speed control systemwith speed feedback in which the amount of adjustment is speed n, the given quantitation is given rotational speed n*.The speed encoder tests motor speed n, then the speed deviation Δn is obtained by comparing the n with the n*, which can generate the required voltage U c of PWM control through PID controller.The PWM controller outputs control voltage U g , which then controls the PWM converter to output motor control voltage U d .

Figure 2 .
Figure 2. Structure diagram of PWM control converter Figure 3. M/T method for velocity measurement min) / ( 60 60 2 1 1 r ZM f M ZT M n

Figure 4 .
Figure 4. Dynamic structure diagram of single closed loop DC speed regulation system

Figure 5 .
Figure 5. Distribution of peak and valley value of both forward and reverse.in the under damped system

Figure 6 .
Figure 6.The distribution of peak and valley value of both forward and reverse.in the self excited system

Figure 7 .
Figure 7. Dynamic structure diagram of equivalent two order system PID regulation is not used firstly(K p =1, K i =0, K d =0).At this time, the open-loop transfer function of two order equivalent system is 1 ) ( ) 1 )( 1 ( ) ( And the relationship (24) between coefficient of PID controller and time constant ® K p , K i , K d can be obtained from type (

Figure 8 .
Figure 8. Simulation model of speed feedback single loop DC speed regulation system

Figure 9 .
Figure 9. Simulation model of equivalent two order system

Figure 10 .
Figure 10.Step responseof former and equivalent model

Table 2 .
Step response parameter of PID correction