Skip to content

Commit

Permalink
BF: Basics of closed-loop control #1046
Browse files Browse the repository at this point in the history
  • Loading branch information
detlefarend committed Aug 31, 2024
1 parent 921b41b commit 501fd80
Show file tree
Hide file tree
Showing 19 changed files with 374 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.. _target_bf_control:
Closed-loop Control
===================

...

**Learn more**

.. toctree::
:maxdepth: 2
:glob:

control/*


**Cross Reference**

- :ref:`API Reference BF-Control <target_api_bf_control>`
- :ref:`API Reference BF-Control Pool Objects <target_pool_bf_control>`
- :ref:`BF-Systems - Basics of State-based Systems <target_bf_systems>`
Empty file.
22 changes: 22 additions & 0 deletions doc/rtd/content/03_machine_learning/mlpro_oa/sub/05_oa_control.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.. _target_oa_control:
Online Adaptive Control
=======================

Further descriptions coming soon...


**Learn more**

.. toctree::
:maxdepth: 2
:glob:

oa_control/*


**Cross Reference**

- :ref:`Howtos OA-Control <target_howto_oa_control>`
- :ref:`API Reference OA-Control <target_api_oa_control>`
- :ref:`API Reference OA-Control Pool Objects <target_api_pool_oa_control>`
- :ref:`BF-Control - Basics of Closed-loop Control <target_bf_control>`
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Closed-loop Control
===================

.. toctree::
:maxdepth: 1
:glob:

control/*
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. _target_howto_oa_control:
Online Adaptive Control
=======================

.. toctree::
:maxdepth: 1
:glob:

control/*
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.. _target_api_bf_control:
BF-CONTROL - Closed-loop Control
================================

.. image:: images/MLPro-BF-Control_class_diagram.drawio.png
:scale: 50%

.. automodule:: mlpro.bf.control.basics
:members:
:undoc-members:
:private-members:
:show-inheritance:
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.. _target_api_oa_control:
OA Control
==========

.. image:: control/images/MLPro-OA-Control.drawio.png
:scale: 50%

.. automodule:: mlpro.oa.control.basics
:members:
:undoc-members:
:private-members:
:show-inheritance:
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<mxfile host="Electron" modified="2024-08-11T14:31:04.131Z" agent="5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/20.7.4 Chrome/106.0.5249.199 Electron/21.3.3 Safari/537.36" etag="7Db_ZHueusMjEtbRuxTG" version="20.7.4" type="device"><diagram id="C5RBs43oDa-KdzZeNtuy" name="Page-1">7V1bd6I6FP41rtNz1tLFRSk+eutlxl7tTGf6wooQlBYIE6Ct8+tPAgFBotKKjtNquyqEkMv+vr2THTZpTe45r6cYeNMLZEC7JgnGa03u1yRJUttN8kVTZnGKKMlKnDLBlsHS5gkj6zdkiQJLDS0D+rmMAUJ2YHn5RB25LtSDXBrAGL3ks5nIztfqgQksJIx0YBdT7y0jmLKOyUk36IUzaE2mSdVKi3XZAUlu1hV/Cgz0kkmSBzW5hxEK4iPntQdtKr5EMPfns3t7+KScfrnxf4Fv3a93l9/rcWEnb7kl7QOGbvDuoi97TfTUvvDb96p90wzML/bDST3tWzBLJAYNIkB2inAwRRPkAnswT+1iFLoGpMUK5GyeZ4iQRxJFkvgIg2DG2ADCAJGkaeDY7KqJ3KCHbISjGuWTE4F8SDp0jQ7FnCSPbaQ/xUknlp3cWFIQTGA+CrHOekWg0y7qBpbvv33/oSNHnF1pSb4A4AkMVkhJZGShosnQisn5FCIHBnhGMmBog8B6znMPMApP0nxzlMgBA4oP2qpmPwM7ZDVdde6A/1SjaJKmyiIV5tHYbPgBhsDxG6PoO85D6hTIJcduROr+b4EA/ovl2MCFDKiECzI5B7Y1ccmxTuQPCXrdZ4gDi2hbh10IKAO6+tSyjSGYoZBK1Q+A/pScdacIW79JsSDBlFzGAaNKU8jlGNE7Gc0w9Eme6wR6MU0aAj9geXRk28DzrXHUYJrFIdBabhcFAXKSgnLsTZU6bgpGT6mdiJhKuJdhqgGgauppzswVRVfh2KRXm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u4O5eXJurdeVTxTxu9KcvOHp+Hu4VkH8L7f5ysEabmINTVPiW0NDGSstZV+toSg1pHZ2cnKwhiV05fhgDddRUSlNxb20hurBGm73bb59tIbE5jTk44wnfnywhiV0pfie38EaLjEnf4E15L3K2S4AuoN32YlE8ewHvb/RSk5/Zq/1X1nh8dmstmQxnUUJbfEdePmqVz+xR9O733LbQuaD/fvBTsxP9h34VWFJu38Fnr9vgfgnsH73vgXw1QoyHCFnPxNSkOM5Q+jJLEuXdxBr+/zY0R4J71qlVqX8iKTIuWXpQv6msDL/xsvYq2Sa28DhHuGnKEhxzSYO83zzjRzSmw+bOXy+zRyUsps5SML65fu/aI7HmwGoRc1imzlkt3FItOUzbOWw0v7s5VYO3BbzAmc/7+S9GlD/9FYOUgHTT7uVg24D39fI8IWjYKW4j1edEUv4EJtHHHZT+CMvHFVjK8ruptCuYAC4/S7ehi+jsHU/+tH9Nrt86Hd5+74Aw9ACop/xu0b0iLB5caMzj75fH+fzY7Lblv+530CrhhBiMgvdxZSAP9crTgF2styzxtUv//ZXWbecv22ZXPTLVyFbsVteDPQRFxxpsZ34DWsCbSrbyK0YHEZGUOLcAmyhdV51ku/gQH8+B1oUSu8UUiIA7u/xoLnLeMUnihwHOtGWz+BAr7Y1e+lB85tcIo7wE7nQFcG6Qx+av+rO2TkkdaLp9NdBBkx1l54Qn+viqj/QRucXH8Sx1Ge6DTXbcqzd7ET429q3nQg/sTdTkR6X9W8Tp2MTRb77PtRPyezs+jl8mg2wcDWRBM4Cpw+D0Ds6ILshsmJrh7t+cW10MfBEi7HNGOgKd/XhmeBKi1+2H2tVdi81d4v7XsWuWtyb7APTD6wgq3fCqkpFEqu2TkWUbalIEjyQ992T5XCOux5d2itn/QMEO+6js5663IyrrSS+Yx1XP76rLh4iGrN8W21YNglprMijI6fzfxYUk2D+T5fkwf8=</diagram></mxfile>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. _target_pool_bf_control:
BF-CONTROL - Closed-loop Control
================================

.. toctree::
:maxdepth: 2
:glob:

bf_control/*
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. _target_api_pool_oa_control:
OA Control
==========

.. toctree::
:maxdepth: 2
:glob:

control/*
Empty file.
Empty file.
136 changes: 136 additions & 0 deletions src/mlpro/bf/control/basics.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
## -------------------------------------------------------------------------------------------------
## -- Project : MLPro - The integrative middleware framework for standardized machine learning
## -- Package : mlpro.bf.control
## -- Module : basics.py
## -------------------------------------------------------------------------------------------------
## -- History :
## -- yyyy-mm-dd Ver. Auth. Description
## -- 2024-08-31 0.0.0 DA Creation
## -------------------------------------------------------------------------------------------------

"""
Ver. 0.0.0 (2024-08-31)
This module provides ...
"""


# from mlpro.bf.various import *




## -------------------------------------------------------------------------------------------------
## -------------------------------------------------------------------------------------------------
class Example:
"""
The __init__ method should be documented in the class level docstring and the docstring itself
should not go beyond 100 characters length (within the dash separator). Sections inside the
docstring can be seperated like the reStructuredText format.
Parameters are documented in the Parameters section.
Public attributes of classes are documented inisde Attributes section.
Returns attronites are documented in the Returns section.
A few examples of data types: int / str / bool / list of str / tuple of int / float / None / dict.
If the parameters have default values, you should add "TYPE, optional" as part of the type
and "The default is ...." as part of the description.
.. _Further_formatting_information:
https://numpydoc.readthedocs.io/en/latest/format.html
Notes
-----
The content inside the section should be indented.
Parameters
----------
p_arg1 : str
Explanation of the first parameter.
p_arg2 : bool
Explanation of the second parameter. The default is True.
Attributes
----------
C_MY_CONSTANT = 'My static value'
Explanation of the public constant C_MY_CONSTANT.
"""

attr1 = None

## -------------------------------------------------------------------------------------------------
def __init__( self,
p_arg1 : str,
p_arg2 : bool = True ):

self.attr1 = p_arg1
pass


## -------------------------------------------------------------------------------------------------
def example_method(self, p_arg1):
"""
Example on how to document return type.
Notes
-----
The name of the return value is required for better understanding
of the code. The return value is parsed similarly as parameters
value, meaning that multiple return value is also possible.
Parameters
----------
p_arg1 : TYPE
explanation of the first parameter.
Returns
-------
p_arg1: TYPE
Description of the returned value.
"""
return p_arg1


## -------------------------------------------------------------------------------------------------
def example_method_no_return(self, p_arg1):
"""
Example on how to document return type.
Notes
-----
When there is no item to be returned, the return section is omitted.
Parameters
----------
p_arg1 : TYPE
explanation of the first parameter.
"""
return





## -------------------------------------------------------------------------------------------------
## -------------------------------------------------------------------------------------------------
class Example2:
"""
...
"""

## -------------------------------------------------------------------------------------------------
def __init__(self, p_arg1, p_arg2):
pass


## -------------------------------------------------------------------------------------------------
def example_method(self, p_arg1):
"""
"""
pass



Empty file.
136 changes: 136 additions & 0 deletions src/mlpro/oa/control/basics.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
## -------------------------------------------------------------------------------------------------
## -- Project : MLPro - The integrative middleware framework for standardized machine learning
## -- Package : mlpro.oa.control
## -- Module : basics.py
## -------------------------------------------------------------------------------------------------
## -- History :
## -- yyyy-mm-dd Ver. Auth. Description
## -- 2024-08-31 0.0.0 DA Creation
## -------------------------------------------------------------------------------------------------

"""
Ver. 0.0.0 (2024-08-31)
This module provides ...
"""


# from mlpro.bf.various import *




## -------------------------------------------------------------------------------------------------
## -------------------------------------------------------------------------------------------------
class Example:
"""
The __init__ method should be documented in the class level docstring and the docstring itself
should not go beyond 100 characters length (within the dash separator). Sections inside the
docstring can be seperated like the reStructuredText format.
Parameters are documented in the Parameters section.
Public attributes of classes are documented inisde Attributes section.
Returns attronites are documented in the Returns section.
A few examples of data types: int / str / bool / list of str / tuple of int / float / None / dict.
If the parameters have default values, you should add "TYPE, optional" as part of the type
and "The default is ...." as part of the description.
.. _Further_formatting_information:
https://numpydoc.readthedocs.io/en/latest/format.html
Notes
-----
The content inside the section should be indented.
Parameters
----------
p_arg1 : str
Explanation of the first parameter.
p_arg2 : bool
Explanation of the second parameter. The default is True.
Attributes
----------
C_MY_CONSTANT = 'My static value'
Explanation of the public constant C_MY_CONSTANT.
"""

attr1 = None

## -------------------------------------------------------------------------------------------------
def __init__( self,
p_arg1 : str,
p_arg2 : bool = True ):

self.attr1 = p_arg1
pass


## -------------------------------------------------------------------------------------------------
def example_method(self, p_arg1):
"""
Example on how to document return type.
Notes
-----
The name of the return value is required for better understanding
of the code. The return value is parsed similarly as parameters
value, meaning that multiple return value is also possible.
Parameters
----------
p_arg1 : TYPE
explanation of the first parameter.
Returns
-------
p_arg1: TYPE
Description of the returned value.
"""
return p_arg1


## -------------------------------------------------------------------------------------------------
def example_method_no_return(self, p_arg1):
"""
Example on how to document return type.
Notes
-----
When there is no item to be returned, the return section is omitted.
Parameters
----------
p_arg1 : TYPE
explanation of the first parameter.
"""
return





## -------------------------------------------------------------------------------------------------
## -------------------------------------------------------------------------------------------------
class Example2:
"""
...
"""

## -------------------------------------------------------------------------------------------------
def __init__(self, p_arg1, p_arg2):
pass


## -------------------------------------------------------------------------------------------------
def example_method(self, p_arg1):
"""
"""
pass



0 comments on commit 501fd80

Please sign in to comment.