R is working.

Added graph of k1, k2 gains and f.