PID 控制实验 - 整定实验

news2024/11/27 22:25:32

Arduino PID

  • Arduino-PID-Library
  • Arduino-PID-AutoTune-Library

PID控制实验 – 制作测试台

PID Control Experiment – Making the Testing Rig
在这里插入图片描述

PID (Proportional, Integral, Derivative) control is a classic control algorithm that I have used for a few projects, ending with ‘good enough’ control, without really spending time learning how to properly tune the PID constants.
PID(Proportional, Integral, Derivative)控制是我用于一些项目的经典控制算法,以“足够好”的控制结束,而没有真正花时间学习如何正确调整 PID 常数。

Time for me to fill in the gap in my knowledge, so in this two part blog I want to capture my learning. Hopefully it is useful for someone else. In this first part I will document the learning and testing rig and software. The next part will be about tuning the control loop.
是时候填补我的知识空白了,所以在这个由两部分组成的博客中,我想捕捉我的学习成果。希望它对其他人有用。在第一部分中,我将记录学习和测试设备及软件。下一部分将是关于调整控制环路的。

Principles of Control 控制原则

Any feedback control loop basically works like the diagram below
任何反馈控制回路基本上都如下图所示

PID_FC_Controller

The Set Point (SP) is the value that we want the process to be. The controller compares the SP with the actual value of the Process Variable (PV). If SP = PV the controller doesn’t have to do anything and it will maintain the Controller Output (CO) at the current level (or set it to zero).
设定点 (SP) 是我们希望过程达到的值。控制器将 SP 与过程变量 (PV) 的实际值进行比较。如果 SP = PV,则控制器无需执行任何操作,它将控制器输出 (CO) 保持在当前水平(或将其设置为零)。

If SP ≠ PV, this is expressed as an error or deviation and needs corrective action. This action takes place in the Controller, which changes the CO until SP = CV again. If a disturbance (like a change in SP, or an external event) occurs the controller has to work it out all over again. In practice the control loop operates continuously to fine tune the CO.
如果 SP ≠ PV,则表示为错误或偏差,需要采取纠正措施。此操作在控制器中发生,该控制器会更改 CO,直到再次更改 SP = CV。如果发生干扰(如 SP 的变化或外部事件),控制器必须重新解决。在实践中,控制回路连续运行以微调 CO。

Test Rig System Design 试验台系统设计

The description above implies the testing rig needs to have certain characteristics to provide a valid learning platform:
上述描述意味着测试设备需要具有某些特性才能提供有效的学习平台:

  1. A repeatable process. Doing the same thing will result in the same system response, allowing it to be controlled.
    一个可重复的过程。做同样的事情将导致相同的系统响应,允许它被控制。
  2. Allow the creation of system disturbance to test the control response.
    允许创建系统扰动以测试控制响应。
  3. Be cheap, simple and easy to build.
    便宜、简单且易于构建。
  4. As this is an Arduino project, be suitable for digital control.
    由于这是一个Arduino项目,因此适合数字控制。

Somewhere in my web browsing I had come across an idea for a project that seemed to suit this application. The project involved a fan blowing into a vertical clear plastic pipe from below to keep a table tennis ball at a set height in the pipe.
在我的网页浏览中,我遇到了一个似乎适合此应用程序的项目的想法。该项目涉及一个风扇从下方吹入垂直的透明塑料管,以将乒乓球保持在管道中的设定高度。

Providing the ball is a loose fit in the tube, this arrangement is inherently unstable and will cause it’s own disturbance. Also, the ball ‘floats’ because of the fan air pressure below and I would expect that the higher it would go up the tube the more unstable it would be (which was found to be true in practice).
如果球在管子中是松散的,这种布置本质上是不稳定的,并且会引起它自身的干扰。此外,由于下方的风扇气压,球会“漂浮”,我预计球在管子上的上升幅度越高,它就越不稳定(这在实践中被发现是正确的)。

PID_FC_Block_Diagram

The control feedback is a simple distance measurement and the control output is a signal for fan speed, both of which are eminently doable with an Arduino Uno processor.
控制反馈是一个简单的距离测量,控制输出是风扇速度的信号,这两者都非常适合使用 Arduino Uno 处理器。

The block diagram for the system is shown on the right. Except for the tube, all the other materials were already at hand. A table tennis ball had a 40mm diameter and standard tube is available with 45mm internal diameter – perfect!
系统的框图如右图所示。除了管子,所有其他材料都已经手头了。乒乓球的直径为 40 毫米,标准管的内径为 45 毫米——完美!

The ultrasonic sensor is a very cheap and commonly available SR-04. The fan was a small 24V laptop cooling fan I salvaged some time ago.
超声波传感器是一种非常便宜且常用的 SR-04。风扇是我前段时间打捞的小型 24V 笔记本电脑冷却风扇。

The L293D motor controller was from my parts stock. It simplifies the design of the hardware as it has built-in motor output diodes. An alternative is a transistor or MOSFET based switching circuit.
L293D 电机控制器来自我的零件库存。它简化了硬件的设计,因为它具有内置的电机输出二极管。另一种选择是基于晶体管或MOSFET的开关电路。

Making the Test Rig 制作测试台

The stand for the equipment was made from wood and plywood scraps, glued and screwed. construction is self-explanatory by looking at the pictures below – not pretty but it works.
设备的支架由木材和胶合板废料制成,经过胶合和拧紧。通过查看下面的图片,建筑是不言自明的——虽然不漂亮,但它有效。

No dimensions are critical except for the distance between the top of the tube and the sensor. The sensor has to be far enough not to block airflow out of the tube, which stops the ball from rising, and close enough that the ultrasonic ‘pings’ go into the tube and don’t hit the top rim. Some trial and error found a sweet spot that worked.
除了管子顶部和传感器之间的距离外,没有尺寸是关键的。传感器必须足够远,以免阻挡气流从管子中流出,从而阻止球上升,并且必须足够近,以便超声波“砰砰”声进入管子并且不会撞击顶部边缘。经过反复试验,我们发现了一个有效的最佳点。

在这里插入图片描述

img

img

img

PID_FC_L293D

The L293D is wired as per the diagram on the left. In the photo this IC is on the mini-breadboard. The L293D direction controls I1 and I2 are connected to 5V and GND as the fan is not reversible. The Arduino PWM (Control Output) pin is connected to the enable pin to provide the required fan speed control. The 5V power supply for the control circuit comes from the USB interface on the Arduino. The 24V motor supply is from a bench top power supply.
L293D 的接线如左图所示。在照片中,该IC位于迷你面包板上。L293D 方向控制器 I1 和 I2 连接到 5V 和 GND,因为风扇是不可逆的。Arduino PWM(控制输出)引脚连接到使能引脚,以提供所需的风扇速度控制。控制电路的5V电源来自Arduino上的USB接口。24V电机电源来自台式电源。

Control Software 控制软件

Finally, the control sketch needs to do a few things other than just run the PID control.
最后,控制草图需要做一些事情,而不仅仅是运行 PID 控制。

  • To make this an effective learning rig, the PID constants and the set point should be editable without recompiling and downloading application.
    为了使它成为一个有效的学习设备,PID常数和设定点应该是可编辑的,而无需重新编译和下载应用程序。
  • The software should log data to the Serial Monitor so that it can be graphed offline or charted with the Arduino IDE Serial Plotter. This should be controllable (on/off) as there is likely to be a lot of data.
    该软件应将数据记录到串行监视器中,以便可以离线绘制数据或使用 Arduino IDE 串行绘图仪绘制数据。这应该是可控的(开/关),因为可能会有大量数据。
  • Once optimized, PID parameters can be saved to EEPROM and will be reloaded at the next system restart.
    经过优化后,PID参数可以保存到EEPROM中,并在下次系统重启时重新加载。

The LCD display and the rotary encoder implement a user interface for a menu options that allow the online changes required.
LCD 显示屏和旋转编码器实现了菜单选项的用户界面,允许进行所需的在线更改。

The full sketch is available from my code repository.
完整的草图可从我的代码库中找到。

下面,该设备将用于实验。

PID 控制实验 - 整定

Arduino — PID Control Experiment – Tuning the Controller)

PID(比例、积分、微分)控制是一种经典的控制算法,我曾在几个项目中使用过这种算法,但都以 "足够好 "的控制而告终,并没有真正花时间学习如何正确调整 PID 常量。 是时候填补我的知识空白了,所以在这篇分为两部分的博客中,我希望 […]

PID_FC

In the first part of this blog I described building a test apparatus that allows me to experiment with tuning a PID loop controlling a levitating pin pong ball in a tube.
在本博客的第一部分,我介绍了如何构建一个测试设备,该设备使我能够试验调整PID环路,以控制管中的悬浮针乒球。

What does “Tuning a PID Controller” mean?

I won’t cover the theory of PID controllers – there is a lot of material already available ([1] is a good overview), but in general a PID controller is configured using three parameters acting in sum to close the loop error – proportional gain (Kp), integral time (Ti), and derivative time (Td).
我不会介绍PID控制器的理论 - 已经有很多材料可用([1]是一个很好的概述),但总的来说,PID控制器使用三个参数进行配置,这些参数相加以闭合环路误差 - 比例增益(Kp),积分时间(Ti)和导数时间(Td)。

Keeping it simple: 保持简单:

  • The proportional action Kp will reduce the steady state error. Increasing Kp reduces rise time – the controller responds more aggressively to the error.
    比例作用 Kp 将减小稳态误差。增加 Kp可缩短上升时间 – 控制器对误差的响应更积极。
  • The derivative action Td interprets the change of slope of error changes. Td is the look-ahead time to try to estimate future system behavior. Large values of Td create overshoots as it ‘guesses’ wrongly.
    导数作用 Td 解释误差变化的斜率变化。Td 是尝试估计未来系统行为的预见时间。较大的 Td 值会产生超调,因为它会“猜错”。
  • Ti eliminates steady state error and reduces rise time. Ti may improve the response of the system but it is a little bit tricky and PD control is often sufficient.
    Ti 消除了稳态误差并缩短了上升时间。我可能会提高系统的响应,但这有点棘手,PD控制通常就足够了。

These parameters can be derived from models of the process being controlled. However, as this does not apply in many to the kinds of systems I build, I will be looking at heuristic (trial and error) methods for estimating the values.
这些参数可以从被控制过程的模型中得出。但是,由于这在许多系统中并不适用于我构建的各种系统,因此我将研究用于估计值的启发式(试错)方法。

Tuning the loop is about finding a combination of these three parameters that gives an appropriate response to a disturbance, as illustrated in the figure below. The ‘right’ response depends on what the loop is controlling (objective) and the expectations of the person doing the tuning (subjective).
整定就是要找到这三个参数的组合,以便对干扰做出适当的响应,如下图所示。“正确”的响应取决于循环控制的内容(客观的)和进行调整的人的期望(主观)。

在这里插入图片描述

For the purpose of this experiment, I will be aiming for the ‘Acceptable’ curve in the figure – I am not concerned with some overshoot and I want to have a relatively fast response.
出于这个实验的目的,我将瞄准图中的“可接受”曲线——我不担心一些超调,我希望有一个相对快速的响应。

Running in Manual 手动运行

The first thing to do was run the test rig in manual mode (ie, with the PID controls turned off) to get a feel for how the system behaves. Conclusions:
首先要做的是以手动模式(即,关闭 PID 控制)运行测试台,以了解系统的行为方式。结论:

  • The system is inherently unstable – you cannot ‘set and forget’. The ball rarely stays in one place very long with the CO set constant.
    这个系统本质上是不稳定的——你不能“一劳永逸”。在 CO 设置恒定的情况下,球很少会在一个地方停留很长时间。
  • At the bottom end of the tube, near the fan, the ball vibrates severely and the small volume of air under the ball struggles to keep it levitating.
    在管子的底端,靠近风扇的地方,球会剧烈振动,球下方的小体积空气会努力保持其悬浮。
  • At the open (top) end of the tube the fan struggles to keep enough airflow into the tube to keep the ball there.
    在管子的开口(顶)端,风扇努力保持足够的气流进入管子以将球保持在那里。
  • There is a section in the center of the tube where airflow from the fan is laminar and vibration is reduced. This zone extends from about 10cm up to 20cm up the tube. This is the sweet spot for testing system step response.
    在管子的中心有一个部分,来自风扇的气流是层流的,振动减少了。该区域从管子上方约 10 厘米延伸到 20 厘米。这是测试系统阶跃响应的最佳点。
  • The resolution of the ultrasonic sensor is 1cm and the vibrations of the ball can be the same magnitude, causing a spiky and a noisy signal. This could be compensated for in the software, but for the purposes of the experiment the raw signal is used.
    超声波传感器的分辨率为1cm,球的振动可以是相同的大小,从而引起尖峰和嘈杂的信号。这可以在软件中得到补偿,但出于实验目的,使用原始信号。

So, for these tests described, the system disturbance is a step change in SP from 10 to 20. All other testing attributes are held constant, except for the PID parameters being tested.
因此,对于所描述的这些测试,系统干扰是 SP 从 10 到 20 的阶跃变化。除正在测试的 PID 参数外,所有其他测试属性都保持不变。

All the graphs and plots are captured in real time using the Arduino IDE Serial Plotter. The x axis is the number of the data point, with each datapoint generated once per PID cycle (50ms in this experiment, and set by the SAMPLING_PERIOD constant in the code). The lines on the charts are CO (green), SP (blue) and CV (red).
所有的图形和绘图都是使用Arduino IDE串行绘图仪实时捕获的。x 轴是数据点的编号,每个数据点每个 PID 周期生成一次(本实验为 50 毫秒,由代码中的 SAMPLING_PERIOD常数设置)。图表上的线是 CO(绿色)、SP(蓝色)和 CV(红色)。

Heuristic A Method (unidentified) 启发式 A 方法(未识别)

This method was found here in response to a forum question. The method is supposed to provide a simple way to get a good baseline tune for small, low torque motors (ie, like the fan) with little or no gearing.
这种方法是在回答论坛问题时发现的。该方法应该提供一种简单的方法,为小型、低扭矩电机(即,如风扇)获得良好的基线调整,齿轮传动装置很少或没有。

The method consists of the following steps:
该方法包括以下步骤:

  1. Set all gains to zero.
    将所有增益设置为零。
  2. Increase the Kp until the response to a disturbance is steady oscillation.
    增加 Kp,直到对扰动的响应是稳定的振荡。
  3. Increase the Td until the oscillations stop (i.e. it’s critically damped).
    增加 Td 直到振荡停止(即它受到严重阻尼)。
  4. Repeat steps 2 and 3 until increasing the Td does not stop the oscillations.
    重复步骤 2 和 3,直到增加 Td 不会停止振荡。
  5. Set Kp and Td to the last stable values.
    将 Kp 和T d 设置为最后的稳定值。
  6. Increase Ti gain until the convergence to the set point occurs with or without overshoot at an acceptable rate.
    增加 Ti 增益,直到以可接受的速率收敛到设定点,无论是否有过冲。

PID_Tuning_Heuristic_1

Step 2 was straightforward and I eventually obtained an oscillating system response, shown in the figure at left, with Kp=6.6.
第 2 步很简单,我最终获得了振荡系统响应,如左图所示,Kp=6.6。

This response curve is also the basis for the constants calculated in the Zeigler-Nichols method below. Between readings 2249 and 2239 (100 data points at 50ms each) on the x-axis are 2.5 oscillations, giving 5s for 2.5 oscillations, or 2s/osc.
该响应曲线也是下面 Zeigler-Nichols 方法中计算的常数的基础。x 轴上的读数 2249 和 2239(100 个数据点,每个数据点 50ms)之间是 2.5 次振荡,2.5 次振荡为 5 秒,即 2 秒/osc。

在这里插入图片描述

Step 3, increasing Td, yielded the graph at right when Td=0.4. Interesting to note at this stage that the PID converges to a stable response but is offset from the actual SP.
步骤3,增加Td,当Td=0.4时,得到右边的图形。有趣的是,在此阶段,PID 收敛到稳定的响应,但与实际 SP 有偏移。

In my case, iterating additional steps 2 & 3 yielded nothing, so I moved on to Step 4.
就我而言,迭代额外的步骤 2 和 3 没有任何结果,所以我继续执行第 4 步。

在这里插入图片描述

Step 4 concluded when I achieved an ‘acceptable’ response with Ti=1.2.
当我获得 Ti=1.2 的“可接受”响应时,第 4 步结束。

It is interesting to note that the CO line (green) is working very hard to maintain control. In a mechanical system (eg a physical valve actuating) this would cause excessive wear and would probably not be acceptable. In my case of an all-electric system running a fan motor, this is not a major issue.
有趣的是,一氧化碳线(绿色)正在努力保持控制。在机械系统(例如,物理阀门驱动)中,这会导致过度磨损,并且可能是不可接受的。在我运行风扇电机的全电动系统的情况下,这不是一个主要问题。

Finally, the fully controlled step response up (10 to 20) and down (20 to 10) are show in the figure below.
最后,完全受控的阶跃响应上升(10 至 20)和下降(20 至 10)如下图所示。

在这里插入图片描述

Heuristic A Kp=6.6 Ti=0.4 Td=1.2
启发式 A Kp=6.6 Ti=0.4 Td=1.2

Zeigler-Nichols Method Zeigler-Nichols方法

The Zeigler-Nicols method has been around since the 1940’s and is a popular heuristic PID tuning method, well described in the literature (see [2]). The ZN rules work well on processes where the dead time is less than half the length of the time constant.
Zeigler-Nicols 方法自 1940 年代以来一直存在,是一种流行的启发式 PID 调谐方法,在文献中有很好的描述(参见 [2])。ZN 规则适用于死区时间小于时间常数长度一半的过程。

The basic tuning steps are:
基本调优步骤如下:

  1. Set all gains to zero.
    将所有增益设置为零。
  2. Increase the Kp until the response to a disturbance is steady oscillation. This is called the ‘ultimate’ gain Ku.
    增加 Kp,直到对扰动的响应是稳定的振荡。这被称为“终极”增益 Ku。
  3. Measure the ‘ultimate’ oscillation period Tu at this steady state.
    测量此稳态下的“极限”振荡周期 Tu。

Ku and Tu can then be used to calculate values for Kp, Ti and Td, depending on the type of control algorithm implemented, according to the table below (taken from [2]).
然后,可以使用 Ku 和 Tu 来计算 Kp、Ti 和 Td 的值,具体取决于实现的控制算法类型,如下表(摘自 [2])。

Control Type 控制类型KpTiTd
P0.5Ku
PI0.45KuTu/1.2
PD0.8KuTu/8
Classic PID 经典 PID0.6KuTu/2Tu/8
Pessen Integral Rule 佩森积分法则0.7KuTu/2.53Tu/20
Some overshoot 一些超调0.33KuTu/2Tu/3
No overshoot 无过冲0.2KuTu/2Tu/3

Ku and Tu were determined in Step 2 in the previous method (Ku=6.6, Tu=2). Calculating it all out in a spreadsheet provides all the coefficients for the different test settings.
Ku 和 Tu 在前述方法的步骤 2 中测定 (Ku=6.6,Tu=2)。在电子表格中计算所有值可提供不同测试设置的所有系数。

PID_ZN_Calcs

The charts obtained are shown below. The Classic and Pessen Integral Rule PID parameters performed the best in this situation. P was unacceptable due to the constant error from the SP (as expected). Neither of the ‘overshoot’ parameters worked to prevent overshoot but they damped the oscillations better than the pure PID parameters. I expect the overshoot is due to the characteristics of the equipment – it is really hard not to overshoot as the air pressure builds up under the ball. In all cases the control response could potentially be manually tuned further.
获得的图表如下所示。在这种情况下,Classic 和 Pessen 积分规则 PID 参数表现最佳。由于 SP 的持续误差(如预期的那样),P 是不可接受的。“过冲”参数都无法防止过冲,但与纯PID参数相比,它们更好地抑制了振荡。我预计超调是由于设备的特性造成的——随着球下方气压的增加,真的很难不超调。在所有情况下,控制响应都可能被手动进一步调整。

imgZN P Kp=3.3 Ti=Td=0 ZN, P, Kp=3.3 Ti=Td=0
在这里插入图片描述

ZN PI Kp=2.97 Ti=1.67 Td=0

imgZN PD Kp=5.28 Ti=0 Td=0.25
在这里插入图片描述

ZN Classic PID Kp=3.96 Ti=1.00 Td=0.25
ZN 经典 PID Kp=3.96 Ti=1.00 Td=0.25

imgZN Pessen Kp=4.62 Ti=0.80 Td=0.30

imgZN Some Overshoot Kp=2.18 Ti=1.00 Td=0.67
ZN:一些过冲,Kp=2.18,Ti=1.00,Td=0.67

imgZN No Overshoot Kp=1.32 Ti=1.00 Td=0.67
ZN 无超调 Kp=1.32 Ti=1.00 Td=0.67

Cohen-Coon Method Cohen-Coon 方法

Cohen-Coon tuning rules are second in popularity to the Ziegler-Nichols rules. Cohen and Coon published their method around a decade after Zeigler-Nichols, in the 1950’s. The CC rules work well on processes where the dead time is less than two times the length of the time constant.
Cohen-Coon 调谐规则的受欢迎程度仅次于 Ziegler-Nichols 规则。Cohen 和 Coon 在 Zeigler-Nichols 之后大约十年,即 1950 年代发表了他们的方法。CC 规则适用于死区时间小于时间常数长度两倍的进程。

The rules for this tuning method are given in [2]. It is far more involved that the ZN method as it requires measuring a process time constant.
[2] 中给出了这种调优方法的规则。它比 ZN 方法更复杂,因为它需要测量过程时间常数。

However, as the ball levitation exercise has a short dead time constant (shorter than the process time constant) there seems to be little to gain in trying this alternative method so I will leave this for another time.
然而,由于球悬浮练习的死区时间常数很短(比过程时间常数短),因此尝试这种替代方法似乎没有什么好处,所以我将把它留到另一个时间。

Conclusion 结论

I set out to find out how to tune a PID loop and achieved that aim.
我开始研究如何调整 PID 环路并实现了这个目标。

So which would I choose out of all the combinations tried? Heuristic A seems to give the most responsive settings for this equipment, followed by the ZN Classic and PIR parameters. In comparison to Heuristic A, all ZN parameters create less less extreme CO variation, which may be important in some applications.
那么,我会从所有尝试过的组合中选择哪一个呢?启发式 A 似乎为此设备提供了最灵敏的设置,其次是 ZN Classic 和 PIR 参数。与启发式 A 相比,所有 ZN 参数产生的 CO 变化较小,极端程度较小,这在某些应用中可能很重要。

References 引用

  1. Wikipedia https://en.wikipedia.org/wiki/PID_controller is a good overview of PID loops
    Wikipedia https://en.wikipedia.org/wiki/PID_controller 很好地概述了 PID 回路
  2. Zeigler-Nichols Method at https://en.wikipedia.org/wiki/Ziegler-Nichols_method
    Zeigler-Nichols 方法在 https://en.wikipedia.org/wiki/Ziegler-Nichols_method
  3. “Cohen-Coon Tuning Rules” at http://blog.opticontrols.com/archives/383
    http://blog.opticontrols.com/archives/383 中的“Cohen-Coon 调谐规则”
  4. Tim Westcott, “PID without the PhD”, Embedded Systems Programming, October 2000 found at http://www.embedded.com/design/prototyping-and-development/4211211/PID-without-a-PhD
    蒂姆·韦斯科特(Tim Westcott),“没有博士学位的PID”,《嵌入式系统编程》,2000年10月,在 http://www.embedded.com/design/prototyping-and-development/4211211/PID-without-a-PhD

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

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

相关文章

Debug-018-elementUI-el-tree中通过CSS隐藏任意一项的选择框checkbox

前情提要: 我们项目中使用的是elementUI,业务中经常需要使用到el-tree组件去实现一些有层级关系的功能。现在有一个需求描述一下:首先是这个el-tree是个有checkbox的树,每一子节点都可以被选择,用于去实现一些系统的权…

Shell编程之正则表达式与文本三剑客

目录 一、正则表达式 1.引言--什么是正则表达式 1.1正则表达式的功能 2.基础正则表达式(BRE) 2.1特殊字符 2.2定位符 2.3非打印字符 3.扩展正则表达式(ERE) 4.元字符操作的案列 二、命令小工具 1.cut:列截取工具 2.sort排序 …

vue3获取、设置元素高度

前言 在web端常见的需求场景中,会经常遇到table表格需要根据页面可视区域使高度自适应的情况。 傻喵(作者本人)昨天在尝试使用vue3实现这个需求时,看了几篇网上写的回答,都不太全面,所以干脆自己写个总结吧.(第一次写&#xff0c…

深入探讨 I/O 多路复用:提升系统 I/O 效率的关键技术

摘要 I/O(输入/输出)操作是计算机系统中不可或缺的一部分,而 I/O 多路复用技术则是提高系统 I/O 效率的重要手段。本文将浅谈 I/O 的基本概念,重点探讨 I/O 多路复用技术的原理、优势以及在现代系统中的应用。 引言 在现代计算…

php收银系统源码-收银员操作权限

收银系统是很多门店,尤其是连锁门店营业的必备工具,收银员每天需要通过收银系统记录商品的售卖数量,以及收款,会员开卡,核销订单等工作。但很多门店都不希望给收银员太高的权限,自然就离不开收银员的权限管…

flask开启调试模式,热部署

这里写自定义目录标题 功能快捷键 什么是热部署?简单说就是你程序改了,现在要重新启动服务器,嫌麻烦?不用重启,服务器会自己悄悄的把更新后的程序给重新加载一遍,这就是热部署(抄的)…

NameSilo域名注册和解析2024版教程(附优惠码)

上次给大家介绍了国外知名的域名注册商Dynadot,今天再给大家分享另一家国外知名的域名注册商NameSilo,同样性价比很高。使用本站提供的优惠码:ieearn.com,你还可以在首次注册购买域名时享受1美元的优惠: NameSilo简介…

10 VUE Element

文章目录 VUE1、概述2、快速入门3、Vue 指令4、生命周期5、案例 Elemant1、快速入门2、Element 布局3、常用组件-案例 VUE 1、概述 Vue 是一套前端框架,免除原生JavaScript中的DOM操作,简化书写基于MVVM(Model-View-ViewModel)思想,实现数据…

AI机器人本地免费部署(部署Llama 3.1详细教程)

昨日,Meta公司发布了人工智能模型——Llama 3.1。 那么Llama 3.1 405B的效果怎么样?我们来对比一张图,横向对比一下GPT-4。 可以看出,Llama 3.1 405B在各类任务中的表现可以与GPT-4等顶级的模型相差无几。 那么,我们…

4G新型智能电表是什么?

4G新型智能电表是一种利用第四代移动通信技术(4G)进行数据传输的先进计量设备。它不仅具备传统电表的基本功能,如电量计量,还能实现远程抄表、用电监控、故障检测等多种智能化服务。本文旨在详细介绍4G新型智能电表的技术特点、优势及应用场景。 一、4G…

【C++刷题】优选算法——队列+宽搜

N 叉树的层序遍历 vector<vector<int>> levelOrder(Node* root) {vector<vector<int>> ret;if (root nullptr) return ret;queue<Node*> q;q.push(root);ret.push_back({root->val});int size 1;while (!q.empty()) {vector<int> v…

03。正式拿捏ArkTS语言第一天

1, 打印日志命令 &#xff1a; console.log() 2, 三种基本数据类型&#xff1a; number 数字类型 &#xff08;数字&#xff09; string 字符串类型&#xff08;例如&#xff1a;“我是字符串”&#xff09; boolean 布尔类型 (true 或者 false) ***…

宝塔Docker部署Nuxt3 BBS项目

体验地址 BBS&#xff1a;http://bbs.sourcebyte.vip Nuxt3&#xff1a;https://nuxt.com.cn BBS项目介绍 BBS是开源字节最新研发的社区项目&#xff0c;包含产品中心&#xff0c;需求墙&#xff0c;工具&#xff0c;资讯4大板块。 1、产品中心&#xff1a;开源字节有众多…

常见的jmeter面试题及答案

1、解释什么是JMeter? JMeter是一款Java开源工具&#xff0c; 用于性能负载测试。它旨在分析和衡量Web应用程序和各种服务的性能和负载功能行为。 2、说明JMeter的工作原理? JMeter就像一群将请求发送到目标服务器的用户-样。它收集来自目标服务器的响应以及其他统计数据&…

python利用lxml模块爬取百度贴吧标题列表—新手练习的项目

一、爬取需求 就是用python&#xff0c;获取某百度贴吧的标题 二、代码 import lxml.html import requests ydm requests.get(https://tieba.baidu.com/f?ieutf-8&kw%E5%BC%A0%E5%A7%93%E4%B9%8B%E5%AE%B6).content.decode() selector lxml.html.fromstring(ydm) inf…

Java 每日一题: for 与 foreach 的区别 ?

for 循环&#xff1a;是最基本的循环结构&#xff0c;可以通过初始化语句、循环条件和迭代语句来控制循环的执行。 foreach 循环&#xff08;也称为增强型 for 循环&#xff09;&#xff1a;用于遍历集合或数组中的元素&#xff0c;简化了遍历过程&#xff0c;没有显式地控制索…

虚拟局域网——VLAN

VLAN的定义 VLAN virtual local Area Network 虚拟局域网&#xff0c;将物理上的局域网LAN在逻辑上进行划分 使用VLAN技术可以有效隔离广播域&#xff0c;减少网络中不必要的带宽消耗&#xff0c;如图&#xff0c;192.168.1.1发送一个广播帧&#xff0c;那么在这个广播域中的所…

HBuilder X中配置vue-cli项目和UI库

目录 一.前端项目结构 二.在HBuilder X中搭建vue-cli项目 1. 安装node.js前端环境 2. HBuilder X创建一个vue-cli项目 3. vue-cli项目结构 4. 如何运行前端项目 5. 创建组件 6. 组件路由(页面跳转) 6.1 创建router目录 6.2 使用路由 6.3 在main.js中配置路由 6.4 路…

多多OJ评测系统 在前端脚手架Vue-Cli中设置页面路由

目录 设置页面路由 我们把菜单上的路由改成读取路由文件 设置成export 导出路由 在刚刚的原始路由 index.ts中导入就行了 在这边引入我们的路由文件 我们之后点击菜单 我们的路由文件是这样的 但是没有跳转 写一下事件 接下来要同步路由到菜单项 自己定义监听函数 …

【吊打面试官系列-Dubbo面试题】Dubbo 服务降级,失败重试怎么做?

大家好&#xff0c;我是锋哥。今天分享关于 【Dubbo 服务降级&#xff0c;失败重试怎么做&#xff1f;】面试题&#xff0c;希望对大家有帮助&#xff1b; Dubbo 服务降级&#xff0c;失败重试怎么做&#xff1f; 可以通过 dubbo:reference 中设置 mock"return null"…