liba 0.1.15
An algorithm library based on C/C++
 
Loading...
Searching...
No Matches
proportional integral derivative controller
Collaboration diagram for proportional integral derivative controller:

Data Structures

struct  a_pid
 instance structure for PID controller More...
 

Macros

#define a_pid_init(ctx)
 initialize for PID controller
 

Typedefs

typedef struct a_pid a_pid
 

Functions

void a_pid_set_kpid (a_pid *ctx, a_float kp, a_float ki, a_float kd)
 set proportional integral derivative constant for PID controller
 
a_float a_pid_run (a_pid *ctx, a_float set, a_float fdb)
 calculate for PID controller
 
a_float a_pid_pos (a_pid *ctx, a_float set, a_float fdb)
 calculate for positional PID controller
 
a_float a_pid_inc (a_pid *ctx, a_float set, a_float fdb)
 calculate for incremental PID controller
 
void a_pid_zero (a_pid *ctx)
 zeroing for PID controller
 

Detailed Description

Macro Definition Documentation

◆ a_pid_init

#define a_pid_init ( ctx)
Value:
void a_pid_zero(a_pid *ctx)
zeroing for PID controller

initialize for PID controller

Parameters
[in,out]ctxpoints to an instance of PID controller

Function Documentation

◆ a_pid_inc()

a_float a_pid_inc ( a_pid * ctx,
a_float set,
a_float fdb )

calculate for incremental PID controller

Parameters
[in,out]ctxpoints to an instance of PID controller
[in]setsetpoint value
[in]fdbfeedback value
Returns
output value

◆ a_pid_pos()

a_float a_pid_pos ( a_pid * ctx,
a_float set,
a_float fdb )

calculate for positional PID controller

Parameters
[in,out]ctxpoints to an instance of PID controller
[in]setsetpoint value
[in]fdbfeedback value
Returns
output value

◆ a_pid_run()

a_float a_pid_run ( a_pid * ctx,
a_float set,
a_float fdb )

calculate for PID controller

Parameters
[in,out]ctxpoints to an instance of PID controller
[in]setsetpoint value
[in]fdbfeedback value
Returns
setpoint value

◆ a_pid_set_kpid()

void a_pid_set_kpid ( a_pid * ctx,
a_float kp,
a_float ki,
a_float kd )

set proportional integral derivative constant for PID controller

Parameters
[in,out]ctxpoints to an instance of PID controller
[in]kpproportional constant
[in]kiintegral constant
[in]kdderivative constant

◆ a_pid_zero()

void a_pid_zero ( a_pid * ctx)

zeroing for PID controller

Parameters
[in,out]ctxpoints to an instance of PID controller