You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't see why it's valid to use the x_f16_dot states here? These are derivatives not state variables. Previously we had code that extracted the state variables from x_delta, which was the difference between the current state and the trim state.
The Ny_r computation has a similar issue. The old computation was Ny_r = ay/g + x_ctrl(6), the new computation is Ny_r = ay/g + x_f16_dot(9);
The text was updated successfully, but these errors were encountered:
note: using the earlier method to compute ps and Ny_r using x_ctrl makes the optimized gains work very poorly, where the aileron especially oscillates quickly between its limits. You can guess this would happen as the gains in some of the rows of the optimized LQR matrix are a few orders of magnitude larger than the gains in the old LQR matrix.
I'm trying to reproduce the v2 controller in python and ran into an issue where I think
ps
is being computed incorrectly in Matlab.This is done in
subf16_morelli.m
. The comments say:% ps= p*cos(alpha) + r*sin(alpha)
and the computation is done as:
ps = x_f16_dot(7)*cos(x_f16_dot(2)) + x_f16_dot(9)*sin(x_f16_dot(2));
I don't see why it's valid to use the
x_f16_dot
states here? These are derivatives not state variables. Previously we had code that extracted the state variables fromx_delta
, which was the difference between the current state and the trim state.The
Ny_r
computation has a similar issue. The old computation wasNy_r = ay/g + x_ctrl(6)
, the new computation isNy_r = ay/g + x_f16_dot(9);
The text was updated successfully, but these errors were encountered: