-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
高度速度制御を追加する #8
Comments
理論とシミュレーションが一致しない件理論のモデルと結果{
"plants": [
{
"comment": "Rotor1",
"num": [
"1"
],
"den": [
"Tr",
"1"
]
},
{
"comment": "Speed Altitude",
"num": [
"1"
],
"den": [
"m",
"d"
]
},
{
"comment": "Altitude",
"num": [
"1"
],
"den": [
"1",
"0"
]
}
],
"controllers": [
{
"num": [
"VAlt_Kd",
"VAlt_Kp",
"VAlt_Ki"
],
"den": [
"1",
"0"
]
},
{
"num": [
"Alt_Kd",
"Alt_Kp",
"Alt_Ki"
],
"den": [
"1",
"0"
]
}
],
"constants": {
"m": 0.71,
"g": 9.81,
"N": 4,
"d": 0.05,
"A": 8.3e-07,
"Tr": 0.0193,
"Kr": 2896,
"W0": 1448,
"Ix": 0.0061,
"Iy": 0.00653,
"Iz": 0.0116,
"VAlt_Kp": 1,
"VAlt_Ki": 0.0,
"VAlt_Kd": 1,
"Alt_Kp": 1,
"Alt_Ki": 0.0,
"Alt_Kd": 1,
"VRoll_Kp": 0.2,
"VRoll_Ki": 1,
"VRoll_Kd": 0.032,
"Roll_Kp": 1,
"Roll_Ki": 0,
"Roll_Kd": 1
},
"pd_args": {
"PM": 60,
"Wc": 1,
"Ki": 0.0
}
} シミュレーションの実装と結果 DroneAltOutputType run(DroneALtInputType &in)
{
DroneAltOutputType out = prev_out;
if (simulation_time >= control_cycle) {
simulation_time = 0;
/*
* speed control
*/
double target_spd = pos_control->calculate(in.target_altitude, in.pos.z);
target_spd = flight_controller_get_limit_value(target_spd, 0, -max_spd, max_spd);
/*
* position control
*/
//機体座標系の速度を地上座標系に変換
EulerType e = {in.euler.x, in.euler.y, in.euler.z};
VectorType v = {in.spd.u, in.spd.v, in.spd.w};
VectorType g_v = ground_vector_from_body(v, e);
//地上座標系の速度でPID制御
double throttle_power = spd_control->calculate(target_spd, g_v.z);
throttle_power = flight_controller_get_limit_value(throttle_power, 0, -max_power, max_power);
/*
* thrust
*/
out.thrust = (mass * gravity) + (throttle_gain * throttle_power);
}
simulation_time += delta_time;
return out;
} シミュレーション結果:
パラメータ:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: