Design Article
Implementation of a digital temperature PID controller
Andrew Smetana, Cypress Semiconductor
7/29/2009 3:00 AM EDT
Introduction
Regulators can be developed using analog and digital techniques. Different mathematical methods are needed to analyze and design analog and digital regulators. Though digital technology can replicate analog system operation, its abilities go much further. For example, nonlinear and self-adjusting systems, which are difficult to create using only an analog system, can be designed. The main issue in digital control is regulator structure and parameter definition.
After the parameters are determined, implementation of controller algorithms is a simple task.
Regulator systems are widespread in industry applications. In many cases, the process is passed with a preset temperature profile. These applications need a corresponding regulator to satisfy process requirements. The structure of the simplest regulator is presented in Figure 1.

Figure 1. Structure of the Simplest Regulator
This structure presents an automatic control system with feedback. See the following definitions:
w(t): System function algorithm
u(t): Control effect
z(t): External disturbance impact, which must be minimized
y(t): Output variable
e(t) = w(t) - y(t): Output variable y(t) deviation from required value w(t)
Examples of output variables are: temperature in the stove, the engine shaft rotation speed, liquid level in the cistern, etc. The key to temperature control is to constantly adjust the output variable, y(t), so that it is near the value of w(t). Doing this, will minimize the control error, e(t).
Temperature adjustments can be made with an automatic Regulator, Gr (Figure 1), which is described by control law:
u(t) = Gr[e(t)].
To select the correct control law, the automatic regulator must know the mathematical model of the control object:
y(t) = Go[u(t)].
The mathematical model is usually a nonlinear, ordinary system of differential equations or differential equations in partial derivatives. Identifying the form and coefficients of these equations is done via the control object identification task. For conventional systems, mathematical models are commonly used and then the principal task is identification of equation coefficients. In many cases, these coefficients can be selected empirically during the system tuning process or by performing some special tests. Some features of control systems with feedback indicators are:
Regulators can be developed using analog and digital techniques. Different mathematical methods are needed to analyze and design analog and digital regulators. Though digital technology can replicate analog system operation, its abilities go much further. For example, nonlinear and self-adjusting systems, which are difficult to create using only an analog system, can be designed. The main issue in digital control is regulator structure and parameter definition.
After the parameters are determined, implementation of controller algorithms is a simple task.
Regulator systems are widespread in industry applications. In many cases, the process is passed with a preset temperature profile. These applications need a corresponding regulator to satisfy process requirements. The structure of the simplest regulator is presented in Figure 1.

Figure 1. Structure of the Simplest Regulator
This structure presents an automatic control system with feedback. See the following definitions:
w(t): System function algorithm
u(t): Control effect
z(t): External disturbance impact, which must be minimized
y(t): Output variable
e(t) = w(t) - y(t): Output variable y(t) deviation from required value w(t)
Examples of output variables are: temperature in the stove, the engine shaft rotation speed, liquid level in the cistern, etc. The key to temperature control is to constantly adjust the output variable, y(t), so that it is near the value of w(t). Doing this, will minimize the control error, e(t).
Temperature adjustments can be made with an automatic Regulator, Gr (Figure 1), which is described by control law:
u(t) = Gr[e(t)].
To select the correct control law, the automatic regulator must know the mathematical model of the control object:
y(t) = Go[u(t)].
The mathematical model is usually a nonlinear, ordinary system of differential equations or differential equations in partial derivatives. Identifying the form and coefficients of these equations is done via the control object identification task. For conventional systems, mathematical models are commonly used and then the principal task is identification of equation coefficients. In many cases, these coefficients can be selected empirically during the system tuning process or by performing some special tests. Some features of control systems with feedback indicators are:
- Independent corrective action initialization when control variables deviate from reference values.
- Dynamic regulation of temperature variation with minimal detail.
Navigate to related information

