What is the axis z sign convention for the state vector?

1 view (last 30 days)
HI, I'm trying to implement the Guidance Model of UAV for my flight control model. I'm confused on the conventions chosen for the z axis: for the body frame z_b vector is down, so the Fthrust should be negative and in modulus higher than the weight of the UAV to gain altitude, right? However, the state gives the coodinates in the inertial model, thus x_e, y_e, z_e etc.. In this frame, z_e is still "down", or "up"?

Answers (1)

Paras Gupta
Paras Gupta on 22 Aug 2023
Hi Eleonora,
I understand that you want to know the direction conventions followed by the UAV state vector.
The UAV Toolbox follows the North-East-Down Coordinate system with the z-coordinate of the UAV body frame, or pointing downwards when the UAV travels during perfect horizontal flight. Therefore, in the body frame, the Fthrust should indeed be negative and greater in magnitude than the weight of the UAV to gain altitude.
The UAV state indeed gives the coordinates in the inertial model as , , and . However, even in this frame, points downwards.
The following code helps understand how the state output points downwards.
model = multirotor;
s = state(model);
% Specify the location in world coordinates.
s(1:3) = [3;2;1];
u = control(model);
u.Roll = pi/12;
u.Thrust = 1;
e = environment(model);
sdot = derivative(model,s,u,e);
simOut = ode45(@(~,x)derivative(model,x,u,e), [0 3], s);
figure
plot(simOut.y(3,:));
legend('Z-position');
In the above code, with the specified thrust and roll angle, the multirotor should fly over and lose some altitude. However, the plot shows that the output z-position () is increasing. This is expected as positive is down as per the stated convention above.
The above code is taken from the example ‘Simulate A Multirotor Control Command’ in the documentation given below:
Please refer the sections ‘UAV Coordinate Systems’ and ‘UAV Multirotor Guidance Model Equations’ in the below documentation for more information.
Hope this helps.

Categories

Find more on UAV in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!