Category Archives: Industrial Control

The Limitations of Classical PID Controller and Its Advanced Derivations

Since founded by N. Weiner in 1947, the control theory has been evolved for more than 60 years and is still full of challenges and opportunities. The most important principle of the control theory, in my opinion, is the feedback mechanism. Without feedback and closed-loop, almost no algorithm and control technique can be implied. The idea of feedback is that by comparing the reference input and the actual output, an error signal can be obtained and then can be used by the controller to trace and eliminate the difference between the input and the output. Apart from Watt’s steam engine, one could say that the first formally implication of (negative) feedback is the amplifier invented by H.S. Black. It is a genius idea when first came out in 1927 and was proved to be an extremely useful way to solve electronic and control problems. The idea of output feedback has also been extended to state feedback and error feedback to achieve state control and estimation in more advanced control techniques.

Classical control is the foundation of control theory and it is more concentrated on analysing the stability and performance of a controlled plant. However, only linear and SISO systems have been discussed in classical control theory. Although traditional control techniques such as PID controller are still widely used in industry, they cannot handle more complex engineering scenarios such as aerospace, chemistry and biology. Another problem of classical control is that all parameters are designed and tuned based on the current system model, in which case the system will be more vulnerable to further disturbance and parameters varying.

In order to solve these problems of classical PID controller which mentioned before, more advanced approaches have been derived nowadays. If using classical approach to control a MIMO system, one should divide the system into different modes and control each mode separately. However if the system inputs and outputs are coupled with each other, it cannot be decoupled and this method will not be practicable anymore. Here comes the state-space method, which solved the limitation of classical control by using state variables. The advantage of state-space is that it can be represented by matrices and such is very computer-friendly. State-space representation is actually defined in time domain instead of frequency domain and every state can have some extend of physical meaning which gives some clues about what is happening inside a controlled plant. One milestone which makes the state-space method more practicable is the invention of Kalman filter. Kalman filter uses a series of history measurements in the presence of noise to estimate the current state of the system. Kalman filter can work as a state estimator or simply a special filter which uses the physical system model to remove the process and the measurement noise.

Optimal control method such as MPC and LQR is another derivation of classical control. In most circumstances, there are more than one possible control inputs which can drive the system to work properly, but we need is to find the optimal one. Optimal control actually transforms the control problem into an optimal problem which tries to minimise an objective function to get the best outcome. Another advantage of optimal control is that it can take constraints into consideration. One defect of PID controller is that it cannot handle system constraints like actuator saturation or output limitation. In the optimal case control, design a controller with constraints could be feasible.

It is also known that no system is constant and some parameters are likely to vary with time or to the working condition. In classical control, the controller is designed just for the current system model and thus may loss performance or even be unstable due to the system change and uncertainties. In such aspect, adaptive control or robust control may be more applicable. Both adaptive control and robust control are designed to cope with uncertainties. The difference is that adaptive control identifies the system model and changes its parameters in real-time, but robust control fixed its parameters after deployed to the plant. For the truth that adaptive control has to calculate the system model every few periods, it needs much more computational time. What’s more, since the control parameters in the adaptive controller are changing every time, it may be difficult to prove its stability.  On the other hand, the gain of robust controller has already been designed before applied to the system, so it doesn’t need to do additional calculation during the operation. Since robust controller is globally optimised and especially designed to handle uncertainties, it may not have a performance as good as other controllers. But since the real control problems are always not ideal, it is meaningful to take uncertainties and disturbance into the system model.

Some more advanced control techniques such as neural network and expert control are being discussed today. In my opinion, these new approaches have the potential to be the next generation of control theory. With the developing of computer science, it is now possible to model extremely complex networks. This kind of controller can actually take all the possible system states and its corresponding solutions into a database and each time just search for the best solution according to the current system data.  New techniques such as machine learning can also be absorbed into the controller and make the controller more flexible which can handle different control problems using a same configuration.

However, no matter how powerful the control method is, there are rarely situations where we do not need to make trade-offs. As human-beings, we always need to make decisions and balance the income and the expense. Being too greedy is like giving an infinite gain to a helicopter, which may work at the beginning but will suddenly crash whenever there is any disturbance. So push yourself while keep in mind that you have limitation. Take it easy, be adaptive to the environment and always try to get the optimal solution of your life.

REFERENCES

[1] R.C. Dorf & R.H. Bishop, Modern Control Systems (Twelfth Edition), Pearson, USA.

[2] Wikipedia, Harold Stephen Black. Available at: http://en.wikipedia.org/wiki/Harold_Stephen_Black. Last accessed 26th Mar 2014

[3] E.F. Camacho and C. Bordons, Modern Predictive Control, Springer, London, 2003

西门子MPI连接与配置

*本文系本博客原创,如需转载请注明原作者!

原文作者:戴晓天@云飞工作室(YunFei Studio)

联系方式:automatic.dai@gmail.com

原文地址:www.yfworld.com

 

序言

近日需使用西门子MPI协议,发现网上关于MPI的资料甚少。昨日基本完工,现将一部分成果公布,以下包含MPI协议的简单介绍与基本的配置方法:

第一章  
MPI
通讯协议概述

1.1 MPI简介

MPIMulti Point Interface),是西门子公司用于其PLC数据交换的通讯协议,是当对通信速率要求不高,且数据量不大时可以采用的一种简单、经济的通信方式。每个S7-300都内置了MPI协议,物理层使用RS-485。通过MPIPLC可同时与多个设备建立通信连接,包括PC/PGHMI、其他PLC等。

MPI支持主/主,主/从的组网方式。当控制站都是S7-300/400系列PLC时,就可以建立主/主连接;而某些站为S7-200系列PLC时,则可以建立主/从连接,此时可以使用网络指令对S7-200CPU进行访问。

 
 

1.2 与西门子其他通信协议的区别

其与PROFIBUS的区别:PROFIBUS是公开协议,而MPI是保密协议。

其与PPI通讯的区别:PPI协议是点对点协议,而MPI协议是多点协议,支持主/主、主/从,也支持多主。

 
 

第二章  
MPI
的连接方式

2.1 物理层规范

1、物理层电平:RS485,首末节点必须接入终端匹配电阻。

2、每段最长50m,至多32个节点。若节点距离超过50m,可以使用中继器延长,使用PROFIBUS电缆可以至多延长1000m

3、增加节点时需断开电源。

4、若总线电缆不直接连接到总线连接器而必须使用分支线电缆时,分支线的长度与分支线的数量相关。一根分支线时可达10m,分支线最多为6根,长度限定在5m

 
 

2.2 连接部件

MPI设备连接时常用到两种部件:网络插头和网络中继器。

1、网络插头(LAN插头)

网络插头是节点与MPI网络之间的连接器,其有两种类型:带PG插座与不带PG插座。

编程装置PGMPI网络节点有两种访问方式:一是将PG固定地连接在网络上,这种方式需要带有出入双电缆的双口网络插头,上位机应插MPI/PROFIBUS通讯卡(CP5512 / CP5611 / CP5613);
二是对网络进行启动和维护时才接入PG,此时可使用带PG插座的网络接头,上位机使用PC/MPI适配器。网络插头如果是总线段起终,则必须将插头上的终端电阻改为ON

 
 

2、网络中继器(RS485

网络中继器可以放大信号并带有光电隔离,可用于扩展节点之间的连接距离,也可用于接地与不接地设备之间的抗干扰隔离。

 
 

2.3 MPI网络参数与编址

MPI的常用通讯速率有:19.2Kbps(连接S7-200时),187.5kbps(默认),1.5Mbps(最高)。

每个MPI网有一个分支网络号,以区别不同的MPI分互网;在MPI分互网的每一个节点都有一个网络地址,称为MPI地址。MPI地址的编码规则如下:

1MPI分互网号缺省为0,在同一个分支网络中的各节点地址号必须不同,但要设置相同的分支网络号和最高地址号。

2、节点MPI地址号不能大于最高MPI地址号,最高站地址可在STEP-7中设为1531(缺省),63126。为提高节点通讯速度,最高站地址应设置的尽量小。

3、若机架上装有功能模块(FM)与通讯模块,则它们的地址是CPU的地址顺序加1构成。

4、缺省的MPI地址:PG – 0 OP – 1CPU – 2

 
 

2.4 PC机的连接方式

S7-300/400需要与PC机建立MPI连接时,可以采用两种方式,一种是使用PC/PG适配器,另一种是使用CP通讯卡。此处使用了第一种连接方式。

                          

*在实际使用时,并没有使用任何附加电缆即可正常与PC机通讯。

  Read more »