Control of motorcycle

Cpapagiann
Cpapagiann Altair Community Member

I face a problem in a model that I build. I have a motorcycle as the example of Altair, but with different mass and inertia properties. I have the problem where I want to make a 3d analysis but I can't keep the motorcycle stable because of not handling the motorcycle as it should be. The control of it I believe is the main reason. I started to test different values of kp,ki,kd and look ahead time, but I couldn't find the solution. Is it possible to find a solution in this problem?

Thank you in advance.

Welcome!

It looks like you're new here. Sign in or register to get started.

Answers

  • Vishvam
    Vishvam
    Altair Employee

    Hi @Cpapagiann,

    Could you explain a bit more about the issue you are facing? I am assuming you are working with Motionview for multibody simulation. Any more info with the type of event that you are working with might help.
    If possible please share the model so that the issue can be looked first-hand.

  • GTT Adam
    GTT Adam
    Altair Employee

    Hi @Cpapagiann,

    You are correct in that the steering and lean parameters should be adjusted for a motorcycle of significantly different mass and inertia properties. They should also be adjusted depending on the type of event you are trying to complete.

    If we look at the Electric_Sport_Bike example model, you can see that when a double lane change, a slalom, and a throttle off in corner event are introduced, a different set of leaning PID parameters are initialized:

    Double Lane Change:

    image.png

    Slalom:

    image.png

    Throttle Off in Corner:

    image.png

    From these examples, it should be noted that the parameters for the lateral error control (steer control) remain constant and the modifications per event are only made to the lean controller. Also, the Ki is constant across all 3 events, so it is likely that only Kp and Kd need to be modified.

    If you are having significant issues with having your custom motorcycle complete events, there are a few strategies to deploy:

    1. Double check that the overall mass, center of gravity, and inertia of your motorcycle is realistic and matches your configuration target. Compare your overall configuration with that of the example models to see the % difference in those key areas to make sure you have not accidentally defined bodies incorrectly.
    2. Using the default Kp and Kd values, manually adjust the parameters based on the performance you are seeing. If the vehicle simply falls over, then the proportional constant may simply need to be increased.
    3. Rather than manually adjust the two variables, you can also use HyperStudy to vary the two parameters for you with an objective function of maximizing the longitudinal distance travelled (if using a DLC< for example). This would ensure the end of the course has been reached.
      1. The implementation of a driven event has seen significant improvements in the last few releases with respect to HyperStudy, so please use version 2025.0 at least for this type of optimization process.

    Hope this helps!

    Adam Reid

  • Cpapagiann
    Cpapagiann Altair Community Member

    Hi, thank you for answering my questions.

    @GTT Adam I am not sure if my properties of inertia are constant or the calculation of them are correct based on frame reference marker, because of using STEP files, and some inertia values that i gave based on the inventor, where i use the point of reference frame marker in the cad.

    Can somehow check this?

    Also i would like to check if i can make somehow the control variables changing based on the road. Is it possible also?

    I would like to not optimize them based on maximizing the longitudinal distance.

    Thank you in advance.

  • GTT Adam
    GTT Adam
    Altair Employee

    Hi @Cpapagiann,

    If you want to do a sense-check on how well the physical properties were calculated, then the easiest way is to replace the graphics with newly created primitive graphics and see if they are similar.

    The physical properties of you model can be checked using the CG/Inertia Tool, shown next to the Bodies Tool:

    Capture004.png

    Here, you can specify what reference marker to use for the calculation, such as model CG or the Global Reference. This would be a useful way to make sure the properties for your model match Inventor as you can ensure the same reference frame has been used.

    What types of variables are you looking to have updated based on the road type? The PID values?

    Hope this helps!

    Adam Reid

  • Cpapagiann
    Cpapagiann Altair Community Member

    Hello,

    Thank your for your response @GTT Adam.

    1) About this part:

    if you want to do a sense-check on how well the physical properties were calculated, then the easiest way is to replace the graphics with newly created primitive graphics and see if they are similar.

    you mean: to make a box with the same properties and check the volume of it right?

    2) I would like to ask to check if I am right. I have three types of bodies in my simulation. I changed the model of two wheeler example so I use my bodies. As you know the structure is like this:

    image.png

    Now let me break down the different categories.
    a) I have bodies that were imported with their graphics so the properties of mass, cm and inertia are derived from graphics like this:

    image.png

    This is for frame, and as you can see the properties are fixed, calculated from global origin (I am not sure about the last one). I imported the frame cg:

    image.png

    But for this you can see that for the m_frame_ref_marker:

    image.png

    The point is 0,0,0 and i am not sure if this marker is moving with the motorcycle. So if not, the Frame cg is locked while the motorcycle is moving. Also as for the frame you can see that the orientation of frame cm marker is fixed with 2 axes orientation method.
    b) Bodies with no graphics that the cg was calculated in CAD software so the inertia based on the cg point. I imported the properties like this:

    image.png


    c) Tires, where:

    image.png

    while the tire reference marker is:

    image.png

    and the wheel center is based on the local reference marker as before.

    I am not sure if in these all categories the inertia properties are properly imported as the motorcycle moves.

    Now about this:

    What types of variables are you looking to have updated based on the road type? The PID values?

    I would like to check if i can optimize these values based on the position and orientation of the motorcycle, but it isn't that necessary right now.

    Thank you in advance.

    Best regards,

    Christos

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.