+ Post New Thread
Results 1 to 4 of 4
  1. #1
    Newbie level 2
    Points: 1,003, Level: 7

    Join Date
    May 2009
    Posts
    2
    Helped
    0 / 0
    Points
    1,003
    Level
    7

    lookup table to generate sine using fast pwm;

    How the lookup table values are created to vary the duty cycle accorging to sine amplitude

    •   AltAdvertisement

        
       

  2. #2
    Super Moderator
    Points: 81,321, Level: 69
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    13,331
    Helped
    4454 / 4454
    Points
    81,321
    Level
    69

    Re: lookup table to generate sine using fast pwm;

    I'm not sure what you mean.

    If you are asking for step values to create the sine waveform, use a spreadsheet or similar. You can even do it with a pocket calculator. You create as many samples as you need by calculating at the angles required. The resulting frequency is set by how fast you step through the table, not the values in it. The sine values are normally calcuated to go from 0% to 100% duty cycle and the amplitude controlled by the DC fed to the PWM output stage.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



    •   AltAdvertisement

        
       

  3. #3
    Super Moderator
    Points: 77,645, Level: 67
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    15,729
    Helped
    3586 / 3586
    Points
    77,645
    Level
    67

    Re: lookup table to generate sine using fast pwm;

    Hi,

    calcuated to go from 0% to 100% duty cycle and the amplitude controlled by the DC fed to the PWM output stage.
    For high side drivers with bootstrap circuit you should not use 100%.

    For adjusting amplitude you could multiply your table values with a gain factor.

    Klaus



    •   AltAdvertisement

        
       

  4. #4
    Advanced Member level 4
    Points: 7,632, Level: 20
    Achievements:
    7 years registered
    Venkadesh_M's Avatar
    Join Date
    Jun 2013
    Location
    Coimbatore, India
    Posts
    1,375
    Helped
    258 / 258
    Points
    7,632
    Level
    20

    Re: lookup table to generate sine using fast pwm;

    Excel, Mat lab, calculator etc., My choice is always C program.

    Example code [written for 8051, using dev c++]



--[[ ]]--