Closed stanleybak closed 6 years ago
Also: trimmerFun
always uses the Stevens & Lewis model. It might make sense to output a Stevens & Lewis trim point and a Morelli trim point, since these might differ. Then, online, you select the one based on the user selection.
I think the control design has the same issue (always using the Stevens & Lewis model). Maybe this is more work to fix than it's worth... since the models should be approximately the same.
Within 'runF16', the trim/equilibrium states are now hard-coded to match the LQR design point. 'trimmerFun' should only need to be called if we attempt to create a fully linear model (for an even simpler case study?) or if we redesign the controllers. Because the trim points are hard-coded, however (same as the LQR gain matrices), they will need to be manually modified if we shift to a gain-scheduled controller. I have not yet addressed the S&L vs Morelli trim point issue. I agree that the trim points should be extremely similar.
trimmerFun
now gets called based on the initial condition. I think it should instead be called during the control design based on the trim state, which is then output like the LQR gains.This might affect performance... after the change we should check if the GCAS system still works. We might need to use a gain-scheduled version if better control is needed.