Exemple #1
0
def PT1():
    PT1a = rt.PT1(T=1)
    PT1b = rt.PT1(T=5)
    PT1c = rt.PT1(T=0.1)

    elements = [PT1a, PT1b, PT1c]
    labels = ["$T = 1s$", "$T = 5s$", "$T = 0,1s$"]

    plot(elements, labels, "PT1", -1, 3, [-3, 1], 10, [0, 1.2])
Exemple #2
0
def IT1():
    I = rt.I(T=1)

    PT1a = rt.PT1(T=1)
    PT1b = rt.PT1(T=5)
    PT1c = rt.PT1(T=0.1)

    IT1a = rt.PROD([I, PT1a])
    IT1b = rt.PROD([I, PT1b])
    IT1c = rt.PROD([I, PT1c])

    elements = [IT1a, IT1b, IT1c]
    labels = ["$T = 1s$", "$T = 5s$", "$T = 0,1s$"]

    plot(elements, labels, "IT1", -2, 3, [-7, 2], 10, [0, 10])
Exemple #3
0
def PDT1():
    print("PDT1")

    PD = rt.PD(T=1)

    PT1a = rt.PT1(T=1)
    PT1b = rt.PT1(T=5)
    PT1c = rt.PT1(T=0.1)

    PDT1a = rt.PROD([PD, PT1a])
    PDT1b = rt.PROD([PD, PT1b])
    PDT1c = rt.PROD([PD, PT1c])

    elements = [PDT1a, PDT1b, PDT1c]
    labels = ["$T = 1s$", "$T = 5s$", "$T = 0,1s$"]

    plot(elements, labels, "PDT1", -2, 3, [-2, 2], 10, [0, 10])
Exemple #4
0
def PT3():
    PT1 = rt.PT1(T=0.1)

    PT2a = rt.PT2(omega=10, D=1)
    PT2b = rt.PT2(omega=10, D=0.7)
    PT2c = rt.PT2(omega=10, D=0.5)
    PT2d = rt.PT2(omega=10, D=0)

    PT3a = rt.PROD([PT1, PT2a])
    PT3b = rt.PROD([PT1, PT2b])
    PT3c = rt.PROD([PT1, PT2c])
    PT3d = rt.PROD([PT1, PT2d])

    elements = [PT3a, PT3b, PT3c, PT3d]
    labels = [r"$D=1$", r"$D=0,7$", r"$D=0,5$", r"$D=0$"]
    plot(elements, labels, "PT3", -1, 3, [-6, 2], 5, [0, 2])
Exemple #5
0
def IT3():
    I = rt.I(T=1)

    PT1 = rt.PT1(T=0.5)

    PT2a = rt.PT2(omega=10, D=1)
    PT2b = rt.PT2(omega=10, D=0.7)
    PT2c = rt.PT2(omega=10, D=0.5)
    PT2d = rt.PT2(omega=10, D=0.05)

    IT3a = rt.PROD([I, PT1, PT2a])
    IT3b = rt.PROD([I, PT1, PT2b])
    IT3c = rt.PROD([I, PT1, PT2c])
    IT3d = rt.PROD([I, PT1, PT2d])

    elements = [IT3a, IT3b, IT3c, IT3d]
    labels = [r"$D=1$", r"$D=0,7$", r"$D=0,5$", r"$D=0,05$"]
    plot(elements, labels, "IT3", -1, 3, [-9, 1], 2, [0, 2])
Exemple #6
0
def DT3():
    D = rt.D(T=1)

    PT1 = rt.PT1(T=0.1)

    PT2a = rt.PT2(omega=10, D=1)
    PT2b = rt.PT2(omega=10, D=0.7)
    PT2c = rt.PT2(omega=10, D=0.5)
    PT2d = rt.PT2(omega=10, D=0.05)

    DT3a = rt.PROD([D, PT1, PT2a])
    DT3b = rt.PROD([D, PT1, PT2b])
    DT3c = rt.PROD([D, PT1, PT2c])
    DT3d = rt.PROD([D, PT1, PT2d])

    elements = [DT3a, DT3b, DT3c, DT3d]
    labels = [r"$D=1$", r"$D=0,7$", r"$D=0,5$", r"$D=0,05$"]
    plot(elements, labels, "DT3", -1, 3, [-5, 3], 5, [-10, 10])
Exemple #7
0
def PDT3():
    print("PDT3")

    PD = rt.PD(T=1)

    PT1 = rt.PT1(T=0.1)

    PT2a = rt.PT2(omega=10, D=1)
    PT2b = rt.PT2(omega=10, D=0.7)
    PT2c = rt.PT2(omega=10, D=0.5)
    PT2d = rt.PT2(omega=10, D=0.05)

    PDT3a = rt.PROD([PD, PT1, PT2a])
    PDT3b = rt.PROD([PD, PT1, PT2b])
    PDT3c = rt.PROD([PD, PT1, PT2c])
    PDT3d = rt.PROD([PD, PT1, PT2d])

    elements = [PDT3a, PDT3b, PDT3c, PDT3d]
    labels = [r"$D=1$", r"$D=0,7$", r"$D=0,5$", r"$D=0,05$"]
    plot(elements, labels, "PDT3", -1, 3, [-5, 3], 5, [-6, 8])
Exemple #8
0
import regelungstechnik as rt


# Example transfer function is a product of a PT1 and PT2 transfer function
# F(s) = V / (Ts + 1) * 1 / ((s/omega)^2 + 2D/omega * s + 1)

PT1 = rt.PT1(T=2e-3, V=0.2)
PT2 = rt.PT2(omega=1000, D=0.2)
PT3 = rt.PROD([PT1, PT2])


# Make a list of the transfer functions with corresponding labels

elements = [PT3, PT1, PT2]

labels = [
    r"$H = PT_1 \cdot PT_2$",
    r"$PT_1$",
    r"$PT_2$"
]


# Create a Bode-Diagram and save several plots

bode = rt.BodeDiagramm(elements, labels, start=1.0, stop=5.0, ticks=[-7, 2], lang="EN")
bode.save(pick=[], path="images/", filename="bode_canvas.png")
bode.save(pick=[0], path="images/", filename="bode_single.png")
bode.save(path="images/", filename="bode_all.png")


# Create a Step-Response and save several plots