sinusoidal PWM


Closed Thread
Results 1 to 40 of 84

Thread: sinusoidal PWM

Hybrid View

  1. #1
    Join Date
    Oct 2011
    Posts
    52


    Did you find this post helpful? Yes | No

    Default Re: sinusoidal PWM

    Hi !

    Thankx sougata and HenrikOlsson for your helpwhich take me into good stages

    there some challenges have any one can help me
    (1) My PIC is16cF877 having CCP1 and CCP2 can it able to generate three phase SPWM?. for my little knowledge I know that for single phase the duty cycle is stored into CCP1 to generate SPWM. for three phase should I have a pic of three CCP modules?.

    (2) how can I improves these my small number of steps(10) cause I read page 63/281 of PIC 16F87X data sheet and microchip application note AN655 page 1/16 I saw the formular for resolution and number of steps respectively.

    The maximum PWM resolution (bits) for a given PWM frequensy is given by the formular below


    Resolution = log(FOSC/FWPM)/log(2) bits

    I want to set my PWM frequency = 5kHZ
    my FOSC = 4MHZ
    which gives resolution of 10 it's ok and scale factor of 1023

    but
    from microchip application note AN655
    PWM_Freq = (Sine_freq) • (# of steps) • 10

    my sine frequency is 50Hz
    PWM_Freq =5kHZ

    gives me 10 steps which I think is very small to give clear SPWM.

    thankx

  2. #2
    Join Date
    Oct 2011
    Posts
    52


    Did you find this post helpful? Yes | No

    Default Re: sinusoidal PWM

    Hi !

    Thankx sougata and HenrikOlsson for your helpwhich take me into good stages

    there some challenges I have any one can help me:

    (1) My PIC is16cF877 have CCP1 and CCP2 can it able to generate three phase SPWM?. for my little knowledge I know that for single phase the duty cycle is stored into CCP1 to generate SPWM. for three phase should I have a pic with three CCP modules?.

    (2) how can I improves these small number of steps(10) cause I read page 63/281 of PIC 16F87X data sheet and microchip application note AN655 page 1/16 I .http://ww1.microchip.com/downloads/e...tes/00655a.pdf I read the formular for bits resolution and number of steps respectively.

    The maximum PWM resolution (bits) for a given PWM frequensy is given by the formular below


    Resolution = log(FOSC/FWPM)/log(2) bits

    I want to set my PWM frequency = 5kHZ
    my FOSC = 4MHZ
    which gives resolution of 10 it's ok and scale factor of 1023

    but
    from microchip application note AN655
    PWM_Freq = (Sine_freq) • (# of steps) • 10

    my sine frequency is 50Hz
    PWM_Freq =5kHZ

    gives me 10 steps which I think is very small to give clear SPWM .

    thankx

  3. #3
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Default Re: sinusoidal PWM

    Hi,
    What exactly do you mean with SPWM? What does the S mean?

    If you're generating the PWM signal with CCP-module you'll need 3 CCP-modules to generate three individual PWM signals. As have already been suggested ditch the '877 and take a look at the 18F2431/4431 which is designed for motor control providing deadtime control and dedicated hardware fault inputs to disable the PWM signals - and more.

    If you need to stick to a 16 series PIC then use the parametric search tool at Microchips website to look up a PIC with three CCP-modules, perhaps the 16F777.

    I just looked briefly at the app-note you reference and they seem to be using a low-pass filter to get a "true" sine-wave output, to do that they calculated/estimated that at least 10PWM cycles is needed to bring the output voltage to the desired value.

    How many "steps" do you want, per period? Let's say you have a lookup table of 32 'steps'. Ie it takes 32 "updates" to create one full cycle of the sinewave, so at 50Hz you need to change the PWM dutycycle 50*32=1600 times per second, which means that you'll get atleast three full PWM cycles for each "step" with a 5kHz PWM frequency, I think that'll work.

    /Henrik.

  4. #4
    Join Date
    Oct 2011
    Posts
    52


    Did you find this post helpful? Yes | No

    Default Re: sinusoidal PWM

    Hi !


    SPWM stands for Sinusoidal Pulse With Modulation.These signals will be used to control Three phase inverter.

    thankx

  5. #5
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: sinusoidal PWM

    I'm afraid the letter sequence SPWM actually was derived by Darrel for his contribution of Software Pulse Width Modulation.
    Dave Purola,
    N8NTA
    EN82fn

  6. #6
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Default Re: sinusoidal PWM

    That's what I thought but figured it couldn't be since we're talking about CCP-modules etc. Doesn't matter, now I know what the OP means although I've never heard the term before.

    /Henrik.

  7. #7
    Join Date
    Apr 2007
    Location
    Pennsylvania, USA
    Posts
    158


    Did you find this post helpful? Yes | No

    Default Re: sinusoidal PWM

    Perhaps this thread will be of use to you.

    http://www.picbasic.co.uk/forum/showthread.php?t=1846
    Shawn

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts