Replies: 5 comments
-
@svidille a dynamic model requires at least one unit operation with a defined volume or holdup, a vessel or tank for instance. you will then be able to use a PID to control the flow or something else. It doesn't work with a model like the one you attached. |
Beta Was this translation helpful? Give feedback.
-
Hi, Dan Thanks for your answer. I really appreciated that. Actually, not all dynamic model should require a hold up. To mention two examples. a flow through a valve normally requires only F = k.DP^0.5 equation. Temperature gain (although is not the case in real life, but sometimes we want to model "instantaneous" phenomena), could be modeled without holp-ups (most of the simulators have the option of volume zero for simple heaters and collers in dynamics mode). In the case of flow through a valve (or any simple resistence model), considering the inlet and outlet pressures are fixed, the flow could be calculated (and controlled) from the value of k (represented in the case of the valve of the Cv mutiplied by OP, depending if the valve is linear, =%, quick openning, etc). Of course, for other controllers (pressure and level), hold-up is mandatory. However, from your answer I infer DWSIM always requires hold-up for controllers. So I tried to add a hold-up between the inlet and the valve. I used a heater, as pipe is not accepted in dynamics mode. I didn´t use a separator because I didn´t want to mess with two outlets in a first moment. Should it work in this case? Not sure what I am still doing wrong, but I keep getting errors. I am not sure why the pressure went to zero in the system. When I vary hold-up volumes and integrator parameters, I get other errors. It seems that the pressure in the system depends on the hold-up although they were fixed as boundaries in the beginning I would appreaciate if you could the concepts behind dynamics mode in DWSIM, I suppose I am missing something and it is why I am failing everything I test. 2.Controlador_simple_con_holdup.zip Thanks once more, |
Beta Was this translation helpful? Give feedback.
-
@svidille there is an issue with the PID Controller, I'm looking into it. |
Beta Was this translation helpful? Give feedback.
-
Thanks for you feedback, Dan. |
Beta Was this translation helpful? Give feedback.
-
Hi, Dan I attached here another example of PID controller. This is a simple compressor speed control. As the compressor runs under real time and, by the end, the speed control does control the outlet pressure, perhaps through this example it is easier to see what is going on in the first step of the integration. Thanks so much, |
Beta Was this translation helpful? Give feedback.
-
Dear All and Dear Dan,
I suppose I am configuring something wrong in my controllers, because independent on control parameters (even if they are all zero), wind-up guard value, time steps, calculation rates, using current or a saved state, I always get the maximum value of the MV in the first time step and later it starts bouncing from minimum to maximum. Can you point my mistake, please, as I don´t see it.
Other question is about the PID equation. I understood that MV is escalated from -1 to 0 (-1 = maximum and 0 = minimum). It seems also that the error is something like SP/PV-1. Is it correct? It is what I see from the chart, at least, but I am not sure.
I attached the simulation. Actually, it is very simple: a valve, two pressure boundaries and a mass flow control with the valve opening (and only added the first valve to test, but it is the same with only one valve).
Besides, if I don´t ask a lot, does anyone have a Python Script for python controller that uses results of various time steps? I would like to create a classical PID but running out of ideas in how to keep the previous interactions results.
Thanks,
Best wishes,
Simone
2.FIC-101-test5 - copia.zip
Beta Was this translation helpful? Give feedback.
All reactions