Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pidcontroller] Remove limits, make Ki dependent from the loop time, add reset command #9759

Merged
merged 3 commits into from
Jan 12, 2021

Conversation

fwolter
Copy link
Member

@fwolter fwolter commented Jan 8, 2021

Also fix naming of thread and shutdown executor.

Signed-off-by: Fabian Wolter github@fabian-wolter.de

…he loop time

Also fix naming of thread and shutdown executor.

Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
| `ki` | Decimal | I: [Integral Gain](#integral-i-gain-parameter) Parameter | Y |
| `kd` | Decimal | D: [Derivative Gain](#derivative-d-gain-parameter) Parameter | Y |
| `kdTimeConstant` | Decimal | D-T1: [Derivative Gain Time Constant](#derivative-time-constant-d-t1-parameter) in sec. | Y |
| `integralLowerLimit` | Decimal | The I part of the PID controller will be max this value | Y |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the benefit of renaming? I guess that outputLowerLimit is more clear

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter does not limit the output anymore, but only the integral part.

@@ -93,13 +93,17 @@ public PIDControllerTriggerHandler(Trigger module, ItemRegistry itemRegistry, Ev
throw new IllegalArgumentException("Configured setpoint item not found: " + setpointItemName, e);
}

double outputLowerLimit = getDoubleFromConfig(config, CONFIG_OUTPUT_LOWER_LIMIT);
double outputUpperLimit = getDoubleFromConfig(config, CONFIG_OUTPUT_UPPER_LIMIT);
double outputLowerLimit = getDoubleFromConfig(config, CONFIG_INTEGRAL_LOWER_LIMIT);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But why is this names outputLowerLimit then?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I overlooked that. Thanks!

@J-N-K
Copy link
Member

J-N-K commented Jan 9, 2021

Also I think a limit for the output is useful.

Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
@fwolter
Copy link
Member Author

fwolter commented Jan 9, 2021

The opinions differ. A control expert stated in the forum that even a limit on the I part is hacked. A limit to the output could be applied by the user via a rule.

@J-N-K
Copy link
Member

J-N-K commented Jan 10, 2021

Reading through the thread having a "reset" channel would be better than the limitiation. Why don't we implement that one?

Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
@fwolter fwolter changed the title [pidcontroller] Apply limits only to I-part, make Ki dependent from the loop time [pidcontroller] Remove limits, make Ki dependent from the loop time, add reset command Jan 10, 2021
@fwolter
Copy link
Member Author

fwolter commented Jan 10, 2021

I removed the limits and added a reset command.

@wborn wborn added rebuild Triggers Jenkins PR build and removed rebuild Triggers Jenkins PR build labels Jan 10, 2021
@Hilbrand Hilbrand requested a review from J-N-K January 11, 2021 10:17
@J-N-K J-N-K merged commit 795189d into openhab:main Jan 12, 2021
@wborn wborn added this to the 3.1 milestone Jan 22, 2021
themillhousegroup pushed a commit to themillhousegroup/openhab2-addons that referenced this pull request May 10, 2021
…add reset command (openhab#9759)

* [pidcontroller] Remove limits, make Ki dependent from the loop time

Also fix naming of thread and shutdown executor.

Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
Signed-off-by: John Marshall <john.marshall.au@gmail.com>
thinkingstone pushed a commit to thinkingstone/openhab-addons that referenced this pull request Nov 7, 2021
…add reset command (openhab#9759)

* [pidcontroller] Remove limits, make Ki dependent from the loop time

Also fix naming of thread and shutdown executor.

Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
marcfischerboschio pushed a commit to bosch-io/openhab-addons that referenced this pull request May 5, 2022
…add reset command (openhab#9759)

* [pidcontroller] Remove limits, make Ki dependent from the loop time

Also fix naming of thread and shutdown executor.

Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants