Help - Search - Members - Calendar
Full Version: Heater loop
Forums.MrPLC.com > PLCs and Supporting Devices > Allen Bradley
mikey431
I am trying to play around with PID ( for heater ) in Micrologix 1200. The objective is to make the heater loop to maintain temperature at the setpoint.However, once the setpoint is reached , we NEVER want it to go below the setpoint.Basically, we want to avoid the swing at the beginning before the loop get stablized.Not sure how to do this ? Thank you.

Ron Beaufort
Greetings Mikey ...

I’m not 100% sure that I understand exactly what you’re describing ... it seems (at least to me) that part of what you said contradicts another part ...

just a suggestion: try reading this post and see if there’s anything helpful there ... my best guess is that you’re asking for a response like the one shown in Figure #1 ... but ... also read what it says about Figure #2 - when the next “load change” inevitably comes along ...

anyway ... please tell us more about what you want and we’ll try to help ... and as always, the more we know about your system, the better we’ll be able to help ...

survival tip: can you run a test and post the results? ... something like the data shown in this post would be nice for starters ...


mikey431
QUOTE(Ron Beaufort @ Feb 28 2007, 05:59 PM) [snapback]50673[/snapback]
Greetings Mikey ...

I'm not 100% sure that I understand exactly what you're describing ... it seems (at least to me) that part of what you said contradicts another part ...

just a suggestion: try reading this post and see if there's anything helpful there ... my best guess is that you're asking for a response like the one shown in Figure #1 ... but ... also read what it says about Figure #2 - when the next "load change" inevitably comes along ...

anyway ... please tell us more about what you want and we'll try to help ... and as always, the more we know about your system, the better we'll be able to help ...

survival tip: can you run a test and post the results? ... something like the data shown in this post would be nice for starters ...




Thank for the interesting links . I 'll read this up.
mikey431
I guess my "goal" is both as the load change is affected by incoming temperature throughout the year and the setpoint will be adjusted. The reason for setpoint to be adjusted is we have a startup warmup mode for the system.This warmup mode will set the setpoint much higher than normal setpoint so the system can warm up faster.After system temperature reached the warmup setpoint, it will go back and control over regular setpoint. The problem I am having is after the setpoint is adjusted from warmup SP to normal SP, the loop will drive the temperature much lower than normal SP and it takes to long before it will dampen out and reached the normal SP.I dont know if there is a technical term for this situation but here is the scenario.
let's say the warmup SP is 85 C and normal SP is 60 C.
Once the SP is changed from 85 to 60 , the loop will drive temperature all the way to 50 and sluggishly gain it way to 60.
I am trying to play around with this loop and don know if there is a standard way to tune a PID loop that you are not familiar with.I guess i can try to trend and see how fast this loop response. Any suggestion ?


Peter Nachtwey
This is a tuning issue. You shouldn't need a startup set point. You can tune the system so it doesn't overshoot. Sharing a trend with us is an excellent idea.
BobLfoot
QUOTE(Peter Nachtwey @ Mar 1 2007, 01:17 AM) [snapback]50686[/snapback]

This is a tuning issue. You shouldn't need a startup set point. You can tune the system so it doesn't overshoot. Sharing a trend with us is an excellent idea.

A two line response to a PID question by Peter, AM I DREAMING? LOL just kiddin Peter.
Peter Nachtwey
1. I like to know more about the system before I give advice on how to tune because each system is different. A trend can be analyzed.
2. I am not at home. I am in Ireland now tuning up 60+ actuators and a few VFDs. I am really working and don't have as much time now for long answers.
mikey431
After playing around with the loop ,this is the trend i got.Here is the value i have for the loop:

P: 2
I: 7.5
D: 0.05
LU:0.12

Blue is my control temperature
Green is my setpoint
Red is heater output

what i tried to achive to shorten the time it takes to SP but also to avoid the dip that below 40
[attachmentid=4292]
Peter Nachtwey
Post the trend data. You can save the data to a .dbx file. Your gains are not high enough. I think you don't have enough ( any ) derivative gain to keep from over shooting. Also, if you want to get from 0 to 45 the quickest then the output should be saturated at 100% for a short while. There is no need for setting the SP at 60% before changing it to 45%t.

Why not use lables like CO,SP and PV? I know but I am not sure every one else knows what each lines is.

mikey431
QUOTE(Peter Nachtwey @ Mar 1 2007, 06:39 PM) [snapback]50763[/snapback]
Post the trend data. You can save the data to a .dbx file. Your gains are not high enough. I think you don't have enough ( any ) derivative gain to keep from over shooting. Also, if you want to get from 0 to 45 the quickest then the output should be saturated at 100% for a short while. There is no need for setting the SP at 60% before changing it to 45%t.

Why not use lables like CO,SP and PV? I know but I am not sure every one else knows what each lines is.


how can i save as .dbx file ?
Alaric
QUOTE(mikey431 @ Mar 1 2007, 07:53 PM) [snapback]50765[/snapback]
QUOTE(Peter Nachtwey @ Mar 1 2007, 06:39 PM) [snapback]50763[/snapback]
Post the trend data. You can save the data to a .dbx file. Your gains are not high enough. I think you don't have enough ( any ) derivative gain to keep from over shooting. Also, if you want to get from 0 to 45 the quickest then the output should be saturated at 100% for a short while. There is no need for setting the SP at 60% before changing it to 45%t.

Why not use lables like CO,SP and PV? I know but I am not sure every one else knows what each lines is.


how can i save as .dbx file ?


Mikey,

Is this the same PID in the same ML1200 that we are talking about on the other thread?

If so, and you are going to attempt to improve the tuning of this loop then it first has to be configured correctly. Either the PID needs to be re-configured to timed mode (easiest) or an STI routine needs to be created and the instruction moved to that routine. While you are at it, fix it so that CV an N13:26 is being sent to the output instead of CVP.

Peter is the real magician when it comes to PID, but if its not set up right in the first place then no amount of magic is going to fix it.
Ron Beaufort
QUOTE
I guess i need to start fixing the Time Mode first


as I've already said, I'd STRONGLY recommend AGAINST that ...

if you don't know how to retune the loop, then you’ll be just asking for trouble (and embarrassment) by changing the timing mode ...

YOU NEED TO FIX EVERYTHING AT ONE TIME! ...

simply put: if you ONLY fix the timing mode issue and do NOT retune the system, then the system is probably (almost ASSUREDLY) going to work WORSE and not better ...

now you could try the following approach: ... make CAREFUL and DETAILED notes about how EVERYTHING is set up ... and make a BACKUP copy of the program ... then (and ONLY then) try to “fix the timing” ...

my best guess from here is that you’re going to want to put everything right back like it was REAL SOON because you’re not going to know how (no offense intended) to re-tune the loop to work “satisfactorily” using the correct timing arrangement ... did you read the post that I suggested about Bubba’s paycheck? ... if you did, and if you understood what I was saying, then you wouldn’t be in such a rush to trying fixing this system “one-step-at-a-time” ...

now I am NOT saying that you can’t learn to retune the loop ... and I’ll even do what I can to help you learn the necessary skills - for free ... but UNTIL you know how, I’d be very careful about upsetting the existing apple cart ...

here’s another shot at the Bubba’s paycheck idea:

QUOTE


suppose that my neighbor proudly tells me that he just got a raise - and now he’s making $2.00 per hour ...

“What?,” I say ... “How can you possibly live on such a low income?”

my neighbor explains, “There’s a problem with the computer. Instead of paying me just ONE paycheck for 40 hours ONCE a week, the company hands me a 40-hour paycheck EVERY single workday.”

math time: $2.00 per hour times 40 hours = $80 times 5 checks per week = $400 per week ... not too bad ...

“I’ve never heard of a crazy system like that. Why don’t they fix it?”

“The accountants say that it works ok - so why bother? As long as the money comes out the same, I don’t care.”

I just walk off shaking my head ... a couple of weeks later, my neighbor wants to borrow some money to pay his rent ...

he tells me, “Somebody finally fixed the computer problem. Well, at least they fixed PART of the problem. They stopped paying me every day - so now I only get ONE 40-hour paycheck a week. So at least they got that part right. But here’s the kicker - they’re still only paying me $2.00 per hour. They say it’s going to take awhile before they figure out how to re-adjust my hourly rate. In the meantime, I’m not making enough to live on.”

math time again: $2.00 per hour times 40 hours = $80 times 1 check per week = $80 per week ... not good at all ...



and now we come to your loop ... your PID is set up “wrong” ... and as a result of that, it’s calculating a “paycheck” EVERY time the rung gets executed ... but ... whoever originally tuned the system, didn’t know that the setup was wrong ... and somehow (obviously through trial-and-error) he got the system tuned well enough to work “ok” ...

now you want to “fix” the timing problem ... good idea ... but if you’re not careful, you’re going to only fix ONE PART of a TWO PART problem ... and until you figure out how to retune the system to work with the CORRECT timing, the system is NOT going to work better - it’s probably (almost assuredly) going to work WORSE ...

now here’s what I’m going to recommend - and I’m almost out of typing time ...

put the system in the manual mode ... ask if you don’t know how ... crank in a reasonable - but LOW - value for the CV - maybe 10% or so ... now let the system settle out - for HOURS if it takes that long ... but make SURE that the PV is dead level ... specifically, the PV is neither rising nor falling ... most people call this a “steady state” condition ...

you should already have a trend graphing the CV and the PV ... since we’re dealing with the manual mode, the SP doesn’t enter into this at all ... don’t even trend it ...

now (still in the manual mode) crank the CV up to a reasonable - but significantly HIGHER level ... maybe 60% if (but ONLY if!) that amount is safe for your system ...

watch the trend ... wait until the PV finally settles down again (give it HOURS if it takes that long) ... specifically, the PV must be neither rising nor falling ... another “steady state” condition ...

the graph should look something very close to this:

[attachmentid=4297]

once everything has “settled out” again, stop the trend and capture the data ... post the picture - and the data ... a LOT of folks will tackle your tuning problem “with great exuberance” - and soon you’ll have a series of suggested “tuning” values for your Kc, Ti, and Td settings ...

at THAT point, then you can try fixing the timing problem - and have a reasonable chance of successfully getting the system back into operation ... AND ... (most important) you’ll have a system that can be reliably tuned - and optimized - using commonly accepted tuning practices ...

QUOTE
how can i save as .dbx file ?


see if this post helps ... some software versions are different - but this should get you started ...

finally ... PLEASE pick just ONE of your threads and stay in it ... it’s driving some of us crazy going back and forth to cover the same subject ... (well, at least I’M going crazy - but then that’s not a long trip for me)...
Alaric
Since we are on the topic of tuning on this thread, lets keep it all here.

Here is a link to the other thread for reference so that everyone reading this can catch up with what's going on.

Mikey, if you follow Ron's suggestion and post a picture of the trend from RSLogix, if you will, please configure the x and y axis to display several gridlines, this will be helpful in determining the elapsed time.


Ron Beaufort
I’ve found that the following method gives better results than trying to “eyeball” a reading based on the gridlines ... but maybe that’s just because my eyeballs are getting older these days ... anyway ...

first I print out a copy of the trend (and if the original has a black background, I use MS-Paint to reverse the colors and save a few toner trees) ...

then I measure the length of the trend (example: 215 mm) ... suppose that this is known to represent 22 minutes ...

then I measure the Deadtime, etc. (example: 8 mm) ...

[attachmentid=4300]

then a simple “cross-multiply-and-divide” ratio (which somehow I can still remember learning in the fourth grade) will grind out a specific number for the Deadtime (example: 0.82 minutes) ...

one very nice thing about this “non-eyeballed” approach is that my students have a much harder time applying their customary “fudge-factor” to a classroom exercise ...
Alaric
Nice trick Ron. I'm going to have to remember that.

I'm about 15 years younger than you (I think) but I just got my first pair of reading glasses. I still see fine but tiny details and small text are a bitch to see. Reading the label on a hydraulic valve in a dark place is out of the question. When I saw the eye doctor he just smiled and said, "You're at the age where we start to see a lot of men. It doesn't get any better from here on out." All I have to say is ranting.gif

Peter Nachtwey
I like crunching the data in the .dbx file. It is much less subjective and I don't need reading glasses to do it. My Scilab program makes short work of the tuning now.



mikey431
sorry for the confusion , i will try to fix everything and stick to this thread.
However,there are one thing in the program that I am not quite sure about...
I can see the SP and PV by 10 to get bettter resolution but i am not sure this is the reason why he have to multiply the Kc,Ti,LUT by 10 and multiply Td by 100 ?
First i thought he did this because RG bit is set to 0 but ,as the manual on ML1200 , the RG should not affect the Td..
I attached the RSS file that i posted on other thread for reference. [attachmentid=4306]
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.