-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modeling STICK-FORCE-PER-'g' and the effect of dynamic pressure on flight controls. #1472
Comments
I think this is a great idea and I am anxious to try it out. The easiest way to get this added to the production model is to submit a Merge Request (PR) same as you did for #1471 |
Issue c172p-team#1472 - Modeling STICK-FORCE-PER-'g' and the effect of dynamic pressure on flight controls.
Sorry maybe I'm doing a mess with branches, I'm a beginner on git, but I think I created a branch #1472 with the needed changes to the code. Please note that the branch does not include the changes I described for the other issue, #1471. Anyway, in the branch for #1472 I added the simulation of dynamic pressure for all three controls (elevator, ailerons, rudder). There is full elevator authority up to around 66 KCAS, and full aileron and rudder authority up to around 94 KCAS. This should assure sufficient control authority in all flight phases. The main difference should be progressively less sensitive controls at higher speeds. At 94 KCAS and above, the elevator will be double as stiff as ailerons, so the aircraft should feel less sensitive in pitch but still sensitive enough in roll. A given control force (i.e. a given joystick/yoke deflection, if the device is not force-feedback) should give approximately the same g-loading, whatever the airspeed (above 66 KCAS). So for example, in a 45 degree turn, you will need to apply the same force on the yoke, regardless of airspeed. This should mirror the behaviour of the real aircraft. The main limitation as it is now, is that the max attainable g-load will not allow accelerated stalls at high airspeed (in a trimmed condition). This could be changed by increasing the max dynamic pressure for 100% elevator deflection (i.e. higher than the current 66 KCAS): the higher it is set, the higher the attainable g-loads at high airspeeds. |
Thank you, can't wait to test this. @dany93 I would really appreciate if you could test this as well and provide any critique. |
I think (from my 10 minutes at the yoke of a C182T) that it is correct that the flight controls get more sensitive with more airspeed. If i understand correctly, your implementation changes the notion of "yoke travel" from displacement to effort. So from my point of view: What we really need is force feedback in some good way. I tried the branch and it is well flyable. Again, my suggestion would be to make this customizable, so the user can actively disengage in the aircraft options. |
@hbeni, I completely agree with your considerations in the previous message. |
The issue with how flight control deflections are currently modeled, is that the simulated aircraft becomes actually MORE sensitive than the real one. I'll explain: in the real aircraft, if you pull the yoke with a force of say 3lbs, you will get say a 1.5 g-load. And this holds true (at first approximation) at every airspeed. In the FG C172 instead, as it is now, the situation is comparable to that of a hypothetical real aircraft in which the controls DO NOT become stiffer with increasing airspeed. Imagine yourself back to flying the C182T: now suppose that the flight controls at 120 kts would be as light on the touch as they were at 60kts. You would very easily overcontrol or over-g the aircraft at 120kts! Indeed, that is exactly the reason why a stick-force-per-'g' is required by aeronautical regulations. This is so important that even real aircraft without force feedback use the same implementation I'm suggesting here: the A320 has sidesticks (which are effectively spring joystick) and the g-load commanded by the FBW is proportional to sidestick displacement. In other words, even in an Airbus, the same effort on the controls will produce lower flight control deflections at higher airspeeds (as it happens on a real C172, as well!). That is exactly what I'm proposing here.
I agree with that. The ideal would be to have that optional in the aircraft options page. I would say though, that my modification could be useful even to users who fly with a mouse. |
Also, probably maybe a "nice" idea if we switched to the "effort" based yoke approach: |
Yes, what I wrote above: You can't compare an Airbus to a 172. The Airbus has no mechanical-only linkage to the flight controls. the 172 does; as such there is no damping whatsoever in the 172. |
That would be nice, to my knowledge only a few aircraft in some other sims do that. But it's probably harder to implement correctly. Note that the modification I'm proposing here, even if does not involves the behaviour of flight controls on the ground at zero airspeed, is actually an effort based one: higher airspeed = higher effort for the same control deflection. I'm strongly convinced it would be very important to implement that for a better realism in aircraft feeling. I reckon it could be made optional though as you suggested. |
That is an inevitable compromise: pc flight controls don't have force feedback in 99.9% of cases, so you have to choose if implement a displacement based or an effort based flight control simulation. As you said in the previous post, you seem to actually favor an effort based simulation (which is what I'm proposing). Aeronautical regulations also give priority to effort over displacement: it's for this reason that they impose a min and max "stick-force-per-'g'", and not a "stick-displacement-per-'g'".
The analogy between the A320 and the C172 (and every other existing aircraft, actually) is that in both cases, if the pilot pulls on the flight controls with a given force, the aircraft will be subjected to approximately the same g-load, whatever the airspeed. This is so important that even aeronautical regulations prescribe it as a necessity for aircraft to be certified. This is what I'm trying to implement in FG C172. |
@hbeni my modification is basically a simplified version of what is currently used in the Extra500, from the thread you quoted in the other message: With my mod, the C172 flight controls would work similarly to how they implemented it in the FlightGear Extra500. My mod would be a bit more simplified and easier to implement, but in flight they would work very similarly. I agree with you that it could be made optional like it is in the Extra500. |
I really need more education to debate the merits of this modification, but I like this enhancement. I agree we need to make it opt-in as two out of three people in this discussion are cautious about mandating a change like this. Making it opt-in solves any dispute in philosophy at really no cost. So I will add the opt-in to the Simulation Options gui.
I want to try to implement this. I really like the idea. I think the same type of table adding in the pressure per IAS (or whatever the best indicator would be) to the elevator control property but keeping the ability to override this pressure the same as we do with an autopilot that can be overridden with control input. Anyone want to take this on? If not I might try my hand at it. |
It's not trivial, because you need to model 3 different hingemoments acting on the elevator: .hingemoment due to the pilot/autopilot pulling or pushing the yoke (can be considered proportional to joystick deflection); So, it wouldn't be easy to model in an "engineering accurate" way, for a lot of data is needed, but maybe it could be done in a simplified way, in order to get the basic effect of elevator drooping down on the ground at zero or low airspeeds. I'm willing to help with that, if you want to go forward. |
Yes, absolutely. You could add it to this PR as it is in the same realm. While your at it, if you add a conditional to this "stick-force-per-'g'" code (a new property), I will add it in the set file property initialization and make the choice available in the GUI. |
I give that some more tought, and from what i have tested, mouse flying is absoluteky a go here. |
C182 could also benefit from this Implementation. |
Great! I'm sorry if I've sounded a bit "pushy" with my explanations. Your observations were appreciated! Indeed your link to the Extra 500 gave me new ideas for the elevator drooping effect.
I'll try to work on it tomorrow. Maybe I have some ideas on how to implement it in an easy way. |
The problem I had when thinking about to implement this was, that the sim is unable to have a sense of when the pilot has the yoke grabbed and when not. With a mouse this is not distinguishable from the sim's perspective, and with a joystick this holds true also. |
Sorry, probably my lack of knowledge, but I can't have access to the #1472 branch by the github procedure. I did a
I see the #1472 branch, but I have access only to master.
Please, can @Murmur79 create a branch in the https://github.com/c172p-team/c172p github repository? |
@dany93 try this (in your "normal" 172p repo clone): # Add a new remote called "Murmur...."
git remote add Murmur79 [email protected]:Murmur79/c172p.git
# fetch the remote state
git fetch Murmur79
# Checkout the remote branch for investigation (pick one of the two commands)
# git checkout Murmur79/#1472 # checkout the branch (detached head)
# git checkout -t Murmur79/#1472 # checkout the branch (creates an actual local tracking branch)
# to verify you actually see the changes you expect
git log Doing it like this saves you from your mess and clearly lets you separate the origins of remote repos.
This works pretty well so far. |
Thank you very much @hbeni for this detailed explanation. It works perfectly, and the procedure is very easy to follow. Once we have it... For my understanding if it is not too much, can someone explain me why a "normal" git clone procedure does not enable getting the branch contents (apart from master)? |
Because with cloning you probably only get the "main" branch configured for that repo. |
The easiest way to implement this with consistent results would be like that:
This method should assure consistent results in any flight phase, with no unwanted side effects. Now it only needs to be coded... 😬 |
This is a valid concern and necessitates some type of compromise. In the implementation I described above, it would work like that: when the aircraft has zero airspeed on the ground and the joystick is centered, the elevator will droop down, as if controls were not grabbed; but the pilot can still move the elevator with his joystick/yoke/mouse: in other words, it would work very similar to how it works now when the aircraft is stopped on the ground and you trim the nose all the way down. |
My current thinking, which has already been written by @hbeni and @Murmur79 in this issue.
If the feature is optional, the decision is much easier to make. |
@hbeni do you know what the difference is between your solution for @dany93 to get the 1472 and this one below?
|
@wlbragg I tried your procedure and it didn't work. I read (was it the cause ?)
Or I missed something... |
@dany93 Because the later instructions says to check out master, merge Murmur79-#1472 and push to origin master which would overwrite origin master. Thus the warning about "protection". After I used the instructions I posted I had Murmur79 repo and then was able to switched from Murmur79 repo master to Murmur79-#1472 and test. |
I thought about that. This could be mitigated by increasing the max speed for max deflection. With the parameters I used (limited elevator deflection starting above 65 KIAS), the pilot can pull around 2.5g max at high airspeeds. But if we change that speed from 65 KIAS to e.g. 85 KIAS, max pull would increase to 4.3g, which should already be above max structural g-limit for the C172. And stall would still be possible at most airspeeds. My preference would be some middle ground, e.g. using a reference speed that allows stalls at normal airspeeds (up to steep turns in cruise), even if it won't allow over-g (3.8g in the C172, I think?) Certainly making it optional is the best idea. I've been busy these last days, I'll try to code something soon. |
@Murmur79 don't worry about rushing on this, we all work at our own pace which is dictated by our personal and professional lives. None of us are in any hurry to get things done. This is a "do at your own pace" zone. |
Re: #1472 (comment)
Just another way to do the same. Seems to be shorter, thanks :) And allows better control over the local branch name. Need to memorize this :) EDIT: Ah, found the difference.
|
Re: #1472 (comment) Talking about stall, also tests for spin characteristics should be conducted. It should be doable to break a spin stall. |
I'm realizing I've not enough knowledge of JSBSim to fully implement what we want to do. But I have a plan on how it should be done, and I already wrote all the necessary equations. Is there anybody available to help me with coding them in the c172p.xml? Also, I don't know how the conditionals etc. work in order to make it opt-in/out, so if someone else who's more experienced with coding for JSBSim could help me, I think this could be done relatively quickly. The basic equation to implement would be this: delta_e = [ (M_e * d * g * n) - (C_h_de * q * S_e * c_e * delta_trim) ] / [ -C_h_de * q * S_e * c_e + k ] where: Once delta_e (i.e. the elevator deflection due to elevator weight + aerodynamic trimming forces) is calculated, we map and clip it back to [-1;+1] and add the "fcs/elevator-cmd-norm-gain" (which depends on dynamic pressure), which I already coded in my previous commit. |
In case going "the full monty" would be too hard to do, or if there isn't anybody willing to tackle it, I'm hoping at least the STICK-FORCE-PER-'g' I already implemented could be considered for a future release. I could do some more flight tests as suggested above and easily tune it if needed, and then just add the conditionals in the code so it could be made opt-in. We would lose the elevator drooping on the ground (which is mostly aesthetic and not really important for aircraft handling), but the important stick-force-per-'g' feature would still be there, and allow a less sensitive aircraft at higher airspeeds. |
The conditional portion will be easy to implement, I guess I'd have to see exactly where and how the new FDM logic is enabled in order to suggest the conditional method to use as I can think of a couple ways it could be done in the FDM section. |
@Murmur79 wrote
For the equation, see JSBSIM Reference Manual, 2.5 Math, 2.5.1 Functions. |
@Murmur79 |
I actually concur with you. The thing I consider most important is the flight control stiffness as a function of dynamic pressure ("fixed stick-force-per-'g'") which I already coded. And it only required adding a single table in xml, so very straightforward. I wanted to add the elevator drooping because @wlbragg seemed very pleased with that feature 🙂 but I'm realizing it's significantly harder to code, and indeed it's mostly aesthetic and limited to the beginning of the ground roll, whereas the "fixed stick-force-per-'g'" feature has more concrete effects in aircraft handling.
Hmm... I don't see any reason it would have an effect on aircraft ceiling. Even with my modification, using the elevator trim always allows full control authority. E.g. if elevator trim is set to full nose-up, the elevator will be at max deflection, even with joystick centered (as it is now). Notwithstanding that, max ceiling is reached at a speed around L/D max, so with elevator around the center/neutral, far from full nose-up or -down. I'm willing to do the required flight tests though.
From a different point of view, it could be argued that my feature actually adds linearity between applied force and produced g-load: as it is in real aircraft, and as dictated by regulations. The justification is the increasing dynamic pressure makes flight controls stiffer. In other words, this feature waives displacement linearity to embrace force linearity. Due to limitations of PC flight controls, giving up either is a necessary compromise. In theory, my modification would yield an aircraft whose handling and feel is closer to the real one, with the only compromise of not being able to over-stress it at high airspeeds. I think making it opt-in would not cause issues. If you have flight tests in mind that you think could produce unfavorable results, let me know and I'll do them. |
@Murmur79 wrote
For this contribution, I agree.
You are right, sorry. I hadn't thought at the trim which does not decrease in your code with dynamic pressure.
I agree (as I already wrote). |
I think that has always been my preference and easy enough to do.
All true, but if you can do this, it will be a unique feature that is yet one more visually accurate simulation feature. But it is certainly your choice to attempt it or not. Something like the elevator drooping until the air flow raises it is a visual that might actually get noticed in playback videos, especially if added to the replay system. I do have a question about this though. |
I think the dropping should - if we decide we want it - be very simply just simulate that drop just in the moment the gust lock is released. Very certainly we do not want to simulate „no hand ob the yoke“ in other moments. |
I guess my question is, why not? I suppose it is impossible to distinguish if the user is holding the yoke or not? So how do you know when the user is applying force, we're back to force feedback, yes? |
That's a sharp observation, I've also pondered over it. Indeed, the effect of the unbalanced weight of the elevator on the real aircraft, should be to bias the commanded pitch trim to be a little more down that it would be (if the elevator were balanced). Also, the bias would increase with decreasing dynamic pressure, so the net effect should be that the stick-free stability of the aircraft should be a little higher if the elevator is unbalanced, than if it were not. But I see multiple problems with trying to model this:
|
It could be done in a simplified way, e.g. with the elevator gradually rising to its trimmed position once a certain minimum airspeed is reached. It would be just a visual thing though. |
Well, now that's interesting for the matter at hand. Apparently, even when stationary and with engine at idle, the propwash is already enough to move the elevator all the way nose up or so, if trim is used! (The aircraft in the video should be a C150 though): |
Ok, better keep it simple. I updated the c172p.xml in my #1472 branch. I just increased by 20% the max dynamic pressures for max control deflections, for elevator, ailerons and rudder. So in this update the flight controls should remain a bit more effective throughout all the speed regimes. Compared to the default c172p, this aircraft will feel progressively less sensitive with elevator above 73 KCAS, and progressively less sensitive with ailerons and rudder above 103 KCAS. So, the pilot will keep full control authority at approach speeds and below. Also, full rudder authority is retained below 103 KCAS, and sideslipping approaches can be made as usual. Full joystick/mouse deflection should give 3g's and some more at speeds above 90 KIAS, which should be plenty for normal flight maneuvers. I also increased the tables resolution. If someone would like to add the needed code changes to make it opt-in, you can do it (or give me some hints on how it could be done). |
Hi, sorry for not giving feedback for so long.
That is an easy task, just add a switch that selects the qbar value to be used given on the users setting.
(i advise to keep it opt-in for now)
ℹ️ I did all this for you in my copy, see hbeni@5ba720c |
And something else for discussion: |
Hello, thank you for the reply. Unfortunately I'm busy over other things now, and being that I'm a complete noob on coding and github, I don't even remember how to do things here. But I've checked the modifications in your #1472 branch (thank you a lot, much appreciated!!!) and they look fine to me. If you are able to finalize this thing yourself without my intervention, you can do it. Regarding implementing this in flightgear itself: yes, it would fit with most non-FBW aircraft (and certainly with all GA aircraft), but the problem is that the parameters should be set per-aircraft. Specifically, the dynamic pressure below which full control deflection is available, should be set at or above typical approach speeds of a given aircraft, in order to keep full control authority during the approach and landing phase. |
Real aircraft with reversible flight controls are designed to have a certain stick-force-per-'g'. In other words, when the pilot pulls the yoke with a given effort, the resulting g-load is at a first approximation constant, and does not depend on the indicated airspeed (provided the aircraft has not reached stall). Indeed, aeronautical regulations impose min and max stick-force-per-'g' gradients for different aircraft classes.
The existence of a fixed stick-force-per-'g' naturally comes from the effect of dynamic pressure on flight controls: at higher indicated airspeeds, a given effort on the yoke produces less elevator deflection (due to increased dynamic pressure), but a given elevator deflection produces higher g-load (again, due to increased dynamic pressure). The two effects cancel out, and the result is a fixed stick-force-per-'g'.
Now, even though common PC flight controls lack force feedback, it would be possible to model this behaviour in FG C172.
As it is now, in the simulated C172 a given flight control displacement (=a given effort, for a non-force-feedback PC flight control!) produces the same flight control deflections, at every airspeed. The result is that the flight controls become more and more sensitive, the higher the indicated airspeed. In other words, there is no such thing as a "stick-force-per-'g'" in the FlightGear C172: the same effort/displacement will produce ever higher g-loads at higher airspeeds, and this is very different to how a real aircraft feel (and to how aeronautical regulations prescribe it should feel!).
This issue is also why people often complain of the simulated aircraft being too sensitive on flight controls.
What I am proposing, is scaling down the max deflection of flight surfaces as inversely proportional to dynamic pressure. For example, the elevator could have a max deflection of 100% at the dynamic pressure corresponding to 65 KCAS, and then gradually decrease its max deflection at higher speeds (reaching 25% at 130 KCAS, i.e. a 4X increase in dynamic pressure).
This would yield a fixed stick-force-per-'g', just like a real aircraft: pull with a force of say 500gr on the joystick, and the C172 will reach say 1.5g, whatever the airspeed.
The only collateral effect would be that max flight control deflections would become progressively limited at higher airspeeds. I do not think this poses a problem: for example, in the case of elevator, the most important thing is to have full authority available at approach speeds and below (this is why I chose 65 KIAS in my example). It is however less important to have full authority at higher airspeeds, for two reasons:
pitch trim would retain full authority on elevator deflection at every airspeed: the limited authority would only apply to untrimmed flight control deflections;
at higher airspeeds, full control authority is not necessary anyway: remember that modeling a stick-force-per-'g' assures that a certain g-load can be reached anyway, at every airspeed. If you think about it, large control deflections are never used at high speeds.
Modeling this behaviour would also allow to improve another aspect of aircraft handling: in real aircraft, elevator is generally more stiff than ailerons. Indeed, regulations prescribe that the max control force on ailerons can be just ONE HALF of the max control force on elevator.
With my proposal, this could be easily simulated: e.g. make the max elevator deflection available below 65 KIAS, and the max aileron deflection available below 92 KIAS (=65*sqrt(2)). This way, at 92 KIAS and above, the deflection of ailerons for a given control force on the joystick/yoke, will be double the deflection of elevator for the same control force. Again, just like it happens in the real aircraft.
I already made all these proposed changes and experimented with them on my private FlightGear install, and they work exactly like they should. But I'm new here and I don't know what should I do now to share them with you.
The text was updated successfully, but these errors were encountered: