What Is PID Control? | Understanding PID Control, Part 1

00:11:42
https://www.youtube.com/watch?v=wkfEZmsQqiA

الملخص

TLDRThis video provides an overview of PID (Proportional, Integral, Derivative) control systems, which are essential in controlling output to reach desired commands across various applications. It avoids deep mathematical dives, instead focusing on understanding how these components work: the proportional part addresses present error, the integral part accumulates past error to eliminate steady-state issues, and the derivative predicts future error to smoothen the transition towards the setpoint. A PID controller’s effectiveness lies in its ability to balance these aspects through tuning, which involves adjusting each part's contribution to the overall control action. By modifying these parameters, one can optimize how a system reacts to errors over time. PID controllers are preferred due to their simplicity and effectiveness in managing control tasks, from industrial machines to drones. The video series promises to delve deeper into practical implementation and tuning of PID systems on real hardware.

الوجبات الجاهزة

  • 📘 PID control is a common method used to adjust system outputs to meet desired values.
  • 🧠 It combines proportional, integral, and derivative components to address control challenges.
  • 🚀 The proportional term deals with present error quickly by adjusting control inputs.
  • ⏳ The integral component eliminates steady-state errors by integrating past errors over time.
  • 🔮 The derivative term predicts future errors, smoothing the approach to the setpoint.
  • 🔧 Effective PID controller tuning is crucial for balancing the influence of present, past, and future error information.
  • ⚙️ PID controllers are prevalent due to their simplicity and adaptability to many control applications.
  • 🎯 Errors can be systematically minimized by adjusting the PID control gains.
  • 🔩 The video aims to build intuitive understanding rather than focusing on complex mathematical calculations.
  • 📈 Future videos will explore practical implementation and real-world applications of PID controllers.

الجدول الزمني

  • 00:00:00 - 00:05:00

    The video introduces PID control, highlighting its common presence and importance in control systems without diving into complex mathematics. It starts by explaining basic concepts like the plant (system to be controlled), actuated signal (input), and the controlled variable (output). The role of a control engineer is to determine the right input to achieve the desired output, known as the setpoint or reference. The video presents the concept of feedback control where the system output is fed back and compared to the commanded variable to create an error term, which ideally should be zero. It uses a walking example to illustrate the proportional controller, which multiplies the present error by a constant to determine the control action, effectively reducing the error to zero over time, although it may vary in time to achieve precision.

  • 00:05:00 - 00:11:42

    The proportional controller is further analyzed with a quadcopter drone example, revealing its limitation in producing a steady-state error. To eliminate this error, the video introduces the integral path in the controller, which accounts for past errors by summing them over time, helping eliminate steady-state errors as it adjusts to ongoing discrepancies between desired and actual outcomes. This combination of proportional and integral paths helps drive the error to zero even in different scenarios. However, without addressing future changes, overshoot may occur. To correct this, the derivative path is added, predicting future behavior by measuring the rate of change of the error. This addition creates a PID controller, a balanced approach that uses past, present, and future error insights to tune the error correction process, thereby optimizing actuator commands. The video concludes by acknowledging PID's versatility and prevalence in solving various control problems, with an invitation to explore further in future lessons.

الخريطة الذهنية

Mind Map

الأسئلة الشائعة

  • What is a PID controller?

    A PID controller is a control mechanism that uses proportional, integral, and derivative components to adjust a system's output to reach a desired setpoint.

  • How does a proportional controller work?

    A proportional controller uses the present error to determine how much control action to apply, aiming to reduce the error quickly as the system approaches the setpoint.

  • Why might a simple proportional controller be insufficient?

    A simple proportional controller can create steady-state error because it doesn't account for past information or the rate of change of the error.

  • What does the integral part of a PID controller do?

    The integral part sums up the error over time, helping to eliminate steady-state error by continuously adjusting the control action.

  • How does the derivative part of a PID controller aid in control?

    The derivative part predicts future error based on the rate of change, allowing the system to dampen overshooting and respond more smoothly near the setpoint.

  • What is steady-state error?

    Steady-state error is the remaining error when the system has settled after a control action, especially seen with simple proportional control.

  • How does tuning affect a PID controller?

    Tuning involves adjusting the gain for each PID component to determine the contribution of present, past, and future errors to the control action.

  • What happens if the gains for some PID components are set to zero?

    The controller is simplified to only consider the components with non-zero gains; for example, if only the P and I gains are non-zero, it becomes a PI controller.

  • Why is PID control popular in feedback systems?

    PID control is widely used because it effectively combines present, past, and future error information to address a variety of control problems flexibly.

  • What future topics are planned regarding PID controllers in the series?

    Future videos will cover how to implement PID controllers, tune them, and demonstrate their application on real hardware systems.

عرض المزيد من ملخصات الفيديو

احصل على وصول فوري إلى ملخصات فيديو YouTube المجانية المدعومة بالذكاء الاصطناعي!
الترجمات
en
التمرير التلقائي:
  • 00:00:00
    Let's talk about PID control.
  • 00:00:03
    Chances are you've interacted with something that uses a form of this control law even if you weren't aware of it.
  • 00:00:09
    And so it's worth learning a bit more about what this control law is actually doing and how it helps us. However,
  • 00:00:16
    often when we're learning something new in control theory, it's easy to get bogged down in the detailed mathematics of the problem.
  • 00:00:22
    So, in this video, we're going to skip most of the math and instead focus on building a good intuitive foundation.
  • 00:00:28
    So I hope you stick around for it. I'm Brian and welcome to a MATLAB Tech Talk.
  • 00:00:35
    We start with a plant.
  • 00:00:37
    This is what we call the system that we want to control, or the system whose behavior we want to affect.
  • 00:00:43
    The input into the plant is the actuated signal and the output is the controlled variable.
  • 00:00:50
    Different industries refer to these signals by various names, so you might hear them called something else like plant input and plant output.
  • 00:00:58
    But regardless of the names, the basic idea of a control system is to figure out how to generate the appropriate
  • 00:01:04
    actuated signal, the input, so that our system will produce the desired controlled variable, the output. And
  • 00:01:11
    that's basically the job of the control engineer: produce the right input into the system to get the output that you want. And just
  • 00:01:19
    like before, the output you want also goes by various names. Here
  • 00:01:24
    I call it the command or the commanded variable,
  • 00:01:27
    but you might also hear it as the setpoint, the reference, or the desired value. And
  • 00:01:32
    in feedback control, the output of the system is fed back --
  • 00:01:36
    hence, the name and compared to the command to see how far off the system is from where we want it to be.
  • 00:01:43
    This difference between the two is the error term. If the output was
  • 00:01:48
    exactly what we commanded it to be, then the error would go to zero and that is what we want zero error.
  • 00:01:55
    So the question is how do we take this error term and convert it into suitable actuator commands so that over time
  • 00:02:03
    the error is driven to zero. And the answer is with a controller.
  • 00:02:09
    Let's illustrate this with an example.
  • 00:02:11
    Imagine you are standing on the goal line of a soccer field and you want to walk to the half field line
  • 00:02:17
    50 meters away in this case.
  • 00:02:20
    You are the plant
  • 00:02:22
    the actuated signal is the speed and the direction that you walk and
  • 00:02:26
    your current location on the field is the output variable or 0 meters to start and then 50 meters is the
  • 00:02:34
    command
  • 00:02:35
    Therefore at the beginning your position error is 50 meters or 50 minus zero
  • 00:02:40
    You still have a ways to go.
  • 00:02:42
    Your brain being the controller tells your legs how fast to walk and
  • 00:02:47
    One way your brain can do this is to use the error at the present moment to decide your walking speed
  • 00:02:53
    Here I've set our controller to the value of
  • 00:02:56
    0.1. This means that if we take the error in our system and multiply it by 0.1. We'll get our walking speed.
  • 00:03:03
    So if our error is 50 meters like it is at the beginning, then we'll start off walking at 5 meters per second.
  • 00:03:10
    With a proportional controller like this,
  • 00:03:12
    We start reducing the error quickly since we're far away and then gradually slow down as we get closer and closer to our goal. In
  • 00:03:20
    this way we would eventually and asymptotically reach the half-field line, at which time the error would be zero and our
  • 00:03:27
    proportional controller would multiply that by
  • 00:03:30
    0.1, which would generate a walking speed of zero.
  • 00:03:34
    Stopping us right where we want to be. If we wanted to adjust the amount of time it took us to get to the goal,
  • 00:03:39
    we could increase or decrease the multiplier term.
  • 00:03:44
    Regardless of the game value chosen, this type of controller will eventually cause us to stop right on the goal line.
  • 00:03:51
    So this proportional controller seems great. I mean, just multiplying the present error by a number seems to work.
  • 00:03:57
    Well, let's try it again on a different system and see if it performs the same way. In this second example, you want to design
  • 00:04:05
    An altitude controller for a quadcopter drone. The drone has four propellers and when they all spin up together
  • 00:04:12
    they produce a force that lifts the drone up into the air.
  • 00:04:15
    This is similar to our walking example, in that we're trying to get to a specific location.
  • 00:04:20
    But this time we want to get our system to hover at an altitude of 50 meters.
  • 00:04:25
    Our plant the drone and the output of this system is altitude.
  • 00:04:30
    Now the input of the system is not walking speed but propeller speed and all in all it seems like a pretty similar problem.
  • 00:04:38
    So how well does a proportional controller work in this case?
  • 00:04:42
    Well, when the drone is on the ground
  • 00:04:44
    there's an error of 50 meters, which would generate a large propeller speed, causing the drone to lift off and start to rise,
  • 00:04:52
    Reducing the error. So far so good. But let's imagine the drone was able to rise all the way to 50 meters.
  • 00:04:59
    What would happen now?
  • 00:05:01
    Well, the error would drop to zero since the command and the output are both 50 meters. This would then shut off the
  • 00:05:08
    propellers. Lift would stop, and the drone would fall back to earth. Now when that happens
  • 00:05:15
    the propeller speed would start to increase again as the error grew.
  • 00:05:19
    There is a certain propeller speed where the lifting force is exactly equal to the weight of the drone, and at that speed the drone
  • 00:05:26
    will hover. So where would our proportional controller hover this drone?
  • 00:05:30
    Well that depends on the controller gained. Now
  • 00:05:33
    let's assume for the moment that the propellers need to spin at 100 rpm in order for the drone to hover. If
  • 00:05:40
    Our proportional gain was 2, then the drone would hover right at ground level.
  • 00:05:45
    Since an error of 50 times 2 is 100 rpm
  • 00:05:51
    However, if we increased the gain to 5 the drone would rise at first but then stop at 30 metres since the error at that
  • 00:05:58
    point would be 20 meters and 20 times 5 is 100 rpm. A
  • 00:06:02
    gain of 10 would produce an error of 10 meters and a gain of 100 would produce an error of 1 meter. And
  • 00:06:09
    no matter how high we increased the gain, the error won't go away,
  • 00:06:13
    It'll just get smaller and smaller with this system and a proportional controller.
  • 00:06:17
    So we can see that a simple proportional controller doesn't work in every situation.
  • 00:06:22
    It works with our walking example,
  • 00:06:24
    but for our drone, it created this constant error -- this error is also called steady-state error.
  • 00:06:31
    So, how can we tweak our controller to get rid of this steady-state error? We can do that by letting our controller use past information,
  • 00:06:40
    specifically adding an integrator path in our controller that's added alongside the proportional path. An
  • 00:06:48
    integrator sums up the input signal over time keeping a running total.
  • 00:06:53
    Therefore, it has this memory of what has happened before.
  • 00:06:57
    Basically, it's keeping track of the past.
  • 00:06:59
    Now if the drone gets to steady-state
  • 00:07:01
    below the desired altitude
  • 00:07:03
    The error term is nonzero and when a nonzero value is integrated, the output will increase.
  • 00:07:11
    Now as long as there's error in our system,
  • 00:07:13
    the integral output will continue to change, and this increased value from the integrator path will
  • 00:07:19
    increase the speed of the propellers and the drone will continue to rise.
  • 00:07:23
    These two paths, the proportional and the integral path, work with each other to drive the error down to zero. And
  • 00:07:31
    with this controller, when the drone is hovering at the desired altitude of 50 meters, the
  • 00:07:36
    Proportional path is doing nothing since the error is zero.
  • 00:07:39
    But the integral path has been summing and subtracting values until it came to rest at 100 rpm.
  • 00:07:46
    Remember, this is what we said was needed for the drone to hover and
  • 00:07:50
    that output from our integrator will not change since the input to the integrator at this point is zero.
  • 00:07:57
    All right
  • 00:07:58
    This proportional integral controller is it. This is what we want, right, something that understands the present and has memory of the past.
  • 00:08:06
    Well, looking at the past and present error will get us to our goal in this situation.
  • 00:08:11
    However, the path the drone takes to get there might not be ideal.
  • 00:08:16
    Imagine this situation
  • 00:08:18
    Right before we get to 50 meters, there's an interesting situation that can occur.
  • 00:08:22
    The proportional path is basically zero since at this point the error is so small.
  • 00:08:27
    But depending on how the drone got to this height the integrator may have summed to a value over 100 rpm.
  • 00:08:34
    This would cause the drone to keep rising, which is what we want since we're below the 50 meters.
  • 00:08:40
    However, to remove that excess propeller speed the drone will have to go higher than our goal to create a negative error.
  • 00:08:47
    This negative error when summed lowers the output of the integrator and slows the propellers down.
  • 00:08:54
    This overshooting of the goal might not be desired.
  • 00:08:58
    Luckily, there is a simple way around this problem
  • 00:09:01
    and that is by adding a path to our controller that can predict the future and
  • 00:09:06
    respond to how fast we're closing in on our goal. And we do that with a derivative. A
  • 00:09:12
    derivative produces a measure of the rate of change of the error that is how fast the error is growing or shrinking.
  • 00:09:20
    For example, if our drone is rising quickly and fast approaching our goal, this means that the error is quickly
  • 00:09:28
    decreasing. That decreasing error has a negative rate of change, which will produce a negative value through our derivative path.
  • 00:09:36
    That negative value will be added to our controllers output. Therefore
  • 00:09:40
    lowering the propeller speed.
  • 00:09:42
    Basically, our controller is using changing error to determine that we are closing in on our goal way too fast
  • 00:09:48
    and then prematurely slowing down the propeller speed,
  • 00:09:52
    preventing the drone from overshooting. And
  • 00:09:55
    just like that, we've created a PID controller
  • 00:10:00
    proportional integral derivative.
  • 00:10:02
    This is a versatile controller that uses the present error, the past error, and a prediction of the future error to calculate the appropriate
  • 00:10:11
    actuator commands. These three branches each contribute some amount to the overall output of the controller. And as the designer,
  • 00:10:19
    you get to decide how to weigh each contribution.
  • 00:10:22
    You do this by adjusting the game term in each branch.
  • 00:10:26
    This is called tuning the controller. Now if your controller contains all three branches, it's called a PID controller.
  • 00:10:33
    Now if the gain of one or more branch is set to zero taking it out of the equation,
  • 00:10:39
    then we typically refer to that controller with the letters of the remaining paths. For example API or
  • 00:10:46
    AP controller.
  • 00:10:47
    PID is just one form of a feedback controller, but they're pretty easy to understand and implement
  • 00:10:53
    They are the simplest controller you can have that uses the past present and future error.
  • 00:10:57
    And it's these primary features that are needed to satisfy most control problems. Not all but a lot of them.
  • 00:11:04
    That's why PID is the most prevalent form of feedback control for a wide range of real physical applications.
  • 00:11:10
    Now there's a lot more to learn on this topic and if you stick with this series
  • 00:11:14
    we're going to explore PID controllers in more detail. Now that we have a general understanding of what PID control is
  • 00:11:20
    we'll move on to how we implement one,
  • 00:11:23
    how we tune it to do what we want, and we'll watch it in action on some real hardware.
  • 00:11:28
    So if you don't want to miss these future Tech Talk videos, don't forget to subscribe to this channel
  • 00:11:32
    Also, if you want to check out my channel control system lectures, I cover more control theory topics there as well.
  • 00:11:38
    Thanks for watching and I'll see you next time.
الوسوم
  • PID control
  • control system
  • proportional
  • integral
  • derivative
  • feedback
  • control theory
  • steady-state error
  • controller tuning
  • MATLAB