assigment g10 ec latest

Upload: daus-villa

Post on 05-Apr-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/31/2019 Assigment g10 Ec Latest

    1/20

    UNIVERSITI TEKNIKAL MALAYSIA MELAKA

    FAKULTI TEKNOLOGI KEJURUTERAAN

    ELECTRIC CIRCUIT 2

    BTNT 1023

    GROUP ASSIGNMENT :

    PSPICE AND MATLAB

    LECTURER :

    ENCIK MOHD FAUZI BIN AB RAHMAN

    PREPARED BY :

    MOHAMMAD FIRDAUS BIN NORAZMAN B 071110213

    HIFDZUL MALIK BIN ZAINAL B 071110202

    AZWAN BIN MUHAMAD B 071110396

    ELLYANA SHAIRA BINTI ABD AZIZ B 071110236

  • 7/31/2019 Assigment g10 Ec Latest

    2/20

    1.0 TITLEGroup Assignment : Electric Circuit

    2.0 OBJECTIVE To analyze the given circuits using the specific software in order to identify the

    required needs.

    To familiarize PSPICE and MATLAB function by doing a circuit simulationon certain circuit analysis.

    3.0 EQUIPMENTS PSPICE MATLAB

    4.0 REQUIREMENTS

    1. The circuits were analyzed by using the specific software that mention in thequestions and the comparison between manual calculation and software

    analysis were done.

    2. The report were including the manual calculation, print screen of softwareanalysis and the comparison. The report were submitted in hardcopy as well.

    3. The software analysis and report were submitted in CD.

  • 7/31/2019 Assigment g10 Ec Latest

    3/20

    5.0 QUESTIONS AND ANSWERS

    1)The switch in Figure 1 has been in position 1 for a long time. At t= 0, it isswitched to position 2. Use Pspice to find i(t) for 0

  • 7/31/2019 Assigment g10 Ec Latest

    4/20

    Result

    **** 05/30/12 02:42:53 ******* PSpice Lite (April 2011) ******* ID# 10813 ****

    ** Profile: "SCHEMATIC1-SOLAN 1" [ C:\OrCAD\OrCAD_16.5_Lite\tools\capture\tes-

    PSpiceFiles\SCHEMATIC1\SOLAN 1.sim ]

    **** CIRCUIT DESCRIPTION

    ******************************************************************************

    ** Creating circuit file "SOLAN 1.cir"

    ** WARNING: THIS AUTOMATICALLY GENERATED FILE MAY BE OVERWRITTEN BY

    SUBSEQUENT SIMULATIONS

    *Libraries:

    * Profile Libraries :

    * Local Libraries :

    * From [PSPICE NETLIST] section of C:\OrCAD\OrCAD_16.5_Lite\tools\pspice\PSpice.ini file:

    .lib "nomd.lib"

    *Analysis directives:

    .DC LIN V_V1 0 0.2 1

    .PROBE V(alias(*)) I(alias(*)) W(alias(*)) D(alias(*)) NOISE(alias(*))

    .INC "..\SCHEMATIC1.net"

    **** INCLUDING SCHEMATIC1.net ****

    * source TES

    R_R1 N00208 N00215 4k TC=0,0

    R_R2 N00215 N00271 1k TC=0,0

    R_R3 0 N00215 2k TC=0,0

    L_L1 N00271 0 100m

    C_C1 N00625 0 100u

    V_V1 N00208 0 10Vdc

    X_U1 N00625 N00215 Sw_tClose PARAMS: tClose=0.2 ttran=1u Rclosed=0.01

  • 7/31/2019 Assigment g10 Ec Latest

    5/20

    + Ropen=1Meg

    V_PRINT1 N00215 0 0V

    .PRINT TRAN I(V_PRINT1)

    **** RESUMING "SOLAN 1.cir" ****

    .END

    **** 05/30/12 02:42:53 ******* PSpice Lite (April 2011) ******* ID# 10813 ****

    ** Profile: "SCHEMATIC1-SOLAN 1" [ C:\OrCAD\OrCAD_16.5_Lite\tools\capture\tes-

    PSpiceFiles\SCHEMATIC1\SOLAN 1.sim ]

    **** Voltage Controlled Switch MODEL PARAMETERS

    ******************************************************************************

    X_U1.Smod

    RON .01

    ROFF 1.000000E+06

    VON 1

    VOFF 0

    JOB CONCLUDED

    *** 05/30/12 02:42:53 ******* PSpice Lite (April 2011) ******* ID# 10813 ****

    ** Profile: "SCHEMATIC1-SOLAN 1" [ C:\OrCAD\OrCAD_16.5_Lite\tools\capture\tes-

    PSpiceFiles\SCHEMATIC1\SOLAN 1.sim

    **** JOB STATISTICS SUMMARY

    ******************************************************************************

    Total job time (using Solver 1) = 0.00

    Conclusion Question 1

    The switch in Figure 1 has been in position 1 for a long time. At t= 0, it is switched to

    position 2. By using Pspice we find i(t) for 0 < t< 0.2 s. We had set the start value by o,

    end value 0.2 and the increment is 1. Circuit description explains all about the circuit after it run

    successfully.

  • 7/31/2019 Assigment g10 Ec Latest

    6/20

    2)Use PSpice to find vo(t) in the circuit if Figure 2. Let is = 2 cos(103t) A.

    Figure 2

    PSpice Schematic

  • 7/31/2019 Assigment g10 Ec Latest

    7/20

    Simulation settings

    Simulation Result

  • 7/31/2019 Assigment g10 Ec Latest

    8/20

    Simulation Output:

    **** 05/30/12 04:28:53 ********* PSpice 9.1 (Mar 1999) ******** ID# 0 ********

    ** circuit file for profile: Q2 Zul

    **** CIRCUIT DESCRIPTION

    ** WARNING: THIS AUTOMATICALLY GENERATED FILE MAY BE

    OVERWRITTEN BY SUBSEQUENT PROFILES

    *Libraries:

    * Local Libraries :

    * From [PSPICE NETLIST] section of pspice91.ini file:

    .lib "nom.lib"

    *Analysis directives:

    .AC DEC 1 159.15 159.15

    .PROBE

    .INC "esaimen q2-SCHEMATIC1.net"

    **** INCLUDING "esaimen q2-SCHEMATIC1.net" ****

    * source ESAIMEN Q2

    C_C1 0 N00052 4uF

    L_L1 0 N00060 10mH

    R_R1 N00052 N00025 2

    R_R2 N00060 N00025 6

    R_R3 N00052 N00060 8

    R_R4 0 N00025 4

    I_Is N00025 0 DC 0Adc AC 2Aac

    .PRINT AC+ VM([N00052])

    + VP([N00052])

    **** RESUMING "esaimen q2-SCHEMATIC1-Q2 Zul.sim.cir" ****

    .INC "esaimen q2-SCHEMATIC1.als"

    **** INCLUDING "esaimen q2-SCHEMATIC1.als" ****

    .ALIASES

    C_C1 C1(1=0 2=N00052 )

  • 7/31/2019 Assigment g10 Ec Latest

    9/20

    L_L1 L1(1=0 2=N00060 )

    R_R1 R1(1=N00052 2=N00025 )

    R_R2 R2(1=N00060 2=N00025 )

    R_R3 R3(1=N00052 2=N00060 )

    R_R4 R4(1=0 2=N00025 )

    I_Is Is(+=N00025 -=0 )

    .ENDALIASES

    **** RESUMING "esaimen q2-SCHEMATIC1-Q2 Zul.sim.cir" ****

    .END

    **** SMALL SIGNAL BIAS SOLUTION TEMPERATURE = 27.000 DEG C

    NODE VOLTAGE NODE VOLTAGE NODE VOLTAGE NODE

    VOLTAGE

    (N00025) 0.0000 (N00052) 0.0000 (N00060) 0.0000

    VOLTAGE SOURCE CURRENTS

    NAME CURRENT

    TOTAL POWER DISSIPATION 0.00E+00 WATTS

    **** AC ANALYSIS TEMPERATURE = 27.000 DEG C

    FREQ VM(N00052) VP(N00052)

    1.592E+02 6.638E+00 -1.600E+02

    JOB CONCLUDED

    TOTAL JOB TIME 1.22

    Conclusion Question 2

    Question 2 are also need to be solve by using PSpice in order to find Vo(t) in the circuit of

    Figure 2. Then, is = 2 cos(103t) A. this time we set the start value by 159.15, end value

    159.15 and the decade is 1.

  • 7/31/2019 Assigment g10 Ec Latest

    10/20

    3)Determine Vo and Io in the circuit of Figure 3 using MATLAB by applyingmesh analysis.

    Figure 3

    Calculation

    1 I3 = 4 -30

    VO = 2 (I3I1)

    = 2I3 -2I1 2

    Substitute 1 into 2:

    VO = 2 (I3- I1)

    = 2I3- 2I1

    = 2 (4 -30)2I1

    = (8 -30)2I13

    For Mesh 1 :

    3VO + 2 (I1- I3) + j4I1 = 0 4

    Substitute 1 and 3 into equation 4 :

    3VO + 2 (I1 - I3) + j4I1 = 0

    3[(8 -30)2I1] + 2I12(4 -30) + j4I1 = 0

    (24 -30)6I1 + 2I1(8 -30) + j4I1 = 0

    -4I1 + j4I1 + (16 -30) = 0

    (4 - j4)I1 = 16 -30

  • 7/31/2019 Assigment g10 Ec Latest

    11/20

    For Mesh 2 :

    -3VOj2IO = 0

    - j2IO = 3VO

    - j2IO = 3[(8 -30)2I1)

    - j2IO = (24 -30)6I1

    6I1j2IO = 24 -30

    To use Cramers Rule, equation 5 and 6 in matrix form as :

    4j4 0 I1 16 -30

    6 - j2 IO 24 -30

    Obtain the determinants :

    = 4j4 0

    6 - j2

    = (4j4)(-j2)(0)(6)

    = -8j8

    = 11.31 -135

    1 = 16 -30 0

    24 -30 - j2

    = (16 -30)(-j2)(0)(24 -30)

    = -16j27.71

    = 32 -120

    O = 4j4 16 -30

    6 24 -30

    = (4j4)(24 -30)(6)(16 -30)

    = -48j83.14

    = 96 -120

    =

  • 7/31/2019 Assigment g10 Ec Latest

    12/20

    Thus :

    I1=

    =

    = 2.733 + j0.732 A

    = 2 15 A

    IO =

    =

    = 8.199 + j2.197 A

    = 8.49 15 A

    So,

    -3VOj2IO = 0

    - j2IO = 3VO

    VO =

    =

    = 1.465j5.467 V

    = 5.66 -75 V

  • 7/31/2019 Assigment g10 Ec Latest

    13/20

    Software analysis

    Comparison between calculation and analysis

    CALCULATION MATLAB

    I1 (A) 2.733 + j0.732

    2 15

    0.7325 + 2.7325i

    2 75

    IO (A) 8.199 + j2.197

    8.49 15

    2.1975 + 8.1925i

    8.48 75

    VO (V) 1.465j5.467

    5.66 -75

    5.4617 - 1.4650i

    5.65 -15

    Table 1

  • 7/31/2019 Assigment g10 Ec Latest

    14/20

    Conclusion Question 3

    For Question 3, we are needed to determine the IO and VO in the circuit. Then

    we had applied mesh analysis to calculate the IO and VO. Firstly, we draw three loop

    in this circuit. We assigned mesh currents. We labelled it as I1, IO and I3. For I3, it

    have given there that is 4 -30 A. After that, applied KVL to each of the meshes.

    At this part, use Ohms Law to express the voltages in terms of the mesh currents.

    Next, solve the resulting simultaneous equation to get the mesh currents. For this

    circuit, it has two equations. To get the mesh currents, it has some method. The first

    method is by using the substitution method and the second method is by using

    Cramers Rule. We were using Cramers Rule to solve the equation. To use

    Cramers Rule, we cast equation 5 and 6 in matrix form. After we get the current

    and voltage value by using calculation method, we simulate it by using MATLAB

    software. Lastly, we compared the value with calculation and MATLAB in Table 1.

    In Table 1 show the value of current and voltage for both method. The value for

    both method are same but difference degree.

  • 7/31/2019 Assigment g10 Ec Latest

    15/20

    4)Determine the wattmeter reading of the circuit in Figure 4. (Applicationquestion, no software needed)

    Figure 4

    = 100,

    10mH j100x10x = j

    500uF

    =

    = -

    j20

    The frequencydomain circuit is shown below

    Figure 4

  • 7/31/2019 Assigment g10 Ec Latest

    16/20

    At node 2,

    +

    =

    0 =(20+j)V1(19+j)V2

    Solving (1) and (2) yields

    V1= 1.5568j 4.1405

    I =

    = 0.2111 + j 0.1035 , S =

    V1 * I = - 0.04993j 0.5176

    P = Re (S) = 50 mW

    Conclusion Question 4

    This question needs us to determine the wattmeter reading of the circuit in Figure 4. This

    time, no software needed. We had constructed the frequency domain circuit. Next, we

    make a calculation at node 2. Finally we get the answer, P = Re (S) = 50 mW.

  • 7/31/2019 Assigment g10 Ec Latest

    17/20

    5)Use PSpice to generate the magnitude and phase Bode plots ofVo in the circuitof Figure 5

    Figure 5

    PSpice Schematic

  • 7/31/2019 Assigment g10 Ec Latest

    18/20

    Magnitude Bode Plots

    Phase Bode Plots

    Conclusion Question 5

    For this question, we had use PSpice to generate the magnitude and phase Bode

    plots ofVo in the circuit of Figure 5. Bode plots are really log-log plots, so they collapse a

    wide range of frequencies (on the horizontal axis) and a wide range of gains (on the

    vertical axis) into a viewable whole. As we know bode plots is a plots of frequency

    response. Gain and phase are displayed in separate plot. To get the phase bode plot, we

    need to add p to the equation in magnitude bode plots.

  • 7/31/2019 Assigment g10 Ec Latest

    19/20

    6.0 DISCUSSION:

    Bode magnitude of the system response in absolute units, returned as a 3-D array

    with dimensions (number of outputs) (number of inputs) (number of frequency points).

    For a single-input, single-output (SISO) sys, mag(1,1,k) gives the magnitude of the

    response at the kth frequency. For MIMO systems, mag(i,j,k) gives the magnitude of the

    response from the jth input to the ith output. We can convert the magnitude from absolute

    units to decibels using:

    magdb = 20*log10(mag)

    In Pspice, if the library is not available, you need to add the library, by clicking on

    the Add Library button. This will bring up the Add Library window. Select the desired

    library. For Spice you should select the libraries from the Capture/Library/PSpice folder.

    Analog: contains the passive components (R,L,C), mutual inductane, transmission line, and

    voltage and current dependent sources (voltage dependent voltage source E, current-

    dependent current source F, voltage-dependent current source G and current-dependent

    voltage source H).

    Source: give the different type of independent voltage and current sources, such as

    Vdc, Idc, Vac, Iac, Vsin, Vexp, pulse, piecewise linear, etc. Browse the library to

    see what is available.

    Eval: provides diodes (D), bipolar transistors (Q), MOS transistors, JFETs

    (J), real opamp such as the u741, switches (SW_tClose, SW_tOpen), various

    digital gates and components.

    Abm: contains a selection of interesting mathematical operators that can be applied

    to signals, such as multiplication (MULT), summation (SUM), Square Root

    (SWRT), Laplace (LAPLACE), arctan (ARCTAN), and many more.Special: contains a variety of other components, such as PARAM, NODESET and

    others.

    Spice allows us to do a DC bias, DC Sweep, Transient with Fourier analysis, AC analysis,

    Montecarlo/worst case sweep, Parameter sweep and Temperature sweep.

  • 7/31/2019 Assigment g10 Ec Latest

    20/20

    We are also use MATLAB in this assigment, the MATLAB application is built

    around the MATLAB language, and most use of MATLAB involves typing MATLAB

    code into the Command Window (as an interactive mathematical shell), or executing text

    files containing MATLAB code and functions. Then, the variables are defined using the

    assignment operator, =. MATLAB is a weakly programming language. It is a weakly typed

    language because types are implicitly converted. It is a dynamically typed language

    because variables can be assigned without declaring their type, except if they are to be

    treated as symbolic objects, and that their type can change.

    7.0 CONCLUSION:

    Finally, after finishing this assignment, students are now able to analyze the given

    circuits using the specific software in order to identify the required output or result needs.

    After that, students are also able to familiarize with PSPICE and MATLAB software with

    the function by doing a circuit simulation on certain circuit analysis. Other than that, while

    we finishing this assignment there are some problem appear when we want to construct the

    circuit, but as an engineering student we had learn on how to troubleshoot and solve the

    problem. Lastly, we had finished this assignment successfully.