How to creat SPWM waveform

조회 수: 6 (최근 30일)
Hein zaw
Hein zaw 2019년 1월 15일
댓글: Hein zaw 2019년 11월 4일
Hello, I want to know how to creat the SPWM waveform in matlab to put in amplifier software, arbexpress. Before that I used the signal builder block in simulink and I changed the this data in .xls file. I can change xls file in software which reconize the amplifier. Now i want to creat the SPWM waveform with different modulation ratio. Please give me the way how i can do that. Thanks.

채택된 답변

Lucas Della Santina
Lucas Della Santina 2019년 11월 4일
clear all;
clc;
Fs = 10000000; %frecuencia de sampling (en Hz)(nota para el salame tiene q ser 10 veses mayor a la reiangular por q si no la recorta)
F_triangle =15000; %frecuencia de l; triangular
F_seno = 50 ; %frecuencia de la onda senoidal
Cant_periodos=10; %cantidad de perios de la senal seno
A_tirangle=.9 ; % amplitud de la triangular
A_seno=1 ; % amplitud de la Senoidal
T = Cant_periodos*(1/F_seno); %calculo el fianl de la cadena
t = 0:1/Fs:T-1/Fs; %vector de tiempo
Triangle= sawtooth(2*pi*F_triangle*t,1/2); %onda triangular
Seno=sin(2*pi*t*F_seno); %onda senoidal
Triangle=Triangle*A_tirangle; %modifico la aplitud de la triangular
Seno=Seno*A_seno ; %modifico la aplitud del seno
Compare = Triangle > Seno; %comparo las senales para generar el spwm
subplot(3,1,1);
plot(t,Triangle,"red",t,Seno,"blue")
title('Seno y Triangular')
grid on
subplot(3,1,2);
plot(t,Compare)
title('SPWM TR1!!!')
grid on

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Scopes and Data Logging에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by