示例#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);
        }
示例#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);
        }
示例#3
0
 public static void Analyze(Analysis Mna, Node G)
 {
     // Nodes connected to ground have V = 0.
     Mna.AddEquation(G.V, 0);
     // Ground doesn't care about current.
     Mna.AddTerminal(G, null);
 }
示例#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);
 }
示例#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);
 }
示例#6
0
 public static void Analyze(Analysis Mna, Node G)
 {
     // Nodes connected to ground have V = 0.
     Mna.AddEquation(G.V, 0);
     // Ground doesn't care about current.
     Mna.AddTerminal(G, null);
 }
示例#7
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);
 }
示例#8
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);
 }
示例#9
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;
 }
示例#10
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);
 }
示例#11
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);
 }
示例#12
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);
        }
示例#13
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);
        }
示例#14
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);
 }
示例#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;
        }
示例#16
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);
        }
示例#17
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);
        }
示例#18
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));
 }
示例#19
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));
            }
        }
示例#20
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);
 }