What is the "observer" in PID control?

In summary: This is referring to when the controller is "locked on" to the command, meaning that it's not correcting for errors anymore.
  • #1
PainterGuy
940
69
Hi,

The sentence in red confused me. I've basic knowledge of control theory so, if you can, please keep it simple.

I understand that with pole-placement regulator (LPR) and linear quadric regulator (LQR) one can use an observer to estimate the system's internal states rather than measuring them directly. One can use Kalman Filter as one of the observers. What kind of observer is used with PID? Does PID need all the states of a system to function?

I'm sorry but it's been some time and even my basic understanding is flawed. Thanks for the help, in advance!

If you design, install, or troubleshoot motion control systems, you’re probably familiar with PID (proportional-integral-derivative) control, which uses feedback to detect errors between the desired position and the actual position and applies corrective commands to compensate for those errors. Although PID control is the most common type of industrial controller, it does have limitations. First, PID control is generally not suitable for systems with multiple inputs and multiple outputs (MIMO), as the transfer functions and differential equations used to represent the system become overly complex when more then one input (or output) is involved. Second, PID control is based on constant parameters, so its effectiveness in controlling non-linear systems is limited.

An alternative control method is state space control. The key difference between PID control (aka “transfer control”) and state space control is that the state space method takes into account the internal state of the system, through what are referred to as “state variables.” These state variables describe the system and its response to any given set of inputs. PID control, on the other hand, relies on an “observer,” which estimates the internal state of the system based on measured inputs and outputs.
Source: https://www.motioncontroltips.com/what-is-state-space-control/
 
Engineering news on Phys.org
  • #2
PainterGuy said:
Hi,

The sentence in red confused me. I've basic knowledge of control theory so, if you can, please keep it simple.

I understand that with pole-placement regulator (LPR) and linear quadric regulator (LQR) one can use an observer to estimate the system's internal states rather than measuring them directly. One can use Kalman Filter as one of the observers. What kind of observer is used with PID? Does PID need all the states of a system to function?

I'm sorry but it's been some time and even my basic understanding is flawed. Thanks for the help, in advance!Source: https://www.motioncontroltips.com/what-is-state-space-control/
This doesn't make sense to me. As you know, in modern control the observer gives you the state information. But PID, as I know it, doesn't use the internal state information, just the output. Maybe what he says makes sense, but not to me. I'd ignore this reference. They either don't know what they're doing, or, more likely, just don't explain things well.

PID just takes a single measurement, compares it to a desired setpoint, to generate an error signal. That error signal is then compensated with, in order of low to high frequency, an integrator, then a constant (proportional) region, then a differentiator. The assumption is that the plant has a low pass response, so the differentiator at high frequencies isn't as horrible as it sounds. But, in reality, even the compensator has additional higher frequency poles that people don't talk about.

Honestly, anyone that's studied modern controls, doesn't really give any credence to PID. It's just a simplified control system with a predetermined number and type of poles & zeros. You can invent your own, which BTW, might be a PID format, or not.

If you haven't figured it out yet, I hate "PID". It's just a dumb simplification that doesn't actually make anything simpler in practice.
 
  • Like
Likes PainterGuy
  • #3
Thank you, @DaveE!

DaveE said:
As you know, in modern control the observer gives you the state information. But PID, as I know it, doesn't use the internal state information, just the output.

This is what I was thinking that, in simple terms, PID uses the output value to affect the input to get a desired value at the output.

State variables are variables whose values evolve over time in a way that depends on the values they have at any given time and on the externally imposed values of input variables. Output variables’ values depend on the values of the state variables.
Source: https://en.wikipedia.org/wiki/State-space_representationAn observer is used to estimate the state variables which are system's internal variables. According to the definition above, state variables, input variables and output variables are different from each other. Then, I don't see how a PID controller can use an observer when its operation doesn't even depend upon the state variables.

Could you please correct me if anything I said above is wrong?
Anyway, I was watching a video on PID and needed to clarify a simple point. It's more of a hairsplitting.

Between and 05:39 and 05:46, it says the following.
"Once the drone gets above the command, the error term becomes negative, and the integral output starts to decrease. However, it's coming down from a value of 2,000 RPM."

The following picture is a capture from the video and I drew the red dot and dashed line. I think that once the error becomes negative, the drone is coming down from a value which is somewhat larger than 2000 RPM. The dot represents the peak value of RPM and looking at the picture it lies at a position which has a value little bit larger than 2000 RPM. Do you agree with me?

1632033848103.png
 
Last edited:
  • #4
PainterGuy said:
An observer is used to estimate the state variables which are system's internal variables. According to the definition above, state variables, input variables and output variables are different from each other. Then, I don't see how a PID controller can use an observer when its operation doesn't even depend upon the state variables.
State variable(s) could also be the output(s). They are treated in general as internal, but can sometimes be outputs or directly observable.

The "PID controller" isn't really the whole system, it's just a description of a particular form of compensation. It is the system design that determines what the error signal is that is used for feedback. Then the feedback signal is modified by the PID compensator and fed back for control. The observer (if there is one) is about generating the signals used for feedback. This is (mostly) separate from the compensation method (PID). Yes you could have an observer estimate a state and use that to feed a PID algorithm if that made sense for your goals.

You are trying to mix different concepts here, I think. Concepts like state vectors, Controllability, Observers, etc. require Modern Control Theory. PID doesn't. I don't recall PID being part of any of my Modern Control classes, except mentioned in passing. I would think of PID as simply a mathematical operation done on a 1-D feedback signal, like gain, integration etc. Unfortunately it is portrayed as some special system to people that aren't comfortable enough with feedback systems to construct their own compensation function.

I also think that Observers (State Estimators) is a pretty complex subject compared to most control systems. If you aren't really comfortable with the math of linear state space systems (ABCD matrix equations, etc.), I would ignore it for now. It is basically imbedding another feedback system into your feedback system.

PainterGuy said:
I was watching a video on PID
This isn't really about PID as much as integrator wind-up, which is really it's own subject, not necessarily part of PID.

PainterGuy said:
I think that once the error becomes negative, the drone is coming down from a value which is somewhat larger than 2000 RPM. The dot represents the peak value of RPM and looking at the picture it lies at a position which has a value little bit larger than 2000 RPM. Do you agree with me?
I think you have confused the explanation. Blue is the command input which is asking the motor to spin faster than allowed. The motor is never faster than 1000 RPM. Watch the video again and ask if you have questions. I don't want to guess about what confuses you.

BTW, as an aside. I like his description of the clamping issues with integrators, since it explicitly explains some of the issues. But in the real world, there are simpler implementations that are (sort of like) making the integrator the output, so when you limit the output you are also clamping the integrator.
 
  • Like
Likes PainterGuy
  • #5
Thank you, @DaveE!

DaveE said:
I think you have confused the explanation. Blue is the command input which is asking the motor to spin faster than allowed. The motor is never faster than 1000 RPM. Watch the video again and ask if you have questions. I don't want to guess about what confuses you.

I don't think I've confused it but I did use the wrong wording. I've tried to fix it by adding more phrases in blue.

Between and 05:39 and 05:46, it says the following.
"Once the drone gets above the command, the error term becomes negative, and the integral output starts to decrease. However, it's coming down from a value of 2,000 RPM."

The following picture is a capture from the video and I drew the red dot and dashed line. I think that once the error becomes negative, the command line is coming down from a value which is somewhat larger than 2000 RPM. The dot represents the peak value of RPM demanded by command line, and looking at the picture it lies at a position which has a value little bit over 2000 RPM.

Where in the video, it says, "it's coming down from a value of 2,000 RPM", "it" refers to the value of RPM which had been demanded by the command line of integrator.

Do you agree with me?

1632098984020.png
 
  • #6
PainterGuy said:
Thank you, @DaveE!
I don't think I've confused it but I did use the wrong wording. I've tried to fix it by adding more phrases in blue.

Between and 05:39 and 05:46, it says the following.
"Once the drone gets above the command, the error term becomes negative, and the integral output starts to decrease. However, it's coming down from a value of 2,000 RPM."

The following picture is a capture from the video and I drew the red dot and dashed line. I think that once the error becomes negative, the command line is coming down from a value which is somewhat larger than 2000 RPM. The dot represents the peak value of RPM demanded by command line, and looking at the picture it lies at a position which has a value little bit over 2000 RPM.

Where in the video, it says, "it's coming down from a value of 2,000 RPM", "it" refers to the value of RPM which had been demanded by the command line of integrator.

Do you agree with me?

View attachment 289363
OK, sure. Did you have a question about this? I thought he described things pretty clearly. So what are you asking?
 
  • #7
DaveE said:
OK, sure. Did you have a question about this? I thought he described things pretty clearly. So what are you asking?

No, I didn't have a question about it. Just wanted to make sure what I was saying was correct. Yes, he did a great job explaining the PID.
 
  • #8
Note:
The author of the original text states "...PID control is based on constant parameters."

Not necessarily. I've implemented many PID loops where the gains were a function of the PV (or some other parameter/combination).
 
  • #9
Dullard said:
Note:
The author of the original text states "...PID control is based on constant parameters."

Not necessarily. I've implemented many PID loops where the gains were a function of the PV (or some other parameter/combination).
Yes, because it's a whole lot easier for them to teach linear systems, and you need that knowledge first. But there are many examples in the real world of non-linear plants and controllers.
 
  • Like
Likes PainterGuy and Dullard
  • #10
Dullard said:
Note:
The author of the original text states "...PID control is based on constant parameters."

Not necessarily. I've implemented many PID loops where the gains were a function of the PV (or some other parameter/combination).
I would also argue, based on my general disdain for "PID", that if you are going to constrain your feedback compensation to "PID" pole/zero placement, it would be wise to also constrain yourself/students to fixed gains and linear systems.

Many questions about PID systems can be traced to a lack of fundamental knowledge of feedback compensation or legitimate questions caused by the confusion of an overly constrained canonical form for these systems. PID isn't a very helpful construct, except for people that have no intention of actually understanding feedback control systems. Plus, if we must have it, I would have defined it as a PI systems. The D term is almost always set to zero (effectively), and when it's not it's likely to causes problems. The D term is also theoretically inconsistent, there is no such thing as a differentiator that doesn't have higher frequency poles.

\end of rant
 
  • Like
Likes PainterGuy
  • #11
It is rare in industrial controls (where PID is very common) to have a differential equation describing the behavior of the system in question (now what?). As a practical matter, PID is a very useful construct. Physical (as opposed to electronic) systems have inertia - that usually moots the limitations of PID at practical execution speeds. I understand your disdain (really) - I just don't think it would survive very long at an extrusion plant, shingle factory, etc.
 
  • Love
  • Like
Likes jrmichler and anorlunda
  • #12
Very good post by @Dullard. I'll add that nonlinearities in the process (especially limits) often make linear models temporarily invalid. "Best" performance of a control loop is a compromise between many operational and risk avoidance factors, and often can not be expressed as a mathematical function. Compare it to the "best" way to live happily with your spouse, or the "best" way to implement flight controls on the 737MAX. :wink:
 
  • #13
Dullard said:
It is rare in industrial controls (where PID is very common) to have a differential equation describing the behavior of the system in question (now what?). As a practical matter, PID is a very useful construct. Physical (as opposed to electronic) systems have inertia - that usually moots the limitations of PID at practical execution speeds. I understand your disdain (really) - I just don't think it would survive very long at an extrusion plant, shingle factory, etc.
I think you misunderstand my disdain. It's not that you shouldn't choose pole/zero placement that implements the same control as PID. It's that people shouldn't limit their compensation to PID. It is sold as something simple or special when it's just a subset of the potential compensation responses. Choose the best compensation for your application, if it ends up the same as PID, great. But don't start off thinking you only have three degrees of freedom. In particular, zeros in the transfer function can be very useful, even commonplace; but they will come with associated poles which is a bit more complex than just calling it a derivative term.

BTW, electronic systems have a nearly exact equivalent to inertia, usually described as inductance.
 

What is the "observer" in PID control?

The "observer" in PID control refers to a mathematical algorithm that estimates the current state of a system based on input and output data. It is also known as a state estimator and is used to improve the performance and stability of a PID controller.

How does the observer work in PID control?

The observer uses a mathematical model of the system, along with the input and output data, to estimate the current state of the system. It compares the estimated state with the actual state and provides feedback to the PID controller, which adjusts the control signal accordingly.

What are the benefits of using an observer in PID control?

Using an observer in PID control can improve the performance and stability of the controller, especially in systems with complex dynamics or disturbances. It also allows for better control of systems with unknown or changing parameters.

What are the types of observers used in PID control?

There are two main types of observers used in PID control: full-state observers and reduced-order observers. Full-state observers use all available input and output data to estimate the full state of the system, while reduced-order observers use a simplified model and only a subset of the data.

How is the observer designed in PID control?

The observer is designed by choosing appropriate mathematical models and tuning the observer gains to achieve the desired performance. The design process involves analyzing the system dynamics and choosing the appropriate type of observer for the specific application.

Similar threads

  • Electrical Engineering
Replies
3
Views
778
  • Electrical Engineering
Replies
5
Views
2K
  • Electrical Engineering
Replies
13
Views
4K
  • Electrical Engineering
Replies
2
Views
4K
  • Electrical Engineering
Replies
5
Views
2K
Replies
39
Views
18K
  • Electrical Engineering
Replies
7
Views
3K
Replies
13
Views
4K
  • Electrical Engineering
Replies
6
Views
3K
Replies
2
Views
1K
Back
Top