Iterative Learning Control
Dependencies: btbee m3pi_ng mbed
Diff: main.cpp
- Revision:
- 5:77f8d658adc3
- Parent:
- 4:8918484e8125
--- a/main.cpp Wed Jun 10 12:35:35 2015 +0000 +++ b/main.cpp Wed Jun 10 12:37:50 2015 +0000 @@ -27,7 +27,7 @@ } double ILCPower(uvalues, evalues, LoopCounter, dt){ - return uvalues(LoopCounter-1) + ILC_P_TERM*evalues(LoopCounter-1) + (ILC_D_TERM)*(evalues(LoopCounter)+evalues(LoopCounter-2))/(2*dt); + return (uvalues(LoopCounter-1) + ILC_P_TERM*evalues(LoopCounter-1) + (ILC_D_TERM)*(evalues(LoopCounter)+evalues(LoopCounter-2))/(2*dt)); } int main() {