June 28, 2018 at 8:04 pm #2867
Howdy. I work in a bourbon distillery. Fermentation plays a big part in the end product’s flavor profile. Being able to control the temperature at which the fermentation is done is critical to what we do.
I have a PIDE set up to control an analog valve which provides cold water to a cooling coil in a mash fermentation vessel. The desired operation is once the mash has been sent to the fermenter, the operator sets the temperature the mash should be held at during fermentation. The temperature in the fermenter will rise during the fermentation. Once the set point is hit, the PLC should command the cooling valve to open proportionally to maintain the set point temperature. The PIDE monitors the OperOperReq input, the fermenter’s current temperature (Process Variable) and the fermenter’s desired (max) temperature (Set Point). The error is the difference between the current temperature and the set point (E = PV – SP). I’m using the velocity form of the PID algorithm with independent gains (Kp=200, Ki=1,Kd=0). (See attached image.) Simple enough, right?
Well, not so much. The operators have informed that they have found that the cooling does not start properly. For example, the fermenter will be set on Monday with a beginning temperature of 68°F and a set point of 75°F. On Tuesday when the operators come in, the temperature will have risen to well above the 75°F set point but the cooling valve is still off (CV=0%). The operator uses the HMI to switch from OperatorAuto mode to OperatorManual mode, then sets the CV to 100%, then switches back to OperatorAuto mode. From that point onward, the system operates as expected.
I’m looking for any help/ideas that anyone may have on a) why this is happening and b) how to fix it.
Other pertinent data:
PLC is ControlLogix 1756-L73
Studio 5000 V28.02
Thanks in advance.
Firestone & Robertson Distilling Co.June 29, 2018 at 7:32 am #2869
Hi Jim and welcome to the forums.
It would be difficult to say without seeing the response curves of your process. My gut is telling me that the gains values you have may be part of the issue. A proportional of 200 seems excessive, can I ask how did you arrive at these gain values? Trending the responses over time would yield more concrete evidence to analyze.
Not sure if you’re aware (I assume you are and it’s why you’re here) but I am putting together a YouTube series on this very topic – ControlLogix PID Essentials.
I would be curious to see in a trend what exactly is going on, perhaps the error on startup is insurmountable for the controller to overcome due to the excessive proportional action, and as you say, once the operator manually brings the temperature to within setpoint “bumpless transfer” the controller can maintain.
Again with these gains that you have, I would like to see how it is maintaining. Are there oscillations? Is there a significant phase shift between CV and PV? Are you seeing any noise or amplification of noise? What about deadtime and lagtime in your process? A trend would yield meaningful information about all these things. Have you tried an Autotune?
FredJune 29, 2018 at 8:39 am #2870
Karma: 13Rank: Padawan
- Topics: 0
- Replies: 1
- Total Posts: 1
A feed forward is needed. Possibly a time delay and lead/lag block.
1) Do a step change with the valve in manual to graph out the temperature response over time.
2) Set up a time delay and lead/lag block to model the inverse of the temperature response. (MUST ALWAYS BLEED DOWN TO ZERO).
3) Add this to the PV of the controller.
In this way the controller will see the result of the CV change in the future. You can then be more aggressive in your tuning because the PV will predict what the new temperature will be.
Fred (no relation)June 29, 2018 at 8:49 am #2871
Thanks for the response. See my answers below.
>>It would be difficult to say without seeing the response curves of your process. My gut is telling me that
>>the gains values you have may be part of the issue.
I’m working on getting a response curve now.
>>A proportional of 200 seems excessive, can I ask how did you arrive at these gain values?
I inherited the system from the company that did the initial coding and deployment. When I asked them about how they got the gain values the response was “keep doubling the value until you see a response.” It didn’t strike me as a sound engineering approach…
>>I would be curious to see in a trend what exactly is going on, perhaps the error on startup is
>>insurmountable for the controller to overcome due to the excessive proportional action,
>>and as you say, once the operator manually brings the temperature to within setpoint
>>“bumpless transfer” the controller can maintain.
I began to suspect this after reading your article “How to Implement a ControlLogix PID Controller,” which is what brought me to the forums.
>>Again with these gains that you have, I would like to see how it is maintaining.
As for maintaining, right now the system can’t maintain the set point. A little background might be helpful here. Forgive me if I cover material you may be familiar with.
The fermentation process generates heat. It takes place is 16K gallon stainless steel vessels that are essentially convection cooled using a cooling coil through which is passed 44°F water. The ingredients in the vessel are not mechanically agitated. The only agitation of the ingredients is caused by the CO2 created as a byproduct of the fermentation. The CO2 rises to the top of the tank and give the impression that the ingredients in the tank are simmering/boiling. The room the fermentation vessels are in is NOT temperature controlled. So, when it’s 100°F outside, the room temperature can be just as high. (Got to love summer time in Texas.)
The current temperature control process does not start cooling the fermenter until the set point is reached. By that time, the fermentation is in full swing. For a 75°F set point, the system is never able to pull back the temperature to the set point and maintain it there. This is another issue that I need to deal with once I can get the cooling loop to start properly.
>>Are there oscillations? Is there a significant phase shift between CV and PV?
>>Are you seeing any noise or amplification of noise?
No idea on these since I don’t have a trend on them yet.
>>What about deadtime and lagtime in your process?
I don’t have any definitive numbers but intuitively, these are going to be large. I am effectively trying to maintain the temperature of a 16K gallon stainless container of a viscous mass that, generates its own heat and draws heat from its environment, without the benefit of being able to agitate the mass in order to distribute the heat.
>>Have you tried an Autotune?
No. I’m not familiar enough with it to be comfortable trying it. The PIDE is not set up to use Autotune at this point. I can’t really do anything that would cause the PLC to reset during the work day since it would disrupt distillation. That makes the distillers cranky.
JimJune 29, 2018 at 8:50 am #2872
Great suggestions Fred! Observing the dynamic response to a step change will provide good insight…trend my friend!
The “other” Fred 😉June 29, 2018 at 9:21 am #2873
Yes, I imagine that would make the distillers “cranky”! As the other Fred said, it may be beneficial after you’ve setup some trends to effectively quantify some of your process variables to setup an offline model that makes use of the DEDT and LDLG instructions to simulate the process.
Just a quick question, you are describing a direct-acting process. Have you confirmed in the PIDE that you are in fact set for direct action, E = PV – SP.
When the opportunity arises, I would suggest an Autotune on the controller. This needs to be done in open-loop control mode. In the test you will be able to specify a CV Step Change limit as well as a PV Change Limit. The autotune procedure will then perform a “bump-test” on CV that will measure the dynamic response of your process as it “bleeds” back to zero. The nice thing about this is it will take into account any deadtime or lead-lag time in your process as well.
In the meantime, setup your trend, study your process’s dynamics, and setup an offline model if possible.June 29, 2018 at 10:53 am #2874
I’ve confirmed that I am setup as a direct-acting process (E = PV – SP).
I’ve been tinkering with the set points on one of the fermenters and the behavior I’m seeing does not reflect my understanding of the PIDE.
The set point is at 75. The current temperature (PV) is at 71.7. The cooling water valve position (CV) is 0%.
If I change the SP to 74. The PV is the same. The CV immediately begins to increase! How can that be? The value of E is less than 0.
If I move the SP back to 75, the CV returns to 0.
I’ve attached a trend that shows the behavior.
What am I missing here?
JimJune 29, 2018 at 11:50 am #2876
Can you provide images of your “General Configuration” and “EUs/Limits” tabs. Also, is your PIDE programmed in a Periodic Task? What is the period set to?
June 29, 2018 at 12:17 pm #2878
- This reply was modified 5 months ago by Fred Graham.
I’ve been looking at your trend and to me the controller tuning is clearly too aggressive for this process. Note the “porpoising” action of the CV as it tries to get PV to approach SP following the SP step-change. Only two types of controller action can cause this to occur: proportional, or derivative.
Porpoising is when an oscillation occurs prior to PV crossing setpoint, which explains why integral action cannot be to blame here: the only way a loop oscillation can occur is when the final control element oscillates as well (i.e. changes direction), and since integral action will never change direction until PV crosses SP, oscillations that occur on one side of SP cannot be caused by integral action.
Looking at the phase shift between PV and output during the oscillations, it appears the output peaks may slightly lead the PV peaks, but only slightly. This suggests that proportional is the action that is too aggressive.
The large proportional gain is multiplying the error significantly, remember the proportional component is CV=E x Kp, which explains why as soon as you introduce an error you see the valve “smacking” fully open and fully closed.
A proper model will help you get this loop under control.
FredJune 29, 2018 at 12:18 pm #2879
The fermenter_temp_loops PIDE is in the Fermenter_Loops subtask which is in the Main Task. The subtask is scheduled by the main task which is Continuous. I’ve attached images.June 29, 2018 at 12:22 pm #2883
Will the the YouTube videos help with the modeling effort? If not, what would you recommend for a good tutorial on setting up the model?
JimJune 29, 2018 at 12:22 pm #2884
In addition to what I’ve indicated in my latest reply, your loop should be programmed in a Periodic Task as recommended by Rockwell. Your image indicates you are using the default “Periodic” timing mode, however you have not placed the loop in a Periodic Task.
When you place the loop in a periodic task the instruction will automatically use the periodic task update rate as the update time. This mode is the easiest to implement and can be used for most applications.
FredJune 29, 2018 at 12:25 pm #2886
In response to your last comment. Yes, absolutely! I plan to model the entire process making use of both the DEDT and LDLG instructions. As well, I plan to walk through an autotune procedure to see if we can “autotune” our way out of excessive deadtime and lag time.
You must be logged in to reply to this topic.