Generating SPWM using arduino-simulink environment

Click For Summary
SUMMARY

The discussion focuses on generating Sinusoidal Pulse Width Modulation (SPWM) using the Arduino-Simulink environment for an inverter board. The user successfully linked the Arduino with the PWM block and confirmed the output from pin 11 was functioning correctly. However, upon attempting to generate SPWM, the output waveform was distorted, failing to produce a proper SPWM signal. The user’s Simulink configurations include a fixed step size solver, a step size of 1e-5, a triangle wave frequency of 8 kHz, and a sine wave frequency of 50 Hz.

PREREQUISITES
  • Understanding of Sinusoidal Pulse Width Modulation (SPWM)
  • Familiarity with Arduino-Simulink integration
  • Knowledge of Simulink block configurations
  • Basic principles of signal generation and waveform analysis
NEXT STEPS
  • Investigate Simulink block parameters for SPWM generation
  • Learn about Arduino PWM signal characteristics and limitations
  • Explore troubleshooting techniques for distorted waveforms in Simulink
  • Research the impact of solver settings on simulation accuracy in Simulink
USEFUL FOR

Electronics engineers, embedded system developers, and anyone involved in inverter design and PWM signal generation using Arduino and Simulink.

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
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 24 ·
Replies
24
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 13 ·
Replies
13
Views
4K
Replies
8
Views
4K
Replies
6
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K