PID Neural Network

Classic Control-Feedback Problem

Controller takes target value $r(t)$ and feedback $y(t)$ and produces system input $v(t)$. System generates new output $y(t)$, which is used as a feedback.

PID controller

$$e(t) = r(t)-y(t)$$ $$ v(t) = K_p e(t) + K_i \int\limits_0^{t} e(\tau)d \tau + K_d \frac{de(t)}{dt} $$
$K_p=$ , $K_i=$ , $K_d=$

PID Neural Network Controller

Controller based on a neural network with 2-3-1 structure

P-neuron

P-neuron transfer function: $$ x(t) = \begin{cases} -1 & u(t) < -1 \\ u(t) & -1 \le u(t) \le 1 \\ 1 & u(t) > 1 \end{cases}$$ $u(t)$ — neuron input, $x(t)$ — neuron output

I-neuron

I-neuron transfer function: $$ x(t) = \begin{cases} -1 & x(t) < -1 \\ x(t-1)+u(t) & -1 \le x(t) \le 1 \\ 1 & x(t) > 1 \end{cases}$$ $x(t-1)$ — previous output

D-neuron

D-neuron transfer function: $$ x(t) = \begin{cases} -1 & x(t) < -1 \\ u(t)-u(t-1) & -1 \le x(t) \le 1 \\ 1 & x(t) > 1 \end{cases}$$ $u(t-1)$ — previous input

Learning Process

The aim of PIDNN controller is to minimize: $$ J = \sum\limits_{t=1}^N E_t = \frac{1}{N} \sum\limits_{t=1}^N(r(t) - y(t))^2 $$

$r(t)$ — desired system output
$y(t)$ — real system output (feedback)
$N$ — number of samples

Error Propagation

$$ w_i(n+1) = w_i(n) - \eta \frac{\partial J}{\partial w_i}$$

$$ \frac{\partial J}{\partial w_i} \approx -\frac{2}{N} \sum\limits_{t=1}^N (r(t) - y(t)) \frac{y(t)-y(t-1)}{v(t)-v(t-1)} \dot{x}_i(t) $$

Error Propagation

$$ w_{ij}(n+1) = w_{ij}(n) - \eta \frac{\partial J}{\partial w_{ij}}$$

$$ \frac{\partial J}{\partial w_ij} \approx -\sum\limits_{t=1}^N \delta(t)\frac{\dot{x}_j(t)-\dot{x}_j(t-1)}{\dot{u}_j(t)-\dot{u}_j(t-1)} w_j x_i(t) $$

Controller Performance

References

  1. PID Neural Networks for Time-Delay Systems — H.L. Shu, Y. Pi (2000)
  2. Decoupled Temperature Control System Based on PID Neural Network — H.L. Shu, Y. Pi (2005)
  3. Adaptive System Control with PID Neural Networks — F. Shahrakia, M.A. Fanaeib, A.R. Arjomandzadeha (2009)
  4. Control System Design (Chapter 6) — Karl Johan Åström (2002)
  5. Source code of this presentation on GitHub — Alexey Taktarov (2013)

/

#