0% found this document useful (0 votes)
48 views28 pages

PSS Lab

Uploaded by

NRCM EEE
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
48 views28 pages

PSS Lab

Uploaded by

NRCM EEE
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 28
Power System Simulation Lab oa Introduction to MATLAB: MATLAB is a high performance language for technical computing. It integrates computation, visualization anc programming in an easy-to-use environment where problems and solutions are expressed in familiar ‘mathematical notation. MATLAB is numeric computation software for engineering and scientific calculations, MATLAB is primary tool for matrix computations. MATLAB is being used to simulate random process, powe, system, control system and communication theory. MATLAB comprising lot of optional tool boxes and block set like control system, optimization, and power system and so on. Typical use: Mathematics tools and computation 0 Algorithm development Oi Modeling, simulation and prototype O Data analysis, exploration and visualization 0 Scientific and engineering graphics 0 Application development, including graphical user interface building >> quit rr [Trower System Simulation Lab ji) Function Mcfiles — Function file that contains function command at the first line of the M-file simulink [atthe MATLAB prompt type simulink and brings up the “Simulink Library Bro Simulink Library Browser are the top level ofa hierarchy of palette of elements ¢ model of your own. creation. The “‘simulink” pallete contains the majority of the elements used in the MATLAB. Simulink has built into ita variety of integration algorithm for integrating the d You can place the dynamic equations of your system into simulink in four ways. 1 Using integrators 2, Using transfer functions 3, Using state space equations MATLAB workspace: “The workspace is the window where you execute MATLAB cot the workspace is to type whos. This command shows you al should always change working directory to an appropriate I ‘workspace like command is >>clear all Teliminates all the variables in your workspace. For example, start MATLAB and execute the following sequence of commands pak + >>b-5 >>whos >>clear all sre far two commands loaded the two variables a and b tothe workspace and assigned value of 2 and 5 respectively. The clear all command clear ‘the variables available in the work space. The arrow keys are real wnat the command line, the up arrow scrolls through handy in MATLAB. When typing in long expressio previous commands and down arrow advances the other direction. Instead of retyping a previously entered Command just hit the up arrow until you find it. If you need to change it slightly the other arrows let you position the cursor anywhere. Finally any by any exclamation mark. MATLAB data types: ocation under your user name.Another useful The most distinguishing aspect of MA‘ eae eae ise | x | array, For example clear your workspace and execute the commands. >>whos ‘Two things should be evident. First MATLAB distinguishes the case of a variable name and that both a and A are considered arrays. Now {et’s look at the content of A and a. a wwser”. Each of the items in the hat you can add to a simulink jynamic equations. mmands (Ref. figure-1). The best way to probe Il the variables that are currently in workspace. You DOS command can be entered in MATLAB as long as it is preceded -TLAB is that it allows the user to manipulate vectors As for as MATLAB 1B Power System SPEC >A ‘Again two things are important from this example. First anybody can examine the contents of any variables simply by typing its name at the MATLAB prompt. When typing in a matrix space between elements separate columns, whereas semicolon separate rows. For practice, create the matrix in your workspace by typing itin al the MATLAB prompt. >>B= (30-1; 44 2;7211]; (use semicolon(;) to represent the end of a row) >>B ‘Arrays can be constructed automatically. For instance to ereate a time veetor where the time points start at 0 seconds and go up to 5 seconds by increments of 0.001 >>mytime =0:0.001:5; Automatic construction of arrays of all ones can also be created as follows, >>myone=ones (3,2) Outcome: a. x By doing the experiment, the students can understand the concepts of MATLAB programming in solving pos: systems problems. Application: MATLAB Used Algorithm development Scientific and engineering graphics Modeling, simulation, and prototyping. Application development, including Graphical User Interface building Math and computation Data analysis, exploration, and visualization wer System Simulation Lat Power Syst lation Lab a Viva Questions: j. What is meant by MATLAB? MATLAB is a high-performance language for technical computing. It integrates computation, visualization, and programing in an easy-to-use environment where problems and solutions are expressed in familiar mathematical notation. : 2. What are the different functions used in MATLAB? ‘The different function intersect ,bitshift, categorical, isfield 3, What are the different operators used in MATLAB? Arithmetic, Relational Operations, Logical Operations, Set Operations, Bit-Wise Operations 4, What are the different looping statements used in MATLAB? For, while 5. What are the different conditional statements used in MATLAB? If, else 6. What is Simulink? Simulink, developed by Math Works, is a graphical programming environment for modeling, simulating and analyzing multi domain dynamical systems. Its primary interface is 2 graphical block diagramming tool and a customizable set of block libraries. 7. What are the four basic functions to solve Ordinary Differential Equations (ODE)? ode45, ode15s, odelSi 8. Explain how polynomials can be represented in MATLAB? poly, polyval, polyvalm , roots 9. What is meant by M-file? An m-file, or script file, is a simple text file the commands and executes them exactly as ‘it woul prompt. 10. What is Interpolation and Extrapolation in MATLAB? Interpolation in MATLAB is divided into techniques for data points ona grid and scattered data points. 11. List out some of the common toolboxes present in MATLAB? Control system tool box, power system tool box, ‘communication tool box, 12. What are the MATLAB System Parts? MATLAB Language, MATLAB working environment Application Program Interface. 13, What are the different applications of MATLAB? ‘Algorithm development, Scientific and engineering grap! development, including Graphical User Interface building, visualization where you can place MATLAB commands. When the file is run, MATLAB reads Id if you had typed each command sequentially at the MATLAB , Graphics handler, MATLAB mathematical library, MATLAB nics, Modeling, simulation, and prototyping, Application Math and computation Data analysis, exploration, and Power System Simulation Lab EXPERIMENT- APPARATUS REQUIRED: Desktop with pre installed MATLAB, OBJECTIVE: To determine L 1 SIMULATION DIAGRAM: For Case - 1:- tClose=0' 1 52 3 4 GENERATION OF HIGH FREQUENCY TRANSIENTS THROUGH RLC CIRCU AIM: To generate and observe high frequency transients in Series RLC Circuit Transient response of a series R-L-C circuit, excited by a unit step input using MATLAB, Transient response of a R-L-C parallel circuit, excited by a unit step input using MATLAB. a. wt, «|v For InductorL1: IC=0A CapacitorCl: IC=0V For Analysis Setup: Transient:- Print Step :0ns Final Time : 100s Simulate the circuit and draw i the plot of (0) vs. £ Note the value ofthe first peak ofthe current response, (Trevor System Simulation Lab Power For InductorL1: IC=0A CapacitorCl: IC=0V For Analysis Setup: ‘Transient:- Print Step :Ops Final Time : 50s ‘Simulate the circuit and draw the plot of i() vs.t. Note the value of the first peak of the current response. For Case -3:- to1ss0-0 a 4 23 a 5 +. Mt. 6 ‘Sul «lw o ct our [oe i é For InductorL1: 1C=0 CapacitorC1:IC-0V For Analysis Setup: Print Step :0ns Final Time : 70nS Simulate the circuit and draw the plot of i(t) vs.t- Power System Simulation Lab Note the value of the first peak of the current response, | MODEL GRAPH: j OOS SSSRAPH: Critically Dampea case Current Over Dampeq case RESULT: lL 2. 3. 5. Power System Simulation Lab ‘SPEC EXPERIMENT-2 VOLTAGE DISTRIBUTION ACROSS INSULATOR STRING Aim: to find the Voltage distribution across the insulator string Apparatus Required: MATLAB software Alogithem for programme: Click on MATLAB icon on screen. Now click on file Onew file--0’M’ file go to Simulink. Now a window opens in which we have to type the program. 4.Now save the program The output got in command and figure window. Theory: CZZZZZAZZZZL.. HOwOr as I c= Ww LLt oat I 4 Ti FL ignature with Date erent ewe A yehth racatec Tio racaniacetane reer “Agpbjng into Program code: clear all close all : JineVoltage = input(enter the line voltage in kV’); K-=input(enter the tower capacitance factor’); N= input(enter the number of disc’); v=zeros(1,N); %the voltage arrays v(1)=1; for i=2:N A) = v(i- * *i-l)): %v(i) = vii | end vi) = v(i-l) + K*sum(v(1:i-1)); %v(i) = v(i-1) + K*sum(v1 + v2 + .....V(i-1) factor = lineVoltage/(sqrt(3)*sum(v)); voltages = factor*v; ' efficiency = lineVoltage/(sqrt(3)*m: display(‘voltage across disc in ne ax(voltages)*N)*100 display(voltages); display(‘String Efficincy') display(efficiency); (cs System Simulation Lab = i Comparison: Theoretical Practical Efficiency Output: Result: 21 | power System Simulation Lab = EXPERIMENT - 4 CALCULATION OF FAULT CURRENT IN TRANSMISSION LINE aise To calculate fault current in transmission line APPARATUS REQUIRED: Desktop with pre installed MATLAB “CIRCUIT DIAGRAM: a “Be Ve we | -Ba a Series RLC Load Three-Phase Source Three-Phase ‘Trea Phase fee \V-I Measurement — p% Section Line ec ‘Three-Phase \V-I Measurement Uh se Three: Simulation of Fault Analysis n Lab Power System Simu PROCEDURE: Open MATLAB Software 2 Open editor window 3. Write the Program in the editor window 4 Run the program s. Observe the result in the plot window “rer Sytem Simulation Lab SPEC EXPERIMENT - 5 TIME CONSTANT CALCULATION OF RL CIRCUIT AIM: To calculate time constant of RL circuit and plot its response. APPARATUS. REQUIRED: Desktop with pre installed MATLAB CIRCUIT DIAGRAM: R AWA . 202 + (0) @ LE Itt iol . ° Circuit Diagram THEORY: RL Circuit: Signature with Date Power System Let switch K be at position 1. When Ldyadt+Ri=0 divi=-RL At . Integrating & then taking lox on both sides _ fogie-RUL+loge wheres constant or, lopie Rt HORS 0 atue of C2 is cateulated or ce nae ‘This is te general solution of RL circu ifthe then the result is known as cular solution. ‘Just before switching at t= 0. i@)=V/R + Putting in equati ) 1O)=C2 monte .c2 =V/R + Particular solution is i=v/Re PROCEDURE: 1 Open MATLAB Software 2. Open editor window 3. ‘Write the Program in the editor window 4. Run the program 5 Observe the result in the plot window MATLAB. PROGRAM:\ @RL Circuit Analysis clear all; close all; clc ggcircuit Parameters Re 20; % Resistance (20 Ohm) L= le-3; % Inductance (1mH) L/R: % RL Circuit Time Constant % Source Voltage (1V) tau: *tau; % Sampling Time *heaviside (Time) 7 tau/10 VL= Vs.*exp(-Time./tau) - plot (Time, VL) xlabel ("Time (s)') ylabel (‘Amplitude (V)') title ('VL') y mulation Lab system Sint SPEC st spRVATION TABLE: ET S.No. | Time constant _| Time constant (Theoretical) (rse:}| (Simulation) (msec} | Smsee Smsec _ tom sec. lomsec RD Is msec \gmsec ys | Romsec 2omsec. MODEL GRAPH: Mh q sf", & < . Time (8) RESULT: » [Sigmnrewindoe | Power System Simulation Lab EXPERIMENT - 6 TIME CONSTANT CALCULATION OF RC CIRCUIT AIM: To calculate time constant of RC circuit and plot its response. APPARATUS REQUIRED: Desktop with pre installed MATLAB CIRCUIT DIAGRAM: CIRCUIT DIAGRAM: Circuit Diagram THEORY: RC Circuit: Let initially the K is at 1. ifitis moved to position 2, then apply KVL, UClidt+Risy Differentiating w, VCi+R dildt=0 Rdifdt= -1/C; dii= URCdt Integrating wrt torr & then taking logon both sides Logi URC ht see? i=C) et 1 On putting I= an ein) = os DURE: pen. MATLAB Software a 0 pen editor window 2 | \Weite the Program in the editor window ES Run the program: Observe the result in the plot window ATLAB PROGRAMS\ qeielearalliclose alli Sire cizcuit Charging Analysis be 100-6; & Capacitance zz le3; 8 Resistance 1 y= CHR 1; & Time Constant 1 (tau=RC) :0.00270.05; $ Time Sampling yi = 10* (1-exp(-t/Tau_l) )+ R2 = 10e3; $ Resistance 2 tau2 = C*R2; % Time Constant 2 (tau=RC) V2= 10 (I-exp(-t/Tau_2)}+ $ Voltage Calculation 2 .1e3; $ Resistance 3 c#R 3; $ Time Constant 3 (tau-RC) V3 = 10*(I-exp(-t/Tau3))7 $ Voltage Calculation 3 af Plotting the Results plot(t,V_1,'r',t,V_2,!g', tyV_3,'b") axis({0 0.06 0 12]) title("capacitor Charging Analysis with three Time Constants’) vlabel(*Time, s') ylabel (‘Voltage across capacitor') OBSERVATION TABLI S.No. | Time constant _| Time constant (Theoretical) (Simulation) © 10 10 2 loo 100 2 ! ' eg Voltage Calculation 1 (formula from text) MODEL GRAPH; Capaattor Charging Analysts with three Time Gongtants_ SIS a gst Simulation Lab SPEC = EXPERIMENT -7 ‘TIME CONSTANT CALCULATION OF RLC CIRCUIT ais: ‘ocaeulate time constant of RLC circuit ppARATUS REQUIRED: paktop with pre installed MATLAB cRCUIT DIAGRAM: Series RLC Cireult = 0 de i Parallel RLC Circult PROCEDUR! 1. Open MATLAB Software 2 Open editor window * Write the Program in the editor window 4 Run the program 5. Observe the result in the plot window ele; clear all; close all; %% Series RLC circuit ‘C=input(C value); % Capacitance Reinput(R value'); % Resistance L=input('L value); TC1=2"LR ‘%% parallel RLC circuit TC2=2°R*C OBSERVATION TABLE: S.No. | Time constant (Theoretical) Time constant te Tiyto4 ty t073 | actor xis 3 B LUIS Geist fusion 4 — 3. [222x164 Oo faoaris! RESULT: SPEC SIMULATION PROGRAM FOR RESONANCE iH bef aperesponse of series and parallel resonance ‘ spp3TUS REQUIRED: pskop with pre jnstalled MATLAB .gx{8S RESONANCE: Foobiain the plot of frequency vs. Xz, frequency vs. Xe, frequency vs. impedan oobi DC PIRLC iru and determine the resonant fequeney and .. sndoguney vs cure or y2159,C=10F, ye SOV vary Frequency in steps of | Hz sing MATLAB. Pro dle; clear all; closeall; ‘inputenter the resistance value-——>'} Frinput(enter the inductance value——->): c=inpul(enter the capacitance valu ‘=input(enter the input voltage~ £5:2:300; Program: gram to find the Series Resonance faa J2*pitfe))s rxlexc; zesqrt(e*2)4(8."2)); ivi; * ‘yplotting the graph subplot(2,2,1); plot(fxl); xlabel('frequency’); ylabel(X1" subplot(2,2,2); plot(f,xe); grid; xlabel( frequency’); viabelXe), ’ subplot(2,2,3); lot(fz); . xlabel( frequency’); wean 38 Power System Simulate == grid; xlabelCfrequency’); label Program resi enter the resistance value- enter the inductance value: center the capacitance value-—~ enter the input voltage >is >0.1 >10*10*-6 >50 200 ° o “100 200 300 frequency. 700 200 ny frequency aa 4 3000 t i 3 Poe nx 200 ' i -2 He 1000, ! 1 1 if a t aca] o ol 1 ! 100200 300 frequency a 200 300 Fig: O1 ‘8: Output waveforms of Series Resonance. frequency Sem Silation La ae pal LEL RESONANCE: pee hs of freq aban the Fency in step Fa caelations. ms 000.2, C= 400 HF £0250; seaepitt ae(L2*pitt*C)); bl=lxl; bel Jxc; bebI-be; =r, Fesq((g'2)0/2)) ‘%plotting the graph subplot(2,2,1); plot(f,b1); ori xlabel( frequency); ylabel(B1'); subplot(2,2,2); plot(f,be); erid; xlabel( frequency’); ylabel(‘Be’); subplot(2,2,3); plo(fy); rid; xlabel( frequency’); ylabel(Y") subplot(2,2,4); plot(fi; rid; xlabel(‘requency’); ylabel(1'); = 1 H, V= SOV vary frequency in steps of 1 Hz using MATLAB. SPEC uency vs. Bi, frequencyvs. Be, frequency vs. admittance and f ws. s for the given circuit and find the resonant frequency and chest. fy Program result | enter the resistance value— 21000) | enter the inductance value— el center the capacitance value— >400*10*-6 enter the input voltage—— 250 | CALCULATIONS; ' mg EXPERIMENT. L,C.ZOF 3-PHASE TRANSMISSION LINE TION OF R, rameters L and C per phase per kilometer of a three passage caLcuLA bee sine the positive sequence line Pi gle jreitwansmission fines for different conductor arrangements ppspatus REQUIRED: Sopwith installed MATLAB sg BSSRE REQUIRED: | jamb Le | oO: ' : Fe isin line has four parameters namely resistance, inductance, capecian® 20d contoctence. Toe 2 ‘and capacitance are due to the effect of magnetic an¢ yr is best determined from the f the conducto! evaluated using theformula. ow of the MATLAB. Earth om yal NO Ne ‘Type and save the PrOBTar inthe editorwindow. eat the program by either pressing Tools View theresults ne has its conductors placed at a distance of 11 m ugé Dm Te 3.625em Calculate the jnductance and capacitance of the rensposed ‘the above’ threelinss- URE: Enter the command wind | EXERCISE:1 ‘thee phase transposed i | tac Have @ diameter of conductors. (a) Determine the inductance and capaci (0) Verify the results using the MATI per kilometer of CALCULATION: rm general formu! =0.2In(Dm/Ds) mH / Km aon geometric mean distance (GMD) Ds seeamarie mean radius (GMR) LE PH, LE SINGLE ASE 2 WIRE SYSTEM: te =1'=0.77885 ¢, rs the radius of conductor PACING: 2 ‘THREE PIHASE - SYMMETRICAL STO" — REE PHASE SYMMETRICAL 8 GMD= MD =D GMR=re-1/4 =F Power System Sinnulation Lab R Where, r= radius of conductor & GMR r = 0.7788 ne i farad pet km ofa transmis, lon Tin, CAPACITANCE: . y ein micro ‘A general ANCE evaluating capacitance per phas given by, C= 0.0556 n (Dea /1) M/A. smeatatdefinedforinductanceundervariouscace, Where, GMDisthe*Geometriemeandistanc PROGRAM %3 phase single circuit oooh Di2vinputCente the distance between D12in om: nput(‘enter the distance between D23in cm: 3% putenter the distance between D3 lin ainputCenter the value of ¢: ); 142; Ds=0.7788*r, x=D12*D23D31; Deg=nthroot(x,3); YelogDeq/Ds); inductance=0.2*Y c2pacitance=0.0556/(log(Deq)t)) fprint\n The inductance per phase per km is 9 mH/ph/km \n',inductance); fprintf(‘tn The capacitance per phase per km is %f mf/ph/km \n',capacitance); ig ourpur: The inductance per phase per km is 1.377882 mH/ph/km. ‘The capacitance per phase per km is 0.008374 mflph/km RESULT: Diz = 4o Dz3: 35 D3 = 30 d= 50 Le o-lisg C = Olgas. a SPEC EXPERIMENT -10 OF TARIFF BASED ON LOAD CURVE gsTIMATION i . its gene D the Maximum demand, No.of unils 8 ered px ay nd ply ta este yl 1620 | 2024 0 40 | ‘Alogithem fo | kon MATLAB icon onscreen. . Centekon file new file-2"M” file go to ‘simulink 3. Nowa window opens jn which we have (© type the program 4.Now save the progsam 4 The output got in command and figure windows Program code: le; clear all; close all; data = (00 06 40; 06 10 50; 10 12.60; 121650; 162070; 2024 40] stedata(1); t-data(2); loadm = data(,3); ent géload in kw im ; Yotime in hours erated kwh A 4) Younits gem aa its_gen = sumtime. *loa le tenant tin i ei elit for ye oa P ny Mroadm(e) Sot iP) xlabet (ime ein hours) MW) 0 6 49 Re 6 10 2 16 50 Ie 2% 70 _- oa ge) ing Saree) a ci fixed efunits_e" monthly) of 2305 inning ohare = 103000 ke UntES generstied 5 aK: Enter --fixed Cask = 59 Enter - Running cost = 40 OOF Bin: bheqase*

You might also like