Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ICRE - ESP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ricardo Andres Ercoli Auersperg
ICRE - ESP
Commits
d0c6f96f
Commit
d0c6f96f
authored
2 years ago
by
Ricardo Andres Ercoli Auersperg
Browse files
Options
Downloads
Patches
Plain Diff
Update PID parameters to control Rogel platform
parent
13a2ff28
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Robotito/include/control.h
+4
-12
4 additions, 12 deletions
Robotito/include/control.h
Robotito/src/main.c
+3
-3
3 additions, 3 deletions
Robotito/src/main.c
with
7 additions
and
15 deletions
Robotito/include/control.h
+
4
−
12
View file @
d0c6f96f
...
...
@@ -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
{
...
...
This diff is collapsed.
Click to expand it.
Robotito/src/main.c
+
3
−
3
View file @
d0c6f96f
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment