-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathpid_structure.tex
More file actions
62 lines (45 loc) · 2.04 KB
/
pid_structure.tex
File metadata and controls
62 lines (45 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
\begin{tikzpicture}[ auto, node distance=1.5cm, >=Latex,
signal_label/.style={fill=white, inner sep=1.5pt, font=\small},
block/.style={draw, fill=white, rectangle, align=center,
minimum height=2*\ht\strutbox, minimum width=7*\ht\strutbox,
font=\small},
sum/.style={draw, fill=white, circle, inner sep=1pt} ]
% Nodes
\node [signal_label] (input_text) {задание};
\node [sum, right=0.6cm of input_text] (sum1) {\Large $\Sigma$};
% Main control loop distance
\node [sum, right=6.5cm of sum1] (sum2) {\Large $\Sigma$};
% Branch point (error signal)
\node [coordinate, right=1.2cm of sum1] (branch) {};
% PID Blocks: positioned exactly between branch and sum2
\node [block] (integral) at ($(branch)!0.5!(sum2)$)
{ \textbf{I} $K_I \int_{0}^{t} e(t) dt$ };
\node [block] (prop) at ($(integral.center) + (0, 1.2)$)
{ \textbf{P} \qquad $K_P e(t)$ };
\node [block] (deriv) at ($(integral.center) + (0, -1.2)$)
{ \textbf{D} \qquad $K_D \frac{de}{dt}$ };
% Process and output nodes
\node [block, right=0.6cm of sum2] (process) {\textbf{процесс}};
\node [signal_label, right=0.6cm of process] (out_text) {выход};
\node [coordinate] (end_point) at ($(out_text.east) + (0.6,0)$) {};
\node [coordinate] (feedback_node) at ($(out_text.east)!0.5!(end_point)$) {};
% Connections
\draw [->] (input_text) -- node[above, pos=0.8, font=\footnotesize] {$+$}
(sum1);
\node [signal_label] (err_text) at (branch) {ошибка};
\draw [->] (sum1) -- (err_text);
% Signal branching to PID components
\draw [->] (err_text) -- (integral);
\draw [->] (err_text) |- (prop);
\draw [->] (err_text) |- (deriv);
% Signal summing from PID components
\draw [->] (prop) -| (sum2);
\draw [->] (integral) -- (sum2);
\draw [->] (deriv) -| (sum2);
\draw [->] (sum2) -- (process);
\draw [->] (process) -- (out_text);
\draw [->] (out_text) -- (end_point);
% Feedback loop
\draw [->] (feedback_node) |- ++(0,-2.0) -| node[left,
pos=0.98,font=\footnotesize] {$-$} (sum1);
\end{tikzpicture}