Skip to content

Commit

Permalink
BF: PID Controller (SISO) #1048
Browse files Browse the repository at this point in the history
  • Loading branch information
amesin13 committed Oct 1, 2024
1 parent f2c508f commit ffc3d39
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/mlpro/bf/control/controllers/pid_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from mlpro.bf.math.basics import Log,Set
from mlpro.bf.mt import Log, Task
from mlpro.bf.systems import Action
from mlpro.bf.control.basics import CTRLError, Controller
from mlpro.bf.control.basics import ControlError, Controller
from mlpro.bf.systems.basics import ActionElement
from mlpro.bf.various import Log
from datetime import datetime, timedelta
Expand Down Expand Up @@ -76,12 +76,13 @@ def set_parameter(self, **p_param):
self.Ti = p_param.get('Ti',self.Ti)
#set Tv value
p_param.get('Tv',self.Tv)


## -------------------------------------------------------------------------------------------------
def get_parameter_values(self)-> np.ndarray:
return np.array([self.Kp,self.Ti,self.Tv])

## -------------------------------------------------------------------------------------------------

def _compute_action(self, p_ctrl_error: CTRLError, p_action_element: ActionElement, p_ctrl_id: int = 0, p_ae_id: int = 0):
def _compute_action(self, p_ctrl_error: ControlError, p_action_element: ActionElement, p_ctrl_id: int = 0, p_ae_id: int = 0):

"""
Custom method to compute and an action based on an incoming control error. The result needs
Expand Down

0 comments on commit ffc3d39

Please sign in to comment.