80% discount promotion

PID simulator online

PID SIMULATION TOOL
heating tank scheme
Continous heating tank
cstr in series scheme
CSTRs in series
First order object
First-order object
Loading...

How To Use PID Simulation Tool?

This is an online tool for PID simulation.
Usage:
1. Enter the coeffcicients of the controller.
2. Enter the parameters of the system and setpoint value.
3. Results are generated automatically.

You can:
- choose one of systems simulated,
- manipulate diagram (for example zoom in or out),
- save diagram as PNG.


Contact: [email protected]



PIDSIM Documentation


Definition of the systems

Continous heating tank

The system taken under consideration is a tank with a heating jacket illustrated below. The liquid supplied to the tank is heated up to a desired temperature.

Tank scheme

Scheme of the system

The mathematical model is based on heat balance. It is an oridinary differential equation:

dTdt=11+ε[1τ(TfT)+Q(TqT)]\frac{dT}{dt}=\frac{1}{1+\varepsilon}\left[\frac{1}{\tau}({T}_{f}-T)+Q({T}_{q}-T)\right]

ε=mscsVρcp,Q=AqkqVρcp,τ=VFV\varepsilon=\frac{m_{s}{c}_{s}}{V\rho{c_{p}}},Q=\frac{A_{q}{k}_{q}}{V\rho{c}_{p}},\tau =\frac{V}{F_{V}}

where:

Aq - heat transfer area, m2

cs - specific heat of the tank, J/(kgK)

cp - specific heat of the liquid, J/(kgK)

FV - volumetric flow rate of the liquid, m3/s

kq - heat transfer coefficient, W/(m2K)

ms - mass of tank, kg

t - time, s

T - temperature of the liquid inside the tank, K

Tf - inlet temperature of the liquid, K

Tq - heating medium temperature, K

V - volume of the liquid inside the tank, m3

ε - ratio of solid (tank) heat capacity to liquid heat capacity, -

τ - residence time, s

ρ - density the liquid, kg/m3

The derivation of the mathematical model is presented in Lecture notes in process control, lecture 4.

Continuous stirred tank reactors in series

The system consists of two tank reactors in series. The automatic control is aimed at achieving desired concentration in the second reactor (and in the outlet). To this end the concentration of A substrate is manipulated by the controller.

CSTRs in series

Scheme of the system

The mathematical model is based on mass balances of substrate A in reactor 1 and 2. It is a system of oridinary differential equations:

dCA1dt=V1FVCAfV1FVCA1kCA1\frac{dC_{A1}}{dt}=\frac{V_1}{F_V}C_{Af}-\frac{V_1}{F_V}C_{A1}-kC_{A1}

dCA2dt=V2FVCA1V2FVCA2kCA2\frac{dC_{A2}}{dt}=\frac{V_2}{F_V}C_{A1}-\frac{V_2}{F_V}C_{A2}-kC_{A2}

where:

CA1 - Substrate A concentration in first reactor, mol/m3

CA2 - Substrate A concentration in second reactor, mol/m3

CAf - Substrate A concentration in feeding stream, mol/m3

FV - volumetric flow rate of the liquid, m3/s

k - kinetic constant, 1/s

V1 - volume of the first reactor, m3

V2 - volume of the second reactor, m3

First-order object

First-order differential equations describe systems across various domains, including electrical circuits, mechanical and chemical engineering. This equations can be expressed as:

Tdydt+y=Ku(t)T\frac{dy}{dt}+y=Ku(t)

wher time constant T represents the time it takes for the system's response to reach 63.2% of its steady-state value after a unit step input is applied, and K is the gain of the system. Dynamical systems described by first-order ODEs is called a first-order system.

PID (Proportional-Integral-Derivative) controller

The PID controller is described by the equation:

u=Kpe(t)+Ki0te(τ)dτ+Kdde(t)dtu={K_{p}}e(t)+{K_{i}}\int\limits_{0}^{t}{e(\tau )d\tau }+{K_{d}}\frac{de(t)}{dt}

where:

e - error

t - time, s

Kp - proportional gain coefficient

Ki - integral term coefficient

Kd - derivative term coefficient

u - value of manipulated variable

There are three terms in the above equaion: the proporional, integral and derivative one. Each term serves a specific purpose:

  • The proportional term is responsible for the immediate response to the current error (the difference between the setpoint and the actual controlled variable). It produces an output signal that is directly proportional to the current error. The P-term helps to reduce the initial error quickly, but it may not eliminate steady-state error entirely. It is the primary term responsible for bringing the system's output closer to the setpoint.

  • The integral term focuses on correcting steady-state error that remain even after the proportional term has brought the system close to the setpoint. It accumulates the error over time and produces an output signal that is proportional to the integral of the error.

  • The derivative term anticipates future errors by considering the rate of change of the error. It produces an output signal that is proportional to the rate of change of the error. It helps to dampen oscillations and reduce overshoot by counteracting rapid changes in error.


Term Rise time Overshoot Settling time Steady-state error
Proportional Decrease Increase Small Change Decrease
Integral Decrease Increase Increase Decrease
Derivative Small Change Decrease Decrease No Change

Control system elements

Common terms used in process control include:

  • Setpoint: this is a desired value of a variable in the system (such as speed, temperature, etc.)
  • Disturbance variable: a variable that we have no control over but affects the process.
  • Manipulated variable: a variable that we can change (manipulate) to affect the output of the process.
  • Controlled variable: the output process variable we compare to the set-point.
  • Error: the difference between the setpoint and the actual controlled variable.

In the case analyzed, the liquid temperature in the tank is the controlled variable, while temperature of the heating medium is the manipulated variable. In other words: our goal is to achieve setpoint temperature of the liquid and to achieve this the control system manipulates the heating medium temperature.