PID control theory vs practice part II

Pandiani

Lifetime Supporting Member
Join Date
Apr 2005
Location
Tz
Posts
718
Hello, I take some time trying to figure out a couple of things regarding PID continuos vs discrete, and that is OK. I'm having problems with configuring STEP 7 FB41 to design PID controller.
Please take some time to read pdf doc and to see pictures. Basically if someone can create simple STEP 7 project with the controller I need and send me I would be very gratefull
Thank you in advance
 
I was holding off responding to this in case Peter Nachtwey was going to reply. He is infinitely more qualified to answer this than I am as are others on this forum. But since no one else jumped in I'll give this a shot.


You asked in your posted PDF 'why a sample time if this is a continuous function?'. Well, in reality, it isn't a continuous function. Anything that runs on a digital processor is subject to sample time. What Siemens has done for you in FB41 is allow you to enter values consistent with a continuous controller. Internal to FB41 the values are 'modified' to operate in a discrete implementation. FB41 needs to know the time between calls since it can be called from anywhere. For processes with a short system time constant (under 1 second) FB41 can be called from OB35, the timed interrupt. This provides the consistent time spacing needed to allow FB41 to operate correctly. For longer time constant systems you may be able to call FB41 based on a cyclic timer. In either case you need to enter the time between FB41 calls as a parameter.

I THINK that the values you calculated for Ti and Td can be entered directly as reset time and derivative time respectively. However, with the times you calculated you will need to run FB41 pretty quickly, which means calling it out of OB35. The sample time would be the call period of OB35.

It looks like you assigned symbols to some of the values you will need, like the reference and feedback. You need to explicitly save the contents of the symbol editor before you will have access to any of the symbols. You may have already come across that one.

I'm still a little confused as to why you are using FB41. You have developed enough of your system that you could write your own PID filter in a general FB. then you wouldn't need to learn the application of FB41. You write your own filter and use it as you require. I guess I'm just not sure what your ultimate goal is. Do you want to understand how a discrete time controller is constructed and operates or do you want to find out how FB41 works? To a large degree these are two different things.

Keith
 
Well, I'm electrical school student who learned about PID and simulated processes in MATLAB. In april this year we learned bascis of PLC programming and I found in Step7 help PID block FB41 and when I saw 30 parameters I sh.. my pants and really start to worry. I don't know if it is Ok to send my simple STEP 7 project to anyone who is interested to see if I'm doing OK. Also I'm not really sure how to scale inputs and all that. I don't have any hardware or particular task, I just want to say after this: "Ok, I learned how to design PID controller in STEP 7".
Ithink I know how to work with discrete controllers, after all, I know how to convert continuous controller to discrete one and I've done some simulations in MATLAB. What I want is to learn how to use FB41 in STEP 7. That is my goal. I found documentation about PID control very poor.
Thank you for your help, I hope Peter will have something to add to.
Cheers

-Pandiani
 
Last edited:

Similar Topics

I have a PID loop I would like to produce a mathematical model for. I may not have paid enough attention in the Control Systems lectures a few...
Replies
1
Views
2,116
We are covering pid control with our plcs right now, using electronic control systems, and have the question posed, PID control can be...
Replies
4
Views
4,330
Hello, guys I have a coulpe of questions and I hope you'll be able to help me. I'm a student of electrical engineering and I must admit that...
Replies
13
Views
9,342
I have S7 1512C controler for controlling 48 PID temperature loop, the output is PWM. Please I need the best, most efficient way to write the...
Replies
13
Views
591
Hi all, I'm having trouble solving a problem I've been working on for several months, and thought you might like a stab at it. The machine runs...
Replies
22
Views
926
Back
Top Bottom