Generating SPWM using arduino-simulink environment

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 replies · 3K views
srinaath
Messages
51
Reaction score
2
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 belowhttps://www.physicsforums.com/file:///C:\Users\ccbzak\AppData\Local\Temp\msohtmlclip1\01\clip_image001.png 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

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:
Engineering news on Phys.org
ard_1.png

ard_2.png