Skip to content
Snippets Groups Projects
Commit 0c63b44e authored by dawehr's avatar dawehr
Browse files

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
...@@ -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="Constant"] "Yaw PID" -> "Yaw Rate PID":f2 [label="Correction"]
"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"]
......
quad/src/gen_diagram/network.png

571 KiB | W: | H:

quad/src/gen_diagram/network.png

607 KiB | W: | H:

quad/src/gen_diagram/network.png
quad/src/gen_diagram/network.png
quad/src/gen_diagram/network.png
quad/src/gen_diagram/network.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -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
......
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