Implement new controller
Dependencies: mbed-rtos mbed QEI BNO055 MPU6050_DMP_Nucleo-I2Cdev virgo3_imuHandler_Orion_PCB MAX17048 Servo
Fork of Orion_newPCB_test by
Diff: Configuration/config.h
- Revision:
- 10:ea4b90be68dc
- Parent:
- 8:b4da70727fd4
- Child:
- 11:49344285c82a
--- a/Configuration/config.h Tue Apr 12 08:08:30 2016 +0000 +++ b/Configuration/config.h Sat Apr 23 10:29:24 2016 +0000 @@ -34,7 +34,7 @@ #define WaypointCmd_UpdateRateHz 10 //waypoint commander run rate in Hz #define WaypointCmd_UpdatePeriodMS (1000/WaypointCmd_UpdateRateHz) //waypoint commander run rate in ms -#define CommLoop_UpdateRateHz 2 //Communications loop run rate in Hz +#define CommLoop_UpdateRateHz 15 //Communications loop run rate in Hz #define CommLoop_UpdatePeriodMS (1000/CommLoop_UpdateRateHz) //Communications loop run rate in ms #define CommPump_UpdateRateHz 100 //nRF network communications pump run rate in Hz @@ -44,6 +44,9 @@ #define camera_cycleMinutes 15 //default camera switch on frequency in minutes #define camera_CaptureTimeS 30 //default camera capture time in seconds + +#define DataRecorder_RateHz 100 //data recorder loop run rate in Hz +#define DataRecorder_PeriodMS (1000/DataRecorder_RateHz) //data recorder loop run rate in ms //------------------------------------------------------------------------------------------------- @@ -51,15 +54,15 @@ //** Motor ** #define PWMfreq_khz 20 -#define PIDFf_kP 1.5 -#define PIDFf_kI 9.5 -#define PIDFf_kD 0.5 -#define PIDFf_kFf 1.5 +#define PIDFf_kP 0.50 +#define PIDFf_kI 1.50 +#define PIDFf_kD 0.20 +#define PIDFf_kFf 2.50 -#define PIDFf_lim_P 0.3 -#define PIDFf_lim_I 0.5 -#define PIDFf_lim_D 0.2 -#define PIDFf_lim_Ff 0.5 +#define PIDFf_lim_P 0.05 +#define PIDFf_lim_I 0.30 +#define PIDFf_lim_D 0.05 +#define PIDFf_lim_Ff 0.60 #define PIDFf_range_min -1.0 #define PIDFf_range_max 1.0 @@ -99,29 +102,59 @@ //* ** * //* Localization * -#define wheel_dia 10 //wheel dia in mm +#define wheel_dia 10*1.1 //wheel dia in mm * effective hypocyclic gear ratio #define track_width 25 //wheel dia in mm //------------------------------------------------------------------------------------------------- -//** Drivetrain commander ************************************************************************* +//** PurePursuit controller ************************************************************************* #define track_width 25 //track width in mm -#define driveTrain_minV 100 //min velocity of individual drive in mm/s -#define driveTrain_maxV 200 //max velocity of individual drive in mm/s +#define driveTrain_minV 130 //min velocity of individual drive in mm/s +#define driveTrain_maxV 230 //max velocity of individual drive in mm/s //------------------------------------------------------------------------------------------------- //** Communications ******************************************************************************* #define virgo3_robot_address 01 //address of this robot node -#define virgo3_network_channel 90 //communications channel number +#define virgo3_network_channel 74 //communications channel number //------------------------------------------------------------------------------------------------- -//** HansonController ***************************************************************************** +//** Attitude Controller ************************************************************************** #define wheelV_MWindowSize 25 //wheel velocity moving window filter size, customized for Pitch controller +//** HansonController ** + + +//** PID pitch controller ** +// This PID controller adds/subtracts a percentage of command velocity based on the variations of +// the pitch angle while controlling the pitch angle to a setpoint angle. + +#define AttPIDFf_kP 500.00 +#define AttPIDFf_kI 10.00 +#define AttPIDFf_kD 1.00 +#define AttPIDFf_kFf 0.00 + +#define AttPIDFf_lim_P 0.3 +#define AttPIDFf_lim_I 0.4 +#define AttPIDFf_lim_D 0.3 +#define AttPIDFf_lim_Ff 0.0 + +#define AttPIDFf_range_min -1.0 +#define AttPIDFf_range_max 1.0 + + //------------------------------------------------------------------------------------------------- + +//** Data Recorder ******************************************************************************** +#define max_coloumns 16 +#define max_rows 1200 +#define max_RAM 16*1024 //max permissible ram usage in kB + +//------------------------------------------------------------------------------------------------- + + #endif /* VirgoConfig_H */ \ No newline at end of file