Mechatronics Robotics
/
BrobotV1
These are the core files for the Robot at Team conception.
Diff: SpeedControl.h
- Revision:
- 17:ec52258b9472
- Parent:
- 15:4efc66de795a
diff -r 570134040cdf -r ec52258b9472 SpeedControl.h --- a/SpeedControl.h Mon Jun 05 07:57:07 2017 +0000 +++ b/SpeedControl.h Wed Jun 07 11:35:59 2017 +0000 @@ -27,12 +27,12 @@ private: //static allows you to initialize variables within the header - static const float PERIOD = 0.001f; // period of control task, given in [s] + static const float PERIOD = 0.002f; // period of control task, given in [s] static const float COUNTS_PER_TURN = 1200.0f; // resolution of encoder counter static const float LOWPASS_FILTER_FREQUENCY = 300.0f; // frequency of lowpass filter for actual speed values, given in [rad/s] static const float KN = 40.0f; // speed constant of motor, given in [rpm/V] static const float KP = 0.2f; // speed controller gain, given in [V/rpm] - static const float KI = 0.1f; //speed controller integral term gain [V/rpm] + //static const float KI = 0.1f; //speed controller integral term gain [V/rpm] static const float MAX_VOLTAGE = 12.0f; // supply voltage for power stage in [V] static const float MIN_DUTY_CYCLE = 0.02f; // minimum allowed value for duty cycle (2%) static const float MAX_DUTY_CYCLE = 0.98f; // maximum allowed value for duty cycle (98%)