Power Spectrum Density.

Status
Not open for further replies.

issofa

Newbie level 6
Joined
Jun 2, 2010
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Germany
Activity points
1,366
Hello there.

I would like u guys to help me generate a PSD of an output waveform of a 2 level 4 quadrant IGBT DC/AC converter.

Here is my script in M-file which doesn't work properly.
dt = 1/100;
T = 100;
t = (0:dt:T-dt);

% I think the above times have to be somehow related to the ouput waveform
% and not just randomly writen as I have done, but I don't know how
% to do it

x1 = voltage2.signals.values,1);

y = fft(x1)/length(x1)*2;
m = abs;
m(1)= m(1)/2;
f = (0:length-1)*100/length;
plot(f,20*log10(m)),

hold on
ylabel('Abs. Magnitude dB'),

x2 = voltage3.signals.values,1);

y = fft(x2)/length(x2)*2;
m = abs;
m(1)= m(1)/2;
f = (0:length-1)*100/length;
plot(f,20*log10(m),'-.'),
axis ([0 max(f)/2 -60 10])
hold off
h = legend('Uu','Uu0');

Actually my X1 & X2 are the output from the workspace of Mathlab.
Please have a look on my attach file for the waveform and how my PSD should look like .

Many Thank
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…