-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
root
authored and
root
committed
Apr 7, 2020
1 parent
3aad6b3
commit cb95d9d
Showing
254 changed files
with
9,853 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
This is the instructional package for 'Multicopter Design and Control Practice'. | ||
The model in "e0" is mainly used for the introduction of the experimental platform, corresponding to the relevant content in Chapters 3 and 4 of the book. | ||
The last 8 chapters of the book correspond to 8 experiments, of which Propulsion System Design Experiment has no relevant instructional package. Experiments 2 to 8 correspond to the contents of Chapters 6 to 12, and the corresponding files are e2 to e8. | ||
There are three sub-files in each folder, which correspond to the basic experiment, analysis experiment and design experiment in each experiment. Analysis experiment of chapter 2 has no source file package--"e2/e2.2",becasuse it mainly focus on theoretical calculation and analysis. | ||
|
||
The comparison between the instructional package and each experiment is as follows: | ||
e2:Dynamic Modeling Experiment; | ||
e3:Sensor Calibration Experiment; | ||
e4:State Estimation and Filter Design Experiment; | ||
e5:Attitude Controller Design Experiment; | ||
e6:Set-point Controller Design Experiment; | ||
e7:Semi-autonomous Control Model Design Experiment; | ||
e8:Failsafe Logic Design Experiment. | ||
|
||
We don't provid design experiment package for students, and the code begining with "%@ " should be compeleted to make it right to run.If you can be certified as a teacher, we will give you all the packages. |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
path(path, './icon/'); | ||
|
||
%模型参数 运行模型初始化文件icon/init.m | ||
Init; | ||
|
||
|
||
%PID参数 | ||
Kp_RP_ANGLE =6.5; | ||
Kp_RP_AgngleRate = 0.55; | ||
Ki_RP_AgngleRate = 0.01; | ||
Kd_RP_AgngleRate = 0.005; | ||
|
||
Kp_YAW_AngleRate = 3.2; | ||
Ki_YAW_AngleRate = 0.8; | ||
Kd_YAW_AngleRate = 0.05; | ||
%最大控制角度,单位度 | ||
MAX_CONTROL_ANGLE_RP = 45; | ||
MAX_CONTROL_ANGLE_Y = 180; | ||
%最大控制角速度,单位度 | ||
MAX_CONTROL_ANGLE_RATE_RP = 180; | ||
MAX_CONTROL_ANGLE_RATE_Y = 90; |
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
load MavLinkStruct.mat; | ||
%PID Parameters | ||
Kp_RP_ANGLE =6.5; | ||
Kp_RP_AgngleRate = 0.10; | ||
Ki_RP_AgngleRate = 0.02; | ||
Kd_RP_AgngleRate = 0.001; | ||
|
||
Kp_YAW_AngleRate = 0.3; | ||
Ki_YAW_AngleRate = 0.1; | ||
Kd_YAW_AngleRate = 0.00; | ||
%integral saturation | ||
Saturation_I_RP_Max=0.3; | ||
Saturation_I_RP_Min=-0.3; | ||
Saturation_I_Y_Max=0.2; | ||
Saturation_I_Y_Min=-0.2; | ||
%thrust when UAV hover | ||
THR_HOVER=0.609; | ||
%max control angle | ||
%default 35deg | ||
MAX_CONTROL_ANGLE_ROLL = 35; | ||
MAX_CONTROL_ANGLE_PITCH = 35; | ||
%max control angle rate | ||
MAX_CONTROL_ANGLE_RATE_PITCH = 220; | ||
MAX_CONTROL_ANGLE_RATE_ROLL = 220; | ||
MAX_CONTROL_ANGLE_RATE_Y = 200; | ||
|
||
%Initial condition | ||
ModelInit_PosE = [0,0,0]; | ||
ModelInit_VelB = [0,0,0]; | ||
ModelInit_AngEuler = [0,0,0]; | ||
ModelInit_RateB = [0,0,0]; | ||
ModelInit_RPM = 0; %Initial motor speed(rad/s) | ||
|
||
%UAV model parameter | ||
ModelParam_uavMass = 1.4; %Mass of UAV(kg) | ||
ModelParam_uavJxx = 0.0211; | ||
ModelParam_uavJyy = 0.0219; | ||
ModelParam_uavJzz = 0.0366; | ||
%Moment of inertia matrix | ||
ModelParam_uavJ= [ModelParam_uavJxx,0,0;... | ||
0,ModelParam_uavJyy,0;... | ||
0,0,ModelParam_uavJzz]; | ||
ModelParam_uavType = int8(3); %X-type quadrotor£¬refer to "»úÐͶ¨ÒåÎĵµ.docx" for specific definitions | ||
ModelParam_uavMotNumbs = int8(4); %Number of motors | ||
ModelParam_uavR = 0.225; %Body radius(m) | ||
|
||
ModelParam_motorCr = 1148; %Motor throttle-speed curve slope(rad/s) | ||
ModelParam_motorWb =-141.4; %Motor speed-throttle curve constant term(rad/s) | ||
ModelParam_motorT = 0.02; %Motor inertia time constant(s) | ||
ModelParam_motorJm = 0.0001287; %Moment of inertia of motor rotor + propeller(kg.m^2) | ||
%M=Cm*w^2 | ||
ModelParam_rotorCm = 1.779e-07; %Rotor torque coefficient(kg.m^2) | ||
%T=Ct**w^2 | ||
ModelParam_rotorCt = 1.105e-05; %Rotor thrust coefficient(kg.m^2) | ||
ModelParam_motorMinThr = 0.05; %Motor throttle dead zone(kg.m^2) | ||
|
||
ModelParam_uavCd = 0.073; %Damping coefficient(N/(m/s)^2) | ||
ModelParam_uavCCm = [0.01 0.01 0.0055]; %Damping moment coefficient vector(N/(m/s)^2) | ||
ModelParam_uavDearo = 0.12; %Vertical position difference of Aerodynamic center and gravity center(m) | ||
|
||
ModelParam_GlobalNoiseGainSwitch =1; %Noise level gain | ||
|
||
%Environment Parameter | ||
ModelParam_envGravityAcc = 9.8; %Gravity acceleration(m/s^2) | ||
ModelParam_envLongitude = 116.259368300000; | ||
ModelParam_envLatitude = 40.1540302; | ||
ModelParam_GPSLatLong = [ModelParam_envLatitude ModelParam_envLongitude]; %Latitude and longitude | ||
ModelParam_envAltitude = -41.5260009765625; %Reference height, down is positive | ||
ModelParam_BusSampleRate = 0.001; %Model sampling rate | ||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+39.8 KB
e0/2.PSPOfficialExps/ExternalMode_Examples/px4demo_attitude_system_multi_task.slx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.