Skip to content
Snippets Groups Projects
Commit d0c6f96f authored by Ricardo Andres Ercoli Auersperg's avatar Ricardo Andres Ercoli Auersperg
Browse files

Update PID parameters to control Rogel platform

parent 13a2ff28
No related branches found
No related tags found
No related merge requests found
......@@ -45,18 +45,10 @@
#define TICS_TO_RAD_S RAD_PER_TICK/OMNI_ODOM_CTRL_TIMER
/*Procedimiento de Ziegler-Nichols:
1- Variar la constante Kp desde 0 hasta registrar oscilaciones oscilaciones estables y consistentes
Registramos: Periodo de oscilacion Tu = 0,1666666667 y Ku = 0.26, donde Ku = Kp@ocilaciones
2- Suponiendo que trabajremos con un PI entonces se deben fijar:
a- Kp = 0.45 * Ku
b- Ki = 0.54 * Ku / Tu
*/
#define KP 0.15 //
#define KI 0.08 //0.05
#define KD 0.00
#define KF MAX_SPEED_POWER/MAX_SPEED_TICS
#define KP 0.3 // Proportional component of the PID
#define KI 0.6 // Integral component of the PID
#define KD 0.001 // Differential component of the PID
typedef struct {
......
......@@ -76,7 +76,7 @@ static void init_uart(void)
};
uart_param_config(UART_NUM, &uart_config);
uart_set_pin(UART_NUM, 5, 4, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE);
uart_set_pin(UART_NUM, 0, 4, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE);
uart_driver_install(UART_NUM, 1024, 1024, 5, &uart_queue, 0);
xTaskCreate(uart_task, "uart_task", TASK_MEMORY, NULL, 5, NULL);
......@@ -88,7 +88,7 @@ void app_main(void)
printf("Configuring Initial Parameters of mcpwm...\n");
omni_init();
omni_set_enable(true);
while (1) {
vTaskDelay( 300000/ portTICK_RATE_MS);
while (1) {
vTaskDelay( portMAX_DELAY);
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment