🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Transmission Shift Control

User: "Batuhan Coskun"
Altair Community Member
Updated by Batuhan Coskun

Hi everyone,

I have a question about tranmission shift control in Activate. I modeled engine, transmission and other subsystem for my model. But I didn't solve the gear shifting.

I use an Oml Block for gear control. In this block, gear and engine speed my input and selected gear output.  I need a current gear info. For this reason, I connect the output gear to input gear. But, when I connect them,, I get an Algebraic loop detected error.

I think, gear has an empty value, when start the simulation. Therefore, I check this value with isempty function. If empty, I define the value 1. However, it doesn't solve the problem. I get this error even if the function is empty, when we connect the output to the input. It doesn't allow them to connect.

Do you have any suggestion to solve this problem or use another method? 

image

Find more posts tagged with

Sort by:
1 - 5 of 51
    User: "RoKet"
    Altair Employee
    Accepted Answer
    Updated by RoKet

    Hi Batuhan,

    While closing the loop around OML block you've created an algebraic loop (output depends directly on input, input depends on output, ...). Easiest way to break the loop is to use the block LoopBreaker or a short time delay.

    An alternative to your gear shifting block you can find in demo StateMachine/Vehicle acceleration.scm.

    User: "Batuhan Coskun"
    Altair Community Member
    OP
    Updated by Batuhan Coskun

    Hi Roket,

     

    I will examine the example model. The time delay is working in my model. Thanks a lot for your help.

     

     

    User: "João Marabisa"
    Altair Employee
    Updated by João Marabisa

    Hi Roket,

     

    I will examine the example model. The time delay is working in my model. Thanks a lot for your help.

     

     

    Hi @Batuhan Coskun,

    Be careful using "OMLCustomBlock". It is indeed a powerful block, however, depending on the logic that you want to implement, you can do it using purely simple blocks such as "MathExpression", that is faster comparing to previous one.

    By the way, I don't know the logics that you're using on your transmission, but I already worked on a vehicle model with transmission (reference: https://x-engineer.org/vehicle-acceleration-maximum-speed-modeling-simulation/)

    I used "Discrete Delay" block - model is attached.

    User: "Batuhan Coskun"
    Altair Community Member
    OP
    Updated by Batuhan Coskun

    Hi @Batuhan Coskun,

    Be careful using "OMLCustomBlock". It is indeed a powerful block, however, depending on the logic that you want to implement, you can do it using purely simple blocks such as "MathExpression", that is faster comparing to previous one.

    By the way, I don't know the logics that you're using on your transmission, but I already worked on a vehicle model with transmission (reference: https://x-engineer.org/vehicle-acceleration-maximum-speed-modeling-simulation/)

    I used "Discrete Delay" block - model is attached.

    Hi João Marabisa,

    Thank you for the response.  I use If elseif conditions in my model. I have shift up-down engine rpm for all gears. For this reason, I control the gear with engine rpm.  I actually, tried it first with If Expressions block. However, it has only one input. And than, I used the OML Custom Block.

    Can I use if elseif condition in Mathexpression Block?

    By the way, I found that with Mux I can define multiple inputs to the If Expression Block. If I can't use if condition in Mathexpression Block. I will continue with If Expression Block.

    And, many thanks for the link to your example shared. It will be very helpful for our model. 

     
    User: "João Marabisa"
    Altair Employee
    Updated by João Marabisa

    Hi João Marabisa,

    Thank you for the response.  I use If elseif conditions in my model. I have shift up-down engine rpm for all gears. For this reason, I control the gear with engine rpm.  I actually, tried it first with If Expressions block. However, it has only one input. And than, I used the OML Custom Block.

    Can I use if elseif condition in Mathexpression Block?

    By the way, I found that with Mux I can define multiple inputs to the If Expression Block. If I can't use if condition in Mathexpression Block. I will continue with If Expression Block.

    And, many thanks for the link to your example shared. It will be very helpful for our model. 

     

    Hi @Batuhan Coskun,

    Definitely yes!

    Below there is "MathExpression" block with the logic below:

    if p1 >p2, the output = p1*1

    if p3 <= p1 <= p2, the output = p1*0

    if p1 < p3, the output = p1*1

     

    image