Jump to content
Sign in to follow this  
Apollas

Bumpless PID example

Recommended Posts

Hello,

 

I'm studying a bumpless PID example from VisiLogic > Help menu > Examples > PID. And I cannot understand why manual CV value is multiplied by 100 before forcing the integral error value in Net 7.

 

Maybe anyone can explain. Thank you.

 

Share this post


Link to post
Share on other sites

Hello,

 

'Error Integral' is the parameter that controls the PID correction,

This parameter range is (-100,000 à100,000).

In order to prevent "bump" on the PID correction, in this application the 'Error Integral' start value is 50,000,

That is done by using MI10 (power up value: 500) multiplied by 100 in the function block and store it in ML0 (net 7).

ML0 is the 'in parameter' to the "PID A.TUNE FORCE ERROR INTEGRAL" block and as a result the steep "bump" is prevented in the PID.

 

I hope you find this information useful.



Share this post


Link to post
Share on other sites

Hello liranaftali,

 

I'm interested just in multiplying MI10 by 100 part before forcing the integral error. All the rest is clear to me.

You mentioned that parameter range is -100,000 - 100,000. I cannot find anywhere this information in VisiLogic Help docs. Why do you need to multiply by 100? That's what I'm interested in.

Share this post


Link to post
Share on other sites

Hello,

 

The Multiply by 100 is only in order to get to 50,000 and closer to 100,000 (max value),

and by that to prevent the "bump" in the PID.

I attached a screen shot of the help of the 'PID A.TUNE config' status messages.

 

 

post-42158-0-93457500-1442481444_thumb.p

Share this post


Link to post
Share on other sites

So, if I want to force 30% of the pump speed at PID startup I have to force integral error with value 30000? 75% would be 75000 and so forth?

As I understood 1% of CV value matches force integral value 1000. It always has to be multiplied by 100 in VisiLogic.

Share this post


Link to post
Share on other sites

I hate to resurrect this old thread, but I'm having this same issue with bumpless transfer from automatic PID to manual.  I see that you can input a value into the "Force integral error" functon block, but there are no instructions on how to back-calculate the required integral value.  I've tried putting in constants for the forced value, but the results are random and unpredictable.  I suspect there is a calculation required.  Has anybody ever figured this out?

 

Thanks!

Share this post


Link to post
Share on other sites

I'm not a PID guru by any means but from my understanding of the math you can't back calculate a value to start at.   You can guess sufficient values to slow down or speed up the initial response but you can't bring out the past to identify the best value.

 

PID doesn't use history to make adjustments to the outputs.  It looks at the current error, the accumulated error, and adjusts the outputs based on the instantaneous difference between the two and the settings for the different coefficients. 

 

At best you trial and error for your initial value and go from there.

Share this post


Link to post
Share on other sites

I know there is a way to do it, as many other PLC manufacturers have this function enabled automatically when transferring from manual to auto.  I have a general understanding of the math involved- but no understanding of what the value in the "Force integral error" block means?

Share this post


Link to post
Share on other sites

Force Integral Error only allows you to change the current error value while the system is running.  It doesn't calculate anything for you.  You can set it to anything you want, it just forces the PID to react accordingly.

 

You can use this to "bump" the system while it's running and simulate an event.  I typically use this to test my PID loops for stability. 

Share this post


Link to post
Share on other sites

I understand what you're saying, that it doesn't calculate anything for you.  However, to "set" a PID's output when transferring from manual to auto, you have to preload the integral error. The proportional error is already calculated upon transfer to auto and cannot be changed since it is simply a calculation based on the setpoint minus actual.  The integral error is a compounding output, and must be preloaded to where it would need to be to make the automatic PID output equal to the manual output it was previously at.  So it absolutely CAN be done, but we would need to know what the value in the "force integral error" refers to?  

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...