PID parameter setting method for cooling water temperature controller of diesel engine

文档序号:1686677 发布日期:2020-01-03 浏览:30次 中文

阅读说明:本技术 柴油机冷却水温度控制器pid参数设定方法 (PID parameter setting method for cooling water temperature controller of diesel engine ) 是由 李慧 贾炜 段后东 张帝 李肖 阎宇杰 于 2019-11-07 设计创作,主要内容包括:本发明公开了一种柴油机冷却水温度控制器PID参数设定方法,柴油机冷却水温度控制器包括PLC通过线缆连接伺服放大器以及与伺服放大器连接的伺服单元,来控制三通阀的开度来调节冷却水温度,控制三台海水泵的运行调节了海水流量从而提高冷却水温度调节的速度。本发明提出的线性递减策略动态调整惯性权重的改进粒子群优化算法来对冷却水温度控制器的PID参数进行优化整定,完成精确地控制冷却水温度的工作,提高柴油机工作性能的同时实现节能环保的目的。本发明可用于柴油机技术领域中冷却水温度控制系统。(The invention discloses a PID parameter setting method for a diesel engine cooling water temperature controller, wherein the diesel engine cooling water temperature controller comprises a PLC (programmable logic controller) which is connected with a servo amplifier and a servo unit connected with the servo amplifier through a cable to control the opening of a three-way valve to adjust the cooling water temperature, and the three seawater pumps are controlled to operate to adjust the seawater flow so as to improve the speed of adjusting the cooling water temperature. The improved particle swarm optimization algorithm for dynamically adjusting the inertia weight by the linear decreasing strategy provided by the invention is used for optimizing and setting the PID parameter of the cooling water temperature controller, thus finishing the work of accurately controlling the cooling water temperature, improving the working performance of the diesel engine and realizing the purposes of energy conservation and environmental protection. The invention can be used for a cooling water temperature control system in the technical field of diesel engines.)

1. A PID parameter setting method for a cooling water temperature controller of a diesel engine is characterized by comprising the following steps:

(1) initializing the position, the speed, the learning factor and the maximum iteration number of particles in the particle swarm; the position vector of the particle is defined by 3 parameters k of the PIDp、ki、kdForming, the dimension is 3, and determining the value ranges of 3 parameters; sequentially assigning the particles in the particle swarm to a PID parameter kp、ki、kdAfter the system is simulated, the performance index corresponding to the group of parameters is obtained, namely the fitness value of the particles;

(2) respectively comparing the individual historical optimal position pbest and the global historical optimal position gbest with the individual and global current fitness values to obtain a superior person;

(3) determining an inertia weight omega, and updating the speed and the position of a new particle;

the inertial weight expression is:

ω=ωmax-(ωmaxmin)*t/tmax (1)

in the formula (1), ω ismaxIs the maximum inertial weight, ωminIs the minimum inertial weight, t is the current iteration number, tmaxIs the maximum iteration number;

the velocity and position formula for the new particle is:

vi(t+1)=ωvi(t)+c1r1((pbesti(t)+gbest(t))/2-xi(t))+c2r2((pbesti(t)-gbest(t))/2-xi(t)) (2)

xi(t+1)=xi(t)+vi(t+1) (3)

in the above formulas (2) and (3), t is the current iteration number, omega is the inertia weight, and c1And c2Is a learning factor, r1And r2Is at [0,1 ]]Random number of (1), vi(t) is the velocity of particle i at time t, xi(t) is the position of particle i at time t, pbesti(t) individual optimum position, gbesti(t) is the global optimal position;

(4) sequentially assigning new particles to PID control parameter kp、ki、kdSimulating to obtain a new performance index, comparing the new performance index with the fitness value of the original individual extremum and the original global extremum, and selecting a superior one;

(5) judging whether a termination condition is met, if so, executing the next step, otherwise, performing particle swarm updating work;

(6) and finally, outputting a global optimal position, namely PID optimal parameters, ending the algorithm, and controlling the opening of the three-way valve by adopting the PID optimal parameters, so that the bypass quantity of the high-temperature cooling water discharged from the machine and entering the cooler is changed, the inlet temperature of the high-temperature cooling water is regulated, and the outlet temperature of the high-temperature cooling water is finally kept stable.

2. The PID parameter setting method of a cooling water temperature controller for a diesel engine as claimed in claim 1, wherein ω is a value of ωmaxValues of 0.9, omegaminValues of 0.2, c1And c2And taking 2.

Technical Field

The invention relates to a method for setting PID parameters of a cooling water temperature controller of a diesel engine, belonging to the technical field of diesel engines.

Background

Part of the heat released by the combustion of fuel oil in a marine diesel engine is dissipated through parts such as a cylinder, a cylinder cover and a piston. The cooling water system of the diesel engine is responsible for taking away the heat so as to ensure that the heated component is in a normal temperature state. The change in the temperature of the cooling water has an important influence on the working performance, the operating life, and the like of the diesel engine. The accurate control to the cooling water temperature can improve the power performance of the diesel engine, reduce the exhaust emission, reduce the energy consumption and the like.

The temperature control of a cooling water system generally adopts a PID control technology, the parameter of a traditional PID controller is planned to be unchanged after setting, and the parameter set by the controller is probably not optimal and cannot achieve the best control effect. The traditional PID parameter setting method has the defects of complex process, poor setting, poor performance, poor adaptability to operation conditions, high overshoot, oscillation and the like, and cannot meet the high requirements of modern industrial development on the control process. The tuning of the PID parameters by adopting a proper optimization algorithm is particularly critical.

Disclosure of Invention

The invention aims to solve the defects in the prior art, and provides a method for setting a PID parameter of a cooling water temperature controller of a diesel engine, which is applied to a central cooling water system of a marine diesel engine.

The purpose of the invention is realized by the following technical scheme:

a method for setting PID parameters of a cooling water temperature controller of a diesel engine comprises the following steps:

(1) initializing the position, the speed, the learning factor and the maximum iteration number of particles in the particle swarm; the position vector of the particle is defined by 3 parameters k of the PIDp、ki、kdForming, the dimension is 3, and determining the value ranges of 3 parameters; sequentially assigning the particles in the particle swarm to a PID parameter kp、ki、kdAfter the system is simulated, the performance index corresponding to the group of parameters is obtained, namely the fitness value of the particles;

(2) respectively comparing the individual historical optimal position pbest and the global historical optimal position gbest with the individual and global current fitness values to obtain a superior person;

(3) determining an inertia weight omega, and updating the speed and the position of a new particle;

the inertial weight expression is:

ω=ωmax-(ωmaxmin)*t/tmax (1)

in the formula (1), ω ismaxIs the maximum inertial weight, ωminIs the minimum inertial weight, t is the current iteration number, tmaxIs the maximum iteration number;

the velocity and position formula for the new particle is:

vi(t+1)=ωvi(t)+c1r1((pbesti(t)+gbest(t))/2-xi(t))+c2r2((pbesti(t)-gbest(t))/2-xi(t)) (2)

xi(t+1)=xi(t)+vi(t+1) (3)

in the above formulas (2) and (3), t is the current iteration number, omega is the inertia weight, and c1And c2Is a learning factor, r1And r2Is at [0,1 ]]Random number of (1), vi(t) is the velocity of particle i at time t, xi(t) is the position of particle i at time t, pbesti(t) individual optimum position, gbesti(t) is the global optimal position;

(4) sequentially assigning new particles to PID control parameter kp、ki、kdSimulating to obtain a new performance index, comparing the new performance index with the fitness value of the original individual extremum and the original global extremum, and selecting a superior one;

(5) judging whether a termination condition is met, if so, executing the next step, otherwise, performing particle swarm updating work;

(6) and finally, outputting a global optimal position, namely PID optimal parameters, ending the algorithm, and controlling the opening of the three-way valve by adopting the PID optimal parameters, so that the bypass quantity of the high-temperature cooling water discharged from the machine and entering the cooler is changed, the inlet temperature of the high-temperature cooling water is regulated, and the outlet temperature of the high-temperature cooling water is finally kept stable.

The PID parameter setting method of the cooling water temperature controller of the diesel engine, wherein omegamaxValues of 0.9, omegaminValues of 0.2, c1And c2And taking 2.

Compared with the prior art, the invention has the following beneficial effects:

in the cooling water temperature control system, the setting of the controller parameters determines the control effect of the temperature of the cooling water system of the diesel engine to a certain extent, the traditional PID parameters are set by adopting an improved particle swarm optimization PID control method, and the opening of a three-way valve is controlled by adopting an improved particle swarm optimization PID control method, so that the bypass quantity of high-temperature cooling water which is discharged from the engine and enters a cooler is changed, the inlet temperature of the high-temperature cooling water is adjusted, and the outlet temperature of the high-temperature cooling water is finally kept stable. The invention provides an improved particle swarm optimization algorithm for dynamically adjusting inertial weight by a linear decreasing strategy to set PID parameters of a controller. PID parameter setting based on improved particle swarm optimization algorithm is found by utilizing particle swarm to obtain a PID controller kp、ki、kdAnd the optimal value of the parameter enables the temperature control of the cooling water system to achieve the optimal effect.

Drawings

FIG. 1 is a block diagram of an improved particle swarm optimization for optimizing PID parameters;

FIG. 2 is a flow chart of an algorithm for optimizing PID parameters by improving a particle swarm optimization;

FIG. 3 is a block diagram of a high temperature cooling water temperature control system of a diesel engine;

FIG. 4 is a closed-loop PID control chart of the cooling water temperature of the diesel engine based on improved particle swarm optimization;

FIG. 5 is a flow chart of closed-loop PID control of the cooling water temperature of the diesel engine based on improved particle swarm optimization.

Detailed Description

The technical solution of the present invention will be further described in detail with reference to the following specific examples.

As shown in fig. 1, a structure diagram of the improved particle swarm optimization for optimizing PID parameters is shown, and a fitness function of the particle swarm optimization corresponds to a performance index function, which is a standard for evaluating a PID controller, so that the most suitable performance index function needs to be selected.

The performance evaluation index of the control system is used as the evaluation function of the particle swarm optimization algorithm, namely the fitness function input, the particle fitness value is calculated, and then the controller k is adjusted according to the fitness value of the functionp、ki、kdThe parameters are optimized and set, and the control effect of the system is improved.

Selecting a performance index function of an absolute value of error multiplied by time Integral (ITAE) as a fitness function in the particle swarm optimization algorithm, namely:

in the formula (1), J is a fitness function, e (t) is an absolute value of an error of a system, and t is time.

FIG. 2 is a flow chart of an algorithm for optimizing PID parameters by improving a particle swarm algorithm. Firstly, initializing the position, the speed, the learning factor and the maximum iteration number of particles in a particle swarm; the position vector of the particle is composed of 3 parameters of PID, the dimension is 3, and the value range of the 3 parameters is determined.

Then sequentially assigning the particles in the particle swarm to kp、ki、kdAfter the parameter transmission process is completed and the PID control system model is simulated, the performance indexes corresponding to the group of parameters, namely the fitness values of the particles, can be obtained.

And judging whether the current position is good or bad according to the particle fitness value, and comparing the individual historical best position (pbest) and the global historical best position (gbest) with the individual and global current fitness values respectively to obtain a good.

The inertia weight omega is used for adjusting the balance between the global detection capability and the local development capability of the population, when omega is larger, the global optimization capability of the particle is stronger, and the local optimization capability is weaker. On the contrary, when ω is smaller, the particle has stronger local optimizing capability and weaker global searching capability. Therefore, the inertial weights herein adopt a linear decreasing strategy, thereby enabling the algorithm to converge to the global optimum point more quickly and accurately. The inertial weight expression is:

ω=ωmax-(ωmaxmin)*t/tmax (2)

wherein in the formula (2), ω ismaxThe maximum inertia weight is generally 0.9, omegaminIs the minimum inertia weight, generally takes the value of 0.2, t is the current iteration number, tmaxIs the maximum number of iterations.

The velocity and position of the new particle are updated according to the following velocity and position update formula.

vi(t+1)=ωvi(t)+c1r1((pbesti(t)+gbest(t))/2-xi(t))+c2r2((pbesti(t)-gbest(t))/2-xi(t)) (3)

xi(t+1)=xi(t)+vi(t+1) (4)

In the above formulas (3) and (4), t is the current iteration number, omega is the inertia weight, and c1And c2Is a learning factor, usually taken as 2, r1And r2Is at [0,1 ]]Random number of (1), vi(t) is the velocity of particle i at time t, xi(t) is the position of particle i at time t, pbesti(t) individual optimum position, gbestiAnd (t) is the global optimal position.

And sequentially assigning new particles to PID control parameters, simulating to obtain a new performance index, namely the fitness value of the new position of the particles, and comparing the fitness value with the fitness values of the original individual extremum and the original global extremum to obtain a superior particle.

And then judging whether a termination condition is met, if so, executing the next step, and otherwise, performing particle swarm updating work.

And finally, outputting the global optimal position, namely the PID optimal parameter, and ending the algorithm.

A cooling water temperature control system according to an embodiment of the present invention, as shown in fig. 3, includes: the PLC is connected with an analog input/output module, a sensor, a pressure relay, a touch screen and the like, is connected with a servo amplifier and a servo motor unit through cables, controls a three-way valve motor to adjust the opening of the three-way valve so as to control the temperature of cooling water, and controls three seawater pumps to act so as to adjust the flow of seawater. Wherein, select for use thermal resistance sensor PT100 to measure the temperature of high temperature fresh water and sea water, detect high temperature fresh water pump suction inlet pressure through pressure relay. The expansion tank liquid level switch is used for controlling the liquid level of the water tank, and the on-off of the expansion tank water inlet electromagnetic valve is controlled according to the position of the liquid level switch, so that the liquid level of the water tank is maintained within a certain range. The floating ball type liquid level switch is adopted to control the water level of the expansion water tank, the floating ball floats up and down along with the lifting of the liquid level, the magnetic steel at the end part of the floating ball is pushed to swing up and down along with the floating ball, the magnetic steel which is installed in the shell and has the same magnetic pole is pushed to swing up and down under the action of the magnetic force, the movable contact at the other end of the floating ball is communicated or disconnected between the fixed contacts, and therefore the on-off of the water replenishing electromagnetic valve of the water tank is controlled, the effect that the liquid level of the water tank can be.

The cooling water temperature control system comprises a PLC (programmable logic controller) and a servo control unit connected with the PLC through a PPI (Point pulse) communication interface, the PLC comprises four servo amplifiers and servo motor units connected with the servo amplifiers respectively, and each servo motor unit comprises a three-way valve opening control motor and three sea water pump motors. The flow speed of the seawater is controlled by the operation of the three seawater pumps, so that the effect of controlling the temperature of the cooling water is achieved.

As shown in fig. 4 and 5, which are a closed-loop PID control diagram and a control flow chart of the temperature of the cooling water of the diesel engine based on the improved particle swarm optimization respectively, the outlet temperature of the high-temperature cooling water is compared with a given value, then a PID command based on the improved particle swarm optimization is started and controlled according to the deviation amount of the temperature, and the system controls the operation of a three-way valve servo motor according to the output result of the command. And then the operation of the three seawater pumps is controlled by the opening condition of the three-way valve, and the using number of the seawater pumps is increased or decreased as required, so as to achieve the purposes of accurate control and energy conservation.

The PLC is connected with an alarm module, and gives an alarm signal when the high and low temperature of the high-temperature fresh water exceeds the limit, the pressure of a suction port of the high-temperature fresh water pump exceeds the limit, the motor of the sea water pump is overloaded and the like.

The PLC in the control system is also connected with a touch screen HMI, the touch screen HMI is a man-machine conversation interface, relevant parameter setting can be carried out through the touch screen, and information such as working conditions of the cooling water temperature control system can be displayed on the touch screen, so that real-time monitoring of workers is facilitated.

The above description is only a preferred embodiment of the present invention, and is not intended to limit the present invention in any way, and any simple modification, equivalent change and modification made to the above embodiment according to the technical spirit of the present invention are within the scope of the technical solution of the present invention.

9页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:车辆环境调节系统及方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!