View Full Version : Energy Management System
New2PLCs
April 27th, 2002, 11:13 AM
Hi, I'm a computer geek that got thrown a PLC programming problem. Ladder logic is confusing me a bit and although if I work through it slowly I can understand what's going on, I often end up going in circles with problems in my programs.
The problem is to design a program (for a MicroLogix 1500) to cycle a number of outputs (compressors) according to inputs from thermostats, restricted by a maximum load limit and certain priority overrides (input on = that compressor runs until the thermostat is satisfied, no matter what.)
After working with it a while, I think the problem is a lot more challenging that it first seems. If you let "more important" compressors shut off less important ones, then you have the problem that the less important ones might never run. If you give every compressor an equal shot at running, then both ways you do it yield potential problems: 1.) You can give each compressor a chance to run, but don't let the first run again until every compressor has had a chance to run. In this scenario, you have the potential for a small compressor at the end of the cycle to be running by itself (inefficient because, if the thermostats are calling for cooling, you obviously want as many on at the same time as possible within the max load restrictions) for some time before the cycle starts over. 2.) You can let the cycle "loop" around and start picking up more units so as to avoid the potential problem in #1, but then you run into potential of some smaller units coming on, filling up your available "load space", and keeping the larger units from running, potentially indefinitely.
This problem is a pain. Any comments or advice on designing it "nicely" would be greatly appreciated. Less specifically, I would love for some guru to explain how PLCs differ from the microprocessors I'm used to dealing with. It seems like I could program this thing a lot easier in an assembly-like language (and I've been told that you have this ability with some Siemens processors.)
Thanks,
Don
Tom Jenkins
April 27th, 2002, 11:46 AM
First of all, a PLC is a micro controller with specialized operating system and Input/Output I/O capability. (Terry, where are you?) I still think the easiest way to understand ladder logic is to go back to the roots - it is essentially a "relay replacer" where the Boolean logic is written in a form that emulates physical relays and their contacts. If you have circuit continuity on the left side because contacts are closed (true, or conducting) then the items to the right will operate. Just as closing a switch to a relay coil will cause the contacts to change state. Any devices wired to the normally open contact of that relay will then receive power and operate.
Ladder logic is just a series of "if, then" statements. The normally open contacts "| |" say "If this state is true", and the devices to the right say "Then this will operate". Contacts in series are "And if" statements and contacts in parallel are "Or if" statements. Normally closed contacts "|/|" are "If NOT" statements.
Try reading Phil's tutorial again, with this in mind. (Then buy his book for reference - we have to keep this site going!)
As far as your main problem goes, consider dividing your compressors into "classes" based on size, importance of service, etc. Use your logic to call on an appropriate class of compressor to start or stop. Then have separate logic groups for each class to call for individual compressors in that class to run. You can make this decision based on number of accumulated run hours, first on first off alternation, or any other appropriate scheme.
The first step is to write out the list of compressors, the classes, and the rules for stopping and starting in English. Then you can easily convert these rules to ladder logic.
Allen Nelson
April 27th, 2002, 03:02 PM
To continue what Tom was saying....
You program PLC (or anything else, for that matter), based on algorithms, or rules. You need to come up with a definate and complete set of rules for starting and stopping the compressors.
You use the word "important". What makes a compressor "important"? It's size? It's run time? It's location relactive to the thermostat that's calling for it?
You talk about "load space", and how too many small units can fill it up, preventing a big unit from running. Aren't multiple small units equivalent to one big one? Why or why not?
There's an expression around here that may help:
"Be the PLC"
Imagine yourself trapped inside a black box. The only thing you know about the outside world comes from the sensors wired to the PLC (in your case, the thermostats). You only can influence the outside world by the devices wired to the PLC (the compressors).
If a thermostat reports that it is 1ºC above the number that it should be (which ou have written on the wall), what do you do? Start all the compressors? Start the smallest? The one with the least run time (you've got a large collection of stopwatches in the box)? Which one?
Once it's started, when do you shut it off? When the thermostat is in the OK range again? When it's 2 ºC above?
I think you know what the correct strategy should be - you're just having trouble expressing it. Forget about how you are going to code it for now, and just write up what the sequence is.
Perhaps when 2 small compressors are running and you still need cooling, that's the time you bring on one of the big ones. Or maybe the rule for the big ones is that two zones have to be out of range. Whatever. Only you can decide.
If you post your rules, I'll try to find any holes in them.
New2PLCs
April 27th, 2002, 04:17 PM
While I'm new to ladder logic and don't have much experience working with systems like this, I understand (from writing PC applications) the necessity of outlining the criteria and rules of the problem in extensive detail. If I could do that, then I could most likely come up with the ladder logic to do it. However, the problems I'm running across are in the design itself. I was hoping someone in the forum might have had experience with a similar system and might be able to steer me in the right direction setting it up. I will try to make the system clearer.
There are N (in this case N is actually 11) compressors controlled by N thermostats. These units cool separate zones (not entirely true--six compressors are actually in three two-stage units--but if I can get the basic problem down I think I can handle this difference.) These zones are ranked in order of importance. However, you can't really give the "more important" compressors free reign to shut down the less important ones, or on a hot day it might happen that the less important zones never get any cooling. Assume each compressor must run for no less than a set minimum time and no longer than a set maximum time (if other units want to run). Now the problem becomes (I think) creating a cycle in which each compressor has a chance to run if the associated thermostat is calling for cooling. The only inputs the PLC sees are the ones from the thermostat that indicate that the associated zone wants cooling. Now, by "load space" I mean that I know what current each of these compressors will draw and when the system is running, I don't want to exceed say 50 percent of that maximum load (all compressors running.) For example, if the max current of all the compressors totalled is 150 amps, I don't want to exceed 75 amps at any particular time. So, yes, a few small compressors is the same as a big one in that respect.
To make things more challenging, when the bosses have their conference room meetings or when customers are there for training, I have 2 zones (relatively small compressors) that need to come on and run until cool.
Hopefully, with this added detail the potential problems (1 and 2) that I was talking about in the orginal post will be clearer. If not, I'll be happy to try to explain better. The issue (I think) is that the problem itself makes either 1 or 2 inevitable, and I'm looking for a "patch" to the design.
My initial thoughts on design were as follows. Store a MAX_LOAD value. When any given compressor wants to run (input from thermostat on), first check to see if turning it on would exceed this value. If not, it's allowed to come on and run for a predetermined minimum time, before it needs to time out and let other units have the chance to come on. (Designing it this way I think will make it easy enough to handle the cases in which the 2 priority zones can override--I'll just turn those two compressors on and adjust my MAX_LOAD value accordingly.) Now, if I'm running through this cycle continuously, I need some way to check (and fix the situation) if some big compressor is consistently getting skipped because smaller compressors are filling up that load space.
The problem seems fairly complex and took me some time to see why each of the potential pitfalls would happen. Your help is very much appreciated. Thank you,
-Don
drewcrew6
April 27th, 2002, 05:27 PM
Do you have a way of reading the temp in the 11 zones on the plc?
If you can read the temps let the one that has the most deviation from set-point take priority. That way all compressors have an equal chance. Also the hottest area will be cooled. Just be sure to allow the zone(s) with the high temp. come down to set-point before releasing thier ability to run.
Drewcrew6
Allen Nelson
April 27th, 2002, 05:34 PM
It looks like you've almost got it.
One improvement I'd make: Rather than just having the compressor shut down after a time, "to give someone else a turn", have each compressor set a flag if they need a turn but can't get one due to MAX_LOAD. Keep a timer for each compressor to see how long they've been running "this turn". If their "time is up", they go off, the one with the flag goes on. And since they need to run, but can't due to MAX_LOAD, they'd set the flag, and when the next one times out, they'll get their turn.
Also, you might want to set up a FIFO with the load of each system that is "waiting in the wings". And it wouldn't be until there was enough Load timed-out that the old ones dropped out, the new one comes on, and the old ones go to the bottom of the FIFO.
The two priority zones would be exempt from "timing out", and may even have the ability to advance the "Next to turn off" timer.
This way, as zones cool down, and don't set that flag and enter the FIFO, they'll make room for units that need the Load Space.
You say that you understand the need to spec out the design before coding, but you also say that you could code it, if only it was in Assembly. I think you contradict yourself.
rsdoran
April 27th, 2002, 05:34 PM
I think I understand the issues you have. You have 11 compressors, 6 of which are 2 stage ie dual compressor units. You didnt mention (or I didnt see) how many zones but that may not be an issue. Due to Energy restrictions placed on the system you dont want to exceed a certain power consumption rate...ie only so many compressors may be on at one time.
BTW Tom I wonder where Terry is too, this is fodder for him.
I am going to offer what I think is a way to do what is needed. Each compressor must have its own output (this I think you know). To get started with this project dont worry about rotating the compressors, use a lead/lag or follower system...ie each motor is used according to priorities. You can adjust it to rotate them later when you understand more.
Where this gets tricky (to me ) is using thermostats that only offer on/off ..ie need cooling or dont cool. To be more efficient you should use analog inputs...ie temp sensors so you can create a deadband..ie a range of values(temperatures) that will allow the 2 stage compressors to drop one motor or a small compressor to drop out if a higher zone has more need. This will also give you a more accurate way to cycle on demand...if zone 1 is not within preset range then zone 2 is cut back or zone 6 that part is up to you. The conference room you could use a motion detector(or something to show its active) to set a priority that moves it from last to first if thats what is needed. Another way to do this without using analog is add more thermostats to each zone, matched values of course...then cycle according to how many are calling.
Working with cooling systems there are always hot and cold spots, the more sensors/thermostats the more accurate you can mantain an average.
To put this in perspective lets say zone 1 uses compressor 1 (a dual stage unit), designated comp 1 and comp 2. Use 2 thermostats (if possible ( in the hot and cold zones if this can be determined). If both are calling for cooling then use both compressors. Lets say zone 6 (the lowest zone) and you have the motion detector (or something to say that zone is not used) then it can run both compressors. I am sure you understand using AND functions so can see how this is done. Lets say the conference room is being used now (zone 6 as stated above) and it has a demand, zone 1 ( what zone(s) I leave to you) loses a motor. The thing here is imagination (which you probably have more than I do), you arent limited on which zone drops off first, dont worry about cycling for specified times at first. The idea is use the demand factor and zone priority to maintain within a certain range. You can add timer functions later to cycle between zones if below the minimum range.
I think I have rambled enough for now. Here is the deal, write code to make the system run ( at any efficiency point you can that is less than max) then fine tune it to reach your goals. Even the best programmers normally have to see what the system does in action to see what is needed to match conditions.
godfrey
April 27th, 2002, 09:41 PM
Just a few thoughts. Do you have feed back telling you a compressor is on when you call it? If it fails, there must be rules to deal with it. Having one compressor out of the loop changes the calling rules. Do the compressors have Hand-Off-Auto switches? Do you have feedback telling you what state the switches are in?
Terry Woods
April 28th, 2002, 05:15 AM
Hi Guys... (I've been through a week in Hell and the show ain't over yet!)
With respect to the Energy Management System...
This is NOT a PLC problem.
While I'm very fond of saying "BE the Computer" in order to help a lot of guys come to grips with a programming problem, this is not a case where you need to do so.
In this case, you need to "BE THE FACILITIES GUY".
So... you are an under-paid Facilities Guy, fearful for your job, and you have this problem...
More Demand than Capacity! (Why does this sound like such a familiar problem???)
If this was a fair world and, if you said your prayers every night, then maybe, just maybe, there would be plenty of capacity to satisfy the demands. You might be able to slip off for a cup of coffee or fix that broken window you've been thinking of.
Well, life ain't fair, working for a living sucks, and you hate your A-hole of a boss!
So?... Tell me something new!
Let's say the situation is as bad as it can be...
You DO NOT have a computer to help you.
You DO NOT have thermostats to control the compressors.
HOW WOULD YOU DO IT?
As the Facilities Guy, you would have to go to each room, now and then, and check the temperature. If you're lucky, you'd find at least some of the rooms too cold. Then you would go shut down the compressors for those rooms. You might have found that some other rooms were hot and needed some cooling. Because the other rooms were cold enough, you'd be able to use some of the available energy to cool them down.
But, as sure as the sky is blue (now and then, that is - I'm in Oregon, we don't get blue skies too often!), that damned Murphy Guy is messin' with your peace of mind!
So, as you go from room to room you find that some rooms are hot and some are not.
As the Facilities Guy, you have some questions to ask yourself...
Is anybody using any of those rooms? (or, will anyone be using any of those rooms soon?)
If so, are those rooms hot? Are they cool?
WORST CASE SCENARIO:
ALL ROOMS ARE BEING USED!
YOU'RE IN THE LOW PLAINS OF NEW MEXICO IN AUGUST!
And there is a President or Vice-President of your company in each room!!!
POP-QUIZ A-HOLE! What the hell are ya gonna do?????????
You have that big mortgage, a new car and maybe a boat to pay for, so ya gotta keep your job!
So what are ya gonna do? Hmmmm?
In a reasonable situation, subject to the aforementioned constraints, you can only provide a fair share of the available cooling energy on an as needed basis.
So, you make decisions based on need! As you walk from room to room you can tell which room really needs cooling (open collars and sweating brows are pretty good indicators) and which can wait a bit.
But then, you see that some of your friends are in one particular room and you would like to appease their pleas for greater than sub-tropic temperatures....
At the same time, you see that one of the rooms contains a VP that has a particular disdain for you...
All of these things become value-judgements. So how, in your mind, are you able to make decisions about which room to cool and which to let over-heat a bit? All the while, maintaining your capacity constraints!
For us Facilities Guy's it's just a judgement game... how do we get a PLC to play the same game?
FUZZY LOGIC !
The primary requirement in this particular situation is to know how badly any room needs cooling RELATIVE to how badly any other room needs cooling. This absolute need value can only be determined if you know the difference between the demanded temperature value and the current temperature value AND the relative value of the current temperatures in the other rooms.
This can be determined only by means of an analog signal indicating the actual temperature and the difference between actual temp and demanded temp.
Using FUZZY LOGIC RULES, you can then determine which rooms to apply cooling to while still staying within the constraints of the capacity of the system!
You can find a tutorial on FUZZY LOGIC here...
http://www.seattlerobotics.org/encoder/mar98/fuz/flindex.html
The "A"-answer requires that you have the analog signals. If you insist on doing it without the analog signals, I'll have to do a little more thinking, but it won't be nearly as good!
New2PLCs
April 28th, 2002, 10:21 AM
Allen:
"Rather than just having the compressor shut down after a time, "to give someone else a turn", have each compressor set a flag if they need a turn but can't get one due to MAX_LOAD."
Yes, this is what I had planned. No matter which scenario you use for this program, there is always a seemingly tough-to-handle potential problem that crops up as a result of the nature of the problem itself. The problem with the way (I think) you are suggesting handling the thing is that there is the potential for the compressors, in a worst-case scenario, to "queue up." You can get into the situation where more and more units have the "I need to run next round" flag, and eventually they are all waiting on enough load space to free up so that each can run, in which they'll run in FIFO order if I use that to keep track. Is this bad? Will worst-case scenario ever happen? I don't know, probably not (I think the units are sized well enough to cool the zones in a reasonable amount of time.) But now this problem has been bugging me for a couple weeks, and I would really like to understand the best way to handle it.
And the only reason I said it seemed like it might be easier to do in an assembly-like language, is that this "forced-loop" style of ladder logic is new to me. Now that I've played around with subroutines a bit, I'm having a little better luck with bending the PLC to my will (still doesn't seem "natural" but I'll live.) Now, it could very possibly be that I'm "missing something" important that would make me feel more comfortable with this style of programming--keep in mind, I've only been messing with this PLC stuff for two weeks, and my "tutor" has been the AB MicroLogix 1500 manual.
Thanks,
-Don
New2PLCs
April 28th, 2002, 10:21 AM
Terry:
YES! You know exactly what the problem entails! In worst-case scenario it's a no-win-so-try-to-make-everybody-as-happy-as-possible type of problem. I've only come across game theory in mathematics, but I'm guessing this fuzzy logic stems from that. I've never seen it work in a real world application and if possible, would love to utilize it here.
We don't have temperature sensors, but I understand how they would help. There's a chance the people I'm doing this for will be receptive to the idea of adding them, so I'll definitely mention it. I'm wondering if there's any good way to do it without, though. What problems do you see with setting a timer to keep track of how long a particular zone's request for cooling goes unanswered, and using that as a measure of "relative need." I can see that it could well be invalid to assume a proportional relationship there, but maybe there's a way to "smooth it out"??
Again, I have only the vaguest notion of how fuzzy logic works, and as soon as I post this am headed off to check out that link. But here are some initial thoughts I've had. If I have a min timer and a max timer to determine the minimum and maximum lengths of time a compressor can run for without being forced off, it seems to give me the most flexibility in terms of being able to "tweak" the system. I'm thinking that I could bump up the max time for units that consistently get forced off while still calling for cooling. Now that I'm thinking about it again, I forget why I concluded I needed a minimum timer at all, because obviously if the thermostat isn't calling for cooling, you're not going to run the compressor. In my craze to do this "the right way" I've also thought about (somehow) keeping track of how the system performs over time, and adjusting MAX_LOAD if necessary, but that's easy enough to do manually.
Also, the people who explained the problem to me didn't forsee the trouble it would pose (ha. they're on the brink of just having me split the units into 2 groups, and giving each a 15 minute turn--probably not a bad alternative when given the programming challenge of handling the problem properly.) But in the original spec, they did give me a list of which zones (compressors) had priority over the others, it's just that when you say every compressor has to have a turn, you throw that priority out the window at least partially.
Now I'm off to read about fuzzy logic. Thanks so much for your help! I look forward to hearing any other comments or suggestions.
-Don
Peter Nachtwey
April 28th, 2002, 12:12 PM
Terry, fuzzy logic is not the answer here. I agree this is not a PLC problem.
New2PLC, you need to change your name to New2Matlab or New2AdvancedCollegeDegree.
This is a optimization/minimization problem. A formula is required that calculates the undesirablity of the temperature errors and energy usage and then take the derivitive of that to find the minimum. This calculation is not the sort of thing you want to do in a Micrologix.
This problem also requires very advanced techniques called optimal control.
Here is an example
U = Undesireable Index. Minimize this value for optimal results.
W(n) = Weight for temperature errors for zone or compressor n. Some zones may be more important than others.
K = Weight for engergy usage. This would be the same for all zones.
Energy(delta temp) is a function that computes the power required to obtain a temperature
E(n) = Temperature Error for zone or compressor n. This error may be such as
If Temp(n) > HiSetPoint(n) then E(n) = Temp(n) - HighSetPoint(n)
else
If Temp(n) < LoSetPoint(n) then E(n) = LowSetPoint(n) - Temp(n)
else
E(n) = 0
U = Sum of ( W(n) * E(n) + K*Energy(AmbientTemp-Temp(n)) )
Now just minimize U. If it were only that easy.
New2PLC, you need to determine exactly what this formula is. Then you need to determine how to minimize U. Now, are you sure you want to do this in a MicroLogix?
When you understand how to do this you will quality for at least a MS degree, and you will be able to slice pickles with the best. This problem makes calculating a low pass filter coefficent look trivial.
See optimal control. You will need to know how to read Greek to get through all the symbols. Just joking. There are a lot of Greek symbols and one first looks a this stuff it may as well be Greek.
See Matlab.
OT, I don't like the way this new forum doesn't make it clear to whom I am responding unless I specifically mention a name.
Terry Woods
April 28th, 2002, 03:03 PM
Peter,
While your "optimization/minimization" method will certainly provide good instantaneous answers, it certainly is, as you indicate, a head-bender.
Sometimes it's damned hard (if not near impossible) to describe a problem in such a way that Differential Calculus can be applied to produce a solution.
Just as Algebraic approximations are often used instead of real-time-calculus solutions, so too Fuzzy Logic can be used in place of your "optimization/minimization" solution.
Rock-Paper-Scissors ?
All too often, programmers get locked up in the circle-logic situation associated with the Rock-Paper-Scissors game. It is hard to come to a stable condition (equilibrium) in that game because of the absolute relationship between each pair of members. That is, Rock always loses to Paper, Paper always loses to Scissors and Scissors always loses to Rock.
The logic behind which loses to which is based on the assumed physical attributes of each. A scissors will cut paper, but it will break if it tries to cut a rock. A paper will cover a rock, but it will be cut by a scissors. A rock will break a scissors but it will be covered by a paper.
If all three elements are played at the same time, the situation will never stabilize. Now, what happens if you can dictate the relative value of each attribute?
For instance,
the paper can range from sheer/light to opaque/heavy
the rock can range from hardened steel to soft gold leaf
the scissors can range from a kids' safety scissors to industrial pickle slicer.
With the right combination of "weights", each pair can be brought to a condition where neither wins. All three can be brought to a condition where none win - equilibrium.
Once equilibrium is established, the actual result can be varied by adjusting the relative strength of a particular attribute.
Applying Fuzzy Logic allows you to find equilibrium and then allows you to control the result according to the relative importance of any and all conditions.
All of this can be done in any PLC that has REAL NUMBER capabilities. You do not need a Fuzzy Logic Module!
Don,
I'm still considering how to accomplish reasonable control without knowing actual temperature.
New2PLCs
April 28th, 2002, 03:42 PM
Peter,
Thanks for getting so detailed there. I am going to happily show your response to the people that looked at me like I was crazy and said "What do you mean it's not a simple problem?" :)
However, I do have only a MicroLogix to work with. And I think it will be challenging but possible to come up with a system like what Terry has mentioned.
Anyways, thanks.
-Don
Dave Williams
April 28th, 2002, 04:08 PM
I fear no matter what you do, based on the scenarios that have been posted, you are fighting a "No win situation". Not that I'm trying to sound defeatist. I have witnessed more than once company's that spend huge dollars for energy management systems to control peak demand. The downfall to those systems is there are bypass switches. After all the carefull consideration which zones may be shut down during peak demand, over time it becomes obvious that all the areas are needed & soon all the switches are in the bypass mode. The result is a huge loss of capitol resources & a very impressive looking panel that does nothing. Unfortunately for New, he will become the bypass switches & constantly trying to compensate for conditions that are beyond the limitations of PLC programming.
Peter Nachtwey
April 28th, 2002, 05:17 PM
Try and iterative technique where you make trial temperature changes.
A function that computes the undesirable index is still required. Instend of minimizing using advanced techniques one just evaluates U in a seres of nest loops making trial temperature changes.
Start each iteration with U set to a big number.
Now evalute U with all the combinations of temperatures of each zone using the range of Temp(z)-1 to Temp(z)+1. The number of calcuations can be large if there are a lot of zones.
However, in the case of controlling temperature when one has minutes to make many guesses ( trial temperature changes ) and check to see if a new minimum is found, this may a better way. One could continually make trial changes to the temperatures in each zone. If the new undesirable index is smaller than the last then the trial temperature for that zone that is new temperature set point. This should be fast enough to adjust for changing of weighting between zones or changes in the ambient heat. With ten zones that could be done in a MicroLogix with floating point and the computer function block. With 10 zones the U function would have to be calcuated 3^10 or 59000 times for each iteration. At one millisecond per U function calcuation that would take about a mimute per update.
At least this trial and error techinique could be understood by most. I still wouldn't use Fuzzy Logic. One must have an a function that must be evaulated and minimized. In this minimization is done by case by trial and error in stead of using calculus and arrays.
rsdoran
April 28th, 2002, 07:58 PM
Peter I dont know if ya noticed or not but he is using thermostats...ie on/off. No temp values/analog is used. How will you know about the temp changes, the likelihood of the zones ever obtaining thermostat setting in hot months is unlikely if not given the freedom to run till that point.
You guys are the best but sometimes I think y'all enjoy making this stuff difficult.
To me the demands and restrictions make it a lose lose situation, so do something even if wrong.
My thoughts now are go with your first thoughts..use timers and a sequence, maybe allowing the priority zones a little more run time. Dont run when there is no demand, bypass those that dont need. Sequence what has demand. You will see that doing this they will more than likely (in hot months) cycle according to your sequence. Monitor it for 30 days etc and make modifications as you see fit.
I know HVAC, chillers, boilers etc. There is no accurate way to maintain a set temperature range using timers and thermostats in a zoned system with restrictions on the energy usage, unless you are very lucky. Might as well play ***** with a blindfold. The best you can do is work with it and make the key areas (where that may be only you can know) seem ok.
Get them to install lots of fans so there is more air flow.
Wish you lots of luck.
BTW I may not be good with PLC's but do know a little about this stuff. It can get complicated depending on conditions, like Terry said. The ambient external temperature ( the outside temp, like in Southern New Mexico in August) can have a more severe affect than Seattle, WA in August. There can be many more factors, is this in a plant? How high is the ceiling? What is the footage compared to the BTU/tonnage of the air conditioners? Are ovens used? Heat sealers? The list may go on and on.
The limitations imposed on you are mind boggling to me ( I have so little imagination). The concept of having X number of compressors but only allowed to use 50% at any time but its required to maintain a preset temperature ( level of comfort) is prepostereous.
Now that I think on it, forget about all the above. Make your boss and the real boss comfortable...dont sweat the rest. That is, dont allow yourself to sweat if ya get my drift.
Allen Nelson
April 28th, 2002, 09:29 PM
Sorry about my previous posts. New shows more programming experience than most newbies we get here. And the last time I did this, I got analog inputs - so I assumed that this problem was the same (Why? - it was Friday night, ok?)
Don't know if this will help, but here's an idea. All things being equal (which they won't be - occupancy, humidity, thermostat settings will all change the theory, but assuming), then each zone will run for a certain time between the time the thermostat says "Please" to when it say's "Thank You". That time will vary per zone, but each zone should have it's own time constant. When demand exceeds capacity, make every zone suffer equally. Add up the time contants, multiply it by the MaxLoad divided by the sum of the demanded loads, and run each in turn for that smaller time.
Or maybe just do as Ron says - don't sweat it, as long as the guy who can fire you doesn't sweat.
Good luck.
Orn Jonsson
April 30th, 2002, 07:49 PM
Your main concern here would be to minimize current draw on startup.
Companies are billed for electricity usage based on PEAK usage for any particular month.
This means that starting two 50Amp compressors at the same time is not a good idea since there will be an inrush of current on start up that may far exceed normal load ratings.
Keep this in mind when you sequence the starting pattern. Another thing to check is compressor capacity (nameplate rating). Find out if any of these 11 or so compressors are over-rated/under-rated for their load. Then you should be able to find out average run-time for each unit - do weighted avearage calculations and nail down your peak running load (not starting load). This will tell you what your Max load will be, just remember to sequence the motor starters so a whole bunch won't come on at the same time.
my two cents......
OJ
(Iceman)
New2PLCs
May 1st, 2002, 09:18 AM
Orn,
So you're telling me the compressors draw more when they start up. That completely makes sense, but I hadn't thought about it. I was sort of just given constant values for what I guess was the maximum amperage the compressor could draw. I guess, due to many factors, this could vary from the "running" load of the compressor substantially. Do you think it will differ enough (in an "average" situation) for me to want to take it into account?
Thanks,
-Don
New2PLCs
May 1st, 2002, 11:41 AM
Terry,
I'm waiting hopefully to see if you have further comments on this. In the meantime, here's what I've got in mind.
I'm thinking of setting up each of the compressors with a starting priority, 1-11, with 11 being the most important. I've got 1 timer per compressor. When a thermostat calls for cooling AND the compressor kicks on successfully, I'm going to use that timer to lock that compressor in for a predesignated minimum amount of time. As long as the thermostat is still calling, it gets to run for X minutes. Now, if the thermostat is calling for cooling but the compressor can't come on due to load restrictions, I'm going to use the timer to start counting 5-minute (arbitrary number) intervals. For every 5-minute interval, I'm going to take the compressor's starting priority, add 2 (arbitrary number), and store it as an overall priority for that compressor. When any compressor's overall priority gets high enough, it's allowed to shut off any compressors for which the overall priority (when it last kicked on) is lower, provided that the running compressors have been allowed to run for their minimum time. The overall priority for a particular compressor gets reset to the starting priority for that compressor once it has run.
Problematic case: All thermostats calling, a big compressor has gradually achieved highest overall priority because it hasn't been allowed on for a while. Now the big compressor has to wait for as many smaller compressors to finish their minimum-time run as needed to free up enough load space for it to run. In this case, you're potentially going to be wasting load space (but only if a thermostat for one of those compressors you're waiting on to time out stops calling--if not, you just let the compressor run until it's time for the big compressor to shut them all off together.)
While my head spins when I think of trying to implement this in ladder logic, it should be possible, and I think it is about the best one can do, given the nature of the problem. I think there are enough "fudge factors" to ensure an adequate amount of "tweakability":
1.) Starting priorities for each compressor
2.) Minimum time each compressor can run
(My tactic for handling the case where a large compressor gets locked out for a longer period than desired is to just increase it's minimum time--it will eventually come on; when it does, let it run longer.)
3.) Time interval length after which you increase overall priority when a unit has been calling but not allowed to run due to load restrictions
4.) Amount that you increase overall priority per interval for which a unit has been calling but not allowed to run
Any comments, further suggestions (especially on how I'd want to implement this with ladder logic!) are welcome and appreciated.
Thanks all,
-Don
rsdoran
May 1st, 2002, 03:36 PM
Don
I am not as good as these guys (by no means) when writing code, but I am fair at dealing with things like this in the real world. I know you are familiar with programming but ladder is new to you, so you are looking at what you were told and trying to lay it all out on paper beforehand to get the thoughts straight. I know I didnt state too clearly before what I meant but will attempt it again.
You are new to ladder, so make it easy on you to start out, remember that you can alaways edit (and probably will anyway) the code after you get it running. To begin with write a code that just sequences the compressors allowing equal time to all and not allowing the load rating to be over 50%.
Here are my thoughts, you arent totally familiar with the system(s) or doing ladder with a PLC, so you may need a little assistance from the electrician or hvac guy (anyone that can monitor the load ratings and temperatures in the zones.)and help you get full details on HP and Amperage draw per compressor motor.
Not being familiar with ladder make the code at the beginning just a sequence with timers.This will give you time to monitor temperatures in the different zones and the average load conditions At first dont sweat running at say %60 to %80, unless there is physical reason not to. That way everyone should be comfortable in most areas, as I said before jokingly, it is a good idea to keep the bosses comfortable. You can then make adjustments to fine tune the system, may even see a more efficient way to write the code.
You may want to see if someone has a Non Contact Thermometer to use to monitor temperatures in different places and zones.
You havent stated how in depth you have studied the hvac systems or the zones. You make want to determine the BTU's of each unit and the approximate square footage of the zones they are cooling. May want to determine the correlation to space vs btu, that may or may not help determine cycling time.
Keep it simple at first and allow yourself time to expand on it over a few weeks. Its a fact, no matter what you do in the beginning the odds are you will spend time making changes in the next few weeks.
Tom Jenkins
May 1st, 2002, 07:37 PM
"So you're telling me the compressors draw more when they start up. "
Yes, but.....
Many utilities charge larger customers for "Peak Demand". This is usually a charge of $X per kW for the largest 15 minute kW usage in a month during peak usage periods. That means that running a 5 hp motor for 15 minutes during peak periods can cost as much as running a 50 hp motor for hours during off peak times. Most energy management systems include demand limiting as one strategy, eliminating or "shedding" loads when demand gets above a pre-set threshold during peak times.
The influence of motor starting on demand charges is often over estimated. It is true that inrush current on a motor is several times the full load amps. However, starting across the line, which causes maximum inrush, only has a duration of a few seconds. When this is averaged across the 15 minute demand window the impact is negligible. It is running the motor for the 15 minutes that pushes up demand charges.
If you use "soft starts" the impact of inrush amperage is eliminated.
.