loutin 发表于 2025-1-20 19:20

串联型PID

PID广泛应用于工业生产各个环节,然而对于不同PID结构会有一些差异,导致在调参时若按照常规的经验调试,结果将会有非常大的不同。串联型PID(Serial PID)串联型PID的三个环节由比例,积分和微分项串级而成,结构简图如下:
https://upload-images.jianshu.io/upload_images/10174765-2ebbe758a0d38ad1.pngSerial PID
其传递函数为:
https://math.jianshu.com/math?formula=G_%7Bserial%7D(s)%20%3D%20k(1%2B%5Cfrac%7B1%7D%7Bs%5Ctau_%7Bi%7D%7D)(1%2Bs%5Ctau_%7Bd%7D)%20%5Ctag%7B1-1%7D
若使用后向欧拉法将其离散化,即将:
https://math.jianshu.com/math?formula=s%3D%5Cfrac%7B1-z%5E%7B-1%7D%7D%7BT_s%7D%20%5Ctag%7B1-2%7D
带入式(1-1)中,可得到:
https://math.jianshu.com/math?formula=out(m)%3Dout(m-1)%2BAerr(m)%2BBerr(m-1)%2BCerr(m-2)%20%5Ctag%7B1-3%7D
其中:
[*]https://math.jianshu.com/math?formula=out(m) —— 第m时刻控制器输出
[*]https://math.jianshu.com/math?formula=err(m) —— 第m时刻的误差
[*]https://math.jianshu.com/math?formula=T_s —— 离散化控制周期
[*]https://math.jianshu.com/math?formula=A%20%3D%20%5Cfrac%7Bk(T_s%5E2%2BT_s%5Ctau_d%2B%5Ctau_i%5Ctau_d%2B%5Ctau_iT_s)%7D%7B%5Ctau_iT_s%7D
[*]https://math.jianshu.com/math?formula=B%20%3D%20-%5Cfrac%7Bk(T_s%5Ctau_d%2B2%5Ctau_i%5Ctau_d%2B%5Ctau_i%20T_s)%7D%7B%5Ctau_iT_s%7D
[*]https://math.jianshu.com/math?formula=C%20%3D%20%5Cfrac%7Bk%5Ctau_d%7D%7BT_s%7D
式(1-3)即为串联型PID的离散化增量式实现。利用递推的方法可得到绝对式实现如下:
https://math.jianshu.com/math?formula=out(m)%3DA%5Csum_%7Bn%3D2%7D%5E%7Bm%7D%7Berr(n)%7D%2BB%5Csum_%7Bn%3D1%7D%5E%7Bm-1%7D%7Berr(n)%7D%2BC%5Csum_%7Bn%3D0%7D%5E%7Bm-2%7D%7Berr(n)%7D%20%5Ctag%7B1-4%7D并联型PID(Parallel PID)并联型PID的三个环节由比例,积分和微分项并联而成,其结构简图如下:
https://upload-images.jianshu.io/upload_images/10174765-f0b7014f7e447eaf.pngParallel PID
其传递函数为:
https://math.jianshu.com/math?formula=G_%7Bparallel%7D(s)%20%3D%20k_%7Bp%7D%20%2B%20%5Cfrac%7Bk_%7Bi%7D%7D%7Bs%7D%20%2B%20k_%7Bd%7Ds%20%5Ctag%7B2-1%7D
串联型与并联型二者的系数有所不同,其关系如下:
https://math.jianshu.com/math?formula=k_%7Bp%7D%20%3D%20k(1%20%2B%20%5Cfrac%7B%5Ctau_%7Bd%7D%7D%7B%5Ctau_%7Bi%7D%7D)%20%5C%5C%20k_%7Bi%7D%20%3D%20%5Cfrac%7Bk%7D%7B%5Ctau_%7Bi%7D%7D%20%5C%5C%20k_%7Bd%7D%20%3D%20k%5Ctau_%7Bd%7D%20%5Ctag%7B2-2%7D
使用后向欧拉离散化,可得到并联型PID的离散化增量式实现如下:
https://math.jianshu.com/math?formula=out(m)%3Dout(m-1)%2Bk_p(err(m)-err(m-1))%2Bk_iT_s%20err(m)%2B%5Cfrac%7Bk_d%7D%7BT_s%7D(err(m)-2err(m-1)%2Berr(m-2))%20%5Ctag%7B2-3%7D
若使用Tustin方式离散化,即将:
https://math.jianshu.com/math?formula=s%3D%5Cfrac%7B2%7D%7BT_s%7D%5Cfrac%7Bz-1%7D%7Bz%2B1%7D%20%5Ctag%7B2-4%7D
带入式(2-1)中,并将https://math.jianshu.com/math?formula=k_d置为0,可得到:
https://math.jianshu.com/math?formula=out(m)%3Dout(m-1)%2B(k_p%2B%5Cfrac%7BT_sk_i%7D%7B2%7D)err(m)%2B(%5Cfrac%7BT_sk_i%7D%7B2%7D-k_p)err(m-1)%20%5Ctag%7B2-5%7D
此即为并联型PI的离散化增量式实现。同样利用递推的方法可以得到绝对式实现如下:
https://math.jianshu.com/math?formula=out(m)%3Dk_perr(m)%2Bk_iT_s%5Csum_%7Bn%3D1%7D%5E%7Bm%7D%7Berr(n)%7D%2B%5Cfrac%7Bk_d%7D%7BT_s%7D(err(m)-err(m-1))%20%5Ctag%7B2-6%7D标准型PID(Standard or mixed or Ideal PID)标准型PID与上述二者都不同,其结构简图如下:
https://upload-images.jianshu.io/upload_images/10174765-6897bdf47d1b7ccc.pngStandard PID
其传递函数为:
https://math.jianshu.com/math?formula=G_%7Bstandard%7D(s)%20%3D%20K_%7Bp%7D(1%20%2B%20%5Cfrac%7B1%7D%7BsT_%7Bi%7D%7D%20%2B%20sT_%7Bd%7D)%20%5Ctag%7B3-1%7D
此时有:
https://math.jianshu.com/math?formula=K_%7Bp%7D%20%3D%20k(1%20%2B%20%5Cfrac%7B%5Ctau_%7Bd%7D%7D%7B%5Ctau_%7Bi%7D%7D)%20%5C%5C%20T_%7Bi%7D%20%3D%20%5Ctau_%7Bi%7D%20%2B%20%5Ctau_%7Bd%7D%20%5C%5C%20T_%7Bd%7D%20%3D%20%5Cfrac%7B%5Ctau_%7Bd%7D%5Ctau_%7Bi%7D%7D%7B%5Ctau_%7Bd%7D%20%2B%20%5Ctau_%7Bi%7D%7D%20%5Ctag%7B3-2%7D
使用后向欧拉离散化方法,可得到标准型PID的离散化增量式实现:
https://math.jianshu.com/math?formula=out(m)%3Dout(m-1)%2BK_p(err(m)-err(m-1))%2B%5Cfrac%7BK_p%7D%7BT_i%7DT_s%20err(m)%2B%5Cfrac%7BK_pT_d%7D%7BT_s%7D(err(m)-2err(m-1)%2Berr(m-2))%20%5Ctag%7B3-3%7D
若使用Tustin方式离散化,并将https://math.jianshu.com/math?formula=K_d置0,则得到标准型PI的离散化增量式实现:
https://math.jianshu.com/math?formula=out(m)%3Dout(m-1)%2B(K_p%2B%5Cfrac%7BK_pT_s%7D%7B2T_i%7D)err(m)%2B(%5Cfrac%7BK_pT_s%7D%7B2T_i%7D-K_p)err(m-1)%20%5Ctag%7B3-4%7D
式(3-4)即为TI的快速电流环(FCL)中速度优化型PI控制器实现原理。值得注意的是,FCL中的各变量均为标幺值,因此实际实现需要稍作转换,即:
https://math.jianshu.com/math?formula=K_%7Bp%E6%A0%87%E5%B9%BA%7D%3DK_p*%5Cfrac%7BI_%7Bbase%7D%7D%7BV_%7Bbase%7D%7D%20%5C%5C%20K_%7Bi%E6%A0%87%E5%B9%BA%7D%3DK_i%20%5Ctag%7B3-5%7D
其中:
[*]https://math.jianshu.com/math?formula=V_%7Bbase%7D —— 电压标幺基值
[*]https://math.jianshu.com/math?formula=I_%7Bbase%7D —— 电流标幺基值
最后,使用同样的递推法,可以得到绝对式实现:
https://math.jianshu.com/math?formula=out(m)%3DK_p%20err(m)%20%2B%20%5Cfrac%7BK_p%7D%7BT_i%7DT_s%5Csum_%7Bn%3D1%7D%5E%7Bm%7Derr(n)%2B%5Cfrac%7BK_pT_d%7D%7BT_s%7D(err(m)-err(m-1))%20%5Ctag%7B3-6%7D三者区别三者最重要的区别在于不同结构的参数对于控制器行为影响的不同。并联型PID实现了比例项,积分项和微分项的完全解耦,调节其中的https://math.jianshu.com/math?formula=k_%7Bp%7D%2Ck_%7Bi%7D与https://math.jianshu.com/math?formula=k_%7Bd%7D即可独立的作用在比例,积分和微分项上;而标准形式的https://math.jianshu.com/math?formula=K_%7Bp%7D将同时影响比例,积分和微分三项行为。串联型类似。工业应用中,标准形式和并联形式的PID应用的最为广泛,且Simulink中也可以看到,PID的形式选择分为Parallel及Ideal(即Standard):
https://upload-images.jianshu.io/upload_images/10174765-d5eb3dcd6614980b.pngSimulink Parallel PID

https://upload-images.jianshu.io/upload_images/10174765-dc503acd8b6c179a.pngSimulink Ideal(Standard) PID

值得注意的是比例项和积分项都与前文相同,而微分项,MATLAB中用https://math.jianshu.com/math?formula=D*N*s%2F(s%2BN)代替了纯微分项https://math.jianshu.com/math?formula=Ds。将其化简可以得到:
https://math.jianshu.com/math?formula=Ds*%5Cfrac%7B1%7D%7B%5Cfrac%7B1%7D%7BN%7Ds%2B1%7D%20%5Ctag%7B4-1%7D
前面https://math.jianshu.com/math?formula=Ds为正常的微分项,后面则乘上了一个一阶低通滤波器,而https://math.jianshu.com/math?formula=N即为低通截止频率,对于Ideal类型的控制器,此即为改进型标准PID。该部分的离散化与标准型PID描述相同,唯一的差别在于微分项需要经过一次滤波处理。此处给出绝对式的两种实现(改进型并联PID同理),实现一(先滤波,后微分):
https://math.jianshu.com/math?formula=out(m)%3DK_perr(m)%2B%5Cfrac%7BK_p%7D%7BT_i%7DT_s%5Csum_%7Bn%3D1%7D%5E%7Bm%7Derr(n)%2B%5Cfrac%7BK_pT_d%7D%7BT_s%7D(filter_%7Berr%7D(m)-filter_%7Berr%7D(m-1))%20%5Ctag%7B4-2%7D
其中:
[*]https://math.jianshu.com/math?formula=filter_%7Berr%7D(m)%3DK1*err(m)%2BK2*filter_%7Berr%7D(m-1)
[*]https://math.jianshu.com/math?formula=K1%3D%5Cfrac%7B2%5Cpi%20NT_s%7D%7B1%2B2%5Cpi%20NT_s%7D
[*]https://math.jianshu.com/math?formula=K2%3D%5Cfrac%7B1%7D%7B1%2B2%5Cpi%20NT_s%7D
实现二(先微分,后滤波):
https://math.jianshu.com/math?formula=out(m)%3DK_p%20err(m)%2B%5Cfrac%7BK_p%7D%7BT_i%7DT_s%5Csum_%7Bn%3D1%7D%5E%7Bm%7Derr(n)%2BU_d(m)%20%5Ctag%7B4-3%7D
其中:
[*]https://math.jianshu.com/math?formula=U_d(m)%3DK1*%5B%5Cfrac%7BK_p%20T_d%7D%7BT_s%7D(err(m)-err(m-1))%5D%2BK2*U_d(m-1)
[*]https://math.jianshu.com/math?formula=K1%3D%5Cfrac%7B2%5Cpi%20NT_s%7D%7B1%2B2%5Cpi%20NT_s%7D
[*]https://math.jianshu.com/math?formula=K2%3D%5Cfrac%7B1%7D%7B1%2B2%5Cpi%20NT_s%7D
Note
[*]无论是串联型,并联型还是标准型,在实现上都分为绝对式PID还是增量式PID。这与PID类型无关,只是实现手段不同。

地瓜patch 发表于 2025-1-21 21:08

算法没用,上例程吧

申小林一号 发表于 2025-1-22 09:09

学习一下

Amazingxixixi 发表于 2025-1-24 11:39

学习一下,提升技能,新年快乐

g36xcv 发表于 2025-2-28 00:50

该结构通常用于处理需要更精细调节的控制系统,并且常见于工业生产中的应用。

andy520520 发表于 2025-3-21 18:16


H(s) = Kp + Ki   * 1/s+ Kd *s

把参数搞少些不是更好

通过后向差分

比例项:   P(k)= Kp * e(k)

积分项 :I(k)    =   I(k - 1) + Ki * T * e(k),用递推表示

微分项 :D(k)=Kd * (e(k) - e(k - 1)) / T

输出: OUT(k)   =P(k) + I(k) + D(k)

lidi911 发表于 2025-3-24 08:05

第一次听说串联型和并联型PID

狗啃模拟 发表于 2025-4-23 11:04

在串联型PID控制中,每个环节的输出都作为下一个环节的输入,因此控制器的工作依赖于各个环节的逐步处理。

Amazingxixixi 发表于 2025-4-24 14:52

学习一下啊!感觉有点知识慌了

有何不可0365 发表于 2025-4-30 15:43

通过对系统的误差进行实时反馈,PID控制器可以精确地调节控制量,使系统达到期望的目标。

leoeric 发表于 2025-7-25 18:32

学习一下

tpgf 发表于 2025-7-26 16:54

不同于并联型PID的独立调节特性,串联型的参数相互影响较强,需采用分层整定法
页: [1]
查看完整版本: 串联型PID