Welcome to the TRNSYS Users Forum.
The forum is a place where people can interact and have discussions about different topics involving the use of the TRNSYS software package. Here you can post topics for discussion or questions on using TRNSYS and get advice from other users or TRNSYS experts. This forum is not intended for detailed technical support. Users should contact their distributor’s hotline for such assistance.
Some tips for success on using the forum:
- Follow the Forum Rules posted in Forum Administration.
- There are categories for different types of topics and questions. Post your topic or question into the proper category.
- Before posting a topic or question search the existing topics (and the TRNSYS Users listserv archive or Post archive) to see if a similar topic or question has already been answered.
- Use a descriptive topic name. Don’t use attention getting subjects, they don’t get attention and only annoy people.
- State the version of TRNSYS and which add-ons your are using.
- Include enough specific details for your topic of question to be answered. Just posting “Why am I getting an error?” without describing the specific error and what you are trying to do when you get the error will not receive a response that fixes your issue.
- Remember when people help you, they are doing you a favor. Be patient, help people out by posting good descriptions of what you need help with, and be polite even if a response does not solve your issue.
- Moderators may edit your post for clarity or move your topic to a more appropriate category.
Hi i am using a PID controller (Type 23) and a constant volume liquid tank (Type 158).
The liquid tank should illustrate a simple anaerobic digester. I have a known constant inlet flow of biomass (same outlet flow) and want to heat this with a delta T of 30K.
I started simple with the default values on both types and adjusted the gain on the controller to meet the preferred temperature, and this worked.
The fermenter is 450m3, and have an average inlet of 583kg/hr. I have not changed anything else than the volume and inflow, so the liquid is still water. My problem is that the temperature will not rise enough. In addition, if I set the initial temperature of the tank to 37 degrees celsius, it decreases and stabilizes around 32 degrees celsius.
I know that this is a big tank with a lot of fluid going in and out of the tank. Do anyone have some good advice? I am not an expert on PID controllers, but I know the fundamentals.
I will gladly share the file.
Thank you in advance.
My first thought is that the auxiliary heat input of Type 158 is too small. I would plot the auxiliary heat input going to Type 158 and confirm that it's enough to raise the temperature of 583 kg/hr of water by 30 K, especially given the thermal capacitance of the 450 m3 tank.
I don't think the default thermal losses of the tank are high enough to have a limiting effect on the net energy delivered to the fluid, but you could try setting the top, bottom, and edge loss coefficients to 0 to rule out that possibility.
I have now gone over to Type 22 controller.
I have calculated that injecting 583kg at 7 C into a tank of 450 000kg of water at 37C reduces the temperature to 36.96 C, and requiring around 21kW of power to raise the temperature to 37 C in 1 hour. I have set alle loss coefficients to zero to rule out all losses.
First i bypassed the controller and injected 21kW = 75600kj/hr of power continuously, and this got the temperature set to around 37C.
But when i insert the type 22 controller with the following input settings
1: 37 celsius
4 (minimum control signal): 0, as i don't want cooling (it should just stop heating if it is to hot)
5 (maximum control signal): 80 000kj/hr (around the power required to lift temperature to 37)
6 (threshold): 0
7 (tolerance): 0.01
i get that the temperature drops way below my setpoint, as it don't want to apply enough power to the aux heater (see attached picture).
Sounds like you have isolated the problem to the signal output of Type 22/23. Maybe next thing to try would be disconnecting the tank from the controller, sending the controller a sinusoidal tank temperature (you can use an equation block and write something like T_tank = 36-sin(3*time) to get a sine wave between 35 and 37), and seeing how the controller responds?
If the controller's not responding as you expected, some things to try include changing/reducing the simulation time step, changing or optimizing the calling order of the components (in Simulation Studio, Settings -> Component order) so the controller is called first, and changing/reducing the convergence tolerances (Settings -> Advanced Settings -> Tolerance integration, tolerance convergence). These hints/tips and more are listed in the documentation for Type 22 in the MathematicalReference documentation of TRNSYS. I would also check any simulation warnings (is the controller "stuck" for any/most time steps of the simulation?) by clicking the Results icon after the simulation completes, and seeing if any messages labeled "warning" are printed there.
If the controller behaves as expected when isolated from the tank, and problems only appear when the two are connected, you could try playing around with the placement of the auxiliary and/or the placement of the thermostat, or whichever temperature output you're using to connect to the controller. Setting the number of tank nodes to 1 (fully mixed tank) will eliminate tank stratification and make it a little easier to anticipate the tank's behavior.
On further thought, I realized sending the iterative feedback controller a tank temperature that only varies with time won't tell you how the controller is responding to iterative changes in that temperature (but it still might be informative to see what it's returning at smaller vs larger temperature differences, and whether it changes when the temperature's dropping versus rising over subsequent time steps).
I suspect the tank is so large that changes in the signal are not producing a significant enough change in the tank temperature to register to the controller that it could do better to "solve" the system. In other words, the change in temperature over a time step at different guess values may be so small that the controller doesn't register that it should keep tuning its output. The convergence tolerance of o.o1 might be too large, as might the convergence tolerance for the TRNSYS simulation. If reducing tolerances doesn't have an effect, I would try making the maximum control signal 10x or 100x larger than you think it needs to be, just as an experiment, and see if there's a point at which the system responds better. 21 kW may be sufficient to stabilize the tank over an hour, but much more power is required to get a comparable temperature response within a TRNSYS time step. You could also try going back to the example you started from with the default tank and default PID controller, and try incrementally increasing the tank size and/or PID maximum output in turn to observe the interaction between the two.