PLC and PID algorithm

smsebnaa

Member
Join Date
Nov 2014
Location
tehran
Posts
32
Hello
I have plc s7-1200 and want to control 4 outputs with 3 inputs by PID algorithm . any outputs is dependent.
I could do this?
 
You may want to elaborate?

Add 4 PID blocks, and input whatever value you need to manipulate and output to corresponding outputs.
 
You may want to elaborate?

Add 4 PID blocks, and input whatever value you need to manipulate and output to corresponding outputs.

my project is greenhouse control, so i have 3 inputs ( temperature, humidity and CO2) and 4 outputs (cool fan, heater, fogger, vent). if temperature changed, humidity and CO2 are changing, and if humidity changed, temperature and CO2 are changing , ....
 
Last edited:
So what is your question?

Temperature is controlled by either cool fan (frequency controlled?) or heater (thyristor controlled, step controlled or on/off?)
Humidity is controlled by fogger (frequency controller or on/off?)
CO2 is controller by vent (frequency controller or on/off?)

You ask if you can do this? Sure, why the hell not?
You mention PID, so I assume you have four continuous controllers?
Are you asking how to do this, or...
 
So what is your question?

Temperature is controlled by either cool fan (frequency controlled?) or heater (thyristor controlled, step controlled or on/off?)
Humidity is controlled by fogger (frequency controller or on/off?)
CO2 is controller by vent (frequency controller or on/off?)

You ask if you can do this? Sure, why the hell not?
You mention PID, so I assume you have four continuous controllers?
Are you asking how to do this, or...
So what is your question?

Temperature is controlled by either cool fan (frequency controlled?) or heater (thyristor controlled, step controlled or on/off?)
Humidity is controlled by fogger (frequency controller or on/off?)
CO2 is controller by vent (frequency controller or on/off?)

You ask if you can do this? Sure, why the hell not?
You mention PID, so I assume you have four continuous controllers?
Are you asking how to do this, or...
temperature is controlled by heater , cool fan and vent. humidity is controlled by vent and fogger. CO2 is controlled by vent.
every outputs are on/off, you said i should use 4 pids, but there is dependent between parameters.
how to do this project?
 
Last edited:
I have never used PID for simple on-off control.

Is this a school project?

It seems to me that you can have 4 SP with a Hysteresis that will turn on/off each individual device.
 
I have never used PID for simple on-off control.

Is this a school project?

It seems to me that you can have 4 SP with a Hysteresis that will turn on/off each individual device.

i used hysteresis but i want to change it to PID, because hysteresis is not complete control for multi variable.
 
Regardless of whether or not you use PID, you will need several strategies. For example, if humidity is high but temperature is low you won't need the fogger. If humidity is low but temperature is low you want heat plus fogger and so on. Some of the items, such as the fogger, may work as well with just a deadband controller as with PID. If CO2 is high and temperature is low you may need to vent and heat. Etc.
 
Yes Siemens does have a fuzzy library, however it is expensive, and that is probably the biggest problem.
However you can make your own limited, as the process is rather simple.
Like tom says you will need to see what needs to happen.
with 3 inputs you are having 9 possibilities.
low, correct, high for all three.
so make an array of it.
put in each block what needs to be done, like heater+vent-cooler etc.
Now for the fuzzy part :
if templow and CO2= high then heater=slow, vent=slow
if templowlow and CO2=high then heater=high, vent = off
etc.
find memberships and you will get the outputs from it.
It is a different approach, however i think, when you do a nice job on this you will receive a 90% score.
 
Yes Siemens does have a fuzzy library, however it is expensive, and that is probably the biggest problem.
However you can make your own limited, as the process is rather simple.
Like tom says you will need to see what needs to happen.
with 3 inputs you are having 9 possibilities.
low, correct, high for all three.
so make an array of it.
put in each block what needs to be done, like heater+vent-cooler etc.
Now for the fuzzy part :
if templow and CO2= high then heater=slow, vent=slow
if templowlow and CO2=high then heater=high, vent = off
etc.
find memberships and you will get the outputs from it.
It is a different approach, however i think, when you do a nice job on this you will receive a 90% score.

any outputs are on/off. if I have 4 heaters, 12 fans, 1 fogger and 1 vent, that process (you said;"if templow and CO2= high then heater=slow, vent=slow
if templowlow and CO2=high then heater=high, vent = off") is long and may be PLC is warming?
 
If the outputs are on/off you can do a timed on/timed off to get a 60% on time for example.
for heaters you can set the time to 1 second, for the fogger to 10 minutes, for vent also 10 minutes.

when you read this in fuzzy a analog value is the result.
why would the plc warm?
 

Similar Topics

Hi everybody, I have to design PID controlled regulator(position and velocity) of Beckhoff TwinCat SoftPLC controller. I need your help to write...
Replies
5
Views
10,942
Hi, I would like to assemble a simulator/practice booster pump system that uses PID to maintain steady water pressure under various outlet demands...
Replies
0
Views
82
Dear Fellows; Good day. Here i share two images one is PLC Sweep Time control and Monitor Screen and the other one PID Control Screen. First i...
Replies
1
Views
241
Hi - I have an application where there is an option to use a PID loop embedded in the Transmitter to directly control (via 4-20mA output from the...
Replies
4
Views
1,069
Hello All, Has anyone on here used Soft PLC brand PLCs? I've just now started doing PLC programming and I am totally stuck on trying to make a PID...
Replies
4
Views
1,555
Back
Top Bottom