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

Control of 6 DOF Stewart platform

Discussion in 'Commercial Simulators and Peripherie' started by Planmix, Jun 25, 2008.

  1. Planmix

    Planmix New Member

    Joined:
    Jun 25, 2008
    Messages:
    22
    Occupation:
    Home Automation - Satellites - Sequirity Systems
    Location:
    Athens - Greece
    Balance:
    389Coins
    Ratings:
    +0 / 0 / -0
    Hello to everyone,

    I'm John from Greece and I'm programming a software for FSX and 6dof Stewart platform since December.
    My friend Thanos (tronigr) is making the electronics.
    Our dream is to make a plug'n play system (electronics&software) for Stewart platform (theoriticaly works with any design of 6dof platform you can design).
    I have finished with the washout algorithms and now I'm going to make it user friendly because you have to deal with many variables. This is the most difficult part because of the auto-tune procedures that I want to include.
    I have never sit on a real flight simulator before (only on simulators at theme parks), I don't pilot either. I know well the theory and I have the internet for more info :)

    I'd be glad to answer some questions and learn from your experience.

    Here is my progress:

  2. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Welcome John!


    Sirnoname, if didn't notice, its your chance to ask about the 6DOF kinematics (calculations per leg perhaps...).

    Regards, Thanos
  3. adgun

    adgun Active Member

    Joined:
    Jan 28, 2008
    Messages:
    518
    Occupation:
    mechanic
    Location:
    Netherlands
    Balance:
    5,684Coins
    Ratings:
    +131 / 4 / -0
    Hi
    John.

    I am very glad to read this ,and interested.***
    But i give you a advice:give the system a option for spurgear motors with brake,wormgears arn,t made fore this.
    Spurgears wil last far longer,mechanical skilled poeple like me won''t start with wormgears.
    ***
    I now from this forum that you planed for wormgears.
    Regards Ad

  4. egoexpress

    egoexpress Active Member

    Joined:
    Dec 13, 2006
    Messages:
    3,839
    Location:
    Germany - Frankfurt/M
    Balance:
    421Coins
    Ratings:
    +10 / 1 / -0
    Hi John,

    good job!

    As I am studying mechatronics currently, I am able to rank how tricky it is to set up those differential equations and relations for 6 acutators connected parallel to a moving platform. I've red some pdfs regarding that topic already. I will try to get some more familiar with the issue in the semester holidays.

    Unfortunatly we havent advanced further than to differential equations for a single axis respective one direction in the lectures yet. Since I have seen your work I am really interrested alot in inverse kinematics for Stewart platforms.

    Thanos told me that you would like to contribute to the X-Sim project. Are there any plans?

    Regards
    Christian
  5. adgun

    adgun Active Member

    Joined:
    Jan 28, 2008
    Messages:
    518
    Occupation:
    mechanic
    Location:
    Netherlands
    Balance:
    5,684Coins
    Ratings:
    +131 / 4 / -0
    Hi
    Sorry for making a commercial issue.
    Fore the motors ,on 75% from the ac motors with fan blade on the back ,you can mount a brake on it.
    Most companys have a adapting shaft fore that,when you see a motor with long end cover ,there sits a brake on most of the time.It cost you 10 minutes to make .
    Futher it's simple to make a dof 6.


    Regards AD
  6. Planmix

    Planmix New Member

    Joined:
    Jun 25, 2008
    Messages:
    22
    Occupation:
    Home Automation - Satellites - Sequirity Systems
    Location:
    Athens - Greece
    Balance:
    389Coins
    Ratings:
    +0 / 0 / -0
    Thanks for the advise. I'll keep it in mind.
    This is the general model.
    The result values x,y,z,p,q,r can converted in everytype of motion data you want.
    (motor or hydravlic platform).
  7. Planmix

    Planmix New Member

    Joined:
    Jun 25, 2008
    Messages:
    22
    Occupation:
    Home Automation - Satellites - Sequirity Systems
    Location:
    Athens - Greece
    Balance:
    389Coins
    Ratings:
    +0 / 0 / -0

    I'll try to explain this with my bad english:

    The inverse kinematics problem is that we know the position of the platform (x,y,z,p,q,r) and we need
    to find the length of the legs.
    At first you have to make a diagram of your platform like this:

    [​IMG]

    [​IMG]

    The pf(i) points (platform frame), are showing the frame joints and pm(i) points (platform mobile), are the platforms joints.
    Every point has 3 values: (x,y,z) in a 3d coordinate system. So we have the cartesian coords(3x1 vectors)
    of the platform in rest position:

    |Xf(i)|
    |Yf(i)| = Pf(i)
    |Zf(i)|

    and

    |Xm(i)|
    |Ym(i)| = Pm(i)
    |Zm(i)|

    for i=1 to 6 for the 6 legs.

    Known the coords of the joints we know the length of the legs:
    `````__________________________________________
    L(i)=\/ (Xm(i)-Xf(i))^2 + (Ym(i)-Yf(i))^2 + (Zm(i)-Zf(i))^2

    for i=1 to 6 for the legs.

    The Leg 1 for this example:
    `````__________________________________________
    L(1)=\/ (Xm(1)-Xf(1))^2 + (Ym(1)-Yf(1))^2 + (Zm(1)-Zf(1))^2 ==>

    `````_______________________________________
    L(1)=\/ (80-210)^2 + (-300-(-200))^2 + (-50-(-350))^2 ==>

    `````___________________________
    L(1)=\/ (-130)^2 + (-100)^2 + (300)^2 ==>

    `````______________________
    L(1)=\/ 16900+ 10000 + 90000 ==>

    `````_______
    L(1)=\/ 116900 ==>

    L(1)=341.9064199455752

    ...
    ...
    Because it's not a small solution and it's very difficult to write it down all at once,
    before I continue please tell me if this is what you need or
    you need something else.
  8. Planmix

    Planmix New Member

    Joined:
    Jun 25, 2008
    Messages:
    22
    Occupation:
    Home Automation - Satellites - Sequirity Systems
    Location:
    Athens - Greece
    Balance:
    389Coins
    Ratings:
    +0 / 0 / -0
    There are three translational specific force channels: surge, sway and heave and three angular rate channels, roll, pitch and yaw. (accellerations & rotation velocities)
    These are the forces that we need from FSX and they are the forces that the pilot feels in the cabin.
    All we have to do is to convert them to motion. Not simple conversion. We need to move the platform in a such a way that makes us feel these accelerations.
    The inputs at first going to the limiters, to protect our platform, and then
    the force channels transformed into the inertial frame from the platform frame using a rotation matrix,
    and the angular rate channels are transformed to Euler angle rates.
    Then passed through the scaling block and the high pass second-order filters.
    There are low pass filters too for surge and sway channels by crossfeeding the surge and sway to the pitch and roll channels respectively.

    If you need to ask something more specific, please tell me.
    At the begining, I started to program all the code in visual basic, but I discoverd Matlab thanks to a friend from Holland.
    I'm not an expert on matlab but after inf_hours of reading I'm doing well.
    The current setup is like this:
    I'm using VB to extract the data from FSX,
    I send the data to the matlabs dll file,
    I receive the outputs,
    I send the outputs to the serial port.

    Now I'm going to use the position sensors of the legs not only for limiting but
    to have a real position feedback of the position of the platform (forward kinematics) for the autotune part. So, in one of the firsts calibration tests, I send the platform to x,y,z,p,q,r positions, and I want to know how much time needs to get there and tune automaticaly the cue algorithms.
  9. Planmix

    Planmix New Member

    Joined:
    Jun 25, 2008
    Messages:
    22
    Occupation:
    Home Automation - Satellites - Sequirity Systems
    Location:
    Athens - Greece
    Balance:
    389Coins
    Ratings:
    +0 / 0 / -0
    Is anyone knows the matlab really good?
    I have a problem and I can't find info :(
  10. egoexpress

    egoexpress Active Member

    Joined:
    Dec 13, 2006
    Messages:
    3,839
    Location:
    Germany - Frankfurt/M
    Balance:
    421Coins
    Ratings:
    +10 / 1 / -0
    Yes, thanks, that's is the input I have been searching for!

    Your explanation is way more describing than the pdfs I've red so far :)

    Ok, until here I've checked it. Every joint has/is a vector coordinate. Every leg lenght can be derivated via the areal pythagoras over the difference of mobile and frame platform vectors.

    Would you please go on with the next step? I am not able to figure out rest of the relations in my mind still :blush:

    regards
    Christian

    EDIT: Oh, just have seen that you've posted once again in the meantime :)
  11. Planmix

    Planmix New Member

    Joined:
    Jun 25, 2008
    Messages:
    22
    Occupation:
    Home Automation - Satellites - Sequirity Systems
    Location:
    Athens - Greece
    Balance:
    389Coins
    Ratings:
    +0 / 0 / -0
    I'm going to give you only what you need in the simplest form that I can, because if I continue the analysis, I 'll need a couple of days of writing :)

    The solution goes like this:

    Keep in mind the previous plans and make variables for every joint of the platform and the base.
    I'll use the following names for variables:
    b(i)x means base's i joint x coord i=1 to 6
    b(i)y means base's i joint y coord i=1 to 6
    b(i)z means base's i joint z coord i=1 to 6
    p(i)x means platform's i joint x coord i=1 to 6
    p(i)y means platform's i joint y coord i=1 to 6
    p(i)z means platform's i joint z coord i=1 to 6
    So we declare every joint with 3 variables(coordinates)
    For the base's jointb(i)=[b(i)x , b(i)y , b(i)z]
    For the platform's joints : jointp(i)=[p(i)x , p(i)y , p(i)z]

    I'll add 8 more variables:
    plx, ply, plz, pla, plb, plc, rb,rp. The 6 first are the coords that we want the platform to go (inputs).
    plx,ply,plz = x,y,z platform's position in the 3d coordinate system,
    pla,plb,plc=yaw-angle, roll-angle, pitch-angle.
    The rp is the platform's ratio and rb is the base ratio.

    Let's start!

    At first we have to calculate only the values of the matrix that we will need later.
    I'll load the results in temp-variables r11, r12, r21, r22, r31 and r32.

    r11= cos(pla) * cos(plb)
    r12= ( cos(pla) * sin(plb) * sin(plc) ) - ( sin(pla) * cos(plc) )
    r21= sin(pla) *cos(plb)
    r22= ( sin(pla) * sin(plb) * sin(plc) ) + ( cos(pla) * cos(plc) )
    r31= -sin(plb)
    r32= cos (plb) * sin(plc)

    And now it's time for the show. The final step that we have to make,
    is to calculate the length of the legs:

    L(i)= sqr( ( (plx^2)+(ply^2)+(plz^2)+(rp^2)+(rb^2) ) + ( 2 * (r11 * p(i)x + r12 * p(i)y) * (plx - b(i)x) ) + ( 2 * (r21 * p(i)x + r22 * p(i)y) * (ply - b(i)y ) ) + ( 2 * (r31 * p(i)x + r32 * p(i)y) * plz) - ( 2 * (plx * b(i)x + ply * b(i)y) ) )

    for i=1 to 6 for the 6 legs.

    This is the simplest form that I can give you of the inverse kinematics of the stewart platform.
    I hope that I did not made any mistakes with the parethesis.
    If you have any questions, ask me.
  12. Planmix

    Planmix New Member

    Joined:
    Jun 25, 2008
    Messages:
    22
    Occupation:
    Home Automation - Satellites - Sequirity Systems
    Location:
    Athens - Greece
    Balance:
    389Coins
    Ratings:
    +0 / 0 / -0
    .... I advise you to make the model in matlab. I used to write the equations and the functions like this in my programs, until I discoved it.
    I'm an old programmer. When I finished as a programmer, we were working in DOS 5.0 :)

    Anyway, in matlab you can easily convert with some more maths the output data, to move any type of motor, or hydravlic system.
  13. wannabeaflyer

    wannabeaflyer Active Member

    Joined:
    Jul 31, 2008
    Messages:
    248
    Location:
    UK - London area
    Balance:
    971Coins
    Ratings:
    +34 / 0 / -0
    Hi John do you know if MATLAB student edition would be ok for creating a program for Controlling a platform very similar to yours i am looking at a copy that comes with SIMULINK as a bonus, as its a student version a few functions may be missing but will those that are included be enough to create software similar to the work your doing :highfive:
  14. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Hi,

    I have Matlab R2007b installed, and its SIMULINK part, works great!

    I think John has the same version installed, since his model works ok on my computer too...

    Regards, Thanos
  15. egoexpress

    egoexpress Active Member

    Joined:
    Dec 13, 2006
    Messages:
    3,839
    Location:
    Germany - Frankfurt/M
    Balance:
    421Coins
    Ratings:
    +10 / 1 / -0
  16. wannabeaflyer

    wannabeaflyer Active Member

    Joined:
    Jul 31, 2008
    Messages:
    248
    Location:
    UK - London area
    Balance:
    971Coins
    Ratings:
    +34 / 0 / -0
    Hi Christian have sent off for the demo disk and found the student version with Simulink included for £50.00 on amazon website ( the price of a PS£ game so no comparison there then :lol: ) hoping to get some feedback and going over John planmix's posts to try to get started on programming but dont hold your breath form what i have picked up so far this is one of those easier said than done projects 8) but hey the fun is in the trying :cheers:
  17. Lazyman

    Lazyman New Member

    Joined:
    Nov 25, 2008
    Messages:
    6
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    Hi.

    I am very amazed at your work. :eek:

    So when you say that your software could be used for any time of 6DOF design, do you mean that the platform would not have to be designed as a hexipod top motion platform and could really be designed in any way that would provide you 6DOF? Sorry for the dumb question but i just real excited and want to design a motion platform without a hexipod type design so I could get greater angles on the yaw pitch and roll.
  18. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Hi Lazyman,

    What do you mean? Any 6DOF design should still have six legs. But depending on the angle and the length of the legs you can achieve less or more angle end-positions...

    And of course these custom dimensions must inserted into the calculations!

    Another way of implementing the 6DOF structure, is to have an inverted hexapod hanged by the ceiling as it often is done in some robotic applications! :brows:

    Regards, Thanos
  19. Lazyman

    Lazyman New Member

    Joined:
    Nov 25, 2008
    Messages:
    6
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    I mean something similar to this guys idea.



    It looks over ambitious but I would like to build a miniature model of something like that.
  20. adgun

    adgun Active Member

    Joined:
    Jan 28, 2008
    Messages:
    518
    Occupation:
    mechanic
    Location:
    Netherlands
    Balance:
    5,684Coins
    Ratings:
    +131 / 4 / -0
    Hi Lazyman
    They arn't realistic,there foot must wight a fuw tons to keep it stable.
    regards Ad
    • Agree Agree x 1