# PyAMS  (the software under revision)

## Ideal linear electrical symmetrical transformer

### Information

The ideal symmetrical transformer, is determined by two Transformer:

### Parameters

NameDefaultDescription
Lp1Primary inductance [H]
Ls11Secondary inductance for first transformer[H]
Ls21Secondary inductance for secend transformer[H]
M11Coupling inductance for first transformer [H]
M21Coupling inductance for secend transformer [H]

### PyAMS definition

```from PyAMS import Signal
from PyAMS import ddt

#Symmetrical Transformer
class SymmetricalTransformer:
def __init__(self, P1, P2,S1, S2, S3, S4):
self.Vp = Signal('out','voltage',P1, P2)
self.Ip = Signal('in','current',P1, P2)
self.Vs1 = Signal('out','voltage',S1, S2)
self.Is1 = Signal('in','current',S1, S2)
self.Vs2 = Signal('out','voltage',S3, S4)
self.Is2 = Signal('in','current',S3, S4)
self.Lp=1.0           # Lp  Primary inductance Value
self.Ls1=1.0          # Ls1  Secondary_1 inductance Value
self.Ls2=1.0          # Ls2  Secondary_2 inductance Value
self.M1=1.0           # M1   Coupling inductance Value for first Transformer
self.M2=1.0           # M2   Coupling inductance Value for secend Transformer
def analog(self):
self.Vp+=self.Lp*ddt(self.Ip)+self.M1*ddt(self.Is1)+self.M2*ddt(self.Is2)
self.Vs1+=self.Ls1*ddt(self.Is1)+self.M1*ddt(self.Ip)+self.M2*ddt(self.Is2)
self.Vs2+=self.Ls2*ddt(self.Is2)+self.M2*ddt(self.Ip)+self.M1*ddt(self.Is1)

Documentation generated by PyAMS ```