-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* NEEPMeat * NEEPMeat fix:排版与修 * Update projects/1.20-fabric/assets/neepmeat/neepmeat/guide/zh_cn/articles/pid_controller.md Co-authored-by: dovisutu <[email protected]> * NEEPMeat fix:修 * NEEPMeat fix:修修 * NEEPMeat fix:审阅意见 * NEEPMeat fix:审阅意见 --------- Co-authored-by: dovisutu <[email protected]>
- Loading branch information
1 parent
021d7eb
commit e1bb1aa
Showing
10 changed files
with
212 additions
and
4 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
projects/1.20-fabric/assets/neepmeat/neepmeat/guide/en_us/articles/neepbus.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
id: neepbus | ||
--- | ||
# NEEPBus | ||
|
||
NEEPBus is a multi-controller serial bus. It consists of multiple participants connected via data cables. | ||
|
||
Participants in a network can exchange integer data using alphanumeric addresses. | ||
|
||
## Description | ||
|
||
Data is exchanged between ports. Participants can have multiple ports. | ||
|
||
- Each port has its own alphanumeric address. | ||
- Output ports will send data to input ports with a matching address. | ||
- Multiple input ports can share the same address, and will all receive the same data. | ||
|
||
A participant can have input and output ports. | ||
|
||
- Input ports are written to (receive data). | ||
- Output ports can write (send data) to input ports. They can also be read from. | ||
|
||
## Reads and Writes | ||
|
||
Unlike redstone, a read or write operation is necessary for data to propagate. | ||
|
||
For example, a slider will write its value to the target address when the value is changed by a player. It will not perform a write operation when a new port with a matching address is connected to the network. |
13 changes: 13 additions & 0 deletions
13
...ts/1.20-fabric/assets/neepmeat/neepmeat/guide/en_us/articles/networking_tool.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
id: networking_tool | ||
--- | ||
|
||
# Networking Tool | ||
|
||
The Networking Tool allows NEEPBus output ports to be quickly connected to input ports. | ||
|
||
## Usage | ||
|
||
A menu will appear when holding the tool and focusing on a participant block. Scroll to select the desired output port and click to copy its address. Focus on the target participant block, scroll to select the desired input port, and click to set the address. | ||
|
||
Sneak-use on a NEEPBus participant to access its address configuration. |
52 changes: 52 additions & 0 deletions
52
...cts/1.20-fabric/assets/neepmeat/neepmeat/guide/en_us/articles/pid_controller.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
id: pid_controller | ||
--- | ||
|
||
# Proportional-Integral-Derivative Controller | ||
|
||
The PID Controller is a NEEPBus participant that acts as a discrete time feedback controller for a dynamic system. | ||
|
||
Essentially, it tries to keep the *Measurement* input signal as close to the *Setpoint* input by changing the *PID Output* value. | ||
|
||
### Ports | ||
|
||
In: | ||
- Measurement | ||
- Setpoint | ||
|
||
Out: | ||
- PID Output | ||
|
||
## Description | ||
|
||
The controller updates every *dt* ticks, which can be controlled with the *Loop time interval* parameter. | ||
|
||
As shown in the block diagram, the controller reads the *Measurement* and *Setpoint* ports and subtracts *Measurement* from *Setpoint*, producing an error signal. The error signal is fed in parallel to proportional, integral and derivative terms, each with its own configurable gain. The weighted sum of the proportional, integral, and derivative terms is then sent via the output port. | ||
|
||
## Usage | ||
|
||
The device that the feedback controller is meant to control is referred to as the 'plant'. | ||
|
||
As shown in the block diagram, the measurement input signal should be the output of the plant and the controller's output should be the input of the plant, creating a feedback loop. | ||
|
||
### kp | ||
|
||
*kp* is the proportional gain. | ||
|
||
Setting *ki* and *kd* to zero creates a simple proportional gain controller. | ||
|
||
### ki | ||
|
||
*ki* is the gain of the integral term, which is the sum of all previous error values over time. | ||
|
||
It is possible for the integrator to accumulate a very large error if the setpoint changes rapidly. The windup limit parameter prevents this by clamping the integral term's absolute value. | ||
|
||
### kd | ||
|
||
*kd* is the gain of the differential term, which is the change in error over time. | ||
|
||
It is common to keep *kd* zero to form a PI controller. | ||
|
||
## Block Diagram | ||
|
||
\image[width=256,height=128,scale=0.9]{neepmeat:guide/images/pid_block_diagram.png} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
projects/1.20-fabric/assets/neepmeat/neepmeat/guide/zh_cn/articles/neepbus.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
id: neepbus | ||
--- | ||
# NEEP总线 | ||
|
||
NEEP总线是一种多控制器串行总线,通过数据线缆连接数个机器即可构成此总线。 | ||
|
||
总线网络中的机器可根据地址交换整型数据,地址需由拉丁字母和数字组成。 | ||
|
||
## 描述 | ||
|
||
数据可在端口间传送,而单个机器可有多个端口。 | ||
|
||
- 每个端口都有其独属的地址,由拉丁字母和数字组成。 | ||
- 输出端口会向地址对应的输入端口传送数据。 | ||
- 不同输入端口的地址可以相同,这些端口收到的数据也一致。 | ||
|
||
机器可有输入端口和输出端口。 | ||
|
||
- 输入端口可以写入(接收数据)。 | ||
- 输出端口可以向输入端口写出(发送数据),也可被读取。 | ||
|
||
## 读写 | ||
|
||
与红石不同,NEEP总线中如要传送数据,必须进行读写操作。 | ||
|
||
比如,玩家更改滑动拉杆的值时,其会向对应目标地址写数据。当网络中新加入同地址端口时,滑动拉杆则不会进行写操作。 |
12 changes: 12 additions & 0 deletions
12
...ts/1.20-fabric/assets/neepmeat/neepmeat/guide/zh_cn/articles/networking_tool.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
id: networking_tool | ||
--- | ||
# 网络工具 | ||
|
||
网络工具能快速连接NEEP总线的输出与输入端口。 | ||
|
||
## 用途 | ||
|
||
手持工具看向连至总线的机器时,会显示出相应菜单。滚动滚轮选择输出端口,点击复制其地址。再看向目标机器,滚动滚轮选择输入端口,点击可设定地址。 | ||
|
||
对NEEP总线机器潜行使用,即可访问其地址配置。 |
51 changes: 51 additions & 0 deletions
51
...cts/1.20-fabric/assets/neepmeat/neepmeat/guide/zh_cn/articles/pid_controller.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
id: pid_controller | ||
--- | ||
# 比例-积分-微分控制器 | ||
|
||
比例-积分-微分(PID)控制器是一类NEEP总线机器,可用作动态系统的离散时间反馈控制器。 | ||
|
||
本质上来说,它会更改*PID输出量*,力求让输入的*测量值*信号尽可能靠近输入的*目标值*信号。 | ||
|
||
### 端口 | ||
|
||
输入: | ||
- 测量值(Measurement) | ||
- 目标值(Setpoint) | ||
|
||
输出: | ||
- PID输出量(PID Output) | ||
|
||
## 描述 | ||
|
||
PID控制器每*dt*刻进行更新,此值由*更新时间间隔*(*Loop time interval*)参数控制。 | ||
|
||
如方块图中所示,PID控制器会读取*测量值*和*目标值*端口,并计算*目标值*与*测量值*的差,得到误差信号。所得误差信号会分别传入比例、积分、微分单元,并根据各单元可调增益进行调整。三个单元的加权和会发至输出端口。 | ||
|
||
## 用途 | ||
|
||
PID控制器所控制的对象称作“受控体”(Plant)。 | ||
|
||
如方块图中所示,测量值输入信号应当由受控体输出端口提供,控制器的输出信号则应送至受控体的输入端口,建立反馈回路。 | ||
|
||
### kp | ||
|
||
*kp*是比例单元的增益。 | ||
|
||
将*ki*和*kd*均设为零,即变成简单的比例增益控制器。 | ||
|
||
### ki | ||
|
||
*ki*是积分单元的增益,积分单元的输出就是过往所有误差的总和。 | ||
|
||
若目标值剧烈变动,积分单元可能会积累到很大的误差。可通过饱和上限参数限制积分单元的绝对值,以控制此误差。 | ||
|
||
### kd | ||
|
||
*kd*是微分单元的增益,微分单元的输出就是过往误差的变化率。 | ||
|
||
通常可以将*kd*设为零,以形成PI控制器。 | ||
|
||
## 方块图 | ||
|
||
\image[width=256,height=128,scale=0.9]{neepmeat:guide/images/pid_block_diagram.png} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters