O'Reilly logo

Process Identification and PID Control by In-Beum Lee, Jietae Lee, Su Whan Sung

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

2

Simulations

2.1 Simulating Processes Composed of Differential Equations

In this section, the numerical derivative will be briefly introduced, followed by a simple method to solve first-order and high-order differential equations.

2.1.1 Numerical Derivative and Solving First-Order Differential Equations

Consider the following derivative definition:

images

It should be noted that the derivative can be approximated by choosing a small Δt instead of Δt → 0 as shown below.

images

where Δt is a small value. Equation (2.2) is called a numerical derivative.

The MATLAB program in Table 2.1 is used to calculate the numerical derivative of y(t) = t2 + 3t + 1 at t = 1 and compares it with the analytical value. As expected, the numerical derivative value (5.000 009 999 989) is very close to the analytical derivative value (5.000 000 000 000).

If the Δt value is decreased further, then the accuracy of the numerical derivative will be improved. But, there is a practical limitation in improving the accuracy because the round-off error increases as Δt decreases.

The same principle can be applied to solve differential equations. Consider the following differential equation:

images

Table 2.1 MATLAB code for the numerical ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required