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

Request (Feature) Mixing vibration data into normal data

Discussion in 'SimTools DIY Version' started by Thanos, Nov 14, 2018.

  1. Thanos

    Thanos Building the Future one AC Servo at a time... or 6

    Joined:
    Jul 6, 2017
    Messages:
    1,358
    Occupation:
    Electronics Engineer
    Location:
    United States
    Balance:
    2,773Coins
    Ratings:
    +1,050 / 9 / -0
    My Motion Simulator:
    AC motor, Motion platform, 4DOF, 6DOF
    I was directly referring to games that can output tire suspension information that is a little more detailed and different on each of the four actuators if used on a 4dof:

    IMG_20181112_092254.jpg

    Each of the actuators will be able to reproduce tire suspension vibration motion, as it not so much high frequency, perhaps up to 75hz in low amplitude levels. But if you mix normal roll, pitch, heave axis data into the actuators as well, the higher amplitude sustained positions that these provide will not allow the motors to be within 50% of total travel for the lower amplitude tire suspension motion to be visible. It will simply clip out.

    Think of a normal sound speaker, if you place your hand on it and hold the membrane displaced from its center, the sound comes out muffled.... same thing happens to the vibration motions.

    The solution would be if we can shift the small amplitude vibration signal up or down following the larger sustained motion of the actuator while mixing.
    • Informative Informative x 1
  2. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,282
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    49,199Coins
    Ratings:
    +5,093 / 18 / -0
    Yes buddy, this is what I am saying, it will work just like your drawing.

    Yes, it will work like this.
    (Say we only need heave on a acuator as to make this example easier.)
    If in axis assignments we assign "heave" at 70% and we then assign "ride height" at 30%, we have exactly what your graph is showing and no clipping will occur.

    I was trying to explain that we need to find the best way to create this "vibration data" as to make it available as an extra dof in the plugin.
    For RPM we could maybe try a sin wave?
    For Road Noise, "Ride Height", or whatever you want to call it we just need some experimentation to see what works best.
    (take an average of or use the biggest input etc..)

    You actually need to (take an average of or use the biggest input) the 4 suspension corners and move them all the same.
    Or your sim will kick like a mule, and at times, only 2 legs may be touching the ground.

    In short, we just need to do some experiments to see what works.
    Take care,
    yobuddy
    • Like Like x 1
  3. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,613Coins
    Ratings:
    +1,835 / 32 / -1
    Because each "DoF" has dedicated space on the actuator it doesn't assure no clipping will occur though. For clipping not to occur during heave events the actuator must be able to move to targets with little to no error or vibrations will still get clipped as the actuator attempts to move to the target as quickly as possible.
  4. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,282
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    49,199Coins
    Ratings:
    +5,093 / 18 / -0
    Yes I'm taking for granted the hardware to achieve the output desired, but from a software side of things, no clipping will occur.
    Take care,
    yobuddy
    • Agree Agree x 1
    • Informative Informative x 1
  5. 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
    It's maybe out of topic but @yobuddy, @value1 I would love to test the RPM vibrations in X-plane on my platform if you manage to push it through.

    Thx
  6. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,282
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    49,199Coins
    Ratings:
    +5,093 / 18 / -0
    @hexpod,
    We need to figure out a formula for turning rpm 0 thru 10000 say into a sine wave.
    Something where the frequency of the way goes up with higher input, but the amplitude maybe falls a bit with input.

    So maybe it outputs a sine wave with a amplitude of -100 and 100.
    But at a rpm of 10000 it is at -75 and 75.
    And the frequency should go up with higher input.
    The output from something like this could be sent thru a plugin as a dof, and we could see what happens.

    So, do you have any idea on the formula needed?
    We may need to brush up on geometry a bit. lol
    Chat soon,
    yobuddy
    • Like Like x 1
  7. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,282
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    49,199Coins
    Ratings:
    +5,093 / 18 / -0
    Here is the formula for RPM I believe.
    Rpm_SinWave.jpg

    Where (a) is the amplitude we want
    (f) is the frequency we want
    And (x) is the looping input between 0 and 2π.

    Next is to figure out how to get the amplitude and frequency we want when RPM is zero, and when RPM is maxed out.
    Take care,
    yobuddy
    • Like Like x 3
    • Optimistic Optimistic x 1
  8. joe extraknow

    joe extraknow Member Gold Contributor

    Joined:
    Jan 4, 2017
    Messages:
    111
    Location:
    United States
    Balance:
    1,550Coins
    Ratings:
    +40 / 2 / -0
    My Motion Simulator:
    3DOF
    • Winner Winner x 1
  9. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,282
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    49,199Coins
    Ratings:
    +5,093 / 18 / -0
    I think something like this would work.

    ‘Constants
    _MAX_RPM = 10000
    _Start_Frequency = 0.5
    _End_Frequency = 0.01
    _Amplitude_Decrease_Amount = 500

    ‘Mock Code
    RPM = Current RPM input

    If RPM > MAX_RPM then
    RPM = MAX_RPM
    End if

    ‘Decreasing amplitude
    Amplitude_Out = (1000) - (_Amplitude_Decrease_Amount * (RPM / MAX_RPM))

    ‘Increasing frequency
    Frequency_Out = (Start_Frequency * ((MAX_RPM – RPM) MAX_RPM))) + (End _Frequency * (RPM / MAX_RPM))

    Then with the constant vars, we could tune in what works best for the output.
    _Amplitude_Decrease_Amount can be adjusted to loose as much amplitude as we thing we need it to. (at 500, it will loose half its amplitude at rpm = 10,000)
    Same with the rest, once we find formulas that work well.

    Take care,
    yobuddy
    • Like Like x 2
  10. joe extraknow

    joe extraknow Member Gold Contributor

    Joined:
    Jan 4, 2017
    Messages:
    111
    Location:
    United States
    Balance:
    1,550Coins
    Ratings:
    +40 / 2 / -0
    My Motion Simulator:
    3DOF
    @yobuddy I don't know too much about flight sim, but like to learn and build one too.

    In terms vibrations, Ian Hopper already did mixing freq from the games, that feed via USB to the BFF card. I guess one may not need to use the card, you and Ian Hopper can write a plugin so that his output can be via SimTool. Can you?
    [​IMG]
  11. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,613Coins
    Ratings:
    +1,835 / 32 / -1
    This won't work though. There's a missing operator and brackets are still open.

    Frequency_Out = (Start_Frequency * ((MAX_RPM – RPM) MAX_RPM))) + (End _Frequency * (RPM / MAX_RPM))

    It appears it should be:

    Frequency_Out = (Start_Frequency * ((MAX_RPM – RPM) / MAX_RPM)) + (End _Frequency * (RPM / MAX_RPM))
    Last edited: Nov 24, 2018
  12. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,282
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    49,199Coins
    Ratings:
    +5,093 / 18 / -0
    Close enough that you knew what i meant :grin
  13. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,282
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    49,199Coins
    Ratings:
    +5,093 / 18 / -0
    @joe extraknow,
    There is no need for extra hardware buddy.
    We are adding an Extra dof output from a game plugin for RPM.
    I believe that is all that is needed.
    Take care,
    yobuddy
    • Like Like x 1
  14. joe extraknow

    joe extraknow Member Gold Contributor

    Joined:
    Jan 4, 2017
    Messages:
    111
    Location:
    United States
    Balance:
    1,550Coins
    Ratings:
    +40 / 2 / -0
    My Motion Simulator:
    3DOF
    I meant SW, not HW. See the video at 8:30
    The plane cabinet vibrations are very complex, which are “event driven”, not simply “rpm driven”.
    However, for engine vibration, it sees you are doing similarly, but you use only two frequencies instead of three.
  15. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,613Coins
    Ratings:
    +1,835 / 32 / -1
    Not initially because the code was less intuitive to read on my phone. Upon another look though I realized that must be what you intended to type.
    Anyhoo, keep up the good work buddy. Yo btw. :cheers
    • Like Like x 2
  16. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,282
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    49,199Coins
    Ratings:
    +5,093 / 18 / -0
    @joe extraknow,

    What up buddy,
    Always nice chatting ideas, let me go over a few things and see if this makes more sense.

    Keep in mind that all of the outputs already affect the main telemetry stream. (roll, pitch, heave, yaw, sway, surge).
    So all of these actions would already be on the sim in some fashion already when tuned correctly.
    We are simply testing out amplifying the RPM vibrations (for some geeky fun).

    Rpm is event driven also as it depends on the users input?
    Come to think of it, everything is event driven, as it all depends on the users actions?

    I'm using 2 end frequency's, but the output would be all frequency's between these to values.

    Chat soon fellas,
    yobuddy
  17. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,282
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    49,199Coins
    Ratings:
    +5,093 / 18 / -0
    @BlazinH
    Yes, that would make it harder for sure!
    Thanks for the assist buddy! :thumbs

    I suppose I should throw something together now to see what happens.
    Take care,
    yobuddy
    • Friendly Friendly x 1
    Last edited: Nov 25, 2018
  18. joe extraknow

    joe extraknow Member Gold Contributor

    Joined:
    Jan 4, 2017
    Messages:
    111
    Location:
    United States
    Balance:
    1,550Coins
    Ratings:
    +40 / 2 / -0
    My Motion Simulator:
    3DOF
    I see now what u r trying to do.
    I don’t think you shall use all frequencies. Using one or two, or max 3 freq would be proper. The “engine vibration” is a resonance frequency of chassis/cabine due to engine rpm.
    If you use all, then feel like “white noise” though. Anyhow, great work, enjoy your stuff!
  19. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,282
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    49,199Coins
    Ratings:
    +5,093 / 18 / -0
    Here is a Dirt Rally Experimental plugin with RPM enabled as Extra 3.

    For those of you that like to see code, here is what I used.
    Untd.jpg

    As you can see, I'm using the milliseconds from the PC as to achieve a constant loop timer.
    Now we just need to find the best overall Start and Stop frequency to use.
    And how much the amplitude should decrease when the engine is revved up.

    I would suggest you add 10% or so to the axis of choice to start with.
    (I think with this, less is more.)
    And maybe auto capture some Min / Max values for Extra 3, as none are provided with the plugin.

    All feedback is welcomed, as i have only tested that it spits out the data like it should.
    When leaving feedback, please show what settings you are using for others to try.

    Take care,
    yobuddy

    Attached Files:

    • Like Like x 3
    • Informative Informative x 1
  20. 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
    @yobuddy, @value1,
    Would it be possible to implement the rpm code to the last x-plane plugin for testing pusposes?

    First, I would suggest to swap the pitch/roll/yaw accelerations with pitch/roll positions, after then, replace the unneeded "yaw position" with "rpm feature" (could be extra3).

    Best