1

This is a follow-up to a previous question of mine.

Note that this is for a digital PID loop whose input comes from an ADC and whose output goes to a DAC. The system is in equilibrium when the ADC output is zero volts. I currently run at 100Hz, but could run the loop 1000x faster. System oscillations when "running wild" tend to be around 20Hz

What are the symptoms of a PID loop running too slow, or too fast, for the system response?

Before you ask, it is quite difficult to measure something like the step response of the system, which may vary according to load

Dirk Bruere
  • 13,425
  • 9
  • 53
  • 111
  • 1
    Perhaps this article about [heuristic tuning](https://control.com/textbook/process-dynamics-and-pid-controller-tuning/heuristic-pid-tuning-procedures/) of PIDs will help – jonathanjo Sep 28 '22 at 10:02
  • 1
    This is all quite vague, I think it depends on what you mean with too slow. Too slow to sample at an adequate pace? Too slow to give the desired response time? The former would manifest itself as inaccurate results, the latter would manifest itself as lag/latency. – Lundin Sep 28 '22 at 10:03
  • Define "fast" and "slow". Time delay between the input change and system reaction, or settling time, or something else? For example, if **P** term is too low the system may react slow, the output overshoot and undershoot levels are lower, oscillation period around target is longer and settling takes longer. Or if **I** term is too high the overshoot amount is higher but settling takes shorter without oscillation. So, what do you mean by "slow" and "fast"? – Rohat Kılıç Sep 28 '22 at 10:18
  • Agreed with the previous comments. _Speed_ will be relative to the process you are trying to control. A temperature controller will not have the same response time as a motor positioning system. This is from personal experience. I recently worked on a PIC heating control for a vacuum chamber where the temperature change rate was considerably slow given the overall thermal inertia from the parts inside the chamber (steel, wires, copper, etc.) When controlling the position of a motor or the height of a drone, the speed criteria will dramatically change. – Daniel Melendrez Sep 28 '22 at 10:24
  • 1
    @Dirk, I think you need to make it clear that you are talking about a digital PID. I also think you need to provide details of that controller because, what you are asking may result in different things for different controllers. – Andy aka Sep 28 '22 at 10:26
  • @Andyaka I have updated the question to make this explicit – Dirk Bruere Sep 28 '22 at 10:29
  • *The system is in equilibrium when the ADC output is zero volts* <-- do you mean DAC? – Andy aka Sep 28 '22 at 10:42
  • @Andyaka No. The DAC is positioning a beam between two optical sensors. When it is in the middle the difference between optical outputs, as measured by an ADC, is zero – Dirk Bruere Sep 28 '22 at 10:57
  • You don't mean volts then; you mean the digital output is midscale? – Andy aka Sep 28 '22 at 11:16
  • Is it a case that you don't understand that if you speed up the sampling rate, the coefficients need to change accordingly. – Andy aka Sep 28 '22 at 12:09
  • @Andyaka The ADC is set up in bipolar mode. I know the coeffs need to change if the speed of the loop changes, but I do not know whether I am running the PID loop itself too fast or too slow. I can experiment, but it takes a lot of time – Dirk Bruere Sep 28 '22 at 12:30
  • @DirkBruere it's normally the case that you choose a sampling rate that is a lot, lot higher than nyquist for the types of error signals you might get. Then as you reduce the sampling rate, things start to misbehave. You seem to have found a set of coefficients that work at a low sampling rate but, upon increasing the rate, things go unstable. Try starting with a much higher sampling rate and fixing the system coefficients. – Andy aka Sep 28 '22 at 12:43
  • @Andyaka At higher rate the ADC resolution drops – Dirk Bruere Sep 28 '22 at 12:55
  • How big is this beam that you are positioning? What type of actuator is controlling the beam? Your mechanical system may have multiple resonances, extending the loop bandwidth past them may be difficult or impossible. Have you experimentally measured your open-loop response? – Mattman944 Sep 28 '22 at 13:28
  • @Mattman944 It's a moving coil microbalance – Dirk Bruere Sep 28 '22 at 14:26
  • 2
    @DirkBruere Read [this](https://electronics.stackexchange.com/a/311528/38098) and move towards the middle of the writing where I'm talking about a "bamboo pole." Time delays, and especially ***variable*** time delays are death to PID. You want to keep the delays as short as you possibly can in your digital system so as to not worsen any delay situations that may already exist elsewhere. And you want to keep your delays, such as they are, without any jitter to them. It's possible to make predictors for PID if the delays are known. But \$e^{-s L}\$ where **L** is varying a lot makes things hard. – jonk Sep 28 '22 at 19:14

0 Answers0