problem using Create_PWM macro

Ramin Rahmani
Ramin Rahmani Altair Community Member
edited February 2023 in Community Q&A

Hello everyone,


I would like to use PWM macro to do the simulation of the motor at constant speed. The motor fed by sinusoidal voltage source with 220*sqrt(2) rms volts. During the Macro definition, is it correct to fill in "Magnitute of modulation signal" equal to 311 V. And how can I adjust the duty cycle of the PWM signal?


Best regards,

Tagged:

Best Answer

  • Alexandru-Ionel Constantin
    Alexandru-Ionel Constantin Altair Community Member
    edited February 2023 Answer ✓

    Hi Ramin Rahmani,

     

    Yes, is it correct to fill in the "Magnitude of modulation signal" equal to 311 V.

    You can find an example in the folder( C:\Program Files\Altair\2022.2\flux\Extensions\Macros\Create_PWM.PFM) where the macro is located, Prius_PWM.pdf and Prius_pwm_cst_speed.FLU.

    In this macro, the duty cycle can not be set to a constant value.

    The voltage will have a time variation like the one below.

    image

    You can write a product case for Flux support.

     

    Best regards,

    Alexandru

Answers

  • Alexandru-Ionel Constantin
    Alexandru-Ionel Constantin Altair Community Member
    edited February 2023 Answer ✓

    Hi Ramin Rahmani,

     

    Yes, is it correct to fill in the "Magnitude of modulation signal" equal to 311 V.

    You can find an example in the folder( C:\Program Files\Altair\2022.2\flux\Extensions\Macros\Create_PWM.PFM) where the macro is located, Prius_PWM.pdf and Prius_pwm_cst_speed.FLU.

    In this macro, the duty cycle can not be set to a constant value.

    The voltage will have a time variation like the one below.

    image

    You can write a product case for Flux support.

     

    Best regards,

    Alexandru

  • Lavanya Vadamodala_20519
    Lavanya Vadamodala_20519
    Altair Employee
    edited February 2023

    Hello Ramin Rahmani,

    For 220 V RMS, you can give the magnitude as 311 V.

    In PWM macro, you can only give the information of modulating and carrier wave as frequency. The duty cycle cannot be given directly.

    Thank you,

    Lavanya

  • Ramin Rahmani
    Ramin Rahmani Altair Community Member
    edited February 2023

    Hello Ramin Rahmani,

    For 220 V RMS, you can give the magnitude as 311 V.

    In PWM macro, you can only give the information of modulating and carrier wave as frequency. The duty cycle cannot be given directly.

    Thank you,

    Lavanya

    Hi Lavanya, 


    Thank you for your response.


    Best regards,

  • Ramin Rahmani
    Ramin Rahmani Altair Community Member
    edited February 2023

    Hello Ramin Rahmani,

    For 220 V RMS, you can give the magnitude as 311 V.

    In PWM macro, you can only give the information of modulating and carrier wave as frequency. The duty cycle cannot be given directly.

    Thank you,

    Lavanya

    Hello Lavanya,

    I utilized a PWM macro for a constant-speed induction motor and supplied it with 110 V (63.5 V phase to ground). As a result, I calculated the "Magnitude of modulation signal" to be 89.5 V. The motor, rated at 1440 rpm with 4 poles, has the capability to produce 3.75 N electromagnetic torque. I ran a imposed-speed simulation following the "Prius_PWM.pdf" file. However, the results were incorrect. Despite determining the formula for the Z0_TRIANGLE as "TrapezPer(TIME,-1,1,Z0_P_PORT,0.49*Z0_P_PORT,0.01*Z0_P_PORT,0.49*Z0_P_PORT,0)", the triangle wave produced was not accurate. Can you assist me in finding where I went wrong?

     

    Best regards,

    Ramin

    image

     

     

  • Lavanya Vadamodala_20519
    Lavanya Vadamodala_20519
    Altair Employee
    edited February 2023

    Hello Lavanya,

    I utilized a PWM macro for a constant-speed induction motor and supplied it with 110 V (63.5 V phase to ground). As a result, I calculated the "Magnitude of modulation signal" to be 89.5 V. The motor, rated at 1440 rpm with 4 poles, has the capability to produce 3.75 N electromagnetic torque. I ran a imposed-speed simulation following the "Prius_PWM.pdf" file. However, the results were incorrect. Despite determining the formula for the Z0_TRIANGLE as "TrapezPer(TIME,-1,1,Z0_P_PORT,0.49*Z0_P_PORT,0.01*Z0_P_PORT,0.49*Z0_P_PORT,0)", the triangle wave produced was not accurate. Can you assist me in finding where I went wrong?

     

    Best regards,

    Ramin

    image

     

     

    Can you share the induction motor model with me?

    If you share in Forum, it will be public. Can you open a service now ticket and share the model in the ticket?

    Let me know if you have any difficulty in creating it.

  • Ramin Rahmani
    Ramin Rahmani Altair Community Member
    edited February 2023

    Can you share the induction motor model with me?

    If you share in Forum, it will be public. Can you open a service now ticket and share the model in the ticket?

    Let me know if you have any difficulty in creating it.

    Dear Lavanya,

    Thank you for your support and response. I am not familiar with the process of creating a ServiceNow ticket, so I will provide the model here in hopes that you can help me identify my issue.

    Thank you,

  • Lavanya Vadamodala_20519
    Lavanya Vadamodala_20519
    Altair Employee
    edited February 2023

    Dear Lavanya,

    Thank you for your support and response. I am not familiar with the process of creating a ServiceNow ticket, so I will provide the model here in hopes that you can help me identify my issue.

    Thank you,

    Got the model. I will check and get back to you.

     

  • Ramin Rahmani
    Ramin Rahmani Altair Community Member
    edited February 2023

    Got the model. I will check and get back to you.

     

    I have attached the model in my previous message. You can find it there.

  • Lavanya Vadamodala_20519
    Lavanya Vadamodala_20519
    Altair Employee
    edited February 2023

    I have attached the model in my previous message. You can find it there.

    Hi Ramin,

    The induction machine did not reach to steady state yet. That is why you do not see constant torque. 

    Run the model for much longer until it reaches a steady state. 

    I have kept the model running for a longer time. I will send you the update as soon as it is completed

    Thank you,

    Lavanya

  • Ramin Rahmani
    Ramin Rahmani Altair Community Member
    edited February 2023

    Hi Ramin,

    The induction machine did not reach to steady state yet. That is why you do not see constant torque. 

    Run the model for much longer until it reaches a steady state. 

    I have kept the model running for a longer time. I will send you the update as soon as it is completed

    Thank you,

    Lavanya

    Hello Lavanya,

    I believed that the negative torque production was a result of an incorrect carrier wave and inaccurate simulation. This issue did not occur when using a conventional power supply. Would you mind sending me a screenshot of the results?

    Best regards,

    Ramin

  • Lavanya Vadamodala_20519
    Lavanya Vadamodala_20519
    Altair Employee
    edited February 2023

    Hello Lavanya,

    I believed that the negative torque production was a result of an incorrect carrier wave and inaccurate simulation. This issue did not occur when using a conventional power supply. Would you mind sending me a screenshot of the results?

    Best regards,

    Ramin

    Hello Ramin,

    The negative torque is due to the sequence in which you are exciting your coils. To get a positive torque for the model you shared with me, the phase sequence should be 3, 2, 1 instead of 1, 2, 3.

    This gives you a positive torque as below with ideal sinusoidal voltage supply.

    image

    Use the same sequence for the model with PWM.

  • Lavanya Vadamodala_20519
    Lavanya Vadamodala_20519
    Altair Employee
    edited February 2023

    Hello Ramin,

    The negative torque is due to the sequence in which you are exciting your coils. To get a positive torque for the model you shared with me, the phase sequence should be 3, 2, 1 instead of 1, 2, 3.

    This gives you a positive torque as below with ideal sinusoidal voltage supply.

    image

    Use the same sequence for the model with PWM.

    With PWM, after correcting the sequence attached is the torque graph.

    I am attaching the unsolved model which gives you the torque as in the picture.

    Let me know, if you have any questions.

    Thank you,

    Lavanya

     

  • Lavanya Vadamodala_20519
    Lavanya Vadamodala_20519
    Altair Employee
    edited February 2023

    With PWM, after correcting the sequence attached is the torque graph.

    I am attaching the unsolved model which gives you the torque as in the picture.

    Let me know, if you have any questions.

    Thank you,

    Lavanya

     

    Here is the model with PWM voltage input.

  • Ramin Rahmani
    Ramin Rahmani Altair Community Member
    edited February 2023

    Here is the model with PWM voltage input.

    Hello Lavanya,

    Many thanks for resolving my issue; I am truly grateful.

    Best regards,  

    Ramin