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

Allow Weighting of Proportional on Error/Measurement #311

Merged
merged 1 commit into from
Sep 25, 2017

Conversation

krkeegan
Copy link
Collaborator

@krkeegan krkeegan commented Sep 25, 2017

Enables weighting of the proportional calculation method. 1 = proportional on error, 0 = proportional on measurement. Any fraction in between balances the two options.

Code was a suggestion from the author of the PID library:
http://brettbeauregard.com/blog/2017/06/proportional-on-measurement-the-code/

Must be merged with changes to Ground Control as well, MaslowCNC/GroundControl#426.

Enables weighting of the proportional options.  1 = proportional on
error, 0 = proportional on measurement.  Any fraction in between
balances the two options.

Must be merged with changes to Ground Control
@BarbourSmith
Copy link
Member

The code itself looks beautiful and clean, but I'm not sure I fully understand what it does.

This let's us use both the PonM system and the regular system at the same time, but with weights on how much influence each have? That's really cool. Wouldn't a different Kp term be needed for each system?

@BarbourSmith
Copy link
Member

Sorry, should have read the linked article before asking. That's exactly what it does. Here's the relevant section from the author of the PID library:

I didn’t add the following to the Arduino library code, but this is a feature that might be of some interest if you want to roll your own. Setpoint Weighting is, at it’s core, a way to have both PonE and PonM at the same time. By specifying a ratio between 0 and 1, you can have 100% PonM, 100% PonE (respectively) or some ratio in between. This can be helpful if you have a process that’s not perfectly integrating (like a reflow oven) and want to account for this.

@BarbourSmith BarbourSmith merged commit 93849ef into MaslowCNC:master Sep 25, 2017
@krkeegan
Copy link
Collaborator Author

Yes, exactly.

In the simplest form, this gives the user direct access to enabling PonM by selecting 0. But yes the ability to add weighting is interesting. I haven't played enough with it to have an opinion, but allowing this doesn't seem to add much additional complexity for users.

@krkeegan krkeegan deleted the Propotional_weight branch September 30, 2017 00:39
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.

2 participants