-
Notifications
You must be signed in to change notification settings - Fork 22
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
Feature request: example of saturated pi controller #269
Comments
Nice work! If we can do it cleanly (and I think we can), I'd prefer to integrate it into the existing function(s). Another thing that'd be interesting to look at with this is how well it works to initialize the solution with an unsaturated PI solution. At a higher level, it'd be really great to have a tutorial where we illustrate a good workflow for device and control design (i.e., start with unstructured, work towards something you can implement in real-time). The Pioneer WEC might offer a good oppurtunity for this. |
I'm working now on making the PI controller general for multiple PTO DOF. |
Ok, you may want to talk with @dtgaebe about multi-dof feedback controllers if you're able |
@cmichelenstrofer - Can you add a third curve to your regular wave comparison above: unstructured controller with a force constraint applied |
@ryancoe The results are (nearly) identical to the saturated PI!! Maybe we shouldn't include a saturated PI force then... |
Very cool! They'll only be the same for a regular (monochromatic) excitation like you have here, so I think that it is useful to add this functionality. However, this further emphasizes to me the need to have some good guidance on when/how to use these different controllers in the design process. Which method is faster? |
Ah right! It is hard to tell which is faster. The unstructured + constraints converged in only 11 iterations, while the saturated PI took 76... but that might just be because of the scaling. Total time divided by number of iterations, the saturated pi controller is about twice as fast... but that doesn't account for any initial overhead. |
For a better initial guess, instead of using the unsaturated amplitude Fp, the fundamental of the saturated waveform will have an amplitude of alpha * Fmax / Fp, where alpha is a value ranging from 1 (no saturation) to 4/pi (full saturation, the fundamental of a square wave): To go even further (unclear this is actually necessary) I've also derived the math for the higher harmonics too, which I think should be exact for a linear problem. |
other possible idea to help with convergence of the saturated controller - use a sigma approximation which alleviates the overshoots at the corners, and should mean you need fewer harmonics to stay within the constraint. |
Really cool @rebeccamccabe! @ryancoe if we publish an example using a saturated PI, we should use this as initialization. @dtgaebe maybe this will help with the case you were running? |
This would be neat to try! Probably only needed in the PTO force, since that's the only one with discontinuities. |
Regarding the sigma approximation: The way I'm doing the saturated PID I take the responses (positions, velocities, accelerations) which are not discontinuous, multiply by the respective gains, and sum. I then clip the force using It could be used, however, for the unstructured controller with constraints. Or for the state (position) when there are state constraints. I suggest we provide a different |
Saturated PI controllers have been a popular request. We should either include one in
pto
or give an example.The text was updated successfully, but these errors were encountered: