⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pid_8h.html

📁 Atmel算法(pid)-步进电机驱动源码 HOWTO,不好用你找我,绝对ok!
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>AVR447: Sine wave driving of three phase motor: pid.h File Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.4.4 --><div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div><h1>pid.h File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>PID controller header file. <p>This file contains defines, typedefs and prototypes for the PID controller.<p><dl compact><dt><b>Application note:</b></dt><dd>AVR447: Sinusoidal driving of three-phase permanent motor using ATmega48/88/168</dd></dl><dl compact><dt><b>Documentation</b></dt><dd>For comprehensive code documentation, supported compilers, compiler settings and supported devices see readme.html</dd></dl><dl compact><dt><b>Author:</b></dt><dd>Atmel Corporation: <a href="http://www.atmel.com">http://www.atmel.com</a> <br> Support email: <a href="mailto:avr@atmel.com">avr@atmel.com</a></dd></dl><dl compact><dt><b>Name</b></dt><dd>RELEASE_1_0 </dd></dl><dl compact><dt><b>Revision</b></dt><dd>1.3 </dd></dl><dl compact><dt><b>RCSfile</b></dt><dd><a class="el" href="pid_8h.html">pid.h</a>,v </dd></dl><dl compact><dt><b>Date</b></dt><dd>2006/03/16 11:57:20 </dd></dl><br><p>Definition in file <a class="el" href="pid_8h-source.html">pid.h</a>.<p><p>This graph shows which files directly or indirectly include this file:<p><center><img src="pid_8h__dep__incl.png" border="0" usemap="#pid.hdep_map" alt=""></center><map name="pid.hdep_map"><area href="pid_8c.html" shape="rect" coords="104,5,155,32" alt=""></map><p><a href="pid_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0"><tr><td></td></tr><tr><td colspan="2"><br><h2>Data Structures</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpidData.html">pidData</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">PID Status.  <a href="structpidData.html#_details">More...</a><br></td></tr><tr><td colspan="2"><br><h2>Defines</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pid_8h.html#a4">FALSE</a>&nbsp;&nbsp;&nbsp;0</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">FALSE constant.  <a href="#a4"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pid_8h.html#a3">MAX_I_TERM</a>&nbsp;&nbsp;&nbsp;(MAX_LONG - (2 * (<a class="el" href="stdint_8h.html#a59">int32_t</a>)MAX_INT))</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pid_8h.html#a1">MAX_INT</a>&nbsp;&nbsp;&nbsp;32767</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Maximum value of integers.  <a href="#a1"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pid_8h.html#a2">MAX_LONG</a>&nbsp;&nbsp;&nbsp;2147483647L</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Maximum value of long integers.  <a href="#a2"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pid_8h.html#a0">SCALING_FACTOR</a>&nbsp;&nbsp;&nbsp;256</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Scaling division factor for PID controller.  <a href="#a0"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pid_8h.html#a5">TRUE</a>&nbsp;&nbsp;&nbsp;(!FALSE)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">TRUE constant.  <a href="#a5"></a><br></td></tr><tr><td colspan="2"><br><h2>Typedefs</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="structpidData.html">pidData</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pid_8h.html#a6">pidData_t</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">PID Status.  <a href="#a6"></a><br></td></tr><tr><td colspan="2"><br><h2>Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="stdint_8h.html#a57">int16_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pid_8h.html#a8">PID_Controller</a> (<a class="el" href="stdint_8h.html#a57">int16_t</a> setPoint, <a class="el" href="stdint_8h.html#a57">int16_t</a> processValue, <a class="el" href="structpidData.html">pidData_t</a> *pid_st)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">PID control algorithm.  <a href="#a8"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pid_8h.html#a7">PID_Init</a> (<a class="el" href="stdint_8h.html#a57">int16_t</a> p_factor, <a class="el" href="stdint_8h.html#a57">int16_t</a> i_factor, <a class="el" href="stdint_8h.html#a57">int16_t</a> d_factor, <a class="el" href="structpidData.html">pidData_t</a> *pid)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialisation of PID controller parameters.  <a href="#a7"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pid_8h.html#a9">PID_Reset_Integrator</a> (<a class="el" href="structpidData.html">pidData_t</a> *pid_st)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resets the integrator.  <a href="#a9"></a><br></td></tr></table><hr><h2>Define Documentation</h2><a class="anchor" name="a4"></a><!-- doxytag: member="pid.h::FALSE" ref="a4" args="" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">#define FALSE&nbsp;&nbsp;&nbsp;0          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>FALSE constant. <p><p>Definition at line <a class="el" href="pid_8h-source.html#l00079">79</a> of file <a class="el" href="pid_8h-source.html">pid.h</a>.<p>Referenced by <a class="el" href="main_8c-source.html#l00594">ActualDirectionUpdate()</a>, <a class="el" href="main_8c-source.html#l00816">CommutationTicksUpdate()</a>, <a class="el" href="main_8c-source.html#l00999">DirectionInputChangeISR()</a>, <a class="el" href="main_8c-source.html#l00930">HallChangeISR()</a>, <a class="el" href="main_8c-source.html#l00135">main()</a>, and <a class="el" href="main_8c-source.html#l00847">MotorSynchronizedUpdate()</a>.    </td>  </tr></table><a class="anchor" name="a3"></a><!-- doxytag: member="pid.h::MAX_I_TERM" ref="a3" args="" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">#define MAX_I_TERM&nbsp;&nbsp;&nbsp;(MAX_LONG - (2 * (<a class="el" href="stdint_8h.html#a59">int32_t</a>)MAX_INT))          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Maximum value of the I-term.<p>This limits the maximum positive or negative value of the I-term. Changing this value leads to a different integral anti-windup limit. Do not increase this value from its default, as it is already at the limit of the underlying data types.<p>Definition at line <a class="el" href="pid_8h-source.html#l00075">75</a> of file <a class="el" href="pid_8h-source.html">pid.h</a>.<p>Referenced by <a class="el" href="pid_8c-source.html#l00065">PID_Controller()</a>, and <a class="el" href="pid_8c-source.html#l00041">PID_Init()</a>.    </td>  </tr></table><a class="anchor" name="a1"></a><!-- doxytag: member="pid.h::MAX_INT" ref="a1" args="" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">#define MAX_INT&nbsp;&nbsp;&nbsp;32767          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Maximum value of integers. <p><p>Definition at line <a class="el" href="pid_8h-source.html#l00063">63</a> of file <a class="el" href="pid_8h-source.html">pid.h</a>.<p>Referenced by <a class="el" href="pid_8c-source.html#l00065">PID_Controller()</a>, and <a class="el" href="pid_8c-source.html#l00041">PID_Init()</a>.    </td>  </tr></table><a class="anchor" name="a2"></a><!-- doxytag: member="pid.h::MAX_LONG" ref="a2" args="" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">#define MAX_LONG&nbsp;&nbsp;&nbsp;2147483647L          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Maximum value of long integers. <p><p>Definition at line <a class="el" href="pid_8h-source.html#l00066">66</a> of file <a class="el" href="pid_8h-source.html">pid.h</a>.    </td>  </tr></table><a class="anchor" name="a0"></a><!-- doxytag: member="pid.h::SCALING_FACTOR" ref="a0" args="" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">#define SCALING_FACTOR&nbsp;&nbsp;&nbsp;256          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Scaling division factor for PID controller. <p>Scaling division factor for the PID controller. The P, I and D gains will be divided by this number.<p>Definition at line <a class="el" href="pid_8h-source.html#l00037">37</a> of file <a class="el" href="pid_8h-source.html">pid.h</a>.<p>Referenced by <a class="el" href="pid_8c-source.html#l00065">PID_Controller()</a>.    </td>  </tr></table><a class="anchor" name="a5"></a><!-- doxytag: member="pid.h::TRUE" ref="a5" args="" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">#define TRUE&nbsp;&nbsp;&nbsp;(!FALSE)          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>TRUE constant. <p><p>Definition at line <a class="el" href="pid_8h-source.html#l00082">82</a> of file <a class="el" href="pid_8h-source.html">pid.h</a>.<p>Referenced by <a class="el" href="main_8c-source.html#l00816">CommutationTicksUpdate()</a>, <a class="el" href="main_8c-source.html#l00847">MotorSynchronizedUpdate()</a>, and <a class="el" href="main_8c-source.html#l01030">Timer1CaptureISR()</a>.    </td>  </tr></table><hr><h2>Typedef Documentation</h2><a class="anchor" name="a6"></a><!-- doxytag: member="pid.h::pidData_t" ref="a6" args="" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">typedef struct <a class="el" href="structpidData.html">pidData</a>  <a class="el" href="structpidData.html">pidData_t</a>          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -