\section{pid\_\-filter Struct Reference}
\label{structpid__filter}\index{pid\_\-filter@{pid\_\-filter}}
{\tt \#include $<$pid.h$>$}

\subsection*{Data Fields}
\begin{CompactItemize}
\item 
int16\_\-t {\bf gain\_\-P}
\item 
int16\_\-t {\bf gain\_\-I}
\item 
int16\_\-t {\bf gain\_\-D}
\item 
uint8\_\-t {\bf out\_\-shift}
\item 
uint8\_\-t {\bf derivate\_\-nb\_\-samples}
\item 
uint8\_\-t {\bf index}
\item 
int32\_\-t {\bf prev\_\-samples} [PID\_\-DERIVATE\_\-FILTER\_\-MAX\_\-SIZE]
\item 
int32\_\-t {\bf max\_\-in}
\item 
int32\_\-t {\bf max\_\-I}
\item 
int32\_\-t {\bf max\_\-out}
\item 
int32\_\-t {\bf integral}
\item 
int32\_\-t {\bf prev\_\-D}
\item 
int32\_\-t {\bf prev\_\-out}
\end{CompactItemize}


\subsection{Detailed Description}
this is the \doxyref{pid\_\-filter}{p.}{structpid__filter} structure 

Definition at line 32 of file pid.h.

\subsection{Field Documentation}
\index{pid\_\-filter@{pid\_\-filter}!gain\_\-P@{gain\_\-P}}
\index{gain\_\-P@{gain\_\-P}!pid_filter@{pid\_\-filter}}
\subsubsection[gain\_\-P]{\setlength{\rightskip}{0pt plus 5cm}int16\_\-t {\bf pid\_\-filter::gain\_\-P}}\label{structpid__filter_ff0a8ea235749abd064a9db04e71c622}


Gain of Proportionnal module 

Definition at line 34 of file pid.h.

Referenced by pid\_\-do\_\-filter(), pid\_\-get\_\-gain\_\-P(), pid\_\-init(), and pid\_\-set\_\-gains().\index{pid\_\-filter@{pid\_\-filter}!gain\_\-I@{gain\_\-I}}
\index{gain\_\-I@{gain\_\-I}!pid_filter@{pid\_\-filter}}
\subsubsection[gain\_\-I]{\setlength{\rightskip}{0pt plus 5cm}int16\_\-t {\bf pid\_\-filter::gain\_\-I}}\label{structpid__filter_96843c843bc34afd65325bf87994e7f7}


Gain of Integral module 

Definition at line 35 of file pid.h.

Referenced by pid\_\-do\_\-filter(), pid\_\-get\_\-gain\_\-I(), and pid\_\-set\_\-gains().\index{pid\_\-filter@{pid\_\-filter}!gain\_\-D@{gain\_\-D}}
\index{gain\_\-D@{gain\_\-D}!pid_filter@{pid\_\-filter}}
\subsubsection[gain\_\-D]{\setlength{\rightskip}{0pt plus 5cm}int16\_\-t {\bf pid\_\-filter::gain\_\-D}}\label{structpid__filter_a95e3ccf938475c92318b2fbeb7c3920}


Gain of Derivate module 

Definition at line 36 of file pid.h.

Referenced by pid\_\-do\_\-filter(), pid\_\-get\_\-gain\_\-D(), and pid\_\-set\_\-gains().\index{pid\_\-filter@{pid\_\-filter}!out\_\-shift@{out\_\-shift}}
\index{out\_\-shift@{out\_\-shift}!pid_filter@{pid\_\-filter}}
\subsubsection[out\_\-shift]{\setlength{\rightskip}{0pt plus 5cm}uint8\_\-t {\bf pid\_\-filter::out\_\-shift}}\label{structpid__filter_9da0796f18f142f5486c1cc79222ebeb}


big common divisor for output 

Definition at line 38 of file pid.h.

Referenced by pid\_\-do\_\-filter(), pid\_\-get\_\-out\_\-shift(), and pid\_\-set\_\-out\_\-shift().\index{pid\_\-filter@{pid\_\-filter}!derivate\_\-nb\_\-samples@{derivate\_\-nb\_\-samples}}
\index{derivate\_\-nb\_\-samples@{derivate\_\-nb\_\-samples}!pid_filter@{pid\_\-filter}}
\subsubsection[derivate\_\-nb\_\-samples]{\setlength{\rightskip}{0pt plus 5cm}uint8\_\-t {\bf pid\_\-filter::derivate\_\-nb\_\-samples}}\label{structpid__filter_6a58c815fa4e9efd0f1fb56c92db0f1e}


sample count for derivate filter 

Definition at line 40 of file pid.h.

Referenced by pid\_\-do\_\-filter(), pid\_\-get\_\-derivate\_\-filter(), pid\_\-init(), and pid\_\-set\_\-derivate\_\-filter().\index{pid\_\-filter@{pid\_\-filter}!index@{index}}
\index{index@{index}!pid_filter@{pid\_\-filter}}
\subsubsection[index]{\setlength{\rightskip}{0pt plus 5cm}uint8\_\-t {\bf pid\_\-filter::index}}\label{structpid__filter_1876830a8dd4b710a8e81d223f244702}


index in circular buffer below 

Definition at line 41 of file pid.h.

Referenced by pid\_\-do\_\-filter(), and pid\_\-get\_\-value\_\-in().\index{pid\_\-filter@{pid\_\-filter}!prev\_\-samples@{prev\_\-samples}}
\index{prev\_\-samples@{prev\_\-samples}!pid_filter@{pid\_\-filter}}
\subsubsection[prev\_\-samples]{\setlength{\rightskip}{0pt plus 5cm}int32\_\-t {\bf pid\_\-filter::prev\_\-samples}[PID\_\-DERIVATE\_\-FILTER\_\-MAX\_\-SIZE]}\label{structpid__filter_ce8c9d4eb93c602603fd1e32720a7416}


previous in (circular buf) 

Definition at line 42 of file pid.h.

Referenced by pid\_\-do\_\-filter(), pid\_\-get\_\-value\_\-in(), and pid\_\-reset().\index{pid\_\-filter@{pid\_\-filter}!max\_\-in@{max\_\-in}}
\index{max\_\-in@{max\_\-in}!pid_filter@{pid\_\-filter}}
\subsubsection[max\_\-in]{\setlength{\rightskip}{0pt plus 5cm}int32\_\-t {\bf pid\_\-filter::max\_\-in}}\label{structpid__filter_ec68c8767129a9d98b0a543fb89bcfcb}


In saturation levels 

Definition at line 44 of file pid.h.

Referenced by pid\_\-do\_\-filter(), pid\_\-get\_\-max\_\-in(), and pid\_\-set\_\-maximums().\index{pid\_\-filter@{pid\_\-filter}!max\_\-I@{max\_\-I}}
\index{max\_\-I@{max\_\-I}!pid_filter@{pid\_\-filter}}
\subsubsection[max\_\-I]{\setlength{\rightskip}{0pt plus 5cm}int32\_\-t {\bf pid\_\-filter::max\_\-I}}\label{structpid__filter_d5116a2ef7d5679bec27c1bd42010684}


Integral saturation levels 

Definition at line 45 of file pid.h.

Referenced by pid\_\-do\_\-filter(), pid\_\-get\_\-max\_\-I(), and pid\_\-set\_\-maximums().\index{pid\_\-filter@{pid\_\-filter}!max\_\-out@{max\_\-out}}
\index{max\_\-out@{max\_\-out}!pid_filter@{pid\_\-filter}}
\subsubsection[max\_\-out]{\setlength{\rightskip}{0pt plus 5cm}int32\_\-t {\bf pid\_\-filter::max\_\-out}}\label{structpid__filter_e8bda955ae9a492d293d4108dd05b563}


Out saturation levels 

Definition at line 46 of file pid.h.

Referenced by pid\_\-do\_\-filter(), pid\_\-get\_\-max\_\-out(), and pid\_\-set\_\-maximums().\index{pid\_\-filter@{pid\_\-filter}!integral@{integral}}
\index{integral@{integral}!pid_filter@{pid\_\-filter}}
\subsubsection[integral]{\setlength{\rightskip}{0pt plus 5cm}int32\_\-t {\bf pid\_\-filter::integral}}\label{structpid__filter_2f4c8e262c2056f5fd26a7e985223c58}


previous integral parameter 

Definition at line 48 of file pid.h.

Referenced by pid\_\-do\_\-filter(), pid\_\-get\_\-value\_\-I(), and pid\_\-reset().\index{pid\_\-filter@{pid\_\-filter}!prev\_\-D@{prev\_\-D}}
\index{prev\_\-D@{prev\_\-D}!pid_filter@{pid\_\-filter}}
\subsubsection[prev\_\-D]{\setlength{\rightskip}{0pt plus 5cm}int32\_\-t {\bf pid\_\-filter::prev\_\-D}}\label{structpid__filter_fabe4c38e82692917a3a8a9ed9d0755a}


previous derivate parameter 

Definition at line 49 of file pid.h.

Referenced by pid\_\-do\_\-filter(), pid\_\-get\_\-value\_\-D(), and pid\_\-reset().\index{pid\_\-filter@{pid\_\-filter}!prev\_\-out@{prev\_\-out}}
\index{prev\_\-out@{prev\_\-out}!pid_filter@{pid\_\-filter}}
\subsubsection[prev\_\-out]{\setlength{\rightskip}{0pt plus 5cm}int32\_\-t {\bf pid\_\-filter::prev\_\-out}}\label{structpid__filter_78ede12a6570627ba9951eaca724238c}


previous out command (for debug only) 

Definition at line 50 of file pid.h.

Referenced by pid\_\-do\_\-filter(), pid\_\-get\_\-value\_\-out(), and pid\_\-reset().

The documentation for this struct was generated from the following file:\begin{CompactItemize}
\item 
aversive\_\-10-03-12/modules/devices/control\_\-system/filters/pid/{\bf pid.h}\end{CompactItemize}
