The SPWM in Matlab...

Thread Starter

FBorges22

Joined Sep 11, 2008
109
Greetings,

I am trying to representate a SPWM comparing a 30kHz triangle wave with a 60Hz sine wave using the MatLAB. However, I do not know how to compare two functions in him. Recently I generated this graph containg the sine and the triangle wave functions... How I can generate the SPWM?

Here is my .m script:

Rich (BB code):
x1 = 0:0.01:20;
x2 = 0:0.01:20;
plotyy(x1,170*sawtooth(15*x1,0.5),x2,170*sin(x2));
axis([0,20,-200,200]);
title('SPWM Modulation');
ylabel('Voltage (V)');
xlabel('Time (s)');
Thanks,
FBorges22
 

Attachments

Top