Skip to content
Snippets Groups Projects
Commit 8b575b6a authored by Andy Snawerdt's avatar Andy Snawerdt
Browse files

Updated sampling times on motor commands

parent c81acb9c
No related branches found
No related tags found
No related merge requests found
......@@ -32,10 +32,10 @@ yaw_command_model_data = yaw_command_model.signals.values(indices_40ms);
yaw_value_model_data = yaw_value_model.signals.values(indices_40ms);
% Pull duty cycle commands from model
PWM0_model = motorCommands.signals.values(indices_40ms, 1);
PWM1_model = motorCommands.signals.values(indices_40ms, 2);
PWM2_model = motorCommands.signals.values(indices_40ms, 3);
PWM3_model = motorCommands.signals.values(indices_40ms, 4);
PWM0_model = motorCommands.signals.values(indices_5ms, 1);
PWM1_model = motorCommands.signals.values(indices_5ms, 2);
PWM2_model = motorCommands.signals.values(indices_5ms, 3);
PWM3_model = motorCommands.signals.values(indices_5ms, 4);
%% Plot x control structure
......@@ -165,7 +165,7 @@ legend('Log', 'Model', 'location', 'northwest');
%% Plot PWM Commands
figure(5); subplot(2, 2, 1);
stairs(time, PWM0,'.-'); hold on; grid minor;
stairs(time_model_40ms, PWM0_model, '.-'); hold off;
stairs(time_model_5ms, PWM0_model, '.-'); hold off;
title('PWM0 Value');
xlabel('Time (s)');
ylabel('PWM0 Command');
......@@ -173,7 +173,7 @@ legend('Log', 'Model', 'location', 'northwest');
subplot(2, 2, 2);
stairs(time, PWM1,'.-'); hold on; grid minor;
stairs(time_model_40ms, PWM1_model, '.-'); hold off;
stairs(time_model_5ms, PWM1_model, '.-'); hold off;
title('PWM1 Value');
xlabel('Time (s)');
ylabel('PWM1 Command');
......@@ -181,7 +181,7 @@ legend('Log', 'Model', 'location', 'northwest');
subplot(2, 2, 3);
stairs(time, PWM2,'.-'); hold on; grid minor;
stairs(time_model_40ms, PWM2_model, '.-'); hold off;
stairs(time_model_5ms, PWM2_model, '.-'); hold off;
title('PWM2 Value');
xlabel('Time (s)');
ylabel('PWM2 Command');
......@@ -189,7 +189,7 @@ legend('Log', 'Model', 'location', 'northwest');
subplot(2, 2, 4);
stairs(time, PWM3,'.-'); hold on; grid minor;
stairs(time_model_40ms, PWM3_model, '.-'); hold off;
stairs(time_model_5ms, PWM3_model, '.-'); hold off;
title('PWM3 Value');
xlabel('Time (s)');
ylabel('PWM3 Command');
......
No preview for this file type
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