@Alex: never mind, you can first try the 1st changes (Videos are made with only these changes) the second set of changes are not yet tested anyway.
or you can download the files from Github for testing.
@Alexander: I am not shure we want to avoid the "dead' band, since when working with the perimeterMag, this band is not dead. I think the high Integral part just makes it smooth.
In theory this can also be reached with the original code. Now I am thinking maybe just a simple perimeterPID.reset() every time a transition occurs would smooth out the reaction of the perimeterPID controller.
I tried controlling on perimeterMag last year at 90% and the result was very unstable, since the magnetic field is not always at the same strenght ( for example at 90deg turns) and the measurement is noisy. My mower was even start to walk backwards and shaking violently. Maybe we can try this approach again, but there are again 2 points where controller could go for 1 before the maximum(in the field) and 1 after the maximum(at the perimeter), which makes again an unstable system. Additionally it's much more easy to control on the steep angle of the curve than on the flat.
My main goal was getting a stable system where the distance to the perimeter is used as controller input.
or you can download the files from Github for testing.
@Alexander: I am not shure we want to avoid the "dead' band, since when working with the perimeterMag, this band is not dead. I think the high Integral part just makes it smooth.
In theory this can also be reached with the original code. Now I am thinking maybe just a simple perimeterPID.reset() every time a transition occurs would smooth out the reaction of the perimeterPID controller.
I tried controlling on perimeterMag last year at 90% and the result was very unstable, since the magnetic field is not always at the same strenght ( for example at 90deg turns) and the measurement is noisy. My mower was even start to walk backwards and shaking violently. Maybe we can try this approach again, but there are again 2 points where controller could go for 1 before the maximum(in the field) and 1 after the maximum(at the perimeter), which makes again an unstable system. Additionally it's much more easy to control on the steep angle of the curve than on the flat.
My main goal was getting a stable system where the distance to the perimeter is used as controller input.