Implement Sensors For Double Lane Change Maneuver Using MotionView

Christopher_Fadanelli
Christopher_Fadanelli
Altair Employee
edited August 2023 in Altair HyperWorks

Curious about your vehicle model's ability to meet Double Lane Change Standards? This video demonstrates the effective utilization of MotionView sensors to fulfill this requirement! The integration of sensors for the Double Lane Change maneuver not only optimizes time during iterative processes but also enhances comprehension of your MotionView vehicle model's constraints. The tutorial encompasses various aspects: from the double lane change segments, importing and affixing the sensor system to a MotionView vehicle model, modifying section parameters, post-processing MotionSolve results, and expanding sensor integration for multi-axle vehicles.


https://www.youtube.com/watch?v=inzlCaQIUnQ

Welcome!

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

Comments

  • Jigar
    Jigar Altair Community Member

    Hi @Christopher_Fadanelli In model the sensor expression for Right Tire and Left Tire respectively compare to value 0.1 and 0.2 to halt simulation. Please explain the expression syntax and how its works IF(DX({arg_cone.r.idstring},{arg_wheel.r.cm.idstring}):IF(DY({arg_cone.r.idstring},{arg_wheel.r.cm.idstring})-{arg_wheel_end.value.lin}:1,0,0),0.2,0)

    Thanks

  • Orestis_YB
    Orestis_YB
    Altair Employee

    Hello @Jigar,

    you can find the syntax of any MotionSolve Function by expanding expression builder and clicking on MotionSolve Function Help.

    Untitled Project.gif

    As described in IF() we are using EXPR1 as a flag and then EXPR2, EXPR3 and EXPR4 are used depending on the value of EXPR1 (less than zero, equal to zero and greater than zero respectively)

    image.png

    In the case of the above tutorial a nested if is used. Below You can see an easier representation of it.

    image.png

    You can find the syntax of DX() and DY() functions in MotionSolve Function Helps.

    Hope this helps!

    Best regards,
    Orestes

  • Christopher_Fadanelli
    Christopher_Fadanelli
    Altair Employee
    edited April 9

    Hi @Jigar ,

    As @Orestis_YB mentioned it is a nested if statement to halt the simulation if the tires penetrated the barrier.

    Can you use the same value to be returned in the IF statement. Absolutely.

    The main reason why I have different values for DY and DX (1 and 0.2) was for post processing. When plotting the sensor value, I wanted to differentiate which the sensor.

    Hope this helps!

    Christopher Fadanelli

  • Jigar
    Jigar Altair Community Member

    Thanks. Now above solution makes expression clear understanding of how its working.

  • Jigar
    Jigar Altair Community Member

    Hi

    In the above explanation, as soon as DX()=0, output sensor =1, without checking the tire cross barrier in Y direction.

    isn't the sensor statement modifying like this

    For Right Tire Front Axle

    IF DX() < 0 % Behind the sensor longitudinally and check lateral penetration
    IF (DY()-wheel_end)<0 % No lateral penetration
    value =1
    ELSEIF (DY()-wheel_end)=0 % Just Meet Lateral penetration
    value =0
    ELSE
    value =0 % Cross the lateral penetration
    END
    ELSEIF DX() = 0 & (DY()-wheel_end)<0 %Reach the sensor longitudinally and no lateral penetration
    value = 1
    ELSEIF DX() = 0 & (DY()-wheel_end)= 0 %Reach the sensor longitudinally and just meet lateral penetration
    value = 0
    ELSEIF DX() >0 & (DY()-wheel_end)<0 % Cross the sensor longitudinal and no lateral penetration
    value =1
    ELSE
    value=0
    END

    Halt Simulation for sensor value lesser and equal to 0.2
    Proceed for sensor value 1

    Halt Simulation for sensor value lesser and equal to 0.2Proceed for sensor value 1

    Does this is more correct way. put your view.

    Thanks

  • Christopher_Fadanelli
    Christopher_Fadanelli
    Altair Employee

    Hi @Jigar,

    Referring to Sensor Section 1 Right Tire.

    Assuming that DY is not triggered. If the value reported by DX is 0, the value recorded by the IF statement will be 0.2. If you are referring to the Sensor Plot, 1 will be returned. Think of it as a binary switch, 0 will be returned since the sensor hasn't been triggered. A value of 1 will be returned if the sensor is triggered.

    Regarding your statement:

    IF (DY()-wheel_end)<0 % No lateral penetration

    value =1

    ELSEIF (DY()-wheel_end)=0 % Just Meet Lateral penetration

    value =0

    ELSE

    value =0 % Cross the lateral penetration

    This is how it is being interpreted (All due to how DY was formulated in the expressions).

    IF (DY()-wheel_end)<0 % lateral penetration

    value =1

    ELSEIF (DY()-wheel_end)=0 % Just Meet Lateral penetration

    value =0

    ELSE

    value =0 % No lateral penetration

    For the Left Tire, this is how it is being interpreted.

    IF (DY()+wheel_end)<0 % no lateral penetration

    value =0

    ELSEIF (DY()+wheel_end)=0 % Just Meet Lateral penetration

    value =0

    ELSE

    value =1 % Lateral penetration

    Regarding the DX statement, let me clarify (it has been a few years since I worked on this model ;) ). The sensors will only trigger if the DX value of the wheel and cone is exactly 0. If I have a value that is non zero for EXPR 4 that would trigger the sensor. Then the simulation will halt every time after the vehicle crosses over the first section.

    To account for this, I mainly looked at the DY of the wheel ends and the cones. If the vehicle would penetrate the wall in the X direction, the vehicle is not within the bounds of the next section in the Y direction, which would cause a sensor to trigger regardless.

    Hope this helps!

    Christopher Fadanelli

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.