Design of an Automatic Control Algorithm for Energy-Efficient ...
Design of an Automatic Control Algorithm for Energy-Efficient ...
Design of an Automatic Control Algorithm for Energy-Efficient ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
11 Matlab implementation 114<br />
11.3 Programming<br />
The controller layout is completely done in Simulink’s graphical programming. The dis-<br />
turb<strong>an</strong>ce estimator <strong>an</strong>d the optimiser, as the most complicated parts, are entirely written<br />
in C-code.<br />
The optimiser code is distributed over five files in order to increase the readabil-<br />
ity <strong>an</strong>d re-usability. A chart showing this structure, the containing functions <strong>an</strong>d the<br />
dependencies is found in Figure 11.3.<br />
��������������<br />
������<br />
����������<br />
������������������������<br />
������������������������<br />
������������������������������<br />
��������������<br />
�����������������������������<br />
����������������<br />
������������������<br />
���������������������<br />
���������<br />
���������������<br />
������������������<br />
����������������������������<br />
�����������������������������<br />
�������������������<br />
�����������������������<br />
������������������������<br />
����������������������<br />
�����������<br />
�����������<br />
���������<br />
����������������<br />
�������������������<br />
��������������������������������<br />
�������������������������������<br />
��������������������������������<br />
����������������������������������<br />
����������������������������������<br />
��������������������������������<br />
������������������������������<br />
�������������������������<br />
�����������������������������<br />
�����������������<br />
����������������<br />
�������������������������<br />
����������������������������<br />
����������������������������<br />
�������������������<br />
��������������������<br />
�����������������������������<br />
������������������������<br />
Figure 11.3: The structure <strong>an</strong>d dependencies <strong>of</strong> the optimiser C-code.<br />
The IMEA optimiser code was kept as general as possible to be able to use it with-<br />
out much ef<strong>for</strong>t in other projects or even <strong>for</strong> other purposes. Its main function is called<br />
by a Matlab S-function which c<strong>an</strong>, due to its special structure <strong>an</strong>d containing functions,<br />
be integrated with a block into Simulink models. This file prepares the input values<br />
<strong>for</strong> the optimiser, adapts the limits <strong>an</strong>d parameters <strong>an</strong>d h<strong>an</strong>ds them through pointers<br />
onto special structures to the optimiser. The objective function <strong>an</strong>d the system simula-