<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta name="generator" content="pdf2htmlEX">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" href="https://static.pudn.com/base/css/base.min.css">
<link rel="stylesheet" href="https://static.pudn.com/base/css/fancy.min.css">
<link rel="stylesheet" href="https://static.pudn.com/prod/directory_preview_static/622b38d081ded46b7f71bec6/raw.css">
<script src="https://static.pudn.com/base/js/compatibility.min.js"></script>
<script src="https://static.pudn.com/base/js/pdf2htmlEX.min.js"></script>
<script>
try{
pdf2htmlEX.defaultViewer = new pdf2htmlEX.Viewer({});
}catch(e){}
</script>
<title></title>
</head>
<body>
<div id="sidebar" style="display: none">
<div id="outline">
</div>
</div>
<div id="pf1" class="pf w0 h0" data-page-no="1"><div class="pc pc1 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/622b38d081ded46b7f71bec6/bg1.jpg"><div class="c x0 y1 w2 h2"><div class="t m0 x1 h3 y2 ff1 fs0 fc0 sc0 ls0 ws0">PIDC<span class="_ _0"> </span><span class="ff2 sc1">程序</span></div><div class="t m0 x2 h4 y3 ff2 fs1 fc0 sc0 ls0 ws0">作者:未知单片机文章来源:未知点击数:<span class="_ _1"> </span><span class="ff3">201</span>更新时间:<span class="ff3">2005-6-5</span></div><div class="t m0 x3 h4 y4 ff2 fs1 fc0 sc0 ls0 ws0">关于<span class="_ _2"> </span><span class="ff3">PID</span></div><div class="t m0 x3 h4 y5 ff2 fs1 fc0 sc0 ls0 ws0">比例调节作用:是按比例反应系统的偏差,系统一旦出现了偏差,比例调节立即产生调节作用用以减少偏差。比例作用大,可以加快调节,减</div><div class="t m0 x3 h4 y6 ff2 fs1 fc0 sc0 ls0 ws0">少误差,但是过大的比例,使系统的稳定性下降,甚至造成系统的不稳定。</div><div class="t m0 x3 h4 y7 ff2 fs1 fc0 sc0 ls0 ws0">积分调节作用:是使系统消除稳态误差,提高无差度。因为有误差,积分调节就进行,直至无差,积分调节停止,积分调节输出一常值。积分</div><div class="t m0 x3 h4 y8 ff2 fs1 fc0 sc0 ls0 ws0">作用的强弱取决与积分时间常数<span class="_ _2"> </span><span class="ff3">Ti</span>,<span class="ff3">Ti<span class="_ _2"> </span></span>越小,积分作用就越强。反之<span class="_ _2"> </span><span class="ff3">Ti<span class="_ _2"> </span></span>大则积分作用弱,加入积分调节可使系统稳定性下降,动态响应变</div><div class="t m0 x3 h4 y9 ff2 fs1 fc0 sc0 ls0 ws0">慢。积分作用常与另两种调节规律结合,组成<span class="_ _2"> </span><span class="ff3">PI<span class="_ _2"> </span></span>调节器或<span class="_ _2"> </span><span class="ff3">PID<span class="_ _2"> </span></span>调节器。</div><div class="t m0 x3 h4 ya ff2 fs1 fc0 sc0 ls0 ws0">微分调节作用,微分作用反映系统偏差信号的变化率,具有预见性,能预见偏差变化的趋势,因此能产生超前的控制作用,在偏差还没有形成</div><div class="t m0 x3 h4 yb ff2 fs1 fc0 sc0 ls0 ws0">之前,已被微分调节作用消除。因此,可以改善系统的动态性能。在微分时间选择合适情况下,可以减少超调,减少调节时间。微分作用对噪</div><div class="t m0 x3 h4 yc ff2 fs1 fc0 sc0 ls0 ws0">声干扰有放大作用,因此过强的加微分调节,对系统抗干扰不利。此外,微分反应的是变化率,而当输入没有变化时,微分作用输出为零。微</div><div class="t m0 x3 h4 yd ff2 fs1 fc0 sc0 ls0 ws0">分作用不能单独使用,需要与另外两种调节规律相结合,组成<span class="_ _2"> </span><span class="ff3">PD<span class="_ _2"> </span></span>或<span class="_ _2"> </span><span class="ff3">PID<span class="_ _2"> </span></span>控制器。</div><div class="t m0 x3 h4 ye ff3 fs1 fc0 sc0 ls0 ws0">//PID<span class="_ _2"> </span><span class="ff2">参数设定常数</span>(<span class="ff2">放大<span class="_ _2"> </span></span>2<span class="_ _2"> </span><span class="ff2">倍</span>)</div><div class="t m0 x3 h4 yf ff3 fs1 fc0 sc0 ls0 ws0">#dene Kp 15 // <span class="ff2">实际<span class="_ _2"> </span></span>7.5</div><div class="t m0 x3 h4 y10 ff3 fs1 fc0 sc0 ls0 ws0">#dene Ki 3 // <span class="ff2">实际<span class="_ _2"> </span></span>1.5</div><div class="t m0 x3 h4 y11 ff3 fs1 fc0 sc0 ls0 ws0">#dene Kd 25 // <span class="ff2">实际<span class="_ _2"> </span></span>14.5</div><div class="t m0 x3 h5 y12 ff3 fs1 fc0 sc0 ls0 ws0">void adcpro()</div><div class="t m0 x3 h5 y13 ff3 fs1 fc0 sc0 ls0 ws0">{</div><div class="t m0 x3 h5 y14 ff3 fs1 fc0 sc0 ls0 ws0"> signed int tempP,tempI,tempD,TempOut;</div><div class="t m0 x3 h5 y15 ff3 fs1 fc0 sc0 ls0 ws0">// PID</div><div class="t m0 x3 h4 y16 ff3 fs1 fc0 sc0 ls0 ws0"> tempP = Tparam[ path *2 ] - TpreTeat[path]; // <span class="ff2">计算</span>e(t)..<span class="_ _3"></span><span class="ff2">基本偏差</span></div><div class="t m0 x3 h4 y17 ff3 fs1 fc0 sc0 ls0 ws0"> tempSigmaEt[path] += tempP; // sigma e(t)..<span class="ff2">累计偏差积分项</span></div><div class="t m0 x3 h4 y18 ff3 fs1 fc0 sc0 ls0 ws0"> if (tempSigmaEt[path]>60) tempSigmaEt[path]= 60;// <span class="ff2">过度积分的极限处理</span></div></div></div><div class="pi" data-data='{"ctm":[1.611850,0.000000,0.000000,1.611850,0.000000,0.000000]}'></div></div>
</body>
</html>