Hello guys,
I haven't been here for a long time, but I'm here now, after Peter sent me an email.
Matjuhnl, do you understand how Smith predictor works? The most crucial part is to have a good model that will represent your process around working/operational point.
Smith predictor is a fairly good dead time compensator and I have used it successfully and two occasions in practice where there were transport delays involved (coal power plant applications, where there is a time delay between fuel/coal delivered to the boiler and actual measured response such as steam flow/pressure increase).
First, I almost always direct people to read and understand how to make a model of a process they try to control. Most technological process can be reasonably good described with FOPDT models. If the systems are hydraulic where there is also compressible fluids then most likely SOPDT (second order plus dead time) would be more appropriate. Second order systems can have oscillations and overshoots in response.
First step is to read
this article.
You need to know for sure FOPDT is a good approximation of your process and that you can conclude/derive process gain, time constant and dead time from time response (graphs).
Then you need to know how to implement this FOPDT model in actual PLC. As you know, a PLC is a discreet system and you need a discrete model of your continual process. I'm not sure about your university/colledge background and if you're familiar with the Laplace transformation, but I will say that continual process are described with differential equations in time domain, while discrete processes are described with so called difference equation.
Discrete models of continuous system have a sample time. This sample time must be exact. In order to ensure that logic is executed with the exact same time period, you need to use OB35 or similar i.e. cyclic interrupt blocks. This is the only way to ensure that all your time constants and the dynamics will be consistently calculated.
Please have a look at the attached SCL code. It needs to be executed in cyclic block, for example OB35.
Play with it a bit in PLCSIM. Do not download to the actual PLC and do not include it in actual application without understanding what is going on. This code is for educational purpose only and I take no responsibility whatsoever.
Use it at your own risk, but first in the PLCSIM until you know exactly what it is doing and how.
This should give you a pretty good starting point.
Once again, I want to point that I have used the Smith predictor in practice. But one needs to understand the process.
The Smith predictor gives best results where process time constants are large (minutes), and I have no experience with dealing with relatively fast process.