home *** CD-ROM | disk | FTP | other *** search
- /***********************************************************************
-
- FILE
- pidloop.h - simple control loop data structure definition
-
- LAST UPDATE
- 10 March 1988
- name changes
-
- Copyright (c) 1985-1988 D.M. Auslander and C.H. Tham
-
- ***********************************************************************/
-
- #define NAMESIZE 12 /* max characters for loop name */
-
- struct _pidloop {
- char cl_name[NAMESIZE]; /* pointer to cntrol loop name string */
-
- int cl_inchan; /* input channel number */
- int cl_outchan; /* output channel number */
-
- double cl_setpoint; /* controller setpoint */
- double cl_feedback; /* controller feedback value */
-
- double cl_kp; /* proportional gain */
- double cl_ki; /* integral gain */
- double cl_kd; /* derivative gain */
-
- double cl_err0; /* error at (k)-th instant */
- double cl_err1; /* error at (k-1)-th instant */
- double cl_err2; /* error at (k-2)-th instant */
-
- double cl_output; /* controller output */
-
- double cl_outmin; /* lower limit of output value */
- double cl_outmax; /* upper limit of output value */
-
- double cl_tsamp; /* sampling interval */
-
- };
-
-
- typedef struct _pidloop PIDLOOP;
-
-