Esempio 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);
        }
Esempio 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);
        }
Esempio 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);
 }
Esempio 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);
 }
Esempio 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);
 }
Esempio 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);
 }
Esempio 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);
 }
Esempio 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;
 }
Esempio 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);
 }
Esempio 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);
        }
Esempio 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);
        }
Esempio 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);
 }
Esempio 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;
        }
Esempio 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);
        }
Esempio 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);
        }
Esempio 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));
 }
Esempio 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));
            }
        }
Esempio 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);
 }