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
0c63b44e
Commit
0c63b44e
authored
7 years ago
by
dawehr
Browse files
Options
Downloads
Patches
Plain Diff
removed of from the calculations. We only want to log it for now
parent
b28132f1
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
quad/src/gen_diagram/network.dot
+12
-12
12 additions, 12 deletions
quad/src/gen_diagram/network.dot
quad/src/gen_diagram/network.png
+0
-0
0 additions, 0 deletions
quad/src/gen_diagram/network.png
quad/src/quad_app/control_algorithm.c
+12
-8
12 additions, 8 deletions
quad/src/quad_app/control_algorithm.c
with
24 additions
and
20 deletions
quad/src/gen_diagram/network.dot
+
12
−
12
View file @
0c63b44e
...
@@ -3,12 +3,12 @@ rankdir="LR"
...
@@ -3,12 +3,12 @@ rankdir="LR"
"Roll PID"
[
shape
=
record
"Roll PID"
[
shape
=
record
label
=
"<f0>Roll PID |<f1> --\>Cur point |<f2> --\>Setpoint |<f3> --\>dt |<f4> [Kp=35.000] |<f5> [Ki=0.000] |<f6> [Kd=1.000] |<f7> [alpha=0.880]"
]
label
=
"<f0>Roll PID |<f1> --\>Cur point |<f2> --\>Setpoint |<f3> --\>dt |<f4> [Kp=35.000] |<f5> [Ki=0.000] |<f6> [Kd=1.000] |<f7> [alpha=0.880]"
]
"Roll"
->
"Roll PID"
:
f1
[
label
=
"Constant"
]
"Roll"
->
"Roll PID"
:
f1
[
label
=
"Constant"
]
"
RC Roll
"
->
"Roll PID"
:
f2
[
label
=
"
Constant
"
]
"
Yaw Correction
"
->
"Roll PID"
:
f2
[
label
=
"
Rotated Y
"
]
"Ts_IMU"
->
"Roll PID"
:
f3
[
label
=
"Constant"
]
"Ts_IMU"
->
"Roll PID"
:
f3
[
label
=
"Constant"
]
"Pitch PID"
[
shape
=
record
"Pitch PID"
[
shape
=
record
label
=
"<f0>Pitch PID |<f1> --\>Cur point |<f2> --\>Setpoint |<f3> --\>dt |<f4> [Kp=35.000] |<f5> [Ki=0.000] |<f6> [Kd=1.000] |<f7> [alpha=0.880]"
]
label
=
"<f0>Pitch PID |<f1> --\>Cur point |<f2> --\>Setpoint |<f3> --\>dt |<f4> [Kp=35.000] |<f5> [Ki=0.000] |<f6> [Kd=1.000] |<f7> [alpha=0.880]"
]
"Pitch trim add"
->
"Pitch PID"
:
f1
[
label
=
"Sum"
]
"Pitch trim add"
->
"Pitch PID"
:
f1
[
label
=
"Sum"
]
"
RC Pitch
"
->
"Pitch PID"
:
f2
[
label
=
"
Constant
"
]
"
Yaw Correction
"
->
"Pitch PID"
:
f2
[
label
=
"
Rotated X
"
]
"Ts_IMU"
->
"Pitch PID"
:
f3
[
label
=
"Constant"
]
"Ts_IMU"
->
"Pitch PID"
:
f3
[
label
=
"Constant"
]
"Yaw PID"
[
shape
=
record
"Yaw PID"
[
shape
=
record
label
=
"<f0>Yaw PID |<f1> --\>Cur point |<f2> --\>Setpoint |<f3> --\>dt |<f4> [Kp=2.600] |<f5> [Ki=0.000] |<f6> [Kd=0.000] |<f7> [alpha=0.000]"
]
label
=
"<f0>Yaw PID |<f1> --\>Cur point |<f2> --\>Setpoint |<f3> --\>dt |<f4> [Kp=2.600] |<f5> [Ki=0.000] |<f6> [Kd=0.000] |<f7> [alpha=0.000]"
]
...
@@ -28,18 +28,18 @@ label="<f0>Pitch Rate PID |<f1> --\>Cur point |<f2> --\>Setpoint |<f3> --\>dt |
...
@@ -28,18 +28,18 @@ label="<f0>Pitch Rate PID |<f1> --\>Cur point |<f2> --\>Setpoint |<f3> --\>dt |
"Yaw Rate PID"
[
shape
=
record
"Yaw Rate PID"
[
shape
=
record
label
=
"<f0>Yaw Rate PID |<f1> --\>Cur point |<f2> --\>Setpoint |<f3> --\>dt |<f4> [Kp=0.297] |<f5> [Ki=0.000] |<f6> [Kd=0.000] |<f7> [alpha=0.000]"
]
label
=
"<f0>Yaw Rate PID |<f1> --\>Cur point |<f2> --\>Setpoint |<f3> --\>dt |<f4> [Kp=0.297] |<f5> [Ki=0.000] |<f6> [Kd=0.000] |<f7> [alpha=0.000]"
]
"Gyro Z"
->
"Yaw Rate PID"
:
f1
[
label
=
"Constant"
]
"Gyro Z"
->
"Yaw Rate PID"
:
f1
[
label
=
"Constant"
]
"
RC
Yaw"
->
"Yaw Rate PID"
:
f2
[
label
=
"Co
nstant
"
]
"Yaw
PID
"
->
"Yaw Rate PID"
:
f2
[
label
=
"Co
rrection
"
]
"Ts_IMU"
->
"Yaw Rate PID"
:
f3
[
label
=
"Constant"
]
"Ts_IMU"
->
"Yaw Rate PID"
:
f3
[
label
=
"Constant"
]
"X pos PID"
[
shape
=
record
"X pos PID"
[
shape
=
record
label
=
"<f0>X pos PID |<f1> --\>Cur point |<f2> --\>Setpoint |<f3> --\>dt |<f4> [Kp=0.550] |<f5> [Ki=0.007] |<f6> [Kd=0.000] |<f7> [alpha=0.000]"
]
label
=
"<f0>X pos PID |<f1> --\>Cur point |<f2> --\>Setpoint |<f3> --\>dt |<f4> [Kp=0.550] |<f5> [Ki=0.007] |<f6> [Kd=0.000] |<f7> [alpha=0.000]"
]
"
OF X Trim Add
"
->
"X pos PID"
:
f1
[
label
=
"
Sum
"
]
"
VRPN X
"
->
"X pos PID"
:
f1
[
label
=
"
Constant
"
]
"X Setpoint"
->
"X pos PID"
:
f2
[
label
=
"Constant"
]
"X Setpoint"
->
"X pos PID"
:
f2
[
label
=
"Constant"
]
"Ts_
IMU
"
->
"X pos PID"
:
f3
[
label
=
"Constant"
]
"Ts_
VRPN
"
->
"X pos PID"
:
f3
[
label
=
"Constant"
]
"Y pos PID"
[
shape
=
record
"Y pos PID"
[
shape
=
record
label
=
"<f0>Y pos PID |<f1> --\>Cur point |<f2> --\>Setpoint |<f3> --\>dt |<f4> [Kp=0.550] |<f5> [Ki=0.007] |<f6> [Kd=0.000] |<f7> [alpha=0.000]"
]
label
=
"<f0>Y pos PID |<f1> --\>Cur point |<f2> --\>Setpoint |<f3> --\>dt |<f4> [Kp=0.550] |<f5> [Ki=0.007] |<f6> [Kd=0.000] |<f7> [alpha=0.000]"
]
"
OF Y Trim Add
"
->
"Y pos PID"
:
f1
[
label
=
"
Sum
"
]
"
VRPN Y
"
->
"Y pos PID"
:
f1
[
label
=
"
Constant
"
]
"Y Setpoint"
->
"Y pos PID"
:
f2
[
label
=
"Constant"
]
"Y Setpoint"
->
"Y pos PID"
:
f2
[
label
=
"Constant"
]
"Ts_
IMU
"
->
"Y pos PID"
:
f3
[
label
=
"Constant"
]
"Ts_
VRPN
"
->
"Y pos PID"
:
f3
[
label
=
"Constant"
]
"Altitude PID"
[
shape
=
record
"Altitude PID"
[
shape
=
record
label
=
"<f0>Altitude PID |<f1> --\>Cur point |<f2> --\>Setpoint |<f3> --\>dt |<f4> [Kp=-0.098] |<f5> [Ki=-0.008] |<f6> [Kd=-0.074] |<f7> [alpha=0.880]"
]
label
=
"<f0>Altitude PID |<f1> --\>Cur point |<f2> --\>Setpoint |<f3> --\>dt |<f4> [Kp=-0.098] |<f5> [Ki=-0.008] |<f6> [Kd=-0.074] |<f7> [alpha=0.880]"
]
"VRPN Alt"
->
"Altitude PID"
:
f1
[
label
=
"Constant"
]
"VRPN Alt"
->
"Altitude PID"
:
f1
[
label
=
"Constant"
]
...
@@ -116,14 +116,14 @@ label="<f0>RC Yaw |<f1> [Constant=0.000]"]
...
@@ -116,14 +116,14 @@ label="<f0>RC Yaw |<f1> [Constant=0.000]"]
label
=
"<f0>RC Throttle |<f1> [Constant=0.000]"
]
label
=
"<f0>RC Throttle |<f1> [Constant=0.000]"
]
"X Vel PID"
[
shape
=
record
"X Vel PID"
[
shape
=
record
label
=
"<f0>X Vel PID |<f1> --\>Cur point |<f2> --\>Setpoint |<f3> --\>dt |<f4> [Kp=-0.100] |<f5> [Ki=0.000] |<f6> [Kd=-0.020] |<f7> [alpha=0.000]"
]
label
=
"<f0>X Vel PID |<f1> --\>Cur point |<f2> --\>Setpoint |<f3> --\>dt |<f4> [Kp=-0.100] |<f5> [Ki=0.000] |<f6> [Kd=-0.020] |<f7> [alpha=0.000]"
]
"
OF Offset Angle
"
->
"X Vel PID"
:
f1
[
label
=
"
Rotated X
"
]
"
X Vel
"
->
"X Vel PID"
:
f1
[
label
=
"
Correction
"
]
"X Vel Clamp"
->
"X Vel PID"
:
f2
[
label
=
"Bounded"
]
"X Vel Clamp"
->
"X Vel PID"
:
f2
[
label
=
"Bounded"
]
"Ts_
IMU
"
->
"X Vel PID"
:
f3
[
label
=
"Constant"
]
"Ts_
VRPN
"
->
"X Vel PID"
:
f3
[
label
=
"Constant"
]
"Y Vel PID"
[
shape
=
record
"Y Vel PID"
[
shape
=
record
label
=
"<f0>Y Vel PID |<f1> --\>Cur point |<f2> --\>Setpoint |<f3> --\>dt |<f4> [Kp=0.100] |<f5> [Ki=0.000] |<f6> [Kd=0.020] |<f7> [alpha=0.000]"
]
label
=
"<f0>Y Vel PID |<f1> --\>Cur point |<f2> --\>Setpoint |<f3> --\>dt |<f4> [Kp=0.100] |<f5> [Ki=0.000] |<f6> [Kd=0.020] |<f7> [alpha=0.000]"
]
"
OF Offset Angle
"
->
"Y Vel PID"
:
f1
[
label
=
"
Rotated Y
"
]
"
Y Vel
"
->
"Y Vel PID"
:
f1
[
label
=
"
Correction
"
]
"Y vel Clamp"
->
"Y Vel PID"
:
f2
[
label
=
"Bounded"
]
"Y vel Clamp"
->
"Y Vel PID"
:
f2
[
label
=
"Bounded"
]
"Ts_
IMU
"
->
"Y Vel PID"
:
f3
[
label
=
"Constant"
]
"Ts_
VRPN
"
->
"Y Vel PID"
:
f3
[
label
=
"Constant"
]
"X Vel"
[
shape
=
record
"X Vel"
[
shape
=
record
label
=
"<f0>X Vel |<f1> --\>Cur point |<f2> --\>Setpoint |<f3> --\>dt |<f4> [Kp=0.000] |<f5> [Ki=0.000] |<f6> [Kd=-1.000] |<f7> [alpha=0.880]"
]
label
=
"<f0>X Vel |<f1> --\>Cur point |<f2> --\>Setpoint |<f3> --\>dt |<f4> [Kp=0.000] |<f5> [Ki=0.000] |<f6> [Kd=-1.000] |<f7> [alpha=0.880]"
]
"VRPN X"
->
"X Vel"
:
f1
[
label
=
"Constant"
]
"VRPN X"
->
"X Vel"
:
f1
[
label
=
"Constant"
]
...
@@ -178,7 +178,7 @@ label="<f0>OF Y Trim Add |<f1> --\>Summand 1 |<f2> --\>Summand 2"]
...
@@ -178,7 +178,7 @@ label="<f0>OF Y Trim Add |<f1> --\>Summand 1 |<f2> --\>Summand 2"]
"OF Trim Y"
->
"OF Y Trim Add"
:
f2
[
label
=
"Constant"
]
"OF Trim Y"
->
"OF Y Trim Add"
:
f2
[
label
=
"Constant"
]
"Signal Mixer"
[
shape
=
record
"Signal Mixer"
[
shape
=
record
label
=
"<f0>Signal Mixer |<f1> --\>Throttle |<f2> --\>Pitch |<f3> --\>Roll |<f4> --\>Yaw"
]
label
=
"<f0>Signal Mixer |<f1> --\>Throttle |<f2> --\>Pitch |<f3> --\>Roll |<f4> --\>Yaw"
]
"
RC Throttle
"
->
"Signal Mixer"
:
f1
[
label
=
"
Constant
"
]
"
T trim add
"
->
"Signal Mixer"
:
f1
[
label
=
"
Sum
"
]
"P PWM Clamp"
->
"Signal Mixer"
:
f2
[
label
=
"Bounded"
]
"P PWM Clamp"
->
"Signal Mixer"
:
f2
[
label
=
"Bounded"
]
"R PWM Clamp"
->
"Signal Mixer"
:
f3
[
label
=
"Bounded"
]
"R PWM Clamp"
->
"Signal Mixer"
:
f3
[
label
=
"Bounded"
]
"Y PWM Clamp"
->
"Signal Mixer"
:
f4
[
label
=
"Bounded"
]
"Y PWM Clamp"
->
"Signal Mixer"
:
f4
[
label
=
"Bounded"
]
...
...
This diff is collapsed.
Click to expand it.
quad/src/gen_diagram/network.png
+
0
−
0
View replaced file @
b28132f1
View file @
0c63b44e
571 KiB
|
W:
|
H:
607 KiB
|
W:
|
H:
2-up
Swipe
Onion skin
This diff is collapsed.
Click to expand it.
quad/src/quad_app/control_algorithm.c
+
12
−
8
View file @
0c63b44e
...
@@ -159,8 +159,9 @@ int control_algorithm_init(parameter_t * ps)
...
@@ -159,8 +159,9 @@ int control_algorithm_init(parameter_t * ps)
graph_set_source
(
graph
,
ps
->
x_vel
,
PID_CUR_POINT
,
ps
->
vrpn_x
,
CONST_VAL
);
graph_set_source
(
graph
,
ps
->
x_vel
,
PID_CUR_POINT
,
ps
->
vrpn_x
,
CONST_VAL
);
graph_set_source
(
graph
,
ps
->
x_vel
,
PID_SETPOINT
,
zero_block
,
CONST_VAL
);
graph_set_source
(
graph
,
ps
->
x_vel
,
PID_SETPOINT
,
zero_block
,
CONST_VAL
);
// Connect velocity PID itself
// Connect velocity PID itself
graph_set_source
(
graph
,
ps
->
x_vel_pid
,
PID_DT
,
ps
->
angle_time
,
CONST_VAL
);
graph_set_source
(
graph
,
ps
->
x_vel_pid
,
PID_DT
,
ps
->
pos_time
,
CONST_VAL
);
graph_set_source
(
graph
,
ps
->
x_vel_pid
,
PID_CUR_POINT
,
ps
->
of_angle_corr
,
ROT_OUT_X
);
graph_set_source
(
graph
,
ps
->
x_vel_pid
,
PID_CUR_POINT
,
ps
->
x_vel
,
PID_CORRECTION
);
//graph_set_source(graph, ps->x_vel_pid, PID_CUR_POINT, ps->of_angle_corr, ROT_OUT_X);
graph_set_source
(
graph
,
ps
->
x_vel_pid
,
PID_SETPOINT
,
ps
->
x_vel_clamp
,
BOUNDS_OUT
);
graph_set_source
(
graph
,
ps
->
x_vel_pid
,
PID_SETPOINT
,
ps
->
x_vel_clamp
,
BOUNDS_OUT
);
graph_set_source
(
graph
,
ps
->
x_vel_clamp
,
BOUNDS_IN
,
ps
->
x_pos_pid
,
PID_CORRECTION
);
graph_set_source
(
graph
,
ps
->
x_vel_clamp
,
BOUNDS_IN
,
ps
->
x_pos_pid
,
PID_CORRECTION
);
...
@@ -177,18 +178,21 @@ int control_algorithm_init(parameter_t * ps)
...
@@ -177,18 +178,21 @@ int control_algorithm_init(parameter_t * ps)
graph_set_source
(
graph
,
ps
->
y_vel
,
PID_CUR_POINT
,
ps
->
vrpn_y
,
CONST_VAL
);
graph_set_source
(
graph
,
ps
->
y_vel
,
PID_CUR_POINT
,
ps
->
vrpn_y
,
CONST_VAL
);
graph_set_source
(
graph
,
ps
->
y_vel
,
PID_SETPOINT
,
zero_block
,
CONST_VAL
);
graph_set_source
(
graph
,
ps
->
y_vel
,
PID_SETPOINT
,
zero_block
,
CONST_VAL
);
// Connect velocity PID itself
// Connect velocity PID itself
graph_set_source
(
graph
,
ps
->
y_vel_pid
,
PID_DT
,
ps
->
angle_time
,
CONST_VAL
);
graph_set_source
(
graph
,
ps
->
y_vel_pid
,
PID_DT
,
ps
->
pos_time
,
CONST_VAL
);
graph_set_source
(
graph
,
ps
->
y_vel_pid
,
PID_CUR_POINT
,
ps
->
of_angle_corr
,
ROT_OUT_Y
);
graph_set_source
(
graph
,
ps
->
y_vel_pid
,
PID_CUR_POINT
,
ps
->
y_vel
,
PID_CORRECTION
);
//graph_set_source(graph, ps->y_vel_pid, PID_CUR_POINT, ps->of_angle_corr, ROT_OUT_Y);
graph_set_source
(
graph
,
ps
->
y_vel_pid
,
PID_SETPOINT
,
ps
->
y_vel_clamp
,
BOUNDS_OUT
);
graph_set_source
(
graph
,
ps
->
y_vel_pid
,
PID_SETPOINT
,
ps
->
y_vel_clamp
,
BOUNDS_OUT
);
graph_set_source
(
graph
,
ps
->
y_vel_clamp
,
BOUNDS_IN
,
ps
->
y_pos_pid
,
PID_CORRECTION
);
graph_set_source
(
graph
,
ps
->
y_vel_clamp
,
BOUNDS_IN
,
ps
->
y_pos_pid
,
PID_CORRECTION
);
// X position
// X position
graph_set_source
(
graph
,
ps
->
x_pos_pid
,
PID_DT
,
ps
->
angle_time
,
CONST_VAL
);
graph_set_source
(
graph
,
ps
->
x_pos_pid
,
PID_DT
,
ps
->
pos_time
,
CONST_VAL
);
graph_set_source
(
graph
,
ps
->
x_pos_pid
,
PID_CUR_POINT
,
ps
->
of_trimmed_x
,
CONST_VAL
);
graph_set_source
(
graph
,
ps
->
x_pos_pid
,
PID_CUR_POINT
,
ps
->
vrpn_x
,
CONST_VAL
);
//graph_set_source(graph, ps->x_pos_pid, PID_CUR_POINT, ps->of_trimmed_x, CONST_VAL);
graph_set_source
(
graph
,
ps
->
x_pos_pid
,
PID_SETPOINT
,
ps
->
x_set
,
CONST_VAL
);
graph_set_source
(
graph
,
ps
->
x_pos_pid
,
PID_SETPOINT
,
ps
->
x_set
,
CONST_VAL
);
// Y position
// Y position
graph_set_source
(
graph
,
ps
->
y_pos_pid
,
PID_DT
,
ps
->
angle_time
,
CONST_VAL
);
graph_set_source
(
graph
,
ps
->
y_pos_pid
,
PID_DT
,
ps
->
pos_time
,
CONST_VAL
);
graph_set_source
(
graph
,
ps
->
y_pos_pid
,
PID_CUR_POINT
,
ps
->
of_trimmed_y
,
CONST_VAL
);
graph_set_source
(
graph
,
ps
->
y_pos_pid
,
PID_CUR_POINT
,
ps
->
vrpn_y
,
CONST_VAL
);
//graph_set_source(graph, ps->y_pos_pid, PID_CUR_POINT, ps->of_trimmed_y, CONST_VAL);
graph_set_source
(
graph
,
ps
->
y_pos_pid
,
PID_SETPOINT
,
ps
->
y_set
,
CONST_VAL
);
graph_set_source
(
graph
,
ps
->
y_pos_pid
,
PID_SETPOINT
,
ps
->
y_set
,
CONST_VAL
);
// Alt autonomous
// Alt autonomous
...
...
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