analyzing a circuit with the node method – MATLAB

In a previous lab you were directed to use node-voltage analysis to find the voltages at all nodes in an electrical circuit.

The procedure for analyzing a circuit with the node method is summarized with the following steps.
1. Clearly label all circuit parameters and distinguish the unknown parameters from the known.
2. Identify all nodes of the circuit.
3. Select a node as the reference node also called the ground and assign to it a potential of 0 Volts. All other voltages in the circuit are measured with respect to the reference node.
4. Label the voltages at all other nodes.
5. Assign and label polarities.
6. Apply KCL at each node and express the branch currents in terms of the node voltages.
7. Solve the resulting simultaneous equations for the node voltages.
8. Now that the node voltages are known, the branch currents may be obtained using Ohm’s law.
The procedure for analyzing a circuit using the mesh-method is similar to that followed in the node-method and the various steps are given here.

1. Clearly label all circuit parameters and distinguish the unknown parameters from the known.
2. Identify all meshes of the circuit.
3. Assign mesh currents and label polarities.
4. Apply KVL at each mesh and express the voltages in terms of the mesh currents.
5. Solve the resulting simultaneous equations for the mesh currents.
6. Now that the mesh currents are known, the voltages may be obtained using Ohm’s law.

Thebasicprocedureis explained using the circuitshownintheFigure1.
Figure1:Examplecircuitformesh-currentanalysis.

a) Define a mesh current for each ‘window pane’ of the circuit

InFigure1,there are two window panes and thus two mesh currents, I1 and I2. Note that the direction of each mesh-current is in the clockwise direction. This is arbitrary but it helps maintain consistency to always define the mesh-currents in a clockwise direction.

b) Assign a reference node

Note that a reference node is designated in Figure 1. Since the definition of ground potential is fundamental in understanding circuits this is a good practice regardless of the method used in analysis.
c) Write a mesh equation for each mesh using KVL

Let’s consider each mesh separately and apply KVL around the loop following the defined direction of the mesh-current. Consider mesh1 in Figure 1. For clarity mesh1 is shown separately in Figure 2. In doing this, care must be taken to carry all information of the shared branches. In Figure 2, the direction of the mesh-current I2 is included as it is essential for the writing of an accurate KVL equation. Note also that the polarity of all voltages is clearly marked with respect to the direction of mesh-current I1.
Figure2:Sub-circuit for mesh1

The following equation is obtained when applying KVL to mesh1.

In similar fashion consider mesh2 shown in Figure 3. Note again that the direction of the mesh-current I1 is included. The polarity of all voltages in mesh2 is defined with respect to the direction of I2. Applying KVL to mesh2 results in the following equation.

Figure3:Sub-circuit for mesh2

d) Solveforunknownmesh currents

In matrix form the two mesh equations become:
The resulting matrix equation is easily solved for I1 and I2 using a calculator or computer aided tool.

e) Calculatebranch currents and node voltages

Once the mesh-currents are determined, any branch current or node voltage can be determined. For example consider the branch currents i1, i2, and i3 shown in Figure 4. Note that a lower case ‘i’ is being used for the branch currents to distinguish them from the mesh-currents I1 and I2. The branch currents are determined by the following equations.

i1 = I1
i2 = I1 – I2
i3 = I2
Figure4:Branch and Mesh Currents
Now consider the node voltages v1, v2, and v3 shown in Figure 5. These are easily determined using the branch currents that were just calculated.

v1 = Vs
v2 = i2R2
v3 = i3R4

Figure5:Node Voltages
In summary, the methods of node-voltage analysis and mesh-current analysis are powerful methods that can be used to analyze many different electrical networks. Determining node-voltages allows other circuit voltages, currents and powers to be calculated. In similar fashion, determining mesh-currents allows the calculation of other circuit values of interest. So given a free choice of which method to use, one needs to consider the number of equations for each method as well as the ease with which the equations can be developed. The purpose of this lab activity is to practice developing accurate matrix node-voltage equations or matrix mesh-current equations and solving them with a computer aided tool like Matlab. This computer aided solution method will then be confirmed using Multisim to model and analyze the same circuits.

OBJECTIVES

1. Perform mesh and nodal analysis of circuits.
2. Improve skills in developing mesh and nodal equations.
3. Determine nodal voltages and mesh currents using Matlab software.
4. Confirming the Matlab solution using Multisim.

EQUIPMENT REQUIRED

Computer facilities capable of applying Matlab and Multisim software.
PROCEDURE

First an example of how Matlab can easily solve a system of simultaneous equations.

1. Consider the following set of mesh-current equations:

I1 + 2I2 + 3I3 = 4
2I1 + 3I2 + 4I3 = 5
4I1 + 2I2 + 5I3 = 1

2. Use the Matlab Editor/Debugger to enter the following program. The lines beginning with a ‘%’ sign are comments and ignored by the Matlab compiler. The purpose of the data file: ‘lab5.dat’ is to store all output from the execution of the Matlab program so it is available for processing or reporting later.

%This example program solves for mesh currents I1, I2 and I3
%open data file
diarylab5.dat
%Defines the coefficient matrix A (resistances in the case of
%mesh-current analysis) Each row of coefficients is delimited
%by a semicolon.
A=[1, 2, 3; 2, 3, 4; 4, 2, 5];
%defines the vector B (the right hand side of the matrix eq.)
B=[4; 5; 1];
%Two different ways to solve the matrix eq. are shown.
I=A^-1*B
%or
I=inv(A)*B
%close data file
diary

3. Run the program and the output will display in Matlab’s command window. The output will also be saved in the .dat file. The output should be similar to what is shown here.

I =
-1.4000
1.8000
0.6000
I =
-1.4000
1.8000
0.6000

4. Now it is your turn. Develop the matrix equation necessary to solve for the mesh currents in the circuit of Figure 6. Modify the example Matlab program to solve the matrix equation. Document your Matlab results.

Use the Matlab results to compute all branch currents(i.e., the current through each resistor) and all node voltages. These computations will be compared to Multisim analysis in step 6.
Figure 6

5. The same process can be used to determine the nodal equations for the circuit of Figure 7. Solve for V1, V2, and V3 using MATLAB software. Document your results.

Figure 7

6. Model the circuits in Figures 6 and 7 using Multisim. Perform a DC operating point analysis. Document your results showing all branch currents and all node voltages for each circuit.

7. Create two Data Tables, one for each circuit, showing a comparison of Matlab and Multisim results. They should be in agreement. If not, resolve any discrepancies.
WRITTEN REPORT

No formal report is required. Turn in the following items.
1. Cover page
2. Documented Matlab results for each circuit
3. Multisim results for each circuit presented in a neat tabular fashion.
4. The data tables from step 7.
5. A short discussion of the perceived value of tools like Matlab and Multisim.

Are you looking for a similar paper or any other quality academic essay? Then look no further. Our research paper writing service is what you require. Our team of experienced writers is on standby to deliver to you an original paper as per your specified instructions with zero plagiarism guaranteed. This is the perfect way you can prepare your own unique academic paper and score the grades you deserve.

Use the order calculator below and get ordering with idealtermpapers.com now! Contact our live support team for any assistance or inquiry.

Type of paper Academic level Subject area
Number of pages Paper urgency Cost per page:
 Total:

Purchase Guarantee

Why ORDER at IdealTermPapers.com?

  • Educated and experienced writers.
  • Quality, Professionalism and experience.
  • Original Content writing.
  • Best customer support.
  • Affordable Pricing on orders.
  • Thorough research.
  • Ontime delivery of finished work.
  • 100% plagiarism free papers.

Reasonable Prices

  • To get the best quality papers isn’t cheap so don’t trust extremely low prices.
  • We can’t claim that we have unreasonably low prices because low prices equal to low quality.
  • Our prices are good and they balance with the quality of our work.
  • We have a Moneyback guarantee.

Original and Quality work

  • Our writers are professionals and they write your paper from scratch and we don’t encourage copy pasting.
  • All writers are assessed and they have to pass our standards for them to work with us.
  • Plagiarism is an offence and it’s never tolerated in our company.

Native Writers plus Researchers

  • Our writers are qualified and excellent and will guarantee the best performance in your order.
  • Our team has writers who have master's and PhD qualifications who can handle any assignment
  • We have the best standards in essay writing.

We have been in business for over 7 syears

  • We have always served our customers from all over the world and they have continued to order with us.
  • We value our customers since they have trusted us to do their assignments.
  • We are competent in our writing gained from experience over the years
  • Our company has 24/7 Live Support.

You will get

  •  Custom Admission Essay written by competent professional English writers.
  •  Free revisions according to our revision policy if required
  •  Paper format:  275 words per page, Times New Roman font and size 12, doublespaced text and1 inch margin
  •  On time delivery and direct order download
  •  Privacy guaranteed

We can help you:

  •  acquire a comprehensive professional presentation.
  •  get a unique and remarkable content as per your instructions.
  •  Get an additional portion that can be included to your existing presentation;
  •  turn your work in to an eyecatching presentation with well communicated ideas.
  •  improve your presentation to acquire the best professional standards.