You are on page 1of 50

PID CONTROL AND

COMMUNICATION IN
SIEMENS PLC

PID CONTROL (DAY2)


6 MARCH 2022
Add Analog Input Module
Change Measurement Type
Add IO tag name
Add IO tag name
Add Function for Analog Scaling
Add Function for Analog Reading
Add Data Block
Add function and put the parameter
Add Analog Output Module
Add Analog Output Module
Change Measurement Type
Add IO tag name
Add function for analog scaling
Add function for analog writing
What is a Control System

A control system is defined as a system of devices that manages, commands,


directs, or regulates the behavior of other devices or systems to achieve a
desired result. A control system achieves this through control loops, which are a
process designed to maintain a process variable at a desired set point.

In other words, the definition of a control system can be simplified as a system,


which controls other systems. As human civilization is being modernized day by
day the demand for automation has increased alongside it. Automation requires
control over systems of interacting devices.

Examples of control systems in your day-to-day life include an air conditioner, a


refrigerator, an air conditioner, a bathroom toilet tank, an automatic iron, and
many processes within a car – such as cruise control.
Features of a Control System

The main feature of a control system is that there should be a clear


mathematical relationship between the input and output of the system.
When the relation between input and output of the system can be represented by
a linear proportionality, the system is called a linear control system.

Again when the relationship between input and output cannot be represented by
single linear proportionality, rather the input and output are related by some non-
linear relation, the system is referred to as a non-linear control system.
Requirements of a Good Control System

Accuracy: Accuracy is the measurement tolerance of the instrument and defines


the limits of the errors made when the instrument is used in normal operating
conditions.

Accuracy can be improved by using feedback elements. To increase the accuracy


of any control system error detector should be present in the control system.

Sensitivity: The parameters of a control system are always changing with the
change in surrounding conditions, internal disturbance, or any other parameters.
This change can be expressed in terms of sensitivity. Any control system should
be insensitive to such parameters but sensitive to input signals only.

Noise: An undesired input signal is known as noise. A good control system should
be able to reduce the noise effect for better performance.
Requirements of a Good Control System

Stability: It is an important characteristic of the control system. For the bounded


input signal, the output must be bounded and if the input is zero then the output
must be zero then such a control system is said to be a stable system.

Bandwidth: An operating frequency range decides the bandwidth of the control


system. Bandwidth should be as large as possible for the frequency response of
a good control system.

Speed: It is the time taken by the control system to achieve its stable output. A
good control system possesses high speed. The transient period for such a
system is very small.

Oscillation: A small number of oscillations or constant oscillations of output tends


to indicate the system to be stable.
Example of Open-loop control systems

1.Electric Hand Drier – Hot air (output) comes out as long as you keep your hand
under the machine, irrespective of how much your hand is dried.
2.Automatic Washing Machine – This machine runs according to the pre-set time
irrespective of washing is completed or not.
3.Bread Toaster – This machine runs as per adjusted time irrespective of toasting
is completed or not.
4.Automatic Tea/Coffee Maker – These machines also function for pre-adjusted
time only.
5.Timer Based Clothes Drier – This machine dries wet clothes for pre-adjusted
time, it does not matter how much the clothes are dried.
6.Light Switch – Lamps glow whenever the light switch is on irrespective of light is
required or not.
7.Volume on Stereo System – Volume is adjusted manually irrespective of output
volume level.
Close Loop Control Systems
Control systems in which the output has an effect on the input quantity in such a manner that
the input quantity will adjust itself based on the output generated is called a closed-loop
control system.

An open-loop control system can be converted into a closed loop control system by providing
feedback. This feedback automatically makes suitable changes in the output due to external
disturbance.

In this way, a closed loop control system is called an automatic control system. The figure below
shows the block diagram of the closed loop control system in which feedback is taken from the
output and fed into the input.
Examples of Close Loop control systems

1.Automatic Electric Iron – Heating elements are controlled by the output temperature of the
iron.
2.Servo Voltage Stabilizer – Voltage controller operates depending upon the output voltages of
the system.
3.Water Level Controller – Input water is controlled by the water level of the reservoir.
4.Missile Launched and Auto Tracked by Radar – The direction of the missile is controlled by
comparing the target and position of the missile.
5.An Air Conditioner – An air conditioner functions depending upon the temperature of the room.
6.Cooling System in Car – It operates depending upon the temperature which it controls.
Plus Minus of -loop control systems

Advantages of closed-loop control systems Disadvantages of a closed-loop control


include: systems include:
1.Closed loop control systems are more 1.They are costlier.
accurate even in the presence of non- 2.They are complicated to design.
linearity. 3.Required more maintenance.
2.Highly accurate as any error arising is 4.Feedback leads to an oscillatory
corrected due to the presence of a response.
feedback signal. 5.Overall gain is reduced due to the
3.The bandwidth range is large. presence of feedback.
4.Facilitates automation. 6.Stability is the major problem and
5.The sensitivity of the system may be made more care is needed to design a
small to make the system more stable. stable closed loop system.
6.This system is less affected by noise.
Close Loop Control Systems
Control systems in which the output has an effect on the input quantity in such a manner that
the input quantity will adjust itself based on the output generated is called a closed-loop
control system.

An open-loop control system can be converted into a closed loop control system by providing
feedback. This feedback automatically makes suitable changes in the output due to external
disturbance.

In this way, a closed loop control system is called an automatic control system. The figure below
shows the block diagram of the closed loop control system in which feedback is taken from the
output and fed into the input.
Examples of Close Loop control systems

1.Automatic Electric Iron – Heating elements are controlled by the output temperature of the
iron.
2.Servo Voltage Stabilizer – Voltage controller operates depending upon the output voltages of
the system.
3.Water Level Controller – Input water is controlled by the water level of the reservoir.
4.Missile Launched and Auto Tracked by Radar – The direction of the missile is controlled by
comparing the target and position of the missile.
5.An Air Conditioner – An air conditioner functions depending upon the temperature of the room.
6.Cooling System in Car – It operates depending upon the temperature which it controls.
Plus Minus of -loop control systems

Advantages of closed-loop control systems Disadvantages of a closed-loop control


include: systems include:
1.Closed loop control systems are more 1.They are costlier.
accurate even in the presence of non- 2.They are complicated to design.
linearity. 3.Required more maintenance.
2.Highly accurate as any error arising is 4.Feedback leads to an oscillatory
corrected due to the presence of a response.
feedback signal. 5.Overall gain is reduced due to the
3.The bandwidth range is large. presence of feedback.
4.Facilitates automation. 6.Stability is the major problem and
5.The sensitivity of the system may be made more care is needed to design a
small to make the system more stable. stable closed loop system.
6.This system is less affected by noise.
Download Factory I/O
PID (Proportional Integral Derivative)

Example:

Process value = vehicle speed


Set point = cruise control set point
Output = throttle valve

You are driving down the highway and decide to turn on cruise control at 100 km/h. When
your vehicle comes to a hill, the speed drops below the set point.
In this example, the set point is 100 km/h, the actual speed drops to 70 km/h, so the error
value becomes 100 – 70 =30.

The PID controller takes in this error value, and determines how much to control the
output, to bring the process value to the desired set point.
The PID controller will calculate the Error value, then press down on the gas pedal until
your car reaches the 100 km/h set point (the error becomes zero).
Download Factory I/O
Download Factory I/O
Main View Factory I/O
Open Scene Factory I/O
Open Driver Factory I/O for PLCSIM
TIA Portal PID Compact V2
TIA Portal PID Compact V2

Symbol Description
y Output value of the PID algorithm

Kp Proportional gain

s Laplace operator
b Proportional action weighting
w Setpoint
x Process value
TI Integral action time
TD Derivative action time
a Derivative delay coefficient (derivative delay T1 = a × TD)
c Derivative action weighting
TIA Portal PID Compact V2
Call TIA Portal PID Compact V2

PID_Compact is called in the constant time scale of a cycle interrupt OB.


If you call PID_Compact as a multi-instance DB, no technology object is created. No
parameter assignment interface or commissioning interface is available.

You must assign parameters for PID_Compact directly in the multi-instance DB and
commission it via a watch table.
Startup TIA Portal PID Compact V2

When the CPU starts up, PID_Compact starts in the operating mode that is saved in
the Mode in/out parameter. To switch to "Inactive" operating mode during startup, set
RunModeByStartup = FALSE.
Reaction to Error TIA Portal PID Compact V2

In automatic mode and during commissioning, the reaction to error depends on the
SetSubstituteOutput and ActivateRecoverMode variables. In manual mode, the reaction is
independent of SetSubstituteOutput and ActivateRecoverMode. If ActivateRecoverMode =
TRUE, the reaction additionally depends on the error that occurred.

In manual mode, PID_Compact uses ManualValue as output value, unless ManualValue is


invalid. If ManualValue is invalid, SubstituteOutput is used.
If ManualValue and SubstituteOutput are invalid, Config.OutputLowerLimit is used.

The Error parameter indicates if an error is pending. When the error is no longer pending,
Error = FALSE. The ErrorBits parameter shows which errors have occurred. ErrorBits is
reset by a rising edge at Reset or ErrorAck.
Reaction to Error TIA Portal PID Compact V2
Input Parameter of TIA Portal PID Compact V2
Input Parameter of TIA Portal PID Compact V2
Add Technology Object TIA Portal PID Compact V2
Input Parameter of TIA Portal PID Compact V2
Output Parameter of TIA Portal PID Compact V2
Output Parameter of TIA Portal PID Compact V2
In/Out Parameter of TIA Portal PID Compact V2
Add Technology Object TIA Portal PID Compact V2
Setting Function and Parameter TIA Portal PID Compact V2
TIA Portal PID Compact Auto Tunning

You might also like