Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MicroCART
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
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
Distributed Autonomous Networked Control Lab
MicroCART
Commits
ddbc6a79
Commit
ddbc6a79
authored
7 years ago
by
ucart
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
https://git.ece.iastate.edu/danc/MicroCART_17-18
parents
3992a71e
e711eb3f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
quad/src/graph_blocks/node_pid.c
+2
-2
2 additions, 2 deletions
quad/src/graph_blocks/node_pid.c
quad/src/quad_app/hw_iface.h
+2
-2
2 additions, 2 deletions
quad/src/quad_app/hw_iface.h
with
4 additions
and
4 deletions
quad/src/graph_blocks/node_pid.c
+
2
−
2
View file @
ddbc6a79
...
...
@@ -48,7 +48,7 @@ static void pid_computation(void *state, const double* params, const double *inp
if
(
fabs
(
params
[
PID_KI
])
<=
FLT_EPSILON
)
{
pid_state
->
acc_error
=
0
;
}
else
{
pid_state
->
acc_error
+=
error
;
pid_state
->
acc_error
+=
(
error
*
inputs
[
PID_DT
])
;
}
if
(
pid_state
->
just_reset
)
{
...
...
@@ -60,7 +60,7 @@ static void pid_computation(void *state, const double* params, const double *inp
// Compute each term's contribution
P
=
params
[
PID_KP
]
*
error
;
I
=
params
[
PID_KI
]
*
pid_state
->
acc_error
*
inputs
[
PID_DT
]
;
I
=
params
[
PID_KI
]
*
pid_state
->
acc_error
;
// Low-pass filter on derivative
double
change_in_value
=
inputs
[
PID_CUR_POINT
]
-
pid_state
->
prev_val
;
double
term1
=
params
[
PID_ALPHA
]
*
pid_state
->
last_filtered
;
...
...
This diff is collapsed.
Click to expand it.
quad/src/quad_app/hw_iface.h
+
2
−
2
View file @
ddbc6a79
...
...
@@ -10,8 +10,8 @@
* NOTE:
* If you wound up here after following some IDE function declaration trail,
* you've hit the end of the application layer. Go to the location of the
* hardware layer appropriate for your circumstance:
p
* ../../xsdk_worksapce/
modular_quad_pi
d -> running quad_app on the Zybo
* hardware layer appropriate for your circumstance:
* ../../xsdk_worksapce/
real_qua
d -> running quad_app on the Zybo
* ../virt_quad -> running quad_app in a Unix environment
*/
...
...
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