main.compute_controller_output

threshold_controller.main.compute_controller_output(inp, th=10000)

Compute the output of the controller.

This function applies a simple threshold-based decision rule to the input signal. If the most recent sample exceeds the threshold, it returns a high control value, otherwise a low control value. This is a placeholder for more complex decision-making logic that could be implemented in a real controller.

Parameters

Name Type Description Default
inp np.ndarray Input signal array. The threshold comparison is applied to the last sample. required
th float Threshold value for the decision boundary. 10_000

Returns

Name Type Description
int Controller output: 150 if threshold exceeded, 10 otherwise.