How to control the frequency of pwm in compare pwm block?

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

Submitted by gamemuresh on Thu, 04/03/2014 - 10:34 

Hi, I am trying to convert the pwm from the dsp kit to sine wave using RC low pass filter. upto 20Hz i had converted to sine, but what i required is for 50Hz. I tried by changing the sample period block in PWM compare block, but it didn't give any useful result.

Tagged:

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2016

    Submitted by Anders89 on Thu, 04/03/2014 - 20:24.

    You don't want to touch your PWM period, that will screw up your RC filter. Just use a 50Hz sin input to the PWM block compare input pin. Attach your diagram and we will modify it to work.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2016

     

    Submitted by Anders89 on Fri, 04/04/2014 - 10:15.

     

    You can find a sin driving a PWM in the example file attached the the previous forum post
    The example is set to 4 kHz. Right click the sawtooth driving the sin and change the frequency from 4 kKz to 50 Hz.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2016

    Submitted by gamemuresh on Fri, 04/04/2014 - 10:28.

    Sir, I ll try and let you know about my progress

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2016

    Submitted by gamemuresh on Mon, 04/07/2014 - 10:42.

    Sir, The above model is not running in my vissim as mine is version 8.0 and the dsp kit is f2812. So can you please send any model related to that for controlling pwm frequency to convert it into sine wave using low pass filter