PID simulator online

heating tank scheme
Continous heating tank
cstr in series scheme
CSTRs in series

How To Use PID Simulation Tool?

This is an online tool for PID simulation.
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

Table of contents

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.

Heating tank scheme

Scheme of the system

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


ε=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}}


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.

Continous 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

Scheme of the system

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




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

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}


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.