-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
[GSoC] Added PIDController class to control module. #26781
Conversation
✅ Hi, I am the SymPy bot. I'm here to help you write a release notes entry. Please read the guide on how to write release notes. Your release notes are in good order. Here is what the release notes will look like:
This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.14. Click here to see the pull request description that was parsed.
Update The release notes on the wiki have been updated. |
🟠Hi, I am the SymPy bot. I've noticed that some of your commits add or delete files. Since this is sometimes done unintentionally, I wanted to alert you about it. This is an experimental feature of SymPy Bot. If you have any feedback on it, please comment at sympy/sympy-bot#75. The following commits add new files:
The following commits delete files:
If these files were added/deleted on purpose, you can ignore this message. |
Benchmark results from GitHub Actions Lower numbers are good, higher numbers are bad. A ratio less than 1 Significantly changed benchmark results (PR vs master) Significantly changed benchmark results (master vs previous release) Full benchmark results can be found as artifacts in GitHub Actions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if we should add the pid-controller image at doc/src/modules/physics/control/pid-controller.png
, that is a place for our technical documentation .rst
files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can also showcase solving a good symbolic question on the pid-controller at doc/src/guides/physics/control_problems.rst
using sympy. Maybe after this PR is merged.
Also, do not commit binary image files. This PR needs to be reopened without the png or it needs to be removed, squashed, and force pushed. |
sympy/physics/control/lti.py
Outdated
>>> s = Symbol('s') | ||
>>> tf1 = TransferFunction(1, s + 1, s) | ||
>>> tf1.bandwidth() | ||
1.00000000000000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens when you have a symbolic transferfunction:
>>> tf1 = TransferFunction(a, s + a, s)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, for a symbolic power_gain=Symbol('b')
?
sympy/physics/control/lti.py
Outdated
|
||
When using symbolic TransferFunction, make sure to define symbols along with | ||
their signs properly. | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please cite a reference for this "bandwidth" calculation. I'm not immediately familiar with this and what the "power gain" is.
Also, this should be in a separate PR, as it is not related to PID.
I've seen a similar thing in
And the image file is located in doc/src/modules/physics/continumm_mechanics/allowed-sign-conventions.png . Using this as a reference I've put my image file in doc/src/modules/physics/control/pid-controller.png
|
PIDController Class Added to Control Module
PIDController
class in the control module.PIDController
class allows for the creation of PID controllers with the following parameters:kp
: Proportional gain (defaults toSymbol('kp')
if not provided).ki
: Integral gain (defaults toSymbol('ki')
if not provided).kd
: Derivative gain (defaults toSymbol('kd')
if not provided).tf
: Derivative filter time constant (defaults to 0 if not provided).var
: The complex frequency variable (defaults tos
if not provided).References to other Issues or PRs
Fixes: #26163
Brief description of what is fixed or changed
Other comments
Release Notes
PIDController
class in the control module.