Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Generating SPWM using arduino-simulink environment

  1. Jun 6, 2016 #1
    hi all......am trying to generate sinusoidal pulse width modulation using arduino-simulink for my inverter board....I simulated the SPWM logic in simulink, then installed the required support package for arduino-simulink.....but i am facing some problems......I started from basic...like linking arduino and PWM block as shown below

    https://www.physicsforums.com/file:///C:\Users\ccbzak\AppData\Local\Temp\msohtmlclip1\01\clip_image001.png [Broken]

    I checked the output of Arduino pin11 from CRO and it was working fine….

    Now I used this blocks to generate spwm…

    https://www.physicsforums.com/file:///C:\Users\ccbzak\AppData\Local\Temp\msohtmlclip1\01\clip_image002.png [Broken]

    When I checked the output from CRO…..it was distorted…literally I didn’t get any SPWM wave…

    Help me out with problem…

    My Simulink configurations are

    Solver: fixed step size

    Step size:1e-5

    Triangle wave frequency is 8KHz and sine wave is 50Hz…
    Last edited by a moderator: May 7, 2017
  2. jcsd
  3. Jun 6, 2016 #2
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted