pi六轴算法_公式PI调节比例积分算法

I've been reading this website: http://www.csimn.com/CSI_pages/PIDforDummies.html and I'm confused about the proportional integral part. Here's what it says.

Proportional control

Here’s a diagram of the controller when we have enabled only P control:

In Proportional Only mode, the controller simply multiplies the Error by the Proportional Gain (Kp) to get the controller output.

The Proportional Gain is the setting that we tune to get our desired performance from a “P only” controller.

A match made in heaven: The P + I Controller

If we put Proportional and Integral Action together, we get the humble PI controller. The Diagram below shows how the algorithm in a PI controller is calculated.

The tricky thing about Integral Action is that it will really screw up your process unless you know exactly how much Integral action to apply.

A good PID Tuning technique will calculate exactly how much Integral to apply for your specific process - but how is the Integral Action adjusted in the first place?

As you can see, the proportional part is easy to understand it says that you multiply error by tuning variable. The part that I don't get is where you get the P and I from on the second part, and what mathematical operation you do with them. I don't have a degree in mathematics or advanced calculus knowledge, so I would appreciate it if you would try to keep it algebra level.

解决方案

I integral part is just summation also multiplied by some constant.

Analogue integration is done by nonlinear gain and amplifier.

Digital integration of first order is just:

output += input*dt;

second order is:

temp += input*dt;

output += temp*dt;

dt is the duration time of iteration loop (timer or what ever)

do not forget that PI regulator can have more complicated response

i1 += input*dt;

i2 += i1*dt;

i3 += i2*dt;

output = a0*input + a1*i1 + a2*i2 +a3*i3 ...;

where a0 is the P part

Now the I regulator adds more and more amount of control value

until the controlled value is the same as the preset value

the longer it takes to match it the faster it controls

this creates fast oscillations around preset value

in comparison to P with the same gain

but in average the control time is smaller then in just P regulators

therefore the I gain is usually much much smaller which creates the memory and smooth effect LutzL mentioned. (while the regulation time is similar or smaller then just for P regulation)

The controlled device has its own response

this can be represented as differential function

there is a lot of theory in cybernetics about obtaining the right regulator response

to match your process needs as:

quality of control

reaction times

max oscillations amplitude

stability

but for all you need differential math like solving system of differential equations of any order

strongly recommend use of Laplace transform

but many people also use Z transform instead

So I-regulator add speed to regulation

but it also create bigger oscillations

and when not matching the regulated system properly also creates instability

Integration adds overflow risks to regulation (Analog integration is very sensitive to it)

Also take in mind you can also substracting the I part from control value

which will make the exact opposite

sometimes the combination of more I parts are used to match desired regulation response shape

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
圆周率π的计算历程可以追溯到公元前20世纪,当时古埃及人就已经开始研究圆周率的值。随着时间的推移,人们不断尝试各种方法来计算π的值,包括使用几何方法、概率方法、级数方法和积分方法等。下面列举一些主要的计算π的方法: 1. 几何方法:最早期的计算π的方法就是几何方法,即通过将圆的周长与直径相除来计算π的值。这个方法的精度不高,但是很简单易行。 2. 概率方法:蒙特卡罗方法是一种概率方法,可以用来估计π的值。这个方法的原理是,将一个正方形内切一个圆,然后随机产生大量的点,统计落在圆内的点的数量,以此来估算π的值。 3. 级数方法:利用级数公式可以计算π的值,比如莱布尼兹级数、欧拉级数和马刁尔级数等。这些级数公式的精度较高,但是计算量较大。 4. 积分方法:用积分公式来计算π的值,比如阿贝尔-普朗克公式和矩形公式等。这些方法精度较高,但是计算量也比较大。 此外,还有一些脑洞大开的估计方法,比如: 1. 用切片面积估计π的值:将一个圆形的切片放在一个正方形内,然后统计切片内部的面积占正方形面积的比例,以此来估算π的值。 2. 用抛物线估计π的值:将一个抛物线放在一个正方形内,然后统计抛物线内部的面积占正方形面积的比例,以此来估算π的值。 3. 用牛顿迭代法估计π的值:利用牛顿迭代法可以求出π的值,但是迭代的次数较多,计算量很大。 总的来说,计算π的方法有很多种,每种方法都有其优缺点和适用范围,选择何种方法取决于计算的精度要求和计算的时间限制。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值