1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  3. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  4. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

Flypt Filter Research (or why doesnt my rig move right?)

Discussion in 'FlyPt Mover' started by Historiker, Feb 13, 2020.

  1. Dirty

    Dirty Well-Known Member Gold Contributor

    Joined:
    Oct 15, 2017
    Messages:
    744
    Occupation:
    All the way up front.
    Location:
    Germany
    Balance:
    7,910Coins
    Ratings:
    +878 / 3 / -0
    Hi, @Klaus Schmidinger
    That sounds very German!?!:)

    I assume the input signal is a square wave right?

    If you use a LP/HP ratio of 12.5 (1000/80), chances are the onset curvature is too tight to be visible because of pixelation.

    Take the processinig framerate (500?), divide it by the number of LP filters (2?) and you get the initial filiter variables to start with. In your case I guess it's 500/2. So you start with 250...

    EMALP(EMALP(EMAHP(VALUE;250);250);250)

    This will give you a filtersystem with a step response that reaches its maximum deflection at exactly 1 second after the step.

    In the next step you pick a LP/HP ratio "R" to shape the relationship between the entry- and mid-curve section. 3-10 are typpical values (12.5 is a lot!). Multiply the two LP filter variable by √R (yes, both of them) and multiply the HP filter variable with the inverse of that factor (like 1/√R). Now the LP variables should be "R" times bigger than the HP variable.

    Then.....

    OMG, this is where it gets complicated....

    Nevermind,... I am working on a little program that lets users define a custom response curve and it will give you values for HP/LP/Gain to get exactly this response. So people could change the shape, the amplitude and "time to peak deflection" independently from each other.

    It's gonna take a while to put together but I already have it modelled in Excel and I have been using it for about a year now:
    Screenshot 2022-12-20 at 22.40.43.png

    I hope I didn't overpromise here....

    Let me know if LP/HP @ 250/250 will give you a response that peaks after exactly 1 second!
    • Like Like x 1
    Last edited: Dec 20, 2022
  2. hexpod

    hexpod http://heXpod.xyz

    Joined:
    Apr 18, 2016
    Messages:
    1,185
    Location:
    berlin
    Balance:
    7,636Coins
    Ratings:
    +369 / 5 / -0
    My Motion Simulator:
    DC motor, 6DOF
    You understood but the graph looks a bit strange.
    Edit:(…) Lower the HP filter more you squeeze the output. You don’t use any gain or something?
    Last edited: Dec 21, 2022
  3. hexpod

    hexpod http://heXpod.xyz

    Joined:
    Apr 18, 2016
    Messages:
    1,185
    Location:
    berlin
    Balance:
    7,636Coins
    Ratings:
    +369 / 5 / -0
    My Motion Simulator:
    DC motor, 6DOF
  4. hexpod

    hexpod http://heXpod.xyz

    Joined:
    Apr 18, 2016
    Messages:
    1,185
    Location:
    berlin
    Balance:
    7,636Coins
    Ratings:
    +369 / 5 / -0
    My Motion Simulator:
    DC motor, 6DOF
    Note plz:
    3x EMALPF 500 is a very big smoothing - maybe suitable for coordination channels (without HP in that case) otherwise such a big values might take out every detail from your signal. Anyway you have to experiment with the weighting factors of the filters as well as with in-gain in and out-gain values.
    • Agree Agree x 1
  5. Klaus Schmidinger

    Klaus Schmidinger Member

    Joined:
    Oct 3, 2022
    Messages:
    49
    Balance:
    378Coins
    Ratings:
    +16 / 0 / -0
    My Motion Simulator:
    AC motor, Motion platform, 6DOF
    It is ;-).
    Right.
    Looking good:
    upload_2022-12-21_10-43-8.png
    The period time of the loop source is set to 10s, so the width of the large grey rectangle represents 5s, which means that the maximum is reached at 0.5s. The curvature at the beginning looks good, which can be seen better in this screenshot, where I have set the horizontal scale of the graphics viewer to 3:
    upload_2022-12-21_10-48-7.png

    Attached Files:

  6. Dirty

    Dirty Well-Known Member Gold Contributor

    Joined:
    Oct 15, 2017
    Messages:
    744
    Occupation:
    All the way up front.
    Location:
    Germany
    Balance:
    7,910Coins
    Ratings:
    +878 / 3 / -0
    I noticed,.... and I am a bit baffled o_O It should take 1s, not 0.5s

    The math on it is pretty straigh forward:
    Every EMA based filter (single order!) will decay to a value of 0.36787 (1/e) after exactly X cycles, with X being the filter variable here!

    Or put differently: After N seconds it will decay to a value of (1/e)^N if the filter variable is set equal to the processing framerate.

    I will have to investigate further.....
  7. hexpod

    hexpod http://heXpod.xyz

    Joined:
    Apr 18, 2016
    Messages:
    1,185
    Location:
    berlin
    Balance:
    7,636Coins
    Ratings:
    +369 / 5 / -0
    My Motion Simulator:
    DC motor, 6DOF
    The ''speed of the filters is linked to the controller transmission defined in the Mover options (2 ms by default). I'm just saying that, but it may have nothing to do with your stupor ;-))
    Last edited: Dec 21, 2022
  8. Dirty

    Dirty Well-Known Member Gold Contributor

    Joined:
    Oct 15, 2017
    Messages:
    744
    Occupation:
    All the way up front.
    Location:
    Germany
    Balance:
    7,910Coins
    Ratings:
    +878 / 3 / -0
    Yes, that's right.

    I assumed 500 cycles/s that's why I was surprised it didn't match what I expected...

    You know what they say: Great insights happen when someone says: "That's odd!" and not "I got it!"

    ..so in that sense: "This is very odd!" :)

    Still waiting for the insight though :D
  9. wingert

    wingert Active Member

    Joined:
    Aug 10, 2020
    Messages:
    112
    Balance:
    642Coins
    Ratings:
    +89 / 0 / -0
    My Motion Simulator:
    4DOF
    Just same filter diagrams for discussion from real Rfactor2 telemetry data.The grew line represents longitudinal acceleration from game data, the red after filtering, high pass, low pass and combination.The upper part represents acceleration, value positive the lower deceleration ,value negative.

    In my view the lines should always be in the same orientation or in line, if not it represent a false cue, this happens with a HP especially when a deceleration decreases.

    Nice to hear other statements
    filter_HP1_A.png Filter_LP_A.png Filter_HP_LP_A.png FilterHP_LP1_A.png
  10. hexpod

    hexpod http://heXpod.xyz

    Joined:
    Apr 18, 2016
    Messages:
    1,185
    Location:
    berlin
    Balance:
    7,636Coins
    Ratings:
    +369 / 5 / -0
    My Motion Simulator:
    DC motor, 6DOF
    When the cue with abrupt direction change add to the HPF it can get amplified. If this is what’s disturbs you, try to get the HPF return a bit slower. You can also try WASH function which behaves a bit differently
  11. wingert

    wingert Active Member

    Joined:
    Aug 10, 2020
    Messages:
    112
    Balance:
    642Coins
    Ratings:
    +89 / 0 / -0
    My Motion Simulator:
    4DOF
    Let me take some further thoughts an questions:

    our rigs are position system, mapping a acc. value to a positions seems obviously be wrong.
    Mathematical correct should be a double integration, with an interval from 0 to driving time.

    ds/dt=v dv/dt=a

    But this is not possible through the restriction of travel.

    The common method is a high pass filter followed by two low pass filter or double integration.
    As I think a HP-filter is a further differentiator the signal becomes to the third differential the changing of acceleration.
    So should it not be a third integration ?
    Each integration loses the constant e.g. S(0) start position , V(0) start velocity and maybe a(0) a constant acceleration.
    S(0) and V(0) are really not relevant as we have no sensation for it, thinking the earth is ever rotating.
    Am I right that the normal car behavior of constant acceleration is loosen and only the short chance of acceleration is driving to the rig ?
    Is that the reason that it could be realized ?
  12. hexpod

    hexpod http://heXpod.xyz

    Joined:
    Apr 18, 2016
    Messages:
    1,185
    Location:
    berlin
    Balance:
    7,636Coins
    Ratings:
    +369 / 5 / -0
    My Motion Simulator:
    DC motor, 6DOF
    For this reason you mix a bit of surge and sway into pitch and roll. Use the checkboxes and apply third order LP EMA without HP. Search for „classical washout algorithm“ if you want to check the methodology.
    • Informative Informative x 1
  13. Dirty

    Dirty Well-Known Member Gold Contributor

    Joined:
    Oct 15, 2017
    Messages:
    744
    Occupation:
    All the way up front.
    Location:
    Germany
    Balance:
    7,910Coins
    Ratings:
    +878 / 3 / -0
    From what you wrote, you seem to have a pretty good general understanding already :)
    ...except here:
    As you have pointed out yourself, it's not all that important where the rig is positioned at any point in time, nor how fast it's moving. The most important parameter is how it's accelerating. And even more: how that acceleration changes (aka jerk).
    From the curves you posted (3rd and 4th image) you can see that whenever the original signal shows an acceleration, the output signal shows positive curvature. That's really all that matters "in the short term".

    In the long term, of course you cannot display continuous acceleration in surge, but that's what the tilt coordination channel is for.

    For the first ~300ms you feel the acceleration through the surge channel, thereafter through the pitch channel. That's why it's OK for there (surge channel) to not be any motion during prolonged accelerations. There will be tilt in the tilt-coordination channel to make you feel accelerations.

    Cheers,... :)
    • Like Like x 1
  14. Dirty

    Dirty Well-Known Member Gold Contributor

    Joined:
    Oct 15, 2017
    Messages:
    744
    Occupation:
    All the way up front.
    Location:
    Germany
    Balance:
    7,910Coins
    Ratings:
    +878 / 3 / -0
    That's pretty spot on already :)

    HP filters are differentiators!
    LP filters are integrators!

    ....but only in the short term!!!! That's important! Over short periods of time they behave like a differentiator/integrator. Thats's why these LP filters function as integrators as long as they are combined with HP filters.
  15. Dirty

    Dirty Well-Known Member Gold Contributor

    Joined:
    Oct 15, 2017
    Messages:
    744
    Occupation:
    All the way up front.
    Location:
    Germany
    Balance:
    7,910Coins
    Ratings:
    +878 / 3 / -0
    It's not that the HP "cancells out" the LP. Quite the opposite: it's the HP that makes the LP usable as integrator.
  16. wingert

    wingert Active Member

    Joined:
    Aug 10, 2020
    Messages:
    112
    Balance:
    642Coins
    Ratings:
    +89 / 0 / -0
    My Motion Simulator:
    4DOF
    You are right the processed filter curve represents a position, so the feeling of the driver or pilot is the second differential of that.
    What i am struggle is the case a existing constant acceleration (deceleration) is decreasing for e.g. a plane accelerate with 2G and reduce this to 1G, the direction of the vector remain only amplitude is reduced.
    How could this be handled in a rig without reverse the vector direction ?

    Concerning tilt, I could imagine that human vestibular system detects that as orientation change that can confuse.
  17. hexpod

    hexpod http://heXpod.xyz

    Joined:
    Apr 18, 2016
    Messages:
    1,185
    Location:
    berlin
    Balance:
    7,636Coins
    Ratings:
    +369 / 5 / -0
    My Motion Simulator:
    DC motor, 6DOF
    For coord channel, deg. sin = accel in G. 15 sin ~ 0,26m/ss. In a Cessna or airliner those values can be set almost 1:1 with real life. On high performance aircraft, how do you simulate a change from longitudinal 2G to 1G ? Interesting question. Either we can crop everything above 0,5G (30deg. tilt) or we can scale the tilt linearly or exponentially.
    • Agree Agree x 1
  18. wingert

    wingert Active Member

    Joined:
    Aug 10, 2020
    Messages:
    112
    Balance:
    642Coins
    Ratings:
    +89 / 0 / -0
    My Motion Simulator:
    4DOF
    the example seems not very realistic, what I mean is an existing vector over a time period that is reduced, or in other words a reduction of boost.
    Even the slope is negative (e.g. 0,5G to 0,3G) a real a pilot or driver feels further reduced acceleration or steady force from back, no deceleration maybe from harness, therefore the rig could not go back.
    So I lack of explanation for that.
  19. hexpod

    hexpod http://heXpod.xyz

    Joined:
    Apr 18, 2016
    Messages:
    1,185
    Location:
    berlin
    Balance:
    7,636Coins
    Ratings:
    +369 / 5 / -0
    My Motion Simulator:
    DC motor, 6DOF
    Coordination tilt is the only way we have to simulate a sustainable longitudinal or lateral acceleration. Based on equivalence principle this is a well established standard in professional flight simulators. When well tuned, (waiting factor of third order EMA) it does marvels most of the time
  20. Dirty

    Dirty Well-Known Member Gold Contributor

    Joined:
    Oct 15, 2017
    Messages:
    744
    Occupation:
    All the way up front.
    Location:
    Germany
    Balance:
    7,910Coins
    Ratings:
    +878 / 3 / -0
    Human perception adapts pretty quickly. So, if you accelerate at 0.5G you will get used to it within seconds. That is what you will then perceive as "baseline" to judge all other changes off of. If the acceleration suddenly changes to 0.3G (even though still positive) you will initially feel it as a deceleraton.

    Of course, there are limits to this. You will not adapt to an insane 2-3G acceleration. (F1 car or space rocket) but still, if that acceleration all of a sudden decreases by 50% (but still positive) it will feel like you just hit the brakes :)