How to creat SPWM waveform

7 ビュー (過去 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
  1 件のコメント
Hein zaw
Hein zaw 2019 年 11 月 4 日
Thank you

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeScopes and Data Logging についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by