This commit is contained in:
Antoine Drouin
2010-03-05 20:32:50 +00:00
parent 7469099dfe
commit 8570829103
3 changed files with 14 additions and 12 deletions
+4 -4
View File
@@ -204,12 +204,12 @@ function display_adaptation()
subplot(2,3,1);
plot2d(fdm_time, adp_y(1,:), 3);
plot2d(fdm_time, fdm_Ct0/fdm_mass*ctl_u(CTL_UT,:), 2);
// plot2d(fdm_time, fdm_Ct0/fdm_mass*ctl_u(CTL_UT,:), 2);
legends(["y1", "ut"],[3 2], with_box=%f, opt="ul");
xtitle('apd_y1');
subplot(2,3,2);
plot2d(fdm_time, fdm_Ct0/fdm_mass*ones(1,length(time)),3);
// plot2d(fdm_time, fdm_Ct0/fdm_mass*ones(1,length(time)),3);
plot2d(fdm_time, adp_est(ADP_EST_A,:), 2);
xtitle('adp_est A');
@@ -220,12 +220,12 @@ function display_adaptation()
subplot(2,3,4);
plot2d(fdm_time, adp_y(2,:), 3);
plot2d(fdm_time, fdm_la*fdm_Ct0/fdm_inertia*adp_ud_f, 2);
// plot2d(fdm_time, fdm_la*fdm_Ct0/fdm_inertia*adp_ud_f, 2);
legends(["y2", "udf"],[3 2], with_box=%f, opt="ul");
xtitle('ud_f');
subplot(2,3,5);
plot2d(fdm_time, fdm_la*fdm_Ct0/fdm_inertia*ones(1, length(time)),3);
// plot2d(fdm_time, fdm_la*fdm_Ct0/fdm_inertia*ones(1, length(time)),3);
plot2d(fdm_time, adp_est(ADP_EST_B,:), 2);
xtitle('adp_est B');
+3 -3
View File
@@ -29,12 +29,12 @@ FDM_MOTOR_LEFT = 2;
FDM_MOTOR_NB = 2;
fdm_g = 9.81;
fdm_mass = 0.25;
fdm_mass = 0.5;
fdm_inertia = 0.0078;
fdm_la = 0.25; // arm length
fdm_Ct0 = 4. * fdm_mass * fdm_g / 2; // thrust coefficient
fdm_V0 = 1e9; //
//fdm_Ct0 = 4. * fdm_mass * fdm_g / 2; // thrust coefficient
//fdm_V0 = 1e9; //
fdm_Cd = 1e-9; // drag coefficient
fdm_min_thrust = 0.05; // 5%
+7 -5
View File
@@ -28,8 +28,8 @@ if 1
max_speed = [ 5 2.5];
max_accel = [ 9.81*tan(rad_of_deg(30)) 0.5*9.81];
b0 = [-5 0];
b1 = [ 5 -5];
b2 = [ 0 -5];
b1 = [ 5 0];
b2 = [ 0 0];
[fo_traj1] = sbb_gen_traj(time1, dyn, max_speed, max_accel, b0, b1);
b1 = [fo_traj1(1,1,$) fo_traj1(2,1,$)];
[fo_traj2] = sbb_gen_traj(time2, dyn, max_speed, max_accel, b1, b2);
@@ -41,9 +41,11 @@ end
fdm_init(time, df_state_of_fo(fo_traj(:,:,1)), [0.25 0.25]');
global fdm_perturb;
k=find(time > 5 & time < 5.05);
fdm_perturb(FDM_AX,k) = 10*ones(1,length(k));
if 0
global fdm_perturb;
k=find(time > 5 & time < 5.05);
fdm_perturb(FDM_AX,k) = 10*ones(1,length(k));
end
ctl_init(time);
adp_init(time, [19.5 157]', []);