diff --git a/controls/MATLAB/thrustAndDragConstant/calcDragConstant.m b/controls/MATLAB/thrustAndDragConstant/calcDragConstant.m index 5f46efe50f2a9ebb931ce426f09bbe8121c80a3f..3ebd0135780ff85931e33adb536c3dc14ecc285a 100644 --- a/controls/MATLAB/thrustAndDragConstant/calcDragConstant.m +++ b/controls/MATLAB/thrustAndDragConstant/calcDragConstant.m @@ -36,6 +36,7 @@ rotor_speed_3 = data.(5) * (pi/30); % b: Defined in section 5.5.4.1 % Kd_vector: Vector containing all experimental Kd values % Vb: Battery voltage + u1 = ((data.(1)) - Pmin)/(Pmax - Pmin); u2 = ((data.(1)) - Pmin)/(Pmax - Pmin); u3 = ((data.(1)) - Pmin)/(Pmax - Pmin); diff --git a/controls/dataCollection/Thrust and Drag Constant Data v2.xlsx b/controls/dataCollection/Thrust and Drag Constant Data v2.xlsx index b187c4f2eb2211604727e86c58726f207be56ae4..5e843501691b72708b7b7b2f0c36d2e62330cdbb 100644 Binary files a/controls/dataCollection/Thrust and Drag Constant Data v2.xlsx and b/controls/dataCollection/Thrust and Drag Constant Data v2.xlsx differ diff --git a/controls/model/modelParameters.m b/controls/model/modelParameters.m index 4d04f572601179be83af8d527a862e4873c026a3..103e14e9b980d2867ad9da9b8d9dc19840767409 100644 --- a/controls/model/modelParameters.m +++ b/controls/model/modelParameters.m @@ -5,9 +5,13 @@ Jyy = 0.0277; % Quadrotor and battery motor of inertia around by (roll) Jzz = 0.0332; % Quadrotor and battery motor of inertia around bz (yaw) Jreq = 4.2012e-05; % Rotor and motor moment of inertia around axis of rotation - Kt = 8.1558*10^-6; % Rotor thrust constant + %Kt = 8.1558*10^-6; % Rotor thrust constant + Kt = 8.6519e-6; Kh = 0; % Rotor in-plane drag constant - Kd = 1.8087e-07; % Rotor drag constant + %Kd = 1.8087e-07; % Rotor drag constant + %Kd = 1.7473e-07; + %Kd = 1.0327e-6; % Kd value without rotor 3 + Kd = 1.0317e-6; rhx = 0.016; % X-axis distance from center of mass to a rotor hub rhy = 0.016; % Y-axis distance from center of mass to a rotor hub rhz = 0.003; % Z-axis distance from center of mass to a rotor hub @@ -15,18 +19,20 @@ Kq = 96.3422; % Motor torque constant Kv = 96.3422; % Motor back emf constant If = 0.511; % Motor internal friction current - Pmin = 0.40; % Minimum zybo output duty cycle command - Pmax = 0.80; % Maximum zybo output duty cycle command + %Pmin = 0.40; % Minimum zybo output duty cycle command + %Pmax = 0.80; % Maximum zybo output duty cycle command + Pmin = 1e5; % Minimum zybo output duty cycle command + Pmax = 2e5; % Maximum zybo output duty cycle command Tc = 0.01; % Camera system sampling period tau_c = 0; % Camera system total latency Vb = 11.1; % Nominal battery voltage (V) - omega_o = 598.088; % Equilibrium Rotor Speed x_controlled_o = 0; % Equilibrium lateral controller output y_controlled_o = 0; % Equilibrium longitudinal controller output yaw_controlled_o = 0; % Equilibrium yaw controller output + omega_o = sqrt((m*g)/(4*Kt)); % Equilibrium Rotor Speed % Equilibrium height controller output height_controlled_o = (((Rm*If + ... + (((omega_o * 2 * Rm * Kv * Kq ... * Kd + 1)^2) - 1)/(4* Rm*Kv^2*Kq ... - *Kd))/Vb)*(Pmax- Pmin)+Pmin)*100; \ No newline at end of file + *Kd))/Vb)*(Pmax- Pmin)+Pmin);