PID control (2025 exam): position PID control (d) Matlab simulation; derivative filtering

Antonio Sala, UPV

Difficulty: **** ,       Relevance: PIC,      Duration: 18:24

Materials:    [ Cód.: sau25testcontrollersD1.mlx ] [ PDF ]

Summary:

This video presents the simulation of the full-PID (all three basic actions active) of a position-control of an electromechanical system that was asked in a 2025 examination. The pen-and-paper solution walkthrough is detailed in the video [p2252dEN], please watch it prior to this one.

In here, we close the loop with two controllers designed there, one using the cancellation trick assigning two poles, and another one without such a trick, assigning three poles. Time and frequency response plots are discussed.

First, closed-loop transfer functions are computed to check that the poles are indeed at the positions we prescribed in the previous video.

However, regarding implementation and simulation, we aren’t done yet. There are several quirks that need to be sorted out in the video (maybe not for your first semester in automatic control, so consider this video optional).

First, the issue of internal instability is discussed: a block-diagram transformation is proposed in order to use the same code as in the prior video [p2252bsEN] which simulated a PI controller for velocity control. However, an unstable pole is duplicated and then some signals appear that would have an unstable response even if controlled variable, error and control action are bounded. If these signals are just “artificial” algebraic manipulations then this is not an issue and we can proceed (this is the case in this example). However, in the case said signals were of engineering importance, then we would be in severe troubles: our controller won’t realise that there are some internal loop variables diverging to infinity even if the controlled variable isn’t. That is called internal instability and it is of course unacceptable in practice.

The second issue is the non-realizability of the pure derivative control action. Some transfer functions appear whose numerator has a higher degree than that of the denominator and that means that a step input to them will have an infinite impulsional output which cannot occur in practice, or, equivalently, that the frequency response will tend to infinity at infinite frecuency so we will have an infinite amplification of high-frequency measurement noise. Again, this cannot be tolerated in practice, so a noise filter is needed in any valid PD or PID implementation. Simulations are carried out with and without said filter, to see Matlab errors in the case the filter is absent.

A third issue is that, even if the filter makes the result correct from a mathematical point of view (realizable transfer function), there exists a severe derivative kick at the initial stages of the time response, which is associated to a too large high-frequency gain, i.e., a too large measurement noise amplification. Real control systems might wish to elliminate that issue with two-degree-of-freedom designs, with heavier noise filtering and possibly with slower performance requirements (a slower loop can be achieved with smoother control actions).

So, as you can see, just solving the algebraic pole-placement problem we asked to you in the written examination does not mean that you fully understand the nuances of implementation of high-performance controllers. Nevertheless, if you are just a plain user, these implementation/filtering issues will be sorted out for you by the control software/hardware provider and you will need to just set some PID gains. The ideas in this video apply if you are going to develop your custom signal processing and control software, of course.

*Link to my [ whole collection] of videos in English. Link to larger [ Colección completa] in Spanish.

© 2026, A. Sala. All rights reserved for materials from authors affiliated to Universitat Politecnica de Valencia.
Please consult original source/authors for info regarding rights of materials from third parties.