编辑: You—灰機 | 2019-07-02 |
实验目的 1. 熟悉并掌握 MATLAB 的工作环境. 2. 了解 PID 控制技术的基本理论. 3. 在MATLAB 工作环境下,选择适当的例子,实现 PID 控制,讨论控 制效果. 二. 实验内容 This tutorial will show you the characteristics of the each of proportional (P), the integral (I), and the derivative (D) controls, and how to use them to obtain a desired response. In this tutorial, we will consider the following unity feedback system: Plant: A system to be controlled Controller: Provides the excitation for the plant;
Designed to control the overall system behavior The three The three The three The three- - - -term controller term controller term controller term controller The transfer function of the PID controller looks like the following: ? Kp = Proportional gain ? KI = Integral gain ? Kd = Derivative gain First, let'
s take a look at how the PID controller works in a closed-loop system using the schematic shown above. The variable (e) represents the tracking error, the difference between the desired input value (R) and the actual output (Y). This error signal (e) will be sent to the PID controller, and the controller computes both the derivative and the integral of this error signal. The signal (u) just past the controller is now equal to the proportional gain (Kp) times the magnitude of the error plus the integral gain (Ki) times the integral of the error plus the derivative gain (Kd) times the derivative of the error. This signal (u) will be sent to the plant, and the new output (Y) will be obtained. This new output (Y) will be sent back to the sensor again to find the new error signal (e). The controller takes this new error signal and computes its derivative and its integral again. This process goes on and on. The characteristics of P, I, and D controllers The characteristics of P, I, and D controllers The characteristics of P, I, and D controllers The characteristics of P, I, and D controllers A proportional controller (Kp) will have the effect of reducing the rise time and will reduce ,but never eliminate, the steady-state error. An integral control (Ki) will have the effect of eliminating the steady-state error, but it may make the transient response worse. A derivative control (Kd) will have the effect of increasing the stability of the system, reducing the overshoot, and improving the transient response. Effects of each of controllers Kp, Kd, and Ki on a closed-loop system are summarized in the table shown below. CL RESPONSE CL RESPONSE CL RESPONSE CL RESPONSE RISE TIME RISE TIME RISE TIME RISE TIME OVER OVER OVER OVERSHOOT SHOOT SHOOT SHOOT SETTLING TIME SETTLING TIME SETTLING TIME SETTLING TIME S S S S- - - -S ERROR S ERROR S ERROR S ERROR Kp Kp Kp Kp Decrease Increase Small Change Decrease Ki Ki Ki Ki Decrease Increase Increase Eliminate Kd Kd Kd Kd Small Change Decrease Decrease Small Change Note that these correlations may not be exactly accurate, because Kp, Ki, and Kd are dependent of each other. In fact, changing one of these variables can change the effect of the other two. For this reason, the table should only be used as a reference when you are determining the values for Ki, Kp and Kd. 三. 实验步骤 选择如下示例,按步骤进行试验: Example Problem Example Problem Example Problem Example Problem Suppose we have a simple mass, spring, and damper problem. The modeling equation of this system is (1) Taking the Laplace transform of the modeling equation (1) The transfer function between the displacement X(s) and the input F(s) then becomes Let ? M = 1kg ? b =