Jump to content

SFM tuning


RedBeard2
 Share

Recommended Posts

I'm going through the effort to look at and understand the SFM to create a Mod and there are some things that are just mysterious and hard to interpret. I'm going to try to cover as many as I can here, but may have to split it into multiple postings to get answers to everything.

 

First are the thrust values:

 

    thrust_sum_max                 = 8000, -- thrust in kg (44kN)
   thrust_sum_ab                 = 10000, -- thrust in kg (71kN)

 

It's really unclear what the intended values are here since converting 44 kN to kgf should be 4487 kgf. Should I ignore the comment and just do the normal kN -> kgf conversion?

 

Next is understanding range value:

 

    range                         = 2000, -- Max range in km (for AI)

 

Is this a ferry range or a combat load range as these can vary dramatically?

 

The M_nominal weight value is not a precise term. Is this weight including full internal fuel and pilot or is it supposed to include a typical combat load?

 

    M_empty                     = 8000, -- kg
   M_nominal                     = 10000, -- kg
   M_max                         = 12000, -- kg

 

Some speed values are ambiguous as well:

 

    V_max_h                     = 800, -- Max speed at max altitude in m/s (for AI)

 

Is that supposed to be CAS or TAS?

 

I'd appreciate any help I can get.

 

Thanks

Link to comment
Share on other sites

  • 1 month later...

Hmm, still no answer for these yet and I have some more:

 

What is Mzalfa and Mzalfadt? They are described as coefficients for pitch agility, but that isn't making any sense to me. Pitch is going to be based on a sum of moments about the center of gravity such as wing lift and tail plane down force and you would need to know the distance of each from the CG. There's not much in the way of variability for these either. For Mzalfa, 33 aircraft use 4.355, 2 used 6, and 26 use 6.6. Mzalfadt is similar in that 33 aircraft use 0.8 and 29 use a value of 1. Also, the sign and magnitude look wrong to be coefficients as most aerodynamic coefficients are negative and rarely are they greater than 1.

 

What is kjx and kjz? Kjz appears to be a constant of 0.00125 as it never varies for any of the aircraft. I can't figure what kjx means.

 

Czbe appears to be the coefficient for directional (yaw) stability (C sub n sub beta), but I can't figure out how the side slip angle beta is determined unless it is hard coded to the rudder pedal controller value. In this case, 23 planes use a value of -0.012 and 39 use a value of -0.016.

 

I'd appreciate any help in understanding how these parameters are used.

Link to comment
Share on other sites

Here's another question to add to the list. The engine table_data lists thrust in kN for MIL power and afterburner settings at various Mach. Can anyone say whether the thrust values are gross or net?

 

I was originally thinking gross, but after looking how the values fall off up to Mach 1, then rise again, I'm starting to think they are net thrust. I'd like to know which.

Link to comment
Share on other sites

    thrust_sum_max                 = 8000, -- thrust in kg (44kN)
   thrust_sum_ab                 = 10000, -- thrust in kg (71kN)

 

It's really unclear what the intended values are here since converting 44 kN to kgf should be 4487 kgf. Should I ignore the comment and just do the normal kN -> kgf conversion?

 

 

I thought this was strange as well. I'm not sure what it does, since you are already defining thrust in the engine table.

 

 

    range                         = 2000, -- Max range in km (for AI)

 

Is this a ferry range or a combat load range as these can vary dramatically?

 

The M_nominal weight value is not a precise term. Is this weight including full internal fuel and pilot or is it supposed to include a typical combat load?

 

    M_empty                     = 8000, -- kg
   M_nominal                     = 10000, -- kg
   M_max                         = 12000, -- kg

 

Unsure on these two.

 

    V_max_h                     = 800, -- Max speed at max altitude in m/s (for AI)

 

Is that supposed to be CAS or TAS?

 

All speeds are m/s TAS.

 

 

What is Mzalfa and Mzalfadt? They are described as coefficients for pitch agility, but that isn't making any sense to me. Pitch is going to be based on a sum of moments about the center of gravity such as wing lift and tail plane down force and you would need to know the distance of each from the CG. There's not much in the way of variability for these either. For Mzalfa, 33 aircraft use 4.355, 2 used 6, and 26 use 6.6. Mzalfadt is similar in that 33 aircraft use 0.8 and 29 use a value of 1. Also, the sign and magnitude look wrong to be coefficients as most aerodynamic coefficients are negative and rarely are they greater than 1.

 

What is kjx and kjz? Kjz appears to be a constant of 0.00125 as it never varies for any of the aircraft. I can't figure what kjx means.

 

Czbe appears to be the coefficient for directional (yaw) stability (C sub n sub beta), but I can't figure out how the side slip angle beta is determined unless it is hard coded to the rudder pedal controller value. In this case, 23 planes use a value of -0.012 and 39 use a value of -0.016.

 

You know as much as almost anyone else. Changing these values (even in a scientific manner) has never allowed me to make any conclusions.

 

Here's another question to add to the list. The engine table_data lists thrust in kN for MIL power and afterburner settings at various Mach. Can anyone say whether the thrust values are gross or net?

 

I was originally thinking gross, but after looking how the values fall off up to Mach 1, then rise again, I'm starting to think they are net thrust. I'd like to know which.

 

I wouldn't take the thrust values too seriously when it come to accurate values above transonic regions. It seems ED may use this to tweak the top speed at high mach numbers. In a way, I guess that means they are using it as net thrust due to the high ram drag.


Edited by SilentEagle
Link to comment
Share on other sites

I tried to do a direct comparison of simulated jet engine data (using the NASA jet engine simulator) to look at how gross and net thrust compares to the SFM data. I chose to use the MiG-29 data (index 2) from SFM_Data.lua.

 

The graph below shows gross thrust at sea level and 5 km altitude and net thrust at sea level and 5 km.

 

JetEngineSimulation_zpsddf51ca0.jpg

 

Edit: the Thrust units is Newtons, not kN.

 

Gross thrust increases with Mach due to ram effects. Net thrust generally falls off with or maintains a more or less constant value with increasing Mach. The only way I can see to recreate the SFM data profile is to use gross thrust following a specific flight profile.

 

Looking at the example SFM data for the MiG-29, it looks like the flight profile uses an initial climb for a short period at a fast enough rate to reduce the gross thrust due to altitude increase even though Mach is increasing. Then climb rate reduces slightly to maintain a constant thrust value.

 

At Mach .6 climb rate is reduced further to allow acceleration to build thrust up and push through Mach 1. After that climb continues and thrust falls off with altitude faster than it builds up with Mach.

 

So, this begs the question of whether or not there's a standard climb profile that is being used or do we just use the aircraft's typical climb profile?


Edited by RedBeard2
Link to comment
Share on other sites

  • 2 weeks later...

I'm still working on trying to get an answer. In the meantime, I have been doing some flight testing. In order to better understand the use of the values, I flew a number of test flights with a constant 50 kN thrust engine and varied dpdh_m on each flight. I measured the impact on level flight maximum speed at each altitude and this is the result:

 

Dpdh_mVariation_zpsd8521438.jpg

As you can see, dpdh_m will reduce thrust as the value increases. In addition, fuel consumption is reduced, but it is not clear if this is a constant TSFC applied to a smaller thrust or if the TSFC itself is affected.

 

Given the thrust table_data appears to use a varying altitude to measure the thrust to begin with, it is not clear why dpdh_m is used to decrease it further. I'm still trying to find an answer though.


Edited by RedBeard2
clarification
Link to comment
Share on other sites

Ok, after lots of flight tests, I think I've figured out how to model the engine reasonably well, including using the dpdh_m and dpdh_f parameters.

 

The basic pattern is to use a sea level net thrust for the table_data and start with dpdh_m and dpdh_f as 2000 to 3000. Do your flight testing to look at the maximum speed performance envelope from sea level to maximum altitude. Adjust dpdh_* values to either lower high altitude performance, by increasing the value or increase high altitude performance by lowering the value.

 

I'll be adding this, with a little more detail, to the guide.

Link to comment
Share on other sites

I tried to do a direct comparison of simulated jet engine data (using the NASA jet engine simulator) to look at how gross and net thrust compares to the SFM data. I chose to use the MiG-29 data (index 2) from SFM_Data.lua.

 

The graph below shows gross thrust at sea level and 5 km altitude and net thrust at sea level and 5 km.

 

JetEngineSimulation_zpsddf51ca0.jpg

 

Edit: the Thrust units is Newtons, not kN.

 

Gross thrust increases with Mach due to ram effects. Net thrust generally falls off with or maintains a more or less constant value with increasing Mach. The only way I can see to recreate the SFM data profile is to use gross thrust following a specific flight profile.

 

Looking at the example SFM data for the MiG-29, it looks like the flight profile uses an initial climb for a short period at a fast enough rate to reduce the gross thrust due to altitude increase even though Mach is increasing. Then climb rate reduces slightly to maintain a constant thrust value.

 

At Mach .6 climb rate is reduced further to allow acceleration to build thrust up and push through Mach 1. After that climb continues and thrust falls off with altitude faster than it builds up with Mach.

 

So, this begs the question of whether or not there's a standard climb profile that is being used or do we just use the aircraft's typical climb profile?

 

 

There are several notes about your observation.

 

First of all, I do not know the reason why NASA simulation gives wrong thrust curves for non-AB thrust. THe curve is obtained from the manual and is matched to the real up to 1 M. THe plane NEVER override it in horisontal flight. The thrust decreasing after 1M is intrinsic for non-AB thrust rating. There is no special "tricks" to achieve certain results in performance curves.

 

If you take a look at AB thrust curve you will see that the thrust increases all the way.

 

Tweaking AB performance it must be more accurate to have several curves vs M at various altitudes. SFM, instead, historically uses the modifications of only one basic curve for SL as altitude changes.

 

Real thrust curves are available for rellatively low M, and the range becomes wide as altitude grows.

 

The trick is that high Mach numbers are never achieved at low altitudes, so the initial thrust curve for SFM represents all possible M. So, adjusting the performance you can manipulate both - high M region and dpdh_* to have desired thrust curve at 11 km.

For me it works good (see F-15, MiG-29 and Su-27 performance tuning results).


Edited by Yo-Yo

Ніщо так сильно не ранить мозок, як уламки скла від розбитих рожевих окулярів

There is nothing so hurtful for the brain as splinters of broken rose-coloured spectacles.

Ничто так сильно не ранит мозг, как осколки стекла от разбитых розовых очков (С) Me

Link to comment
Share on other sites

Tuning is an art, from what I can tell. There never seems to be enough data to fully replicate what is happening.

 

The NASA engine simulation is for an uninstalled engine with a simulated ideal inlet pressure recovery. Once the engine is installed in an aircraft, the performance will vary from the engine in isolation due to differences in inlet pressure recovery.

 

I agree that having the performance chart for an engine is the best way to go, but in the absence of that, using the NASA engine simulation is probably the next best thing.

 

I think the key point of data here is that you always start with sea level net thrust and low dpdh_* values and adjust from there.

Link to comment
Share on other sites

Ok, I have the engine thrust situation under control now and I'm writing up the process in the guide (next update is coming soon). From my experience so far, modelling thrust to generate the table data seems to work fairly well for subsonic speeds, but is only a starting point for supersonic speeds.

 

The key point here is that we only have data for a single altitude and it needs to work for all altitudes. That requires fiddling with the dpdh_* values and that means that your simulated engine thrust data will need to be tuned to fit the performance envelope. Here's an example of the F-104T simulated (Pmax and Pfor) vs. tuned thrust data:

 

F-104Tenginethrust_zps31cb5cc0.jpg

 

With this kind of tuning, you end up a flight envelope that can match the original aircraft fairly closely. The following shows only some of the many flight tests I went through to validate this:

 

F-104Tflightenvelope_zps3f73e4e6.jpg

As you can see, the performance envelope is matched fairly well, although the tuned thrust values deviate significantly at higher mach ranges.

  • Like 1
Link to comment
Share on other sites

Now that engine modelling is reasonably understood, I'm back to trying to understand some parameters for the flight model. In particular:

 

Mzalfa - known to be related to pitching coefficients

Mzalfadt - known to be related to pitching coefficients

kjx

kjz

 

Pitch is usually done around the center of gravity and the torque or moment applied will be the sum of all forces multiplied by their moment arms. The forces are things like wing lift and tail down force and the moment arms would be their distance from the center of gravity. Logically, this could imply that Mzalfa is the wing pitch coefficient and kjx or kjz is the wing moment arm and Mzalfadt is the tail pitch coefficient and kjz or kjx is the tail moment arm.

 

However, normal computation of the pitching moment includes knowing the horizontal tail area and Mean Aerodynamic Chords of the wing and horizontal tail. None of these are provided in the SFM, so that would seem to imply that those factors are already included in Mzalfa and Mzalfadt values and they are not the coefficients themselves.

 

It would be really nice if Yo-yo or someone could make a definitive statement about how the above are used and interpreted. Perhaps even using the same terms as a published aerodynamics reference such as http://en.wikipedia.org/wiki/Longitudinal_static_stability. I've been unable to devise a series of flight tests to do this definitively myself yet.

Link to comment
Share on other sites

I've done some experimentation and need to revise the above slightly. The pitching coefficients C_m_alpha (wing) and C_m_delta (horizontal tail) are derived in terms of C_L_alpha (wing lift) and it's Mean Aerodynamic Chord distance from the center of gravity and the tail C_l_alpha_T (tail lift curve slope), tail volume coefficient, and tail efficiency factor, where the tail volume coefficient factors in the distance from center of gravity.

 

This likely means that kjx and kjz are probably not the moment arms as we already have C_L_alpha in terms of Mach in the table_data, but no corresponding C_l_alpha_T for the tail.

 

The implication of this is that Mzalfa is likely C_m_alpha and Mzalfadt is C_m_delta. However, that leaves out C_m_0, C_m_alpha_dot, and C_m_q. Since this is a Simplified Flight Model, it's possible that some simplifications are assumed such as C_m_0 being 0 (no moment with 0 lift), no downwash effects (C_m_alpha_dot), and using a constant pitch damping value (C_m_q) for all aircraft. This would allow for trim equations to work reasonably well, but leaves kjx and kjz as unknowns.

 

If the above is true, then there are interesting choices ahead for determining good values since what should be a range of values by Mach and altitude has been squashed down to a single value to work for all Mach and altitudes AND it must be able to rotate the aircraft at critical speeds (takeoff and landing).


Edited by RedBeard2
Link to comment
Share on other sites

RedBeard2,

Thanks for looking into this. The lack of reactions/replies shouldn't deter you from investigating further. I, for one, read this thread with great interest and appreciate your efforts!

"It's not the years, honey. It's the mileage..."

Link to comment
Share on other sites

Further experimentation seems to indicate that the values are reversed. In other words, Mzalfa is C_m_delta (horizontal tail pitch coefficient) and Mzalfadt is C_m_alpha (wing pitch coefficient). This was arrived at by setting one pitch coefficient to zero and observing the effect.

Link to comment
Share on other sites

Hmm, this begs the question of whether or not ED realizes they reversed the values. Normally, the larger value is for the wing coefficient, but the Wunderluft example had Mzalfa (tail pitch) with the larger value.

 

This could explain why the aircraft seem to be twitchy in the pitch.

Link to comment
Share on other sites

I've been translating and reading Russian aerodynamics documents trying to figure stuff out as well as continuing to do additional flight tests.

 

Mzalfa and Mzalfadt do appear to be swapped and I have a bug report waiting for clarification. Currently Mzalfa is the SFM horizontal tail pitch coefficient.

 

Through experimentation, I have also determined:

kjx - related to roll characteristics.

kjz - related to pitch characteristics.

 

I can't think of any factor that these would plug into and I haven't seen anything in the Russian aerodynamics docs yet, but I'm still looking.

Link to comment
Share on other sites

Very good work, Redbeard2. Keep it up :thumbup:

2D/3D Artist

MILTECH-5 /PD

Lead 3D Artist - TrueGrit Virtual Technologies

[sIGPIC][/sIGPIC]

 

BO-105 PAH1A1/VBH / HKP-9A / BO-105 CBS-5 KLH

Eurofighter Typhoon

https://www.facebook.com/PolyDynamicsDCS/

 

 

 

 

Windows 10 (x64)

 

3x Corsair SSD GT 250 GB

Mainboard: Asus STRIX Z390-F

CPU: Intel Core I9-9900K @ 3.60GHz

RAM: 64 Gb

Graphics: MSI GForce GTX 980 TI 4GB

 

HOTAS Warthog

Hofmann Simpad Rudders

Oculus Rift / Oculus Touch

 

 

Heavy Metal is the law ! :punk:

 

 

Link to comment
Share on other sites

Further testing has produced more progress. It appears that kjx is the ratio of aileron control power to roll damping coefficients (C_l_delta_a / C_l_p). The value of Omxmax in the table_data governs the maximum roll rate. The kjx value governs how quickly that rate can be achieved. A small value of kjx means that it will take a long time to achieve the maximum roll rate and a larger value means maximum roll rate can be achieved quickly. The maximum roll rate does not seem to vary by altitude, but will vary by Mach as defined in the table_data.

 

One issue I've run into is that I don't seem to be able to achieve the full Omxmax roll rate. I use a custom HUD for flight testing that provides current roll rate in rads/sec and I can only achieve a portion of the rate defined in Omxmax. I'm starting to wonder if there is a joystick mapping issue that prevents full aileron deflection and therefore doesn't allow for a full roll rate to be achieved.

 

Anyway, progress is fairly good. I'm expecting kjz will involve stab/elevator control power to pitch damping coefficients as well.

 

Now I'm off to look for ways to determine what the actual aileron deflection amount is.

Link to comment
Share on other sites

Demystifying the sfm flight model coefficients one by one, nice job RedBeard. ;)

i7 7700K | 32GB RAM | GTX 1080Ti | Rift CV1 | TM Warthog | Win 10

 

"There will always be people with a false sense of entitlement.

You can want it, you can ask for it, but you don't automatically deserve it. "

Link to comment
Share on other sites

The kjz param is proving to be a rather odd parameter. It most definitely affects pitch authority when the value is 0 (i.e. you get no pitch authority at all), but I've tested six different magnitudes of values from 0.0001 to 10, varying altitude, Mach, and kjz values.

 

In one set of tests, I use Mach 0.9 as a test entry speed in level flight, then pitch up at full aft stick. Altitude affects the maximum pitch rate, but not kjz. The higher you are, the less pitch rate you are going to see.

 

In another set of tests, I tried at constant altitude, varying Mach and kjz. Mach will vary the maximum pitch rate, but not kjz.

 

The conclusion is that kjz does not affect the maximum pitch rate at all.

 

In stead of maximum pitch rate, I checked damping by timing full pitch up to 20 degrees followed by full pitch down to 0 degrees. It's really hard to get consistent results to a precision less than a second because a lot depends on how quickly you can react to the transition from full pitch up to full pitch down, but I'm not seeing a large difference there as well. I get about 12 seconds at kjz value of 0.0001 and 10 seconds for kjz value of 10. Since this test is at the extreme of exercising pitch rate acceleration, it's pretty clear that the value has little influence at all on the flight model.

 

Pitch damping in the SFM seems a bit flaky in general, even in the Su-25T. Normally, you can test pitch damping by trimming to level flight, introducing a pitch transient (short pitch up/down), let the stick return to neutral and time how long it takes the oscillations to damp out and return to level flight.

 

If I use the precision values in my custom HUD, I can see it take minutes. The Su-25T doesn't have precision values, but you can see it is quite slow by watching the altitude on the F2 view. Also, I have had cases where the aircraft will not reverse a down oscillation. It will just nose down until it impacts.

 

I was thinking that I might have a deadzone problem with the stick that is introducing down force, but the pitch rates don't seem to validate this, which is a bit odd. It would be interesting to see if others have this issue as well.

 

Anyway, my current theory is that kjz is intended to be the elevator or stab control power / pitch damping ratio, but the impact it has is almost negligible. I don't know if the negligible impact is related to the potential reversal of Mzalfa and Mzafladt either. I'm still waiting to hear back on that.

Link to comment
Share on other sites

Digging ever deeper, in my last set of tests that were timing the damping of pitch oscillations introduced by a pitch transient, I was not making distinctions between static and dynamic stability.

 

Static stability is characterized by AoA changes and is short period (on the order of seconds) and heavily damped. Dynamic stability is long period (many seconds or minutes) and tends to keep a fairly constant AoA, but varies in airspeed and altitude and is lightly damped.

 

I think I'm going to have to go back, rerun the flight tests, log the flight test data and see what happens to both static and dynamic stability.

Link to comment
Share on other sites

I've gone about as far as I can go at this point. In order to test static and dynamic stability, I ran many test flights at Mach 0.9 at 10,000 feet in steady state (trimmed for level flight). I modified the test device to work as a flight recorder and took data samples at tenth of a second intervals. After recording was started, I used a control pulse to pitch up until 10 degrees of angle of attack were reached, then returned the controls to neutral and let it recover hands off.

 

I was hoping to see a difference in the short period oscillations of angle of attack, but I didn't see that. Here is some of the data that was collected, normalized to place the control pulse at the same time frame:

 

AngleOfAttack_zpsadd774e7.jpgPitchAngle_zps59b5fa28.jpg

PitchRate_zpsf8f75771.jpg

There are some minor differences between the runs:

 

  • The pitch angle reached for the value kjz=0.1 was a couple of degrees less than the other two runs. This is most likely due to the 2-3 tenths of a second difference in releasing the control pulse once 10 degrees AoA was reached.
  • There is a slight negative pitch rate right before the control pulse of the kjz=0.1 run. This may be due to not allowing autopilot to stabilize long enough or the stick may have been slightly off center when autopilot was disengaged.

I can see no significant difference in behavior among the values of kjz. All values appear to use the same control power, damping, and frequency of oscillation. The only identifiable behavior is an on/off behavior for pitch authority where a positive non-zero value enables and zero disables.

 

It is unclear what the intent of the parameter is. While the kjx value appears to be the aileron control power / aileron damping ratio, there's not exactly a similar ratio for pitch. It's possible that pitch damping would have been the next choice for a needed parameter. Without further input from the developers, we will likely never know.


Edited by RedBeard2
Link to comment
Share on other sites

  • 2 weeks later...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...