Ejemplo n.º 1
0
        public override void Analyze(Analysis Mna)
        {
            Expression Ip = Mna.AddUnknown("i" + Name + "p");
            Mna.AddPassiveComponent(pa, pc, Ip);
            Expression Is = Mna.AddUnknown("i" + Name + "s");
            Mna.AddPassiveComponent(sc, sa, Is);
            Mna.AddEquation(Ip * turns, Is);

            Expression Vp = pa.V - pc.V;
            Expression Vs = sa.V - sc.V;
            Mna.AddEquation(Vp, turns * Vs);
        }
Ejemplo n.º 2
0
        public override void Analyze(Analysis Mna)
        {
            Expression Ip = Mna.AddUnknown("i" + Name + "p");

            Mna.AddPassiveComponent(pa, pc, Ip);
            Expression Is = Mna.AddUnknown("i" + Name + "s");

            Mna.AddPassiveComponent(sc, sa, Is);
            Mna.AddEquation(Ip * turns, Is);

            Expression Vp = pa.V - pc.V;
            Expression Vs = sa.V - sc.V;

            Mna.AddEquation(Vp, turns * Vs);
        }
Ejemplo n.º 3
0
 public override void Analyze(Analysis Mna)
 {
     // Unknown output current.
     Mna.AddTerminal(Cathode, Mna.AddUnknown("i" + Name));
     // V-[t] = V+[t - T], i.e. the voltage at the previous timestep.
     Mna.AddEquation(Anode.V.Evaluate(t, t - T), Cathode.V);
 }
Ejemplo n.º 4
0
 public static void Analyze(Analysis Mna, string Name, Node Input, Node Output)
 {
     // Unknown output current.
     Mna.AddTerminal(Output, Mna.AddUnknown("i" + Name));
     // Follow voltage.
     Mna.AddEquation(Input.V, Output.V);
 }
Ejemplo n.º 5
0
 public static void Analyze(Analysis Mna, string Name, Node Input, Node Output)
 {
     // Unknown output current.
     Mna.AddTerminal(Output, Mna.AddUnknown("i" + Name));
     // Follow voltage.
     Mna.AddEquation(Input.V, Output.V);
 }
Ejemplo n.º 6
0
 public static void Analyze(Analysis Mna, string Name, Node Anode, Node Cathode, Expression V)
 {
     // Unknown current.
     Mna.AddPassiveComponent(Anode, Cathode, Mna.AddUnknown("i" + Name));
     // Set the voltage.
     Mna.AddEquation(Anode.V - Cathode.V, V);
 }
Ejemplo n.º 7
0
 public override void Analyze(Analysis Mna)
 {
     // Unknown output current.
     Mna.AddTerminal(Cathode, Mna.AddUnknown("i" + Name));
     // V-[t] = V+[t - T], i.e. the voltage at the previous timestep.
     Mna.AddEquation(Anode.V.Evaluate(t, t - T), Cathode.V);
 }
Ejemplo n.º 8
0
 public static Expression Analyze(Analysis Mna, string Name, Node Anode, Node Cathode)
 {
     Expression i = Mna.AddUnknown("i" + Name);
     Mna.AddPassiveComponent(Anode, Cathode, i);
     Mna.AddEquation(Anode.V, Cathode.V);
     return i;
 }
Ejemplo n.º 9
0
 public static void Analyze(Analysis Mna, string Name, Node Anode, Node Cathode, Expression V)
 {
     // Unknown current.
     Mna.AddPassiveComponent(Anode, Cathode, Mna.AddUnknown("i" + Name));
     // Set the voltage.
     Mna.AddEquation(Anode.V - Cathode.V, V);
 }
Ejemplo n.º 10
0
        public static Expression Analyze(Analysis Mna, string Name, Node Anode, Node Cathode)
        {
            Expression i = Mna.AddUnknown("i" + Name);

            Mna.AddPassiveComponent(Anode, Cathode, i);
            Mna.AddEquation(Anode.V, Cathode.V);
            return(i);
        }
Ejemplo n.º 11
0
        public override void Analyze(Analysis Mna)
        {
            Expression Ip = Mna.AddUnknown("i" + Name + "p");
            Mna.AddPassiveComponent(pa, pc, Ip);
            Expression Isa = Mna.AddUnknown("i" + Name + "sa");
            Expression Isc = Mna.AddUnknown("i" + Name + "sc");
            Mna.AddTerminal(sa, -Isa);
            Mna.AddTerminal(sc, Isc);
            Mna.AddTerminal(st, Isa - Isc);
            Mna.AddEquation(Ip * turns, Isa + Isc);

            Expression Vp = pa.V - pc.V;
            Expression Vs1 = sa.V - st.V;
            Expression Vs2 = st.V - sc.V;
            Mna.AddEquation(Vp, Vs1 * turns * 2);
            Mna.AddEquation(Vp, Vs2 * turns * 2);
        }
Ejemplo n.º 12
0
 public override void Analyze(Analysis Mna)
 {
     // Infinite input impedance.
     Mna.AddPassiveComponent(Positive, Negative, 0);
     // Unknown output current.
     Mna.AddTerminal(Out, Mna.AddUnknown("i" + Name));
     // The voltage between the positive and negative terminals is 0.
     Mna.AddEquation(Positive.V, Negative.V);
 }
Ejemplo n.º 13
0
        public static Expression Analyze(Analysis Mna, string Name, Node Anode, Node Cathode, Expression L)
        {
            // Define a new unknown for the current through the inductor.
            Expression i = Mna.AddUnknown("i" + Name);
            Mna.AddPassiveComponent(Anode, Cathode, i);
            // V = L*di/dt
            Mna.AddEquation(Anode.V - Cathode.V, L * D(i, t));

            return i;
        }
Ejemplo n.º 14
0
        public override void Analyze(Analysis Mna)
        {
            Expression Ip = Mna.AddUnknown("i" + Name + "p");

            Mna.AddPassiveComponent(pa, pc, Ip);
            Expression Isa = Mna.AddUnknown("i" + Name + "sa");
            Expression Isc = Mna.AddUnknown("i" + Name + "sc");

            Mna.AddTerminal(sa, -Isa);
            Mna.AddTerminal(sc, Isc);
            Mna.AddTerminal(st, Isa - Isc);
            Mna.AddEquation(Ip * turns, Isa + Isc);

            Expression Vp  = pa.V - pc.V;
            Expression Vs1 = sa.V - st.V;
            Expression Vs2 = st.V - sc.V;

            Mna.AddEquation(Vp, Vs1 * turns * 2);
            Mna.AddEquation(Vp, Vs2 * turns * 2);
        }
Ejemplo n.º 15
0
        public static Expression Analyze(Analysis Mna, string Name, Node Anode, Node Cathode, Expression L)
        {
            // Define a new unknown for the current through the inductor.
            Expression i = Mna.AddUnknown("i" + Name);

            Mna.AddPassiveComponent(Anode, Cathode, i);
            // V = L*di/dt
            Mna.AddEquation(Anode.V - Cathode.V, L * D(i, t));

            return(i);
        }
Ejemplo n.º 16
0
 public override void Analyze(Analysis Mna)
 {
     // Unknown current.
     Mna.AddTerminal(Terminal, Mna.AddUnknown("i" + Name));
     // Set voltage equal to the rail.
     Mna.AddEquation(V, Voltage);
     // Add initial conditions, if necessary.
     Expression V0 = ((Expression)Voltage).Evaluate(t, 0);
     if (!(V0 is Constant))
         Mna.AddInitialConditions(Arrow.New(V0, 0));
 }
Ejemplo n.º 17
0
        public override void Analyze(Analysis Mna)
        {
            // Unknown current.
            Mna.AddTerminal(Terminal, Mna.AddUnknown("i" + Name));
            // Set voltage equal to the rail.
            Mna.AddEquation(V, Voltage);
            // Add initial conditions, if necessary.
            Expression V0 = ((Expression)Voltage).Evaluate(t, 0);

            if (!(V0 is Constant))
            {
                Mna.AddInitialConditions(Arrow.New(V0, 0));
            }
        }
Ejemplo n.º 18
0
 public override void Analyze(Analysis Mna)
 {
     // Infinite input impedance.
     Mna.AddPassiveComponent(Positive, Negative, 0);
     // Unknown output current.
     Mna.AddTerminal(Out, Mna.AddUnknown("i" + Name));
     // The voltage between the positive and negative terminals is 0.
     Mna.AddEquation(Positive.V, Negative.V);
 }