What is the good switch for PWM simulation in Activate

yugang
yugang Altair Community Member
edited August 2022 in Community Q&A

Hello

I am using activate for PWM control simulation. For the switch, i use idea-GTO-Thysistor. And connect PWM block to the switch directly.

image

But every simulation, i get warning from the message center as below.

[PWM_Switch_Analysis_1.scm]: Warning: Modelica Compiler Warning, the following are declared as continuous variables, but are defined using a discrete equation: [`vss_PWM_Switch_Analysis_1_im.container.subcontainer.SignalPWM.zeroOrderHold.y`], converting these to discrete variables ( 99 )
Block(s): SignalPWM 
Model: PWM_Switch_Analysis_1

 

I am wondering what is the right choice of switch in Activate for PWM control simulation. Since PWM control is quite normal in actuator, motor control application.

Thanks for the answer. Have a nice day!

 

 

 

 

 

 

Answers

  • Filippo Donida_21546
    Filippo Donida_21546
    Altair Employee
    edited August 2022

    Dear Yugang,

    thanks for reaching out and for posting this interesting question.

    The warning message is actually correct since the y variable of the block referred to in the text message is assigned in a when-clause and this implies that it can only change at certain time instants, i.e. when the when clause event triggers.

    This is not an issue though since the MSL component developer adopted such an implementation to break a potential algebraic loop. I've added a screenshot here below for a graphical explanation.

    Best,

    Filippo.

    image