Transfer function implementation on a PLC

F

Thread Starter

Fidelio

Assume that you have a good model of your process: transfer function of the process itself, of disturbances, etc. You design a PID controller. You add a filter, a compensator. Even more, you have a Multi Input-Multi-Output system, so you design a compensator to decouple the systems; which is, of course, a transfer function (or a matrix of transfer functions).

When it is time to implement this beautiful exercise on the process, you have a powerful cpu of Siemens S7-300 PLC (equipped with the PID module, I/O etc.).

Now, my question is: how do you put into the PLC all these beautiful transfer functions, filters, etc.?

AS far as I can see, I can input the P, I, D parameters in the PID block, but.. what if I want to add a filter, or a pole/zero cancellation?

Is there a way to accomplish it?

It is probably a naive question, but I have been thinking about it for weeks now, and can't figure out any solution.

Thank you very much for your kind interest!
 
D

Dobrowolski, Jacek

Hi Fidelio,

Translate your beautiful stuff into z-domain (discrete) and if possible try to go with fixed point math (for performance reasons). To be in sync with data sampling run all calculations in a hardware interrupt OB fired by end
of conversion of an AI module.

Regards,

Jacek Dobrowolski, M. Sc. E.E.
Software Eng.
 
S

ScienceOfficer

Fidelio---

I agree with Jacek Dobrowolski's post, and add the following:

The PID function included in most modern PLCs is not easily modified for arbitrary transfer functions. When I've done digital domain realizations of transfer functions, I've done the whole job myself, not using the PID instruction at all.

On the other hand, most of those projects were four to six degree of freedom motion platforms for various training and entertainment simulators--- hardly a common use for PLCs. It sounds like you are doing one of those unusual projects.

I can also tell you that ladder logic is a terrible environment for programming matrix manipulations, and complex math in general. You might find it easier to prototype/test your code in a statement language and then convert it into your target language. I prototyped my first project like this in QuickBASIC (!!!) and then converted it into A-B PLC-5 ladder logic. If you have the Statement List language available on your S7, that might be an easier environment for your project.

Hope this helps!

Larry Lawver Rexel / Central Florida
 
G

Gabriel Villarroel

Working with Siemens, answered has been provided. If you can use another type of system, its simple and fast. If you would like to find out which, please email.

[email protected]
 
D

Dobrowolski, Jacek

Hi,
Saying "another type of system" you mean "other than PLC" or "other than Siemens" ?


Jacek Dobrowolski, M. Sc. E.E.
Software Eng.

<">
 
Top