|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: PID vs Bang-Bang for Shooter Consistency
Quote:
I was going to swing by Kennedy this evening, but now I get to spend the evening with her because it looks like you guys are going to be just fine!! Good luck in San Diego!! Quote:
As she stated, complicating Bang Bang is not necessary. It is actually a very simple controller IN THE RIGHT SITUATION. I believe the key to making it work is, a reliable way to measure the output being controlled. I still have a couple questions that will probably need to be answered by Mark McLeod, although you may know the answer to this Ether. How does the FPGA derive the "period" value? Is it just the time between rising, or falling, edges of a signal? Will the duty cycle of the signal influence the "period" value? |
|
#2
|
||||
|
||||
|
Re: PID vs Bang-Bang for Shooter Consistency
Quote:
Additionally, the 40MHz clock is divided down by 261 to create a 153257 Hz (6.515 microsecond) polling frequency. The FPGA polls all the DIO inputs synchronously at this frequency. Whether the FPGA counts and timestamps rising edge only, or both rising and falling edges, or both rising and falling edges on both channels, is determined by how the user sets up the counter (or encoder) object. In encoder 4X mode, I believe FPGA counts both rising and falling edges on both channels, and by default computes the period using the 5 most-recent counts (i.e 4 periods). Then in WPILib, the period returned is divided by 4 to give the actual period between consecutive edges, which is the value returned to the caller. Quote:
Last edited by Ether : 26-02-2013 at 16:39. |
|
#3
|
||||
|
||||
|
Re: PID vs Bang-Bang for Shooter Consistency
Quote:
This is basically what I expected but I wanted to verify. The additional detail also helps whenever we will be using encoders, counters and timers. |
|
#4
|
||||
|
||||
|
Re: PID vs Bang-Bang for Shooter Consistency
Quote:
|
|
#5
|
|||
|
|||
|
Re: PID vs Bang-Bang for Shooter Consistency
Quote:
Quote:
Quote:
|
|
#6
|
||||
|
||||
|
Re: PID vs Bang-Bang for Shooter Consistency
Quote:
Not to mention we complicated our controller by using an equation to look up the approximate base power needed for the RPM we wanted, and then have it Add or subtract a certain amount from that based on whether we were over or under our setpoint. After all this fuss, it has become quite reliable though. |
|
#7
|
||||
|
||||
|
Re: PID vs Bang-Bang for Shooter Consistency
Quote:
Averaging like that introduces phase lag in the sensor signal. Bang-bang does not like phase lag. What language were you using? Quote:
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|