liba 0.1.15
An algorithm library based on C/C++
 
Loading...
Searching...
No Matches
pid_neuro.h File Reference

single neuron proportional integral derivative controller More...

#include "pid.h"
Include dependency graph for pid_neuro.h:

Go to the source code of this file.

Data Structures

struct  a_pid_neuro
 instance structure for single neuron PID controller More...
 

Macros

#define a_pid_neuro_init(ctx)
 initialize for single neuron PID controller
 

Typedefs

typedef struct a_pid_neuro a_pid_neuro
 
typedef struct a_pid_neuro a::pid_neuro
 

Functions

void a_pid_neuro_set_kpid (a_pid_neuro *ctx, a_float k, a_float kp, a_float ki, a_float kd)
 set proportional integral derivative constant for single neuron PID controller
 
void a_pid_neuro_set_wpid (a_pid_neuro *ctx, a_float wp, a_float wi, a_float wd)
 set proportional integral derivative weight for single neuron PID controller
 
a_float a_pid_neuro_run (a_pid_neuro *ctx, a_float set, a_float fdb)
 calculate for single neuron PID controller
 
a_float a_pid_neuro_inc (a_pid_neuro *ctx, a_float set, a_float fdb)
 calculate for incremental single neuron PID controller
 
void a_pid_neuro_zero (a_pid_neuro *ctx)
 zeroing for single neuron PID controller
 

Detailed Description

single neuron proportional integral derivative controller

\begin{cases} x_i=e(k)\\ x_p=e(k)-e(k-1)\\ x_d=e(k)-2e(k-1)+e(k-2) \end{cases}

\begin{cases} \omega_{p}(k)=\omega_{p}(k-1)+\eta_{p}e(k)u(k)x_{p}(k)\\ \omega_{i}(k)=\omega_{i}(k-1)+\eta_{i}e(k)u(k)x_{i}(k)\\ \omega_{d}(k)=\omega_{d}(k-1)+\eta_{d}e(k)u(k)x_{d}(k) \end{cases}

\[ u(k)=u(k-1)+K\frac{w_{p}(k)x_{p}(k)+w_{i}(k)x_{i}(k)+w_{d}(k)x_{d}(k)} {|\omega_{p}(k)|+|\omega_{i}(k)|+|\omega_{d}(k)|} \]