Electrical Networks Lab Manual PDF
Document Details
Uploaded by BenevolentKyanite2339
NIT Warangal
Tags
Related
- RLC Series Circuits Experiment PDF
- A400M Training Manual ATA 24 Electrical Power System PDF Nov 2020
- Balanço de Potência Redes de Distribuição de Energia Eléctrica em Baixa Tensão PDF
- Desenhos de circuitos / Estrutura de distribuição PDF
- Einfache elektrische Netzwerke (Kl. 1_3 PDF)
- Resolución ARCONEL-018/18 (PDF)
Summary
This document is a lab manual covering electrical networks. It includes experiments on topics such as KVL, KCL, Tellegen's theorem, Z-parameters, Y-parameters, and transient analysis and is for an undergraduate level course.
Full Transcript
# NITW/EED/EE305 Circuits Lab ## Experiment No: 1 **A)** KVL & KCL: Verification of KCL and KVL and Tellegen's Theorem **Aim:** To verify Kirchhoff's voltage law, Kirchhoff's current law for a given DC network. **Apparatus** | S.NO. | Equipment Name | Type | Range | Quantity | |---|---|---|---|...
# NITW/EED/EE305 Circuits Lab ## Experiment No: 1 **A)** KVL & KCL: Verification of KCL and KVL and Tellegen's Theorem **Aim:** To verify Kirchhoff's voltage law, Kirchhoff's current law for a given DC network. **Apparatus** | S.NO. | Equipment Name | Type | Range | Quantity | |---|---|---|---|---| | 1 | Voltmeter | MC | (0-30) V | 1 | | 2 | Ammeter | MC | (0-250) mA | 1 | | 3 | RPS (Regulated Power Supply) | DC | (0-30) V | 1 | | 4 | Connecting wires | | | Required No. | **Circuit diagram:** A diagram with the following components: - 25V DC Source - 347 ohm resistor - 338.8 ohm resistor - 870 ohm resistor - 469 ohm resistor - 861 ohm resistor - 229.3 ohm resistor - 3 ammeters - 4 voltmeters **Procedure** 1. Connect the circuit as shown in the figure. 2. Set the supply voltage to 25 V with help of RPS. 3. Measure the voltage drop across each resistor in loop - 1 and verify KVL theoretically and practically. 4. Measure inward and outward currents at junction 'A' and verify KCL theoretically and practically. 5. Tabulate the values by comparing theoretical and practical values. **Observations:** | S.NO. | Name of the Measured Parameter | Theoretical Value | Practical Value | |---|---|---|---| | 1 | I1(A) | | | | 2 | I2(A) | | | | 3 | I3(A) | | | | 4 | V1(V) | | | | 5 | V2(V) | | | | 6 | V3(V) | | | **Precautions** 1. Connection should be tight. 2. Throughout the experiment, the supply should be maintained constant. 3. While connecting the voltmeter and ammeter, connections should be given properly and a suitable range is to be selected. **Discussion and Conclusions** ## Experiment No: 2 **B)** Tellegen's Theorem **Aim:** Determine V₁ and I₁' using Tellegen's Theorem for a given DC network. **Apparatus** | S.NO. | Equipment Name | Type | Range | Quantity | |---|---|---|---|---| | 1 | Voltmeter | MC | (0-30) V | 1 | | 2 | Ammeter | MC | (0-250) mA | 1 | | 3 | RPS (Regulated Power Supply) | DC | (0-30) V | 1 | | 4 | Connecting wires | | | Required No. | **Circuit diagram:** **Network-1** A diagram with the following components: - 10V DC Source - 3 resistors (R1, R2, R3) - 1 ammeter - 1 voltmeter labeled with VL **Network-2** A diagram with the following components: - 20V DC Source - 3 resistors (R1, R2, R3) - 1 ammeter - 1 voltmeter labeled with VA **Procedure** 1. By applying Tellegen's Theorem and using the data given in Network 1 & 2, determine Vi^ and IL' as shown in figure-2. 2. Connect the network - 2 as shown in figure. 2 and set the supply voltage to 20 V with the help of RPS. 3. Measure the voltage drop (VL^) across 870 Ω resistor using voltmeter, and then verify it theoretically and practically. 4. Measure IL^ using ammeter in series with 870 Ω resistor. 5. Tabulate the theoretical and practical values. **Observations:** | S.NO. | Name of the Measured Parameter | Theoretical Value | Practical Value | |---|---|---|---| | 1 | VL^:(V) | | | | 2 | IL^(A) | | | **Precautions** 1. Connection should be tight. 2. Throughout the experiment the supply should be maintained constant. 3. While connecting the voltmeter and ammeter, connections should be given properly and a suitable range is to be selected. **Discussion and Conclusions** ## Experiment No: 3 **Determination of Z, Y - Parameters of TWO-PORT Networks** **Aim:** Determine Z, Y parameters of a given two port T - network, n-network, and parallel connection of T & networks. **Apparatus:** | S.NO. | Equipment Name | Type | Range | Quantity | |---|---|---|---|---| | 1 | Voltmeter | MC | (0-30) V | 1 | | 2 | Ammeter | MC | (0-250) mA | 1 | | 3 | RPS (Regulated Power Supply) | DC | (0-30) V | 1 | | 4 | Resistors | Carbon composition | | | | 5 | Connecting wires | | | Required No. | **Circuit Diagram:** - **π Network:** - A diagram with a 10V DC source, 3 resistors (326 ohm, 475 ohm, 498 ohm), and 2 ammeters. - **T Network:** - A diagram with a 10V DC source, 3 resistors (108.9 ohm, 110 ohm, 910 ohm), and 2 ammeters. - **Parallel Connection:** - A diagram with a 10V DC source, 5 resistors (328 ohm, 108.9 ohm, 110 ohm, 475 ohm, 498 ohm), and 2 ammeters. **Procedure:** **Open circuit test:** 1. The connections are made as shown in the circuit diagram, and the RPS is kept at the zero volts position. 2. With the port 2 open, the RPS is set to the required output voltage of 15V and the values of I1, V1, and V2 are noted down. 3. The values of Z11 and Z21 are determined. 4. With the port 1 open, the RPS is connected to the second port and set to 15V, and the values of V2, V1, and I2 are noted down. 5. The values of Z22 and Z12 are calculated. **Short circuit test:** 1. The circuit is connected with the port 1 short circuited, and the RPS is connected to the second port. 2. RPS is set to 15V, and the values of V2, I2, and I1 are noted down. In this case, the values of I1 should be taken negative. 3. The values of Y12 and Y22 are calculated. 4. Now the circuit is connected with the port 2 short circuited, and RPS is connected to the port 1 for 15V, and the values of V1, I1 and I2 are noted down. 5. From these readings, the values of Y11 and Y21 are calculated. 6. The results are then checked theoretically and practically to verify whether the given system is reciprocal or not. **Precautions** 1. While using the RPS, the current knob should be kept at the max position, and the voltage knob should be kept at the min position before it is switched on. 2. Connections should be given properly without any loose contact. **Observations:** - **Port 2 open:** | S.NO. | V1 | I1 | V2 | Z11=V1/I1 | Z21=V2/I1 | |---|---|---|---|---|---| | 1 | 15 V | | | | | - **Port 1 open:** | S.NO. | V2 | I2 | V1 | Z22=V2/I2 | Z12=V1/I2 | |---|---|---|---|---|---| | 1 | 15 V | | | | | - **Port 1 short:** | S.NO. | V1 | I1 | V2 | Z11=V1/I1 | Z21=V2/I1 | |---|---|---|---|---|---| | 1 | 15 V | | | | | - **Port 2 short:** | S.NO. | V1 | I2 | I1 | Y22=I2/V2 | Y12=I1/V2 | |---|---|---|---|---|---| | 1 | 15 V | | | | | **Calculations:** Verify the following: 1. Z12=Z21 2. Z11 = Z22 3. Y11 = Y22 4. Y12=Y21 5. [Z][Y]=1 **Discussion and Conclusions** ## Experiment No: 4 **Time Response Analysis of First-Order RC Circuit and Second-Order RLC Circuit** **Aim:** - To study the response of 1st-order RC circuit and 2nd-order RLC circuit. - For 2nd-order RLC circuit find damping factor, Q-factor, bandwidth, Transfer function. **Apparatus:** | S.NO. | Name of the Equipment | Type | Range | Quantity | |---|---|---|---|---| | 1 | CRO | | | 1 | | 2 | Function Generator | | (0-10) MHz | 1 | | 3 | Resistor | Carbon Composition | (0-1) kΩ | 1 | | 4 | Inductor | Coil | 0.1 H | 1 | | 5 | Capacitor | Ceramic | 0.1 µF | 1 | | 6 | Connecting wires | | | Required No. | **Circuit Diagram:** - **Series RC circuit:** - A diagram with a function generator, 100 ohm resistor, and 0.1µF capacitor. - **Series RLC circuit:** - A diagram with a function generator, 100 ohm resistor, 5000 ohm resistor, 0.1H inductor, and 0.1µF capacitor. **Procedure:** **First order RC response** 1. Connect as per circuit diagram. 2. Keep the signal generator on with a square waveform (in the 300 Hz range). 3. Before you switch on the supply to the signal generator and the CRO: - The operating switch of the CRO is kept at the ground position. - Probe is connected to V, and the mono mode is selected. - The horizontal extension button is pressed. - Now the supply is given to the CRO, and X-shift and Y-shift both are adjusted to get the electron beam spot on the screen. 4. Now the probe terminals are connected to the output terminals of the signal generator, and the supply is switched on. Then the operational switch is put in the AC mode, and the square waveform is formed on the screen. Necessary adjustments are done to get a stable square waveform. 5. Now the CRO probe terminals are connected across the capacitor, and the signal generator output terminals are connected at the input of the RC network. 6. Observe and draw the response curve of the RC network by varying the resistance R. **Second order response** 1. The CRO is set to the initial settings. 2. Probe terminals are connected across the capacitor, and the signal generator output terminals at the input of the RLC network. 3. By varying the resistance (R) from minimum to maximum value and note down the corresponding resistance (R), % peak measured value, and calculated. **Observation Table:** | S.NO. | Variable | RTotal | Inductance (H) | Capacitance (F) | Damping Ratio (ζ) | % MP Calculated | % MP Measured | |---|---|---|---|---|---|---|---| | | | | | | | | | **Calculations for RLC series circuit:** 1. Overshoot = Peak Value of o/p - i/p peak value 2. Compute 8 (damping ratio) from δ= -πδ/ √(1-δ^2) 3. Damping frequency ωd = ωn√(1-δ^2) 4. Q-factor = 1/(2δ) 5. Bandwidth = ωn/Q 6. Time constant T = 1/(δ* ωn) 7. Transfer function = ωn^2/(s^2+2ζωns+ωn^2) **Graph:** - Plot graph for step response for various values of resistances. **Precautions:** 1. While changing the resistance from minimum to critical, it should be changed by observing the waveform on CRO else we will enter the over damped response. 2. CRO and function generator should be handled carefully. **Discussion and Conclusions:** ## Experiment No: 5 **Frequency Response Analysis of RLC Series Circuit** **Aim:** To study the frequency response of the RLC series circuit and determine the resonant frequency, half power frequencies, bandwidth, and quality factor. **Apparatus required:** 1. Resistor (R)= 100 ohm 2. Inductance coil L=100mH, internal resistance R₁=500 Ω. 3. Capacitor- 100 nF 4. Patch chords **Circuit diagram:** A diagram with a function generator, 100 ohm resistor, 5000 ohm resistor, 0.1H inductor, and 0.1µF capacitor. **Procedure:** 1. Connect the circuit as per the circuit diagram. 2. Select a sine wave of 2V amplitude at 50Hz on the signal generator, and connect the input terminals of function generator to the RLC circuit. 3. The input voltage V; of 2'V across RLC series elements is maintained constant throughout the experiment. 4. Slowly vary the sine wave frequency from 1 KHz to 2.4 KHz, and observe the resonance condition using input and voltage across resistance. 5. At resonance, these two are in phase, and identify the corresponding resonance frequency. 6. Calculate and tabulate the values. **Precautions:** 1. Signal generator is kept at zero volt position before starting or switching on the supply. 2. Input voltage across RLC elements is to be maintained constant throughout the experiment. **Tabular column:** | S.NO. | f (Hz) | L(mh) | X₁ | Xc | RT = RCRO + R+ R₁ | Z = R++ iX | Calculated current | Measured Current | |---|---|---|---|---|---|---|---|---| | 1 | 1000 | 103 | | | 650 | | | | | 2 | 1100 | 100 | | | 650 | | | | | 3 | 1200 | 97 | | | 650 | | | | | 4 | 1300 | 95 | | | 650 | | | | | 5 | 1400 | 93 | | | 650 | | | | | 6 | 1500 | 91 | | | 650 | | | | | 7 | 1600 | 90 | | | 650 | | | | | 8 | 1680 | 90 | | | 650 | | | | | 9 | 1700 | 88 | | | 650 | | | | | 10 | 1800 | 87 | | | 650 | | | | | 11 | 1900 | 86 | | | 650 | | | | | 12 | 2000 | 85 | | | 650 | | | | | 13 | 2100 | 84 | | | 650 | | | | | 14 | 2200 | 83 | | | 650 | | | | | 15 | 2300 | 82 | | | 650 | | | | | 16 | 2400 | 81 | | | 650 | | | | **Calculations:** 1. Resonant frequency f0 = 1/(2*π*√LC) 2. Bandwidth = f2-f1, where f2, f1 are frequencies at current Imax/2 3. Quality Factor Q = f0/(f2-f1) 4. Selectivity = 1/Q **Graphs** - Graphs are plotted between I(mA) v/s frequency **Discussions and conclusions:** ## Experiment No: 6 **Analysis of Series and Parallel Coupled Circuits** **Aim:** To determine the self-inductance (L), mutual inductance (M) and coefficient coupling (K) of inductive coil **Apparatus:** | S.NO. | Equipment Name | Type | Range | Quantity | |---|---|---|---|---| | 1 | Voltmeter | MI | (0-150) V | 1 | | 2 | Ammeter | MI | (0-5)A | 1 | | 3 | Auto Transformer | Variac | (0-270) V | 1 | | 4 | Resistors | Wire Wound | (0 – 40) Ω, 3.5 A | 1 | | 5 | Inductive Coil | Core: Cylinder | 7mH, 29mH, 48mH, 50mH, 172mH | 1 | | 6 | Capacitor | | 16.5 µF | 1 | | 7 | Connecting wires | | | | **Circuit Diagram:** **A) self-inductance, mutual inductance and coefficient of coupling:** - **Self-Inductance:** - A diagram with an auto-transformer, a MI (0-5)A ammeter, and coil 1. Also, a MI (0-150)V voltmeter. - **Inductive coils in series aiding:** - A diagram with an auto-transformer, a MI (0-5)A ammeter, a MI (0-150)V voltmeter, coil 1, and coil 2. - **Inductive coils in series opposing:** - A diagram with an auto-transformer, a MI (0-5)A ammeter, a MI (0-150)V voltmeter, coil 1, and coil 2. - **Inductive coils in parallel aiding:** - A diagram with an auto-transformer, a MI (0-5)A ammeter, a MI (0-60)V voltmeter, coil 1, and coil 2. - **Inductive coils in parallel opposing:** - A diagram with an auto-transformer, a MI (0-5)A ammeter, a MI (0-60)V voltmeter, coil 1, and coil 2. **Procedure:** 1. Connect the circuit as per circuit - 1 to determine self-inductance. 2. Initially keep auto transformer in zero volt positions. 3. Step by step vary the auto transformer, and tabulate all meter readings up to the ammeter indicates a value of 2A. 4. Determine the average value of self-inductance of coil - 1. 5. Reconnect the circuit as per circuit - 2 and repeat the steps 2 & 3. 6. Determine the average value of inductance in series aiding of coil - 1 & 2. 7. Reconnect the circuit as per circuit - 3 and repeat the steps 2 & 3. 8. Determine the average value of inductance in series opposing of coil - 1 & 2. 9. Determine mutual inductance and coefficient of coupling (K). **Observations:** | S.NO. | Voltmeter Reading (V) | Ammeter Reading (I) | Inductive Reactance (X) = V/I | Inductance (L) = X/w | |---|---|---|---|---| **Calculations:** **Discussion and Conclusions:** ## Experiment No: 7 **Harmonic Power Analysis and 1-φ AC Circuits Analysis** **Aim:** - **A)** Harmonic Power analysis using Bridge Rectifier - **B)** AC Circuits Analysis: - i) Analysis of Series RL - Circuit - ii) Analysis of series RLC - Circuit - iii) Analysis of parallel combination of RL and C circuit - iv) Power factor correction **Apparatus:** | S.NO. | Equipment Name | Type | Range | Quantity | |---|---|---|---|---| | 1 | CRO | | | 1 | | 2 | Function Generator | | (0-10) MHz | 1 | | 3 | Resistor | Wire Wound | (0-40) Ω | 1 | | 4 | Inductor | Iron Core | (0-48) mH | 1 | | 5 | Ammeter | MC | (0-5) A | 1 | | 6 | Voltmeter | MC | (0-300) V | 1 | | 7 | Multimeter | | | 1 | | 8 | Wattmeter | Dynamo | (0-5)A, (0-150)V & LPF | 1 | | 9 | Auto transformer | Variac | (0 – 270) V | 1 | | 10 | Connecting wires | | | Required No. | **A) Harmonic Power analysis using Bridge Rectifier:** - A diagram with an auto-transformer, a diode bridge rectifier, 30 ohm resistor, 48mH inductor, and a wattmeter. **Procedure:** 1. Connect as per circuit diagram as shown in Fig. 1. 2. Initially keep auto transformer at zero position, variable resistance at 30. Ω, inductance coils in series aiding to give 48mH, and connect a large capacitor across bridge rectifier to give constant DC voltage. 3. Switch ON the AC supply using SPST switch. 4. By varying auto transformer apply RMS AC voltage of 100V. 5. Now take the readings of all the meters and tabulate. 6. Now bring back the auto transformer to minimum position, and switch off the supply. 7. Now remove the capacitor across rectifier, and follow again the step - 3, 4 & 5. 8. Now measure the AC ripple content in rectifier output wave form, and corresponding theoretically 2nd (100 Hz) order harmonic power. 9. Compare theoretically and practical values. **Observation Table: (VRMS= 100V)** - **With capacitor:** | S.NO. | Ammeter Reading | Voltmeter Reading | Wattmeter Reading | |---|---|---|---| | 1| | | | - **Without capacitor:** | S.NO. | Ammeter Reading | Voltmeter Reading | Wattmeter Reading | |---|---|---|---| | 1| | | | **Calculations:** 1. Output Voltage (Voc) = 2VM 2. DC Current (IDC) = VDC/R 3. DC Power (PDC) = VDC * IDC 4. 2nd harmonic AC voltage (VAC1) = 4Vm/(3√3π) 5. 2nd harmonic current (IAC1) = VAC1/(R+ j2WI) 6. 2nd harmonic power (PAC1) = VAC1 * IAC1 * COS θ1 7. Total power (P) = PDC + PAC1 **Precautions:** 1. Connections should be tight. 2. Avoid parallax errors. 3. Initially keep auto transformer in minimum position. **Discussion and Conclusions:** **B) 1-φ AC Circuits Analysis:** - **Series RL- Circuit:** - A diagram with an auto-transformer, a 30 ohm resistor, a 4.8mH inductor, and 2 MI voltmeters. - **Series RLC circuit:** - A diagram with an auto-transformer, a 30 ohm resistor, a 4.8mH inductor, a 16.5 μF capacitor, and, 2 MI voltmeters. - **Series RL circuit in parallel with C:** - A diagram with an auto-transformer, a 30 ohm resistor, a 4.8mH inductor, a 16.5 μF capacitor, and 2 MI voltmeters. - **Power factor correction:** - A diagram with an auto-transformer, a 16.5 μF capacitor, a 4.8mH inductor, and 3 MI ammeters. **Procedure:** 1. Connect the circuits as per circuit - 1, 2, 3, & 4. 2. Initially keep auto transformer in zero volt position, rheostat at 30 Ω resistance. 3. Switch ON the supply, and Apply RMS voltage of 100 V, by varying AUTO Transformer. 4. Measure current through each circuit, and voltage across R, L, and C in each circuit using ammeter, and voltimeter respectively. 5. Tabulate and compare theoretical and practical values. 6. Observe and draw voltage, current waveforms and phase angle between them for each circuit parameter (R, L & C) using CRO or CLAMP Meter. **Observations: R=30, L=48mH, C=16.5µF or 8.2 μF** | | Series RL circuit | Series RLC circuit | Series RL circuit in parallel with capacitor | Power factor correction | |---|---|---|---|---| | I | | | | | | VR | | | | | | VL | | | | | | VRL/V | | | | | | | VC | | VC | VC/V | | VRLC/V | | VRLC/V | | | | | | | | | | | | | | | **Calculations:** **Precautions:** 1. Initially keep auto transformer in zero volts position. 2. Connections should be given properly without any loose contact. **Discussion and Conclusions:** ## Simulation Exercise 1 **Getting started:** 1. Using Windows Explorer, create a folder user_name in the directory c:\cslab\batch_index. For uniformity, let the batch_index be A1, A2, B1, or B2, and user_name be the roll number. 2. Invoke MATLAB. Running MATLAB opens the Matlab Desktop on your monitor. Of these, the Command window is the primary place where you interact with MATLAB. The prompt >> is displayed in the Command window, and when the Command window is active, a blinking cursor should appear to the right of the prompt.. 3. >> cd c:\cslab\batch_index\roll number % sets working directory. The working directory can also be selected using the Browse for folder icon on the desktop **Interactive Computation, Script files** **Objective:** Familiarise with MATLAB Command window, do some simple calculations using arrays and vectors. **Exercises** - The basic variable type in MATLAB is a matrix. To declare a variable, simply assign it a value at the MATLAB prompt. Let's try the following examples: - **Elementary matrix/array operations.** - To enter a row vector ```matlab >> a = [5 3 7 8 9 2 1 4] >> b = [26 43 8 7 9 5]; ``` - To enter a matrix with real elements ```matlab >> A = [5 3 7; 8 9 2; 1 4.2 6e-2] ``` - To enter a matrix with complex elements ```matlab >> X = [5+3*j 7+8j; 9+2j 1+4j]; ``` - Transpose of a matrix ```matlab >> A_trans = A' ``` - Determinant of a matrix ```matlab >> A_det = det(A) ``` - Inverse of a matrix ```matlab >> A_inv = inv(A) ``` - Matrix multiplication ```matlab >> C = A* A_trans ``` - Array multiplication ```matlab >> c = a .* b % a.*b denotes element-by-element multiplication. % vectors a and b must have the same dimensions. ``` - **Few useful commands:** - >> who % lists Variables in workspace - >> whos % lists variables and their sizes. - >> help inv - The online help system is accessible using the help command. Help is available for functions eg. help inv and for Punctuation, help punct. A useful command to get started is Intro, which covers the basic concepts in MATLAB language. Demonstration programs can be started with the command demo. Demos and help can also be invoked using the Help Menu at the top of the window and from the Start icon at the bottom left of the Matlab Desktop. - >> lookfor inverse - The function look for becomes useful when one is not sure of the MATLAB function name. - >> clc % clear command window - >> save session1 - % workspace variables stored in session1.mat - >> save myfile.dat a b' -ascii - % saves a,b in myfile.dat in ascii format - >> clear % clear workspace - >> who - >> load session1 - >> who - >> pwd % present working directory - >> disp('I have successfully completed MATLAB basics') **3. Find the loop currents of the circuit given in Fig. 1.1.** - Network equations are: - ```matlab [170 -100 -30; -100 160 -30; -30 -30 70] * [i1; i2; i3] = [10; 0; 0]; ``` - **Sample Solution a:** - ```matlab >> Z = [170 -100 -30; -100 160 -30; -30 -30 70]; >> v = [0; 0; 10]; >> I = inv(Z) * v ``` - **Creating script files** - Editing a file: File Menu → New → M File, invokes MATLAB Editor/Debugger. Save file with extension.m - **Sample Solution b:** (using ex_lb.m file) - Edit the following commands in the Editor and save as ex_lb.m. A line beginning with % sign is a comment line. ```matlab % ex_1b.m clear; clc; % Solution of Network equations Z= [170-100-30; -100 160-30; -30-30 70); v = [0; 0; 10]; disp('The mesh currents are: ') i = inv(Z)*v; ``` - Typing ex_lb at the command prompt will run the script file, and all the 7 commands will be executed sequentially. The script file can also be executed from the Save and Run-command-in Debug Menu of the MATLAB Editor. - **Sample Solution c:** (interactive data input using ex_lc.m) ```matlab % ex_1c.m % Interactive data input and formatted dutput clear; clc; % Solution of Network equations Z = input('Enter Z: '); v = input('Enter v: '); i = Z\v; % Left division - computes inv(Z)*v disp('The results are: ') fprintf('i1 = %g A, i2.= %g:A, i3 = %g A \n', i(1),(2),(3)). ``` - **Results:** ```matlab i= 0.1073 0.1114 0.2366 ``` - **4. Find the loop currents of the circuit given in Fig. 1.2 (write script files for solution).** **5. Find the transient response of the circuit given in Fig. 1.3.** - **Given:** i(t) = (V/R) * e^(-t/T) where T = RC - **Sample Solution:** ```matlab % ex_5a.m clear; clc; disp(' RC transient analysis') v = input(' Enter source voltage: '); r = input(' Enter value of resistance :'); c = input(' Enter value of capacitor: '); T = r*c; fprintf('\n The results are : \n\n') disp('t (sec) (A) VC (V)') for n= 1:10 t(n) = (n-1)*T/2; i(n) = (v/r) * exp(-t(n)/T); v_c(n) = v * (1-exp(-t(n)/T)); end; fprintf('%6.4f\t%6.4f\t%6.4\n', t(n),i(n),v_c(n)) ``` - **Colon operator:** The colon operator is useful for creating index arrays, creating vectors of evenly spaced values, and accessing sub-matrices. A regularly spaced vector of numbers is obtained by means of n = initial value: increment: final value. Without the increment parameter, the default increment is 1. For a 9 x 8 matrix A, A (2,3) is the scalar element located at the 2nd row and 3rd column of A; and a 4x3 sub-matrix can be extracted with A (2:5,1:3). The colon also serves as a wild card i.e., A (2, :) is the 2nd row. - **Sample Solution b:** (generating vectors) ```matlab % ex_5b.m clear; clc; disp('RC transient analysis') v = input(' Enter source voltage : '); r= input(' Enter value of resistance :'); c = input(' Enter value of capacitor: '); T = r*c; fprintf('\n The results are :" \n\n') disp('t (sec) (A) v_c (V)') t = 0: 0.5*T:: 5*T; % start value: increment: final value i = (vir) * exp(-t/T); v_c = v * (1:- exp(-t/T)); % To output the results in tabular form A = [t; i; v_c]; fprintf('%6.4f\t%6:4f\t%6,4f\n', A); % concatenates the vectors. %