F-22 pitching up at initialization #604
Replies: 6 comments 17 replies
-
Could you provide the failure message that you get when trying to run a simple trim ? |
Beta Was this translation helpful? Give feedback.
-
Can you give us some more details on what you did to the F-22 xml. Does it now trim with your changes? What are the requirements for your project? I was going to ask if you really want to use the F-22 given it has such a complicated FCS. |
Beta Was this translation helpful? Give feedback.
-
I've been wondering if the JSBSim trim routines will actually work with a FBW FCS command law. Forget about the super complicated F-22 FCS, let's assume we have a simple pitch rate command law. So a centered stick commands a zero pitch rate and greater stick deflection/command commands an increasing pitch rate. And by definition to be in trim the pitch rate has to be 0. Now to balance the pitch moments the trim routine will run through the -1 to +1 range for the longitudinal inceptor. But any non-zero value will have the FCS trying to move the control surfaces to generate a non-zero pitch rate via it's feedback controller etc. |
Beta Was this translation helpful? Give feedback.
-
Actually I guess in this case the trim routines just need to zero in on using 0 for the stick's pitch cmd. The FCS controller then should drive the control position via it's feedback loop to the required position to achieve a zero pitch rate which is what the trim routine is looking for. |
Beta Was this translation helpful? Give feedback.
-
Actually as long as the FCS feedback loops run for long enough during each trim solution time step? |
Beta Was this translation helpful? Give feedback.
-
I'm no expert on the trim routines, but at a high level my assumption having glanced at the trim code a while ago is that the trim routines set the inceptor commands as opposed to directly setting the control surface positions. During the iteration of trying a range of inceptor commands the trim code then executes a single time step to see whether this inceptor command results in zero translational acceleration and zero angular acceleration. So now in the case where the FCS isn't simply a simple mapping of inceptor command So I assume during the single time step the PID controller will sample say the current pitch rate to compare it to the commanded pitch rate. However I'm not certain what the current pitch rate will be in this circumstance, maybe 0? And so the PID won't command the elevator to move since it thinks the current pitch rate matches the commanded pitch rate. But given the current elevator position, possibly 0, the trim routine will see that the angular acceleration isn't 0 and so won't recognize that for a 0 pitch rate the inceptor command has to be 0. Plus later on it may find that a non-zero inceptor command which gets turned into a non-zero pitch rate command does so happen to move the elevator via the PID controller to a position that results in zero angular acceleration and so thinks that this non-zero inceptor command is a valid command. However at time 0 the aircraft will be in trim, but immediately afterwards given the non-zero inceptor command the trim solution found the FCS will start demanding a non-zero pitch rate, i.e. putting the aircraft out of trim. Which is why I'm wondering if the current trim routines will really work with an FCS that implements a command law. |
Beta Was this translation helpful? Give feedback.
-
Hello team,
I am new to JSBSim and experiencing a problem with the F-22 (that I must use for a project).
With the gear up, and all commands set to zero, the airplane is constantly pitching up when I start a flight with speed and altitude.
Modifying the .xml file to prevent the FCS from reacting doesn't change a thing: the aircraft pitches up until it reaches very high AoA and then stalls. Even with thrust vectoring control, elevator, tail-edge flaps and leading-edge flaps artificially disabled.
I first thought it could be an aerodynamic reaction due to my initial conditions that could be wrong, but I tried a lot of different configurations without noticing any change.
Here is the configuration I use:
JSBSim 1.1.11 runs along with the Matlab S-function. The aircraft file used is f22.xml.
Initial conditions are called from an init file:
In Matlab, throttle command, runset, and mixture are set to 1.0. Every other S-function input is set to 0.0.
I am not sure to have fully understood how I should use the initial conditions vectors that are within the S-function, it seems to me that it does the same thing as the init file, but removing the init file generates an error when I try to run the sim.
I tried to run a script to force a "do simple trim" but the trim fails, and trying to manually counteract this phenomenon had been ineffective.
Would somebody have an idea about the origin of this pitch moment? Or an error I could make using JSBSim?
Thank you for your help!
Regards.
Beta Was this translation helpful? Give feedback.
All reactions