-
-
Notifications
You must be signed in to change notification settings - Fork 356
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
Adding bang-bang control algorithm #968
base: main
Are you sure you want to change the base?
Conversation
Split each sentence into it's own line per suggestion from ntindle.
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.
I just did a quick look-over now, but will do a more rigorous review later.
Is there any way you could add a bit of example code? I guess I don't understand how the water temperature images are so linear and some example code (or at least an explanation of why flipping this switch will also cause a drastic, linear decrease in temperature) would be nice to explain how this model is being done.
An additional image directly lining up the on / off pulses with the increasing / decreasing temperatures would be nice as well.
This is a really good start / Thanks for the submission!
|
||
##### More Reading: | ||
Bang-bang controllers are only meant for systems controlled with binary on/off inputs. | ||
For systems with a continously variable input signal (for example, cruise control in a car), try PID Control. |
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.
As we do not have a PID chapter yet in the AAA, could you link to external sources for now?
@@ -0,0 +1,57 @@ | |||
# Bang-Bang Control | |||
|
|||
A bang-bang controller is one of the simplest forms of feedback controller, used in systems where a simple on/off control signal is used to regulate some aspect of the system (temperature, for example). |
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.
Maybe a sentence on why it's called "bang-bang" and a link to an original paper?
If we want to go into signals and such here, the discrete form of the unit step function would be applicable as a mathematical example as well |
Yeah, I think having something we could abstract out to a signal processing section makes sense. Do you have something specific in mind @ntindle ? |
I've referred to this as signals and systems but it's based on control theory. I think a catch all signals and systems top level chapter would be good. Edit: reread the question. The example above would work. I'm not super familiar with latex so I can't type it out but the example above would be something like this X[n], where n is temperature, exhibits the following behavior for discrete values of n.
When this is in the presence of an external factor (such as what is being controlled) it will often oscillate causing that characteristic sawtooth graph in the chapter |
I agree with that, although "signals" and "control theory" seem a bit too distinct for me right now, maybe just "control theory"? When I think of signals, I think signal processing with FFTs and things like that. I think this chapter is a nice way to lead into PID controls. I wonder if we can revive the #346 PR? That one was close to being done, so we could fork it and open it up again with @Gathros co-authoring it. |
I think @wca747 's goal was using this as a stepping stone to the much harder PID chapter Also for signal processing in computer engineering (not sure other places), FFTs are taught using things like bang bang as the introduction to why they are needed. It's a part of a much larger array of signal processing techniques |
|
||
##### Cons: | ||
1. The system is not controlled to a *specific* target value; it instead oscillates between specified upper and lower limits. | ||
2. Setting tight min/max limits on the system output may require the controller to toggle on/off very frequently to maintain the correct output. |
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.
I'd like this to also discuss overshooting. Since it's a binary operation often used for heating/cooling, it's often over shot when implemented exactly at the limit of the target.
Imagine a water heater that needs to regulate temperature, keeping within an allowable range of 45 to 50°C. | ||
The heater only has binary on/off control with no in-between states. | ||
In order to regulate the system temperature, the heater must cycle between on/off states to keep the temperature within the specified range. | ||
A basic bang-bang controller would implement the following logic: |
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 here is the best place but I would love a section on the unit step function that makes this possible.
Potentially with a full signals diagram and a work up of the example
Hey, it's been a while. Were you at all able to look at this chapter? I think example code is essential to understanding how the plots were generated. I am happy to continue the review from that stage! |
I could probably pick this up in your place @wca747 if you'd like |
I think the chapter needs some work right now, but it's definitely in the right direction. Namely, I would really like to see some code for the plots. Once that is there, I think I will have a better understanding of what they were supposed to show and we can finish the chapter from there. |
First draft of a page covering the bang-bang control algorithm. Looking for feedback!