掌握 PID 调节: 综合指南

掌握 PID 调节: 综合指南

  1. PID知识整理

Achieving precision in PID tuning yields remarkable outcomes, such as increased system efficiency, responsiveness, and overall operational performance
实现PID调谐的精度可产生显著的效果,例如提高系统效率、响应能力和整体运行性能

PID调谐是控制系统的一个关键方面,影响着不同系统运营的性能和稳定性。通过调整比例、积分和微分常数,PID 控制器可最大限度地减少误差,并确保控制变量与动态系统变化保持一致。实现 PID 调谐的精度可产生显著的成果,例如提高系统效率、响应能力和整体运行性能。

  • - Adaptive Control 自适应控制

  • - Closed-Loop Control - 闭环控制

  • - Digital Fabrication - 数字制造

1. Introduction 1. 引言

PID tuning represents a pivotal process in control systems, dictating the performance and stability of systems across various industries - from HVAC control to drone navigation. A PID (Proportional, Integral, Derivative) controller’s responsibility lies in minimizing error by adjusting a control variable, such as the throttle of an engine or a heater’s power level. The art of PID tuning hinges on setting optimal values for the proportional, integral, and derivative constants, making the controller respond to the system’s dynamic changes. In this comprehensive guide, we will explore the concept of PID tuning, its relevant terms, the process and real life applications. By the end, you will gain a solid understanding of PID tuning and be equipped with the knowledge to apply it effectively in your control system endeavors.
PID调谐是控制系统中的一个关键过程,它决定了从空调控制到无人机导航等各个行业的系统的性能和稳定性。PID(比例、积分、微分)控制器的职责在于通过调整控制变量(例如发动机的节气门或加热器的功率水平)来最大限度地减少误差。PID调谐的艺术在于为比例常数、积分常数和微分常数设置最佳值,使控制器对系统的动态变化做出响应。在本综合指南中,我们将探讨PID调谐的概念、相关术语、过程和实际应用。最后,您将对PID调谐有深入的了解,并具备将其有效应用于控制系统工作的知识。

2. Understanding PID Control2. 了解PID控制

Central to various automated systems, PID control stands for Proportional, Integral, Derivative control. It’s a type of feedback controller, manipulating an input to a system to get the desired output. The mechanism involves monitoring the error signal, which is the difference between a setpoint and the measured variable. These components work in harmony to minimize error and optimize the control variable, allowing the system to achieve and maintain the desired setpoint.
PID控制是各种自动化系统的核心,代表比例、积分、微分控制。它是一种反馈控制器,操纵系统的输入以获得所需的输出。该机制涉及监测误差信号,即设定值与测量变量之间的差值。这些组件协同工作,以最大限度地减少误差并优化控制变量,使系统能够达到并保持所需的设定值。

The PID controller’s functionality revolves around three distinct parameters - Proportional, Integral, and Derivative. These parameters shape the controller output to drive the system towards the desired state. Each component corresponds to present, past, and future error values, providing a comprehensive control strategy.
PID 控制器的功能围绕三个不同的参数展开 - 比例、积分和微分。这些参数塑造控制器输出,以驱动系统达到所需状态。每个组件都对应当前、过去和未来的误差值,从而提供全面的控制策略。

Understanding each term’s workings in isolation is crucial to grasp the overall PID control mechanism. So, let’s delve into the specifics, starting with the Proportional term.
孤立地理解每个术语的工作原理对于掌握整体PID控制机制至关重要。因此,让我们深入研究细节,从比例项开始。

2.1. The Proportional Term 2.1. 比例项

The Proportional term in a PID controller, often signified by the gain Kp, directly influences the control effort in proportion to the error signal. If we denote the error as e(t), the control loop output from the proportional term can be represented as Kp*e(t).
PID控制器中的比例项(通常由增益Kp表示)直接影响与误差信号成正比的控制工作。如果我们将误差表示为 e(t),则比例项的控制环路输出可以表示为 Kp*e(t)

Consider a thermostat controlling room temperature. If the current room temperature deviates significantly from the setpoint, the error will be large. A high Kp value in this situation would result in a considerable change in heating or cooling power. Thus, the proportional control’s response is immediate but depends on the error magnitude.
考虑使用控制室温的恒温器。如果当前室温明显偏离设定值,则误差会很大。在这种情况下,高 Kp 值将导致加热或冷却功率发生相当大的变化。因此,比例控制的响应是即时的,但取决于误差幅度。

The balance is essential here; a small Kp may result in a sluggish system response, taking longer to reach the setpoint. In contrast, an excessively large Kp can cause a rapid response leading to overshoot and system instability. Therefore, finding an optimal Kp value is crucial to system performance. It’s here where the art and science of PID tuning come into play, setting the foundation for a system’s responsiveness.
在这里,平衡是必不可少的;较小的 Kp 可能会导致系统响应缓慢,需要更长的时间才能达到设定值。相反,过大的 Kp 会导致快速响应,从而导致过冲和系统不稳定。因此,找到最佳的 Kp 值对系统性能至关重要。正是在这里,PID调谐的艺术和科学开始发挥作用,为系统的响应能力奠定了基础。

2.2. The Integral Term 2.2. 积分项

The Integral component, denoted byKi, accumulates the error over time and, like the Proportional term, scales it. It has a significant role in eliminating the steady-state error, a constant difference that persists between the desired and actual system output even after the initial system response.
积分分量(用Ki 表示)会随着时间的推移累积误差,并且与比例项一样,对其进行缩放。它在消除稳态误差方面起着重要作用,稳态误差是即使在初始系统响应之后,期望输出和实际系统输出之间仍然存在的恒定差异。

Mathematically, the integral term is represented asKi ∫e(t)dt, where e(t) is the error at time t,Ki is the integral gain, and the integral symbol denotes the accumulation of the error over time. This integral sum continually increases as long as the error is present, driving the control output to minimize the error.
在数学上,积分项表示为Ki ∫e(t)dt,其中 e(t) 是时间 t 的误差,Ki 是积分增益,积分符号表示误差随时间的累积。只要存在误差,该积分总和就会不断增加,从而驱动控制输出以最小化误差。

Let’s revisit our thermostat example. Assume that the room temperature has stabilized at a value slightly below the setpoint. Despite the proportional component’s efforts, a small but consistent error persists - this is the steady-state error. The integral component, accumulating this error over time, amplifies the control output, nudging the system towards the setpoint.
让我们重温一下我们的恒温器示例。假设室温已稳定在略低于设定值的值。尽管比例分量做出了努力,但仍然存在一个小而一致的误差 - 这就是稳态误差。随着时间的流逝,该误差不断累积的积分放大了控制输出,将系统推向设定值。

The integral term can be both a savior and a challenge in PID control. While it is effective in eliminating steady-state errors, it can also introduce instability or oscillations due to excessive control loop action, especially in systems with slow dynamics. The integral component keeps accumulating error and can wind-up to large values during a large or prolonged error. This wind-up can lead to a significant overshoot when the error reduces. Hence, careful tuning of the integral gain,Ki, is crucial to balance system performance and stability.
积分项既可以是PID控制的救星,也可以是挑战。虽然它能有效消除稳态误差,但它也可能由于过度的控制回路动作而引入不稳定或振荡,尤其是在动态缓慢的系统中。积分组件不断累积误差,并且在较长时间或较大的误差期间可能会累积到较大的值。当误差减小时,这种缠绕可能会导致严重的过冲。因此,仔细调整积分增益Ki对于平衡系统性能和稳定性至关重要。

The PID controller’s functionality revolves around three distinct parameters - Proportional, Integral, and Derivative
PID 控制器的功能围绕三个不同的参数展开 - 比例、积分和微分

2.3. The Derivative Term 微分项

The Derivative term in a PID controller, denoted by Kd, responds to the rate of change of the error. This component brings a predictive aspect to the PID control strategy, allowing the controller to act before a significant error accumulates.
PID 控制器中的导数项(用 Kd 表示)响应误差的变化率。该组件为PID控制策略带来了预测方面,使控制器能够在重大误差累积之前采取行动。

Formally, the derivative control output can be represented as Kd * de(t)/dt, where de(t)/dt is the rate of change of the error at time t, and Kd is the derivative gain. As the derivative of the error, this term responds most strongly when the error is changing rapidly, thereby preventing large swings and reducing overshoot.
从形式上讲,导数控制输出可以表示为 Kd * de(t)/dt,其中de(t)/dt是时间 t 处误差的变化率,Kd 是导数增益。作为误差的导数,该项在误差快速变化时响应最强烈,从而防止了大摆动并减少了过冲。

Returning to the thermostat example, let’s imagine the room temperature is rapidly rising towards the setpoint due to a significant increase in heating power. The derivative action component, sensing this quick change, will start decreasing the control loop output even before the setpoint is reached. This dampens the system response and prevents a potential overshoot.
回到恒温器的例子,让我们想象一下,由于加热功率的显着增加,室温正在迅速上升到设定点。感应到这种快速变化的微分动作组件将在达到设定值之前开始降低控制环路输出。这抑制了系统响应并防止了潜在的过冲。

However, implementing derivative action control requires careful consideration. A high derivative gain can make the system sensitive to noise in the error signal, as the derivative term will amplify any rapid fluctuations. Moreover, in a system where the error changes slowly or not at all, the derivative term will be zero, making it ineffective in such situations.
但是,实施微分动作控制需要仔细考虑。高导数增益会使系统对误差信号中的噪声敏感,因为导数项会放大任何快速波动。此外,在误差变化缓慢或根本不变化的系统中,导数项将为零,因此在这种情况下无效。

Therefore, when tuning a PID controller, it’s essential to balance the effects of all three terms to ensure a stable, fast, and accurate system response.
因此,在调整 PID 控制器时,必须平衡所有三个项的影响,以确保稳定、快速和准确的系统响应。

*Recommended Reading: PID Loops: A Comprehensive Guide to Understanding and Implementation
推荐阅读:PID 回路:理解和实施的综合指南*

3. The Process of PID Tuning - PID调谐过程

PID tuning is an iterative process that adjusts the controller tuning parameters to optimize the system’s response. It involves modifying the gains of the proportional, integral, and derivative terms to achieve the desired system behavior. Depending on the specific application and system, the desired behavior might be fast response, minimal overshoot, or even steady-state accuracy.
PID调谐是一个迭代过程,用于调整控制器调谐参数以优化系统的响应。它涉及修改比例项、积分项和导数项的增益,以实现所需的系统行为。根据具体的应用和系统,所需的行为可能是快速响应、最小过冲,甚至是稳态精度。

PID tuning is a systematic process aimed at finding the optimal values for the proportional, integral, and derivative parameters of a PID controller tuning. The objective is to fine-tune these parameters to achieve the desired control system performance, including fast response, minimal overshoot, and robust stability. The process of PID tuning typically involves several steps.
PID 调谐是一个系统过程,旨在为 PID 控制器调谐的比例、积分和微分参数找到最佳值。目标是对这些参数进行微调,以实现所需的控制系统性能,包括快速响应、最小过冲和稳健的稳定性。PID调整过程通常涉及几个步骤。

First, an initial set of parameters is selected based on prior knowledge or best practices. Then, the system’s response to changes in setpoint or disturbances is observed and analyzed. If the response is not satisfactory, adjustments are made to the PID parameters.
首先,根据先验知识或最佳实践选择一组初始参数。然后,观察和分析系统对设定值变化或干扰的响应。如果响应不令人满意,则对PID参数进行调整。

There are various methods and techniques available for PID tuning, including manual tuning, Ziegler-Nichols method, and model-based approaches. These methods involve iteratively adjusting the parameters, observing the system’s response, and iteratively refining the parameters until the desired performance is achieved.
PID 调优有多种方法和技术,包括手动调优、Ziegler-Nichols 方法和基于模型的方法。这些方法包括迭代调整参数、观察系统响应以及迭代优化参数,直到达到所需的性能。

Three primary methods are used in PID tuning: auto-tuning, manual tuning, software-based tuning, and formal mathematical methods. Each has its advantages and applications, and the choice depends on the system complexity, the required accuracy, and the availability of system models and computing resources.
PID 调谐中使用三种主要方法:自动调谐、手动调谐、基于软件的调谐和正式的数学方法。每种方法都有其优点和应用,选择取决于系统的复杂性、所需的精度以及系统模型和计算资源的可用性。

3.1. Manual PID Tuning - 手动PID调谐-

Manual PID tuning involves adjusting the controller gains based on the observed system response and the tuner’s experience and knowledge. This method is often used when a mathematical model of the system is not available, or the system dynamics are too complex for analytical methods.
手动PID调谐涉及根据观察到的系统响应以及调谐器的经验和知识来调整控制器增益。当系统的数学模型不可用,或者系统动力学对于分析方法来说太复杂时,通常使用这种方法。

The typical process for manual tuning starts with setting all gains to zero. Then, the proportional gain (Kp) is slowly increased until the system begins to oscillate. This oscillation point indicates that the system is on the verge of instability, and the proportional gain at this point is recorded as Kp_critical.
手动调谐的典型过程从将所有增益设置为零开始。然后,比例增益 (Kp) 缓慢增加,直到系统开始振荡。该振荡点表示系统处于不稳定的边缘,此时的比例增益记录为Kp_critical

Next, the integral (Ki) and derivative (Kd) gains are introduced. The integral gain is increased until any steady-state error is eliminated, while ensuring the system doesn’t become unstable. Similarly, the derivative gain is adjusted to prevent overshoot and reduce the settling time.
接下来,调整积分(Ki)和导数(Kd)增益。积分增益逐渐增加,直到消除任何稳态误差,同时确保系统不会变得不稳定。同样,对微分增益进行调整,以防止过冲并缩短稳定时间。

It’s important to note that manual tuning requires a delicate balance and a deep understanding of the system. It may not be suitable for systems with nonlinear dynamics or where high precision is required.
需要注意的是,手动调优需要微妙的平衡和对系统的深刻理解。它可能不适用于具有非线性动力学或需要高精度的系统。

3.2. Automated PID Tuning - 自动PID调谐

Automated PID tuning, as the name suggests, is a process where the tuning of the PID controller parameters is done automatically using software algorithms. These methods are more precise and less labor-intensive than manual tuning and are preferred when a mathematical model of the system is available or can be derived.
顾名思义,自动 PID 调谐是使用软件算法自动完成 PID 控制器参数调谐的过程。与手动调优相比,这些方法更精确,劳动强度更低,并且在系统数学模型可用或可以推导时是首选。

Auto-tuning techniques use the system’s response to a specific input, such as a step or impulse, to estimate the system’s parameters. These parameters are then used to calculate the optimal PID gains. Various algorithms can be used for automated PID tuning, including the Ziegler-Nichols method, the Cohen-Coon method, and various optimization algorithms.
自动调谐技术使用系统对特定输入(如步进或脉冲)的响应来估计系统的参数。然后使用这些参数来计算最佳PID增益。各种算法可用于自动 PID 调谐,包括 Ziegler-Nichols 方法、Cohen-Coon 方法和各种优化算法。

The Ziegler-Nichols method is one of the most commonly used automated PID tuning methods. The method consists of two steps: first, the critical gain and critical period of the system are determined, and then these values are used to calculate the PID gains using empirically derived formulas. Although the Ziegler-Nichols method can provide a good starting point, it tends to result in aggressive control action, leading to a system response with substantial overshoot.
Ziegler-Nichols 方法是最常用的自动 PID 调谐方法之一。该方法包括两个步骤:首先,确定系统的临界增益和临界周期,然后使用这些值使用经验推导的公式计算PID增益。尽管 Ziegler-Nichols 方法可以提供一个很好的起点,但它往往会导致激进的控制操作,导致系统响应具有大量超调。

Another automated tuning method is the Cohen-Coon method, which is primarily used for processes with long time delays. This method involves applying a step change to the system and observing the system’s response. From this response, the controller’s process reaction curve is derived, which is used to calculate the PID gains.
另一种自动调优方法是 Cohen-Coon 方法,它主要用于具有较长时间延迟的进程。此方法涉及对系统应用阶跃更改并观察系统的响应。从该响应中推导出控制器的过程反应曲线,用于计算PID增益。

Optimization algorithms such as genetic algorithms, particle swarm optimization, and simulated annealing can also be used for automated PID tuning. These methods treat the tuning process as an optimization problem, where the objective is to find the set of PID gains that minimize a certain performance index. This index is usually a measure of the system’s transient and steady-state errors.
遗传算法、粒子群优化和模拟退火等优化算法也可用于自动 PID 调谐。这些方法将调优过程视为一个优化问题,其目标是找到最小化某个性能指标的 PID 增益集。该指数通常是衡量系统瞬态和稳态误差的指标。

It should be noted that each auto-tuning method has its strengths and weaknesses, and the best method depends on the specifics of the system and application. Automated tuning methods also require a higher level of expertise to implement and interpret, compared to manual tuning.
需要注意的是,每种自动调谐方法都有其优点和缺点,最佳方法取决于系统和应用的具体情况。与手动调优相比,自动调优方法还需要更高水平的专业知识来实施和解释。

*Recommended Reading: Fine-tuning device performance with swarms of swimming cells
推荐阅读:用成群的游泳细胞微调设备性能*

4. Advanced PID Tuning Techniques - 先进的PID调谐技术

As one gains expertise and deeper understanding of the PID control system, advanced tuning techniques may be employed to enhance system performance. These techniques offer an improved level of control, helping to minimize system errors and optimize efficiency.
随着对PID控制系统的专业知识和深入理解,可以采用先进的调谐技术来提高系统性能。这些技术提供了更高的控制水平,有助于最大限度地减少系统错误并优化效率。

One such technique is the implementation of gain scheduling. Gain scheduling is a method in which PID parameters are adjusted in real-time based on the current state of the system. This approach is especially useful in non-linear systems where system dynamics change with operating conditions. For example, an unmanned aerial vehicle (UAV) adjusting its PID gains for altitude control depending on whether it’s ascending, hovering, or descending.
其中一种技术是增益调度的实现。增益调度是一种根据系统的当前状态实时调整PID参数的方法。这种方法在非线性系统中特别有用,因为系统动力学会随着工作条件而变化。例如,无人驾驶飞行器 (UAV) 根据其上升、悬停或下降来调整其 PID 增益以进行高度控制。

Adaptive control is another advanced tuning method. It differs from gain scheduling in that it can adjust controller tuning parameters on the fly without needing predefined states or conditions. The adaptive controller uses real-time data and a control algorithm to adjust the PID parameters as the system operates. This technique is powerful but also more complex to implement, and it requires a robust model of the system to be controlled.
自适应控制是另一种高级调谐方法。它与增益调度的不同之处在于,它可以动态调整控制器调谐参数,而无需预定义的状态或条件。自适应控制器使用实时数据和控制算法在系统运行时调整PID参数。这种技术功能强大,但实现起来也更复杂,并且需要一个强大的系统模型来控制。

Yet another advanced technique is the use of robust control strategies. Robust control aims to achieve good performance over a wide range of system conditions and is particularly useful in systems with uncertain parameters or external disturbances. The H-infinity method is a common robust control technique used for PID controllers.
另一种先进的技术是使用强大的控制策略。鲁棒控制旨在在各种系统条件下实现良好的性能,在参数不确定或外部干扰的系统中特别有用。H-infinity 方法是一种常用的用于 PID 控制器的鲁棒控制技术。

In model predictive control (MPC), a model of the system is used to predict the future output. The PID parameters are then adjusted to minimize the difference between the predicted output and the desired output over a certain future time horizon. The advantage of MPC is that it can handle multi-input, multi-output systems and constraints on the system inputs and outputs. However, the implementation of MPC requires significant computational resources and a good model of the system.
在模型预测控制 (MPC) 中,系统模型用于预测未来的输出。然后调整PID参数,以在一定的未来时间范围内将预测输出与所需输出之间的差异降至最低。MPC的优点是它可以处理多输入、多输出系统以及对系统输入和输出的约束。然而,MPC的实现需要大量的计算资源和良好的系统模型。

Lastly, the optimal control technique seeks to optimize a certain performance index, such as energy consumption or error minimization. This technique requires the formulation of a cost function that quantifies the performance index and the use of optimization algorithms to find the PID parameters that minimize this cost function.
最后,最优控制技术寻求优化某个性能指标,例如能耗或误差最小化。该技术需要制定一个量化性能指数的成本函数,并使用优化算法来找到最小化该成本函数的 PID 参数。

与手动调优相比,自动调优方法还需要更高水平的专业知识来实施和解释

5. Application Examples of PID Tuning - PID调谐应用实例

PID controllers find extensive use in various industrial processes, robotics, and even everyday electronics. The principles of PID tuning are applicable across a diverse range of systems, adjusting to specific needs and requirements. Here are a few illustrative examples.
PID 控制器广泛用于各种工业过程、机器人甚至日常电子产品。PID调谐的原理适用于各种系统,可根据特定需求和要求进行调整。这里有一些说明性的例子。

Cruise Control in Automobiles: A modern automobile uses a PID controller for its cruise control system. The desired speed set by the driver is the setpoint. The car’s current speed, read from the speedometer, is the process variable. The PID controller manipulates the throttle position to maintain the set speed. Advanced tuning techniques are applied to account for varying conditions such as road gradient or load changes (like climbing a hill or overtaking).
汽车中的巡航控制:现代汽车将 PID 控制器用于其巡航控制系统。驾驶员设定的所需速度是设定值。从车速表读取的汽车当前速度是过程变量。PID 控制器操纵油门位置以保持设定速度。应用高级调校技术来考虑不同的条件,例如道路坡度或负载变化(如爬坡或超车)。

Temperature Control in Industrial Processes: Many industrial processes require maintaining a specific temperature. For example, in a chemical reactor, maintaining temperature within a specified range is critical for reaction efficiency and safety. A PID controller uses temperature readings from a sensor as the process variable and manipulates the heating element to maintain the desired temperature setpoint. Over time, the system might need tuning to respond to changes such as wear on the heating element or variations in ambient temperature.
工业过程中的温度控制:许多工业过程需要保持特定的温度。例如,在化学反应器中,将温度保持在指定范围内对于反应效率和安全性至关重要。PID控制器使用来自传感器的温度读数作为过程变量,并操纵加热元件以保持所需的温度设定值。随着时间的推移,系统可能需要调整以应对变化,例如加热元件的磨损或环境温度的变化。

Drone Flight Stabilization: Drones rely on PID controllers for stabilizing their flight. The drone’s inertial measurement unit provides data on its current orientation (the process variable), which the PID controller compares to the desired orientation (the setpoint). The controller then adjusts the speed of the drone’s motors to correct any deviation. Tuning the PID controller in a drone is a complex task due to the non-linear nature of the system and the presence of external disturbances such as wind.
无人机飞行稳定:无人机依靠 PID 控制器来稳定飞行。无人机的惯性测量单元提供有关其当前方向(过程变量)的数据,PID 控制器将其与所需方向(设定值)进行比较。然后,控制器调整无人机电机的速度以纠正任何偏差。由于系统的非线性性质以及风等外部干扰的存在,在无人机中调整 PID 控制器是一项复杂的任务。

Industrial Robotics: PID controllers are extensively used in industrial robotics, for example, to control the position of a robotic arm. The controller takes the current position of the arm as the process variable and compares it with the desired position (setpoint). The controller then manipulates the motor torques to move the arm to the desired position. PID tuning in this context can be challenging due to the multi-joint nature of robotic arms and the need for precise positioning.
工业机器人:PID控制器广泛用于工业机器人,例如,控制机械臂的位置。控制器将机械臂的当前位置作为过程变量,并将其与所需位置(设定值)进行比较。然后,控制器操纵电机扭矩将手臂移动到所需位置。在这种情况下,由于机械臂的多关节性质和对精确定位的需求,PID调整可能具有挑战性。

In each of these applications, PID tuning is essential to ensure efficient, accurate, and safe operation of the system. Advanced tuning techniques, including those discussed earlier, can be used to enhance system performance under varying operating conditions and requirements.
在每一种应用中,PID调谐对于确保系统的高效、准确和安全运行至关重要。先进的调谐技术,包括前面讨论的技术,可用于在不同的操作条件和要求下提高系统性能。

6. Common Pitfalls and How to Avoid Them - 常见陷阱以及如何避免它们

PID tuning is often considered more of an art than a science, mainly because of the trial and error involved and the need for expertise to understand how each term interacts with the others. A wide range of pitfalls can occur during the PID tuning process. By understanding these potential pitfalls, you can effectively avoid them or mitigate their impacts.
PID 调谐通常被认为是一门艺术而不是一门科学,主要是因为涉及反复试验以及需要专业知识来了解每个术语如何与其他术语相互作用。在PID调整过程中可能会出现各种各样的陷阱。通过了解这些潜在的陷阱,您可以有效地避免它们或减轻它们的影响。

Tuning without Understanding the System: One of the most common mistakes in PID tuning is not fully understanding the dynamics of the system being controlled. Different systems will respond differently to changes in the PID controller’s settings, and without a solid grasp of these dynamics, effective tuning can be challenging. Therefore, before starting the tuning process, it is advisable to perform a thorough analysis of the system, identifying its dynamics, response times, and stability conditions.
在不了解系统的情况下进行调谐:PID调谐中最常见的错误之一是没有完全了解被控制系统的动态。不同的系统对 PID 控制器设置的变化会做出不同的响应,如果没有对这些动态的扎实掌握,有效的调谐可能具有挑战性。因此,在开始调整过程之前,建议对系统进行彻底分析,确定其动态、响应时间和稳定性条件。

Over-Reliance on the Proportional Term: It’s a common misstep to over-rely on the proportional term to do the heavy lifting. Over-tuning the proportional term can lead to large oscillations and instability. A high proportional gain can cause the system to react aggressively to errors, leading to overshoot and oscillation about the setpoint. Balancing the use of all three terms – proportional, integral, and derivative – is crucial for stability and optimum performance.
过度依赖比例项:过度依赖比例项来完成繁重的工作是一种常见的失误。过度调整比例项会导致较大的振荡和不稳定。高比例增益会导致系统对误差做出积极反应,导致过冲和围绕设定点的振荡。平衡所有三个术语(比例、积分和导数)的使用对于稳定性和最佳性能至关重要。

Ignoring the Derivative Term: The derivative term is often misunderstood or ignored due to its dependence on the rate of change of the error. It can introduce noise amplification in the presence of measurement noise, leading many to avoid using it. However, a well-tuned derivative term can improve the transient response and stability of the system, reducing overshoot and settling time. Proper filtering techniques can be used to mitigate the effects of noise.
忽略导数项:导数项经常被误解或忽略,因为它依赖于误差的变化率。它可以在存在测量噪声的情况下引入噪声放大,导致许多人避免使用它。然而,经过良好调整的导数项可以改善系统的瞬态响应和稳定性,减少过冲和建立时间。可以使用适当的滤波技术来减轻噪声的影响。

Neglecting Controller Saturation: Controller saturation occurs when the controller output exceeds its maximum or minimum limit. This often happens when high gain values are used, or when a large disturbance pushes the controller beyond its limits. Saturation can cause integral windup, where the integral term accumulates a large error during the saturation period and causes an overshoot when the controller comes out of saturation. Anti-windup strategies, such as clamping or back calculation, can be employed to handle integral windup.
忽略控制器饱和度:当控制器输出超过其最大或最小限制时,就会发生控制器饱和。当使用高增益值时,或者当大干扰将控制器推到超出其极限时,通常会发生这种情况。饱和会导致积分结束,其中积分项在饱和期间累积了较大的误差,并在控制器脱离饱和时导致过冲。可以采用防清盘策略,例如钳位或反向计算,以处理整体清盘。

Not Accounting for Nonlinearities: PID controllers are based on linear control theory, but many real-world systems exhibit non-linear behavior. For such systems, PID controllers may not perform optimally across the full operating range. Gain scheduling is a technique commonly used to overcome this problem, where different sets of PID parameters are used at different operating points.
不考虑非线性:PID控制器基于线性控制理论,但许多实际系统表现出非线性行为。对于此类系统,PID控制器可能无法在整个工作范围内发挥最佳性能。增益调度是解决此问题的常用技术,在不同的工作点使用不同的PID参数集。

7. Conclusion - 结论

PID tuning is a pivotal process in control engineering, and its role can’t be overemphasized in creating efficient and responsive systems. While it might seem daunting due to the complexity and interaction between the proportional, integral, and derivative terms, a structured approach to tuning, as outlined, makes it manageable.
PID调谐是控制工程中的关键过程,在创建高效且响应迅速的系统方面,其作用怎么强调都不为过。虽然由于比例项、积分项和导数项之间的复杂性和相互作用,它可能看起来令人生畏,但如上所述,结构化的调整方法使其易于管理。

A solid understanding of the control system is the foundation for successful PID tuning. With this understanding, an engineer can then methodically adjust the controller tuning parameters, observing system behavior and making incremental changes until an optimal response is achieved. Advanced tuning techniques, such as gain scheduling and anti-windup strategies, add layers of sophistication to cope with non-linear behavior and controller saturation.
对控制系统的深刻理解是成功进行PID调整的基础。有了这种理解,工程师就可以有条不紊地调整控制器调谐参数,观察系统行为并进行增量更改,直到实现最佳响应。增益调度和抗缠绕策略等高级调谐技术增加了应对非线性行为和控制器饱和的复杂性。

The lessons learned from real-world applications of PID tuning provide invaluable insights for addressing similar challenges. From maintaining a steady temperature in a furnace to achieving stable altitude control in a drone, the principles of PID tuning find universal application.
从PID调谐的实际应用中吸取的经验教训为应对类似挑战提供了宝贵的见解。从在炉子中保持稳定的温度到在无人机中实现稳定的高度控制,PID调谐的原理得到了普遍应用。

Awareness of common pitfalls and their solutions is another cornerstone for effective PID tuning. Avoiding mistakes such as over-reliance on the proportional term, ignoring the derivative term, neglecting controller saturation, and not accounting for non-linearities can significantly improve the PID tuning process.
了解常见陷阱及其解决方案是有效PID调整的另一个基石。避免过度依赖比例项、忽略导数项、忽略控制器饱和度以及不考虑非线性等错误,可以显著改善 PID 调谐过程。

8. Frequently Asked Questions (FAQs) -. 常见问题 (FAQ)

*Q. What is PID Tuning?
Q.什么是PID调谐?*

PID tuning is the process of finding the optimal parameters (proportional, integral, and derivative gains) for a PID controller to achieve desired system behavior.
PID 调谐是为 PID 控制器寻找最佳参数(比例增益、积分增益和微分增益)以实现所需系统行为的过程。

Q. Why is PID Tuning important?
Q.为什么 PID 调谐很重要?

PID tuning is critical in control systems to ensure that the system responds quickly and accurately to changes in the input or disturbances. Improperly tuned systems can be slow to respond, overshoot their target, or even become unstable.
PID调谐在控制系统中至关重要,以确保系统快速准确地响应输入或干扰的变化。调整不当的系统可能会响应缓慢、超过目标,甚至变得不稳定。

Q. What are the steps in PID tuning?
Q.PID调谐的步骤是什么?

The steps involve understanding the system dynamics, starting with default or small PID values, gradually increasing proportional gain until the system starts to oscillate, then adjusting the integral gain to reduce steady-state error, and finally tuning the derivative gain to dampen overshoot.
这些步骤包括了解系统动态,从默认值或小PID值开始,逐渐增加比例增益,直到系统开始振荡,然后调整积分增益以减少稳态误差,最后调整微分增益以抑制过冲。

Q. What is controller saturation and how can it be avoided?
Q.什么是控制器饱和,如何避免饱和?

Controller saturation occurs when the PID controller output exceeds its maximum or minimum limit. This can be avoided by using anti-windup strategies, such as clamping or back calculation, which help to handle the accumulation of error (windup) in the integral term during saturation.
当 PID 控制器输出超过其最大或最小限制时,会发生控制器饱和。这可以通过使用防缠绕策略来避免,例如钳位或反向计算,这有助于处理饱和期间积分项中误差的累积(缠绕)。

Q. What is gain scheduling?
Q.什么是增益调度?

Gain scheduling is a method used for controlling non-linear systems, where different sets of PID parameters are used at different operating points. It helps overcome the limitations of PID controllers when dealing with non-linear behavior across the full operating range.
增益调度是一种用于控制非线性系统的方法,其中在不同的工作点使用不同的PID参数集。它有助于克服PID控制器在整个工作范围内处理非线性行为时的局限性。

References: 引用:

https://realpars.com/pid-tuning/

https://www.mathworks.com/discovery/pid-tuning.html

https://www.omega.co.uk/prodinfo/how-to-tune-a-pid-controller.html

https://www.incatools.com/pid-tuning/pid-tuning-methods/

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/pingmian/45418.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

C语言从头学31——与字符串变量相关的几个函数

strlen、strcpy、strcat、strcmp、sprintf这些函数都是与字符串相关的,除了sprintf是定义在stdio.h中外,其余几个都定义在string.h中,比较新的编译器版本stdio.h中已经含有string.h的内容,所以编程时不需要再包含string.h这个头文…

C++技能基础:提升C++程序运行效率的方法总结

以下是一些编程方面的建议,目的是为了提升C程序的效率(这里的效率以时间为评判标准),欢迎指正和补充 场景:当设计方法时,将方法设计成值传递还是引用或者指针传递建议:当变量所占内存大小与指针…

电路怎么编程:探索电子世界的编程奥秘

电路怎么编程:探索电子世界的编程奥秘 在电子技术的世界里,电路编程是一项既神秘又充满挑战的任务。它涉及到对电子元件和电路逻辑的深入理解,以及将复杂的思想转化为可执行的代码。那么,电路到底是如何进行编程的呢?…

SpringBoot整合XXL_JOB示例

XXL-JOB 是一个分布式任务调度平台,主要用于管理和执行定时任务。它适用于各种场景,例如定时任务、批处理任务、分布式任务等。XXL-JOB 提供了丰富的功能,使得任务调度变得简单、高效和可靠。以下是 XXL-JOB 的一些主要功能和特点&#xff1a…

暑假第一次作业

第一步:给R1,R2,R3,R4配IP [R1-GigabitEthernet0/0/0]ip address 192.168.1.1 24 [R1-Serial4/0/0]ip address 15.0.0.1 24 [R2-GigabitEthernet0/0/0]ip address 192.168.2.1 24 [R2-Serial4/0/0]ip address 25.0.0.1 24 [R3-GigabitEthernet0/0/0]ip address 192.…

程序员标准简历模板

链接: https://pan.baidu.com/s/1yMXGSSNba15b9hMXjA39aA?pwdb4ev 提取码: b4ev 3年工作经验简历 链接: https://pan.baidu.com/s/1OO7n1lRL6AkhejxYC9IyDA?pwdfmvv 提取码: fmvv 优秀学员简历 链接: https://pan.baidu.com/s/106Vkw_ulOInI47_5mDySSg?pwduudc 提取码: uu

Spring Expression表达式使用

Spring Expression 简介 Spring Expression Language(简称 “SpEL”)是一种功能强大的表达式语言,支持在运行时查询和操作对象图。其中最显著的是:方法调用和基本的字符串模板功能。 虽然SpEL是Spring产品组合中表达式评估的基础…

微信公众号注册流程

注册指引 官网 https://mp.weixin.qq.com/ 服务号/订阅号 微信官方注册流程 https://kf.qq.com/touch/faq/150804UVr222150804quq6B7.html?platform15

四个“一体化”——构建数智融合时代下的一站式大数据平台

随着智能化技术的飞速发展,尤其是以生成式AI为代表的技术快速应用,推动了数据与智能的深化融合,给数据基础设施带来了新的变革和挑战。如何简化日益复杂的系统架构,提高数据处理效率,降低开发运维成本,促进…

常用3D建模软件有哪些?如何实现3D模型在线预览?

3D建模是指使用计算机软件或其他工具创建三维物体模型的过程。3D建模大概可分为NURBS和多边形网格两类。NURBS对要求精细、弹性与复杂的模型有较好的应用,适合量化生产用途;多边形网格建模则靠拉面方式,适合做效果图与复杂场景动画。建模方法…

tomcat的介绍与优化

tomcat介绍 tomcat和php一样,都是用来处理动态页面的。 tomcat也可以作为web应用服务器,开源的。 php .php tomcat .jsp nginx .html tomcat 是用java代码写的程序,运行的是javaweb应用程序 tomcat的特点和功能: 1.servlet容器…

木舟0基础学习Java的第十六天(异常,分类,自定义异常,注意事项)

异常 异常概述:异常是Java程序运行过程中出现的错误 异常分类:API查找Throwable 1.Error(服务器宕机,数据库崩溃等) 2.Exception C(异常的继承体系)API查RuntimeException 运行时异常:一般是程序员的错误异常可以让我们发现错…

算法力扣刷题记录 三十七【二叉树层序遍历】

前言 二叉树递归遍历和二叉树迭代遍历 实现的前中后序遍历都归类深度搜索; 广度搜索如何实现?一层结束,再继续下一层搜索:层序遍历。 一、题目阅读 【102.二叉树的层序遍历】 给你二叉树的根节点 root ,返回其节点值…

自然语言生成(NLG)- Transformer教程

近年来,自然语言生成(Natural Language Generation,NLG)技术的发展可谓是日新月异,而其中的核心技术之一便是Transformer。作为一种革命性的深度学习模型,Transformer改变了传统的自然语言处理(…

Linux 关闭某个服务失败处理方法

在linux服务器上当我准备关闭Java应用程序时,出现下列错误: [rootVM-32-25-centos ~]# service eposGatewayService stop Application is running as root (UID 0). This is considered insecure. Unable to kill process 7080 如果不想重启主机&#…

如何在iPhone上恢复图片?5 个有效解决方案

对于许多iPhone用户来说,照片是存储在他们设备上的最重要的数据,因此丢失这些照片可能是一场灾难。 但是,即使您不小心删除了iPhone上的部分或全部图片,也可以将其取回。 我们将讨论如何在有或没有备份的情况下在iPhone上恢复已…

面试篇-Mysql-2+事务隔离级别的实现

文章目录 前言一、Mysql 的事务你了解吗二、你了解Mysql 的事务隔离级别吗:2.1 你知道Mysql 的脏读,不可重复读,幻读的问题吗:2.1.1 脏读:2.1.2 不可重复读:2.1.3 幻读: 2.2 对于并发场景下的脏…

Python使用策略模式和openpyxl库创建Excel文件并追加内容

from openpyxl import load_workbook# 数据数组 data [[1, 2, 3],[4, 5, 6],[7, 8, 9] ]# 打开现有的 Excel 文件 excel_file sheetApend_example.xlsx wb load_workbook(excel_file)# 选择要追加数据的工作表 sheet_name test_Sheet2 # 指定要追加数据的工作表名称 sheet…

用虚拟机,可以在x86的电脑上虚拟出arm的电脑吗

1.用虚拟机,可以在x86的电脑上虚拟出arm的电脑吗 是的,可以在x86的电脑上使用虚拟机技术虚拟出ARM架构的电脑。以下是通过虚拟机实现x86电脑上虚拟ARM电脑的几个关键步骤: 选择合适的虚拟化软件:通常,你可以使用如QE…

AI Agent满级进化!骑马种田、办公修图,样样精通,昆仑万维等发布通用Agent新框架

【导读】智能体又双叒叕进化了!这次,什么游戏都能玩,什么软件都能操控了。 近日,昆仑万维携手北京智源人工智能研究院、新加坡南洋理工大学、北京大学等顶尖名校机构,联合提出了迄今为止第一个既能玩多种商业游戏又能…