1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# Three phase AC waveforms, voltage between two phases

from pylab import *
t = linspace(0, .05, 300)            # 300 point array, from 0 to .1 seconds
f = 50        # 50 Hz AC
Vm = 230 * sqrt(2)
y1 = Vm * sin(2*pi*f*t)              # phase 1
y2 = Vm * sin(2*pi*f*t + 120*pi/180) # phase 2, 120 degree out of phase
y3 = Vm * sin(2*pi*f*t + 240*pi/180) # phase 3, 240 degree out of phase

plot(t, y1)
plot(t, y2)
plot(t, y3)
plot(t, y2-y1, color='black')
show()